Sep 252015

During a pentest I recently had to check for Windows shares on a Windows Domain where my computer was not a member of. I had user credentials for the other domain, but I could not make it work. Normally I would check the shares using

net view <IP> /all

But this time I received “System error 5 has occurred. Access is denied.”. I tried running “cmd.exe” as the other user, which was not allowed, because my computer was not part of the other domain. So, here is how I solved it:

– open up a command prompt

– try “net use \\<IP>\IPC$” – it will ask you for the username and password (use <OTHER DOMAIN>\<USERNAME)

– now try “net view <IP> /all” and it should work

If you get “System error 1396 has occurred. Logon Failure: The target account name is incorrect.” you probably tried using the hostname or FQDN. Try the IP instead – it worked for me.

Happy hacking!