Python Programming for Hackers and Pentesters
Justin Seitz, Tim Arnold

#Python
#Black_Hat
#Hack
#Hackers
#Pentesters
#Cybersecurity
🧠 این نسخه کاملاً بهروز شده برای Python 3، دومین ویرایش از یک کتاب پرفروش جهانیه (بیش از ۱۰۰٬۰۰۰ نسخه فروش) و روی جنبههای پیشرفتهتر و stealth در برنامهنویسی تمرکز میکنه؛ جایی که Python تبدیل میشه به ابزار اصلی ساخت ابزارهای امنیت تهاجمی.
⚙️ وقتی بحث ساخت ابزارهای قدرتمند در حوزه امنیت پیش میاد، Python یکی از انتخابهای اصلی تحلیلگرهای امنیتیه. در این کتاب وارد بخشهای تاریکتر و عملیتر قابلیتهای Python میشی؛ از ساخت network sniffer گرفته تا سرقت credentialهای ایمیل، brute force کردن دایرکتوریها، ساخت fuzzingهای جهشیافته (mutation fuzzers)، تحلیل ماشینهای مجازی و حتی طراحی trojanهای stealth.
🔧 تمام کدها در این نسخه به Python 3.x منتقل شدن. علاوه بر اون، محتوای جدیدی هم اضافه شده مثل bit shifting، اصول code hygiene، و تحلیلهای offensive forensics با استفاده از Volatility Framework. همچنین توضیحات عمیقتری درباره کتابخانههای ctypes، struct، lxml و BeautifulSoup ارائه شده، همراه با تکنیکهایی مثل تقسیم بایتها، استفاده از کتابخانههای بینایی ماشین و scraping پیشرفته وب.
📚 فهرست مطالب
1. راهاندازی محیط Python
2. ابزارهای پایه شبکه
3. ساخت Sniffer
4. کنترل شبکه با Scapy
5. هک وب
6. گسترش Burp Proxy
7. GitHub Command and Control
8. وظایف Trojan در ویندوز
9. تکنیکهای Exfiltration
10. افزایش سطح دسترسی در ویندوز
11. تحلیل تهاجمی Forensics
📝 نقد و بررسی
💬 «Black Hat Python یک کتاب سرگرمکننده است که توسط متخصصانی با سالها تجربه نوشته شده و بخشی از رازهای واقعی امنیت را به اشتراک میگذارد.»
— Charlie Miller
💬 «این کتاب نشان میدهد چطور با Python ابزارهایی مثل keylogger یا network sniffer ساخته میشود و حتی به privilege escalation در ویندوز هم میپردازد.»
— Davin Jackson
💬 «یک منبع ضروری برای هر کسی که در امنیت تهاجمی کار میکند یا میخواهد مهارت Python خودش را تقویت کند.»
— InfoSecNoobs
💬 «یک کتاب با ماندگاری بالا در حوزه امنیت و Python که حتی با تغییرات جزئی هم همچنان کاربردی باقی میماند.»
— Stephen Northcutt
💬 «یک منبع عالی برای استفاده از Python در امنیت تهاجمی.»
— Andrew Case
👨💻 درباره نویسنده
👨💻 جاستین سایتز رئیس و همبنیانگذار Dark River Systems است. او روی توسعه ابزار Hunchly کار میکند و در حوزه OSINT و مشاوره برای صندوقهای سرمایهگذاری فعالیت دارد. همچنین نویسنده کتاب Gray Hat Python است.
👨💻 تیم آرنولد بیش از ۲۰ سال بهعنوان توسعهدهنده حرفهای Python در SAS Institute کار کرده و در پروژههای متنباز مشارکت دارد. او همچنین بهعنوان مربی هک در جامعه محلی خودش فعالیت میکند.
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.
Table of Contents
“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 Journey
"An essential resource for anyone involved in offensive security or looking to improve their Python programming skills. Its comprehensive coverage, practical examples, and step-by-step instructions make it an invaluable tool for anyone looking to become a skilled hacker or penetration tester."
—InfoSecNoobs.com
Praise 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
About the Author
Justin Seitz is the president and co-founder of Dark River Systems Inc., where he spends his time shipping Hunchly (https://www.hunch.ly), consulting for hedge funds and doing OSINT research. He is the author of Gray Hat Python (No Starch Press), the first book to cover Python for security analysis.
Tim Arnold has worked as a professional Python software developer at the SAS Institute for more than 20 years. He contributes to several open source software projects and volunteers as a hacking trainer in his local community.









