Security Evaluation of Tesla Model S API
dhanjani.com
dhanjani.com
/vehicles/{id}/command/charge_port_door_open - Open the charge port.
/vehicles/{id}/command/charge_max_range - Set the charge mode to max range
/vehicles/{id}/command/door_lock - lock doors
These are all GET Methods.
I am a bit surprised that the company that claims to pay so much attention to detail has used Blatantly incorrectly principles (Using Idempotent & Safe designated HTTP methods for actions that change the state of the Car) for their "REST" API.
AFAIK the API isn't even publicly documented (officially) and is only known because it was reverse engineered by sniffing traffic from the iOS and/or Android apps. The people who did that work refer to it as a "REST" API, but they aren't Tesla.
As far as whether they should be using GET for these calls regardless of whether they call the API a "REST" one or not -- they are a pragmatic company, and the simpler the software is on an embedded device like a car the better; strict adherence to the intent of various http methods is less important than just keeping things as simple as possible, maybe they didn't even implement post or put, I doubt they are running apache on that thing.
And hopefully, even on an embedded device, sending a POST as opposed to a GET should be trivial.
So there's no particular excuse based on "embedded systems". I do agree it should use POST, but it's not quite as bad as it looks. Besides it being an authenticated API (so bots aren't a real problem), the calls are almost all set up to create a certain state, and repeating that call once the car is in that state (or working on it, I presume) seems quite safe. 'auto_conditioning_start' and 'auto_conditioning_stop' are okay to repeat; 'auto_conditioning_toggle' not so much. Though one does kinda wonder about the horn honk one.
This is really something we really need more of, even in cars without nice pretty APIs like Tesla's because they have a lot of code on them too.
The ability to remotely unlock the car opens up a whole new can of worms. Could someone potentially steal a car (like how they steal domains and twitter handles) through social engineering? Or perhaps by stealing the auth token on the user's mobile device? If you don't continue paying the loan for your car, could they refuse to unlock the vehicle remotely?
You know GM's OnStar [http://en.wikipedia.org/wiki/OnStar] has existed since 1995, and allows not only for vehicle tracking, but the remote shutdown of the vehicle (typically used in the event of theft), correct?
Basically, the Tesla software has some holes that need to be patched and some security settings changed. However, there has not been a proven method to penetrate the cars' software yet.
I see this becoming a concern the in the coming months as more people purchase a Model S and more people start to tinker with it. I am intrigued to see if systems such as propulsion and braking are easily hacked considering how the whole car is basically networked. We shall see...
There is the possibility that one day an issue could be found in one of their services, but these issues could be found in almost any modern service.
That's an extremely dangerous position to take. Any reasonably secure system deals precisely with these problems through password policies and principle of least privilege. For example, successfully phishing a Tesla engineer's email credentials should not get you access to active vehicles. If this were the case, I would classify this as a major vulnerability because many things can result in access to someone's email.
Same thing for username and password. That's all you need to log into their app. Not sure about failed attempts, but there are no other authentication methods.