Creating a SSH Honeypot with Python

Published: 17 May 2023
on channel: 0xdf
8,837
311

I recently needed to be able to capture the credentials of someone trying to log into an SSH server I controlled. There are tons of nice honeypot products out there that will do this, but I wanted to understand how to do this in python. This video is a walkthrough of that understanding, starting with a listening socket (and how that works) and building up to a threaded server that logs usernames / passwords.

paramiko: https://www.paramiko.org/

☕ Buy Me A Coffee: https://www.buymeacoffee.com/0xdf
My blog: https://0xdf.gitlab.io

[00:00] Introduction
[00:59] Creating listening socket
[03:28] Interacting with listening socket
[05:03] accept and log connection, write to and read from socket
[06:11] Demonstrating basic socket with read / write
[06:51] Using paramiko to setup dummy SSH server
[08:50] Interacting with dummy SSH server
[09:46] Demonstrating issue with server key
[11:15] Giving server a static key
[12:26] Accepting in a while True loop
[13:11] Upgrading accept into a thread
[16:02] Adding SSH component that will handle password login
[17:27] Demoing password logging
[17:42] Wrap up, next steps


On this page of the site you can watch the video online Creating a SSH Honeypot with Python with a duration of hours minute second in good quality, which was uploaded by the user 0xdf 17 May 2023, share the link with friends and acquaintances, this video has already been watched 8,837 times on youtube and it was liked by 311 viewers. Enjoy your viewing!