CVE-2024-3400: PAN-OS Command Injection Vulnerability in GlobalProtect Gateway. Learn More

CVE-2024-3400: PAN-OS Command Injection Vulnerability in GlobalProtect Gateway. Learn More

Services
Capture
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

twi-managed-portal-color
Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

twi-briefcase-color-svg
Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

tw-laptop-data
Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

twi-database-color-svg
Database Security

Prevent unauthorized access and exceed compliance requirements.

twi-email-color-svg
Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

tw-officer
Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

tw-network
Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Offensive Security
Solutions to maximize your security ROI
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

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.

The parts we used to complete this build are the following:

  • 1 ATMega328 (pre-loaded with the sketch)
  • 1 5.6k resistor
  • 1 30 ohm resistor
  • 1 16Mhz Crystal
  • 1 3.3v Zener diode
  • 1 A23 12V Battery
  • 1 SPST tall mini push button (momentary on)
  • 1 DC (coaxial) barrel connector, 5mm outer diameter, 2.1mm inner diameter
  • 1 Protoboard 1-3/4in. X 1-1/2in

If you follow the diagram below you should be able to built and create your own hotel door opener pen.

12651_f2b69e9e-b332-49ee-a8c4-d82caeaba8ba
Your finished product should look something like this.

11923_d04d7e39-197c-4520-a482-e2d008462d87
9934_72c856f9-6a7d-4367-96f1-d771137e6f6d
7847_0b1cbff2-835a-4a87-8104-06845c7613d8

And then because everyone loves a video demo, here is the marker in action with my hotel door lock.

Latest SpiderLabs Blogs

EDR – The Multi-Tool of Security Defenses

This is Part 8 in my ongoing project to cover 30 cybersecurity topics in 30 weekly blog posts. The full series can be found here.

Read More

The Invisible Battleground: Essentials of EASM

Know your enemy – inside and out. External Attack Surface Management tools are an effective way to understand externally facing threats and help plan cyber defenses accordingly. Let’s discuss what...

Read More

Fake Dialog Boxes to Make Malware More Convincing

Let’s explore how SpiderLabs created and incorporated user prompts, specifically Windows dialog boxes into its malware loader to make it more convincing to phishing targets during a Red Team...

Read More