#dos #hulk #infosec

app hulk-rs

HULK DoS 工具,移植到 Rust 并添加了额外功能

3 个稳定版本

1.2.3 2022 年 7 月 23 日

#22 in #dos

GPL-3.0 许可证

24KB
171

hulk-rs

HULK DoS 工具移植到 Rust。HULK 代表 Http Unbearable Load King

该项目受到 hulk 的启发,它是一个将原始 Python HULK 工具移植到 Go 的版本,并添加了一些额外功能。
我决定将其移植到 Rust 作为学习 Rust 的练习。

与使用 goroutines 代替线程的 Go 版本一样,想法是使用 tokio 任务,这应该会提供与 goroutines 相似的表现。

它做什么?

HULK 通过向提供的 URL 添加具有随机名称和值的 GET 参数来工作(hulk-rs 还提供了选择此 GET 参数固定名称的选项)。它还随机化 User-Agent 和 Referer HTTP 头。
目标是“绕过”潜在的缓存机制,导致每次请求都指向后端,这可能导致资源负载有时比服务静态缓存版本的页面高出 100 倍以上。这允许即使是一台具有较慢互联网连接的单台机器也能在大型、配置不佳的服务器上创建拒绝服务。

免责声明

此工具设计为用作压力测试工具,以测试服务器对这种类型 DoS 攻击的弹性,如果在不合理配置的服务器/应用程序上使用,可能会导致完全的拒绝服务。请谨慎负责地使用。

如何安装

您可以使用 cargo 直接安装此工具。只需运行 cargo install hulk-rs

从源代码构建

只需在存储库根目录中运行 cargo build --release 即可,构建的可执行文件应在 target/release/ 中。

如何使用

USAGE:
    hulk-rs [OPTIONS] <TARGET>

ARGS:
    <TARGET>    Target URL (eg. http://example.com)

OPTIONS:
    -h, --help                   Print help information
    -m <MAX_CONNECTIONS>         Maximum number of concurrent connections to the target [default:
                                 1000]
    -p <PARAMETER_NAME>          Name of a GET parameter to add to the request (the value will be
                                 fuzzed, instead of fuzzing both the name of a GET parameter and its
                                 value)
    -r <REFERERS_FILE>           File containing a list of Referers to use
    -u <USER_AGENTS_FILE>        File containing a list of user agents to use
    -v, --verbose                verbose mode (display HTTP error codes)

示例

最简单用法
hulk-rs https://example.com/

针对特定的 GET 参数(该参数将被附加到给定的目标 URL),只有 100 个并发连接,并从文件加载 User-Agent
hulk-rs-m100 -p playername-u/path/to/user_agents_file http://example.com/game.php?action=newgame
(生成的URL将类似于 http://example.com/game.php?action=newgame&playername=<random_string>

依赖项

~8-19MB
~253K SLoC