Skip to main content

23 different honeypots in a single pypi package! (dns, ftp, httpproxy, http, https, imap, mysql, pop3, postgres, redis, smb, smtp, socks5, ssh, telnet, vnc, mssql, elastic, ldap, ntp, memcache, snmp, and oracle)

Project description

https://raw.githubusercontent.com/qeeqbox/honeypots/main/readme/honeypots.png

23 different honeypots in a single PyPI package for monitoring network traffic, bots activities, and username password credentials. All honeypots are non-blocking and can be used as objects or called directly with the in-built auto-configure scripts. Also, they are easy to setup and customize, it takes 1-2 seconds to spin a honeypot up. The output can be logged to a postgres database, file[s], terminal or syslog for easy integration.

This honeypots package is the only package that contains all the following: dns, ftp, httpproxy, http, https, imap, mysql, pop3, postgres, redis, smb, smtp, socks5, ssh, telnet, vnc, mssql, elastic, ldap, ntp, memcache, snmp, and oracle.

Honeypots now is in the awesome telekom security T-Pot project!

Install

pip3 install honeypots

Usage Example - Auto configure

Use a honeypot, or multiple honeypots separated by comma or word all

python3 -m honeypots --setup ssh

Usage Example - Local ports needs higher privileges (use sudo -E)

Use as honeypot:port or multiple honeypots as honeypot:port,honeypot:port

python3 -m honeypots --setup ssh:22

Usage Example - Auto configure with specific ports

Use as honeypot:port or multiple honeypots as honeypot:port,honeypot:port

python3 -m honeypots --setup imap:143,mysql:3306,redis:6379

Usage Example - Auto configure with logs location

Use a honeypot, or multiple honeypots separated by comma or word all

python3 -m honeypots --setup ssh --config config.json
{
    "logs":"file,terminal",
    "logs_location":"/temp/honeypots_logs/"
}

Usage Example - Custom configure

Use a honeypot, or multiple honeypots separated by comma or word all

python3 -m honeypots --setup ssh --config config.json

config.json (Output to folder and terminal)

{
    "logs":"file,terminal",
    "logs_location":"/temp/honeypots_logs/"
    "honeypots": {
        "ftp": {
            "port": 21,
            "ip": "0.0.0.0",
            "username": "test",
            "password": "test"
            }
        }
}

config.json (Output to syslog)

{
    "logs":"syslog",
    "logs_location":"",
    "syslog_address": "udp://localhost:514",
    "syslog_facility": 3,
    "honeypots": {
        "ftp": {
            "port": 21,
            "ip": "0.0.0.0",
            "username": "test",
            "password": "test"
            }
        }
}

config.json (Output to db)

{
    "logs": "db",
    "logs_location": "",
    "syslog_address":"",
    "syslog_facility":0,
    "postgres":"//username:password@172.19.0.2:9999/honeypots",
    "db_options":["drop"],
    "filter": "",
    "interface": "",
    "honeypots": {
        "ftp": {
            "port": 21,
            "username": "test",
            "password": "test"
        }
    }
}

db structure

[
  {
    "id": 1,
    "date": "2021-11-18 06:06:42.304338+00",
    "data": {
      "server": "'ftp_server'",
      "action": "'process'",
      "status": "'success'",
      "ip": "'0.0.0.0'",
      "port": "21",
      "username": "'test'",
      "password": "'test'"
    }
  }
]

Usage Example - Import as object and auto test

#ip= String E.g. 0.0.0.0
#port= Int E.g. 9999
#username= String E.g. Test
#password= String E.g. Test
#mocking= Boolean or String E.g OpenSSH 7.0
#logs= String E.g db, terminal or all
#always remember to add process=true to run_server() for non-blocking

from honeypots import QSSHServer
qsshserver = QSSHServer(port=9999)
qsshserver.run_server(process=True)
qsshserver.test_server(port=9999)
INFO:chameleonlogger:['servers', {'status': 'success', 'username': 'test', 'dest_ip': '127.0.0.1', 'server': 'ssh_server', 'action': 'login', 'password': 'test', 'dest_port': 38696}]
qsshserver.kill_server()

Usage Example - Import as object and test with external ssh command

from honeypots import QSSHServer
qsshserver = QSSHServer(port=9999)
qsshserver.run_server(process=True)
ssh test@127.0.0.1

Honeypot answer

INFO:chameleonlogger:['servers', {'status': 'success', 'username': 'test', 'dest_ip': '127.0.0.1', 'server': 'ssh_server', 'action': 'login', 'password': 'test', 'dest_port': 38696}]

Close the honeypot

qsshserver.kill_server()

