靶场搭建

随便输入一个账号密码登录 并用bp进行抓包

右击发送到重放器(Reperter)
<?xml version="1.0"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "php://filter/read=convert.base64-encode/resource=c:/flag/flag"> ] >
通过php协议base64加密读写flag

将得到的编码进行base64解密

得到flag
靶机搭建
靶机IP:192.168.131.169

御剑工具扫描后台目录

分别访问两个目录

发现两个子文件 分别尝试访问

admin.php访问失败 试试另外一个

访问xxe 发现是一个登录页面
随机输入账号密码登录进行bp抓包

右击发到重放器

可以看到有回显信息
<!DOCTYPE name [
<!ENTITY xxe SYSTEM "php://filter/read=convert.base64-encode/resource=admin.php"> ] >
通过php协议base64加密读写admin.php

将得到的编码进行base64解码

查看解码的结果可以看到username password

进行cmd5解密 得到密码

进行admin.php登陆


点击flag

没有找到,将发现的flagmeout.php放到xxe里找一下,右击查看源代码

得到JQZFMMCZPE4HKWTNPBUFU6JVO5QUQQJ5
先进行base32解码 再进行base64解码


得到路径,再次抓包

<!DOCTYPE name [
<!ENTITY xxe SYSTEM "file:etc/.flag.php" > ]>

将得到的代码放入php文件中运行


得到flag