How prishanagpal/deception-honeypot works
This repository is a local, isolated deception lab: attackers interact with Flask, Cowrie, and Dionaea decoys, producing logs and captured files. The parser polls those sources, converts service-specific records into normalized events, hashes Dionaea files, and stores events and malware metadata in PostgreSQL. The README also describes exporting logs and resetting the demo; those are operator conveniences rather than the main runtime workflow. Parser entry-point wiring is shown, but Compose wiring and some decoy implementations were not sampled, so those links are documented or left unasserted.
Main entry points: src/index.js Parser coordinator · tailer.js Log tailing · normalize/index.js Normalizer dispatch · db.js Database access
Components 22
Honeypot decoys
- HTTP portal decoy
services/flask-honeypot/app.py - SSH decoy
services/dionaea - FTP/SMB decoy
services/dionaea - Flask JSON log
data/flask - Cowrie JSON log
data/cowrie/log - Dionaea JSON log
data/dionaea/log - Captured files
data/dionaea/lib
Log ingestion
- Parser coordinator
services/log-parser/src/index.js - Runtime configuration
services/log-parser/src/config.js - Log tailing
services/log-parser/src/tailer.js - File hashing
services/log-parser/src/binaries.js - Parser metrics
services/log-parser/src/logger.js
Normalization
- Normalizer dispatch
services/log-parser/src/normalize/index.js - Flask normalization
services/log-parser/src/normalize/flask.js - Cowrie normalization
services/log-parser/src/normalize/cowrie.js - Dionaea normalization
services/log-parser/src/normalize/dionaea.js - Shared normalization
services/log-parser/src/normalize/common.js
Database storage
- Database access
services/log-parser/src/db.js - PostgreSQL
db/init.sql
Lab operations
- Log export
scripts/export-logs.sh
Other components
- Lab visitor
- Lab operator
Connections 30
- Lab visitor → HTTP portal decoy: submits forms
README.md - Lab visitor → SSH decoy: connects SSH
README.md - Lab visitor → FTP/SMB decoy: connects FTP/SMB
README.md - HTTP portal decoy → Flask JSON log: writes requests
README.md - SSH decoy → Cowrie JSON log: records events
README.md - FTP/SMB decoy → Dionaea JSON log: records events
README.md - FTP/SMB decoy → Captured files: stores files
README.md - Parser coordinator → Runtime configuration: loads settings
services/log-parser/src/index.js - Parser coordinator → Database access: creates database access
services/log-parser/src/index.js - Parser coordinator → Log tailing: starts log polling
services/log-parser/src/index.js - Parser coordinator → File hashing: starts file scans
services/log-parser/src/index.js - Parser coordinator → Parser metrics: reports summaries
services/log-parser/src/index.js - Log tailing → Flask JSON log: reads log
- Log tailing → Cowrie JSON log: reads log
- Log tailing → Dionaea JSON log: reads log
- Log tailing → Parser coordinator: delivers lines
services/log-parser/src/tailer.js - Parser coordinator → Normalizer dispatch: normalizes lines
services/log-parser/src/index.js - Normalizer dispatch → Flask normalization: dispatches Flask
services/log-parser/src/normalize/index.js - Normalizer dispatch → Cowrie normalization: dispatches Cowrie
services/log-parser/src/normalize/index.js - Normalizer dispatch → Dionaea normalization: dispatches Dionaea
services/log-parser/src/normalize/index.js - Flask normalization → Shared normalization: uses helpers
services/log-parser/src/normalize/flask.js - Cowrie normalization → Shared normalization: uses helpers
services/log-parser/src/normalize/cowrie.js - Dionaea normalization → Shared normalization: uses helpers
services/log-parser/src/normalize/dionaea.js - Parser coordinator → Database access: inserts normalized rows
services/log-parser/src/index.js - Database access → PostgreSQL: reads and writes
services/log-parser/src/db.js - File hashing → Captured files: hashes files
services/log-parser/src/binaries.js - Parser coordinator → Database access: upserts file hashes
services/log-parser/src/index.js - Lab operator → Log export: exports logs
README.md - Log export → Cowrie JSON log: copies logs
README.md - Log export → Dionaea JSON log: copies logs
README.md