TuziCMS 2.0.6 SQL注入漏洞分析

TuziCMS是一款用于企业官网的CMS,基于ThinkPHP 3.2.3版本

0x00 SQL注入

SQL注入发生于程序中针对参数过滤不严谨导致

发现在这款版本的TuziCMS大部分的参数都是没过滤,且使用的是拼接SQL语句字符串形式,因此可以注入的地方较多

定位到App\Home\Controller\ZhuantiController.class.php

一般参数都有:

if (!preg_match('/^\d+$/i', $id)){
    $this->error('url参数错误');
    exit;//仿制用户恶意输出url参数
}

但是这里没有做过滤,与此同时,直接进行了SQL拼接

SQL拼接ID

当SQL语句出错的时候,系统会直接提示错误信息

Core\Library\Think\Think.class.php

测试

默认设置的错误提示模版,定位到其下

错误

最下的halt()函数是用于错误输出的

那么,在默认开启debug或错误信息输出的情况下,就可以直接回显注入

0x01 Payload

payload

发表评论 / Comment

用心评论~

金玉良言 / Appraise
麦芽糖LV 1
2020-08-25 15:47
淳淳LV 1
2020-07-28 10:13
厉害
whtLV 2
2020-04-19 09:55
买单号,单号无忧为您解决www.dh5u.com
菜鸡LV 1
2020-04-11 22:05
牛批

Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/blog.dyboy.cn/content/templates/dyblog/footer.php:56) in /www/wwwroot/blog.dyboy.cn/include/lib/view.php on line 23