11.07.2015 Views

My Arduino can beat up your hotel room lock - Hakim

My Arduino can beat up your hotel room lock - Hakim

My Arduino can beat up your hotel room lock - Hakim

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>My</strong> <strong>Arduino</strong> <strong>can</strong> <strong>beat</strong> <strong>up</strong> <strong>your</strong> <strong>hotel</strong> <strong>room</strong><strong>lock</strong>Hacking the Onity <strong>lock</strong> systemby Cody Brocious,Trapped Orbit Research


How <strong>lock</strong>s workEvery <strong>hotel</strong> has a unique 32­bit sitecodeLocks are programmed with this sitecode and a code key value for<strong>hotel</strong> guest key cardsThey also contain timetables, look ahead ranges, master codes, andother info


How <strong>lock</strong>s workEach guest key card gets a code key value that is one greater than thelast guest'sThis is how card cycling worksCards contain an identity value that represents the door it's for, butthe <strong>lock</strong> doesn't know this value...A card with a valid code key value, encrypted with the proper sitecode, will work regardless of which door it's intended for.


Code keysGuests and masters both have code key values in the <strong>lock</strong>They're 24­bit but...Locks contain a look ahead value that <strong>can</strong> be 1­255, most propertiesuse ~50Any code key value between the current value in the <strong>lock</strong> and thatvalue plus the look ahead is validThis reduces the effective size of the code key value


Card format16­bit ident value. This is the door ID and the card copy numberOne to three 24­bit code key values16­bit expiration date8­bit bit field for authorizations8 bits of flagsImportant one is privacy override; allows you toopen the door when the deadbolt is thrown


Portable programmerThe <strong>lock</strong>s are not networked, so the portable programmer (PP) isused to load data into themInitialize: Load first data into a <strong>lock</strong>Update: Update code key values, timetables, masters, etcRead openings: Reads in the audit trail for a <strong>lock</strong>, showing whichcards were used for accessOpen: Opens any door at the property


Portable programmerThe PP contains the property's site code and will only work with<strong>lock</strong>s matching itLocks must be reset using a button inside the door before they <strong>can</strong> beused with a different site codeBut what if the PP does this check, and the <strong>lock</strong> doesn't care aboutsite code... ?


Card cryptoThe crypto used for cards in the Onity system is a bit underwhelmingProprietary algorithm using the 32­bit sitecode as a keyEven if it wasn't flawed in its construction, thekeyspace alone makes it brokenWon't get into the crypto too deeply here, but refer to the paper forcode and complete details


Breaking the cryptoThere are a co<strong>up</strong>le obvious vulns in their cryptosystemEach byte of the card is encrypted with the previous and a smallportion of the sitecode; this makes it easy to determine how muchof the sitecode you have right at any point in timeIf you <strong>can</strong> get two keys for the same <strong>room</strong>, you have enough data totrivially attain the site code for the property


Authentication and youAs alluded to before, the <strong>lock</strong> doesn't require any authentication forjust about anythingOnly function requiring the site code is the open commandBut what if the PP just reads straight from the <strong>lock</strong>'s memory? Thesitecode has to be in there


OpenTurns out that the <strong>lock</strong> does indeed let you read out every bit of itsmemoryThe sitecode (and everything else) is there inplaintextSend it to the <strong>lock</strong> with the open command, and it pops right openBut surely this requires a lot of hardware knowledge, right?


5.6k to freedomThe <strong>lock</strong> protocol uses one wire bidirectionally and another forgroundA 5.6k resistor from 3.3v power to <strong>your</strong> communication pin is all thatyou needThe jack for communication is a standard DC barrel plug like you'dfind on a million devices for powerIt's clearly accessible on the bottom of the <strong>lock</strong>


Connect and openWith the information above, we <strong>can</strong> see that it's trivial to open Onity<strong>lock</strong>sAttach a resistor and connector to an <strong>Arduino</strong>Read the sitecode out of memorySend the open command with the sitecodeWhen you do this, the <strong>lock</strong> just opens.It takes about 250 milliseconds and <strong>can</strong> be optimizedfurtherNo encryption, no protection.


Demonstrations


PerspectiveThis opens every Onity <strong>hotel</strong> <strong>lock</strong>Though some, e.g. wall readers commonly used forexterior doors, will store their sitecode at adifferent point in memoryThere are nearly ten million of these <strong>lock</strong>s installed worldwideThat's approximately 50% of the electronic <strong>hotel</strong> <strong>lock</strong>s in use,installed in about a third of all <strong>hotel</strong>sIf you cross the street to The Paris, you'll see an entire <strong>hotel</strong> full ofvulnerable <strong>lock</strong>sThis is Bad (TM)


What <strong>can</strong> be done?Nothing, for a co<strong>up</strong>le of reasonsThe <strong>lock</strong>s aren't flashable, so at least the circuit board in them has tobe replacedAny protocol changes would require that the PP be replaced as wellCrypto changes would require all the front desk equipment to bereplacedIn essence, we're talking about tens – even hundreds – of thousandsof dollars to secure a <strong>hotel</strong>And fixed hardware doesn't even exist (will it ever?)


Going publicThis presentation contains only a small part of the work I've beendoing for the last three yearsWe (Unified Platform Management Corp, my start<strong>up</strong>) produced acomplete replacement for the Onity system: everything but the PPand <strong>lock</strong>sWe're releasing it all open source today


Questions?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!