Skip to content

Repository files navigation

NekomataC2

A Next-Generation Command & Control Framework with Advanced GUI and Multi-Platform Support

Built after doing the SANS SEC670 Course, may be buggy and unsafe, will not update or fix anything. But can be used as something to build from.

NekomataC2 GUI Client — dockable widgets, integrated terminal, team chat and C2 profiles

Key Features

Modern GUI Client

  • Cursor-Inspired Interface: Professional IDE-like experience with movable dock widgets
  • Real-Time Monitoring: Live beacon status updates and network visualization using D3.js
  • Integrated Terminal: Built-in command execution with syntax highlighting
  • AI Assistant: Integrated Claude/OpenAI support for intelligent operations
  • Command Palette: Quick access to all framework functions (Ctrl+Shift+P)
  • Network Visualization: Interactive network topology and beacon relationships

Advanced Server Architecture

  • Multi-Protocol Support: HTTP/HTTPS, DNS-over-HTTPS, SMB, SOCKS5 proxy protocols
  • Real-Time Communication: WebSocket-based live updates and notifications
  • Robust Database: SQLite backend with comprehensive beacon and operation tracking
  • JWT Authentication: Secure multi-client access with session management
  • Health Monitoring: Built-in system monitoring and performance metrics

Comprehensive Beacon Capabilities

  • Multi-Platform: Windows C++ and Android Kotlin implementations
  • Protocol Flexibility: HTTP, HTTPS, DNS tunneling, SMB, SOCKS5 with HMAC authentication
  • BOF Integration: 100+ pre-built Beacon Object Files from industry-standard collections
  • Modular Generation: Template-based beacon creation with customizable features
  • AI-Powered Generation: Automated beacon creation with 10+ implementation variants

BOF (Beacon Object File) Integration

  • CS-Situational-Awareness-BOF: Complete collection of reconnaissance modules
  • Extension-Kit: Advanced post-exploitation capabilities
  • Argument Generation: Intelligent parameter parsing and validation
  • Custom BOF Support: Framework for developing and integrating custom modules

Architecture Overview

┌─────────────────────────────────────────────────────────────┐
│                    NekomataC2 Framework                   │
├─────────────────┬─────────────────┬─────────────────────────┤
│   GUI Client    │   Team Server   │        Beacons          │
│   (PyQt6)       │   (Flask)       │   (Multi-Platform)      │
├─────────────────┼─────────────────┼─────────────────────────┤
│ • Dock Widgets  │ • REST API      │ • Windows C++           │
│ • D3.js Viz     │ • WebSocket     │ • Android Kotlin        │
│ • AI Assistant  │ • SQLite DB     │ • HTTP/HTTPS/DNS        │
│ • Terminal      │ • JWT Auth      │ • SMB/SOCKS5            │
│ • Cmd Palette   │ • Multi-Client  │ • BOF Integration       │
└─────────────────┴─────────────────┴─────────────────────────┘

Quick Start

Prerequisites

  • Python 3.8+ with pip package manager
  • Visual Studio 2022 (recommended) or MinGW for beacon compilation
  • Windows 10/11 (primary support) or Linux (experimental)

Installation

  1. Clone the repository:

    git clone https://github.com/puffert/NekomataC2.git
    cd NekomataC2
  2. Install Python dependencies (each component has its own requirements file):

    pip install -r nekomata_c2_server/requirements.txt   # team server
    pip install -r nekomata_c2_client/requirements.txt   # GUI client
    pip install -r requirements.txt                      # beacon/AI tooling (optional)
  3. Start the team server. There are no default credentials — the server refuses to start without an admin password and secret key:

    # Linux/macOS:
    export ADMIN_PASSWORD="choose-a-strong-password"
    export NEKOMATA_SECRET_KEY="$(python -c 'import secrets; print(secrets.token_hex(32))')"
    
    # Windows (PowerShell):
    # $env:ADMIN_PASSWORD = "choose-a-strong-password"
    # $env:NEKOMATA_SECRET_KEY = python -c "import secrets; print(secrets.token_hex(32))"
    
    python nekomata_c2_server/teamserver.py

    On first run the server creates the admin account with the password from ADMIN_PASSWORD. For a guided production setup, run python nekomata_c2_server/setup_server.py instead.

  4. Launch the GUI client:

    python nekomata_c2_client/main.py
  5. Access the interface:

    • Connect to https://localhost:5000 in the client
    • Log in with the admin account created in step 3

Documentation

Comprehensive documentation is available in the /docs directory:

Beacon Platforms

Windows Beacons

  • HTTP/HTTPS: Standard web-based communication with TLS encryption
  • DNS-over-HTTPS: Covert DNS tunneling through legitimate DoH providers
  • SMB: Named pipe communication for internal lateral movement
  • SOCKS5: Proxy capabilities with HMAC-SHA256 authentication
  • BOF Support: Execute Beacon Object Files with argument generation

Android Beacons

  • HTTP/HTTPS: Mobile beacon implementation in Kotlin
  • Background Operations: Persistent operation with minimal battery impact
  • Stealth Features: Anti-detection and evasion capabilities

BOF Collections

Integrated Collections

  • CS-Situational-Awareness-BOF: 58 reconnaissance and discovery modules
  • Extension-Kit: Advanced post-exploitation capabilities including:
    • Active Directory enumeration and exploitation
    • Credential harvesting and manipulation
    • Privilege escalation techniques
    • Lateral movement capabilities
    • Process and memory manipulation

Custom BOF Development

  • Template System: Standardized BOF development framework
  • Argument Parser: Automated parameter handling and validation
  • Integration Tools: Seamless deployment and execution pipeline

AI-Powered Features

Beacon Generation

  • Multiple LLM Support: Claude, OpenAI GPT-4, and local models
  • Variant Generation: Creates 10+ unique implementation approaches
  • Security Analysis: Automated OPSEC review and recommendations
  • Build Integration: Direct Visual Studio project generation

Intelligent Operations

  • Command Suggestions: Context-aware operation recommendations
  • Automated Reporting: AI-generated operation summaries and documentation
  • Threat Modeling: Dynamic assessment of deployment scenarios

Security Features

  • TLS Encryption: End-to-end encrypted communications
  • JWT Authentication: Secure multi-client session management
  • HMAC Validation: Message authentication for critical operations
  • Certificate Pinning: Protection against man-in-the-middle attacks
  • Operational Security: Built-in OPSEC guidelines and warnings

Development

Building Beacons

Visual Studio 2022 integration provides automated beacon compilation:

# Generate and build HTTP beacon
python beacon_generator.py --protocol http --target windows
# Output: Compiled beacon ready for deployment

Custom BOF Development

// Example BOF implementation
#include "beacon.h"

void go(char* args, int len) {
    // Your custom functionality here
    BeaconOutput(CALLBACK_OUTPUT, "Custom BOF executed", 22);
}

Contributing

We welcome contributions to NekomataC2! Please see our contributing guidelines and ensure all security best practices are followed.

Legal Notice

This framework is intended for authorized security testing and red team operations only. Users are responsible for ensuring compliance with all applicable laws and regulations. Unauthorized use of this software is strictly prohibited.

License

NekomataC2 is released under the MIT License. See LICENSE for details.


NekomataC2 - Advanced C2 Framework for Professional Security Operations