Slashdot Mirror


How To Hack a BMW: Details On the Security Flaw That Affected 2.2 Million Cars

0x2A (548071) writes BMW recently fixed a security hole in their ConnectedDrive software, which left 2.2 million cars open to remote attacks. Security expert Dieter Spaar reverse engineered the system and found some serious flaws [note: if you'd prefer English to German, try this translation], including using the same symmetric keys in all vehicles, not encrypting messages between the car and the BMW backend or using the outdated DES.

26 of 83 comments (clear)

  1. Definition of "Remote Attack" by Anonymous Coward · · Score: 5, Insightful

    Somehow I don't think the definition of "remote attack" is "disassemble the computer, attach all kinds of expensive hardware to analyze communications and firmware, hack into the firmware to retrieve the encryption keys, so only then you can use a base station emulator to trick the car into thinking your remote machine is a BMW firmware server."

    The "remote attack" requires physical access, specialized skills, and intense hardware interaction. It is not something that some Romanian skript kiddie can pull off from their mom's basement.

    1. Re: Definition of "Remote Attack" by StevieWonderBoy · · Score: 5, Informative

      6,000 cars were stolen this way in London last year. You are wrong. They are selling kits on the ebay that allow you to clone keys.

    2. Re: Definition of "Remote Attack" by Anonymous Coward · · Score: 2, Informative

      I recall this whole BMW research started when BMWs were getting stolen off the drives of their owners with what appeared to be a box
      This video perhaps?:
      https://www.youtube.com/watch?v=HxVO5OVaCkA

      But this was a long time ago, 2012... and BMW still has major security flaws?!

    3. Re: Definition of "Remote Attack" by drinkypoo · · Score: 3, Informative

      And it's not just BMW, it's for all kinds of makes and models. Hell, you can go to Dealextreme and buy many unlocking tools, just by searching for unlocking tools. And I'm not talking about the kit of stamped spring steel pieces, either.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    4. Re: Definition of "Remote Attack" by AmiMoJo · · Score: 4, Interesting

      One of the most common attacks is actually the simplest. The thief waits in the car park with a jammer. Most cars use 433MHz in Europe, penalty 915 in the US. The victim walks away and presses the lock button on their key fob and doesn't notice that the car didn't actually respond. Once inside the thief can use the OBD-II port to steal the car.

      I prefer keyless entry as you press a button on the car to lock it, and even if jammed it will always lock.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    5. Re: Definition of "Remote Attack" by _merlin · · Score: 3, Informative

      You only need physical access to the Commbox from to a single car to extract encryption keys that can be used to steal many cars. That's the flaw. The cellular base station emulators are readily available.

    6. Re: Definition of "Remote Attack" by drinkypoo · · Score: 2

      My car honks when you hit the remote lock button

      In VAG cars, and possibly many others, that honk is an option which can be changed by twiddling an option code which can be looked up in the dealer's service data (which comes on DVD.)

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    7. Re:Definition of "Remote Attack" by Golden_Rider · · Score: 2

      Somehow I don't think the definition of "remote attack" is "disassemble the computer, attach all kinds of expensive hardware to analyze communications and firmware, hack into the firmware to retrieve the encryption keys, so only then you can use a base station emulator to trick the car into thinking your remote machine is a BMW firmware server."

      The "remote attack" requires physical access, specialized skills, and intense hardware interaction. It is not something that some Romanian skript kiddie can pull off from their mom's basement.

      The "disassemble the computer" part was only for the initial analysis of how the whole system works. Only one person needs to do this and can then sell the information. With the information from that one single disassembled box, it is possible to remote attack (without physical access other than standing within a couple hundred feet) any other BMW car with the same "connected drive" feature. That is (as described in the article), walk around with the cellular network emulator to trick vulnerable cars to connect to your cellular network, identify vulnerable cars via IMEI, figure out the VIN via the helpful error message the car sends out, activate remote services on the car (if not already active) via a faked message and then you can send the "open doors" command to the car. All of which can be done without physical access to the car other than standing near it, which you would need to do anyway if you want to take advantage of the open door.

      So - yes, skript kiddies (or, well, any car thieves) surely can do this, since I am sure that the assembled hardware necessary together with a small instruction manual "how to open any BMW" is available on the internet somewhere.

  2. This is why I quit web programming by Theovon · · Score: 4, Interesting

    A company as big as BMW should be able to hire some security experts, so this should be a bit embarrassing for them.

    But the truth of the matter is, doing security is not easy. Take web programming, for instance. Back when I first learned PHP, I found over and over that whatever design or coding approach seemed most straightforward and intuitive was inherently unsecure. All sorts of escaping and manual insertion of encryption functions are required, and that clutters up the code to the point of making it hard to maintain. I did manage to implement most of it in a common PHP file that I reused over and over again, but there was a huge learning curve, and it was a pain. Since then, people tell me that it's gotten a LITTLE better. For instance, database wrappers generate the SQL queries for you and automatically escape strings. But for the most part, it still sucks.

    If there were a single best book to read on cyber security, then perhaps we'd have fewer problems like what BMW had. But in reality, to get good at it, you have to have a vast familiarity with the literature and tools. You do that much reading, you might as well get a PhD. And my friends with PhDs focusing on security are in academia, not industry, so we get more security papers but not more secure devices.

    1. Re:This is why I quit web programming by drinkypoo · · Score: 4, Informative

      A company as big as BMW should be able to hire some security experts, so this should be a bit embarrassing for them.

      But the truth of the matter is, doing security is not easy.

      No, the truth of the matter is in your first paragraph. Designing and building a car is not easy. Not making complete fucking moron decisions about security is easy, if you hire someone vaguely competent. BMW decided to skip that step to save a few bucks to ensure nice corporate bonuses, and customers suffered. BMW should be on the hook for each car stolen in this fashion, and have to pay complete replacement value, because they failed to make a good-faith effort at security.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    2. Re:This is why I quit web programming by gnupun · · Score: 2

      Not making complete fucking moron decisions about security is easy, if you hire someone vaguely competent.

      But isn't connecting a car to the internet inherently stupid (for the consumer, not the vendor)? The risk of theft and car crashes via hacking are inherent in such a design decision whereas there are few benefits, such as getting updates without visiting the dealer.

      By connecting your car to the internet, billions of people and a few thousands of hackers and govt agents can now gain control of your car, also the car manufacturer can track your car usage info and sell that to advertisers and three-letter agencies.

      It's like connecting your toaster to the internet -- pointless and not very useful.

    3. Re:This is why I quit web programming by Lumpy · · Score: 2

      "No, the truth of the matter is in your first paragraph. Designing and building a car is not easy."

      Maybe to dumb people it's not easy. to the rest of us... yes it really is easy. It's a well defined and massively repeated process. An engine is trivial, a car suspension is trivial. a whole car is trivial.

      When you add shit to it for the sake of adding shit.. That is when it get's complex. No I dont need a computer on my brakes. a computer to the side of my brakes looking for slipping and trigger a modulation piston to give me anti-lock? Sure. but if the computer fails, I will have brakes.

      Idiot designers want to put the computer in the middle so all braking is done by the computer. When it fails you have no brakes.

      --
      Do not look at laser with remaining good eye.
    4. Re:This is why I quit web programming by drinkypoo · · Score: 2

      An engine is trivial, a car suspension is trivial. a whole car is trivial.

      Bull, followed by shit. Making a car that will function as well as a Model T is pretty easy, any dick with a little machining and welding experience can probably manage that. Making a car that will function as well as the lamest BMW, let alone something as complex as the i8, is a massive engineering challenge just to execute, let alone to do well.

      No I dont need a computer on my brakes. a computer to the side of my brakes looking for slipping and trigger a modulation piston to give me anti-lock? Sure. but if the computer fails, I will have brakes.

      It's sad that you think you know so much about cars, but you don't know that this is how ABS works. When the system isn't doing anything, the valving permits pedal pressure to actuate the brakes like it always has.

      Idiot designers want to put the computer in the middle so all braking is done by the computer. When it fails you have no brakes.

      Which designers are these? Literally the only vehicles with brake-by-wire are some very expensive heavy trucks with air brakes, and they have (get ready to be amazed) normal air valve control backup.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  3. At least there's a reasonable market factor by swb · · Score: 2

    BMWs are expensive, BMW drivers tend to be affluent, affluent people can afford good insurance, replacing a stolen car is expensive, insurance companies will charge a higher premium on easily stolen models, affluent people might choose other cars because of high premiums and reduced sales and bad PR will force BMW to improve their security.

    In theory, at least, the market response to easily stolen cars puts pressure on the carmaker to improve security.

  4. BMW software sucks big time. by 140Mandak262Jamuna · · Score: 3, Interesting
    I have a 2014 X3. The damn thing would not connect to any of my Google Nexus phones via blue tooth. They have a very limited set of handsets they support. They don't seem to test anything other than iPhone and Samsung. Supposed to connect to 4 phones at the same time. The damn module crashes all the time and forgets perviously paired handsets that worked well earlier. Their mp3 playback is abysmal. All those old mp3s I ripped from CDs back in 1990s and early 200s play back flawlessly in every mp3 player, every computer, every device I have tried. From memorex-mp3-CD-R, to WesternDigital-TV box to chromebooks to sansa ... But in X3 it would not play, repeatedly crash the module, or get into endless loops.

    Root cause of the problem seems to be some rigid adherence to specs and dim-witted error recovery process. If one mp3 file has a mismatch between its header declaration and its data section, that mp3 can misbehave. OK I will concede that. But the default action on seeing this mismatch should not be the whole entertainment module to crash, reboot and rescan the 8 GB memory stick all over again for media files. When it crashes and rescans, bluetooth does not work.It reminds me of Digital workstations where none of the the IEEE exception handler I install would work. Their default handler, which is to crash the process and write a coredump would kick-in no matter what I declare as error handler. BMW seems to be using an even more extreme version of this mode.

    BMW is our customer, and they buy some engineering design analysis suites that we make in my place of work. I wonder how they will behave if I crash the entire computer every time a BMW engineer feeds an incorrect data to our suites.

    I am not surprised it has so much of vulnerabilities. Anything that crashes this much will fall back to single user super user mode and present a console to the attacker sooner or later.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  5. they used encryption, hmacs, thought they knew by raymorris · · Score: 5, Informative

    >. Not making complete fucking moron decisions about security is easy, if you hire someone vaguely competent. BMW decided to skip that step to save a few bucks to ensure nice corporate bonuses, and customers suffered.

    Their developers encrypted the relevant text messages and used hmac to ensure their authenticity, so they thought it was reasonably secure. It's not that they were INCOMPETENT developers, the issue that none of them were security experts. Because true security, security that can't be broken fairly easily by an expert who then publishes a tool for script kiddies to use, IS hard. BMW's programmers did as much as I'd expect any application programmer to do. It's then time for the security audit, by a truly qualified security person, to catch the kinds of mistakes that the author caught. I work with some very good programmers. Some of them are really good at UI design, some are good at managing large projects, some are very versatile. It's a really good team of professional programmers. I catch security errors they make all the time because I'm the security guy. On the other hand, they have to fix my GUIs to look nice because I'm not good at designing attractive GUIs.

    1. Re:they used encryption, hmacs, thought they knew by drinkypoo · · Score: 2

      It's not that they were INCOMPETENT developers, the issue that none of them were security experts, and didn't bother to consult any.

      FTFY.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  6. I worked on the ConnectedDrive system by Elledan · · Score: 4, Interesting

    While I do not work for BMW directly, the company I work for does do projects for BMW. One of the projects I worked on was the iOS app which is part of this ConnectedDrive system.

    To be precise, for the 'old' version of the app (My BMW Remote App) for non-i models we started off with this black box library (CD lib) which handled all the communication with the BMW servers.

    While I didn't do any protocol analysis or looked at the communication between car and servers, even for this iOS app it was pretty clear to me and my colleagues what the security implications would be if someone were to be able to obtain log-in data just for that part of the communication.

    Depending on the market (America, Europe, Japan, etc.) there are some limitations to what one can do with the app (based on the type of account, IIRC), such as from what range one can see where the car is on a map and whether one can unlock doors with the app or not (not allowed in the US market, from what I recall). Where these limitations are enforced I'm not sure. It might be based on the server, in which case this hack would bypass such limitations as well.

    At any rate, this security leak does demonstrate quite succinctly how important it is to properly security audit such systems before releasing it into the wild. Even for the current project I do for BMW (related to the headunits), having an active internet connection means that security is essential, including plugging buffer overruns and similar.

    Nobody wants to have one's headunit go blank during navigation, in a constant reset cycle or be turned into a spying device, after all :)

    Note that I'm still under NDA for all of these projects, so I can't go into much detail.

    --
    Site & blog: http://www.mayaposch.com
  7. ps more than 20 years experience, still screw up by raymorris · · Score: 2

    PS, though I've been focused on computer security for twenty years, and before that worked as a locksmith and a private investigator, I STILL make mistakes. I STILL looks and things I've done and say "well that was dumb". I'm still learning, even still taking formal classes while I also serve as an expert consultant for build new courses in security.

    My IQ tested as - let's just say "well above average" - so if it were easy you'd think I would have figured it out by now.

  8. Moral of the story.... by Lumpy · · Score: 2

    Everything is hackable... OnStar that has been in millions of GM cars is just as hackable using the EXACT SAME TECHNIQUES.

    So if you have a portable cellsite that can spoof a cellular tower the device is looking for, you man in the middle it.

    Nothing new here except that a bonehead in programming the whole system is using the same key over and over to make his job easier.

    --
    Do not look at laser with remaining good eye.
  9. Re:Looks like they never considered security by Ol+Olsoc · · Score: 2

    Like most companies security is considered a cost, an inconvenience or an after thought. Looks like there is no one who knows anything about security in the entire chain of designers who came up with this design for the cars. They seem to rely on security by obscurity.

    Looks like a sneak preview of the future of the Internet of Things.

    Who ever thought we would have to worry about the security of our toasters?

    --
    The shepherds did so well protecting the flock that the sheep no longer believed that wolves existed.
  10. Re: You know, im fine with a car that doesnt have by drinkypoo · · Score: 2

    Early ABS: can only reduce brake force. very dumb.

    Slightly later ABS: gets the ability to pump. still very dumb. But now it can be used by traction control systems. First yaw control systems implemented on production vehicles in the late 1990s, using this functionality.

    Modern ABS: increased sampling speed permits determining how fast the wheel locks up, which lets you take a good stab at detecting snow/gravel. Wheel is permitted to stay locked up longer under these conditions to build up something to stop with.

    Brake-by-Wire: Used only on heavy trucks with air brakes. Normal air braking system is still present, actuated near bottom of full pedal travel in emergencies.

    What the ABS system actually looks like: just like a normal braking system, except a pump (not a CPU) is inserted into the brake lines. When the system is not activating, the valving defaults to a mode which permits the brake system to behave like normal.

    The only caveat is that some of the systems with yaw control are missing a proportioning valve, or don't have as much proportion in it as cars before yaw control. ABS is used to prevent rear-wheel lockup. That means that when the ABS fails, the rear brakes overapply, increasing rear brake wear and the risk of fishtailing.

    Now, there are EPBs, or electric parking brakes, and those are a bad idea. If some manufacturer feels that a hand brake is too much work for their customers, they can still implement a foot parking brake.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  11. exactly, and consulting can be only ~$1,000 IF by raymorris · · Score: 2

    Agreed, 100%. Further, IF you know what to look for when choosing your expert, rather than hiring them through three levels of middlemen, for a relatively small project you can pay him $500 to have a phone call early in the design phase and show up at a later planning meeting to review the design, then $500 more to review the final code and make adjustments that are minor to do, but have major impact. Of course you can also pay HP $10,000 to send him out. HP will pay TCML $3,000, and TCML will pay the expert who does the work $1,200. Guess how I know THIS. Hint - I didn't read it somewhere.

    Also, security isn't just about not getting hacked. Secure systems are systems that continue to operate correctly, even when someone is TRYING to break them. Therefore, the suggestions your security expert makes will improve the reliability of your system in the face of other potential issues, like a flaky cell signal. Making a system keep working even when someone is trying to make it fail means the system is more robust under other circumstances as well.

  12. Re:BMW software sucks big time. by 140Mandak262Jamuna · · Score: 2
    Did you order the navigational package? The navigation was part of some stupid package that included road sign reading camera, lane departure warning system and a load of crap for 3 or 4K. Now a days I get far more accurate and up to date maps in my phone, why the hell I need to fork that over? So, like a fool I am ordered a custom X3 without the nav package. This config seems to be very rare and they seem to have never tested their system when the hard disk is not available. They seem to have a quick start or check point core dump in the disk and reboot quickly back if you have a hard disk. Also scanned thumb drive cache exists in the disk, so it does not take long to get past that stage. But you don't get the hard disk the system takes so long to come back up.

    My 2006 Prius has no trouble connecting to phones. They are all simple, connect to bluetooth, make a phone call type of connections. BMW tries to connect to the phone, its media storage, call logs, speed dial everything, at least in 2014 version. Four phones at the same time. But they assumed there will be a hard disk all the time.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  13. Re:ps more than 20 years experience, still screw u by radarskiy · · Score: 2

    Clearly, you are the only person commenting on Slashdot that makes programming mistakes.

  14. How exactly is this news ... by janoc · · Score: 2

    In particular, BMW has a history of similar cockups - just search youtube for various "iDrive problems", "Check engine reset" issues, "Engine stalling" issues, etc. Those software problems go back years. The first iDrive implementation from 2002 using Windows CE was a legendary lemon.

    It isn't just BMW, though - http://www.edn.com/design/auto...

    I had a Renault Clio and Renault's unreliable electronics is legendary too, even though there it was more a poor design than necessarily bad code. But you will never know - nobody has seen the source code of the firmware in many of the control units. Often not even the manufacturer has it - it is outsourced and subcontracted, even for critical systems like ABS or ECU.

    And I am pretty sure that this is industry-wide problem - the same control units are in many cars, especially today with all those shared platforms and alliances between manufacturers.

    If someone is thinking about drive-by-wire cars (Nissan, uses a safety clutch to be legal atm, but they have publicly announced a push to go fully by wire http://www.caranddriver.com/fe...) or the recent idea about the OTA updates in this sort of cesspit of horrid and unaccountable code, they must be insane.