Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

November 2006
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30
Oct  Dec

Black Hat and White Hat Hacking with Lisp

Sunday, November 19, 2006

Years ago, I used to have a really strong interest in issues related to secure computing and "cracking". In fact, in 1995, I wrote an article for NEWS/400 Magazine titled "Hackers, Viruses, and Your AS/400" (still available online in the SystemiNetwork archives, although you have to pay for it) which exposed a number of security gaps in the IBM AS/400, a computer that was being advertised as being fairly secure from crackers. At the time, the article was one of the most controversial articles that the magazine had ever published. In addition, I was once contracted to set up a security system and security standards for several banks and financial organizations and, in the process, was involved in detecting/catching a number of "unauthorized" intrusions and transactions. However, I've also been very interested in the technical challenges of both setting up secure systems and compromising secure systems. So, in the past, I had spent a fair bit of time looking at security from a number of different angles and I still occasionally look around at what's happening in this field.

There's often a fine line between being a person with an interest in cracking and being a cracker. And, usually, the best security professionals are using the same tools that the better crackers are using. So, when I heard about Ephemeral Security's new lisp-based mosref product, I was really intrigued. Mosref is a "secure remote execution framework" (security-speak that means "tool for embedding bad stuff on another computer"). It was recently demo'ed at defcon 14 (the slides are available online) and has quite a few interesting features (the following was taken from Ephemeral Security's web site):

Mosquito Lisp
Basically, mosref is designed to work with a console (on the "attacking" machine) and one or more drones (on "target" machines). All of the drones are custom-generated for the task and talk with the console using an encrypted communications link (so that communication between the console and the drones can't easily be compromised). Drones can carry a "payload" or can be used to relay communications to other drones. Ephemeral Security originally developed mosref using other technologies but switched to Lisp to take advantage of some of the dynamic features of the language. A neat feature is the ability to dynamically change code on the drone when necessary over a secure, encrypted communications link (Lisp developers are familiar with this type of "hot code patching" already; conceptually, it is similar to a CL developer working locally on Emacs with SLIME and updating a running instance of CL on a remote box. I've written about this in the past here, here, here, here).

If you're interested in learning more about mosref and Mosquito Lisp, the following might be of interest: Although mosref is designed for security work and security professionals (and/or crackers) will probably be the primary users of this software, I can see how it might also be adapted for use in other application areas. Since code on the "drones" can be updated dynamically and securely, mosref provides a nice platform for applications that need to always be running and which can't easily be manually maintained and re-booted. And, since the code is running in it's own VM over a trusted, authenticated, encrypted network, it can be very secure. And, if your application is highly-concurrent as well, then Mosquito could be an interesting option. Your application might well consist of a "swarm" of Mosquito Lisp code. ;-)

Update-2008-08-09: Since my original post, Ephemeral Security has folded. However, Scott Dunlop (the original developer of Mosquito Lisp) has resumed work on the successor to Mosquito Lisp: Wasp Lisp. I recently received an email from him with links to the older Mosquito Lisp and MOSREF code/documentation as well as links to the new Wasp Lisp project - I've paraphrased his email here:

The best resource is a tarball of the original MOSREF documentation that is still available on SourceForge at:

http://prdownloads.sf.net/mosref/mosref-2.0-beta3-documentation.tar.gz?download

While this is all out of date, it was a fairly comprehensive user-land view of Mosquito Lisp, MOSREF, and MOSVM.

The content of the Ephemeral Security blog can be found, thanks to Archive.Org at:

http://web.archive.org/web/20061018010704/ephsec.squarespace.com/lisp/

Unfortunately, the flash demo of using MOSREF is unavailable, but there were two MOSREF 2 demonstrations, one at DefCon, the other at Hack in the Box that can probably be found on YouTube these days.

Documentation on the implementation of the Mosquito and Wasp Virtual Machines is, as one would expect, sparse. There was a reference written for MOSVM's tiny instruction set and included in the MOSREF 2.0 source tarball at:

http://prdownloads.sourceforge.net/mosref/mosref-2.0-beta3.tar.gz?download

On the other hand, Scott is just getting started on the documentation of Wasp Lisp. Once Scott gets some fundamental tools written for generating and managing Wasp's documentation, he has indicated that he would love any assistance he could get from the community -- even if it is just bug reports and the occasional rotten tomato. Some notes on building WaspVM, and the latest WaspVM releases can be found at:

http://waspvm.googlepages.com

Finally, since SourceForge was a dog last summer, Scott decided to host the source tree with LaunchPad -- which supports a better version control system to boot: https://launchpad.net/waspvm

I'll look forward to following progress of WaspVM and Wasp Lisp in the future!

emacs Copyright © 2008 by Bill Clementson