Coder Social home page Coder Social logo

ssh-honeypot's Introduction

SSH-Honeypot

Overview

This is a simple SSH honeypot built with Python. This is a lightweight honeypot tool designed to emulate an SSH server, attracting potential attackers and capturing their activities.

The honeypot logs connection attempts, authentication requests, and other relevant information for analysis.

Setup

  1. Install required dependencies:
pip install -r requirements.txt
  1. Run the honeypot
sudo python3 honeypot.py -l 0.0.0.0 -p 22

Sample Logs

{'timestamp': '2023-12-25 20:25:21.117837', 'message': 'Got a connection!', 'ip': '127.0.0.1', 'sessionID': 'ae65f12f-44bf-4c9f-9850-353f32786ac6'}
{'timestamp': '2023-12-25 20:25:23.102249', 'message': 'SSH negotiation failed.', 'sessionID': 'ae65f12f-44bf-4c9f-9850-353f32786ac6'}
{'timestamp': '2023-12-25 15:15:27.213175', 'message': 'Got a connection!', 'ip': '127.0.0.1', 'sessionID': '5b36d44a-5e22-4664-8c26-1d6aca5ff037'}
{'timestamp': '2023-12-25 15:15:30.933291', 'message': 'User tried to authenticate!', 'username': 'randomuser', 'password': 'randompassword', 'sessionID': '5b36d44a-5e22-4664-8c26-1d6aca5ff037'}
{'timestamp': '2023-12-25 15:15:30.945785', 'ip': '127.0.0.1', 'message': 'Authentication successful!', 'sessionID': '5b36d44a-5e22-4664-8c26-1d6aca5ff037'}
{'timestamp': '2023-12-25 15:16:09.580090', 'message': 'Got a connection!', 'ip': '127.0.0.1', 'sessionID': 'c2af045e-6f56-4258-b8b0-b710f3a8343f'}

Configuration

Modify the banner variable in the script to emulate different SSH server environments.

export OS_BANNER=SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u2

Logging

All events, including connection attempts and authentication details, are logged to the honeypot.log file.

Disclaimer

This honeypot is intended for educational and research purposes only. Use it responsibly and in compliance with applicable laws and regulations.

Special thanks to the Paramiko library for SSH protocol implementation.

Feel free to contribute, report issues, or provide feedback to enhance the functionality and security of this SSH honeypot.

ssh-honeypot's People

Contributors

pr0d33p avatar

Stargazers

Aayush Shrestha avatar Prabin Sigdel avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.