@@ -45,13 +45,13 @@ def enumerate_admin_users(self, context, connection):
4545 rpctransport = transport .DCERPCTransportFactory (string_binding )
4646 rpctransport .setRemoteHost (connection .kdcHost )
4747 rpctransport .set_credentials (
48- connection .username ,
49- connection .password ,
50- connection .domain ,
51- connection .lmhash ,
52- connection .nthash ,
53- aesKey = connection .aesKey ,
54- )
48+ connection .username ,
49+ connection .password ,
50+ connection .domain ,
51+ connection .lmhash ,
52+ connection .nthash ,
53+ aesKey = connection .aesKey ,
54+ )
5555
5656 dce = rpctransport .get_dce_rpc ()
5757 dce .set_auth_level (RPC_C_AUTHN_LEVEL_PKT_PRIVACY )
@@ -71,9 +71,9 @@ def enumerate_admin_users(self, context, connection):
7171 return []
7272
7373 admin_rids = {
74- "Domain Admins" : 512 ,
75- "Enterprise Admins" : 519 ,
76- }
74+ "Domain Admins" : 512 ,
75+ "Enterprise Admins" : 519 ,
76+ }
7777
7878 # Enumerate admin groups and their members
7979 for group_name , group_rid in admin_rids .items ():
@@ -131,14 +131,14 @@ def check_users_directory(self, context, connection, admin_users):
131131 for user in admin_users :
132132 # Look for administrator.domain to check if SID 500 Administrator is present (second check)
133133 if user ["username" ].lower () in dirs_found or \
134- (user ["username" ].lower () == "administrator" and f"{ user ['username' ].lower ()} .{ user ['domain' ]} " in dirs_found ):
134+ (user ["username" ].lower () == "administrator" and f"{ user ['username' ].lower ()} .{ user ['domain' ]} " in dirs_found ):
135135 user ["in_directory" ] = True
136136 context .log .info (f"Found user { user ['username' ]} in directories" )
137137
138138 def check_tasklist (self , context , connection , admin_users ):
139139 """Checks tasklist over rpc."""
140140 try :
141- with TSTS .LegacyAPI (connection .conn , connection .host , kerberos = False ) as legacy :
141+ with TSTS .LegacyAPI (connection .conn , connection .host , kerberos = connection . kerberos ) as legacy :
142142 handle = legacy .hRpcWinStationOpenServer ()
143143 processes = legacy .hRpcWinStationGetAllProcesses (handle )
144144 except Exception as e :
0 commit comments