diff --git a/donpapi/entry.py b/donpapi/entry.py index ec2624b..ff876ae 100644 --- a/donpapi/entry.py +++ b/donpapi/entry.py @@ -38,7 +38,7 @@ BANNER = """ , , LeHack Release! \U0001F480 ( - . by Touf & Zblurx @ Login-Securite + . by Touf & Zblurx @ Login Sécurité &&&&&& &&&&&%%%. &&&&&& &&&&%%% &&&& &&&&&& &&&&&& &&&&&. diff --git a/donpapi/lib/certificates.py b/donpapi/lib/certificates.py index 39bee8f..c9fbaa6 100644 --- a/donpapi/lib/certificates.py +++ b/donpapi/lib/certificates.py @@ -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 = []