diff --git a/cme/data/cme.conf b/cme/data/cme.conf index 1b01b37e..dde8c7e9 100755 --- a/cme/data/cme.conf +++ b/cme/data/cme.conf @@ -2,6 +2,7 @@ workspace = default last_used_db = smb pwn3d_label = Pwn3d! +audit_mode = * [BloodHound] bh_enabled = False diff --git a/cme/protocols/ldap.py b/cme/protocols/ldap.py index f5f3b653..3d4c1890 100644 --- a/cme/protocols/ldap.py +++ b/cme/protocols/ldap.py @@ -237,7 +237,7 @@ class ldap(connection): # Connect to LDAP out = u'{}{}:{} {}'.format('{}\\'.format(domain), username, - password, + password if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8, highlight('({})'.format(self.config.get('CME', 'pwn3d_label')) if self.admin_privs else '')) self.logger.extra['protocol'] = "LDAP" self.logger.extra['port'] = "389" @@ -327,7 +327,7 @@ class ldap(connection): self.check_if_admin() out = u'{}{}:{} {}'.format('{}\\'.format(domain), username, - nthash, + nthash if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8, highlight('({})'.format(self.config.get('CME', 'pwn3d_label')) if self.admin_privs else '')) self.logger.extra['protocol'] = "LDAP" self.logger.extra['port'] = "389" diff --git a/cme/protocols/mssql.py b/cme/protocols/mssql.py index e01a3b02..1764089e 100755 --- a/cme/protocols/mssql.py +++ b/cme/protocols/mssql.py @@ -175,7 +175,7 @@ class mssql(connection): out = u'{}{}:{} {}'.format('{}\\'.format(domain) if not self.args.local_auth else '', username, - password, + password if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8, highlight('({})'.format(self.config.get('CME', 'pwn3d_label')) if self.admin_privs else '')) self.logger.success(out) if not self.args.local_auth: @@ -222,7 +222,7 @@ class mssql(connection): out = u'{}\\{} {} {}'.format(domain, username, - ntlm_hash, + ntlm_hash if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8, highlight('({})'.format(self.config.get('CME', 'pwn3d_label')) if self.admin_privs else '')) self.logger.success(out) if not self.args.local_auth: diff --git a/cme/protocols/smb.py b/cme/protocols/smb.py index f75a2e37..36dd8332 100755 --- a/cme/protocols/smb.py +++ b/cme/protocols/smb.py @@ -359,7 +359,7 @@ class smb(connection): out = u'{}\\{}:{} {}'.format(domain, self.username, - self.password, + self.password if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8, highlight('({})'.format(self.config.get('CME', 'pwn3d_label')) if self.admin_privs else '')) self.logger.success(out) @@ -420,7 +420,7 @@ class smb(connection): out = u'{}\\{}:{} {}'.format(domain, self.username, - ntlm_hash, + ntlm_hash if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8, highlight('({})'.format(self.config.get('CME', 'pwn3d_label')) if self.admin_privs else '')) self.logger.success(out) diff --git a/cme/protocols/ssh.py b/cme/protocols/ssh.py index 4c896b7a..23fd5d52 100644 --- a/cme/protocols/ssh.py +++ b/cme/protocols/ssh.py @@ -70,7 +70,7 @@ class ssh(connection): self.check_if_admin() self.logger.success(u'{}:{} {}'.format(username, - password, + password if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8, highlight('({})'.format(self.config.get('CME', 'pwn3d_label')) if self.admin_privs else ''))) if not self.args.continue_on_success: return True diff --git a/cme/protocols/winrm.py b/cme/protocols/winrm.py index 8bc52a72..e3ad5614 100644 --- a/cme/protocols/winrm.py +++ b/cme/protocols/winrm.py @@ -150,7 +150,7 @@ class winrm(connection): self.admin_privs = True self.logger.success(u'{}\\{}:{} {}'.format(self.domain, username, - password, + password if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8, highlight('({})'.format(self.config.get('CME', 'pwn3d_label')) if self.admin_privs else ''))) if not self.args.local_auth: add_user_bh(self.username, self.domain, self.logger, self.config) @@ -199,7 +199,7 @@ class winrm(connection): self.admin_privs = True self.logger.success(u'{}\\{}:{} {}'.format(self.domain, username, - self.hash, + self.hash if not self.config.get('CME', 'audit_mode') else self.config.get('CME', 'audit_mode')*8, highlight('({})'.format(self.config.get('CME', 'pwn3d_label')) if self.admin_privs else ''))) if not self.args.local_auth: add_user_bh(self.username, self.domain, self.logger, self.config)