Just Enough Administration (JEA)
> Windows Server 2016 ; need WinRM enabled on the endpoint to accept user connections ; is enforced by PowerShell and not Active Directory ; dependent on PS-Remoting
Pre-requiste:
1. performed lateral movement & gained access to multiple systems & users
(2. obtained password/hash to rdp)Enumeration
#see PS history file path & view command history
(Get-PSReadlineOption).HistorySavePath
type C:\Users\mary\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt
#replicate remote access command that found in history file
Enter-PSSession -ComputerName files02 -ConfigurationName j_fs02##in remote session @ new powershell window##
#enum in remote session
whoami
[System.Security.Principal.WindowsIdentity]::GetCurrent().Name
$ExecutionContext.SessionState.LanguageMode
#seek for non-default command, e.g. Copy-Item
Get-Command
#the commands available to us will be executed with administrative privileges on the machineAbuse available non-default command
Abusing FileZilla
Last updated