Tag: wannacrypt

  • อยากรู้ว่า Windows 10 Firewall Inbound Rules เปิดหรือปิด SMBv1, SMBv2 หรือไม่

    อยากรู้ว่า Windows 10 Firewall Inbound Rules เปิดหรือปิด SMBv1, SMBv2 หรือไม่

    ทดสอบจากเครื่อง Linux ที่ตั้งอยู่ใน network เดียวกัน ทำ nmap ค้นหา SMB (TCP Port 445) ไปที่เครื่อง Windows IP 192.168.x.yy

     

    ครั้งที่ 1
    รายการ File and Printer Sharing (SMB-In) ใน Firewall Inbound Rules เมื่อตั้งค่า Enabled = No
    ผลลัพธ์
    $ nmap -A -T4 -Pn -p445 192.168.x.yy
    Starting Nmap 7.01 ( https://nmap.org ) at 2017-05-15 13:52 ICT
    Nmap scan report for 192.168.x.yy
    Host is up.
    PORT STATE SERVICE VERSION
    445/tcp filtered microsoft-ds
    Nmap done: 1 IP address (1 host up) scanned in 2.39 seconds

    ครั้งที่ 2
    รายการ File and Printer Sharing (SMB-In) ใน Firewall Inbound Rules เมื่อตั้งค่า Enabled = Yes
    ผลลัพธ์
    $ nmap -A -T4 -Pn -p445 192.168.x.yy
    Starting Nmap 7.01 ( https://nmap.org ) at 2017-05-15 13:55 ICT
    Nmap scan report for 192.168.x.yy
    Host is up (0.00048s latency).
    PORT STATE SERVICE VERSION
    445/tcp open microsoft-ds Microsoft Windows 10 microsoft-ds
    Service Info: OS: Windows 10; CPE: cpe:/o:microsoft:windows_10
    Host script results:
    | smb-security-mode:
    | account_used: guest
    | authentication_level: user
    | challenge_response: supported
    |_ message_signing: disabled (dangerous, but default)
    |_smbv2-enabled: Server supports SMBv2 protocol
    Nmap done: 1 IP address (1 host up) scanned in 47.82 seconds

    ครั้งที่ 3
    รายการ File and Printer Sharing (SMB-In) ใน Firewall Inbound Rules เมื่อตั้งค่า Enabled = Yes
    และ
    ได้ปิด SMBv1 ตามคำแนะนำ เรื่อง “วิธีปิด SMBv1 เพื่อป้องกันตัวเองจากมัลแวร์เรียกค่าไถ่ WannaCry (ทำเถอะ ไม่ถึง 5 นาที)” https://www.blognone.com/node/92410
    ผลลัพธ์
    $ nmap -A -T4 -Pn -p445 192.168.x.yy
    Starting Nmap 7.01 ( https://nmap.org ) at 2017-05-15 13:55 ICT
    Nmap scan report for 192.168.x.yy
    Host is up (0.00051s latency).
    PORT STATE SERVICE VERSION
    445/tcp open microsoft-ds?
    Host script results:
    |_smbv2-enabled: Server supports SMBv2 protocol
    Nmap done: 1 IP address (1 host up) scanned in 47.87 seconds
    จากผลลัพธ์ในครั้งที่ 3 จะมีเพียง SMBv2

    สรุปว่า รายการ File and Printer Sharing (SMB-In) ใน Windows 10 Firewall Inbound Rules นั้นหากตรวจดูพบว่าคอลัมน์ Enabled มีค่า No ก็คือ ไม่ได้อนุญาตการเข้าถึง

    ในตัวอย่างนี้ก็คือไม่อนุญาตการเข้าถึง SMB (TCP Port 445) ซึ่งเป็นช่องทางเข้าโจมตีจาก Ransomware ที่ชื่อ WannaCrypt (บางทีเรียกย่อ ๆ ว่า WannaCry)