Revenant: A Modern, Full-Stack Reverse Shell C2 Framework — From Payload Generation to Victim…
Revenant 是一个基于 C++ 的轻量级框架,通过 HTTP 实现高效的命令与控制(C2)基础设施。它利用 HTTP GET/POST 请求建立可靠命令通道,并支持多设备跨平台操作。框架内置 Cloudflared 隧道集成、加密传输和日志记录功能,隐蔽性强且高效灵活。 2025-8-4 04:48:36 Author: infosecwriteups.com(查看原文) 阅读量:30 收藏

Hack-Bat

Zoom image will be displayed

A proof-of-concept that turns plain HTTP into a full-fledged C2 infrastructure, built entirely in C++.

Revenant is a powerful demonstration of how even a simple HTTP request-response cycle can be adapted to create a stealthy, remote reverse shell infrastructure. This C++-based Command and Control (C2) framework is lightweight, fast, very easy to use, and incredibly flexible — designed to operate across platforms and networks.

  • Reverse Shell over HTTP
    Leverages HTTP GET/POST for a reliable command channel between victim and server.
  • Cloudflared Tunnel Integration
    Automatically spins up a public tunnel for attacker server access — no port forwarding needed.
  • Fully in C++
    No Python, no external frameworks. Raw, compiled performance.
  • Multi-Victim Management
    Track and control multiple client sessions independently.
  • Command Logging
    Every shell session and command output is logged — command, result, status, and timestamp.
  • Location Agnostic
    Revenant works regardless of where the victim device is located — even if it’s behind firewalls or NAT. This is made possible by using a public Cloudflared tunnel, allowing remote access from anywhere in the world.
  • Encrypted Transport Ready
    The framework can communicate over secure HTTPS connections using tunneling. This makes the traffic blend in with regular web traffic, reducing the chance of detection.
  • Smart Client Mapping
    Each victim is identified by their device name. This allows the C2 server to manage multiple victims efficiently.
  • Persistent Logging
    Revenant logs every command executed on each victim. These logs include the command, its result, whether it succeeded or failed, and the exact timestamp — making it easy to track activity.
  • Threaded Shell
    Each shell session runs in its own C++ thread. This means you can interact with multiple victims simultaneously without blocking or slowing down the main server.

The C2 server creates a Cloudflared tunnel on either a random port or a user-specified one. It then generates payloads targeting:

  • Windows systems
  • Linux systems

Each payload is embedded with the public tunnel URL, allowing it to control the victim device from anywhere — even behind firewalls or NAT.

Here’s the basic logic of each generated payload:

  1. Initiates a loop to send regular HTTP requests to the attacker server.
  2. Waits for response — if a command is sent back, the payload:
  • Executes it on the victim device.
  • Sends the command output back to the server in a POST request.

If no command is sent, the victim simply retries after a short interval.

This simple loop creates a persistent reverse shell, cloaked inside standard HTTP. Revenant supports concurrent sessions with multiple victims. Each victim is uniquely identified using their device name

Zoom image will be displayed

This interaction looks just like a regular web client talking to a server — making it hard to detect.

To launch the server:

./revenant_server -p 8080

To generate payloads:

generate os=linux
generate os=windows

Once deployed on victim systems, they connect back and await instructions.

Revenant is a minimalist, efficient, and stealthy reverse shell C2 framework. It shows how with just HTTP, C++, and some creativity — you can build a flexible infrastructure for red team simulations, malware analysis labs, or controlled testing.

You can find the full source code and documentation here:
🔗 https://github.com/dharineeshj/Revenant

This project is strictly for educational and research purposes only.
Unauthorized use of this tool to access systems without explicit permission is illegal.
The author does not condone or take responsibility for any misuse.


文章来源: https://infosecwriteups.com/revenant-a-modern-full-stack-reverse-shell-c2-framework-from-payload-generation-to-victim-c73167670619?source=rss----7b722bfd1b8d---4
如有侵权请联系:admin#unsafe.sh