Rustpad:一款功能强大的多线程Padding Oracle漏洞挖掘工具

admin 2022年2月7日00:33:17评论94 views字数 5717阅读19分3秒阅读模式

Rustpad:一款功能强大的多线程Padding Oracle漏洞挖掘工具

Rustpad:一款功能强大的多线程Padding Oracle漏洞挖掘工具
网络侦查研究院

服务全国情报侦查人员,培养网络情报思维,提高网络情报侦查能力。
公众号

Rustpad:一款功能强大的多线程Padding Oracle漏洞挖掘工具

关于Rustpad

Rustpad是一款功能强大的多线程Padding Oracle漏洞挖掘工具,该工具是PadBuster漏洞挖掘工具的继承者,相当于站在前人的肩膀上实现了自己的功能。该工具基于Rust开发,并且能够利用PaddingOracle漏洞在不知道加密密钥的情况下解密任意密文或加密任意明文数据。

功能介绍

1、解密任意密文

2、加密任意明文

3、块级和字节级的多线程

4、高级实时交互式用户接口

5、No-TTY支持,因此可以通过管道进行数据传输

6、进度条和自动重试

7、智能检测密码文本编码,支持:十六进制、base64、base64url

8、采用纯Rust安全开发,确保了工具的可用性

工具下载&安装

广大研究人员可以使用下列命令将该项目源码克隆至本地:

git clone https://github.com/Kibouo/rustpad.git

Arch Linux【aurv1.7.3-1

yay -Syu rustpad

Kali / Debian【debv1.7.3

apt install ./rustpad.deb

其他操作系统平台【crates.io v1.7.3

cargo install rustpad

工具使用

使用Rustpad来测试Padding Oracle漏洞其实是非常容易的,该工具只需要四个参数信息即可开始漏洞挖掘:

1、目标Oracle(--oracle)

2、需要解密的密文(--decrypt)

3、块大小(--block-size)

4、Oracle类型(Web / 脚本)

工具帮助信息

; rustpad --help  rustpad  Multi-threaded Padding Oracle attacks against any service.     USAGE:      rustpad [OPTIONS] --block-size  --decrypt  --oracle       OPTIONS:      -B, --block-size               Block size used by the cypher [possible values: 8, 16]         -D, --decrypt               Original cypher text, received from the target service, which is to be decrypted             --delay               Delay between requests within a thread, in milliseconds [default: 0]         -e, --encoding               Specify encoding used by the oracle to encode the cypher text [default: auto]  [possible values: auto, base64, base64url, hex]         -E, --encrypt               Plain text to encrypt. Encryption mode requires a cypher text to gather necessary data         -h, --help              Prints help information             --no-cache              Disable reading and writing to the cache file         -n, --no-iv              Cypher text does not include an Initialisation Vector             --no-url-encode              Disable URL encoding and decoding of cypher text         -O, --oracle               The oracle to question with forged cypher texts. This can be a URL or a shell script.              See the subcommands `web --help` and `script --help` respectively for further help.      -o, --output               File path to which log output will be written         -t, --threads               Amount of threads in the thread pool         -V, --version              Prints version information         -v, --verbose              Increase verbosity of logging        SUBCOMMANDS:      web       Question a web-based oracle  script    Question a script-based oracle

Web模式

Web模式下,指定的目标Oracle需位于Web上。换句话说,我们的目标Oracle是一个带有URL的Web服务器。

为了保证Padding Oracle成功,如果提供了填充不正确的密文文本,那么Rustpad将会对Oracle的响应信息进行分析,并根据Oracle的行为来对自身进行自动校准。

; rustpad web --help  rustpad-web  Question a web-based oracle     USAGE:      rustpad --block-size  --decrypt  --oracle  web [OPTIONS]     OPTIONS:      -c, --consider-body              Consider the response body and content length when determining the web oracle's response to (in)correct padding         -d, --data               Data to send in a POST request             --delay               Delay between requests within a thread, in milliseconds [default: 0]         -e, --encoding               Specify encoding used by the oracle to encode the cypher text [default: auto]  [possible values: auto, base64, base64url, hex]         -h, --help              Prints help information         -H, --header 
...             HTTP header to send       -k, --insecure             Disable TLS certificate validation       -K, --keyword              Keyword indicating the location of the cypher text in the HTTP request. It is replaced by the cypher text's value at runtime [default: CTEXT]           --no-cache             Disable reading and writing to the cache file       -n, --no-iv             Cypher text does not include an Initialisation Vector           --no-url-encode             Disable URL encoding and decoding of cypher text       -o, --output              File path to which log output will be written       -x, --proxy              Proxy server to send web requests over. Supports HTTP(S) and SOCKS5           --proxy-credentials              Credentials to authenticate against the proxy server with [format: :]       -r, --redirect             Follow 302 Redirects       -t, --threads              Amount of threads in the thread pool       -T, --timeout              Web request timeout in seconds [default: 10]       -A, --user-agent              User-agent to identify with [default: rustpad/]       -v, --verbose             Increase verbosity of logging     Indicate the cypher text's location! See `--keyword` for clarification.

脚本模式

脚本模式是为超级用户或CTF玩家准备的,并且能够提供一个可运行的脚本,该模式下的目标Oracle是一个本地Shell脚本。

脚本将允许我们能对本地Oracle或更特殊的服务进行漏洞测试。或者说,我们也可以使用脚本模式来自定义或扩展Rustpad的功能。

; rustpad script --help  rustpad-script  Question a script-based oracle     USAGE:      rustpad --block-size  --decrypt  --oracle  script [OPTIONS]     OPTIONS:          --delay               Delay between requests within a thread, in milliseconds [default: 0]         -e, --encoding               Specify encoding used by the oracle to encode the cypher text [default: auto]  [possible values: auto, base64, base64url, hex]         -h, --help              Prints help information             --no-cache              Disable reading and writing to the cache file         -n, --no-iv              Cypher text does not include an Initialisation Vector             --no-url-encode              Disable URL encoding and decoding of cypher text         -o, --output               File path to which log output will be written         -t, --threads               Amount of threads in the thread pool         -v, --verbose              Increase verbosity of logging        Script must respond with exit code 0 for correct padding, and any other code otherwise. Cypher text is passed as the 1st argument.

即将添加的功能

1、Tab键自动补全

2、智能化URL解析

3、高级校准

4、块大小自动检测

5、改进Linux二进制文件的大小

6、.NET URL令牌编码

项目地址

Rustpad:【https://github.com/Kibouo/rustpad】

参考资料

https://github.com/AonCyberLabs/PadBuster

https://en.wiki*pedia.org/wiki/Padding_oracle_attack




END

Rustpad:一款功能强大的多线程Padding Oracle漏洞挖掘工具


原文始发于微信公众号(网络侦查研究院):Rustpad:一款功能强大的多线程Padding Oracle漏洞挖掘工具

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年2月7日00:33:17
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Rustpad:一款功能强大的多线程Padding Oracle漏洞挖掘工具http://cn-sec.com/archives/766550.html

发表评论

匿名网友 填写信息