views:

450

answers:

3

I'd like to enumerate domain accounts and try authenticating as each with a limited set of passwords.

The issue is that I can't find any way to attempt to validate credentials without "doing" something (e.g. querying wmi with impersonation) which isn't useful as the account may or may not have the ability to connect via wmi in the first place.

Is there a way this can be done in "pure" powershell?

Or is there a .Net library I could use?

Extra info: I'm not looking to brute force accounts, it's mostly to find things like service accounts that haven't had their passwords changed. I do however need to know if it's using a weak or "known" password, not just that it hasn't been changed recently.

A: 

Wouldn't it be better to simply look at the AD object? Pretty sure that password age is in there somewhere.

EBGreen
I need to check if the password is weak/known, not if it's old; ill make that clearer. thanks anyways though
+1  A: 

So here is an idea. Create a share on a server and give all authenticated domain users write access to it. Then try to write to it to test.

EBGreen
A: 

Of course there's no way to test the password strength unless you know it. You could try logging on to a network resource with the credentials and guess at some passwords. If password strength is really an issue for service accounts, then change them to something you know is strong. But you are going to have to do something if you are trying to audit password strength.

Jeffery Hicks