Thinksaas SQL注入#2

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

### 简要描述: Thinksaas SQL注入#2 ### 详细说明: Thinksaas 最新版在小组发表帖子时,帖子内容中可以@其他用户,这里在处理@的用户时,只在前台过滤,未在后台过滤,而且没有通过sql安全检查,直接拼接到sql语句中,导致sql注入。还有一处是在编辑补贴内容处,title和content都么过滤 来看看发帖的地方,参数的传递: ``` // 执行发布帖子 case "do" : if ($_POST ['token'] != $_SESSION ['token']) { tsNotice ( '非法操作!' ); } $authcode = strtolower ( $_POST ['authcode'] ); if ($TS_SITE ['base'] ['isauthcode']) { if ($authcode != $_SESSION ['verify']) { tsNotice ( "验证码输入有误,请重新输入!" ); } } $groupid = intval ( $_POST ['groupid'] ); $title = tsClean ( $_POST ['title'] ); $content = tsClean ( $_POST ['content'] ); $typeid = intval ( $_POST ['typeid'] ); $tag = tsClean ( $_POST ['tag'] ); ``` 跟进tdClean函数: ``` function cleanJs($text) { $text = trim ( $text ); $text = stripslashes ( $text ); // 完全过滤注释 $text = preg_replace ( '/<!--?.*-->/', '', $text ); // 完全过滤动态代码 $text = preg_replace ( '/<\?|\?>/', '', $text ); // 完全过滤js $text = preg_replace ( '/<script?.*\/script>/', '', $text ); // 过滤多余html $text = preg_replace (...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息