On Hacking MicroSD Cards
Some microSD cards built on Appotech controllers accept a hidden command sequence that puts the card into firmware loading mode, after which it runs attacker-supplied bytes as code. An attacker with that access could make the card behave normally while secretly altering data, enabling hard-to-detect man-in-the-middle attacks.
bunniestudios.com
Published on bunniestudios.com
« Name that Ware December 2013
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
Likely the firmware update mechanism on these controllers is reachable over manufacturer-reserved commands and is not authenticated, so anyone who knows the sequence can load and run code.
Impact
A card reprogrammed this way could carry out man-in-the-middle attacks that are difficult to detect, and a secure-erase may not remove data; the text does not say how many other vendors are affected.
What the attacker needed
Physical access to the card; a vulnerable Appotech controller
How it was found
- Send the manufacturer-reserved command sequence to the card.
- The controller drops into firmware loading mode.
- Send the next 512 bytes, which the card runs as code.
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.
A memory card is not just storage: it contains a small computer (a microcontroller) that manages the flash memory. The researchers found that on certain cards this little computer can be told to accept new instructions over the normal card interface, so someone could reprogram it. A reprogrammed card can pretend to store your files correctly while quietly doing something else.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.