Tuesday, April 1, 2008

Black Hat Europe 2008 wrap up...

So I spent the last week in Amsterdam at Black Hat Amsterdam. I was there for a couple of different reasons.

The first reason involved me taking a class on Reverse Engineering: Application in Malicious Code Analysis. I have been interested in Reverse Engineering over most of my career but never really had any instruction in the art of disassembling something that often doesn't want to be taken apart. Well after this class I am going to be spending some of those late nights in hotels unravelling pieces of malware. Yes, I realize this is an open confession that I am a geek.

The class was taught by Pedram Amini (blog) and Ero Carrera (blog) (twitter).

...Commercial Break...

Quick little story about Ero: Dacort and I have just taken seats in class when Dacort laughs. I look over and ask him what he was laughing at. He pointed to his iPhone and explained that he was tracking #blackhat and #amsterdam. It seems that one of our instructors had just posted to twitter. I laughed now and asked Ero - if he was a Twit. He smiled and said he was. How did you know? We told him about tracking #blackhat and #amsterdam.

Want to know who got him on Twitter - the "Goddess of Security Twit Herding" Mediaphyter. You can find her illustrious list of Security Twits right here.

...Back to the class...

The instructors were great. If you have the opportunity to take the class and are interested in getting a solid basis for Reverse Engineering I highly recommend trying to get into the class at Black Hat: Las Vegas. Ero has already said he his going to try to incorporate some of our thoughts into the next class.

The course outline looks something like this: (note: I am leaving some areas out. This are the areas we concentrated on. The book provided by the class has a lot of great material for later reference.)

Introduction: They queried the class to determine where the general level set was. In our case most everyone was already familiar with IDA Pro but hadn't used OllyDBG as much. I don't believe anyone in the class had ever used IDAPython either.

VM's and Live Analysis: The first day more than half the class was running Windows PCs. The second day more than half the class had broken out there Macbook Pros. Note: The instructors were using Macs as were Dacort and myself. I was using an XP image on Parallels. Turns out that some of the newer malware running around out there has some checks to determine whether it is infecting a VM versus a real live machine.

PE File Format: The Portable Executable (PE) format is a file format for executables, object code, and DLLs, used in 32-bit and 64-bit versions of Windows operating systems. The term "portable" refers to the format's versatility in numerous environments of operating system software architecture. The PE format is basically a data structure that encapsulates the information necessary for the Windows OS loader to manage the wrapped executable code. This includes dynamic library references for linking, API export and import tables, resource management data and thread-local storage (TLS) data. On NT operating systems, the PE format is used for EXE, DLL, OBJ, SYS (device driver), and other file types. The Extensible Firmware Interface specification states that PE is the standard executable format in EFI environments.

PE is a modified version of the Unix COFF file format. PE/COFF is an alternative term in Windows development.

Thanks Wikipedia.

There overview was a really good start to understanding what we were going to be looking at and the bits and pieces that are included in our analysis. There were lots of good graphics to help understand Directories, NT Headers, Section headers, Optional headers, and so on.

Overview of Analysis Tools: This section was where the real fun began. We got to learn about the arsenal of tools to examine malicious malware code. We discussed Debuggers, Disassemblers, Decompilers, and Python.

(Dis)Assembly: The instructors called this a crash course. I thought they did a pretty solid job of getting everyone on the same page about what was going on in the assembler.

IDA Pro: This section alone could be a class. I believe both instructors even mentioned this. They provide a solid overview of what the tool is, and then they took the class through customizing the tool for use. I had never thought about how hard it would be to teach a class that requires that we all use a very complex tool doing complex work and the necessity to have everyone looking at the same screens. Again the instructors were the stars.

note:The included CD for the class is a valuable resource. The instructors have provided code examples, solutions, and software. There are configurations, extra plugins, and so much more.

OllyDBG: the "Cracker Friendly" tool. If you have ever considered RE, read about RE or talked to an RE practitioner - the all recommend this tool. Best part of this tool - Free as in beer. There are countless features, the instructor mentioned that he is still finding new ones and super documentation. I won't talk anymore about this section - the class covers the tool extremely well.

Executable (Un)Packing: I loved this section. During the class you review a piece of malware that utilizes ROT13 to hide some of the nastiness. This section of class discusses how this works, how to pack and unpack your own code, how to use statistics to examine packed code, how to unpack traces. The instructors also provide some statistical analysis of common packers in use and what they are seeing as the future. This was one of my favorite sections of class.

As I mentioned earlier - the class/book/cd has a much more material. There are several more sections we covered, resources we were directed to, and questions answered. Again I highly recommend taking this class if you are interested in Reverse Engineering.

The other reason that I was present for Black Hat Amsterdam was to demonstrate that Director part of my title now. I helped in our booth to answer questions about the services that we offer, and our perspective on security. Ask anyone in the biz today and they have a perspective on security.

Some how along the way I ended up being interviewed for Global Security Mag. It's a french magazine about Security. The interview can be found here. I had a rough translation I had done of the interview but some how I have misplaced it on the HD. One friend's comment on the interview was, "You sound so much smarter in french." Thanks. My father offered to send the article along to my old French professor.

I was also caught on camera in a quick - alright I can ramble on if given the chance - video for Help Net Security on PCI. I am a little scared about this interview. I managed to jot a few notes down before walking in to sit in front of the camera but now in retrospect I might have been garbling all kinds of things together. We will have to wait and see what the final cut looks like. The video guy told me that this was the first time he was actually interested in what was being said about PCI. I will take that compliment and run.

