Framework
S3N4T0R-0X0/BEAR-C2 avatar
S3N4T0R-0X0/BEAR-C2

BEAR-C2 turns adversary emulation into a configuration exercise

BEAR-C2 is an adversary simulation and emulation framework built around real-world TTPs inspired by Russian, Chinese, North Korean, and Iranian APT groups.

709 stars148 forksPythonNOASSERTION

At a glance

What is it?
BEAR-C2 is a Python adversary simulation and emulation framework where a listener configuration, not a bespoke script, decides how a beacon talks to a C2 server. It is aimed at red and purple team operators who need repeatable intrusion scenarios, and its choice of legitimate cloud services for exfiltration makes it as much a detection test as an intrusion tool.
Who is it for?
BEAR-C2 suits a red or purple team that has to run the same intrusion technique many times over with different encryption and exfiltration combinations, because the listener table turns each of those variations into a configuration change rather than a new script, and the payload generator produces a matching beacon from that configuration.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The problem it names: one C2 script per scenario

The README describes the challenge of adversary simulation directly. Accurately replicating APT techniques requires a flexible environment capable of mimicking connection protocols, encryption methods, exfiltration techniques, and C2 channels and profiles used in modern intrusions, and achieving this level of precision has always been a challenge. The operational consequence is stated next. Every time an operator needs to test a specific encryption scheme with a particular exfiltration profile, a separate C2 script must be built to match the attack scenario, so one simulation might require AES encryption with OneDrive exfiltration while another needs a different encryption method combined with Dropbox exfiltration, to reflect techniques observed in real attacks. That lack of flexibility makes the process inefficient and time consuming. BEAR-C2 was developed to provide adversary simulation with full customization through the new listener, allowing configuration of connection protocols, encryption, exfiltration and automated loading techniques. The project positions itself as an adversary simulation and emulation framework built around real world TTPs inspired by Russian, Chinese, North Korean and Iranian APT groups, and it draws on related simulation research in the author's APT Attack Simulation Repository. The audience is an operator running engagements or detection exercises, not a general developer.

The listener is the unit of configuration, and the table is the control room

The architecture puts a listener at the centre, and everything else follows from it. The Listeners Table provides a centralized overview of all active and configured C2 listeners, showing the listener name, address, network protocol, encryption method, exfiltration profile and current status, Active or Stopped and Disconnected. From that interface operators can start, stop, rename or remove listeners, and it offers quick access to encryption keys and authentication IDs for managing beacon communication. The README calls it the command hub for orchestrating and monitoring your C2 infrastructure, which is accurate in a literal sense: this is a control panel over configuration objects, and the operator's job is mostly to populate and manage them. The protocols on offer are listed in the feature table, DoH, HTTPS, HTTP, QUIC and Reverse TCP, and the encryption options per listener are AES, XOR, RC4, DES, ChaCha20 and RSA. Two network simulation features are worth calling out on their own, since they exist to make traffic look like something else. JA3S fingerprinting gives customizable fingerprints for traffic simulation and network profile tuning, and support for community Malleable C2 profiles allows flexible network traffic simulation. There is also DGA support, described as support for resilient infrastructure simulation, and proxy support for SOCKS4, SOCKS4a and SOCKS5 as proxy and redirector support.

The payload generator reads the listener back

The payload generator is the piece that closes the loop, and its design explains why the listener table exists. It automatically builds customized payloads and beacons according to the selected listener configuration, supporting payload types EXE, DLL, BIN and HEX, network protocols DoH, HTTPS, HTTP, QUIC and Reverse TCP, and encryption types AES, XOR, RC4, DES, ChaCha20, RSA or none. The Auto Fills button opens a listener selector window listing all previously configured listeners from the Listeners Table, and when you select one, Tactical Load automatically populates the listener name, operator address and port, network protocol, encryption type and key, the beacon auth ID and the URI path. The stated purpose is that operators can quickly generate matching payloads without manually re-entering listener details. That is the whole point of the framework as an adversary emulation tool. The scenario is expressed once, as a listener, and both the server side and the implant side are derived from it, so a blue team sees the same configuration the red team used, and a change of protocol or cipher becomes a configuration edit rather than a rewrite. The two attack frameworks share the same direction of travel. The APT Attack Simulation Repository, named in the README as the related research the framework draws on, addresses the same problem of testing a specific technique against a specific configuration, and BEAR-C2 positions itself as the configurable environment around that idea.

Exfiltration and C2 channels sit on mainstream services

The exfiltration side targets consumer and enterprise cloud storage. You configure per session exfiltration settings for supported providers such as Google Drive, OneDrive and Dropbox, and the Exfiltration Profile interface lets you define API access tokens and destination folder paths so that data collection workflows can be customised for each session. Each session can use its own exfiltration profile, which makes it easy to route collected data to different cloud storage providers or destinations depending on the operation. The C2 channels are the striking choice. The Telegram communication layer uses a Telegram bot as the intermediary between the C2 server and the payload, where the C2 server authenticates to the Telegram account using the configured API ID, API Hash and Phone Number, then connects to the previously created Telegram bot through that account. The Discord stage replaces the traditional command and control channel with a Discord based layer using the Discord Gateway API, so instead of relying on dedicated servers, fixed IP addresses or custom domains, operators communicate with the simulated implant through a private Discord channel. Both are documented with their own how-to pages in the repository. From a defender's perspective this is the most valuable thing in the project, because it makes the exercise traffic resemble ordinary use of two very common platforms.

