8000 GitHub - 1Birdo/Go-HoneyPot: A HoneyPot in Golang for reporting on scanning & Login attemps SSH / SMB with AbuseIPDB
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

1Birdo/Go-HoneyPot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

70 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🍯 Go-HoneyPot

Lightweight SSH & SMB Honeypots written in Go

License: MIT Go Version AbuseIPDB

Go-HoneyPot Logo

πŸ“‹ Overview

Go-HoneyPot provides lightweight security monitoring tools that detect and report malicious scanning and unauthorized access attempts. The project consists of two honeypot implementations:

  • SSH Honeypot - Detects brute force attempts against SSH servers
  • SMB Honeypot - Identifies unauthorized SMB access attempts

Both honeypots automatically report offending IPs to AbuseIPDB and temporarily ban them using iptables.

⚠️ Security Note: This tool provides basic detection of abusive scanning and unauthorized login attempts. For enhanced protection, it is strongly recommended to use Fail2Ban or other trusted security solutions alongside this tool.

Improvements are needed in two key areas:

  1. Error Handling: Ensuring that error handling is clean, effective, and comprehensive to minimize issues and improve system stability.
  1. Protocol Simulation (SMB and SSH): Enhancing the simulation of both SMB and SSH protocols by adding more banners and improving request detection. While the system still captures connections based on the respective ports, refining these aspects will lead to a cleaner, more accurate simulation.

✨ Features

SSH Honeypot (sshpot.go)

Feature Description
πŸ”Œ Multi-port Listening Monitors multiple common SSH ports (2222, 2200, 22, etc.)
πŸ›‘οΈ Server Simulation Accurately mimics OpenSSH server behavior
πŸ“ Comprehensive Logging Records all connection attempts with timestamps
🚫 Automated Reporting Reports to AbuseIPDB (category 18 - SSH, 22 - Brute Force)
⏱️ Temporary Banning Implements 30-minute IP bans using iptables
πŸ”„ Duplicate Prevention Prevents duplicate reports within 15 minutes

SMB Honeypot (smbpot.go)

Feature Description
πŸ”Œ Protocol Monitoring Listens on standard SMB port (445)
πŸ›‘οΈ Protocol Simulation Simulates SMB protocol negotiation
πŸ“ Detailed Logging Writes comprehensive logs to smb_attempts.log
🚫 Automated Reporting Reports to AbuseIPDB (categories 14 - SMB, 15 - Brute Force)
⏱️ Temporary Banning Implements 30-minute IP bans using iptables
πŸ“Š Attack Analytics Tracks attack patterns and frequency

πŸ”§ Installation

Prerequisites

Before installation, ensure you have the following dependencies installed:

  • Linux system (Debian/Ubuntu recommended)
  • Go 1.16+ (required to build the project)
  • iptables (used for IP banning)
  • curl (for reporting to AbuseIPDB)
  • AbuseIPDB API key (Free tier available, sign up here)

Build Instructions

# Clone the repository
git clone https://github.com/Birdo1221/Go-HoneyPot.git

# Navigate to project directory
cd Go-HoneyPot

# Build both honeypots
go build sshpot.go
go build smbpot.go

Configuration

Before running, you'll need to set your AbuseIPDB API key:

# Edit the configuration (example - actual implementation may vary)
nano config.json

# Set your API key in the configuration file
{
  "abuseipdb_api_key": "YOUR_API_KEY_HERE"
}

πŸš€ Usage

Running with Root Privileges

Both honeypots require root privileges to manage iptables:

# Run SSH honeypot
sudo ./sshpot

# Run SMB honeypot
sudo ./smbpot

Running as Background Processes

To run the honeypots in the background:

# Run SSH Honeypot in the background
nohup sudo ./sshpot &

# Run SMB Honeypot in the background
nohup sudo ./smbpot &

πŸ’‘ Tip: As an alternative to nohup, you can use screen or tmux for better session management.

Logging

  • SSH Honeypot: Outputs to stdout/stderr by default
  • SMB Honeypot: Logs to smb_attempts.log in the same directory

⚠️ Important Warnings

These honeypots are designed to attract malicious traffic by simulating public services. Please consider the following:

  • Dedicated Environment: Run on a dedicated server or VM, not your primary system
  • System Security: Ensure your system is properly secured before deploying
  • Resource Monitoring: Keep an eye on system resources, especially when under attack
  • Data Protection: Never run on systems with sensitive data
  • Access Control: Use firewall rules to restrict access if needed

πŸ“Š Statistics

The honeypots collect statistics on attack attempts which can be viewed in the log files. For a visual representation of attacks reported through your account, visit your AbuseIPDB dashboard.

πŸ› οΈ Advanced Configuration

Custom Port Configuration

To modify listening ports, edit the source code:

// In sshpot.go
var sshPorts = []int{22, 2222, 2200}  // Modify as needed

Adjusting Ban Duration

To change the default 30-minute ban duration:

// In both sshpot.go and smbpot.go
const banDuration = 30  // Time in minutes, modify as needed

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🀝 Contributing

Contributions are welcome! Please feel free to ask for a Pull Request.

Made with ❀️ by Birdo1221

About

A HoneyPot in Golang for reporting on scanning & Login attemps SSH / SMB with AbuseIPDB

Topics

Resources

License

Stars

Watchers

Forks

Languages

0