Skip to content

Commit 872b254

Browse files
committed
add LICENSE and README
1 parent b70d49e commit 872b254

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Cycloctane
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## BrowserPass
2+
3+
Decrypt browser passwords and cookies offline with DPAPI masterkey file.
4+
5+
Currently only supports Chromium. Tested on Google Chrome, Opera and MS Edge(Chromium).
6+
7+
Works with masterkey and Chromium user data from standalone win7 and win10 with local account. Note that Microsoft Accounts use random generated password for DPAPI. It is not possible to use logon password to decrypt secrets from Microsoft Accounts.
8+
9+
### Usage
10+
11+
Use `python -m BrowserPass` or run `python ./run.py`
12+
13+
Files needed for decrypt Chromium secrets:
14+
15+
- user sid and password: `S-1-xxxxxxxx`
16+
- user Master Key files (directory): `%AppData%\Microsoft\Protect\S-1-xxxxxxxx`. It may contains multiple key files. So the whole directory is needed to find the right key.
17+
- chromium user data:
18+
- Local State: `%path_to_browser_appdata%\User Data\Local State`.
19+
- Cookies sqlite database (for cookies decryption): `%path_to_browser_appdata%\User Data\Default\Cookies`.
20+
- Login Data sqlite3 database (for passwords decryption): `%path_to_browser_appdata%\User Data\Default\Login Data`.
21+
22+
```bash
23+
python -m BrowserPass chromium --sid $windows_sid --masterkey_dir $path_to_masterkey_dir --localstate_path $path_to_localstate_file --cookie_path $path_to_cookie_file --logindata_path $path_to_logindata_file -p $password
24+
```
25+
26+
If password is not specific by `-p`, it will be asked interactively.
27+
28+
### Example
29+
30+
Decrypt all cookies and passwords:
31+
32+
```bash
33+
python -m BrowserPass chromium --sid S-1-xxxxxxxx --masterkey_dir ./S-1-xxxxxxxx/ --localstate_path ./Local\ State --cookie_path ./Cookies --logindata_path ./Login\ Data
34+
```
35+
36+
testing: decrypt raw DPAPI blob from file.
37+
38+
```bash
39+
python -m BrowserPass dpapi --sid S-1-xxxxxxxx --masterkey_path ./S-1-xxxxxxxx --blob blob.dat
40+
```

0 commit comments

Comments
 (0)