noPac icon indicating copy to clipboard operation
noPac copied to clipboard

Unhandled Exception: System.DirectoryServices.DirectoryServicesCOMException: The user name or password is incorrect.

Open forensic65x opened this issue 3 years ago • 2 comments

nopac.exe scan -domain testlocal.net -user testlocaluser -pass 'testlocaluserPASS!'

Using a verified good password, triggers the following error:

Unhandled Exception: System.DirectoryServices.DirectoryServicesCOMException: The user name or password is incorrect.

at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne) at noPac.Program.getDCs(String domain, String username, String password, String domainController) at noPac.Program.scan(String domain, String username, String password, String passwordHash, String domainController) at noPac.Program.Main(String[] args)

It kicks up a 'NoPac has stopped working' error as well..

While the executable did compile. It did show this recurring warning below.

------ Rebuild All started: Project: noPac, Configuration: Debug x64 ------ C:\github\noPac\noPac\lib\S4U.cs(300,29,300,36): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\S4U.cs(389,25,389,32): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\S4U.cs(558,21,558,28): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\S4U.cs(902,21,902,28): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\S4U.cs(947,17,947,24): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\Roast.cs(158,25,158,32): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\Roast.cs(687,49,687,53): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\Roast.cs(811,21,811,28): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\Renew.cs(160,25,160,32): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\Ask.cs(411,25,411,32): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\Ask.cs(634,21,634,28): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\ForgeTicket.cs(976,21,976,28): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\LSA.cs(554,21,554,28): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\LSA.cs(590,25,590,32): warning CS0162: Unreachable code detected C:\github\noPac\noPac\lib\LSA.cs(1480,69,1480,76): warning CS0162: Unreachable code detected noPac -> C:\github\noPac\noPac\bin\x64\Debug\noPac.exe ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

forensic65x avatar Dec 19 '21 17:12 forensic65x

I have the same issue

benybb avatar Dec 23 '21 20:12 benybb

Try using double quotes instead of single quotes when setting the password. That's what fixed it for me.

scottctaylor12 avatar Feb 05 '22 00:02 scottctaylor12