Anonymous ID: a07b66 Dec. 6, 2022, 8:34 a.m. No.17885597   ๐Ÿ—„๏ธ.is ๐Ÿ”—kun

Memory Hacking

 

Flash memory is really cheap. So cheap, in fact, that itโ€™s too good to be true. In reality, all flash memory is riddled with defects โ€” without exception. The illusion of a contiguous, reliable storage media is crafted through sophisticated error correction and bad block management functions. This is the result of a constant arms race between the engineers and mother nature; with every fabrication process shrink, memory becomes cheaper but more unreliable. Likewise, with every generation, the engineers come up with more sophisticated and complicated algorithms to compensate for mother natureโ€™s propensity for entropy and randomness at the atomic scale.

 

These algorithms are too complicated and too device-specific to be run at the application or OS level, and so it turns out that every flash memory disk ships with a reasonably powerful microcontroller to run a custom set of disk abstraction algorithms. Even the diminutive microSD card contains not one, but at least two chips โ€” a controller, and at least one flash chip (high density cards will stack multiple flash die). You can see some die shots of the inside of microSD cards at a microSD teardown I did a couple years ago.

 

Itโ€™s as of yet unclear how many other manufacturers leave their firmware updating sequences unsecured. Appotech is a relatively minor player in the SD controller world; thereโ€™s a handful of companies that youโ€™ve probably never heard of that produce SD controllers, including Alcor Micro, Skymedi, Phison, SMI, and of course Sandisk and Samsung. Each of them would have different mechanisms and methods for loading and updating their firmwares. However, itโ€™s been previously noted that at least one Samsung eMMC implementation using an ARM instruction set had a bug which required a firmware updater to be pushed to Android devices, indicating yet another potentially promising venue for further discovery.

 

https://www.bunniestudios.com/blog/?page_id=3592