Skip to content

sjbell/basic_ssh_honeypot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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