信息收集
(1)如图,为环境搭建好之后的状态,暂时什么都未知  (2)使用nmap工具对网段进行扫描,获取到xxe平台的IP和端口开放情况,可以判断出该平台IP为192.168.159.223 (3)进行验证,成功 (4)使用kali工具dirsearch对网站进行目录扫描,发现敏感文件robots.txt 
(5)访问192.168.159.223/robots.txt,再次发现两个敏感文件,依次访问 访问http://192.168.159.223/xxe  访问http://192.168.159.223/admin.php 
开始渗透
(1)由上面访问的结果来看,xxe文件可以访问,但是admin.php文件访问失败,但是文件存在,其中必定由猫腻,我们先对xxe页面进行渗透看看
(2)访问xxe页面后,随便输入账号,密码后进行抓包,如图,可以发现请求正文为XML结构,尝试利用XXE注入。  (3)构造如图payload,成功验证出存在XXE漏洞注入 
在原有基础上,添加XML声明,DTD声明,并通过xxe变量引用。
(4)因为前面扫描出存在admin.php文件,但是无法访问,我们可以通过这里的XXE注入,读取admin.php文件。构造如图,成功读取到admin.php源码  
并且可以通过base64解密得出源码
(5)从php源码可找出又存在一个敏感文件,并可以通过得到的账号administhebest和密码登录,密码使用md5加密,解密得admin@123即可

 
(6)最后得到flag的网站,访问再次失败,直接再次使用XML注入获取源码即可,如图 
解密得 
通过判断,这里得加密方式为base32,解密后再使用base64解密,最后得出存在flag得路径 
成功!!!
(1)最后利用XXE漏洞,访问该文件  解码,得出一堆不太友好得数据或者代码,因为是php语言写的,可以通过php在线运算。 (2)得出flag,SAFCSP{xxe_is_so_easy}  
|