On Tuesday, a hacker in North Carolina uncovered crash footage from a wrecked Tesla, getting his hands on footage directly from the Autopilot camera’s feed. Until now, no one knew that the Autopilot camera stored crash footage — which could be handy in the event of a crash that wasn’t the Tesla driver’s fault.

Like all cars, Teslas occasionally crash, despite their incredible safety ratings and the fact that they’ll soon be “by far the safest cars on the road,” according to CEO Elon Musk. Luckily for their passengers, they remain extremely safe even in the event of a crash. The current version of Autopilot relies heavily on computer vision: Live footage from the Tesla roof camera tells the system what’s ahead. With Autopilot Version 8, the emphasis will shift to radar, but the rollout has not yet occurred.

The blue region shows the range of the roof camera.
The blue region shows the range of the roof camera.

We all knew that this camera was always rolling, but assumed that it didn’t store footage. Jason Hughes, the programmer and Tesla-tinkerer, proved that it does.

Hughes is himself a Tesla owner. Once, his Model S triggered an Emergency Braking event, meaning it detected an impending crash and slammed on the brakes. Hughes was curious whether there would be a data dump — whether his car had stored information relating to this event. After investigating, he found that it did. He’s since kept his eye out at salvage auctions for Tesla parts scrounged from totaled vehicles, and, in May, he found and purchased a salvaged Tesla center display unit.

So Hughes wasn’t the one who crashed, and he knows nothing about the driver. Nothing, that is, except that the driver chose to drive through a yellow light as a white Acura made an at-best audacious left turn, and that Autosteer was not engaged at the time of the almost 60-mph crash.

How does he know that? Well, it’s simple — for a hacker. “I kind of knew what I was looking for, since I had messed with it on my own car,” Hughes tells Inverse. “It’s not too terribly difficult. You have to basically gain root access to the MCU [Media Control Unit], and such. Tesla’s likely going to make that more difficult. I won’t say it’s simple, but it’s not impossible.”

Once inside, he found footage that the Model S stored right after the crash:

In most Tesla crashes, then, crash footage exists. It’s not great resolution, but it’s good enough for government work. “It has to send these messages over the CAN bus very quickly to save them from the camera to the MCU,” Hughes explains, “so they have to be dumbed-down resolution so that they can actually make it to the MCU before anything bad happens to it in a crash.” This transfer seems to be triggered whenever the airbags deploy, and “takes some amount of time,” he says — in his estimation, probably “about 20 seconds.” So, for the May Autopilot fatality in Florida, which left the Model S roofless, the crash footage probably didn’t make it to the MCU.

In more innocuous crashes, however, the footage would be useful. It would serve as a dashcam, essentially, but only send data and footage when it mattered — after a crash. “In this case,” Hughes says, “it’s obvious to me that the car making the left turn jumped in front of the Model S. I think that would’ve been useful in their insurance claim.” The Tesla owner involved in this crash may be out of luck, but anyone with a Tesla who gets in a crash from here on out might want to hire a hacker.

Photos via Tesla, Jason Hughes (1, 2)