James Bond's Dry Erase Marker: The Hotel PenTest Pen

You may have seen the talk and demonstration by Cody Brocious that allows him to open an Onity hotel room door lock with an Arduino, which is totally James Bond. However, wouldn't it be even better if someone was able to get it down to the size of a marker or pen? Working as a pentester for Trustwave SpiderLabs, I have access to many different pens, I have blue pens, red pens, green pens, and even the normal boring black pens. Most of these write just fine, and I sometimes wonder why I'm getting paid to test them, but I digress. While the initial idea was to get everything working inside a pen, it quickly became apparent that we wouldn't be able to do it right away. So instead we opted to get it inside of a dry erase marker.

I'm not going to get into the technical details of how this hack works, or why it works. Cody does a great job on his own site over at http://demoseen.com/bhpaper.html. So if you have any questions about the hack itself or the details, it is best to ask him, as he is the one who discovered this. I only made the device smaller. :)

Now that we have our goal, we needed to gather supplies. In order to build and test all of this yourself you will need the following:

1 Arduino (Almost any kind works, Cody used a Arduino Mega 128)

1 DC barrel jack, 5mm outer diameter, 2.1mm inner diameter

1 5.6k resistor

1 Onity Door lock

I already had the door lock from a previous eBay purchase that I may or may not fully remember. The next step was getting an Arduino. This part wasn't too hard either since every hacker and their grandmother should have about 50 of these laying around. I just so happen to have one from "The Worlds Number 1 Hacker" contest a few years back that I won at DEF CON. And the barrel jack and connector I had laying around.

With the parts listed above I was able to build the Arduino circuit and load up the Arduino sketch that Cody provided at http://demoseen.com/bhpaper.html. Testing that it worked was as easy as plugging in the barrel connector and waiting for the green light on the lock to light up. Now that I knew this was working, it was time to build the working prototype that would fit in a dry erase marker.

I went over to the local hacker space to get some help with the circuit diagram from my friends Josh Krueger and Jordan Bunker. We knew that we needed a crystal to have correct timing for the code to work and unlock the door. We also needed to supply the Arduino with about 3-5 volts, and the digital 3 pin with 3.3v for the one-wire serial to work. Getting the circuit this small isn't that much of a hassle, but it can be a bit of a pain doing it with limited parts on hand. After a bit of back and forth on the design we agreed on the following parts to complete the project that night. This is by no means the best solution or the only solution to make this fit into a pen, but for what we had available and with the time we had to do it, it's what we were able to come up with.