Git Product home page Git Product logo

ssh_honeypot's Introduction

SSH Honeypot

This is a simple SSH honeypot made using Python and Bash. This honeypot is made to run on a Linux machine.

Sections

Design

How to Use

References

Design

Log Format

Password Authentication Logs

ip_address:<ip_address>,latitude:<latitude>,longitude:<longitude>,country:<country>,username:<username>,password:<password>,date:<date>,time:<time>

Public Key Authentication Logs

ip_address:<ip_address>,latitude:<latitude>,longitude:<longitude>,country:<country>,username:<username>,key_type:<key_type>,fingerprint:<fingerprint>,base64:<base64>,bits:<bits>,date:<date>,time:<time>

How to Use

Clone this repository onto your machine:

git clone https://github.com/ManuelDogbatse/ssh_honeypot.git && cd ssh_honeypot

Run the 'setup_environment.sh' script and follow the instructions:

chmod 755 ./setup_environment.sh
./setup_environment.sh

By default, the IP address is the default route and the port number is 22. For the app.ipgeolocation.io API key used to get the geolocation of the honeypot's attackers, go to ipgeolocation's website and sign up. Then on the dashboard, generate a new API key and paste it in the script as the input.

NOTE - If the script fails in any way, you can also manually modify the .env file, which has all the environment variables used by the honeypot.

Start the honeypot server (see Docker Engine installation to download Docker):

docker compose up -d --build

Your logs will appear in the logs directory, named ssh_password_logins.log and ssh_public_key_logins.log.

You can make changes to the format_logs.sh file in the log_formatter directory to write reformat all the previously made logs, or test the honeypot without using geolocation. See the comments in the file for more information.

Connecting to the honeypot

To test the honeypot, you can connect to the honeypot the same way you would connect to a real SSH server:

ssh -p <port> <ip_address>

If you have warning connecting to the SSH server like this:

Remote Host Warning

Make sure you are connecting to the correct IP address, and type this in your SSH client console to reset the known_host key stored for the honeypot SSH server:

ssh-keygen -R [<ip_addr>]:<port>

References

ssh_honeypot's People

Contributors

manueldogbatse 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.