Skip to content

Commit bac7a34

Browse files
committed
Removing disabled account checks, these are already filtered by the ldap query
1 parent 573eb60 commit bac7a34

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

nxc/protocols/ldap.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,17 +1179,11 @@ def printTable(items, header):
11791179
rbcdRights.append(str(rbcd.get("sAMAccountName")))
11801180
rbcdObjType.append(str(rbcd.get("objectCategory")))
11811181

1182-
if int(userAccountControl) & UF_ACCOUNTDISABLE:
1183-
self.logger.debug(f"Bypassing disabled account {sAMAccountName}")
1184-
else:
1185-
for rights, objType in zip(rbcdRights, rbcdObjType):
1186-
answers.append([rights, objType, "Resource-Based Constrained", sAMAccountName])
1182+
for rights, objType in zip(rbcdRights, rbcdObjType):
1183+
answers.append([rights, objType, "Resource-Based Constrained", sAMAccountName])
11871184

11881185
if delegation in ["Unconstrained", "Constrained", "Constrained w/ Protocol Transition"]:
1189-
if int(userAccountControl) & UF_ACCOUNTDISABLE:
1190-
self.logger.debug(f"Bypassing disabled account {sAMAccountName}")
1191-
else:
1192-
answers.append([sAMAccountName, objectType, delegation, rightsTo])
1186+
answers.append([sAMAccountName, objectType, delegation, rightsTo])
11931187

11941188
except Exception as e:
11951189
self.logger.error(f"Skipping item, cannot process due to error {e}")

nxc/protocols/ldap/proto_args.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def proto_args(parser, parents):
1717

1818
vgroup = ldap_parser.add_argument_group("Retrieve useful information on the domain", "Options to to play with Kerberos")
1919
vgroup.add_argument("--query", nargs=2, help="Query LDAP with a custom filter and attributes")
20-
vgroup.add_argument("--find-delegation", action="store_true", help="Finds delegation relationships within an Active Directory domain.")
20+
vgroup.add_argument("--find-delegation", action="store_true", help="Finds delegation relationships within an Active Directory domain. (Enabled Accounts only)")
2121
vgroup.add_argument("--trusted-for-delegation", action="store_true", help="Get the list of users and computers with flag TRUSTED_FOR_DELEGATION")
2222
vgroup.add_argument("--password-not-required", action="store_true", help="Get the list of users with flag PASSWD_NOTREQD")
2323
vgroup.add_argument("--admin-count", action="store_true", help="Get objets that had the value adminCount=1")

0 commit comments

Comments
 (0)