跳到正文
Skillpedia
部署与云(DevOps)35k · #7674

operating-havoc-c2

它能做什么

这个工具可以帮助搭建名为 Havoc 的命令与控制(C2)服务器。它可以生成代理程序(即恶意程序的一种),由于采用了高级规避技术,这些代理程序很难被安全软件检测到。此工具可用于已获得授权的系统安全测试。

适用场景

  • ✓在需要高级 C2 系统的已授权红队安全测试中使用。
  • ✓用于模拟真实攻击者如何使用 Havoc 等工具。
  • ✓用于检查安全软件能否检测到试图隐藏自身的代理程序。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/operating-havoc-c2/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/operating-havoc-c2/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“搭建一个 Havoc C2 服务器,并使用一个配置文件,启用 sleep obfuscation 和 indirect syscalls,以生成具有规避能力的 Demon 代理程序。”

每周 5 个新技能,1 分钟读完。

工作原理

你需要编写一个配置文件(profile),定义服务器和代理程序的工作方式。然后启动服务器,并使用图形化的客户端程序创建代理程序,并向其发送命令。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Operating Havoc C2

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.

Overview

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.

When to Use

  • When an authorized red-team engagement calls for an evasive, GUI-driven C2
  • When emulating an adversary that uses Havoc/Demon (per threat intelligence) in a purple-team exercise
  • When validating EDR detection of indirect syscalls, sleep obfuscation, and stack spoofing
  • When demonstrating post-exploitation impact and lateral movement for a report

Prerequisites

  • A dedicated Linux host (Debian/Ubuntu/Kali) for the team server
  • Go 1.18+ for the team server; Python 3.10 and Qt5 libraries for the client
  • mingw-w64 and nasm for cross-compiling the Demon for Windows targets
  • Signed authorization / rules of engagement

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

Objectives

  • Author a Yaotl profile defining team server, operators, and a listener
  • Launch the Havoc team server and connect with the client
  • Create an HTTP(S) listener
  • Generate an evasive Demon agent (EXE / shellcode) with sleep obfuscation
  • Interact with the Demon and run post-exploitation commands
  • Execute .NET assemblies and BOFs in-memory
  • Pivot through the beachhead via SOCKS and port forwarding

MITRE ATT&CK Mapping

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)

Workflow

Step 1: Write a Yaotl profile

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

…
常见问题

什么是 C2 服务器?

它是由你控制的服务器,用来向已安装在其他计算机上的代理程序发送命令。你可以把它理解为一个指挥中心。

“具有规避能力的代理程序”是什么意思?

意思是这个代理程序经过设计,让杀毒或安全软件很难检测到它,它会利用一些技术来伪装自己。

“indirect syscalls”和“sleep obfuscation”是什么?

这是代理程序用来隐藏在计算机内存中、避免被检测到的高级技术。“indirect syscalls”以一种伪装的方式发起系统调用,“sleep obfuscation”则会在代理程序处于“休眠”状态时打乱它的代码。

详情

作者的原始描述

Deploy a Havoc C2 team server with Yaotl malleable profiles, generate evasive Demon agents using indirect syscalls and sleep obfuscation, and run post-exploitation and pivoting operations. Use during authorized, rules-of-engagement-bound red-team engagements for adversary emulation requiring a full C2 lifecycle (server setup, evasive implant generation, tasking, and lateral pivoting).

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#7674
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能