Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a8ae4c8
feat: Add Kerberos user enumeration and validation
n3rada Nov 4, 2025
7cf4e76
feat: Add progress bar for Kerberos user enumeration
n3rada Nov 4, 2025
be9cbd2
feat: Implement threaded enumeration for Kerberos username checks
n3rada Nov 4, 2025
d2c2e3a
feat: Update threaded_enumeration to allow dynamic max_workers from i…
n3rada Nov 4, 2025
3ab1c7b
feat: Implement Kerberos protocol with user enumeration and database …
n3rada Nov 5, 2025
bf02ad4
refactor: Remove user checking and enumeration methods from ldap class
n3rada Nov 5, 2025
7d9733a
refactor: Remove performance tuning options from Kerberos argument pa…
n3rada Nov 5, 2025
6febdc3
refactor: Clean up imports and simplify datetime handling in Kerberos…
n3rada Nov 5, 2025
58a635f
feat: Use random nonce for Kerberos AS-REQ to enhance security
n3rada Nov 5, 2025
fdb6420
refactor: Simplify docstring in database module for clarity
n3rada Nov 5, 2025
87b4a44
refactor: Clean up code formatting and improve consistency in Kerbero…
n3rada Nov 5, 2025
a799677
feat: Add Kerberos command examples to e2e_commands.txt
n3rada Nov 5, 2025
75f21fd
refactor: Simplify connection object creation and user existence chec…
n3rada Nov 5, 2025
1720dc7
feat: Enhance database module for Kerberos protocol
n3rada Nov 5, 2025
6e8a5d1
feat: Add users export option to Kerberos user enumeration
n3rada Nov 5, 2025
3a51498
refactor: Remove unused check_user_exists method from KerberosAttacks…
n3rada Nov 5, 2025
785b3ee
Remove user existence check in Kerberos function
n3rada Nov 5, 2025
ea46524
Add local library import for nxc_logger
n3rada Nov 5, 2025
f7dcd5f
Add built-in imports section to kerberos.py
n3rada Nov 5, 2025
3a7c9be
refactor: Remove Kerberos protocol files
n3rada Nov 9, 2025
bfa88ac
refactor: Remove kerberos.py implementation and related imports
n3rada Nov 9, 2025
694e247
refactor: Add Kerberos user enumeration inside `smb` protocol
n3rada Nov 9, 2025
d96c6cd
refactor: Remove Kerberos command examples from e2e_commands.txt
n3rada Nov 9, 2025
5add541
refactor Kerberos user AS-REQ check
n3rada Nov 9, 2025
2026587
refactor: Remove threaded_enumeration decorator and related imports
n3rada Nov 9, 2025
bcf1ab5
fix `ruff` checking warnings
n3rada Nov 9, 2025
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
17 changes: 16 additions & 1 deletion nxc/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,11 @@ def parse_credentials(self):
username.append(username_single.strip())
owned.append(False)
else:
if "\\" in user:
# Check if user looks like a file path but doesn't exist
if ("/" in user or "\\" in user) and not isfile(user):
self.logger.warning(f"File not found: {user} - treating as username")

if "\\" in user and len(user.split("\\")) == 2:
domain_single, username_single = user.split("\\")
else:
domain_single = self.args.domain if hasattr(self.args, "domain") and self.args.domain is not None else self.domain
Expand All @@ -423,6 +427,10 @@ def parse_credentials(self):
self.logger.error("You can ignore non UTF-8 characters with the option '--ignore-pw-decoding'")
sys.exit(1)
else:
# Check if password looks like a file path but doesn't exist
if ("/" in password or "\\" in password) and not isfile(password):
self.logger.warning(f"File not found: {password} - treating as password")

secret.append(password)
cred_type.append("plaintext")

Expand Down Expand Up @@ -571,6 +579,13 @@ def login(self):
if not (username[0] or secret[0] or domain[0]):
return False

# If no secrets provided, add None to allow authentication attempts (useful for user enumeration)
if len(secret) == 0 and len(username) > 0:
self.logger.debug("No secrets provided, adding None to allow authentication attempts")
secret = [None]
cred_type = ["plaintext"]
data = [None]

if not self.args.no_bruteforce:
for secr_index, secr in enumerate(secret):
for user_index, user in enumerate(username):
Expand Down
Loading