Gray Hat Python and over 2 million other books are available for Amazon Kindle . Learn more

Sign in to turn on 1-Click ordering.
Trade in Yours
For a £2.16 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Sorry, this item is not available in
Image not available for
Image not available

Start reading Gray Hat Python on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Gray Hat Python: Python Programming for Hackers and Reverse Engineers [Paperback]

Justin Seitz
3.6 out of 5 stars  See all reviews (5 customer reviews)
Price: £25.99 & FREE Delivery in the UK. Details
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Only 9 left in stock (more on the way).
Dispatched from and sold by Amazon. Gift-wrap available.
Want it tomorrow, 27 July? Choose Express delivery at checkout. Details


Amazon Price New from Used from
Kindle Edition £11.60  
Paperback £25.99  
Trade In this Item for up to £2.16
Trade in Gray Hat Python: Python Programming for Hackers and Reverse Engineers for an Amazon Gift Card of up to £2.16, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Learn more

Book Description

3 May 2009 1593271921 978-1593271923 1

Python is fast becoming the programming language of choice for hackers, reverse engineers, and software testers because it's easy to write quickly, and it has the low-level support and libraries that make hackers happy. But until now, there has been no real manual on how to use Python for a variety of hacking tasks. You had to dig through forum posts and man pages, endlessly tweaking your own code to get everything working. Not anymore.

Gray Hat Python explains the concepts behind hacking tools and techniques like debuggers, trojans, fuzzers, and emulators. But author Justin Seitz goes beyond theory, showing you how to harness existing Python-based security tools - and how to build your own when the pre-built ones won't cut it.

You'll learn how to:

  • Automate tedious reversing and security tasks
  • Design and program your own debugger
  • Learn how to fuzz Windows drivers and create powerful fuzzers from scratch
  • Have fun with code and library injection, soft and hard hooking techniques, and other software trickery
  • Sniff secure traffic out of an encrypted web browser session
  • Use PyDBG, Immunity Debugger, Sulley, IDAPython, PyEMU, and more

The world's best hackers are using Python to do their handiwork. Shouldn't you?

Frequently Bought Together

Gray Hat Python: Python Programming for Hackers and Reverse Engineers + Violent Python
Price For Both: £47.06

Buy the selected items together
  • Violent Python £21.07

Product details

  • Paperback: 232 pages
  • Publisher: No Starch Press; 1 edition (3 May 2009)
  • Language: English
  • ISBN-10: 1593271921
  • ISBN-13: 978-1593271923
  • Product Dimensions: 23.6 x 18 x 2.3 cm
  • Average Customer Review: 3.6 out of 5 stars  See all reviews (5 customer reviews)
  • Amazon Bestsellers Rank: 183,917 in Books (See Top 100 in Books)
  • See Complete Table of Contents

More About the Author

Discover books, learn about writers, and more.

Product Description

About the Author

Justin Seitz is a Senior Security Researcher for Immunity, Inc., where he spends his time bug hunting, reverse engineering, writing exploits, and coding Python.

Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

Customer Reviews

3.6 out of 5 stars
3.6 out of 5 stars
Most Helpful Customer Reviews
7 of 7 people found the following review helpful
5.0 out of 5 stars The book for Windows bug hunters 23 Nov 2009
This book was a joy to read, but take notice of the reverse engineer part in the title.

The content of this book is a presentation of tools that use Python as part of their automation. The tools selected range from debuggers, fuzzers and onto emulators which can be driven using python. The book is laid out in 12 chapters which progress from setting up the environment to more advanced exercises.

The selection of tools is very good and the content fits together with lots of cross references.

Target audience
Focus for this book is running debugging tools automatically using python to do work for you. These features will allow you the reader the opportunity to go hunting for bugs more efficiently and with less manual work. With this in mind the target audience is not python beginners, though the programs shown are not very hard to follow. The real target audience are bug hunters and the ones that understand the issues, but are spending to much of their own time doing it.

