PCredz: credential extraction from PCAP files and live interfaces
This tool extracts Credit card numbers, NTLM(DCE-RPC, HTTP, SQL, LDAP, etc), Kerberos (AS-REQ Pre-Auth etype 23), HTTP Basic, SNMP, POP, SMTP, FTP, IMAP, etc from a pcap file or from a live interface.
At a glance
- What is it?
- PCredz is a Python tool that pulls NTLM, Kerberos, HTTP, FTP and other credentials out of packet captures, writing hashcat-ready files. It is fast to start and narrow by design.
- Who is it for?
- PCredz suits incident responders, red teamers and forensic analysts who already have a capture and need credential material pulled out of it in a form hashcat can consume. It is the wrong tool for anyone hoping to recover credentials from encrypted traffic, and the README states plainly that HTTPS and SSH yield nothing.
- Can I use it commercially?
- Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Activity is slowing. The repository last received commits 8 months ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.
Star history
- lgandx/PCredz2,602 ★ · +37
| Repository | 2026-10-01 | 2026-11-24 |
|---|---|---|
| lgandx/PCredz | 2.6k | 2.6k |
37 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What PCredz pulls out of a capture
PCredz reads network traffic and extracts authentication material: NTLMv1 and NTLMv2 hashes from HTTP, SMB, LDAP, MSSQL and DCE-RPC; Kerberos AS-REQ Pre-Auth hashes with etype 23; HTTP Basic credentials and form fields; and cleartext credentials from FTP, IRC, SMTP, IMAP, POP3, LDAP Simple Bind, SNMP community strings and MSSQL TDS. It also scans for credit card numbers, a behaviour you can turn off with -c. The audience is narrow and practical: incident responders handed a capture during an investigation, red teamers who want hashes from a segment they are authorized to monitor, and forensic analysts processing archived traffic. The README describes the tool as extracting credentials and authentication tokens from PCAP files or live capture, and that is the whole scope. It is not a protocol dissector, not a traffic replay tool, and not a cracking tool. It produces inputs for other tools.
How the parser works and where the output goes
The mechanism is a protocol-aware parser rather than a generic string scraper. PCredz detects the link layer type automatically, choosing between Ethernet (DLT_EN10MB), Linux Cooked Capture (DLT_LINUX_SLL) and Raw IP (DLT_RAW), and caches the resulting offset so the check is not repeated per packet. From there it dispatches packets to per-protocol handlers, each of which knows the shape of its authentication exchange. NTLM hashes are formatted for hashcat: NTLMv1 as -m 5500, NTLMv2 as -m 5600, Kerberos as -m 7500. Output is split by credential type into a logs/ directory, with one file per type (NTLMv1.txt, NTLMv2.txt, MSKerb.txt, HTTP-Basic.txt, HTTP-PasswordFields.txt, FTP-Plaintext.txt, IRC-Plaintext.txt, SMTP-Plaintext.txt, LDAP-Simple.txt, MSSQL-Plaintext.txt, SNMPv1.txt) plus a CredentialDump-Session.log that records the full timeline with timestamps. Deduplication is in-memory: the same credential is written once unless you pass -v. That design choice matters in practice. A long capture of a chatty host produces one line per credential rather than thousands, which keeps the hashcat input clean, but it also means you lose the repetition count unless you opt into verbose mode.
Installing PCredz with Docker or pip
The README recommends Docker. The repository ships a Dockerfile based on python:3.11-slim-bookworm that installs libpcap-dev, gcc, g++, git and pcapy-ng, copies the Pcredz script into /opt/Pcredz, and sets it as the entrypoint with --help as the default command. Build it first:
docker build -t pcredz .Then run it against a capture in the current directory, which is mounted at /data inside the container:
docker run --rm -v $(pwd):/data pcredz -f /data/capture.pcapLive capture inside Docker needs host networking, and the README shows eth0 as the interface:
docker run --rm --net=host -v $(pwd):/data pcredz -i eth0 -vFor a native install on Debian or Ubuntu, the README gives libpcap-dev and pcapy-ng as the dependencies:
sudo apt-get install python3-pip libpcap-dev
pip3 install pcapy-ngFedora and RHEL use python3-pip and libpcap-devel; Arch uses python-pip and libpcap. On a first run against a capture, expect a logs/ directory to appear next to the output path, with one file per credential type found and the session log alongside it. If pcapy-ng fails to install, the troubleshooting section suggests pip3 install --break-system-packages pcapy-ng.
Filtering noise with --disable and --exclude-host
A full capture produces a lot of irrelevant output, and PCredz gives you two levers. The --disable flag takes a protocol name and can be repeated, with NTLM, HTTP, FTP, IRC, LDAP, SMTP, Kerberos, SNMP and MSSQL as the accepted values. To keep only NTLM hashes, the README's example disables everything else:
./Pcredz -f capture.pcap --disable HTTP --disable FTP --disable IRC \
--disable LDAP --disable SMTP --disable Kerberos --disable SNMP --disable MSSQLThe inverse works too. Disabling NTLM and Kerberos leaves only cleartext credentials, which is useful when the goal is passwords rather than crackable hashes. The second lever is --exclude-host, which takes an IP and can also be repeated. During live capture this is how you avoid logging your own authentication traffic. The README's pentesting example derives the local address with hostname -I and pipes it through awk to grab the first field:
sudo ./Pcredz -i eth0 --exclude-host $(hostname -I | awk '{print $1}') -vNeither flag is a capture filter. Both operate on traffic PCredz already sees, so a busy interface still passes every packet through the parser before the exclusion applies. If you need to cut volume at the source, that has to happen in the capture tooling, which the README does not cover.
Encrypted traffic and the limits of the approach
The most important limitation is stated directly in the troubleshooting section: if no credentials are found, check that the traffic is not encrypted, listing HTTPS and SSH as examples. PCredz inspects cleartext exchanges and authentication handshakes. It does not decrypt TLS, and it has no key-log or session-key import path. On a modern network where most authentication rides inside TLS, the tool's yield drops sharply, and that is a property of the traffic, not a bug. The second constraint is the link layer. Only Ethernet, Linux Cooked Capture and Raw IP are supported, so captures taken on other link types will not parse correctly. The third is dependency friction: pcapy-ng is a C extension that needs libpcap headers and a compiler at install time, which is why the Dockerfile installs gcc and g++ explicitly. The fourth is that credit card scanning is on by default. Running PCredz over a capture on a system subject to PCI DSS or similar rules without passing -c means card numbers get written to disk in the output directory. That is a policy problem the tool does not warn you about at runtime. Finally, the performance figures in the README (small files under a second, 1GB files in one to two minutes, live capture at 5,000 to 10,000 packets per second) are the author's stated numbers on modern hardware; they are not reproduced here and will vary with protocol mix and storage speed.
PCredz compared with Credslayer and manual Wireshark work
The obvious alternative is Credslayer, which appears in search traffic around this tool. Both parse PCAP files for credentials, and the difference is in breadth versus depth. PCredz handles a fixed list of protocols with hand-written parsers and formats NTLM and Kerberos output specifically for hashcat modes 5500, 5600 and 7500. Credslayer takes a more extensible parser approach, which matters if your traffic uses a protocol PCredz does not implement, since adding one to PCredz means editing the Python source rather than configuring a module. The other alternative is doing it by hand in Wireshark: apply a display filter for the protocol, follow the TCP stream, and read the credentials out. That works for a single session and gives you full context, but it does not scale to a directory of captures, and it does not deduplicate or produce hashcat-formatted files. PCredz's -d flag walks a directory recursively, which is the workflow difference that matters when you are handed a week of rotated captures rather than one file. If your captures are almost entirely TLS, none of these three approaches returns much, and the honest answer is that the data is not there.
Licence, maintenance and what upgrading costs
PCredz is GPL-3.0. That is a copyleft licence, so if you modify the tool and distribute it, or ship it inside a product, the GPL's source-disclosure terms apply to the derived work. Running it internally as a standalone tool does not trigger distribution obligations, but embedding the parser in a closed-source commercial product would. This is a summary of the licence identifier in the repository, not legal advice; get counsel involved if you plan to redistribute. On maintenance, the last push to the default branch was on 2026-03-02, which is within the last six months, and the repository is not archived. The README shows version 2.1.0 and the repository has no published releases, so versioning appears to be tracked in the README and the script rather than through tagged releases. That shapes upgrade cost: there is no release feed to watch, so you follow the master branch or pin a commit. The dependency surface is small (pcapy-ng plus the standard library), which keeps breakage low, but the Dockerfile pins python:3.11-slim-bookworm, so rebuilding later means either accepting that base image or editing the Dockerfile yourself.
Editorial conclusion
PCredz suits incident responders, red teamers and forensic analysts who already have a capture and need credential material pulled out of it in a form hashcat can consume. It is the wrong tool for anyone hoping to recover credentials from encrypted traffic, and the README states plainly that HTTPS and SSH yield nothing. Before adopting it, confirm the capture's link layer is Ethernet, Linux Cooked Capture or Raw IP, and check whether your engagement permits credit card scanning, since the tool scans for card numbers unless you pass -c.
Frequently asked questions
What can I open a PCAP file with?
PCredz reads PCAP files directly with -f for a single file or -d for a directory it walks recursively, and the README also suggests Wireshark for verifying which protocols a capture contains before parsing. It supports Ethernet, Linux Cooked Capture and Raw IP link layers.
Are PCAP and pcapng the same?
The README and repository files describe PCAP input and supported link layer types (DLT_EN10MB, DLT_LINUX_SLL, DLT_RAW) but do not mention pcapng, so pcapng support cannot be confirmed from the documentation.
What does a PCAP stand for?
The documentation does not expand the acronym; it only describes PCAP as the file format PCredz parses with -f and -d.
What can I do with a PCAP file?
With PCredz you can extract NTLMv1/v2 hashes, Kerberos AS-REQ Pre-Auth hashes, HTTP Basic and form credentials, and cleartext credentials from FTP, IRC, SMTP, IMAP, POP3, LDAP, SNMP and MSSQL, written into per-protocol files under logs/ plus a session log.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/lgandx-pcredz)Star history chart for your README
[](https://hysenlabs.com/projects/lgandx-pcredz)Was this useful?