News for hackers. Stuff that matters.
Re:OpenSesame – A device that can open fixed-code garage doo... by mrb on Thursday June 04, 2015 @01:37PM (#9660778)
Three weeks ago I reverse-engineered my garage door opener wireless protocol. I probed the remote's PCB with a Saleae logic analyzer and found it was a 12-bit code ASK-modulated at 390 MHz with bits encoded as sequences of 10 kHz and 20 kHz pulses. I bought a $13 spare remote to hack it and control the RF transmitter section from my computer through an FT232 sending the ASK signal. I just cut off the digital signal trace going from the MCU to the RF transmitter and hooked it to the FT232. I built a brute-forcer and it works quite well. I do not have my notes at the moment, but IIRC one code takes 25.6 ms to be sent. And my manufacturer (Genie) seems to require the code to be transmitted 4 times consecutively to open the door, that's 102.4 ms. Multiplied by 4096 combinations, this gave me a brute-forcing time of 7 minutes.

I had tried Samy's exact attack to reduce the brute-forcing time but it did not work at the time because I tried it before I discovered the code had to be sent 4 times consecutively (5 times makes it more reliable due to RF interferences). So I am not surprised to see Genie absent from the list of models Samy found vulnerable.

But I should try to find out the longest period of time during which these 4 repetitions of the code need to be sent. Maybe it does not have to be perfectly consecutive, but it could be 4 codes received within an interval of 200 ms or 1000 ms. If so it might still be possible to build a modified De Bruijn sequence that repeats codes 4 times while being only 4 times longer.

By the way it is very surprising a description of the 12-bit Genie protocol does not appear to exist online. These remotes are so easy to reverse engineer, so common (Genie is in the top 3 or top 4 most common openers), and so old (the protocol has existed since 1985), you would think there would be information about it online, but nope.

PS: I wonder if there could be commercial interest in cryptographically secure garage door openers? A $0.50 ARM Cortex-M0 MCU is all you need to implement a HOTP based on HMAC-SHA1. Then a simple learning/pairing system writing the key in EEPROM can even sustain the battery being removed from the remote. But there is probably no interest... which is why most remotes are insecure even the "rolling code" ones.

(Edited to clarify some tech details.)

Re:OpenSesame – A device that can open fixed-code garage doo... by kleiba on Thursday June 04, 2015 @02:07PM (#9660967)
Well, it seems that from the point of view of Genie, if it's required to send the correct code N times in a row, acceptance should be aborted if that is interspersed by any wrong code. In that case, a De Bruijn sequence wouldn't work.
Re:OpenSesame – A device that can open fixed-code garage doo... by LukeShu on Thursday June 04, 2015 @11:49PM (#9663791)
Because noise and interference. You don't want the neighbor opening his garage door to abort yours--your code and his would be interspersed, but you both still want your door to open.
Re:OpenSesame – A device that can open fixed-code garage doo... by saidajigumi on Thursday June 04, 2015 @08:11PM (#9663072)
> But there is probably no interest...

FWIW, this sounds like a hook around building a business for "next-gen" garage door openers. Security, quality of build, and convenience are among the factors that could be pitched to early adopters. Heck, this even feels like something that the right small team could work into a really sharp Kickstarter pitch, if so inclined.

One tricky problem is that garage door openers tend to "just work" for a long time. Over and above cost, upgrading is a much larger installation hassle, far larger IMO than e.g. Nest thermostats had to overcome. All of that will limit adoption rates, even for willing early adopters. A retrofit angle would help, akin to the retrofit-smart-deadbolt market.

An "interesting" sales objection would be this tech not working with cars that have built-in recording garage door remotes (vaguely similar to home theater smart remotes, for those unfamiliar).

Re:OpenSesame – A device that can open fixed-code garage doo... by themartorana on Thursday June 04, 2015 @11:08PM (#9663662)
Also, is strong security something people expect out of a garage door remote? It's never been a feature, as far as I can remember.

Not that there isn't a market of people who do want for security in their remote, or would but don't yet know it...

Re:OpenSesame – A device that can open fixed-code garage doo... by LukeShu on Thursday June 04, 2015 @11:50PM (#9663800)
Absolutely; everyone just assumes it's already secure, or at least as secure as the deadbolt on their front door.
Re:OpenSesame – A device that can open fixed-code garage doo... by CONTRARlAN on Friday June 05, 2015 @01:50AM (#9664057)
Which is only as secure as the door frame it goes into, which usually means: pretty insecure.

Still, I agree with the premise that it's about assumptions, and if people can be made to realize that their garage door openers are inherently pretty insecure, and feel that that presents a substantial, then there's a market there. But until it becomes a problem that's common enough for media outlets to scare people about it, there probably isn't a large market yet.

(Any marketing plan for an endeavor like that should have a PR budget from day one, since that's exactly how such stories tend to become news segments.)

Re:OpenSesame – A device that can open fixed-code garage doo... by c22 on Friday June 05, 2015 @02:41AM (#9664180)
> Which is only as secure as the door frame it goes into, which usually means: pretty insecure.

But the door frame/deadbolt is still more secure than the remote controlled garage door because abusing the former mode of entry is more likely to draw concern from passers by and leaves a permanent record of your passage.

Re:OpenSesame – A device that can open fixed-code garage doo... by CONTRARlAN on Friday June 05, 2015 @02:20PM (#9667069)
I think that's one valid way of looking at it, and many technically-inclined people would be inclined to agree, I'd imagine.

But another way of looking at it, and one I suspect most non-technical people would, is that it just takes one motivated person of roughly-average strength to break a doorframe. It takes someone with fairly uncommon technical sophistication to make one of these devices.

Once someone mass-produces them and sells them in real volume that perception could flip, but right now I'm far more concerned about a flimsy doorframe–which leads to where I live and sleep–than I am about someone rigging up a way to open my garage door–which only gets them into a detached garage where insured stuff is kept. The odds of a break-in being by force (whether against a door frame or a window) are just vastly higher.

Re:OpenSesame – A device that can open fixed-code garage doo... by ssharp on Monday June 08, 2015 @09:44AM (#9678963)
Around 10 years ago, I bought a house that had two garage doors and each door had it's own separate remote and each were the insecure fixed-code kind.

I was able to easily wire-up a replacement receiver to the opener unit that allowed me to update them them to rolling code systems that were more secure and would allow me to control both on one remote. I remember it being a bit clunky, in that I had to plug the receiver into a wall outlet and run a wire back to the opener unit (I think most newer homes put in outlets in the ceiling for the opener to plug into, but this one was directly wired into a ceiling box), but it wasn't very hard to install and was a lot better than having to replace the entire unit!

Re:OpenSesame – A device that can open fixed-code garage doo... by Cymen on Thursday June 04, 2015 @04:17PM (#9661760)
Somewhat of a tangent, but I am concerned about the MITM attack on car locks [1]. This kind of attack is being used in my neighborhood in Oakland, California and no doubt other places. I read the reports of "someone is breaking into my car but no windows/locks are broken". Then a couple other people on NextDoor chime in with the same thing and one person reports a woman who is walking around the neighborhood and appears to be the one responsible. A coworker explained a method where one can amplify the signal of the car and/or car key so that the car thinks the key is next to the car and the door unlocks.

The cryptographically secure garage door opener is still susceptible to MITM if the MITM attack is being done purely by amplification of signal, right?

It's almost like the key needs a handshake with the car by some method that is not using radio frequency. I wonder what options that leaves open? So far, I have not thought of one that is convenient (at some point, it is easier to go back to using a physical key to open a physical lock after all).

1. I think there was a post about it here already but I couldn't find it.

Re:OpenSesame – A device that can open fixed-code garage doo... by mrb on Thursday June 04, 2015 @06:21PM (#9662539)
Yeah, a car's passive entry system can definitely be exploited by relay attacks. Here is an academic group who demonstrated it: https://eprint.iacr.org/2010/332.pdf

The most obvious way to mitigate is to have the car require the key to send the first bit of the response at most N nanoseconds after the last bit of the challenge is sent over the air. Because of the speed of light this assures the key is within a certain distance of the car. Ideally you want to constrain this to ~2 meters since passive entry requires the driver to touch the door handle. This limit is not to be confused with remote keyless entry which should work up to ~100 meters as it requires the driver to actively press a button so, like garage door openers, this is not vulnerable to relay attacks. However power-constrained MCUs, especially in the key, have a hard time computing a strong cryptographic challenge within N nanoseconds with N low enough, hence the problem...

After my little foray into garage door openers I am currently looking into implementing relay attacks on the passive entry / passive go system of my car (2012 Audi). Fascinating stuff.

Re:OpenSesame – A device that can open fixed-code garage doo... by Cerium on Thursday June 04, 2015 @11:12PM (#9663682)
There are super low power accelerometers with wake on movement. Simply require the key be recently moved about to activate the door. If the key is not awake, it can't answer any challenges.
Re:OpenSesame – A device that can open fixed-code garage doo... by twanvl on Friday June 05, 2015 @07:43AM (#9664908)
You don't need to compute the challenge in N nanoseconds. Instead, the car could send a challenge, the key can compute it in however much time it likes. Then the car sends a one time pad, the key receives it and xors the otp with the challenge's response. Then it sends that.

The cryptographic challenge makes it secure, the XORed one-time-pad allows for fast measurement of the round trip time.

Re:OpenSesame – A device that can open fixed-code garage doo... by tptacek on Thursday June 04, 2015 @10:30PM (#9663534)
Neat; Aurelien is my co-chair for USENIX WOOT this year. Now that I know his name, I keep noticing amazing things he's worked on.

Thanks for posting this.

Re:OpenSesame – A device that can open fixed-code garage doo... by cmdrfred on Thursday June 04, 2015 @04:25PM (#9661814)
I don't think so, as far as I know a garage door opener has to be activated (you press the button) so that exact attack won't work.
Re:OpenSesame – A device that can open fixed-code garage doo... by at-fates-hands on Thursday June 04, 2015 @03:42PM (#9661575)
>>> I wonder if there could be commercial interest in cryptographically secure garage door openers?

Probably not. Mainly because breaking a window or crowbarring a door is a lot less expensive and a lot faster.

Re:OpenSesame – A device that can open fixed-code garage doo... by tptacek on Thursday June 04, 2015 @05:32PM (#9662249)
Was thinking about making the same comment. People throw cinderblocks here to get garage doors open. Until recently, we deliberately kept ours unlocked (if we're going to get burglarized, at least we'd like to keep the doors on the hinges).
Re:OpenSesame – A device that can open fixed-code garage doo... by marincounty on Thursday June 04, 2015 @07:53PM (#9663018)
I had to do that when I worked in San Francisco. I just left it open with a note, "Please take a nap in here, whatever, just don't break anything." I did put a kill switch in that mechanics can't figure out. It wasn't the stupid radio I cared about, it was repairing the windows.
Re:OpenSesame – A device that can open fixed-code garage doo... by 746F7475 on Thursday June 04, 2015 @05:44PM (#9662336)
But breaking a window and climbing though it takes time and you can cut yourself if you hurry and crowbar makes a lot of unwanted noise.

And not every garage is your basic suburban-attached-to-a-house type. Some little more expensive flats have underground parking where the gate opens with garage opener and thous suckers don't even have windows, they are just metal gate.

With this you could gain access to the cars and with boosting the signal from the cars with the "keyless entry" you could easily swipe clean a lot of cars without the a trace.

Re:OpenSesame – A device that can open fixed-code garage doo... by throwaway7767 on Thursday June 04, 2015 @04:08PM (#9661697)
>> I wonder if there could be commercial interest in cryptographically secure garage door openers?

>Probably not. Mainly because breaking a window or crowbarring a door is a lot less expensive and a lot faster.

It's also a lot more likely to attract attention of bystanders.

Another concern may be insurance. In my area of the world, insurance companies generally refuse to pay out for burglaries unless there is evidence of a break-in (a broken window, forced door or something like that). This would likely not be covered. If this kind of device became popular with thieves like the car keyless entry hacks have, I can see there being a demand for something like this.

Re:OpenSesame – A device that can open fixed-code garage doo... by tadfisher on Thursday June 04, 2015 @04:10PM (#9661713)
We're already seeing organized theft rings using devices to unlock car doors without breaking in. I don't think it's outside the realm of possibility for the same thing to occur with garage doors.
Re:OpenSesame – A device that can open fixed-code garage doo... by nickbauman on Thursday June 04, 2015 @04:41PM (#9661896)
A friend who lives in a wealthy neighborhood here had their garage broken into electronically more than 10 years ago. So clearly some people have known about it for a while. The local police claim the thief probably "listened" to their garage door opener open the door at least once to get in, as opposed to brute forcing it.
Re:OpenSesame – A device that can open fixed-code garage doo... by patcheudor on Friday June 05, 2015 @12:22AM (#9663886)
It's not uncommon for thieves to go to open houses in nice neighborhoods when a property is for sale & copy the dip-switch codes. This also happens when homes are under construction. No one ever thinks about changing their garage door opener code.
Re:OpenSesame – A device that can open fixed-code garage doo... by nickbauman on Friday June 05, 2015 @10:18AM (#9665634)
I hadn't even thought about that breach vector! In this case they'd been living there for quite a while.
Re:OpenSesame – A device that can open fixed-code garage doo... by patcheudor on Friday June 05, 2015 @11:38AM (#9666137)
It's also pretty common for garage door installers / builders to either not change the default config or use the same one or pattern for every home. We were amongst the first to build a house in a new sub in our area so we'd go for walks around the neighborhood while the homes were being built and would go through them and of course I'd always look at the codes. The primary builder in the sub set the dip switches to the number address of the house. That provided a nice geeky / awkward way for me to introduce myself to my neighbors by opening their garage doors for them.
Re:OpenSesame – A device that can open fixed-code garage doo... by userbinator on Thursday June 04, 2015 @08:34PM (#9663156)
By the way it is very surprising a description of the 12-bit Genie protocol does not appear to exist online.

Look at the datasheet for the IC they use. 2^12, as it's known, is a very common code and the ICs out there implement only a handful of variations on it.

The other common variants are 3^9 (19683 codes), 3^12 (531441 codes) and 3^18 (387420489 codes).

Re:OpenSesame – A device that can open fixed-code garage doo... by mrb on Thursday June 04, 2015 @08:41PM (#9663176)
The remotes I reverse-engineered were universal ones with generic MCUs, so their datasheets weren't useful: Skylink model 69 with an EM78P468N, and Skylink model 39 with an HT48R30A-1.
Re:OpenSesame – A device that can open fixed-code garage doo... by userbinator on Friday June 05, 2015 @04:17AM (#9664429)
A bit of a shame that they used an MCU instead of an encoder/decoder ASIC, since they could've implemented something better. The fixed-code remotes I've seen use a standard IC like an HT12E.

If those weren't OTP/mask ROM, reflashing them with a different firmware (maybe even a simple rolling code?) could be an interesting exercise...

Re:OpenSesame – A device that can open fixed-code garage doo... by blacksmith_tb on Thursday June 04, 2015 @03:56PM (#9661642)
Wouldn't it be simplest to refuse more than 4 attempts per minute? I suppose it would sometimes frustrate the owner bungling the code, but stretching out brute-forcing the whole space to hours instead of minutes would make it a lot less appealing to would-be thieves...
Re:OpenSesame – A device that can open fixed-code garage doo... by benyami on Thursday June 04, 2015 @07:54PM (#9663023)
Would this become a problem if everyone in the neighborhood had the same brand opener?
Re:OpenSesame – A device that can open fixed-code garage doo... by mrb on Thursday June 04, 2015 @08:05PM (#9663052)
I forgot to mention a crucial piece of information why De Bruijn sequences couldn't possibly work against Genie. The packet the remote sends is made of a 4-bit header followed by the 12-bit code, but the header is using a bit encoding (sequence of 10 and 20 kHz pulses) that couldn't possible represent a valid sequence of 0s and 1s in the code. So yeah, unless you can trick a Genie receiver to parse a code without the header, De Bruijn sequences can't work.
Re:OpenSesame – A device that can open fixed-code garage doo... by sitkack on Saturday June 06, 2015 @05:40PM (#9672373)
Did stuff like this when was a kid, but just used a binary counter hooked into the switches on the replacement remote. What I really wanted as a huge RF amplifier so I could broadcast the signal 5+ miles in all directions.
Re:OpenSesame – A device that can open fixed-code garage doo... by unoti on Thursday June 04, 2015 @01:47PM (#9660829)
There's information about it online now, thanks to your post! I came here wondering what frequency ranges and encodings are at work, and now I know.