/sshpot

A simple ssh honeypot that logs usernames and passwords

Primary LanguageC

Name:

    sshpot


Description: 

    An ssh server that never authenticates. Instead, it logs the username,
    password, IP address and time of every login attempt.


Installation:

    1. Generate an RSA public key for use by the server:
        > ssh-keygen -t rsa 

    2. Edit config.h to set the desired options. In particular, you must set
       RSA_KEYFILE to the path to the public key generated in step one. LOGFILE 
       must be set to a location where the user running sshpot can write.

    3. Compile the software:
        > make
        # make install (optional, but necessary to listen on ports < 1024.)

SQL Table Structure:
    Table Name : ATTACKLOG
    +---------------------+----------------+------------------+-----------------------+
    | TIMESTAMP TIMESTAMP | IP VARCHAR(43) | USER VARCHAR(32) | PASSWORD VARCHAR(255) |
    +---------------------+----------------+------------------+-----------------------+

Usage:
    sshpot [-d <database>] [-e] [-h] [-l <password>] [-p <port>] [-s <port>] [-u <user>@<host>]
        -d  --database <db_name>   Name of SQL database.
        -e  --enable-sql    Enable to use SQL database.
        -h  --help          Display this usage information.
        -l  --login-password <password>    Login password of SQL database.
        -p  --port <port>   Port to listen on; defaults to 22.
        -s  --sql-port <port>   Server port of the SQL database; defaults to 3306.
        -u  --user <user>@<host>  User of SQL database.; user@host

Dependencies:

    libssh http://www.libssh.org/
    libmysqlclient-dev