Web1234——九月
这两道题都是需要按照出题人的提示一步步走,脑洞比较大,价值不高。
登录
<!-- 用户信息都在user.php里 -->
<!-- 用户默认默认密码为用户名+出生日期 例如:zhangwei1999 -->
找到user.php.bak备份文件,利用burp爆破
username=zhangyuzhen&password=zhangyuzhen1995
上传点
<!-- 存在漏洞需要去掉 -->
<!-- <form action="" method="POST" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="submit" name="submit" value="上传" />
</form> -->
上传点被注释掉了,用控制台工具改出来。本以为是上传马什么的,各种提示文件后缀不允许,文件名不合法,不知道要干什么,后来看了wp才知道,这就是你上传一个满足他要求的文件以及文件名就可以拿到下一个提示。
------WebKitFormBoundaryOgBCBCdqIplbNGBJ
Content-Disposition: form-data; name="file"; filename="muma.jpg.pht"
Content-Type: text/php
asdasdasd
------WebKitFormBoundaryOgBCBCdqIplbNGBJ
Content-Disposition: form-data; name="submit"
上传
------WebKitFormBoundaryOgBCBCdqIplbNGBJ--
这里的文件名用xxx.jpg.pht/xxx.jpg.phtml
文件内容随便填些合法的,返回成功
<a href="/view.php">view</a>
file?
尝试文件包含,构造一个file参数,提示
filter “flag”,双写flag绕过,拿到flag
/view.php?file=flaflagg
NotFound——十月
404
发现目录有
- index.php(伪装404,提示X-Method)
- 1.php(200)
- 404.php (200)
http方法
- GET
- POST
- HEAD
- OPTIONS
- PUT
一顿尝试发现用OPTIONS方法请求index.php出现提示
Location: ?f=1.php
文件包含
- 还是需要用OPTIONS方法去请求
index.php?f=1.php
,可看到打印出了1.php的文件内容,尝试包含index.php,404.php失败。 - 最终尝试包含
.htaccess
文件成功
RewriteEngine On
RewriteBase /
RewriteRule ^8d829d8568e46455104209db5cd9228d.html$ 404.php [L]
- 继续包含8d829d8568e46455104209db5cd9228d.html这个文件访问不成功,直接GET方法访问成功。
伪造来源ip
- 提示xff,用xff伪造请求头失败
- client-ip伪造请求头成功