Storage Police is a utility designed to expose fake storage media and fraudulent capacity labels. Whether it's an HDD, SSD, flash drive, or SD card, this tool ensures that what's on the label is what's actually in the hardware.
- π« Expose Fake Capacity: Detect fraudulent media that report more storage than they physically possess.
- π¨ Detect Hardware Failures: Identify disk errors, flash memory degradation, or other physical hardware issues.
- β‘ Performance Benchmarking: Real-time monitoring of sequential write and read speeds, serving as an unintentional benchmark.
- π§Ή Secure Data Wiping: A dedicated
shredmode to reliably overwrite devices with unpredictable random data.
- π΅οΈββοΈ Unfakable Verification: Uses an unpredictable BLAKE3-based sequence to prevent disk controllers from cheating via transparent data compression or deduplication.
- π Byte-Perfect Testing: Mirrors real-world conditions by ensuring every byte is physically stored and can be accurately retrieved.
- ποΈ High-Efficiency Testing: Specifically focused on retention and integrity, resulting in significantly shorter test times than general-purpose tools.
- π» Streamlined UX: Inspired by
disktestbut redesigned for simplicity with intuitive parameters and clear, modern feedback.
Download the latest pre-compiled binaries for Linux, macOS, and Windows from our Releases Page.
Note
For full transparency and peace of mind, all pre-built binaries include GitHub Build Provenance to verify they are compiled automatically directly from source.
If you have Go installed:
go install github.com/midnight-wonderer/storage-police@latestFill the target device with a unique, deterministic pseudo-random sequence.
sudo storage-police write --seed "MySecretSeed" /dev/sdcTip
Use a unique seed to ensure the pattern is specific to your test.
You could use your nickname, for instance.
Verify that every byte written can be retrieved accurately.
sudo storage-police read --seed "MySecretSeed" /dev/sdcImportant
The seed must be identical to the one used during the write phase.
For all the extra goodies you might not know you want yet.
storage-police --helpCaution
Data Loss is Permanent.
The write commands will completely wipe the target storage device. Double-check your device path (e.g., /dev/sdc) before proceeding. We are not responsible for any accidental data loss.
- Sudo Access: Most systems require elevated permissions to access raw block devices. If the utility is in your
$PATH, try:sudo $(which storage-police). - Power Cycle: For the most reliable "fake capacity" detection, unplug and replug the device after the
writephase before starting thereadphase. This clears any volatile cache.
The tool generates a unique, deterministic stream based on your provided seed. Without knowing the seed, it is virtually impossible for a malicious storage controller to "fake" a successful verification by predicting the next sequence.
The pseudo-random stream is generated using BLAKE3 in Extendable Output Function (XOF) mode.
OUTPUT_STREAM := BLAKE3_XOF(SEED)
This provides cryptographically strong randomness at speeds that typically exceed the storage media's physical limits.
Yes. The shred subcommand uses your system's cryptographically secure random number generator (CSPRNG) to initialize the seed, ensuring the data written is unpredictable.
Note
On SSDs, internal wear-leveling might prevent 100% physical erasure of every NAND cell. For ultra-sensitive data, physical destruction is recommended.
Enable command-line completion for a better experience:
# To try it now:
source <(storage-police completion bash)
# To make it permanent:
storage-police completion bash > ~/.local/share/bash-completion/completions/storage-police(Supports bash, zsh, and fish)
- disktest - The primary inspiration for this tool.
- f3 (Fight Flash Fraud) - A classic tool for testing capacity and performance.
We are looking for testers to verify Storage Police on Windows and macOS. If you have access to these systems and a spare USB drive, please consider helping out!
Check out this thread for instructions on how to participate and report your findings.
Storage Police is released under the BSD 2-Clause License.