National Cyber Warfare Foundation (NCWF)login

BEAR-C2 for adversary emulation built on nation-state TTPs


0 user ratings
2026-10-26 07:27:06
milo
Red Team (CNA)
"BEAR-C2

BEAR-C2 is a Python adversary simulation and emulation framework that models Russian, Chinese, North Korean, and Iranian APT tradecraft for authorized red team operations and defensive research.








ToolS3N4T0R-0X0/BEAR-C2 — adversary simulation and emulation framework built around real-world APT TTPs
CategoryAdversary emulation / C2 simulation framework
Primary UseReproducing APT intrusion behaviors — multi-protocol C2 listeners, exfiltration profiles, and MITRE ATT&CK-mapped TTPs — inside lab environments to test detection coverage
Safe UseAuthorized red team engagements, adversary emulation labs, and purple-team detection validation under explicit written permission only
Telemetry NoteGenerates JA3S-fingerprintable TLS traffic over HTTPS/DoH/QUIC, cloud-API exfil to Google Drive/OneDrive/Dropbox, and Telegram/Discord gateway traffic — all of which blue teams can build detections around

BEAR-C2 sits in a crowded but interesting niche: full-stack adversary emulation frameworks that attempt to reproduce nation-state tradecraft rather than generic malware behavior. The project describes itself as a simulation environment built around real-world TTPs inspired by Russian, Chinese, North Korean, and Iranian APT groups, and it explicitly anchors its lineage to the author's APT-Attack-Simulation repository of scenario research. At roughly 615 stars and written in Python, it is an active, actively documented project — the README carries an "under active development" banner and screenshots dated well into late 2026 — which matters in a tool category where most alternatives are abandoned within a year.


The core design problem the README articulates is one every emulation operator will recognize: replicating a specific intrusion requires a particular combination of connection protocol, encryption scheme, and exfiltration channel, and historically each combination demanded a bespoke C2 script. One exercise might call for AES encryption with OneDrive exfiltration; another needs RC4 with Dropbox. BEAR-C2's answer is composability — a listener configuration model where these dimensions are selected independently, so a scenario is assembled rather than coded. This is the same architectural insight that drove frameworks like Cobalt Strike's malleable profiles, applied to a research-oriented, open-source package.


The listener layer is the heart of that model. Supported protocols span DoH, HTTPS, HTTP, QUIC, and Reverse TCP, and each listener can carry its own encryption from AES, XOR, RC4, DES, ChaCha20, and RSA. A centralized Listeners Table acts as the operational hub, exposing listener name, address, protocol, encryption method, exfiltration profile, and status, with controls to start, stop, rename, or remove listeners plus quick access to keys and beacon authentication IDs. For a defensive audience, this table is essentially a preview of what detection engineering should target: every combination here maps to an observable network signature problem.


The payload generator ties directly into the listener model. It builds beacons in EXE, DLL, BIN, and HEX formats, inheriting protocol and encryption from the listener configuration. A notable usability detail is the Auto Fills function, which opens a listener selector and populates the listener name, operator address and port, protocol, encryption type and key, Beacon Auth ID, and URI path from an existing listener definition. That eliminates the class of emulation errors where the implant and the handler disagree on channel parameters — a real time sink in lab work when it happens mid-exercise.


Exfiltration is modeled through per-session profiles targeting Google Drive, OneDrive, and Dropbox, with configurable API access tokens and destination folder paths. Each session can route collected data to a different cloud destination, which mirrors how actual intrusions abuse legitimate SaaS infrastructure to blend into sanctioned egress. For defenders, this is a genuinely useful simulation surface: detecting OAuth-token-driven uploads to consumer cloud storage from a managed endpoint is a hard problem, and a framework that reproduces it deterministically lets you validate DLP and CASB telemetry without touching real adversary tooling.


