Sunday, July 20. 2008Book Review - Dreaming in Code
Saturday, July 12. 2008Some Win32 API usage statisticsYesterday I saw a talk given by Frank Boldewin where he mentioned the FreeIconList trick to fool code emulators. At this point I started to wonder what other Win32 API functions are basically unused. Using Ero Carrera's Python library pefile to parse PE files I wrote a small Python script that tries to find out what Win32 API are basically unused. The modus operandi was simple. I read the exported functions of all DLL files in WindowsDir and WindowsDir/system32 and compared them to the functions imported by all EXE/DLL files in WindowsDir, WindowsDir/system32 and my entire Program Files directory. The first result is that most exported functions are apparently basically never used. My script managed to find 127569 exported functions in 1225 DLL files. 104608 of those are never used by the 6615 EXE/DLL files which import functions ("used" is liberally defined as "imported through the import directory" here, of course). That leaves 22961 functions which are actually used. Here are some output files which show the exported DLL functions sorted by their usage. The numeric column contains the number of PE files which import the function statically. That means that 3475 of the 6615 files I tested import GetLastError for example.
Random notes
Click here to download the Python script. Thursday, July 10. 2008Hotch 1.0.0Hotch 1.0.0 - named after everyone's favourite TV profiler - is an IDA plugin that can be used to profile binary files. It sets breakpoints on all basic blocks of a program, records breakpoints hits and tries to figure out statistics from these hits. Click here to seen an example of a simple profiling session (starting Notepad and exiting Notepad again). Click here to see a huge 6.5 MB results file that shows a larger profiling session (loading a file in Notepad and playing around in it). Random Notes:
Click here to download Hotch 1.0.0 (full source included, of course). Tuesday, July 1. 2008Hexer 1.4.0Here's version 1.4.0 of my hex editor Hexer. I fixed all reported bugs and added most of the feature requests I've received so far. The following stuff changed: New features
Bugfixes
Changes to the Plugin API
The coolest new feature is probably the option to reload all loaded plugins. This is very useful when developing scripts or plugins. Just hit ALT-SHIFT-R and all plugins in the plugins and scripts directories are reloaded. That means you do not have to restart Hexer anymore while testing new plugins. The option to move the tabs in hex windows (like structure viewer, bookmarks, file stats, ...) to the right side of the hex window turned out pretty cool too. Saves lots of space on the screen. Anyway, you can download Hexer 1.4.0 here. I'm happy to hear of any bug reports or feature suggestions. Friday, June 27. 2008Extending the Hexer Structure Viewer using a plugin written in JRubyIn Hexer the Structure Viewer is the part of the hex windows where data from loaded files is read into pre-defined structures and displayed in trees that represent the structure. This is pretty useful because you can use it to quickly navigate through complexely structured binary data. Like basically all parts of Hexer you can extend the Structure Viewer tree with plugins that can be implemented in Java, Groovy, ECMAScript, Python, and Ruby. I have prepared an example plugin (download here) which demonstrates how to extend the Structure Viewer tree using a plugin written in Ruby. This plugin adds support for Windows Bitmap file (BMP) headers. The result can be seen in the screenshot below. Note that this plugin only works if you have Ruby scripting support installed in Hexer.
Sunday, June 22. 2008Hexer 1.3.0Here's my hex editor Hexer 1.3.0 which brings the following new features:
The new console mode for scripting is actually pretty cool. It is very helpful when you're developing scripts or just toying around with the scripting API for a while (enter as many lines in the console as you want and then hit CTRL-ENTER to execute them). Thanks to a recently fixed bug in the JRuby scripting engine Hexer can now finally support Ruby scripting too for those who prefer Ruby over Python. Some bugs were fixed too:
I've also made some changes to the Plugin API
You can download Hexer 1.3.0 here. Any kind of feedback is appreciated. Thank you. Tuesday, June 10. 2008RECON 2008Unless something goes spectacularly wrong I'll be in Montreal from next Thursday to Sunday to attend RECON 2008. If you wanna do one or more of the following things, make sure to meet me at some point:
I'll be the guy with the yellow Sabre Security bag. Alternatively you can shoot me an email or ask around. Monday, May 12. 2008
Book Review - Advanced Windows Debugging Posted by sp
in Book reviews at
17:21
Comments (0) Trackbacks (0) Book Review - Advanced Windows Debugging After my last two book reviews were rather negative, I'm happy to say that this review is going to be positive again. Mario Herwardt's and Daniel Pravat's book Advanced Windows Debugging (Official Website / Amazon) keeps what the title promises. It's a book for people that need to find bugs in Windows programs that are for whatever reason (too) difficult to find with the "normal" developer tools like the integrated Visual C++ debugger. That's not what the authors say in the introduction of course. They say it's a book for everyone that does Windows development. And that's probably true because the book is a real eye-opener for what's possible with the debugging tools provided by Microsoft. Nevertheless I guess that most developers will probably rarely if ever leave the cushy environment of their IDE's debugger. But just in case you do, this book prepares you well.
Continue reading "Book Review - Advanced Windows Debugging"Sunday, May 4. 2008Release of Hexer 1.2.0The 1.2.0 release of Hexer improves the usability of Hexer. On Windows, Hexer can now be integrated into the context menu that appears when you right-click on files in the Windows Explorer (and elsewhere). Furthermore the main window of Hexer is now scrollable. This gives the users extra space and allows him to open more windows. Another nifty thing is that the scripting dialog now supports syntax highlighting and other small features that make it easier to write scripts. You can download Hexer 1.2.0 here. Complete list of changes: New Features
Bugfixes
Changes to the Plugin API
Screenshots of the new scripting window and a new screenshot of the main window: Tuesday, April 22. 2008
Book Review - Reverse Engineering ... Posted by sp
in Book reviews at
21:05
Comments (6) Trackbacks (0) Book Review - Reverse Engineering Code with IDA ProThis week I managed to read Reverse Engineering Code with IDA Pro. I was pretty curious about the book because it's the first book specifically about everyone's favourite disassembler IDA Pro and it turned out to be very different from what I expected. Co-authored by Dan Kaminsky (editor), Justin Ferguson, Jason Larsen, Luis Miras, and Walter Pearce, Reverse Engineering Code with IDA Pro sets out to give an introduction to IDA Pro and how to use it to reverse engineer software. The book is approximately 310 pages long and divided into nine chapters ("Introduction", "Assembly and Reverse Engineering Basics", "Portable Executable and Executable and Linking Formats", "Walkthroughs One and Two", "Debugging", "Anti-Reversing", "Walkthrough Four", "Advanced Walkthrough", "IDA Scripting and Plug-Ins"). Continue reading "Book Review - Reverse Engineering Code with IDA Pro"Sunday, April 13. 2008Hexer 1.1.0Hexer 1.1.0 (click here to download) is primarily a bugfixing release. The following things changed since Hexer 1.0.0: New Features
Bugfixes
Changes to the Plugin API
I hope Hexer works on Linux now. At least it does work on my Ubuntu.
Please report bugs and request features by replying to this blog entry or by sending me an email (see the Contact information in the docs directory of the RAR file). Thursday, April 10. 2008Sample Hexer Plugin: Calculating the entropy of a fileI finally got around to write an example plugin for my hex editor Hexer to show how simple it is to extend Hexer according to your own needs. The Java plugin I am going to present calculates the entropy of files according to the method presented on Ero Carrera's blog. The plugin adds a new tab containing a line chart and a button to the File Statistics dialog. When the user clicks the button, the entropy of the active file (that is the file in the last active hex window) is calculated and shown in the line chart. The screenshot below shows the entropy distribution of Notepad.exe.
You can download the source file of the plugin here. The archive contains the source file EntropyCalculator.java as well as two class files which were created by compiling the source file using Java 1.6. To install the plugin, simply copy the two class files to the plugins directory of your Hexer installation. Since the plugin uses the JFreeChart library to display the graph it is also necessary to get the files jcommon-1.0.12.jar and jfreechart-1.0.9.jar from the JFreeChart package. Copy those files into the jars directory of your Hexer installation. Continue reading "Sample Hexer Plugin: Calculating the entropy of a file"Friday, April 4. 2008
Book Review - The New School of ... Posted by sp
in Book reviews at
21:28
Comments (0) Trackbacks (0) Book Review - The New School of Information SecurityHi everyone and welcome to another post in my favourite blog entry category: Book Reviews. I'm happy to announce that for the first time ever I have actually managed to read a book and write a review of it before its official release (unlike my other reviews where I often review three year old books). I'm talking about Adam Shostack's and Andrew Stewart's new book The New School of Information Security here which will be released tomorrow. The New School of Information Security is a weird book. From the title of the book you'd think that this is a book about information security for people who have at least some kind of clue about information security. I mean why would people that do not have a clue about information security read a book about reforming and improving the field of information security? Unfortunately this assumption is wrong. Continue reading "Book Review - The New School of Information Security"Wednesday, April 2. 2008Release of Hexer 1.0.0Just a few days later than originally announced, I managed to finish the first release of my hexeditor Hexer. It's available for download here. Please report any problems or suggestions by replying to this blog entry. The coolest feature of Hexer is the scripting and plugin support. Note that Hexer only supports ECMAScript out of the box. If you want Python or Groovy scripting support, you need to install and download the necessary Jython/Groovy packages. Please read the manual in the docs folder to find out exactly what to download. There are sections in the manual that describe how to write plugins and scripts. Example scripts are included in the RAR file. There are no example plugins yet but I'll write something about them on my website before next weekend. Update: Known issues:
Saturday, March 22. 2008Hexer 1.0.0
Remember Hexer? It's back. In Java form. For those who don't remember, back in 2005 I posted the alpha version of Hexer, a hex editor written in C#. Like most of my projects, Hexer was abandoned for lack of time. However, the basic idea of an easily extensible hex editor still appeals to me and so I decided to bring it back.
The new version of Hexer is not written in C# anymore. I ditched C# for Java for practical reasons. The primary reason is that I'm using Java at work which means I'm doing nearly all of my development these days in Java. The second reason is that we've had lots of code that's necessary for Hexer in our company's internal Java library already and I only had to combine our Java library with some new code. That way I managed to implement the first Java version of Hexer in a very short amount of time. Alright, if everything works out smoothly the first version of Hexer 1.0.0 will be released next week (depending on how fast I can write the remaining unit tests, the documentation, and how quickly I can get someone to update the company website where Hexer will be available as a free download). So let's have a sneak preview of Hexer 1.0.0. Continue reading "Hexer 1.0.0" |
CalendarQuicksearchArchivesLinks
Top Exitswww.the-interweb.com (723)
www.amazon.com (139) en.wikipedia.org (134) www.zynamics.com (129) www.google.com (24) the-interweb.com (23) blog.dkbza.org (21) www.sabre-security.com (21) code.google.com (20) www.dreamingincode.com (19) Syndicate This BlogBlog AdministrationCategories |
