Skip to content

Commit 9b4116c

Browse files
authored
Merge pull request #2 from blacklanternsecurity/faster-share-enum
Faster SMB Share Enumeration
2 parents 9c1ed94 + ad95a5a commit 9b4116c

6 files changed

Lines changed: 327 additions & 136 deletions

File tree

nxc/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
ignore_opsec = nxc_config.getboolean("nxc", "ignore_opsec", fallback=False)
3636
host_info_colors = literal_eval(nxc_config.get("nxc", "host_info_colors", fallback=["green", "red", "yellow", "cyan"]))
3737

38+
# Read stealth_label from user config first, then default config
39+
stealth_label = nxc_config.get("nxc", "stealth_label").strip("'\"") if nxc_config.has_option("nxc", "stealth_label") else nxc_default_config.get("nxc", "stealth_label", fallback="C$ Access!").strip("'\"")
3840

3941
if len(host_info_colors) != 4:
4042
nxc_logger.error("Config option host_info_colors must have 4 values! Using default values.")

nxc/connection.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from socket import AF_UNSPEC, SOCK_DGRAM, IPPROTO_IP, AI_CANONNAME, getaddrinfo
1212

1313
from nxc.config import pwned_label
14+
from nxc.config import stealth_label
1415
from nxc.helpers.logger import highlight
1516
from nxc.loaders.moduleloader import ModuleLoader
1617
from nxc.logger import nxc_logger, NXCAdapter
@@ -576,6 +577,9 @@ def login(self):
576577
def mark_pwned(self):
577578
return highlight(f"({pwned_label})" if self.admin_privs else "")
578579

580+
def mark_stealth(self):
581+
return highlight(f"({stealth_label})" if self.admin_privs else "")
582+
579583
def load_modules(self):
580584
self.logger.info(f"Loading modules for target: {self.host}")
581585
loader = ModuleLoader(self.args, self.db, self.logger)

nxc/data/nxc.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
workspace = default
33
last_used_db = smb
44
pwn3d_label = Pwn3d!
5+
stealth_label = C$!
56
audit_mode =
67
reveal_chars_of_pwd = 0
78
log_mode = False

0 commit comments

Comments
 (0)