logo TOMCATC2

TOMCAT C2 FRAMEWORK

Modular, enterprise-grade Command & Control framework built in Java. Supports Web Panel, CLI, and JavaFX GUI with mutual TLS, AES-256-GCM encryption, and multi-protocol session handling.

OpenJDK 17+
Maven
AES-256-GCM
mTLS
AGPL v3
tomcat-c2 — operator console
TOMCAT C2
TOMCAT C2
TOMCAT C2
TOMCAT C2
TOMCAT C2
TOMCAT C2
Overview

What is TOMCAT C2

TOMCAT-C2 is a modular, enterprise-grade Command & Control framework written in Java. It supports multiple interface modes — Web Panel (HTTP), CLI, and JavaFX GUI — and manages concurrent reverse shell sessions from a single operator console across diverse target environments.

Engineered for operational security: all agent communication is protected by AES-256-GCM encryption and mutual TLS authentication using PKCS12 keystores. The framework features a full certificate lifecycle manager (CA → Server → Agent), file transfer, thread-safe session handling, and an event-driven architecture designed for extensibility.

Java 17 Web Panel CLI JavaFX GUI mTLS + AES-GCM v3.0 Active
Multi Transport Security Layer
v17 Min JDK
AGPL License
v3.0 Version
Authorized Use Only

This tool is for legally authorized penetration testing only. Unauthorized use is illegal and unethical.

Features

Core Capabilities

Everything a red team operator needs in a single Java-based framework.

01

Multi-Interface Support

Operate via Web Panel (browser at port 5000), CLI mode (-C), or full JavaFX desktop GUI (-G) — whichever fits your workflow.

02

AES-256-GCM Encryption

All agent communication is encrypted end-to-end with AES-256-GCM, preventing traffic analysis and ensuring operational confidentiality.

03

Mutual TLS (mTLS)

Agent authentication via PKCS12 keystores. Full CA, server, and agent certificate lifecycle management with a single init command.

04

Multi-Protocol Sessions

Handle TOMCAT agents, Meterpreter sessions, and plain reverse shells concurrently from a single operator console.

05

File Transfer

Upload payloads and download evidence files with built-in progress tracking. Evidence saved to the configurable output directory.

06

OPSEC Design

Minimal target footprint, encrypted payloads, and configurable listeners. GitHub Actions CI ensures clean reproducible builds.

07

Thread-Safe Sessions

Concurrent session handling backed by a thread-safe manager. Multiple agents can connect and be interacted with simultaneously.

08

Event-Driven Architecture

Decoupled event system for clean separation between the operator console, session manager, and agent handlers.

09

Cross-Platform

Runs on Windows, Linux, macOS, and BSD via the JVM. Platform-specific Maven build flags available for each target OS.

Installation

Getting Started

Deploy TOMCAT C2 v3.0 in under 5 minutes.

01

Prerequisites

Ensure the following are installed before proceeding.

OpenJDK 17 or newer Required
Apache Maven 3.8+ Required
Git Required
Linux / Termux (Debian recommended) Recommended
02

Clone Repository

Pull the source from GitHub. Use the main branch for stable usage or dev for contribution.

bash
git clone --branch main https://github.com/MatrixTM26/TOMCAT-C2-Framework
cd TOMCAT-C2-Framework
03

Quick Run (Pre-built JAR)

A ready-to-use JAR is included in the repository. No compilation required.

bash
java -jar output/tomcat-c2.jar
04

Build from Source

Compile with Maven. Use platform-specific flags for JavaFX support.

bash
# Linux / Termux
mvn clean package -Djavafx.platform=linux -q

# Windows
mvn clean package -Djavafx.platform=windows -q

# macOS
mvn clean package -Djavafx.platform=macos -q
05

Initialize Certificates & Launch

Initialize mTLS certificates first, then start the server in your preferred interface mode.

bash
# Initialize CA and server certificates
java -jar target/tomcat-c2-jar-with-dependencies.jar --init-certs

