A project log for AND!XOR DC27 Badge

The trilogy is done

Hyr0nHyr0n 07/22/2019 at 03:530 Comments

The Badge Enabled Non Directive Enigma Routine (B.E.N.D.E.R) is back for more embedded text based adventure hacking challenges. This is our puzzle framework we introduced during our DC26 project. Essentially it takes the style of an older text based adventure game (e.g. Colossal Cave, Zork, etc.) with ANSI style graphics. You have a limited set of command line interface actions which you perform on items. However this is not purely isolated to the terminal shell. B.E.N.D.E.R. is a framework to help us present our security challenges with hacker friendly graphics and encapsulate the game story line in a fun way. You start the game in the Home Village and must travel either North, South, East, or West Villages to solve a number of challenges leveraging actual hacking skills and contextually "in game" items. Our badges are for hacker cons and will always try to explore and teach some aspect of security.

For example, on the DC26 badge, in the North Village the hacker would "hack PIN_PAD with 1234" (or any four digit pin) causing the lights on the badge to blink. Solving the challenge required a logic analyzer or o-scope to see the timing on the I2C bus change, leveraging side channel power analysis to crack the pin which was randomized for every badge. As the delay got longer, you were closer to the actual pin.

Another example from the DC26 badge, in the West Village where once using an in game smartphone app used to fly a WiFi enabled drone...nothing would happen... unless you were using an actual device to capture the WiFi packets coming from the badge and analyzing them in WireShark to learn the sekrets.

Serial Connection

B.E.N.D.E.R. is entirely accessed through a serial terminal.

An important thing to note, our badge mounts as TWO serial devices because we leverage the FTDI 2232H component. The first digit (2) in the component number signifies that there are actually two FT232H cores on the chip. We user the first one as the FT2232 breakout for hardware hacking and the second one for the embedded terminal. If you use Linux (and you always should), that means plugging in the badge will result in two USB mount points:

On Windows, this means you will get a virtual com port of N and N+1, choose the N+1. Windows keeps track of all serial devices every plugged in and saves them. So if the badge is the 45th device you have ever plugged in, the following would happen...

Now back to Linux. We have some better recommendations after clunking around last year. We still recommend a terminal with allows escape sequences and ANSI (otherwise you get no colors or GFX). Minicom can be a bit tricky to setup, but the following work great:


So how does one start? At the command line type "BENDER" for a list of sub commands.

Commands specific to B.E.N.D.E.R. are listed as: WALK, N, S, E, W, LOOK, HACK, DRINK, STEAL


Essentially WALK is how you navigate. The sub commands to a location are relative to your current location. Since "HOME" is central to all locations, typing "WALK HOME" will always take the player back to their starting location. However since it also takes in to account directional relativity, being in the south village and typing "WALK NORTH" will take you along the trail to the HOME VILLAGE. Repeating the command to "WALK NORTH" will then continue on the the trail to the NORTH VILLAGE. There are also quick key short cuts to ensure this was just like Colossal Cave.


Items which you can interact with are in ALL CAPS and displayed in an area's general information or in your inventory


We aren't going to show much more than this, after all we want you to get a badge and try this out. However the following is a copy paste preview straight from the terminal. Enjoy!

           ██░ ██  ▒█████   ███▄ ▄███▓▓█████     ██▒   █▓ ██▓ ██▓     ██▓    ▄▄▄        ▄████ ▓█████
          ▓██░ ██▒▒██▒  ██▒▓██▒▀█▀ ██▒▓█   ▀    ▓██░   █▒▓██▒▓██▒    ▓██▒   ▒████▄     ██▒ ▀█▒▓█   ▀
          ▒██▀▀██░▒██░  ██▒▓██    ▓██░▒███       ▓██  █▒░▒██▒▒██░    ▒██░   ▒██  ▀█▄  ▒██░▄▄▄░▒███
          ░▓█ ░██ ▒██   ██░▒██    ▒██ ▒▓█  ▄      ▒██ █░░░██░▒██░    ▒██░   ░██▄▄▄▄██ ░▓█  ██▓▒▓█  ▄
          ░▓█▒░██▓░ ████▓▒░▒██▒   ░██▒░▒████▒      ▒▀█░  ░██░░██████▒░██████▒▓█   ▓██▒░▒▓███▀▒░▒████▒
           ▒ ░░▒░▒░ ▒░▒░▒░ ░ ▒░   ░  ░░░ ▒░ ░      ░ ▐░  ░▓  ░ ▒░▓  ░░ ▒░▓  ░▒▒   ▓▒█░ ░▒   ▒ ░░ ▒░ ░
           ▒ ░▒░ ░  ░ ▒ ▒░ ░  ░      ░ ░ ░  ░      ░ ░░   ▒ ░░ ░ ▒  ░░ ░ ▒  ░ ▒   ▒▒ ░  ░   ░  ░ ░  ░
           ░  ░░ ░░ ░ ░ ▒  ░      ░      ░           ░░   ▒ ░  ░ ░     ░ ░    ░   ▒   ░ ░   ░    ░
           ░  ░  ░    ░ ░         ░      ░  ░         ░   ░      ░  ░    ░  ░     ░  ░      ░    ░  ░


