Privileged Access
Remote Desktop
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.
Enumerating the Remote Desktop Users Group
Get-NetLocalGroupMember -ComputerName <computer name> -GroupName "Remote Desktop Users"PS C:\htb> Get-NetLocalGroupMember -ComputerName ACADEMY-EA-MS01 -GroupName "Remote Desktop Users"
ComputerName : ACADEMY-EA-MS01
GroupName : Remote Desktop Users
MemberName : INLANEFREIGHT\Domain Users
SID : S-1-5-21-3842939050-3880317879-2865463114-513
IsGroup : True
IsDomain : UNKNOWNVớ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.


Establishing WinRM Session from Windows
Establishing WinRM Session from Linux
Sử dụng evil-winrm để connect trên linux
SQL Server Admin
Sử dụng BloodHound để tìm loại access thông qua SQLAdmin edge. Ta có thể check được SQL Admin Rights trong tab Node Info .

Attacker có thể sử dụng quyền ACL của mình để authenticate với user A, thay đổi password cho user B và authenticate mục tiêu bằng PowerUpSQL
Enumerate MSSQL Instances
Sau đó, ta có thể authenticate remote SQL server và run các queries hoặc system commands.
Với linux sử dụng mssqlclient.py trong Impacket.
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.
Last updated