{"id":13392790,"url":"https://github.com/skeeto/endlessh","last_synced_at":"2025-05-14T04:09:06.662Z","repository":{"id":38707202,"uuid":"168906122","full_name":"skeeto/endlessh","owner":"skeeto","description":"SSH tarpit that slowly sends an endless banner","archived":false,"fork":false,"pushed_at":"2024-06-03T13:22:10.000Z","size":79,"stargazers_count":7613,"open_issues_count":49,"forks_count":288,"subscribers_count":85,"default_branch":"master","last_synced_at":"2025-04-09T02:14:40.750Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skeeto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-03T03:40:32.000Z","updated_at":"2025-04-07T04:57:31.000Z","dependencies_parsed_at":"2022-07-10T22:16:09.145Z","dependency_job_id":"fa125474-20ed-4cd8-a8d1-41c13fe4365a","html_url":"https://github.com/skeeto/endlessh","commit_stats":{"total_commits":99,"total_committers":18,"mean_commits":5.5,"dds":"0.31313131313131315","last_synced_commit":"dfe44eb2c5b6fc3c48a39ed826fe0e4459cdf6ef"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeeto%2Fendlessh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeeto%2Fendlessh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeeto%2Fendlessh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skeeto%2Fendlessh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skeeto","download_url":"https://codeload.github.com/skeeto/endlessh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254070013,"owners_count":22009559,"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-07-30T17:00:37.234Z","updated_at":"2025-05-14T04:09:01.645Z","avatar_url":"https://github.com/skeeto.png","language":"C","readme":"# Endlessh: an SSH tarpit\n\nEndlessh is an SSH tarpit [that *very* slowly sends an endless, random\nSSH banner][np]. It keeps SSH clients locked up for hours or even days\nat a time. The purpose is to put your real SSH server on another port\nand then let the script kiddies get stuck in this tarpit instead of\nbothering a real server.\n\nSince the tarpit is in the banner before any cryptographic exchange\noccurs, this program doesn't depend on any cryptographic libraries. It's\na simple, single-threaded, standalone C program. It uses `poll()` to\ntrap multiple clients at a time.\n\n## Usage\n\nUsage information is printed with `-h`.\n\n```\nUsage: endlessh [-vhs] [-d MS] [-f CONFIG] [-l LEN] [-m LIMIT] [-p PORT]\n  -4        Bind to IPv4 only\n  -6        Bind to IPv6 only\n  -d INT    Message millisecond delay [10000]\n  -f        Set and load config file [/etc/endlessh/config]\n  -h        Print this help message and exit\n  -l INT    Maximum banner line length (3-255) [32]\n  -m INT    Maximum number of clients [4096]\n  -p INT    Listening port [2222]\n  -s        Print diagnostics to syslog instead of standard output\n  -v        Print diagnostics (repeatable)\n```\n\nArgument order matters. The configuration file is loaded when the `-f`\nargument is processed, so only the options that follow will override the\nconfiguration file.\n\nBy default no log messages are produced. The first `-v` enables basic\nlogging and a second `-v` enables debugging logging (noisy). All log\nmessages are sent to standard output by default. `-s` causes them to be\nsent to syslog.\n\n    endlessh -v \u003eendlessh.log 2\u003eendlessh.err\n\nA SIGTERM signal will gracefully shut down the daemon, allowing it to\nwrite a complete, consistent log.\n\nA SIGHUP signal requests a reload of the configuration file (`-f`).\n\nA SIGUSR1 signal will print connections stats to the log.\n\n## Sample Configuration File\n\nThe configuration file has similar syntax to OpenSSH.\n\n```\n# The port on which to listen for new SSH connections.\nPort 2222\n\n# The endless banner is sent one line at a time. This is the delay\n# in milliseconds between individual lines.\nDelay 10000\n\n# The length of each line is randomized. This controls the maximum\n# length of each line. Shorter lines may keep clients on for longer if\n# they give up after a certain number of bytes.\nMaxLineLength 32\n\n# Maximum number of connections to accept at a time. Connections beyond\n# this are not immediately rejected, but will wait in the queue.\nMaxClients 4096\n\n# Set the detail level for the log.\n#   0 = Quiet\n#   1 = Standard, useful log messages\n#   2 = Very noisy debugging information\nLogLevel 0\n\n# Set the family of the listening socket\n#   0 = Use IPv4 Mapped IPv6 (Both v4 and v6, default)\n#   4 = Use IPv4 only\n#   6 = Use IPv6 only\nBindFamily 0\n```\n\n## Build issues\n\nSome more esoteric systems require extra configuration when building.\n\n### RHEL 6 / CentOS 6\n\nThis system uses a version of glibc older than 2.17 (December 2012), and\n`clock_gettime(2)` is still in librt. For these systems you will need to\nlink against librt:\n\n    make LDLIBS=-lrt\n\n### Solaris / illumos\n\nThese systems don't include all the necessary functionality in libc and\nthe linker requires some extra libraries:\n\n    make CC=gcc LDLIBS='-lnsl -lrt -lsocket'\n\nIf you're not using GCC or Clang, also override `CFLAGS` and `LDFLAGS`\nto remove GCC-specific options. For example, on Solaris:\n\n    make CFLAGS=-fast LDFLAGS= LDLIBS='-lnsl -lrt -lsocket'\n\nThe feature test macros on these systems isn't reliable, so you may also\nneed to use `-D__EXTENSIONS__` in `CFLAGS`.\n\n### OpenBSD\n\nThe man page needs to go into a different path for OpenBSD's `man` command:\n\n```\ndiff --git a/Makefile b/Makefile\nindex 119347a..dedf69d 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -14,8 +14,8 @@ endlessh: endlessh.c\n install: endlessh\n        install -d $(DESTDIR)$(PREFIX)/bin\n        install -m 755 endlessh $(DESTDIR)$(PREFIX)/bin/\n-       install -d $(DESTDIR)$(PREFIX)/share/man/man1\n-       install -m 644 endlessh.1 $(DESTDIR)$(PREFIX)/share/man/man1/\n+       install -d $(DESTDIR)$(PREFIX)/man/man1\n+       install -m 644 endlessh.1 $(DESTDIR)$(PREFIX)/man/man1/\n\n clean:\n        rm -rf endlessh\n```\n\n[np]: https://nullprogram.com/blog/2019/03/22/\n","funding_links":[],"categories":["C","Honeypots","Security","C (286)","蜜罐","Networking","Hardening"],"sub_categories":["Tarpits","Hardening","git help","Ghidra"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskeeto%2Fendlessh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskeeto%2Fendlessh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskeeto%2Fendlessh/lists"}