20.Privileged Access
Windows (PowerShell)
Enumerate RDP and WinRM Users:
Get-NetLocalGroupMember -ComputerName ACADEMY-EA-MS01 -GroupName "Remote Desktop Users"
Get-NetLocalGroupMember -ComputerName ACADEMY-EA-MS01 -GroupName "Remote Management Users"Establish a Secure WinRM Session:
$password = ConvertTo-SecureString "Klmcargo2" -AsPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential ("INLANEFREIGHT\forend", $password)
Enter-PSSession -ComputerName ACADEMY-EA-MS01 -Credential $credExit-PSSessionPowerUpSQL for SQL Server Enumeration:
cd .\PowerUpSQL\ # Navigate to PowerUpSQL directory
Import-Module .\PowerUpSQL.ps1 # Import PowerUpSQL module
Get-SQLInstanceDomain # Enumerate SQL instancesExecute SQL Query:
Linux-Based Enumeration
Install and Use Evil-WinRM:
MSSQLClient for SQL Enumeration:
BloodHound (Cypher Queries)
Find WinRM Access:
Find SQL Admin Access:
Best Practices & Mitigations
Last updated