From 5e282156bb43e638b37015b80c5eadd63342ad9c Mon Sep 17 00:00:00 2001 From: mpgn Date: Thu, 19 Oct 2023 15:30:00 -0400 Subject: [PATCH] Fix ldap query over 1000 results --- nxc/modules/pso.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nxc/modules/pso.py b/nxc/modules/pso.py index 1218c3eb..a7e18199 100644 --- a/nxc/modules/pso.py +++ b/nxc/modules/pso.py @@ -43,7 +43,7 @@ class NXCModule: context.log.success("Attempting to enumerate objects with an applied policy...") # Who do they apply to? - resp=connection.ldapConnection.search(searchBase=base_creator(self.__domain), searchFilter="(objectclass=*)",attributes=["DistinguishedName","msDS-PSOApplied"]) + resp=connection.search(searchFilter="(objectclass=*)",attributes=["DistinguishedName","msDS-PSOApplied"]) for i in resp: if isinstance(i, ldapasn1_impacket.SearchResultEntry) is not True: continue @@ -65,7 +65,7 @@ class NXCModule: # Let"s find out even more details! context.log.success("Attempting to enumerate details...\n") - resp=connection.ldapConnection.search(searchBase=base_creator(self.__domain), searchFilter="(objectclass=msDS-PasswordSettings)", + resp=connection.search(searchFilter="(objectclass=msDS-PasswordSettings)", attributes=["name", "msds-lockoutthreshold", "msds-psoappliesto", "msds-minimumpasswordlength", "msds-passwordhistorylength", "msds-lockoutobservationwindow", "msds-lockoutduration", "msds-passwordsettingsprecedence", "msds-passwordcomplexityenabled", "Description",