A Word for OllyDbg
September 11th, 2005

OllyDbg is a very nice tool for debugging other people’s code. While I definitely still prefer WinDbg in most situations, OllyDbg is great for stepping through assembly.

OllyDbg

I had a good reason to use it last week. I have an old VB6 application that needs to interop with new .NET applications. The VB6 code is using an ancient COM library for encryption; this library is fairly opaque in regards to what it is actually doing.

Without giving away too many details, there’s no way I can move the old code to over to anything else. I wish the original author had just imported the advapi32 Crypt* functions, but it’s too late for that now.

So, needing to decrypt data coming from the VB6 side, I was left with a few choices. I could just use COM Interop and reference the old library in my new code. But I wasn’t really happy with that, mostly because of the complexity that it adds to deployment.

I was familiar enough with the Crypto API to know that the COM library couldn’t be doing anything too complicated. This is where OllyDbg comes in.

I stepped through the library call in assembly, stopping when it made Crypt* calls. I got the parameters from the stack, and wrote them all down.

From there, I wrote a quick C++ console app to test out recreating the calls and decrypting some sample data. As it turned out, the specific algorithms that the COM library was using weren’t exposed in System.Security.Cryptography, so the C# version I ended up with had to use P/Invoke with advapi32.

But anyway, I got rid of an annoying dependency. A very satisfying hack. You can read about an even better one here—Lee Holmes uses OllyDbg to crack a program to run as a non-admin.


Jealous Much?
September 6th, 2005

Here are some pictures from the office we just moved into last week.

View from the 49th floor of 55 Water St.

Above is the view from my desk, looking west into the financial district.

View from the 49th floor of 55 Water St.

This one is from the north side, looking towards midtown.

View from the 49th floor of 55 Water St.

Looking northeast over the South Street Seaport, the Brooklyn Bridge, and the Manhattan Bridge.

View from the 49th floor of 55 Water St.

Looking south at the Statue of Liberty.


Don Quixote vs. The Bookstore
September 4th, 2005

There’s nothing like eight hours in various airports to make you want to try to change the world. Here’s an email I just sent to Gary McBrayer of the Hudson Group. I will post any replies I receive.

To: Gary McBrayer

From: Dan McKinley


Dear Mr. McBrayer:

I was dismayed to see Kevin Trudeau’s “book” entitled “Natural Cures ‘They’ Don’t Want You to Know About” available at your Hudson News bookstore in the Pittsburgh International Airport. Even worse, it was shelved in the “Hudson Recommends” section.

Mr. Trudeau is not only a charlatan, but a convicted felon. His book is a dangerous fraud and its advice, if followed, could easily be deadly.

I invite you to follow these links for more information about Mr. Trudeau and his book. I am confident that you, properly informed, will remove this book from your shelves.

http://skepdic.com/trudeau.html - Skeptic’s Dictionary entry on Kevin Trudeau.

http://www.randi.org/jr/081905time.html#18 — Mr. Trudeau’s book is removed from Walgreen’s Pharmacies for its irresponsible content.

http://en.wikipedia.org/wiki/Kevin_Trudeau - Wikipedia entry on Kevin Trudeau.

Sincerely, D. Oscar McKinley