Scratch Notes

Basics

PowerShell

Random finds

Useful Tools

Later

Python ideas

  • Python: check out winreg module in stdlib - there's info about HKEYs here
  • Script to parse SID?

From secretsdump.py:

  • DCSync (dead link)
  • SysKey and the SAMopen in new window
    • NTLM is basically just MD4.
    • SysKey, or the boot key, is a key in the system hive used to encrypt SAM hashes.
    • It's composed of four other separate keys, and must be unscrambled.
    • Before messing w/ SAM, need hashed boot key to derive RC4 keys used for decrypting SAM.
    • Semi-complicated, but not too bad. Just need to steal system and SAM hives, or even just SAM if bootkey can be obtained in some other way.
    • For a POC, see: creddumpopen in new window
  • Decrypting LSA secretsopen in new window
    • LSA secrets are in security hive, aiming for NL$KM, the key that encrypts cached domain passwords
      • Of course, the boot key comes into play here
    • Can search memory space of lsass.exe to get this key
    • Key follows a "rolling" (?) decryption scheme (not super important except for dev work)
    • To make things a bit easier, we can also just rip from a separate registry key and do some magic with the boot key
    • See lsadump.py in the creddump repo
  • Cached domain credsopen in new window
    • Needed so that users aren't locked out in the event that the DC goes down
    • Found in HKLM\Security\Cache - check values NL$1, NL$2, etc.
    • Just builds off the previous articles, more fun with NL$KM
    • See cachedump.py in the creddump repo

  • https://web.archive.org/web/20130901115208/www.quarkslab.com/en-blog+read+13
  • https://lab.mediaservice.net/code/cachedump.rb
  • https://insecurety.net/?p=768
  • https://web.archive.org/web/20190717124313/http://www.beginningtoseethelight.org/ntsecurity/index.htm
  • https://www.exploit-db.com/docs/english/18244-active-domain-offline-hash-dump-&-forensic-analysis.pdf
  • https://www.passcape.com/index.php?section=blog&cmd=details&id=15
Last Updated: