• Complain

Justin Seitz - Gray Hat Python: Python Programming for Hackers and Reverse Engineers

Here you can read online Justin Seitz - Gray Hat Python: Python Programming for Hackers and Reverse Engineers full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2009, publisher: No Starch Press, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Justin Seitz Gray Hat Python: Python Programming for Hackers and Reverse Engineers
  • Book:
    Gray Hat Python: Python Programming for Hackers and Reverse Engineers
  • Author:
  • Publisher:
    No Starch Press
  • Genre:
  • Year:
    2009
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Gray Hat Python: Python Programming for Hackers and Reverse Engineers: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Gray Hat Python: Python Programming for Hackers and Reverse Engineers" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Python is fast becoming the programming language of choice for hackers, reverse engineers, and software testers because its 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 wont cut it.

Youll 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 worlds best hackers are using Python to do their handiwork. Shouldnt you?

Justin Seitz: author's other books


Who wrote Gray Hat Python: Python Programming for Hackers and Reverse Engineers? Find out the surname, the name of the author of the book and a list of all author's works by series.

Gray Hat Python: Python Programming for Hackers and Reverse Engineers — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Gray Hat Python: Python Programming for Hackers and Reverse Engineers" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Gray Hat Python

Table of Contents

Gray Hat Python
Justin Seitz

Copyright 2009

For information on book distributors or translations, please contact No Starch Press, Inc. directly:

No Starch Press, Inc.

555 De Haro Street, Suite 250, San Francisco, CA 94107

phone: 415.863.9900; fax: 415.863.9950;

Library of Congress Cataloging-in-Publication Data :

Seitz, Justin.
Gray hat Python : Python programming for hackers and reverse engineers / Justin Seitz.
p. cm.
ISBN-13: 978-1-59327-192-3
ISBN-10: 1-59327-192-1
1. Computer security. 2. Python (Computer program language) I. Title.
QA76.9.A25S457 2009
005.8--dc22
2009009107

No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.

The information in this book is distributed on an "As Is" basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.

No Starch Press Dedication Mom If theres one thing I wish for you to - photo 1

No Starch Press

Dedication

Mom,

If there's one thing I wish for you to remember, it's that I love you very much.

Alzheimer Society of Canadawww.alzheimers.ca

FOREWORD

The phrase most often heard at Immunity is probably, "Is it done yet?" Common parlance usually goes something like this: "I'm starting work on the new ELF importer for Immunity Debugger." Slight pause. "Is it done yet?" or "I just found a bug in Internet Explorer!" And then, "Is the exploit done yet?" It's this rapid pace of development, modification, and creation that makes Python the perfect choice for your next security project, be it building a special decompiler or an entire debugger.

I find it dizzying sometimes to walk into Ace Hardware here in South Beach and walk down the hammer aisle. There are around 50 different kinds on display, arranged in neat rows in the tiny store. Each one has some minor but extremely important difference from the next. I'm not enough of a handyman to know what the ideal use for each device is, but the same principle holds when creating security tools. Especially when working on web or custom-built apps, each assessment is going to require some kind of specialized "hammer." Being able to throw together something that hooks the SQL API has saved an Immunity team on more than one occasion. But of course, this doesn't just apply to assessments. Once you can hook the SQL API, you can easily write a tool to do anomaly detection against SQL queries, providing your organization with a quick fix against a persistent attacker.

Everyone knows that it's pretty hard to get your security researchers to work as part of a team. Most security researchers, when faced with any sort of problem, would like to first rebuild the library they are going to use to attack the problem. Let's say it's a vulnerability in an SSL daemon of some kind. It's very likely that your researcher is going to want to start by building an SSL client, from scratch, because "the SSL library I found was ugly ."

You need to avoid this at all costs. The reality is that the SSL library is not uglyit just wasn't written in that particular researcher's particular style. Being able to dive into a big block of code, find a problem, and fix it is the key to having a working SSL library in time for you to write an exploit while it still has some meaning. And being able to have your security researchers work as a team is the key to making the kinds of progress you require. One Python-enabled security researcher is a powerful thing, much as one Ruby-enabled one is. The difference is the ability of the Pythonistas to work together, use old source code without rewriting it, and otherwise operate as a functioning superorganism. That ant colony in your kitchen has about the same mass as an octopus, but it's much more annoying to try to kill!

And here, of course, is where this book helps you. You probably already have tools to do some of what you want to do. You say, "I've got Visual Studio. It has a debugger. I don't need to write my own specialized debugger." Or, "Doesn't WinDbg have a plug-in interface?" And the answer is yes, of course WinDbg has a plug-in interface, and you can use that API to slowly put together something useful. But then one day you'll say, "Heck, this would be a lot better if I could connect it to 5,000 other people using WinDbg and we could correlate our results." And if you're using Python, it takes about 100 lines of code for both an XML-RPC client and a server, and now everyone is synchronized and working off the same page.

Because hacking is not reverse engineeringyour goal is not to come up with the original source code for the application. Your goal is to have a greater understanding of the program or system than the people who built it. Once you have that understanding, no matter what the form, you will be able to penetrate the program and get to the juicy exploits inside. This means that you're going to become an expert at visualization, remote synchronization, graph theory, linear equation solving, statistical analysis techniques, and a whole host of other things. Immunity's decision regarding this has been to standardize entirely on Python, so every time we write a graph algorithm, it can be used across all of our tools.

In ). On the other hand, this is precisely the sort of thing you can whip up in 15 minutes to demonstrate to developers exactly which of the assumptions they are making about their software are clearly untrue. Software companies invest a lot in protecting their internal memory for what they claim are security reasons but are really copy protection and digital rights management (DRM) related.

So here's what you get with this book: the ability to rapidly create software tools that manipulate other applications. And you get to do this in a way that allows you to build on your success either by yourself or with a team. This is the future of security tools: quickly implemented, quickly modified, quickly connected. I guess the only question left is, "Is it done yet?"

Dave Aitel

Miami Beach, Florida

February 2009

ACKNOWLEDGMENTS

I would like to thank my family for tolerating me throughout the whole process of writing this book. My four beautiful children, Emily, Carter, Cohen, and Brady, you helped give Dad a reason to keep writing this book, and I love you very much for being the great kids you are. My brothers and sister, thanks for encouraging me through the process. You guys have written some tomes yourselves, and it was always helpful to have someone who understands the rigor needed to put out any kind of technical workI love you guys. To my Dad, your sense of humor helped me through a lot of the days when I didn't feel like writingI love ya Harold; don't stop making everyone around you laugh.

For all those who helped this fledgling security researcher along the wayJared DeMott, Pedram Amini, Cody Pierce, Thomas Heller (the uber Python man), Charlie MillerI owe all you guys a big thanks. Team Immunity, without question you've been incredibly supportive of me writing this book, and you have helped me tremendously in growing not only as a Python dude but as a developer and researcher as well. A big thanks to Nico and Dami for the extra time you spent helping me out. Dave Aitel, my technical editor, helped drive this thing to completion and made sure that it makes sense and is readable; a huge thanks to Dave. To another Dave, Dave Falloon, thanks so much for reviewing the book, making me laugh at my own mistakes, saving my laptop at CanSecWest, and just being the oracle of network knowledge that you are.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Gray Hat Python: Python Programming for Hackers and Reverse Engineers»

Look at similar books to Gray Hat Python: Python Programming for Hackers and Reverse Engineers. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Gray Hat Python: Python Programming for Hackers and Reverse Engineers»

Discussion, reviews of the book Gray Hat Python: Python Programming for Hackers and Reverse Engineers and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.