Aggressor Scripts
The ".cna" files that we load into the Cobalt Strike Script Manager are called Aggressor Scripts. These can override default behaviours in Cobalt Strike to customise the UI (add new menus, commands, etc), extended the data models.
The Aggressor script reference is public and available at helpsystems.com. The underlying programming language used is called Sleep (http://sleep.dashnine.org/manual/index.html).
Aggressor can be used to register new techniques under jump and remote-exec using beacon_remote_exploit_register (https://hstechdocs.helpsystems.com/manuals/cobaltstrike/current/userguide/content/topics_aggressor-scripts/as-resources_functions.htm#beacon_remote_exploit_register) and beacon_remote_exec_method_register (https://hstechdocs.helpsystems.com/manuals/cobaltstrike/current/userguide/content/topics_aggressor-scripts/as-resources_functions.htm#beacon_remote_exec_method_register) respectively.
Example to integrate integrate Invoke-DCOM.ps1 into jump:
local defines variables that are local to the current function, so they will disappear once executed. Sleep can have global, closure-specific and local scopes.
$1 is the Beacon ID.
$2 is the target to jump to.
$3 is the selected listener.
The $script variable holds the raw content of Invoke-DCOM.ps1 (If you want to see the content of these variables, you can use println($oneliner); and they'll appear in the Script Console (Cobalt Strike > Script Console).)
$+ concatenates an interpolated string and requires additional whitespaces on each end.
Last updated