Building it requires a Rust and MinGW toolchain, not just Python

The install steps in the README are short, and the Makefile behind them is where the real requirements live.

bash
chmod +x Makefile && ./Makefile

./BEAR-C2

The script behind that command does more than install Python packages. It sets strict shell error handling, traps failures with a warning that names the line number, and works out its own directory before changing into it. It then repairs the package state with sudo dpkg --configure -a and sudo apt --fix-broken install -y, each guarded so that a failure prints a warning and continues, and it runs sudo apt update the same way. After that it checks the build requirements explicitly. Cargo, rustc and rustup are tested with command -v, and if rustup is present it checks whether the x86_64-pc-windows-gnu target is installed with rustup target list --installed, setting the Rust failure flag if it is not. A C++ compiler is checked the same way, with the mingw cross compiler x86_64-w64-mingw32-g++ required, which is what lets the project emit Windows payloads. So the practical requirement is a Linux host with sudo, a Rust toolchain with the Windows GNU target, and a MinGW cross toolchain. The top level listing shows the main entry point BEAR-C2.py, a Payloads/ directory, an Adversary Primitives/ directory, a Resources/ directory, a SECURITY.md, a CONTRIBUTING.md and a CODE_OF_CONDUCT.md, and the project describes itself as under active development with features continuously added and improved.

Where this framework stops being the right answer

The limits are structural and worth naming. First, the catalogue is fixed. The protocols, the ciphers and the exfiltration providers are the ones listed in the feature table, and while a listener is configurable in its parameters, a technique that needs a protocol or a cloud destination the framework does not implement is not a configuration change, it is a code change. Second, the licence needs reading. The licence field is recorded as a custom licence that GitHub cannot classify, with a LICENSE file at the root of the repository, so the terms are whatever that file says and your own legal review should cover how a framework that produces executables and DLLs is used inside a commercial environment. Third, the operational risk is real and the project says so. The README carries a caution that the project is for educational and research purposes only and that any unauthorized use of it could lead to legal consequences, which is the correct framing for a tool that generates working beacons, opens listeners on the operator's own host and authenticates to a Telegram or Discord account. Fourth, for a defensive team the exercise is only as good as the telemetry. If your detections key on dedicated infrastructure, a DoH or QUIC listener or a Drive upload may not trip them, and the framework's own malleable profile and JA3S features exist precisely to make that traffic look ordinary, so the detection validation has to be planned rather than assumed. The single v2.0 release, the full GUI release, is dated 2026-08-27, and the last push was on 2026-10-19, so the project is moving quickly with a single tagged version to point at.

Editorial conclusion

BEAR-C2 suits a red or purple team that has to run the same intrusion technique many times over with different encryption and exfiltration combinations, because the listener table turns each of those variations into a configuration change rather than a new script, and the payload generator produces a matching beacon from that configuration. It is the wrong tool if your goal is a bespoke technique that none of the supported protocols or profiles cover, since the framework is built from a fixed catalogue of listeners, and it is the wrong tool for a live engagement without a written scope, given the project's own caution that unauthorized use can have legal consequences. Before you adopt it, read the LICENSE file, since the licence field is recorded as a custom one that GitHub cannot classify, and confirm with your own detection team that the exfiltration and C2 channel options are actually visible to your telemetry before you rely on the exercise to prove coverage.

Frequently asked questions

What is BEAR-C2 and who is it for?

BEAR-C2 is an adversary simulation and emulation framework built around real world TTPs inspired by Russian, Chinese, North Korean and Iranian APT groups. It is aimed at red team operators and purple team exercises, where a repeatable intrusion scenario is needed rather than a one-off script.

How do you install and run BEAR-C2?

The README gives chmod +x Makefile && ./Makefile followed by ./BEAR-C2. The Makefile installs and repairs the apt package state, then checks for cargo, rustc, rustup, the x86_64-pc-windows-gnu Rust target and the x86_64-w64-mingw32-g++ cross compiler.

Which protocols and encryption options does BEAR-C2 support?

Listeners can use DoH, HTTPS, HTTP, QUIC or Reverse TCP, with per listener encryption in AES, XOR, RC4, DES, ChaCha20 or RSA. It also supports DGA, JA3S fingerprinting, SOCKS4, SOCKS4a and SOCKS5 proxying, and community Malleable C2 profiles.

Official sources

  1. Issues
  2. Project website
  3. README
  4. Releases
  5. S3N4T0R-0X0/BEAR-C2 on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/s3n4t0r-0x0-bear-c2.svg)](https://hysenlabs.com/projects/s3n4t0r-0x0-bear-c2)

Was this useful?