Beyond conventional listeners, BEAR-C2 integrates what it calls C2 channel agents over consumer messaging platforms. The Telegram agent uses a bot as an intermediary, with the server authenticating via configured API ID, API Hash, and phone number; the Discord agent rides the Discord Gateway API through a private channel, deliberately avoiding dedicated servers, fixed IPs, or custom domains. A companion evil agent generator produces EXE/DLL/BIN/HEX agents for either platform with a configurable maximum message size, requiring only a Bot Token (plus Channel ID and User ID for Discord). This mirrors a documented real-world trend of threat actors abusing trusted messaging infrastructure, and it gives blue teams a controlled way to test whether their egress monitoring notices it.


The framework's network-resilience features are where it gets closest to production-grade adversary tooling, and also where its analytical value for defenders is highest. Per-listener JA3S fingerprint customization lets operators shape the TLS handshake the server presents — or, viewed from the defense side, lets you verify whether your fingerprint-based detections actually fire or merely match a library default. Malleable C2 profile support allows community profiles to govern traffic shaping, and a dynamic domain generation algorithm (DGA) feature simulates resilient infrastructure. Proxy and redirector support covers SOCKS4, SOCKS4a, and SOCKS5, enabling layered infrastructure topologies that red and blue teams can both exercise.


Two supporting modules round out the platform. The spear-phishing simulation interface manages campaign parameters, victim submission limits, and session behavior — the README is careful to frame this as controlled, authorized phishing assessment tooling, and it should only ever be that. The Host File interface provides centralized delivery of staged content with automated loading on access. Neither module's documentation goes deep, but their presence signals the author's intent to cover the full intrusion lifecycle from initial access through exfil rather than just the post-exploitation channel.


The Script Obfuscator is the most dual-use component: it applies variable and function renaming, string encryption, junk code insertion, multi-layer obfuscation, anti-debugging techniques, and XOR-based payload encryption to PS1, BAT, HTML, VBS, JS, and PY files. In an authorized context this is a detection-hardness test — feed the output to your EDR or sandbox pipeline and see whether static analysis holds up. It is also the feature that most rewards scrutiny before deployment: any obfuscation engine in an open-source repo deserves a code review before it touches an engagement environment, both for safety and for reliability.


The APT group matrix embedded in the README is the project's differentiator. It maps supported emulations across nine Russian groups (Cozy Bear/APT29, Fancy Bear/APT28, Voodoo Bear, Energetic Bear, Berserk Bear, Gossamer Bear, Primitive Bear, Ember Bear, and Venomous Bear), a comparable Chinese roster (Mustang Panda, Wicked Panda, Deep Panda, and others), plus North Korean and Iranian clusters, each linked to dedicated simulation repositories under the same author's account. This gives BEAR-C2 genuine purple-team utility: you can pick a threat actor relevant to your sector and validate your controls against its documented behaviors rather than against generic test traffic.


Operationally, the build is handled through a Makefile — chmod +x Makefile && ./Makefile, then launch the ./BEAR-C2 binary — with the entire interface presented as a GUI rather than a CLI, judging by the extensive screenshots. The project is unlicensed (NOASSERTION), which is worth flagging: without an explicit license, formal organizational use carries legal ambiguity regardless of the README's educational disclaimer. That disclaimer itself states the project is for educational and research purposes only and that unauthorized use could lead to legal consequences — the correct posture for tooling of this nature, and one that operators should treat as binding.


As with any open-sourced offensive framework, adoption should be deliberate. Run it in an isolated lab first, audit what the generated artifacts actually do before introducing them into an engagement scope, and confirm the messaging-platform and cloud-exfil agents against your own logging before trusting them to behave as documented. Used that way — as a scenario generator for detection validation and authorized emulation — BEAR-C2 is a substantive addition to the emulation toolchain, and its composability model is a cleaner answer to the one-script-per-scenario problem than most of its peers have managed.



Official project repository for S3N4T0R-0X0/BEAR-C2.

Download Tool

Educational analysis for authorized security professionals. Use only in controlled, authorized environments.






Source: OffensiveSec
Source Link: https://www.offsecblog.com/2026/10/bear-c2-for-adversary-emulation-built.html


Comments
new comment
Nobody has commented yet. Will you be the first?
 
Forum
Red Team (CNA)



Copyright 2012 through 2026 - National Cyber Warfare Foundation - All rights reserved worldwide.