{"id":16591731,"url":"https://github.com/nhh/tarbit","last_synced_at":"2025-10-29T10:30:20.722Z","repository":{"id":59157277,"uuid":"243193911","full_name":"nhh/tarbit","owner":"nhh","description":"Tarbit is a tcp tarpit written in ruby.","archived":false,"fork":false,"pushed_at":"2023-10-31T19:46:11.000Z","size":144,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T04:38:50.058Z","etag":null,"topics":["bots","networking","ruby","security"],"latest_commit_sha":null,"homepage":"https://github.com/nhh/tarbit","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nhh.png","metadata":{"files":{"readme":"README.md","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":"2020-02-26T07:16:27.000Z","updated_at":"2023-04-02T08:05:15.000Z","dependencies_parsed_at":"2022-09-13T20:11:39.899Z","dependency_job_id":null,"html_url":"https://github.com/nhh/tarbit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhh%2Ftarbit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhh%2Ftarbit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhh%2Ftarbit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nhh%2Ftarbit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nhh","download_url":"https://codeload.github.com/nhh/tarbit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238803445,"owners_count":19533317,"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":["bots","networking","ruby","security"],"created_at":"2024-10-11T23:17:47.811Z","updated_at":"2025-10-29T10:30:20.314Z","avatar_url":"https://github.com/nhh.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tarbit - A async ruby tcp tarpit\n\n## Introduction\n\nTarbit is a tcp tarpit written in ruby. It can slow down automated ssh/http/tcp \"attacks\" or bot connections. \nIt is designed to consume a very little amount of cpu and memory. Tarbit can also generate statistic images.\n\n*\"Red Wood Cutting\", Vladimir Kush*\n\n![\"Red Wood Cutting\", Vladimir Kush](.assets/red-wood-cutting_vladimir-kush.jpg)\n\nTarbit is heaviliy inspired by endlessh, the python version, feel free to take a look: https://nullprogram.com/blog/2019/03/22/\n\n## Installation\n\n```\ngem install tarbit\n```\n\nYou can now run tarbit manually (you can also omit the default params):\n\nThe interval option marks the seconds until the statistics are written to disk.\n\n```\ntarbit serve --port 22 --interval 1800\n```\n\n## Advanced\n\nCreate a systemd service\n\nVerify your tarbit executable: (change the path `bin` to `wrapper` within the systemd `ExecStart` )\n\n```\nwhich tarbit\n```\n\n```bash\n[Unit]\nDescription=Tarbit - ruby ssh tarpit\n\n[Service]\nType=simple\nExecStart=/usr/local/rvm/gems/ruby-2.6.5/wrappers/tarbit serve\nAmbientCapabilities=CAP_NET_BIND_SERVICE\n\n[Install]\nWantedBy=multi-user.target\n```\n\nCreate a cron job for making statistic snapshots:\n\nAgain make sure the path has changed `bin` with `wrapper`\n\n```\n* */2 * * * /usr/local/rvm/gems/ruby-2.6.5/wrappers/tarbit snapshot\n```\n\nIt is recommended to cleanup the statistics folder. You can use a cron job too.\n(It will remove all statistics every 12 hours)\n\n```\n* */12 * * * rm /etc/tarbit/statistics/*.json\n```\n\nEnjoy statistics like these:\n\n![A simple line graph showin connections over time](.assets/1582830001.png)\n\n\n## Troubleshooting\n\nNative extensions: Imagemagick can not find `MagickWand.h`\n\nOn Ubuntu, you can run:\n```\nsudo apt-get install libmagickwand-dev\n```\n\nOn Centos, you can run:\n```\nsudo yum install gcc ImageMagick-devel make which\n```\n\nOn Macos, you can run: \n\n```\nbrew install imagemagick@6\nbrew link --force imagemagick@6\n```\n\nOn Windoes, you can install Linux instead.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhh%2Ftarbit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnhh%2Ftarbit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnhh%2Ftarbit/lists"}