Chromecast: Exploiting the Newest Device By Google
The Chromecast bootloader fails to check the return value of the image verification function, allowing an attacker to boot an unsigned kernel. This lets them execute arbitrary code and gain root access on the device.
blog.gtvhacker.com
Published on blog.gtvhacker.com
{{media:0}}On Wednesday, July 24th Google launched the Chromecast. As soon as the source code hit we began our audit.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The bootloader calls a verification function but never checks its return value, so an unsigned image is accepted.
Impact
An attacker with physical access can boot an unsigned kernel and gain root access, but the exploit requires holding a button during power-on and a USB drive.
What the attacker needed
Physical access to the device; USB drive; holding the button during power-on
How it was found
- Hold down the single button while powering the device to enter USB boot mode.
- Place a signed image at offset 0x1000 on a USB drive.
- The bootloader loads the image and calls VerifyImage but ignores the result.
- The unsigned kernel executes, and a custom ramdisk mounts the USB drive.
- The ramdisk erases the /system partition and writes a modified system image.
- The device reboots with a modified binary that spawns a root telnet server.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The Chromecast checks that the software it loads is signed by Google, but it forgets to look at the result of that check. So someone can give it their own unsigned software and it will run it anyway, giving them full control of the device.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.