So the show wrapped - managed to visit a party, hit a club, and have some amazing italian food (check out the Carpaccio al parmigiano and the Pasta Parmigiano- it's got whiskey fire, and glorious cheese.)

Sunday, March 23, 2008

All it takes is time...

Here's the situation: Henryk and Karsten are sitting around drinking beer and one turns to the other and says, "hey since we aren't doing anything let's take a powerful microscope and take apart the MiFare RFID chip." (this is complete fiction - well the beer drinking part - I wasn't there they could have been drinking wine for all I know.)

Compterworld has an article discussing the MiFare RFID tag hack. A RFID tag used by "Millions upon millions of MiFare Classic chips are used worldwide in contexts such as payment cards for public transportation networks throughout Asia, Europe and the U.S. and in building-access passes."

Hypothesis: "Hmm wonder how these MiFare RFID things work?"
Process: Take them apart
New Hypothesis: "You think there are any vulnerabilities in this thing?"
Process: Holy crap these things are as secure as my credit card data at the grocery store.

What I really want to point out here is that given time it can be broken. I have heard on multiple times from Vednors, Programmers, Engineers - our "insert name" can't be hacked, broken or abused for nefarious purposes.

Well boys and girls (equal opportunity) you are wrong!

Lesson to take away from this. Don't rest on your laurels (I am in Athens, Greece - seemed like a good phrase). Keep innovating - while today it looks like it can't be broken, tomorrow some kid might try to put it in the microwave.

Introducing: Were I taking this seriously...

So in an effort to separate the wheat from the chaff I decided to spin off my InfoSec thoughts from my wanderings and exploration of the world.

My initial plan for this little corner of writing will be for me to discuss things about Information Security that crop up on a daily basis. Let's say this is going to be about "iron sharpening iron."

I am also planning on using this space to dump bits and pieces of wisdom I might learn along the way to being the best InfoSec manager in the world (this is humor - I am sure I will provide more than enough reasons to flame as this goes along. Please learn to see my sarcasm before we get to far into things.)

I am not a super h@x0r - I have never claimed to be. I am not a Bruce Schiener or a Richard Bejtlich, or even a Dan Kaminsky (although I do work with him).

I am a former network engineer who always had a belief that security should be included in everything you built. I blame this on my own misspent youth. My father watched me blow my eyebrows off more than once doing stupid things. After awhile of doing destructive things that might hurt you, suddenly security (protection of self) became important.

I started college as a Sociology Major (people are interesting) - then changed to Mechanical Engineering (I am going to build robots) - a quick stint in Biology: Marine Biology (I read Lilly - one of his pals was Timothy Leary). I had a car accident and things changed - I ended up in Computer Science and did well. I had a computer from the age of 9 on so it made some sense (thanks to mom and dad on that one).

I enjoyed computers - introduced some neat ideas to the use of computers and biology at my university (if I had known that there would be a field to spring up years later called BioInformatics I might have stayed in that) and then bounced to Colorado to be a ski bum.

My diverse course of study has provided me with different ways of looking at things. Those in the security industry realize that having alternate viewpoints will help you figure out where the next bad thing is coming from.

As a side, there was a post in the last month about the way InfoSec people think. Is it learned or is it innate knowledge? See Bruce's thoughts at link. You can see one rebuttal at link.

Sorry Bruce - I am going to lean towards the learned ability. Proper scientific method at use here:

1) Define the question (how would i break this web application? steal this car? compromise this RFID tag?)
2) Gather information and resources (Google, Secunia, milw0rm, RFID)
3) Form Hypothesis (hmm if I add a ' there will things go awry?)
4) Perform experiment and collect data (well look at that - the database just dumped)
5) Analyze data (oh looks like someone has been keeping credit card data)
6) Interpret data and draw conclusions that serve as starting point for next hypothesis (does everyone using Joomla have Remote File Inclusion Vulnerabilities?)
7) Publish results (Google, Secunia, milw0rm, RFID)
8) Retest (here come the script kiddies)

So while I might agree that InfoSec people are a little different (if you don't agree you have missed oh every Defcon since the dawn of time) - I am not going to agree that they go at things differently than the next guy. InfoSec professionals just come up with better hypothesis to test.

Well that's enough for a solid introduction. I will be adding more as I go along. Here's a brief snippit of where I will be over the next couple of weeks:

"Next I am in Amsterdam all week for Blackhat Europe. The first couple of days I will be in class learning Reverse Engineering: Application in Malicious Code Analysis. I am really looking forward to the class. It should be interesting and allow me to be more successful in my on reverse engineering assignments. I wrap that up and zip back to the States on the 29th.

I will be in Seattle for a week (time to practice being a manager) then I am off to San Francisco for RSA. There I will get to practice my new Director skills as I begin the process of moving IOActive forward in their information security offerings (glamorous words for me being a sales guy for a week). I will also be there as a technical resource to help the real sales people discuss what we can do as a resource for an organization. I am really excited about this. I have begun to make some new contacts and I am really looking forward to increasing the range of discussions and add my own input to the security community.

After that long week I will be back in Seattle reviewing what I learned at RSA and preparing for a trip back to Germany. If you don't follow me on Dopplr let me know and I will add you. My travel schedule is crazy...."

Hope to meet you and see your comments in the future.