// Comparison
Attacking Network Protocols vs Black Hat Python: Which Should You Read?
Two cybersecurity books on Networking, compared honestly: who each is for, what each does best, and which to read first.
A Hacker's Guide to Capture, Analysis, and Exploitation
James Forshaw
James Forshaw, Project Zero veteran, on how to capture, parse, and break protocols from the wire up to the application layer, with a strong focus on building reusable analysis tooling.
Python Programming for Hackers and Pentesters
Justin Seitz, Tim Arnold
Justin Seitz and Tim Arnold's hands-on tour of writing offensive tooling in Python: network sniffers, web scrapers, GitHub-based command-and-control, screen capture, keylogging, and Volatility extensions.
Read this if
Skip this if
Key takeaways
- Capturing, parsing, and replaying traffic is one workflow, not three, and Forshaw's tooling-first framing makes that explicit.
- Custom-protocol auditing (the part security curricula skip) is the part of the book that pays back hardest, especially for embedded, OT, and proprietary stacks.
- The "build your own network analysis tool" chapters teach more about how protocols actually work than any number of Wireshark lessons.
- Most operational tools you use can be replaced by ~50 lines of Python that do exactly what you need; the book is a series of working examples of that thesis.
- The networking, web-scraping and process-injection chapters individually pay back the cost of the book once you've used the patterns three times.
- The 2nd edition (Python 3, modern libraries) is the one to buy; the first edition's Python 2 code is dated.
How they compare
We rate Attacking Network Protocols higher (5/5 against 4/5 for Black Hat Python). For most readers, that means Attacking Network Protocols is the primary pick and Black Hat Python is a useful follow-up.
Attacking Network Protocols is pitched at advanced level. Black Hat Python is pitched at intermediate level. Read the easier one first if you're not yet comfortable with the topic.
Attacking Network Protocols and Black Hat Python both cover Networking, Offensive, so reading them in sequence reinforces the same material from different angles.
Keep reading
Attacking Network Protocols
→ Alternatives to Attacking Network Protocols→ What to read after Attacking Network Protocols