Hardware Hacking
flashrom is a utility for identifying, reading, writing, verifying and erasing flash chips, commonly used for BIOS/EFI/firmware extraction, backup, and flashing.
sudo apt install flashrom
flashrom [options]
flashrom is a universal flash programming utility used to detect, read, write, verify, and erase flash chips. It supports hundreds of chips, chipsets, and mainboards, making it the standard tool for firmware security research.
Security researchers use flashrom to extract BIOS/UEFI firmware for vulnerability analysis, implant persistent backdoors, recover bricked devices, and analyze embedded device firmware at the hardware level.
flashrom -LList all supported flash chips, programmers, boards, and chipsetsflashrom -p internalProbe the onboard BIOS/UEFI flash via the internal programmerflashrom -p ch341a_spiProbe the connected chip using a CH341A USB SPI programmerflashrom -p ch341a_spi -r backup.binRead the flash contents and save them to a backup fileflashrom -p ch341a_spi -c "MX25L6405" -r backup.binForce a specific chip when auto-detection is ambiguousflashrom -p ch341a_spi -w firmware.binWrite an image to flash (contents are auto-verified afterward)flashrom -p ch341a_spi -v firmware.binVerify the flash contents against a fileflashrom -p ch341a_spi -EErase the entire flash chipflashrom -p ch341a_spi -w firmware.bin -nWrite an image but skip the automatic verify stepflashrom -p internal --flash-namePrint the detected flash chip nameflashrom -p internal --flash-sizePrint the detected flash size in bytesflashrom -p ft2232_spi:type=2232H,port=A -r backup.binRead flash through an FT2232H-based SPI adapterflashrom -p buspirate_spi:dev=/dev/ttyUSB0 -r backup.binRead flash using a Bus Pirate in SPI modeflashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=1000 -r backup.binRead flash through the Linux spidev interfaceflashrom -p serprog:dev=/dev/ttyUSB0:4000000 -r backup.binRead flash using a serprog-compatible deviceExtract BIOS/UEFI firmware for analysis.
Write modified firmware to chips.
Restore corrupted BIOS firmware.
Backdoor firmware for persistent access.
Provides terminal updates regarding hardware identification, data transfer percentages, and final checksum verifications.
This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.