Skip to content

pkg registry

Jacob Paullus edited this page Apr 17, 2026 · 1 revision

pkg/registry - Windows Registry Hive Parser

Offline parser for Windows registry hive files (SAM, SYSTEM, SECURITY). Used by secretsdump for local credential extraction.

func Open(data []byte) (*Hive, error)

Specialized Parsers

File Functions Description
system.go Boot key extraction Extract the SYSKEY from the SYSTEM hive
sam.go SAM parsing Extract local user hashes from the SAM hive
security.go LSA secrets, cached credentials Extract LSA secrets and domain cached credentials
crypto.go Decryption helpers AES/DES/RC4 decryption for registry secrets

Example: Extract Boot Key

data, _ := os.ReadFile("SYSTEM")
hive, err := registry.Open(data)
if err != nil {
    fmt.Printf("[-] %v\n", err)
    return
}

bootKey := hive.GetBootKey()
fmt.Printf("[+] Boot key: %x\n", bootKey)

Clone this wiki locally