Crypto Wallet Local Storage Attack
An attacker with physical access to a rooted Android device can modify the cryptocurrency wallet addresses stored in the app's local storage, replacing them with their own. This could cause the victim to send funds to the attacker or display a tampered QR code.
enderphan.medium.com
Published on enderphan.medium.com
PDF: https://www.exploit-db.com/docs/46466
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 wallet app stores cryptocurrency addresses in plaintext within its private data directory, which becomes accessible once the device is rooted.
Impact
An attacker with physical access to a rooted device could change the victim's cryptocurrency addresses, potentially leading to loss of funds when the victim sends money or shares their QR code.
What the attacker needed
Physical access to the device; device is rooted; ADB enabled
The fix
Wallet developers should encrypt stored addresses with a user password and regenerate the receive address each time it is requested.
How it was found
- Root the Android device to gain access to the app's private data directory.
- Enable ADB and use it to explore the app's data/data directory.
- Search for the stored cryptocurrency address using grep or similar commands.
- Copy the file containing the address to external storage and pull it to a computer via ADB.
- Edit the address in the file to the attacker's address.
- Push the modified file back to the device and restore it to the app's data directory with correct permissions.
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 report shows that if someone gets hold of your unlocked Android phone and it is rooted, they can change the cryptocurrency addresses saved in your wallet app. Rooting gives full access to the phone's files, so the attacker can edit the app's data directly. When you later use the wallet, you might send money to the attacker's address without realising.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.