<img referrerPolicy="no-referrer-when-downgrade" src="//analytics.huey.xyz/matomo.php?idsite=1&rec=1" alt=""/>

Fake micro SD cards

Identifying and 'fixing' a fraudulent micro SD card

  •  2 mins  •  

I have been on a bit of a year-end tidying and cleanup spree. In the course of this, I came across the following micro SD card:

Photograph of micro SD card

There weren't any obvious red flags in the design or construction of the micro SD card (putting aside the claimed capacity). I don't recall how I obtained this micro SD card — it had been lying in a drawer for some time.

The capacity appeared to be quite impressive: 512 GB(?). It looked too new to be a 512 MB card, and indeed when I plugged it in, it claimed to have about about a 500 GB capacity. That is a suspiciously large capacity, which whilst technically possible, would probably be beyond my usual price range for SD cards (I think the next largest SD card I have is 128GB?).

A brief rant about fake flash storage listings

I am all too aware that fake SD cards (and fake flash drives and SSDs) are pretty common. Matt Cole conducted a self-funded survey of about 476 SD cards purchased from Amazon and AliExpress and found that about 12% were completely fraudulent.1 I suspect the number would be much higher if he tested higher capacity SD cards or if his sample included dodgier cards such as Xiaomi SD cards (Xiaomi doesn't make SD cards) and generic SD cards.

The number of fraudulent flash storage listings on online e-commerce platforms such as Shopee is quite astounding and the platforms' anti-fraud measures (if any) are clearly inadequate. A simple search will quickly reveal many 'Xiaomi' SD cards (again, Xiaomi doesn't make SD cards) and 2TB SD cards for incredible prices:

Screenshot of Xiaomi SD card on Shopee

Screenshot of cheap SSD on Shopee

I previously reported one particular Shopee seller who attempted to sell me a fraudulent SSD, and pointed out in my report that his other listings were very likely to be fraudulent as well. 3 months later, the seller is still happily selling on the platform with new listings (but with the same photos), at similarly incredible prices, and with a 4.6 / 5 rating. Looking at the reviews, I suspect most are not authentic and a minority are from buyers who have fallen victim to the scam and who have yet to realise the claimed capacity does not match the actual capacity.

I had a strong suspicion I had one of those fraudulent SD cards on my hands and I set out to confirm this.

Investigation

Flash fraud is a well known problem and various people much more experienced and talented than I have created useful tools to combat this. One of these tools is f3, which stands for Fight Flash Fraud. It's a simple command line tool for testing flash storage devices.

f3 is in nixpkgs so it's simple to install in NixOS, I just added it to environment.systemPackages in my configuration.nix.

f3 tests the device by continuously writing data to the device until the device is filled, and in this way determines whether the claimed capacity matches the actual capacity.

As expected, my '512GB' micro SD card was fraudulent and had a usable capacity of only 29.44 GB.

Screenshot of f3 tool in action

The dmesg output similarly indicated that the manufacturer was 'Generic' and not Samsung as the exterior of the micro SD card claimed.

f3 helpfully provides a useful function to 'fix' the fake card essentially by repartitioning the card to fit its actual capacity. I went ahead and did this, and now I have a generic 29.44GB micro SD card instead (which I still don't entirely trust and wouldn't use for any data I actually wanted to keep).