SSHintel is a lightweight SSH honeypot built using Python and Paramiko. It simulates a fake Linux shell to log unauthorized access attempts, capture credentials, and analyze attacker behavior in a controlled environment.
- Logs SSH login attempts with IP, username, and password
- Emulates a minimal interactive Linux shell
- Supports basic commands (
ls,cd,pwd,cat,echo, etc.) - Optional
--tarpitmode to slow down attackers with delayed output - Fake filesystem with file creation and reading support
ssh-keygen -t rsa -b 2048 -m PEM -f static/server.keyThis will generate a private key at
static/server.key. Do not set a passphrase.
pip install -r requirements.txtRun the honeypot with a specific port, username, and password:
python run.py --port 2222 --username user1 --password pass123Default port is
2222and host is0.0.0.0.
To enable tarpit mode:
python run.py --port 2222 --username user1 --password pass123 --tarpitOpen a second terminal and try connecting:
ssh user1@localhost -p 2222If the credentials match, you’ll be dropped into the emulated shell.
To remove stale SSH fingerprints:
notepad "%USERPROFILE%\.ssh\known_hosts"Delete the relevant line containing
localhostor the honeypot's IP.
- Credentials are logged to
creds_logger - Shell commands are logged via
funnel_logger
You can extend logger.py to send logs to files, remote servers, or alerting systems.
SSHintel/
├── honeypot/ # Core honeypot logic
│ ├── __init__.py
│ ├── main.py # CLI entrypoint
│ ├── handlers.py # Shell logic + tarpit
│ ├── server.py # Paramiko-based server interface
│ ├── logger.py # Logging setup and methods
│ └── __pycache__/ # Compiled Python bytecode
│
├── log_files/ # Logs for credentials and commands
│ ├── creds_audits.log
│ ├── cmd_audits.log
│ └── cmd_audits.log.1
│
├── static/ # SSH key and dummy files
│ ├── server.key # Private host key
│ ├── server.key.pub # Public host key
│ └── notes.txt
│
├── .gitignore
├── Dockerfile
├── README.md
├── requirements.txt # Python dependencies
└── run.py # Script to launch honeypot
If you prefer to run the honeypot in a containerized environment, you can use the included Dockerfile.
docker build -t sshintel .This creates a Docker image named
sshintel.
docker run -p 2222:2222 sshintelThis will:
- Automatically generate the SSH private key at
static/server.key(if it doesn't already exist) - Launch the honeypot on port
2222with default credentials:
username: user1,password: pass123
Open a second terminal and connect via SSH:
ssh user1@localhost -p 2222You’ll be dropped into the simulated shell if the credentials match.
To stop the container:
docker ps # Find the container ID
docker stop <container_id>To remove the image:
docker rmi sshintelYou can also export the image using
docker save -o sshintel.tar sshinteland load it later withdocker load -i sshintel.tar.
This project is licensed under the MIT License.