@@ -19,7 +19,7 @@ def __init__(self, args, db, host):
1919 self .protocol = "SSH"
2020 self .remote_version = "Unknown SSH Version"
2121 self .server_os_platform = "Linux"
22- self .user_principal = "root "
22+ self .uac = ""
2323 super ().__init__ (args , db , host )
2424
2525 def proto_flow (self ):
@@ -240,15 +240,11 @@ def plaintext_login(self, username, password, private_key=""):
240240 _ , stdout , _ = self .conn .exec_command ("whoami /priv" )
241241 stdout = stdout .read ().decode (self .args .codec , errors = "ignore" )
242242 self .server_os_platform = "Windows"
243- self .user_principal = "admin"
244243 if "SeDebugPrivilege" in stdout :
245244 self .admin_privs = True
246245 elif "SeUndockPrivilege" in stdout :
247246 self .admin_privs = True
248- self .user_principal = "admin (UAC)"
249- else :
250- # non admin (low priv)
251- self .user_principal = "admin (low priv)"
247+ self .uac = "with UAC - "
252248
253249 if not stdout :
254250 self .logger .debug (f"User: { self .username } can't get a basic shell" )
@@ -266,22 +262,12 @@ def plaintext_login(self, username, password, private_key=""):
266262 if self .args .key_file :
267263 self .db .add_admin_user ("key" , username , password , host_id = host_id , cred_id = cred_id )
268264 else :
269- self .db .add_admin_user (
270- "plaintext" ,
271- username ,
272- password ,
273- host_id = host_id ,
274- cred_id = cred_id ,
275- )
265+ self .db .add_admin_user ("plaintext" , username , password , host_id = host_id , cred_id = cred_id )
276266
277267 if self .args .key_file :
278268 password = f"{ process_secret (password )} (keyfile: { self .args .key_file } )"
279269
280- display_shell_access = "{} {} {}" .format (
281- f"({ self .user_principal } )" if self .admin_privs else f"(non { self .user_principal } )" ,
282- self .server_os_platform ,
283- "- Shell access!" if shell_access else ""
284- )
270+ display_shell_access = f"{ self .uac } { self .server_os_platform } { ' - Shell access!' if shell_access else '' } "
285271 self .logger .success (f"{ username } :{ process_secret (password )} { self .mark_pwned ()} { highlight (display_shell_access )} " )
286272
287273 return True
0 commit comments