{"id":13795908,"url":"https://github.com/czardoz/hornet","last_synced_at":"2025-07-19T23:08:26.575Z","repository":{"id":14003628,"uuid":"16704995","full_name":"czardoz/hornet","owner":"czardoz","description":"SSH Multipot","archived":false,"fork":false,"pushed_at":"2018-04-30T19:13:03.000Z","size":183,"stargazers_count":22,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2024-11-18T10:35:05.597Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"torvalds/linux","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/czardoz.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-10T18:35:59.000Z","updated_at":"2024-09-21T11:51:50.000Z","dependencies_parsed_at":"2022-08-28T20:41:18.797Z","dependency_job_id":null,"html_url":"https://github.com/czardoz/hornet","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czardoz%2Fhornet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czardoz%2Fhornet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czardoz%2Fhornet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/czardoz%2Fhornet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/czardoz","download_url":"https://codeload.github.com/czardoz/hornet/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243762228,"owners_count":20343979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T23:01:03.927Z","updated_at":"2025-03-15T17:18:26.927Z","avatar_url":"https://github.com/czardoz.png","language":"Python","funding_links":[],"categories":["Honeypots","\u003ca id=\"c8f749888134d57b5fb32382c78ef2d1\"\u003e\u003c/a\u003eSSH\u0026\u0026Telnet"],"sub_categories":[],"readme":"=======================\nHornet\n=======================\n\n|travis| |coverage|\n\n.. |coverage| image:: https://coveralls.io/repos/czardoz/hornet/badge.png?branch=master\n                        :target: https://coveralls.io/r/czardoz/hornet?branch=master\n\n.. |travis| image:: https://travis-ci.org/czardoz/hornet.png?branch=master\n                      :target: https://travis-ci.org/czardoz/hornet\n\nOverview\n=========\n\nHornet is aimed to be a medium interaction SSH Honeypot, that supports multiple virtual\nhosts. Each virtual host is configured independently, and gets its own sandboxed filesystem.\nHornet allows interactions across hosts, meaning that the attacker may login to one host\nfrom another (using the ssh command). A Hornet instance *must* contain a default host,\nwhich serves as a launchpad to log into the other hosts. Any configured host can be set\nto default with a simple configuration change.\n\nAt a high level, Hornet can be visualized to be working according to the following diagram:\n\n.. code-block::\n\n                                                   +-------------+\n                                                   | VirtualHost |\n                                +----------------\u003e |             |\n                                |                  |     One     |\n                                |                  +------+------+\n                                |                         ^\n                                |                         |\n                                |                         |\n                                v                         v\n                       +--------+----+             +------+------+\n                       |   Default   |             | VirtualHost |\n    Attacker+--------\u003e |             | \u003c---------\u003e |             |\n                       | VirtualHost |             |     One     |\n                       +--------+----+             +------+------+\n                                ^                         ^\n                                |                         |\n                                |                         |\n                                |                         v\n                                |                  +------+------+\n                                |                  | VirtualHost |\n                                +----------------\u003e |             |\n                                                   |     One     |\n                                                   +-------------+\n\nThe double ended arrows signify possible interaction, through commands\nsuch as ``ssh``, ``ping``, etc.\n\nEach VirtualHost has the following configurable attributes:\n\n* Hostname\n* IP Address\n* Sandboxed Filesystem\n* User Pool\n* DNS server (common across all VirtualHosts)\n* Shell environment parameters (such as ``$PATH``)\n\n\nSupported Commands\n====================\n\nHornet currently supports the following commands:\n\n* ``cd``\n* ``ls``\n* ``echo``\n* ``ssh``\n* ``logout``\n* ``pwd``\n* ``ifconfig``\n* ``ping``\n* ``uname``\n\nInstallation\n==============\n\nInstalling is simple,\n\nInstall MySQL client libraries\n\n.. code-block::\n\n    $ sudo apt-get install libmysqlclient-dev\n\nThen install hornet using `pip`\n\n.. code-block::\n\n    $ pip install git+https://github.com/czardoz/hornet.git\n\nAnd since the latest version of telnetsrvlib on GitHub is super cool\n\n.. code-block::\n\n    $ pip install --upgrade git+https://github.com/ianepperson/telnetsrvlib.git#egg=telnetsrv-0.4.1\n\nUsage\n=======\n\nCreate a directory anywhere\n\n.. code-block::\n\n    $ mkdir ~/honeypot\n\nInitialize Hornet\n\n.. code-block::\n\n    $ cd honeypot\n    $ hornet -v\n\nYou should see something like this (ignore the errors):\n\n.. code-block::\n\n    2015-01-31 19:34:19,624 [INFO] (root) Starting Hornet, version: 0.0.1\n    2015-01-31 19:34:19,624 [INFO] (hornet.main) Config file /tmp/honeypot/config.json not found, copying default\n    2015-01-31 19:34:19,625 [DEBUG] (hornet.common.config) Default host set to: test02\n    2015-01-31 19:34:19,625 [INFO] (hornet.main) Creating directory /tmp/honeypot/vhosts for virtual host filesystems\n    2015-01-31 19:34:19,628 [ERROR] (hornet.core.host) IP address for test01 is not specified in the config file (or is \"null\")\n    2015-01-31 19:34:19,628 [INFO] (hornet.core.host) Assigned random IP 192.168.0.103 to host test01\n    2015-01-31 19:34:19,633 [ERROR] (hornet.core.host) IP Address 192.168.0.443 for test03 is not valid for the specified network\n    2015-01-31 19:34:19,633 [INFO] (hornet.core.host) Assigned random IP 192.168.0.27 to host test03\n    2015-01-31 19:34:19,640 [INFO] (hornet.main) SSH server listening on 127.0.0.1:59866\n\nOnce you get it working, you can set about configuring it. Hit `Ctrl+C` to stop the honeypot.\n\n.. code-block::\n\n    ...\n    2015-01-31 19:34:19,640 [INFO] (hornet.main) SSH server listening on 127.0.0.1:59866\n    ^CKeyboardInterrupt\n    2015-01-31 19:40:58,419 [INFO] (root) Quitting\n    2015-01-31 19:40:58,419 [DEBUG] (root) Stopping the server\n\nNow, you'll see a ``config.json`` created in the current directory.\n\n.. code-block::\n\n    $ cat config.json\n    {\n        \"port\": 0,\n        \"host\": \"127.0.0.1\",\n        \"key_file\": \"test_server.key\",\n        \"network\": {\n            \"network_ip\": \"192.168.0.0/24\",\n            \"dns_server\": \"192.168.0.2\",\n            \"gateway\": \"192.168.0.1\"\n        },\n        \"virtual_hosts\": [\n            {\n                \"hostname\": \"test02\",\n                \"valid_logins\": {\n                    \"mango\": \"apple\",\n                    \"vstfpd\": \"1q2w3e4r\",\n                    \"testuser\": \"testpassword\"\n                },\n                \"env\": {\n                    \"BROWSER\": \"firefox\",\n                    \"EDITOR\": \"gedit\",\n                    \"SHELL\": \"/bin/bash\",\n                    \"PAGER\": \"less\"\n                },\n                \"default\": true,\n                \"ip_address\": \"192.168.0.232\"\n            },\n            {\n                \"hostname\": \"test03\",\n                ...\n                \"ip_address\": \"192.168.0.443\"\n            }\n        ]\n    }\n\nEdit it according to your wish. You'll also see a ``vhosts/`` directory.\nInside it are the sandbox filesystems for each VirtualHost (as defined in\nthe config file). These filesystems can be populated with any files you\nwish.\n\nYou can now restart the honeypot:\n\n.. code-block::\n\n    $ hornet -v\n\n\nCareful!\n============\n\nHornet is under development, and should not be used for production purposes\nyet. There are a fair amount of bugs, and perhaps security risks. Know what\nyou're doing!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczardoz%2Fhornet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fczardoz%2Fhornet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fczardoz%2Fhornet/lists"}