Archive

Archive for May, 2009

Physical security

May 29th, 2009 3 comments

Tonight someone tried to snatch my sister’s purse as she walked to the door of my apartment.

They failed, and I smashed the driver’s window out of the getaway car with my softball bat.

Moral of the story: have at least a softball bat ready at all times.

Categories: Misc

Gray Hat Python by Justin Seitz

May 17th, 2009 10 comments

Update: for a little actual discussion of things in the book, I have a post on errata in the code listings here.

Recently, I got the book Gray Hat Python: Python Programming for Hackers and Reverse Engineers by Justin Seitz.  I like books published by No Starch Press, I like Python, and I like “hacker and reverse engineer” stuff.  So now that I finally got all done with college and graduation (the reason for the gap in posting here), I decided to start reading the book.

After a bit of introduction, the very first thing Seitz shows you how to do is build a debugger, using Python and the ctypes library to call into Windows kernel APIs.  That’s pretty cool, but I ran into a problem when it came to attaching to existing processes – no matter what, Kernel32.DebugActiveProcess returns 0 (fail) with error code 50 (NOT_SUPPORTED).  I can’t find anything directly related to this problem.  However, at the beginning of the text, Seitz says he assumes a 32-bit Windows platform.  I’m on 64-bit Vista.  I had hoped to get away with using the 32-bit version of Python et al., but it doesn’t look like it’ll work.

So I wanted to drop Seitz an email to ask him about it, maybe see if he could put something on the book’s web page saying “Hey, this won’t work at all under 64-bit or Vista or whatever.”  Problem is, I don’t see an email address for him in the book, nor on the book’s page, nor at his employer Immunity’s site.  I thought maybe he has a blog, so I’ll Google his name and see what I can find.

Read more…

Categories: Books