Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Add nanodump results to cmedb #590

Merged
merged 3 commits into from
Jun 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions cme/modules/nanodump.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,15 @@ def on_admin_login(self, context, connection):
if NThash is not None:
NThash = NThash.hex()
if username and (password or NThash) and "$" not in username:
print_pass = password if password else NThash
context.log.highlight(domain + "\\" + username + ":" + print_pass)
if password:
credtype = "password"
credential = password
else:
credtype = "hash"
credential = NThash
context.log.highlight(domain + "\\" + username + ":" + credential)
hostid = context.db.get_computers(connection.host)[0][0]
context.db.add_credential(credtype, connection.domain, username, credential, pillaged_from=hostid)
if "." not in domain and domain.upper() in connection.domain.upper():
domain = connection.domain
credz_bh.append({'username': username.upper(), 'domain': domain.upper()})
Expand Down