HellPot 是一个基于 Heffalump 的无尽蜜罐,它会把不守规矩的 HTTP 机器人送入地狱。
值得注意的是,它实现了 toml 配置文件,具备 JSON 日志记录,并且带来了显著的性能提升。
忽视 robots.txt 并连接到你的 HellPot 实例的客户端(希望是机器人)将遭受永恒的惩罚。
HellPot 会发送无限流的数据,这些数据_极其接近_一个真实网站,以至于它们可能会一直停留,直到灵魂被撕裂并彻底消失。
在这种永恒折磨的背后,是一个马尔可夫引擎,它使用 fasthttp 将弗里德里希·尼采的《悲剧的诞生(希腊主义与悲观主义)》中的片段拼凑起来丢给客户端。
HellPot 应该使用 Go 1.17 或更高版本构建。
HellPot 使用 go modules。这使得使用标准 Go 安装环境编译变得极其简单。为了进一步简化,我们添加了一个 GNU Makefile。
1 ) git clone https://github.com/yunginnanet/HellPot
2 ) cd HellPot
4 ) make
5 ) 考虑你行动的潜在严重后果。
如果缺少配置文件,HellPot 将尝试将默认配置放在 $HOME/.config/HellPot/config.toml 中。这使得不负责任的灵魂可以轻松地开始倾泻地狱之火,立即:
1 ) 下载编译好的发布版
2 ) 运行二进制文件,立即开始将客户端直接送入地狱。
1 ) 配置 Web 服务器作为反向代理(见下文)
2 ) ./HellPot --genconfig
3 ) 根据需要编辑新生成的 config.toml。
4 ) 思考你的 存在 服务器处理你选择的性能值的能力。
5 ) ./HellPot -c config.toml
666 ) 𝙏͘͝𝙝̓̓͛𝙚͑̈́̀ 𝙨͆͠͝𝙠͑̾͌𝙮̽͌͆ 𝙞̓̔̔𝙨͒͐͝ 𝙛͑̈́̚𝙖͛͒𝙡͑͆̽𝙡̾̚̚𝙞͋̒̒𝙣̾͛͝𝙜͒̒̀.́̔͝
[!TIP] 配置值可以通过以
HELLPOT_为前缀的环境变量覆盖。 使用此方法时,请将配置键中的下划线替换为双下划线。例如: 要通过环境变量设置
http.bind_addr,请设置HELLPOT_HTTP_BIND__ADDR="x.x.x.x"
[deception]
# Used as "Server" HTTP header. Note that reverse proxies may hide this.
server_name = "nginx"
[http]
# TCP Listener (default)
bind_addr = "127.0.0.1"
bind_port = "8080"
# header name containing clients real IP, for reverse proxy deployments
real_ip_header = 'X-Real-IP'
# this contains a list of blacklisted useragent strings. (case sensitive)
# clients with useragents containing any of these strings will receive "Not found" for any requests.
uagent_string_blacklist = ["Cloudflare-Traffic-Manager", "curl"]
# Unix Socket Listener (will override default)
unix_socket_path = "/var/run/hellpot"
unix_socket_permissions = "0666"
use_unix_socket = false
[http.router]
# Toggling this to true will cause all GET requests to match. Forces makerobots = false.
catchall = false
# Toggling this to false will prevent creation of robots.txt handler.
makerobots = true
# Handlers will be created for these paths, as well as robots.txt entries. Only valid if catchall = false.
paths = ["wp-login.php", "wp-login"]
[logger]
# verbose (-v)
debug = true
# extra verbose (-vv)
trace = false
# JSON log files will be stored in the below directory.
directory = "/home/kayos/.local/share/HellPot/logs/"
# disable all color in console output. when using Windows this will default to true.
nocolor = false
# toggles the use of the current date as the names for new log files.
use_date_filename = true
[performance]
# max_workers is only valid if restrict_concurrency is true
max_workers = 256
restrict_concurrency = false
location '/robots.txt' {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080$request_uri;
}
location '/wp-login.php' {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080$request_uri;
}
所有不存在的 URL 都被反向代理到 localhost 上的一个 HellPot 实例,该实例设置为 catchall。由 HellPot 服务的流量被限制为 5 KiB/s。
<VirtualHost yourserver>
ErrorDocument 400 "/content/400"
ErrorDocument 403 "/content/403"
ErrorDocument 404 "/content/404"
ErrorDocument 500 "/content/405"
<Directory "$wwwroot/.well-known/">
ErrorDocument 400 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default
</Directory>
/* HTTP Honeypot / HellPot (need mod_proxy, mod_proxy_http) */
ProxyPreserveHost on
ProxyPass "/content/" "http://localhost:8080/"
ProxyPassReverse "/content/" "http://localhost:8080/"
/* Rate Limit config, need mod_ratelimit */
<Location "/content/">
SetOutputFilter RATE_LIMIT
SetEnv rate-limit 5
</Location>
/* Remaining config */
</VirtualHost>