Skip to content
Info disclosure Write-up Intermediate

Retrieving SUI Wallet Passphrase and Private Key without Password

The SUI Wallet browser extension decrypts the wallet's entropy and mnemonic seed into memory whenever the account is unlocked, and the derivation path is stored unprotected in IndexedDB. An attacker with access to a compromised or stolen computer could use the browser debugger to capture these values and reconstruct the passphrase and private key without knowing the password.

mgthuramoemyint Follow

Published on medium.com

Extension : SUI Wallet

Thura Moe Myint, on medium.com

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 extension decrypts the wallet secrets into memory on every unlock and keeps the derivation path in IndexedDB without protection, so anyone with local access to the browser can read them.

Impact

An attacker with physical or remote access to a compromised computer could recover the wallet passphrase and private key without the password, though the vendor rated this as informative because it needs targeted local access.

What the attacker needed

Local access to the victim's computer; browser developer tools; wallet unlocked at least once

How it was found

  1. Create a test wallet and lock the account.
  2. Set breakpoints at the indicated lines in keystore.ts.
  3. Click unlock account.
  4. Continue in the debugger and inspect the decrypted return value from metamaskDecrypt.
  5. Convert the entropy hex to a mnemonic to recover the passphrase.
  6. Combine the mnemonic seed hex with the derivation path from IndexedDB to derive and encode the private key.

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.

A crypto wallet keeps a secret recovery phrase and a private key, which together let someone spend the funds. This report shows that the SUI Wallet extension briefly puts those secrets in readable form inside the browser whenever you unlock it, and also stores a helper value in the browser's local database without protection. Anyone who can sit at your computer, or who has already broken into it, can use the browser's developer tools to grab those values and rebuild your keys.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.