Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 777 Bytes

README.md

File metadata and controls

27 lines (22 loc) · 777 Bytes

Basic SSH Honeypot

A basic SSH honeypot built with Python and containerised in Docker. Part of my blog post: How to build an SSH honeypot in Python and Docker - Part 1.

Uses the Paramiko Python SSH protocol library.

Installation

Port forwarding

Setup port forwarding (e.g. from 22 to 2222)

iptables -A PREROUTING -t nat -p tcp --dport 22 -j REDIRECT --to-port 2222

Generate server key

ssh-keygen -t rsa -f server.key

Build

docker build -t basic_honeypot .

Run

docker run -v ${PWD}:/usr/src/app -p 2222:2222 basic_honeypot

Logs are recorded in the auto-generated ssh_honeypot.log file