█████╗ ██████╗ ███████╗ █████╗ ██╗ ██╗ ██╗ ██╔══██╗ ██╔══██╗ ██╔════╝ ██╔══██╗ ██║ ██║ ███║ ███████║ ██████╔╝ █████╗ ███████║ ███████║ ╔██║ ██╔══██║ ██╔══██╗ ██╔══╝ ██╔══██║ ╔════██║ ██║ ██║ ██║ ██║ ██║ ███████╗ ██║ ██║ ██║ ██║ ╔═╝ ╔═╝ ╔═╝ ╔═╝ ╔══════╝ ╔═╝ ╔═╝ ╔═╝ ╔═╝
. * . . *
* . *
.-~~~-.
__|_______|__
( . . . . )
'~~~~~~~~~~~~~'
| |
* . . *
. * . .
The Flexon Xmask is a password-protected SD card marketed as a side-channel-resistant, encrypted storage solution. The device relies on a proprietary Windows utility to authenticate users and manage access. To inspect the underlying host-to-card communication, the speaker initially attached a physical logic analyzer. However, continuous Windows background polling and the logic analyzer's limited memory made capturing specific authentication events impractical. To bypass these hardware constraints, they transitioned to a software-based sniffing setup, routing a USB SD card reader through a Linux host and capturing the USB-to-SD traffic using USBmon and Wireshark.
Analyzing the captured packets showed that the card repurposes standard SD block write commands to specific memory addresses as a proprietary control channel. Writing to block 8 instructs the card to set a password, while writing to block 6 attempts an unlock. To determine how the software encodes the password payload, the speaker decompiled the Windows utility's C++ library in Ghidra. They discovered a total absence of cryptographic encryption. The tool simply generates a 512-byte buffer using a Mersenne Twister pseudo-random number generator seeded with the host's local time. It then applies a basic steganographic technique, fusing the bits of the user's password into specific offsets within this randomized buffer before transmitting it over the SD bus.
Using a Hydrabus hardware hacking tool and a custom Python script, the speaker bypassed the Windows utility entirely, sending direct block commands to the card. By testing various block addresses, they uncovered two fatal logic flaws. Writing the hexadecimal value FFFFFFFFFFF to block 9 shifts the starting boundary of the password-protected storage sector beyond the physical limits of the flash media. This vendor command executes without any prior authentication, instantly making the entire drive readable and writeable. Furthermore, reading a specific undocumented block while the card is in command mode directly returns the user's password in plain text.
The speaker acquired the newer, 160-Swiss-franc Xmask Pro model to determine if the vendor had addressed these hardware security failures. While the plain-text password leak no longer worked at the previous block address, the sector boundary bypass remained completely functional, allowing full unauthorized access to the premium card. Despite spending over two months attempting coordinated disclosure via website contact forms, direct emails, and a customer service chatbot, the speaker received zero response from Flexon.