In 2011, I (Stephen A. Ridley) don’t plan on attending too many conferences that require far away travel for many reasons. 1) My work isn’t as interesting anymore ;-( and 2) I can’t travel as easily with Sammiches. With Boston being in the northeast (close to us) we decided we’d try SourceBoston out for the first time. We’ve known the conference organizers from past meetings and conferences, but this is the first time we’d ever attended any of the Source conferences.
SourceBoston was held at the (dog friendly 🙂 Boston Seaport Hotel, a surprisingly fancy venue that was on the waterfront and adjacent to The World Trade Center of Boston. Unlike many Infosec conferences we’ve attended, SourceBoston did a good job of intermingling “suits” with “grunts”. In other words, the attendees and speakers hailed from many different levels in their organizations (with a healthy sprinkling of academic types mixed in). There was also quality representation from the different niches in the Information Security community (from “hardware hacking” to “management and policy”). In short, its a cool little conference.
My talk at Source Boston 2011 was entitled “GreyHat Ruby”. The talk was on the many ways that a devout Python coder has come to find Ruby very useful for Information Security work. Here is a bullet list from a section of the presentation entitled “12 Good Reasons for C/C++/Python coders” (see examples/comparisons/screenshots in the slides!):
- Ruby has an equally useful Interactive Interpreter.
- Ruby has “real” case/switch statements
- Ruby has C style ternary statements
- Ruby has “public” and “private” namespaces
- Ruby (like C++ and Java) let’s you define classes in “piecemeal” (split that class def across files!).
- Ruby has a “container” class called “module” that act as namespace “directories” letting you arrange things as you see fit.
- Ruby doesn’t automatically make a namespace entry for an “included” file.
- Ruby has better “sprintf” functionality.
- Ruby has strong OOP paradigm and convenient “getter/setter” syntax.
- You can modify Ruby Class definitions “on the fly” without cumbersome “get_attr”/”set_attr”.
- Ruby is a “functional” programming language. It has “blocks” and “anonymous functions” (not kludgy lambdas).
- Lots of other neat things like send() and __END__.
After that list, I dive into some of the specific things useful for Information Security professionals:
- Accessing “foreign” functions: getting your Ruby code to call into DLLs and shared objects.
- Existing pure ruby process debuggers and hit-tracers
- Using JRuby to talk to Java RMI services
- Ruby and IDA
- Build quick user-friendly CLIs (like Python’s Cmd module).
- Plugging Ruby into Burp
- Using Ruby’s Win32OLE/Win32API/RubyDL to “script” mouse clicks and keyboard actions on Windows via User32. (demo video here)
- Complete browser automation (Firefox, IE, Safari) allowing you to “script” user interaction with the browser. (Web pen-testing, QA, or fuzzing!)
- Writing distributed code with Drb and Rinda. (Don’t bother with socket code. Or, build a distributed fuzz farm!)
- Using Ruby to create “Domain Specific Languages” for your tasks (like fuzzing ;-).