Slashdot Mirror


Tesla Model S REST API Authentication Flaws

An anonymous reader writes "New Tesla owner and Executive DIrector of Cloud Computing at Dell, George Reese, brings the Tesla Model S REST API authentication into question. 'The authentication protocol in the Tesla REST API is flawed. Worse, it's flawed in a way that makes no sense. Tesla ignored most conventions around API authentication and wrote their own. As much as I talk about the downsides to OAuth (a standard for authenticating consumers of REST APIs—Twitter uses it), this scenario is one that screams for its use.' While not likely to compromise the safety of the vehicle, he does go on to say, 'I can target a site that provides value-added services to Tesla owners and force them to use a lot more electricity than is necessary and shorten their battery lives dramatically. I can also honk their horns, flash their lights, and open and close the sunroof. While none of this is catastrophic, it can certainly be surprising and distracting while someone is driving.'"

29 of 161 comments (clear)

  1. I don't get it. by Anonymous Coward · · Score: 4, Funny

    Can someone give me a car analog?

    1. Re:I don't get it. by Rosco+P.+Coltrane · · Score: 4, Funny

      Sorry, cars are digital these days.

      --
      "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    2. Re:I don't get it. by Anonymous Coward · · Score: 4, Funny

      You wouldn't copy a car, would you?

    3. Re:I don't get it. by theskipper · · Score: 4, Funny

      Don't copy that jalopy!

  2. Hopefully A Light Will Come On Over At Tesla by Anonymous Coward · · Score: 2, Interesting

    Hopefully a light will come on over at Tesla about API security. Let's just hope it's not a Phillips Hue (http://www.engadget.com/2013/08/14/philips-hue-smart-light-security-issues/)

  3. Re:not quite correct by smack.addict · · Score: 2

    I've done it before.

  4. how fast by fyngyrz · · Score: 4, Funny

    Well, terminal velocity will depend on two factors: The ultimate wind resistance of its tumbling chassis, and how high it is above the ground when you drop it.

    --
    I've fallen off your lawn, and I can't get up.
  5. Not quite getting it by fyngyrz · · Score: 3, Insightful

    There's something of a difference between "hey, look, some guy in a neat car" and "John Q. Private is currently at mile marker 23 on highway 2, proceeding at 65 mph in an easterly direction, with 100 miles of range remaining."

    --
    I've fallen off your lawn, and I can't get up.
  6. Major fail for Tesla by RobinH · · Score: 4, Interesting

    With all the news about medical devices with deadly security flaws, and people even hacking into cars (even if only from the backseat), I can't believe Tesla really didn't even *try* to add proper security to their API. The only right way to do it (from a corporate perspective) is to hire an outside security company to audit your design and implementation, and to continue to monitor the security whenever changes are made (so continuously in this case). It's well known that you can't trust the programmers to implement security properly, especially if you had Elon Musk screaming over your shoulder like Steve Jobs all the time.

    --
    "I have never let my schooling interfere with my education." - Mark Twain
    1. Re:Major fail for Tesla by Stainless_Steel_Mous · · Score: 5, Insightful

      Classic failure mode for companies that do not primarily write software, bur use software in their products. We are seeing more and more of the continued use of security through obscurity followed by goggle-eyed amazement that haxors would figure out a way to penetrate the systems of the device/vehicle/airplane/whatever, finally ending in lawsuits to attempt to hide the existence of grotesque security failures. I cannot wait for the first corporation to be sued for insecure product design.

    2. Re:Major fail for Tesla by DuckDodgers · · Score: 4, Interesting

      Even for companies that primarily write software, it's easy to design something that looks secure to you but in fact is trivial to defeat. WEP wireless security is inherently flawed. PPTP VPNs from Microsoft are inherently flawed, though not as badly as WEP, and Microsoft has deprecated the entire protocol. WPS wireless easy setup is flawed. The AES encryption used by Megaupload in their re-launch earlier this year was not implemented properly, and thus is useless.

      The history of computing is littered with flawed attempts at designing new security protocols. As far as I can tell, the best practice is to adopt an existing open source technology that is well proven. If you're trying to do something new, you probably need to spend an unholy fortune on multiple independent audits of the system, as well as inviting people on security mailing lists to examine it, and possibly offering a bounty for discovered flaws.

    3. Re:Major fail for Tesla by synapse7 · · Score: 2

      I would assume Tesla's API to be better than industry standard before I took George's opinion.

    4. Re:Major fail for Tesla by DuckDodgers · · Score: 2

      TKIP modifies WEP to be secure, and TKIP runs on any hardware that can run WEP.

      WEP was designed to be secure, nobody would go through the trouble to invent a security protocol that they knew could be defeated by commodity hardware in under an hour. WEP was just designed poorly.

  7. Re:First World Priorites by 0123456 · · Score: 5, Funny

    Yeah, but the battery will run out two miles down the road, so it's not really a big deal.

  8. Let me get this straight by DougOtto · · Score: 4, Funny

    "I can also honk their horns, flash their lights, and open and close the sunroof."

    So he discovered a 10 year old?

    --
    Solving Unix problems since 1989...
    1. Re:Let me get this straight by Z_A_Commando · · Score: 2

      With this flaw, you could (feasibly) automate Rick Rolls of Model S owners, no small child necessary.

    2. Re:Let me get this straight by plover · · Score: 4, Funny

      "Never gonna roll your windows up,
      Never gonna put your top down,
      Never gonna run your battery down, or desert you."

      --
      John
  9. Re:so besides all that by Ralph+Wiggam · · Score: 4, Interesting

    It's fast as hell. It can do 0 - 60 in 4 seconds despite weighing 4600 pounds. Electric motors operate at max torque at all RPMs.

  10. Can someone give me a car analog? by bcong · · Score: 2

    Sure. It is like using web based certificates in PKI but in this case there is no revocation system and mandatory 3 month validity for all certs. I have to give this key to a third-party in order to be able to do anything user related like view my emails. That third-party or someone who gains access maliciously to the cert database can use this cert to make a connection to my computer that I can't turn off, to make my cpu spike or use up all the ink in my printer, until the 3 months is over.

    ...wait a minute, I think I did this wrong

    1. Re:Can someone give me a car analog? by az1324 · · Score: 2

      I'm sure you could get a token revoked with an e-mail to Tesla. The API is not intended for use by third parties so really the only valid criticism here is "Tesla does not have a 3rd party API".

  11. Re:First World Priorites by AaronW · · Score: 3, Informative

    There is a setting in the car where you can disable remote access. It's trivial to set.

    --
    This post is encrypted twice with ROT-13. Documenting or attempting to crack this encryption is illegal.
  12. Re:You might be right. by dgatwood · · Score: 3, Interesting

    John Q. Private is currently at mile marker 23 on highway 2, proceeding at 65 mph in an easterly direction, with 100 miles of range remaining.

    Say I am John Q. Private. Can you give me a scenario where I might care that someone has this information?

    When the speed limit is 55.

    Alternatively, when someone correlates driving patterns with murders and determines that you were parked in the parking lots of restaurants that were within walking distance of three unsolved murders. Can you prove you were eating? The whole time?

    Yes, I can think of a lot of scenarios where you might care.

    --

    Check out my sci-fi/humor trilogy at PatriotsBooks.

  13. Seems Trollish by sl4shd0rk · · Score: 4, Insightful

    Tesla is a big target in the crosshairs of the automotive industry right now so I'm very skeptical. Tesla is doing what no other company has been able to do in the US and that seems to be a problem with everyone from dealers to falsified reviews in The New York Times. Let's do without the TFA drama have a look at the the egregious attack vectors listed:

    1) You want to leverage a tool on a website with some useful functionality. You enter your email/password. They willfully and incorrectly store that information and are subsequently compromised (or worse, they use it themselves).

    This is a really broad claim. What's more, if you haven't logged in over an SSL connection then... well, you're kind of a dumbass.

    2) An attacker gains access to a website's database of authenticated tokens. It has free access to all of that siteâ(TM)s cars up to 3 months with no ability for the owners to do anything about it.

    This is no less dubious that so many online services that I couldn't begin to count. The risk of compromise is an accepted one and hopefully mitigated. No fair faulting them without seeing how they would handle said compromise.

    In a nutshell, TFA is going to need to find more substantial basis for panic than this. Sheesh.

    --
    Join the Slashcott! Feb 10 thru Feb 17!
  14. Re:As usual, some things got left out... by Nemyst · · Score: 2

    It can be closed and the documentation sealed in a titanium safe stored inside a reinforced container dropped at the bottom of the Mariana Trench for all I care; if the API is active in production models, it's going to get discovered and exploited. Nefarious usage, especially, won't be stopped by "Hey, you're not supposed to use this!"

    There really is no excuse for this. It's just sloppy security practices.

  15. OAuth for Apps? Seriously? by Luthair · · Score: 4, Interesting

    The article is mostly FUD. To start, OAuth is not a User->System authentication system, its a three party authentication system. For OAuth to work as intended the three parties involved need secure communication channels between the pairs (e.g. user to api, 3rd party to api, and user to 3rd party). This leads to the fact that his first two complaints about the Tesla service, are also inherently present in OAuth when implemented in a non-web app:
    * Entering login information into any application inherently provides it to the application's author
    * SSL is required between the 3rd party and the API service, otherwise eavesdroppers are able to obtain the API token, secret and user token

    The final two flaws are really the same issue and are not part of authentication; however it is important that users are able to revoke access that they've provided to third parties. Missing that ability is certainly a problem but it is not a flaw with authentication.

    While there are better methods for authentication that ought to be used by Tesla for their API (e.g. a long one time token the user enters, a QR code scanned, etc.), OAuth is not a better form of authentication for desktop or mobile application.

    1. Re:OAuth for Apps? Seriously? by pavera · · Score: 2

      The problem with the article is there are *no* authorized third party apps that use this API. Tesla does not provide third party access.

      People have reverse engineered the api, and then if you give these third parties your credentials, they can make calls to the api and do things to your car. The article is arguing that *any* API that is exposed on the net *must* implement oath so that third parties can use it. Seems pretty crazy to argue that any api exposed to the internet must implement third party app access.

  16. Re:so besides all that by Ralph+Wiggam · · Score: 2

    The only other 4 door car that can do 0-60 in 4 seconds is the M5. Comparing a 5 passenger sedan to a 2 seater roadster isn't fair. It's also $30k less than your Roadster and almost every other car with sub 4 second 0-60 times.

  17. Re:so besides all that by elistan · · Score: 2

    It's fast as hell. It can do 0 - 60 in 4 seconds despite weighing 4600 pounds. Electric motors operate at max torque at all RPMs.

    Nitpick - max power at all RPMs. If a power source supplies a constant 10kw, the electric motor will of course operate at a constant power of 10kw. It should be obvious that 10kw equates to very different torque values a 1 rpm and 10,000 rpm.

    The advantage of electric motors, which you allude to, is that the max power (150 kw, 200 hp, whatever) is available immediately, rather than only once engine revs climb high enough like in a petrol engine. (Although due to real-world esoteric reasons I don't fully understand, the efficiency with which that power is turned into motive force isn't constant throughout the rev range - max torque of many electric motors is actually not right at 0 rpm, but the concept is close enough to reality to illustrate the differences between electric motors and internal-combustion engines.)

    So a Tesla Model S will essentially operate at 310 kw regardless of engine speed, while an ICE with the same peak power output will generate 310 kw only at one specific RPM, and will be less, sometimes a lot less, at all other speeds.

    ps - why is one a "motor" and another an "engine?" What's the difference?

  18. Re:so besides all that by Immerman · · Score: 2

    > why is one a "motor" and another an "engine?" What's the difference?
    In modern usage an engine is a device that burns fuel to generate torque. Historically it was used for any device that converts force into motion: hence battering rams and catapults being siege engines, and the cotton (en)gin(e).

    Motors apply to pretty much everything else that might once have been called an engine. Most commonly they convert electrical, elastic, or compressed-gas energy into mechanical energy. But there are even molecular motors such as the myosin in muscles that converts chemical energy into mechanical work.

    My personal rule of thumb - if it's powered by heat it's an engine. Heat being a very low-quality form of power it suffers from large and theoretically unavoidable thermodynamic inefficiencies when converting to higher-quality forms. An electric or spring-driven motor on the other hand could, in theory, be 100% efficient.

    --
    --- Most topics have many sides worth arguing, allow me to take one opposite you.