Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Tuesday, June 23, 2009

Review: Gray Hat Python

216 pages, a title of 'Gray Hat Python' and a table of contents with subjects such as 'design and program your own debugger', 'learn how to fuzz windows drivers', 'create powerful fuzzers from scratch', DLL injection, hooking, malware analysis. My first impression was that it must be really niche, hardcore and not for me.

You'd think that the book would appeal to only a subgroup of security professionals or software engineers given the subject matter. The small book also suggests that there would not be much space left to explain the matter to people who are not experts.

First impressions are often wrong.



In my opinion this book is a must for all people who deal with security on a technical level. The book is also interesting for programmers who want to learn more about debuggers and other low level aspects. People who want to learn some new tricks in Python will probably like the book as well. But all these people don't have to be experts to enjoy this book. There are a few ways you can read this book as it was clearly written with a few different levels of perspective in mind.

For example, you can learn about the inner workings of a debugger without actually understanding the Python code. All topics are first clearly explained on a conceptual level. After that Python code is used for implementation. You will get introduced to the Python code gradually, in the beginning each program is short and basic and the most important lines are highlighted and explained. After that more functionality gets added and further explanations follow.

Though the book deals with quite a wide variety of subjects, they all have a low-level debugging aspect. This makes that it is interesting for both security oriented people and developers. It's all about basic, low level techniques. And most of them can be used both for making and breaking stuff.

Given the subject matter and size of the book, clearly some things had to be left out. One of the things this book left out was implementation of the debugger on operating systems other then Windows. I think it was a good choice since Windows is still the platform on which most debugging and reversing takes place. Also, Windows offers a few API functions that make it easier to do debugging. This abstraction was used well to keep things understandable and short while still offering a good picture of what makes a debugger tick. Especially the chapter on debuggers contains loads of references for people who want to explore further. But I missed a few references for debugger implementation on other operating systems.

The only drawback was that there seemed to be some errors in some code listings. Unfortunately, there is no errata section on this book's website yet (24-jun-2009). This can make getting the example code to run a challenge for non Pythonians.

All in all, this is a very cool and unique book for all people who want to take a deeper look.

Friday, May 29, 2009

New gear and new books!

I've bought some running clothes yesterday: a shortsleeve, a longsleeve, a short and a rainjacket with zippable arms as Montechristo advised. All made from reflective dryfit material, nothing too tight. The kind shop lady added a reflective jacket on the house. We had a short chat on my progress and I mentioned the pain and kramps in my shins. She gave me three tips:

1) take it easy, take some extra rest!
2) whilst taking a shower after a run, run some cold water on the legs for some time. After that run some hot water on them. Change again by cold water. Change three times minimum and always end with the cold. This is uncomfortable but one of the best things to do.
3) apply an ice pack.

After I told her I did not know what that was, she got one, gave a demo and putted it in my bag :)


Speaking of new stuff, the inner geek will soon be nurtured with some new books. First, I won 'Ruby in practice' by asking a few questions to Jeremy McAnally and Assaf Arkin, authors of the book. After that I got an e-mail from NoStarch press to do a review on some books, 'Greyhat Python' and 'The Manga Guide to Databases' to be exact. Pretty sweet! I'm quite curious about these books but first need to finish my current book 'learn to program'. I hope I get enough time over the long weekend to finish it. Lucky for me I'll do some more traveling soon and get to eat some books on the way :D

I just came back from a training with two four minute and one five minute and some lesser minute runs. The beginning, as always, was the hardest. As soon as I'm properly warmed up and into my rhythm all is fine, except for the shins offcourse.


I took on the short sleeved Adidas 'adizero' shirt. I found it to be a very nice shirt. At first I was affraid it would be cold but it kept me warm and mostly dry. Though having a soaked shirt from the effort had it's charm, it's just too uncomfortable. The new shirt is definatively better.

Anyway, here are the stats. No significant improvement yet, but apart from the shins, the workout felt a bit too lite allready. I guess that if my legs would have some proper recovery, I would do much better than these stats:



Time to eat and apply my new ice-pack!