# Web Panel Mode (default — http://localhost:5000)
java -jar target/tomcat-c2-jar-with-dependencies.jar

# CLI Mode
java -jar target/tomcat-c2-jar-with-dependencies.jar -C

# JavaFX GUI Mode
java -jar target/tomcat-c2-jar-with-dependencies.jar -G
Server running. Web panel at http://localhost:5000 — waiting for agents.
Commands

Command Reference

CLI flags and operator console command reference for TOMCAT C2 v3.0.

FlagSyntaxDescription
-S, --host-S <addr>C2 server bind address (default: 0.0.0.0)
-p, --port-p <port>Web panel port (default: 5000)
-T, --mtls-TEnable mutual TLS authentication
-M, --meterpreter-MEnable multi-protocol mode
-C, --cli-mode-CStart in CLI interface mode
-G, --gui-mode-GStart in JavaFX GUI mode
--init-certs--init-certsInitialize CA and server certificates
-l, --list-agents-lList all generated agent certificates
CommandSyntaxDescription
sessionssessionsList all active shell sessions
interactinteract [id]Open interactive shell with session
killkill [id]Terminate specified session
killallkillallTerminate all active sessions
infoinfo [id]Display session metadata and details
backgroundbackgroundBackground current interactive session
renamerename [id] [name]Label a session for identification
CommandSyntaxDescription
uploadupload [local] [remote]Upload file from operator to target
downloaddownload [remote] [local]Download file from target to operator
lsls [path]List remote directory contents
cdcd [path]Change remote working directory
catcat [file]Read remote file contents
shellshell [cmd]Execute single command on remote session
FlagSyntaxDescription
--init-certs--init-certsInitialize CA and server certificate
-a, --gen-agent-a <id> -ah <host> -ap <port> -amGenerate single agent certificate
-m, --gen-multi-m -c <count> -u <prefix>Generate multiple agent certificates
-l, --list-agents-lList all generated agent certificates
Architecture

System Architecture

How TOMCAT C2 v3.0 components interconnect in a live deployment.

OPERATOR INTERFACES Web Panel · CLI · JavaFX GUI TOMCAT C2 SERVER Session Manager · mTLS Auth · AES-256-GCM Event System · Cert Manager · File Transfer TOMCAT AGENT 192.168.1.42 session-1 · mTLS METERPRETER 10.0.0.15 session-2 · multi-proto REVERSE SHELL 172.16.0.8 session-3 · tcp + more agents mTLS / AES-256-GCM OUTPUT LOGS ./output CONFIG server.properties

Operator Interfaces

Web Panel (browser), CLI terminal, and JavaFX desktop GUI — all connecting to the same C2 server core.

C2 Server Core

Thread-safe session manager, mTLS auth, AES-256-GCM encryption, event-driven architecture, and certificate lifecycle manager.

Multi-Protocol Agents

Supports TOMCAT agents (mTLS), Meterpreter sessions, and plain reverse shells — all managed from one console.

Output & Config

All session I/O captured to timestamped logs in ./output. All settings configurable via server.properties.

Configuration

Configuration Reference

All parameters available in server.properties.

Server
KeyDefaultDescription
server.host0.0.0.0Bind address for C2 listener
server.port4444Default agent listener port
server.web.port5000Web panel HTTP port
server.timeout30000Session timeout in milliseconds
server.backlog50Max pending connection queue size
Output
KeyDefaultDescription
output.dir./outputDirectory for session logs and downloads
output.logtrueEnable command and output logging
output.timestamptruePrefix log entries with timestamps
Security
KeyDefaultDescription
crypto.enabledtrueEnable AES-256-GCM session encryption
crypto.algorithmAES/GCM/NoPaddingEncryption algorithm for C2 traffic
crypto.keysize256Key size in bits
mtls.enabledfalseEnable mutual TLS agent authentication
mtls.keystoreconfig/app/server.p12Path to PKCS12 server keystore

Ready to deploy

Explore the source, open issues, or contribute to TOMCAT C2 on GitHub.