GithubHelp home page GithubHelp logo

acmercyj / chrome_password_grabber Goto Github PK

View Code? Open in Web Editor NEW

This project forked from priyankchheda/chrome_password_grabber

0.0 1.0 0.0 2.31 MB

Get unencrypted 'Saved Password' from Google Chrome

License: GNU General Public License v3.0

Python 100.00%

chrome_password_grabber's Introduction

Chrome-Password-Grabber

Get unencrypted 'Saved Password' from Google Chrome

Introduction

Like other browsers Chrome also has built-in login password manager functionality which keeps track of the login secrets of all visited websites. Whenever user logins to any website, he/she will be prompted to save the credentials for later use and if user chooses so, then the username & passwords will be stored in internal login database. So next time onwards whenever user visits that website, he/she will be automatically logged in using these stored credentials which saves hassle of entering the credentials every time.

Chrome stores all the sign-on secrets into the internal database file called 'Web data' in the current user profile folder. Newer version has moved the login passwords related database into new file named 'Login Data'.This database file is in SQLite format and contains number of tables storing different kind of data such as auto complete, search keyword, ie7logins etc in addition to login secrets.

The logins table mainly contains the information about sign-on secrets such as website URL, username, password fields etc. All this information is stored in the clear text except passwords which are in encrypted format.

Windows Implementation

Google Chrome encrypt the password with the help of CryptProtectData function, built into Windows. Now while this can be a very secure function using a triple-DES algorithm and creating user-specific keys to encrypt the data, it can still be decrypted as long as you are logged into the same account as the user who encrypted it.The CryptProtectData function has a twin, who does the opposite to it; CryptUnprotectData, which... well you guessed it, decrypts the data. And obviously this is going to be very useful in trying to decrypt the stored passwords.

Mac/Linux Implementation

Encryption Scheme: AES-128 CBC with a constant salt and constant iterations. The decryption key is a PBKDF2 key generated with the following:

  • salt is b'saltysalt'
  • key length is 16
  • iv is 16 bytes of space b' ' * 16
  • on Mac OSX:
    • password is in keychain under Chrome Safe Storage
      • I use the excellent keyring package to get the password
      • You could also use bash: security find-generic-password -w -s "Chrome Safe Storage"
    • number of iterations is 1003
  • on Linux:
    • password is peanuts
    • number of iterations is 1

Python Implementation (Working)

Usage

>>> from chrome_passwd import ChromePasswd
>>> chrome_pwd = ChromePasswd()
>>> print(chrome_pwd.get_login_db)
/Users/x899/Library/Application Support/Google/Chrome/Default/
>>> chrome_pwd.get_password(prettyprint=True)
{
	"data": [
		{
			"url": "https://x899.com/",
			"username": "admin",
			"password": "secretP@$$w0rD"
		},
		{
			"url": "https://accounts.google.com/",
			"username": "[email protected]",
			"password": "@n04h3RP@$$m0rC1"
		}
	]
}

Contribute

Feel free to contribute. Please Follow PEP8 Guidelines.

TO DO:

  • Cookie support
  • Updating database password directly

chrome_password_grabber's People

Contributors

kousha1999 avatar mr-xn avatar priyankchheda avatar sealrealize avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.