If you are an absolute beginner in debugging I would recommend that you buy this book as a bundle with The Art of Hacking by Jon Erickson or perhaps The Shellcoders Handbook. If you have not experienced assembler ever you would probably also need an introduction to assembly programming.

Practical book
The structure of this book is very workbook-like and encourages you to run the many examples and experiment while doing them. Each one of the labs can also be performed in a short while allowing you to make use of short breaks from other stuff and do these.

The books does not have a lot of pages, but a lot of insight and the author clearly has great knowledge and experience in the reverse engineering arena.
Read more ›
Comment | 
Was this review helpful to you?
1 of 1 people found the following review helpful
Format:Kindle Edition
the author attempts to cover some linux debugging in the first chapter along with one code example, however that soons ends! with the exception of the first chapter the rest of the content is specifically for windows and the win api, which is not translatable. make no mistake this is only worth buying if you want to debug/analyse windows apps in a windows environment!
Comment | 
Was this review helpful to you?
17 of 22 people found the following review helpful
1.0 out of 5 stars Very disappointed 18 May 2009
First of all, it's not 232 pages, but 180 real pages. So be aware that the real content isn't that much.

The book presents some very easy examples, and totally lacks of explanations for the really interesting stuff. Many dumb examples are explained, but the hard tricks you download from the book's website you have to read them and try to understand them on your own.

12 pages dedicated to hooking, which is the reason I bought the book for but 16 pages dedicated to immunity debugger which you can download along with its manual. What's the point? I would have preferred 30 pages dedicated on hooking and a link to the debugger man which already explains how to work with it.

The code you download is buggy. After you correct the errors it works as expected, but it would have been nice to get a working code, since the book is based on that.

To sum up, I wouldn't recommend this book. Too much space wasted talking about easy things and only some pointers to the real interesting stuff. It's not worth it.

I'm very disappointed
Comment | 
Was this review helpful to you?
3 of 4 people found the following review helpful
5.0 out of 5 stars Excellent book 13 July 2009
By Nobody.
This is the best book I have bought so far this year.

You need to have a fairly good understanding of Python to be able to follow it - a sprinkling of knowledge about ctypes will help too - but once you finsih it you wil be using Python in ways you didnt think possible.

The book covers all sorts of advanced 'windows hacking' (for want of a better phrase) and general exploit development methods - DLL injection, code injection, debugging, fuzzing etc are all covered in a fairly decent amount of detail.

If you are looking to get familiar with ctyes and a few of the useful Windows API functions then via practical examples, this book servers as a great reference. I learnt more about ctypes with this book than I did reading the official tutorial.

Although the author works for immunity and mentiones immunity's debugger a lot, it does not come across as plugging the product (which is free anyway) and really helps the reader to use the debugger in a very effective way - the same for PyDBG too.

I'm very very pleased with the book - my only gripe is that it is quite a small book (180 pages) and it could explain some of the topics in slightly more detail - but this is only a very small gripe.

I would recommend this to anyone who has a decent knowledge of Python, Windows functions, buffer overflows etc and the general process of exploit development. If you are beginner in this area you will probably struggle to understand all the content.

I hope the author decides to write a similar book with a slightly broarder scope and more detail.
Comment | 
Was this review helpful to you?
5.0 out of 5 stars For the serious White Hat out there... 13 Sep 2011
As a white hat ethical hacker, this is a MUST read.
Take this book cover to cover and read it over and over again.
Absorb it all, it helps with the next stage of becoming an Ethical Hacker.
Turn your skills into a profession. The legal way and learn the arts of the dark side, so that you know how to protect networks, systems, devices etc.
This book will also teach you the beginnings of programming for security and enjoy the read.
I did and I've been in the Security field of IT for 10 years and in IT for 23 years.
An incredible book!
Comment | 
Was this review helpful to you?
Would you like to see more reviews about this item?
Were these reviews helpful?   Let us know
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
First post:
Prompts for sign-in

Search Customer Discussions
Search all Amazon discussions

Look for similar items by category