A powerful Docker honeypot management tool with auto-import capabilities
HPone is a comprehensive Docker-based honeypot management platform that simplifies the deployment, monitoring, and maintenance of security honeypots. With intelligent auto-import features and streamlined command interfaces, HPone makes honeypot management accessible for both production and development environments.
- π Auto-Import System - Seamless honeypot template deployment
- π³ Docker Integration - Containerized honeypot environments
- π Real-time Monitoring - Live log streaming and status tracking
- π§ Flexible Configuration - YAML-based honeypot definitions
- π‘οΈ Multi-Honeypot Support - Manage multiple honeypot types simultaneously
- π» Interactive CLI - User-friendly command-line interface with bash completion
- βοΈ Built-in Editor - Edit configurations directly from command line
10_hpone_preview_v2_3_1.mp4
π¦ HPone/ β£ π app.py # Main launcher script β£ π hpone/ # Core application directory β β£ π― app.py # Application entry point β β£ βοΈ config.py # Configuration management β β£ π completion/ # Bash completion scripts β β£ π core/ # Core functionality modules β β π scripts/ # Command implementations β£ π honeypots/ # π― YAML honeypot definitions β£ π template/docker/ # π Base Docker templates β£ π conf/ # π§ Persistent configurations β£ π docker/ # π³ Generated build outputs (temp) β π data/ # πΎ Runtime data & logs β π requirements.txt # Python dependencies Configure HPone behavior by editing the configuration file:
- π¦ Debian Package Installation:
/opt/hpone/hpone/config.py - π§ Source Installation:
hpone/config.py(in your project directory)
π View Configuration Options
# π Behavior Mode ALWAYS_IMPORT = True # Auto-import vs Manual control # π Path Configuration HONEYPOT_MANIFEST_DIR = PROJECT_ROOT / "honeypots" # YAML definitions TEMPLATE_DOCKER_DIR = PROJECT_ROOT / "template" / "docker" # Base templates OUTPUT_DOCKER_DIR = PROJECT_ROOT / "docker" # Build outputs DATA_DIR = PROJECT_ROOT / "data" # Runtime data # π₯οΈ Display Configuration LIST_BASIC_MAX_WIDTH = 80 # Basic list width LIST_DETAILED_MAX_WIDTH = 30 # Detailed list width STATUS_TABLE_MAX_WIDTH = 40 # Status table width # π Logging Configuration USE_EPHEMERAL_LOGGING = True # Real-time vs Simple output# Download and install the latest .deb package wget https://github.com/ariafatah0711/HPone/releases/latest/download/hpone_all.deb sudo apt install -f ./hpone_all.deb sudo usermod -aG docker $USER # π IMPORTANT: Restart your shell session to activate changes sudo newgrp docker # Restart current shell with: logout and login again, OR open a new terminal windowπ Installation Location: When installed via Debian package, HPone is located at /opt/hpone/
π Debian Package Directory Structure
π¦ /opt/hpone/ # Main installation directory β£ π app.py # Main application entry point β£ π hpone/ # Core application directory β β£ π― app.py # Application launcher β β£ βοΈ config.py # Configuration management β β£ π completion/ # Bash completion scripts β β£ π core/ # Core functionality modules β β π scripts/ # Command implementations β£ π honeypots/ # π― YAML honeypot definitions β£ π template/docker/ # π Base Docker templates β£ π conf/ # π§ Persistent configurations β£ π docker/ # π³ Generated build outputs (temp) β£ π data/ # πΎ Runtime data & logs β π requirements.txt # Python dependencies π Global Access: The hpone command is available system-wide via /usr/bin/hpone
# Clone and setup HPone git clone https://github.com/ariafatah0711/HPone hpone cd hpone # π§ Setup with global installation & bash completion chmod +x setup.sh ./setup.sh install # π IMPORTANT: Restart your shell session to activate changes sudo newgrp docker # Restart current shell with: logout and login again, OR open a new terminal windowπ¦ Dependencies & Libraries
# π Install Python dependencies pip3 install -r requirements.txt # π³ Install Docker Engine sudo apt install docker.io sudo usermod -aG docker $USER # π¦ Install Docker Compose DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} mkdir -p $DOCKER_CONFIG/cli-plugins curl -SL https://github.com/docker/compose/releases/download/v2.29.0/docker-compose-linux-x86_64 \ -o $DOCKER_CONFIG/cli-plugins/docker-compose # π Set executable permissions chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose # Alternative system-wide installation # sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose # β
Verify installation docker compose versionπ Global Installation
# π Set executable permissions chmod +x app.py # π Create symbolic link for global access sudo ln -s $(pwd)/app.py /usr/local/bin/hpone # β
Test global installation hpone -hβ¨οΈ Bash Completion Setup
# Quick setup chmod +x hpone/completion/install.sh ./hpone/completion/install.sh exec $SHELL # Restart shellπ¨ Tab completion works for all commands and honeypot names!
sudo apt remove hpone # Remove the installed package sudo apt purge hpone # Optional: Remove configuration files # π **IMPORTANT:** Restart your shell session after removal: exec $SHELL # Restart current shell with: logout and login again, OR open a new terminal window# π§Ή Uninstall global installation & bash completion chmod +x setup.sh ./setup.sh uninstall # π IMPORTANT: Restart your shell session after uninstallation exec $SHELL # Restart current shell # ποΈ Optional: Remove project directory cd .. rm -rf hponehpone enable cowrie medpot conpot # Enable multiple honeypots hpone up --all # Start all enabled honeypotshpone list -a # Check status hpone logs cowrie # View logshpone edit cowrie # Edit configuration hpone shell cowrie # Container access hpone clean --all --data # Stop & cleanup| Command | Description | Options | Example |
|---|---|---|---|
π check | Verify dependencies | - | hpone check |
π list | Show honeypots | -a | hpone list -a |
π status | Runtime status | - | hpone status |
π inspect | Honeypot details | - | hpone inspect cowrie |
βοΈ edit | Edit configurations | <honeypot>, --config, --completion | hpone edit cowrie |
β¨ Edit Features: Smart editor detection β’ SSH-aware β’ YAML validation β’ Interactive recovery β’ Tab completion
| Command | Description | Options | Example |
|---|---|---|---|
βοΈ enable/disable | Toggle honeypot(s) | - | hpone enable cowrie medpot |
π up | Start honeypot | --all, --force | hpone up --all |
π down | Stop honeypot | --all | hpone down cowrie |
π» shell | Container access | - | hpone shell cowrie |
π logs | Interactive logs | - | hpone logs cowrie |
ποΈ clean | Stop & remove | --all, --data, --image, --volume | hpone clean --all --data |
# π Basic workflow hpone enable cowrie conpot hpone up --all hpone logs cowrie # Interactive log viewer hpone shell cowrie # Container access hpone down cowrie # π Configuration hpone edit cowrie # Edit honeypot config hpone edit --config # Edit main settings # π Monitoring hpone list -a # Detailed status hpone status # Port mappings # ποΈ Cleanup hpone clean --all --data --image --volumehpone check # Comprehensive system validationπ¦ Debian Package Installation:
# Configuration files sudo nano /opt/hpone/hpone/config.py # View honeypot templates ls /opt/hpone/honeypots/ # Check data directory ls /opt/hpone/data/ # Access application files cd /opt/hpone/π§ Source Installation:
# Configuration files nano hpone/config.py # All files are in your project directory ls honeypots/ ls data/HPone features real-time ephemeral logging for clean output:
[22:48:02] [INFO] Starting cowrie containers... [22:48:05] [INFO] Docker network created [22:48:06] [INFO] Building cowrie image [22:48:10] [INFO] Container cowrie started π [UP] cowrie OK (2.3s) π Issues? Set USE_EPHEMERAL_LOGGING = False in config.py for detailed output.
Create a new file in honeypots/ directory:
# π― Custom Honeypot Definition name: myhoneypot description: "Custom honeypot for HTTP services" enabled: true # π Optional: Custom template directory template_dir: custom/template/path # Relative or absolute path # π Port Configuration ports: - host: 8080 container: 80 description: "HTTP service" - host: 8443 container: 443 description: "HTTPS service" # π Environment Variables (merged with template defaults) env: MY_CUSTOM_VAR: "production_value" DEBUG_MODE: "false" LOG_LEVEL: "INFO" # πΎ Volume Mounts volumes: - data/myhoneypot/logs:/app/logs # Persistent logs - conf/myhoneypot/config.yml:/app/config.yml # Custom config override| Field | Type | Description |
|---|---|---|
template_dir | Optional | Custom template path (relative to project or absolute) |
env | Object | Environment variables (merged with template defaults) |
ports | Array | Port mappings with optional descriptions |
volumes | Array | Volume mounts for data persistence and configuration |
HPone has two modes configured in hpone/config.py:
- π€ Auto Mode (
ALWAYS_IMPORT=true) - Production ready, auto-manages templates - π§ Manual Mode (
ALWAYS_IMPORT=false) - Development friendly, full control
β οΈ Disabled honeypots won't auto-start- π Use
--forceto override enabled status - π»
shellcommand requires running containers
π Help make HPone better!
- π΄ Fork the project
- π± Create feature branch (
git checkout -b feature/amazing-feature) - π Commit changes (
git commit -m 'Add amazing feature') - π Push to branch (
git push origin feature/amazing-feature) - π© Open Pull Request
HPone is licensed under the GNU General Public License v3.0 (GPL-3.0) See the LICENSE file for details.
π― Made with β€οΈ for cybersecurity enthusiasts