Skip to content

daecayde/Shadowtrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ShadowTrap πŸ•ΈοΈ

![Python 3.9+](https://www.python.org/downloads/) ![License: MIT](LICENSE) ![PRs Welcome](CONTRIBUTING.md)

ShadowTrap is a lightweight, modular honeypot framework designed for threat intelligence gathering and network security research. It simulates vulnerable services (SSH, HTTP, FTP, SMTP, Telnet) to attract and log attacker behavior in real time.

Built for security researchers, blue teamers, and anyone who wants to understand what's knocking on their network.

---

Features

  • Multi-service simulation β€” SSH, HTTP, FTP, SMTP, and Telnet honeypots out of the box
  • Real-time logging β€” All interactions logged with timestamps, source IPs, credentials, and payloads
  • GeoIP enrichment β€” Automatic geolocation tagging of attacker IPs
  • Live dashboard β€” Terminal-based real-time monitoring dashboard
  • JSON + SQLite logging β€” Structured logs for easy analysis and integration with SIEM tools
  • Configurable banners β€” Mimic real services to increase deception authenticity
  • Rate limiting β€” Built-in connection throttling to handle aggressive scanners
  • Docker support β€” One-command deployment
  • Plugin architecture β€” Easily add custom service emulators
  • Alerting β€” Webhook support for Slack/Discord/Telegram notifications

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  ShadowTrap Core                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  Logger   β”‚ β”‚ GeoIP    β”‚ β”‚  Alert Manager   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚       β”‚             β”‚                β”‚             β”‚
β”‚  β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚              Event Bus                        β”‚ β”‚
β”‚  β””β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚     β”‚      β”‚      β”‚      β”‚      β”‚                  β”‚
β”‚  β”Œβ”€β”€β–Όβ”€β”€β”β”Œβ”€β”€β–Όβ”€β”€β”β”Œβ”€β”€β–Όβ”€β”€β”β”Œβ”€β”€β–Όβ”€β”€β”β”Œβ”€β”€β–Όβ”€β”€β”              β”‚
β”‚  β”‚ SSH β”‚β”‚HTTP β”‚β”‚ FTP β”‚β”‚SMTP β”‚β”‚ Tel β”‚β”‚              β”‚
β”‚  β””β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”˜              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Quick Start

Prerequisites

  • Python 3.9+
  • pip

Installation

git clone https://github.com/daecayde/shadowtrap.git
cd shadowtrap
pip install -r requirements.txt

Configuration

Copy the example config and customize:

cp config/shadowtrap.example.yml config/shadowtrap.yml

Edit config/shadowtrap.yml to enable/disable services and set ports.

Run

python -m shadowtrap --config config/shadowtrap.yml

Or run individual services:

python -m shadowtrap --service ssh --port 2222
python -m shadowtrap --service http --port 8080

Docker

docker build -t shadowtrap .
docker run -d --name shadowtrap \\
  -p 2222:2222 -p 8080:8080 -p 2121:2121 \\
  -v $(pwd)/logs:/app/logs \\
  -v $(pwd)/config:/app/config \\
  shadowtrap

Dashboard

Launch the live terminal dashboard:

python -m shadowtrap.dashboard

Shows real-time connection attempts, top attacker IPs, credential frequency, and geographic distribution.

Log Format

All events are logged as structured JSON:

{
  "timestamp": "2026-05-19T14:32:11.443Z",
  "service": "ssh",
  "src\_ip": "192.168.1.105",
  "src\_port": 48291,
  "dst\_port": 2222,
  "event\_type": "login\_attempt",
  "username": "root",
  "password": "admin123",
  "session\_id": "a3f8c2d1-9e4b-4f7a-b5c6-1d2e3f4a5b6c",
  "geo": {
    "country": "CN",
    "city": "Beijing",
    "lat": 39.9042,
    "lon": 116.4074
  },
  "raw\_input": null
}

Project Structure

shadowtrap/
β”œβ”€β”€ shadowtrap/
β”‚   β”œβ”€β”€ \_\_init\_\_.py
β”‚   β”œβ”€β”€ \_\_main\_\_.py          # CLI entry point
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ \_\_init\_\_.py
β”‚   β”‚   β”œβ”€β”€ engine.py        # Main orchestrator
β”‚   β”‚   β”œβ”€β”€ logger.py        # Structured logging
β”‚   β”‚   β”œβ”€β”€ geoip.py         # IP geolocation
β”‚   β”‚   └── alerter.py       # Webhook notifications
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ \_\_init\_\_.py
β”‚   β”‚   β”œβ”€β”€ base.py          # Base service class
β”‚   β”‚   β”œβ”€β”€ ssh\_trap.py      # SSH honeypot
β”‚   β”‚   β”œβ”€β”€ http\_trap.py     # HTTP honeypot
β”‚   β”‚   β”œβ”€β”€ ftp\_trap.py      # FTP honeypot
β”‚   β”‚   β”œβ”€β”€ smtp\_trap.py     # SMTP honeypot
β”‚   β”‚   └── telnet\_trap.py   # Telnet honeypot
β”‚   └── dashboard/
β”‚       β”œβ”€β”€ \_\_init\_\_.py
β”‚       └── monitor.py       # Live TUI dashboard
β”œβ”€β”€ config/
β”‚   └── shadowtrap.example.yml
β”œβ”€β”€ logs/
β”‚   └── .gitkeep
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ \_\_init\_\_.py
β”‚   β”œβ”€β”€ test\_ssh.py
β”‚   └── test\_logger.py
β”œβ”€β”€ docs/
β”‚   └── DEPLOYMENT.md
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ setup.py
β”œβ”€β”€ LICENSE
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ .gitignore
└── README.md

Supported Services

Service Default Port Emulates Key Captures
SSH 2222 OpenSSH 8.9 Credentials, commands, key exchanges
HTTP 8080 Apache 2.4 URLs, headers, payloads, user-agents
FTP 2121 vsftpd 3.0 Credentials, file operations
SMTP 2525 Postfix Sender/recipient, email content
Telnet 2323 BusyBox Credentials, commands

Integrations

ShadowTrap logs can be forwarded to:

  • ELK Stack (Elasticsearch, Logstash, Kibana)
  • Splunk via JSON ingestion
  • Grafana with SQLite/JSON datasource
  • MISP for threat intelligence sharing

Security Considerations

⚠️ **Run honeypots in isolated environments.** Never deploy on production networks without proper segmentation.

  • Use dedicated VMs or containers
  • Firewall rules should prevent lateral movement
  • Monitor the honeypot host itself for compromise
  • Rotate logs regularly and store securely

Contributing

See CONTRIBUTING.md for guidelines.

License

This project is licensed under the MIT License β€” see LICENSE for details.

Acknowledgments

---

Disclaimer: This tool is intended for authorized security research and defensive purposes only. Unauthorized use of honeypots to entrap individuals or collect data without consent may violate local laws. Always ensure you have proper authorization before deployment.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors