Thinksaas SQL注入#3

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

### 简要描述: Thinksaas SQL注入#3 ### 详细说明: 在Thinksaas 的小组功能处,发完贴后,可以补贴。 在编辑补贴时,过滤不完整,导致SQL注入,直接可以注入出数据,显示到帖子内容中。 /app/group/action/after.php文件,在边编辑补贴内容时: ``` //编辑执行 case "edo": if($_POST['token'] != $_SESSION['token']) { tsNotice('非法操作!'); } $afterid = intval($_POST['afterid']); $strAfter = $new['group']->find('group_topic_add',array( 'id'=>$afterid, )); if($strAfter['userid'] == $userid || $TS_USER['user']['isadmin']==1){ $content = tsClean($_POST['content']); $title = tsClean($_POST['title']); //过滤内容开始 aac('system')->antiWord($title); aac('system')->antiWord($content); //过滤内容结束 $new['group']->update('group_topic_add',array( 'id'=>$afterid, ),array( 'title'=>$title, 'content'=>$content, 'uptime'=>time(), )); ``` 利用tsClean函数过滤,/thinksaas/tsFunction.php: ``` /** * 过滤脚本代码 * @param unknown $text * @return mixed */ function cleanJs($text) { $text = trim ( $text ); $text = stripslashes ( $text ); // 完全过滤注释 $text = preg_replace ( '/<!--?.*-->/', '', $text ); // 完全过滤动态代码 $text = preg_replace (...

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