Practical audit advice you can use today.
# 35 : Course Notes - 507

A few quick things. First, many folks from the class said that they knew others in the office who should attend this class. If you do know someone like that, there’s a vLive class (taught completely online, two nights each week over six weeks) starting on August 4. I’m pretty sure that there’s even an offer to get an Apple Laptop or get $850 off of the class for the session that’s starting up. If you know someone who would benefit from attending, auditor or not, please let them know! (Discount/laptop deal: - AUD507 -

Here are the course notes that I made during our recent 507 class. If there’s something else that you’re looking for that I forgot to include below, please let me know! Also, please remember that you can use your existing VPN credentials to our lab to connect to and work on the AuditWars challenge at Of course, that link will only work if you are already connected to our VPN (Don’t forget to run the interface as an administrator!) Finally, I’ve attached a set of handy Powershell scripts that a student donated to the end of this email. To use them you will want to open them up and search for the word “insert” so that you can insert the relevant information from your domain.

If you try to watch the Lab videos (Disks 3 & 4) and find that some of them don’t seem to work, it is probably a missing Codec. If you go to and download that *free* player, they work just fine. :)

Feel free to link to me:

I also try to tweet useful stuff now and then:

And periodically post useful YouTube videos:

Have a great day!

Day 2 Stuff:

Router Auditing:

NMap Management & Auditing Scripts:

WPA2 PSK Hacking Demo:

Finding Wireless Clients:

NMap Difference Tracking:

NMap Difference Tracking Continued:

Day 3:

Fuzzing with WebScarab:

Scaling WebApp Fuzzing:

Day 4:

Getting users:

dsquery user -s -u auditor -p Password1

Getting users whose passwords never expire:

dsquery * -filter "(&(objectCategory=Person)(ObjectClass=User)

(userAccountControl:1.2.840.113556.1.4.803:=65536))" -s -u auditor -p Password1

Bit masking for LDAP:(userAccountControl:1.2.840.113556.1.4.803:=####)

Users who are not required to have a password:

dsquery * -filter "&(objectCategory=Person)(objectClass=User)


-s -u auditor -p Password1 -attr samaccountname

Getting last logon timestamps:

dsquery * -filter "(&(objectCategory=Person)(objectClass=user))" -attr

lastLogonTimeStamp sAMAccountName -s

-u auditor -p Password1

Useful bit values for UAC:

2 Disabled Account

16 Locked Out

32 Password not required (can be blank)

512 Normal account

65536 Password never expires

UAC values:;en-us;Q305144


View All