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

Commit

Permalink
Merge pull request #590 from lesydimitri/nanodump
Browse files Browse the repository at this point in the history
Add nanodump results to cmedb
  • Loading branch information
mpgn committed Jun 26, 2022
2 parents 603f904 + e7dda67 commit 31e7881
Showing 1 changed file with 9 additions and 2 deletions.
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

0 comments on commit 31e7881

Please sign in to comment.