CVE-2024-57790: Uncovering Hardcoded Root Credentials on an ICS/O
A hardcoded root password was found in the factory partition of the SPI flash memory on an industrial gateway. An attacker with physical access could use it to log in as root via serial console or SSH, gaining full control of the device.
Marcel Rick-Cen | FOXGRID Follow
Published on medium.com
The journey to CVE-2024–57790 began in late 2023 ago when I first accessed device. I encountered a highly fortified system with no attack surface for accessing the underlying OS.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the factory provisioning process writes a plaintext root password into the SPI flash factory partition, and the device's first-boot script reads it to set the root account.
Impact
An attacker with physical access could gain root access to the device, but the root password is unique per device, limiting widespread compromise.
What the attacker needed
Physical access to the device; UART connection to the device; ability to dump SPI flash
How it was found
- Connect to the UART debug interface and determine the baud rate.
- Access the U-Boot bootloader by pressing the space bar during boot.
- Use the spi read command to dump the factory partition.
- Convert the dumped data to binary and open it in a hex editor.
- Identify an unknown string in the factory data.
- Use that string as the root password on the serial console or SSH.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This device stores a secret password in its memory chip that is the same for every unit. If someone can open the device and read that chip, they can log in as the administrator and take full control.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.