Lil Pwny is a Python application to perform an offline audit of NTLM hashes of users’ passwords, recovered from Active Directory, against known compromised passwords from Have I Been Pwned. The usernames of any accounts matching HIBP will be returned in a .txt file
There are also additional features:
More information about Lil Pwny can be found on my blog
Recommendations
This application was developed to ideally run on high resource infrastructure to make the most of Python multiprocessing. It will run on desktop level hardware, but the more cores you use, the faster the audit will run.
Installation
Install via pip
pip install lil-pwny
Usage
Lil-pwny will be installed as a global command, use as follows:
Usage: lil-pwny [-h] -hibp HIBP [-a A] -ad AD_HASHES [-d] [-m] [-o OUTPUT]
Optional Arguments:
-hibp, –hibp-path The HIBP .txt file of NTLM hashes
-a, –a .txt file containing additional passwords to check for
-ad, –ad-hashes The NTLM hashes from of AD users
-d, –find-duplicates Output a list of duplicate password users
-m, –memory Load HIBP hash list into memory (over 24GB RAM
required)
-o, –out-path Set output path. Uses working dir when not set
Example:
lil-pwny -hibp ~/hibp_hashes.txt -ad ~/ad_ntlm_hashes.txt -a ~/additional_passwords.txt -o ~/Desktop/Output -m -d
use of the -m
flag will load the HIBP hashes into memory, which will allow for faster searching. Note this will require at least 24GB of available memory.
Getting input files
On a domain controller use ntdsutil
to generate an IFM dump of your AD domain. Run the following in an elevated PowerShell window:
ntdsutil
activate instance ntds
ifm
create full **output path**
To recover the NTLM hashes from the AD IFM data, the Powershell module DSInternals is required.
Once installed, use the SYSTEM hive in the IFM data to recover the hashes in the format usernme:hash
and save them to the file ad_ntlm_hashes.txt
$bootKey = Get-BootKey -SystemHivePath ‘.\registry\SYSTEM’ Get-ADDBAccount -All -DBPath ‘.\Active Directory\ntds.dit’ -BootKey $bootKey | Format-Custom -View HashcatNT | Out-File ad_ntlm_hashes.txt -Encoding ASCII
The file can be dow
nloaded from here
The latest version of the hash file contains around 551 million hashes.
shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…
Extract and execute a PE embedded within a PNG file using an LNK file. The…
Embark on the journey of becoming a certified Red Team professional with our definitive guide.…
This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…
This took me like 4 days (+2 days for an update), but I got it…
MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…