\n"""
- data += """ \n""" % '[client_name]'.upper()
+ data += """ \n""" % date.today().strftime("%d/%m/%Y")
data += """ | """ % os.path.join('res','Logo_LOGIN.PNG')
@@ -128,13 +129,29 @@ class reporting:
}
}
}
+
+ function toggleAll() {
+ toggle_it("cookies");
+ toggle_it("wifi");
+ toggle_it("taskscheduler");
+ toggle_it("credential-blob");
+ toggle_it("browser-internet_explorer");
+ toggle_it("browser-firefox");
+ toggle_it("browser-chrome");
+ toggle_it("SAM");
+ toggle_it("LSA");
+ toggle_it("DCC2");
+ toggle_it("VNC");
+ toggle_it("MRemoteNG");
+ }
"""
self.add_to_resultpage(data)
results = self.get_credz()
- data = """Username |
+ data = """
+ Username |
Password |
Target |
Type |
@@ -147,7 +164,8 @@ class reporting:
cred_id, file_path, username, password, target, type, pillaged_from_computerid, pillaged_from_userid = cred
if type != current_type:
current_type=type
- data += f""" """
+ current_type_count=self.get_credz_count(current_type)[0][0]
+ data += f""" """
#Skip infos of
@@ -233,6 +251,72 @@ class reporting:
data += """
"""
self.add_to_resultpage(data)
###
+ ##### List cookies
+ results = self.get_cookies()
+
+ data = """
+ Name |
+ Value |
+ Until |
+ Target |
+ Pillaged_from_computerid |
+ Pillaged_from_userid | \n"""
+
+ #
+ current_type = 'cookies'
+ data += f""" """
+ for index, cred in enumerate(results):
+ name,value,expires_utc,target,type,pillaged_from_computerid,pillaged_from_userid = cred
+ # Skip infos of
+ # Get computer infos
+ res = self.get_computer_infos(pillaged_from_computerid)
+ for index_, res2 in enumerate(res):
+ ip, hostname = res2
+ computer_info = f"{ip} | {hostname}"
+ # pillaged_from_userid
+ if pillaged_from_userid != None:
+ res = self.get_user_infos(pillaged_from_userid)
+ for index_, pillaged_username in enumerate(res):
+ pillaged_from_userid = pillaged_username[0]
+ else:
+ pillaged_from_userid = str(pillaged_from_userid)
+
+ if index % 2 == 0:
+ data += f""""""
+ else:
+ data += f""" """
+
+ special_style = ""
+
+ ###Print block
+ for info in [name,value]:
+ data += f""" {str(info)[:48]} | """
+ for info in [expires_utc]:
+ data += f""" {(datetime(1601, 1, 1) + timedelta(microseconds=info)).strftime('%b %d %Y %H:%M:%S')} | """
+
+ # check if info contains a URL
+ if 'http:' in target or 'https:' in target:
+ info2 = target[target.index('http'):]
+ special_ref = f'''href="{info2}" target="_blank" title="{target}"'''
+ elif 'ftp:' in target:
+ info2 = target[target.index('ftp'):]
+ special_ref = f'''href="{info2}" target="_blank" title="{target}"'''
+ elif "Domain:target=" in target:
+ info2 = f'''rdp://full%20address=s:{target[target.index('Domain:target=') + len('Domain:target='):]}:3389&username=s:{username}&audiomode=i:2&disable%20themes=i:1'''
+ special_ref = f'''href="{info2}" title="{target}"'''
+ elif "LegacyGeneric:target=MicrosoftOffice1" in target:
+ target = f'''{target[target.index('LegacyGeneric:target=') + len('LegacyGeneric:target='):]}'''
+ special_ref = f'''href="https://login.microsoftonline.com/" target="_blank" title="OfficeLogin"'''
+ else:
+ special_ref = f'''title="{target}"'''
+ data += f""" {str(target)[:48]} | """
+
+ for info in [type, computer_info, pillaged_from_userid]:
+ data += f""" {str(info)[:48]} | """
+ data += """ \n"""
+
+ data += """
"""
+ self.add_to_resultpage(data)
##### List gathered files
results = self.get_file()
@@ -445,6 +529,13 @@ class reporting:
self.logging.debug(ex)
self.logging.debug(f"Export Done!")
+ def get_credz_count(self,current_type):
+ with self.conn:
+ cur = self.conn.cursor()
+ cur.execute(f"SELECT count(id) FROM credz WHERE LOWER(type)=LOWER('{current_type}')")
+ results = cur.fetchall()
+ return results
+
def get_credz(self, filterTerm=None, credz_type=None):
"""
Return credentials from the database.
@@ -543,6 +634,12 @@ class reporting:
results = cur.fetchall()
return results
+ def get_cookies(self):
+ with self.conn:
+ cur = self.conn.cursor()
+ cur.execute(f"SELECT name,value,expires_utc,target,type,pillaged_from_computerid,pillaged_from_userid FROM cookies ORDER BY pillaged_from_computerid ASC, expires_utc DESC ")
+ results = cur.fetchall()
+ return results
class database:
def __init__(self, conn,logger):
---|
|