Outdated
This note is no longer useful due to a Cobalt Strike version update.
Normally, hosted files on Cobalt Strike do not persist when team server restarts, which may present a problem for persistence methods that depend on scripted web delivery, hosted files, etc. To alleviate this annoyance, we can set up a headless Cobalt Strike client to execute an aggressor script on launch, which will host payloads and files as defined.
To start a headless client, use the format agscript [host] [port] [user] [password] [/path/to/aggressor/script.cna]
.
Sample aggressor script:
We can start this aggressor script with the following:
To make it start with the teamserver service, add this to teamserver.service
file (see Cobalt Strike team server as systemd service):