Summery

Because of a growing list of possible ways to access another host, I decided to create this note to most known ways to achieve RCE and what requirements have to be usually met.

Cheatsheet

ToolsRequired PrivilegesMethodsOSResources
ssh
CredentialsSSHLinux / WindowsSSH, ssh
ateexec.py
AdministratorSMB + ATSVC / Task Scheduler RPCLinuxateexec.py
smbexec.py
AdministratorSMB + Service Control Manager (SCMR)Linuxsmbexec.py
psexec.py
AdministratorSMB + Service Control Manager + uploaded service binaryLinuxpsexec.py
PsExec.exe
AdministratorSMB + Service Control ManagerWindowsSysInternals
wmiexec.py
AdministratorSMB + RPC/DCOM + WMILinuxwmiexec.py
evil-winrm
CredentialsWinRM / WS-ManagementLinuxevil-winrm
Enter-PSSession
CredentialsWinRM / WS-Management + PowerShell RemotingWindowsEnter-PSSession
xfreerdp
CredentialsRDPLinuxFile transfer, xfreerdp
rdesktop
CredentialsRDPLinuxFile transfer, rdesktop
mssqlclient.py
CredentialsTDS / MSSQLLinuxImpacket, impacket-mssqlclient
xp_cmdshell
SQL specificMSSQLLinux / WindowsMSSQL
dcomexec.py
CredentialsSMB/RPC + DCOMLinuxdcomexec.py
reverse shells
ExecutionOutbound TCP/HTTP/etc. connectionLinux / WindowsShells
web shellsExecutionHTTP/HTTPS + correct server-side interpreterLinux / WindowsShells
Mentioned permissions are a mental shortcut, to learn about the exect, required privileges, refer to the corresponding notes.