Current Servers/Emulators

  • QDNSServer
    • Server: DNS

    • Port: 53

    • Lib: Twisted

    • Logs: ip, port

  • QFTPServer
    • Server: FTP

    • Port: 21

    • Lib: Twisted

    • Logs: ip, port, username and password

  • QHTTPProxyServer
    • Server: HTTP Proxy

    • Port: 8080

    • Lib: Twisted

    • Logs: ip, port and data

  • QHTTPServer
    • Server: HTTP

    • Port: 80

    • Lib: Twisted

    • Logs: ip, port, username and password

  • QHTTPSServer
    • Server: HTTPS

    • Port: 443

    • Lib: Twisted

    • Logs: ip, port, username and password

  • QIMAPServer
    • Server: IMAP

    • Port: 143

    • Lib: Twisted

    • Logs: ip, port, username and password

  • QMysqlServer
    • Emulator: Mysql

    • Port: 3306

    • Lib: Twisted

    • Logs: ip, port, username and password

  • QPOP3Server
    • Server: POP3

    • Port: 110

    • Lib: Twisted

    • Logs: ip, port, username and password

  • QPostgresServer
    • Emulator: Postgres

    • Port: 5432

    • Lib: Twisted

    • Logs: ip, port, username and password

  • QRedisServer
    • Emulator: Redis

    • Port: 6379

    • Lib: Twisted

    • Logs: ip, port, username and password

  • QSMBServer
    • Server: Redis

    • Port: 445

    • Lib: impacket

    • Logs: ip, port and username

  • QSMTPServer
    • Server: SMTP

    • Port: 25

    • Lib: smtpd

    • Logs: ip, port, username and password

  • QSOCKS5Server
    • Server: SOCK5

    • Port: 1080

    • Lib: socketserver

    • Logs: ip, port, username and password

  • QSSHServer
    • Server: SSH

    • Port: 22

    • Lib: paramiko

    • Logs: ip, port, username and password

  • QTelnetServer
    • Server: Telnet

    • Port: 23

    • Lib: Twisted

    • Logs: ip, port, username and password

  • QVNCServer
    • Emulator: VNC

    • Port: 5900

    • Lib: Twisted

    • Logs: ip, port, username and password

  • QMSSQLServer
    • Emulator: MSSQL

    • Port: 1433

    • Lib: Twisted

    • Logs: ip, port, username and password or hash

  • QElasticServer
    • Emulator: Elastic

    • Port: 9200

    • Lib: http.server

    • Logs: ip, port and data

  • QLDAPServer
    • Emulator: LDAP

    • Port: 389

    • Lib: Twisted

    • Logs: ip, port, username and password

  • QNTPServer
    • Emulator: NTP

    • Port: 123

    • Lib: Twisted

    • Logs: ip, port and data

  • QMemcacheServer
    • Emulator: Memcache

    • Port: 11211

    • Lib: Twisted

    • Logs: ip, port and data

  • QOracleServer
    • Emulator: Oracle

    • Port: 1521

    • Lib: Twisted

    • Logs: ip, port and connet data

  • QSNMPServer
    • Emulator: SNMP

    • Port: 161

    • Lib: Twisted

    • Logs: ip, port and data

acknowledgement

  • By using this framework, you are accepting the license terms of all these packages: pipenv twisted psutil psycopg2-binary dnspython requests impacket paramiko redis mysql-connector pycryptodome vncdotool service_identity requests[socks] pygments http.server

  • Let me know if I missed a reference or resource!

Some Articles

Notes

  • Almost all servers and emulators are stripped-down - You can adjust that as needed

Other projects

https://raw.githubusercontent.com/qeeqbox/.github/main/data//social-analyzer.png https://raw.githubusercontent.com/qeeqbox/.github/main/data//analyzer.png https://raw.githubusercontent.com/qeeqbox/.github/main/data//chameleon.png https://raw.githubusercontent.com/qeeqbox/.github/main/data//osint.png https://raw.githubusercontent.com/qeeqbox/.github/main/data//url-sandbox.png https://raw.githubusercontent.com/qeeqbox/.github/main/data//mitre-visualizer.png https://raw.githubusercontent.com/qeeqbox/.github/main/data//woodpecker.png https://raw.githubusercontent.com/qeeqbox/.github/main/data//docker-images.png https://raw.githubusercontent.com/qeeqbox/.github/main/data//seahorse.png https://raw.githubusercontent.com/qeeqbox/.github/main/data//rhino.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

honeypots-0.41.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

honeypots-0.41-py3-none-any.whl (81.9 kB view details)

Uploaded Python 3

File details

Details for the file honeypots-0.41.tar.gz.

File metadata

  • Download URL: honeypots-0.41.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.27.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for honeypots-0.41.tar.gz
Algorithm Hash digest
SHA256 a5cd8a91056fdecc52a123c14dcaa00343dabd534d1e010277330d32fd6f78e0
MD5 b8edd9e9263b22f8c171045980469d49
BLAKE2b-256 fac3613a118256ccdcfc16785de5113e777e521a3cff64d85e410cca31944958

See more details on using hashes here.

File details

Details for the file honeypots-0.41-py3-none-any.whl.

File metadata

  • Download URL: honeypots-0.41-py3-none-any.whl
  • Upload date:
  • Size: 81.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.27.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for honeypots-0.41-py3-none-any.whl
Algorithm Hash digest
SHA256 ccc96195f41caefd9a8ab65fc9e10411d95aa61fa9e727217d17aad688db3155
MD5 5e48f5e53e94a7295c68bcef085e21a0
BLAKE2b-256 714731687c075c8c26df417123546af37f350f123c0240d0ce9c5d74ac00a157

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page