Fully-updated for Python 3, the second edition of this worldwide bestseller (over 100,000 copies sold) explores the stealthier side of programming and brings you all new strategies for your hacking projects.When it comes to creating powerful and effective hacking tools, Python is the language of choice for most security analysts. In this second edition of the bestselling
Black Hat Python, you’ll explore the darker side of Python’s capabilities: everything from writing network sniffers, stealing email credentials, and bruteforcing directories to crafting mutation fuzzers, investigating virtual machines, and creating stealthy trojans.
All of the code in this edition has been updated to
Python 3.x. You’ll also find new coverage of bit shifting, code hygiene, and offensive forensics with the Volatility Framework as well as expanded explanations of the Python libraries ctypes, struct, lxml, and BeautifulSoup, and offensive hacking strategies like splitting bytes, leveraging computer vision libraries, and scraping websites.
You’ll even learn how to:
- Create a trojan command-and-control server using GitHub
- Detect sandboxing and automate common malware tasks like keylogging and screenshotting
- Extend the Burp Suite web-hacking tool
- Escalate Windows privileges with creative process control
- Use offensive memory forensics tricks to retrieve password hashes and find vulnerabilities on a virtual machine
- Abuse Windows COM automation
- Exfiltrate data from a network undetected
When it comes to offensive security, you need to be able to create powerful tools on the fly. Learn how with
Black Hat Python.
Fully-updated, second edition of this worldwide bestseller with over 100,000 copies sold.
When it comes to creating powerful and effective hacking tools, Python is the language of choice for most security analysts. In Black Hat Python, you'll explore the darker side of Python's capabilities--writing network sniffers, manipulating packets, infecting virtual machines, creating stealthy trojans, and more.
The second edition of this bestseller has been updated to cover Python 3, and the authors have added coverage of new modules and techniques that reflect current industry best practices. You will find expanded explanations of strategies, from splitting bytes to leveraging computer-vision libraries, that you can apply to future hacking projects.
You will see how the hacking techniques work and create your own personal arsenal of readable and maintainable code using clean coding techniques as you learn how to:
• Create a trojan command-and-control using GitHub
• Detect sandboxing and automate common malware tasks, like keylogging and screenshotting
• Escalate Windows privileges with creative process control
• Use offensive memory forensics tricks to retrieve password hashes and inject shellcode into a virtual machine
• Extend the popular Burp Suite web-hacking tool
• Abuse Windows COM automation to perform a man-in-the-browser attack
• Exfiltrate data from a network most sneakily
When it comes to offensive security, your ability to create powerful tools on the fly is indispensable. Learn how with Black Hat Python.
New to this edition:
All Python code has been updated to cover Python 3 and includes updated libraries used in current Python applications. Additionally, there are more in-depth explanations of the code and the programming techniques have been updated to current, common tactics. Examples of new material that readers will learn include how to sniff network traffic, evade anti-virus software, brute-force web applications, and set up a command-and-control (C2) system using GitHub.
“Black Hat Python is a fun read written by experts with years of experience who are willing to share the secrets they have learned along the way. While It might not immediately turn you into a super stunt hacker like me, it will certainly get you started down the correct path.” (from the foreword)
—Charlie Miller, Security Researcher"This book breaks down how to create powerful tools using Python like network sniffers or keyloggers. This book even goes over how to escalate privileges in Windows."
—Davin Jackson, Alpha Cyber Security, Books to Start Your Penetration Testing JourneyPraise for the first edition of Black Hat Python
"Another incredible Python book. With a minor tweak or two many of these programs will have at least a ten year shelf life, and that is rare for a security book."
—Stephen Northcutt, founding president of the SANS Technology Institute
"A great book using Python for offensive security purposes."
—Andrew Case, Volatility core developer and coauthor of The Art of Memory Forensics
"If you truly have a hacker’s mindset, a spark is all you need to make it your own and do something even more amazing. Justin Seitz offers plenty of sparks."
—Ethical Hacker "Whether you're interested in becoming a serious hacker/penetration tester or just want to know how they work, this book is one you need to read. Intense, technically sound, and eye-opening."
—Sandra Henry-Stocker, IT World "Definitely a recommended read for the technical security professional with some basic previous exposure to Python."
—Richard Austin, IEEE Cipher
"A well-written book that will put you on track to being able to write powerful and potentially scary tools. It’s up to you to use them for good."
—Steve Mansfield-Devine, editor of Elsevier's Network Security Newsletter
"A well implemented read with lots of good ideas for fun offensive Python projects. So enjoy, and don't forget it's all about the code!"
—Dan Borges, LockBoxx
"A useful eye-opener."
—MagPi Magazine"If you work as a computer security professional and want to code in Python, this is definitely a book that belongs on your bookshelf."
—Craig Mullins, Data and Technology Today