Skip to content

Commit 7e90d80

Browse files
committed
fixed sccm
1 parent 9b74ea5 commit 7e90d80

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

nxc/protocols/smb.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,20 +1371,19 @@ def sccm(self):
13711371
self.logger.fail("No masterkeys looted")
13721372
return
13731373

1374-
self.logger.success(f"Got {highlight(len(masterkeys))} decrypted masterkeys. Looting SCCM Credentials")
1374+
self.logger.success(f"Got {highlight(len(masterkeys))} decrypted masterkeys. Looting SCCM Credentials through {self.args.sccm}")
13751375
try:
13761376
# Collect Chrome Based Browser stored secrets
1377-
sccm_triage = SCCMTriage(target=target, conn=conn, masterkeys=masterkeys)
1378-
sccm_creds = sccm_triage.triage_sccm()
1379-
for credential in sccm_creds:
1380-
if isinstance(credential, SCCMCred):
1381-
self.logger.highlight(f"[NAA Account] {credential.username.decode('latin-1')}:{credential.password.decode('latin-1')}")
1382-
elif isinstance(credential, SCCMSecret):
1383-
self.logger.highlight(f"[Task sequences secret] {credential.secret.decode('latin-1')}")
1384-
elif isinstance(credential, SCCMCollection):
1385-
self.logger.highlight(f"[Collection Variable] {credential.variable.decode('latin-1')}:{credential.value.decode('latin-1')}")
1377+
sccm_triage = SCCMTriage(target=target, conn=conn, masterkeys=masterkeys, use_wmi=self.args.sccm == "wmi")
1378+
sccmcreds, sccmtasks, sccmcollections = sccm_triage.triage_sccm()
1379+
for sccmcred in sccmcreds:
1380+
self.logger.highlight(f"[NAA Account] {sccmcred.username.decode('latin-1')}:{sccmcred.password.decode('latin-1')}")
1381+
for sccmtask in sccmtasks:
1382+
self.logger.highlight(f"[Task sequences secret] {sccmtask.secret.decode('latin-1')}")
1383+
for sccmcollection in sccmcollections:
1384+
self.logger.highlight(f"[Collection Variable] {sccmcollection.variable.decode('latin-1')}:{sccmcollection.value.decode('latin-1')}")
13861385
except Exception as e:
1387-
self.logger.debug(f"Error while looting wifi: {e}")
1386+
self.logger.debug(f"Error while looting sccm: {e}")
13881387

13891388
@requires_admin
13901389
def dpapi(self):

nxc/protocols/smb/proto_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def proto_args(parser, std_parser, module_parser):
2222
cgroup.add_argument("--lsa", action="store_true", help="dump LSA secrets from target systems")
2323
cgroup.add_argument("--ntds", choices={"vss", "drsuapi"}, nargs="?", const="drsuapi", help="dump the NTDS.dit from target DCs using the specifed method\n(default: drsuapi)")
2424
cgroup.add_argument("--dpapi", choices={"cookies", "nosystem"}, nargs="*", help='dump DPAPI secrets from target systems, can dump cookies if you add "cookies", will not dump SYSTEM dpapi if you add nosystem\n')
25-
cgroup.add_argument("--sccm", action="store_true", help="dump SCCM secrets from target systems")
25+
cgroup.add_argument("--sccm", choices={"wmi","disk"}, nargs="?", const="disk", help="dump SCCM secrets from target systems")
2626

2727
ngroup = smb_parser.add_argument_group("Credential Gathering", "Options for gathering credentials")
2828
ngroup.add_argument("--mkfile", action="store", help="DPAPI option. File with masterkeys in form of {GUID}:SHA1")

0 commit comments

Comments
 (0)