Deception-based threat intelligence collection for cybersecurity researchers, SOC teams, and AI/ML enthusiasts.
Capture real attacker behavior β enrich with threat intel feeds β map to MITRE ATT&CK β analyze, alert, and learn.
Created by Jainam Maru
Real-world attack data is the single best training set for detection engineering, yet most defenders never see it. An SSH honeypot sits on the front lines and turns every credential-stuffing bot and manual intruder into structured intelligence:
- π‘ Collect β raw auth attempts, executed commands, and SFTP activity from real attackers
- π Enrich β geolocation (GeoIP2 / ip-api.com), threat scoring (AbuseIPDB, AlienVault OTX, VirusTotal)
- π§ Map β automatic classification to MITRE ATT&CK techniques (T1110, T1059, T1098β¦)
- πΎ Store β human-readable logs, structured JSON, and a queryable SQLite database
- π Act β webhook / Slack / Discord / email alerts with per-severity thresholds
This project is the data-collection layer of a full threat-intelligence pipeline β pair it with dark-sentinel for dark-web coverage or feed the JSON output into your own detection stack.
flowchart LR
A[Attacker Bot / Manual Intruder] -->|TCP :2222| B
subgraph HP[SSH Honeypot]
B[Paramiko SSH Server<br/>Dynamic Banner Spoofing] --> C[Auth Attempt Capture<br/>username Β· password Β· key fp]
C --> D[Fake Shell / SFTP<br/>command & file activity]
C --> E[Rate Limiter +<br/>Auto-Ban]
end
D --> F[Log Parser & Enricher]
E --> F
F -->|GeoIP2 / ip-api| G[IP Geolocation<br/>city Β· country Β· ASN]
F -->|AbuseIPDB Β· OTX Β· VT| H[Threat Scoring<br/>0-10 severity]
F --> I[MITRE ATT&CK Mapper<br/>T1110 Β· T1059 Β· T1098 Β· ...]
I --> J[(SQLite DB)]
I --> K[attacks.json / attacks.log]
J --> L[Web Dashboard<br/>FastAPI Β· live stats]
K --> L
L --> M[Alerting<br/>Webhook Β· Slack Β· Discord Β· Email]
Data flow: every keystroke an attacker types lands in attacks.json with an ATT&CK technique ID, a geolocation, and a severity score β ready for SIEM ingestion or ML analysis.
curl -sSL https://raw.githubusercontent.com/Dev9269/ssh-honeypot/main/install.sh | bashgit clone https://github.com/Dev9269/ssh-honeypot.git
cd ssh-honeypot
pip install -r requirements.txt
# Basic honeypot on :2222
python main.py
# With live dashboard on :8080
python main.py --dashboard
# With YAML config
python main.py --config honeypot.yamldocker-compose up --build
# Or manually
docker build -t ssh-honeypot .
docker run -d -p 2222:2222 -p 8080:8080 ssh-honeypot- Fake Shell Interaction β Captures attacker commands in a realistic Linux shell environment
- IP Geolocation β Maps attacker IPs to city/country/ASN (GeoIP2 or ip-api.com fallback)
- Threat Intelligence β AbuseIPDB, AlienVault OTX, VirusTotal integration
- Real-time Alerts β Webhook, Slack, Discord, and email notifications
- Web Dashboard β FastAPI-based live monitoring UI with auth
- SQLite Database β Structured storage for querying and analysis
- MITRE ATT&CK Mapping β Auto-tags attacks with TTP IDs
- Rate Limiting β Per-IP connection throttling with auto-ban
- Dynamic Fingerprinting β Randomized SSH banners to avoid detection
- Log Rotation β Automatic rotation with size/backup limits
- YAML Configuration β Full config via
honeypot.yaml - Docker Support β Containerized deployment with docker-compose
- SFTP Simulation β Fake file transfer environment
- Prometheus Metrics β /metrics endpoint for monitoring
| Feature | Description |
|---|---|
| SSH Simulation | Realistic OpenSSH banner spoofing with dynamic fingerprint rotation |
| Auth Logging | Captures username, password, key fingerprint, method, timestamp |
| Command Capture | Fake shell records every command attackers execute |
| Geolocation | IP β location mapping (offline GeoIP2 or free ip-api.com API) |
| Threat Scoring | Multi-source threat intelligence scoring (0-10) |
| MITRE ATT&CK | Auto-classifies attacks to TTP framework (T1110, T1059, T1098, etc.) |
| Alerts | Webhook, Slack, Discord, SMTP email notifications |
| Dashboard | Real-time web UI with stats, top IPs, recent attacks |
| Rate Limiting | Per-IP connection limit with automatic temp bans |
| IP Filtering | Whitelist/blacklist by IP or CIDR range |
| Database | SQLite for structured querying and analytics |
| Docker | Containerized via Dockerfile + docker-compose |
| macOS .app | Native macOS application support |
[*] SSH Honeypot v2.0.0 listening on 0.0.0.0:2222
[*] Fake banner: SSH-2.0-OpenSSH_7.9p1 Debian-10
[*] Logs: logs/attacks.log, logs/attacks.json
[*] Database: logs/honeypot.db
[*] Geolocation: enabled
[*] Threat Intelligence: enabled
[*] Alerts: enabled
[*] Fake Shell: enabled (ubuntu-server)
[*] Dashboard: http://127.0.0.1:8080
[*] Press Ctrl+C to stop
[+] Connection from 192.168.1.100:54321 [New York, US] [threat: 6/10]
[+] Connection from 10.0.0.5:12345 [London, GB] [threat: 0/10]
[!] Rate limit exceeded for 203.0.113.5
[-] Connection closed from 192.168.1.100 (duration: 12.5s)
When an attacker connects (the honeypot rejects auth but still serves a shell):
Linux ubuntu-server 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2025 x86_64 GNU/Linux
root@ubuntu-server:/root$ whoami
root
root@ubuntu-server:/root$ id
uid=0(root) gid=0(root) groups=0(root)
root@ubuntu-server:/root$ uname -a
Linux ubuntu-server 5.15.0-91-generic #101-Ubuntu SMP...
root@ubuntu-server:/root$ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
root@ubuntu-server:/root$ exit
logout
All commands are logged to attacks.log, attacks.json, and the SQLite database with MITRE ATT&CK classifications.
ssh-honeypot/
βββ honeypot/
β βββ __init__.py
β βββ server.py # SSH server + client handler
β βββ shell.py # Fake shell with command responses
β βββ config.py # Configuration (YAML + defaults)
β βββ logger.py # Logging (.log, .json, rotation)
β βββ db.py # SQLite database backend
β βββ geo.py # IP geolocation (GeoIP2 + ip-api.com)
β βββ intel.py # Threat intelligence (AbuseIPDB, OTX, VT)
β βββ alerts.py # Alerting (webhook, Slack, Discord, email)
β βββ ratelimiter.py # Per-IP rate limiter with auto-ban
β βββ analyzer.py # MITRE ATT&CK framework mapping
β βββ dashboard.py # FastAPI web dashboard
β βββ sftp_server.py # SFTP simulation
βββ logs/ # Attack logs + database
βββ main.py # Entry point
βββ honeypot.yaml # YAML configuration
βββ Dockerfile # Docker build
βββ docker-compose.yml # Docker compose
βββ requirements.txt # Python dependencies
βββ README.md
All settings can be configured via honeypot.yaml:
server:
host: 0.0.0.0
port: 2222
rate_limit:
max_connections: 10
window: 60
ban_duration: 300
alerts:
enabled: true
slack_webhook: "https://hooks.slack.com/services/..."
discord_webhook: "https://discord.com/api/webhooks/..."
min_severity: mediumSee the full honeypot.yaml file for all options.
2026-06-24 14:30:22,123 - IP: 192.168.1.100 | Username: root | Password: password123 | Method: password | MITRE: T1110:Brute Force
2026-06-24 14:30:45,678 - Activity | IP: 10.0.0.5 | command: whoami
[
{
"event": "auth_attempt",
"timestamp": "2026-06-24T14:30:22.123456",
"ip": "192.168.1.100",
"username": "root",
"password": "password123",
"method": "password",
"mitre": "T1110:Brute Force"
}
]Query attack data directly:
sqlite3 logs/honeypot.db "SELECT ip, username, password FROM auth_attempts ORDER BY timestamp DESC LIMIT 10;"| Technique | ID | Detected By |
|---|---|---|
| Brute Force | T1110 | Password auth attempts |
| Account Manipulation | T1098 | SSH key auth attempts |
| Command & Scripting | T1059 | Shell command execution |
| Network Discovery | T1046 | Recon commands (nmap, etc.) |
| Remote Services | T1021 | Lateral movement commands |
| Privilege Escalation | T1068 | sudo/chown commands |
| Defense Evasion | T1562 | rm -rf, shutdown, etc. |
| Data Collection | T1005 | tar, zip, find commands |
honeypot Β· ssh Β· cybersecurity Β· threat-intelligence Β· deception Β· security-tools Β· mitre-attack Β· honeypot-ssh Β· intrusion-detection Β· network-security
This tool is for authorized security research and education only.
- Deploy only on networks you own or have permission to monitor
- Comply with all applicable laws
- The author assumes no liability for misuse
MIT License β see LICENSE
- Paramiko β SSH protocol library
- MaxMind GeoIP2 β Geolocation data
- AbuseIPDB β Threat intelligence
- MITRE ATT&CK β TTP framework