IntermediateOffensiveToolingNetworking

Black Hat Python

Python Programming for Hackers and Pentesters

4 / 5

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.

Buy on Amazon

As an Amazon Associate we earn from qualifying purchases. The link above is sponsored.

Published
2021
Publisher
No Starch Press
Pages
216
Language
English

Read this if

Working pentesters and red teamers who want to stop fighting other people's tools and start writing their own. The book that turns Python from a scripting language into an offensive multitool.

Skip this if

Beginners with no Python experience, or readers wanting a structured CS curriculum. Seitz and Arnold assume you can already program; the value is in offensive idioms, not language fundamentals.

Key takeaways

  • 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.

Notes

Pair with Black Hat Go (Steele/Patten/Kottmann) for the cross-compilation use cases Python doesn't cover well, and with Practical Binary Analysis (Andriesse) for the dynamic-analysis side. Seitz's earlier Gray Hat Python is a useful supplement on the debugger and reversing chapters. Read it cover to cover once, then keep it on the shelf for chapter three's networking patterns.