  
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.
---
- 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
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β ShadowTrap Core β
β ββββββββββββ ββββββββββββ ββββββββββββββββββββ β
β β Logger β β GeoIP β β Alert Manager β β
β ββββββ¬ββββββ ββββββ¬ββββββ ββββββββββ¬ββββββββββ β
β β β β β
β ββββββΌββββββββββββββΌβββββββββββββββββΌβββββββββββ β
β β Event Bus β β
β ββββ¬βββββββ¬βββββββ¬βββββββ¬βββββββ¬ββββββββββββββββ β
β β β β β β β
β ββββΌβββββββΌβββββββΌβββββββΌβββββββΌβββ β
β β SSH ββHTTP ββ FTP ββSMTP ββ Tel ββ β
β βββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Python 3.9+
- pip
git clone https://github.com/daecayde/shadowtrap.git
cd shadowtrap
pip install -r requirements.txtCopy the example config and customize:
cp config/shadowtrap.example.yml config/shadowtrap.ymlEdit config/shadowtrap.yml to enable/disable services and set ports.
python -m shadowtrap --config config/shadowtrap.ymlOr run individual services:
python -m shadowtrap --service ssh --port 2222
python -m shadowtrap --service http --port 8080docker 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 \\
shadowtrapLaunch the live terminal dashboard:
python -m shadowtrap.dashboardShows real-time connection attempts, top attacker IPs, credential frequency, and geographic distribution.
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
}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
| 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 |
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
β οΈ **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
See CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License β see LICENSE for details.
- Inspired by Cowrie, Dionaea, and HoneyPy
- GeoIP data powered by MaxMind GeoLite2
---
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.