Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add verbosity to dpapi, so the user knows if no secrets were found #246

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions nxc/protocols/smb.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ def enum_host_info(self):
except Exception as e:
self.logger.debug(f"Error logging off system: {e}")


def print_host_info(self):
signing = colored(f"signing:{self.signing}", host_info_colors[0], attrs=["bold"]) if self.signing else colored(f"signing:{self.signing}", host_info_colors[1], attrs=["bold"])
smbv1 = colored(f"SMBv1:{self.smbv1}", host_info_colors[2], attrs=["bold"]) if self.smbv1 else colored(f"SMBv1:{self.smbv1}", host_info_colors[3], attrs=["bold"])
Expand Down Expand Up @@ -1010,7 +1009,6 @@ def groups(self):
def users(self):
if len(self.args.users) > 0:
self.logger.debug(f"Dumping users: {', '.join(self.args.users)}")

return UserSamrDump(self).dump(self.args.users)

def hosts(self):
Expand Down Expand Up @@ -1491,12 +1489,14 @@ def dpapi(self):
credential.url,
)

if dump_cookies:
if dump_cookies and cookies:
self.logger.display("Start Dumping Cookies")
for cookie in cookies:
if cookie.cookie_value != "":
self.logger.highlight(f"[{credential.winuser}][{cookie.browser.upper()}] {cookie.host}{cookie.path} - {cookie.cookie_name}:{cookie.cookie_value}")
self.logger.display("End Dumping Cookies")
elif dump_cookies:
self.logger.fail("No cookies found")

vaults = []
try:
Expand Down Expand Up @@ -1537,6 +1537,9 @@ def dpapi(self):
credential.url,
)

if not (credentials and system_credentials and browser_credentials and cookies and vaults and firefox_credentials):
self.logger.fail("No secrets found")

@requires_admin
def lsa(self):
try:
Expand Down
Loading