and!xor $ BENDER
BENDER - Badge Enabled Non Directive Enigma Routine (B.E.N.D.E.R) 2.0

  STATUS    :Status of your progress
  WEIGHT    :Set your weight (100-400lbs)
  GENDER    :Set your gender (M,F,X)
  RECAP     :Recap since DC26 - Run This First!
  RESET     :Reset the challenge (B.E.N.D.E.R. specific save data)
  COMMANDS  :Commands specific to B.E.N.D.E.R.

  Name: HYRON_W
  Gender: Not Set
  Weight: Not Set
  Blood Alcohol Content: 0.0000
  B.E.N.D.E.R. Completion: 0%
  Location: Home Village


  Enter a valid weight between 100-400 lbs.
  e.g. $ bender weight 200

and!xor $ BENDER WEIGHT 180
  Weight change successful!

  Sex change successful: NonBinary-Bot!

and!xor $ BENDER RECAP


  What? Did you get black out drunk and forget about what happened? Shit alright...
  Last year you woke up in the middle of the desert, no idea how you got there (big surprise).
  Some weird ass server rack was there, robot locked up inside, no power.
  You hacked some puzzles, got drunk, ended up in a Radio Shack, got drunk...
  Went into a Saloon, got drunk, ended up dancing in a with some creepy WiFi cactus dude.
  Messed with a TacoCorp Taco Truck, got drunk, got power up and running to the server rack.
  Robot came out and yelled at you, you ate a bunch of Tacos, got super drunk, and blew the robot.
  Fell into a hole in the ground, made your way through an underground bunker, then opened a door...
  Soundes like a good time. Oh and TacoCorp is probably not happy with you.

  So what happened after that door opened?
  You slipped on a taco wrapper and tripped over a pizza box left by some lazy asshole pizza delivery man.
  Spinning around backwards, then falling into some windowed freezer thing...fuck it was cold.
  The world got slept...and then awoke. You must have been in some cryogenic sleep for a long time.
  Exiting your sleepy freezer bed you stretch and yawn many years of nasty taco morning breath.
  You're not in the same place as before either. Someone moved that cold coffin while you were knocked out.
  There are stairs going up, you ascend them to a solid metal door and uncrank a door locking mechanism...
  (You should look around at this point)

and!xor $ LOOK
  You enter the doorway and it opens to a dusty radio broadcast room.
  Lets call this HOME for now...
  A relic of the past, but nostalgia holds a place in your heart.
  There's a DJ_COMPUTER on a desk, powered up, with a prompt.
  A pile of mixtapes, discs, and a STICKY_NOTE on a piece of media are in the corner.
  You peer out the window and to your surprise the world has gone to shit. Like nuclear winter fallout shit.
  They did it. They finally did it. DEF CON was cancelled and look what happened.
  From this radio tower lookout you can see two intersecting roads going in to the city.
  They are perpendicular creating four possible directions: NORTH, SOUTH, EAST, and WEST.
  Looking back away from the window and back in the room you notice something SOMETHING_FAMILIAR...

  An item catches your eye for the taking: BOTTLE_OPENER
  You smell some booze for the drinking: BALLAST_POINT_SOUR_WENCH

  You stole a BOTTLE_OPENER


  You down some delicious craft b33r
  Your BAC is now 0.0518

and!xor $