Skip to content

Instantly share code, notes, and snippets.

@moddedBear
moddedBear / osx_extract_hash.py
Last active August 8, 2025 01:23 — forked from teddziuba/osx_extract_hash.py
Extract a Mac OSX Catalina user's password hash as a hashcat-compatible string
#!/usr/bin/env python3
"""
Mac OSX 10.7 Lion User Password Hash Extractor
Modified from https://gist.github.com/teddziuba/3ff08bdda120d1f7822f3baf52e606c2
Extracts a user's password hash from a plist file as a hashcat-compatible string.
Plist files can be found at `/var/db/dslocal/nodes/Default/users/{username}.plist`.
10.7 Lion stores passwords in SALTED-SHA512 format (hashcat type 1722).