当前位置: 首页 > ops >正文

17 BTLO 蓝队靶场 Pretium 解题记录

  • 主题:流量分析
  • 工具:Wireshark 

Wireshark Basic Guide      

Guide 2

场景:In this scenario, a user interacted with a link from an email which downloaded a malicious invoice file. A network capture was performed at the time of the incident and we are asked to analyse the pcap capture.

找这个恶意invoice, File -> Export Objects -> HTTP

题目1. What is the name of the module used to serve the malicious payload?

python3 -m http.server会开启这个服务

题目2:Analysing the traffic, what is the attacker’s IP address?

192.168.1.9

题目3:Now that you know the payload name and the module used to deliver the malicious files, what is the URL that was embedded in the malicious email?

拼起来, 

http://192.168.1.9:443/INVOICE_2021937.pdf.bat

题目4:Find the PowerShell launcher string (you don’t need to include the base64 encoded script)

http流中有:

答案是

powershell -noP -sta -w 1 -enc

参数解释:

-noP
全称:-NoProfile
作用:启动 PowerShell 时不加载当前用户的配置文件($PROFILE)。
目的:加快启动速度,避免用户配置文件中的自定义设置干扰脚本执行。
-sta
全称:-STA(Single-Threaded Apartment)
作用:以单线程模式运行 PowerShell。
背景:某些 COM 组件或旧版 .NET 库需要单线程环境才能正常工作。
-w 1
全称:-WindowStyle 1
作用:将 PowerShell 窗口设置为隐藏模式(WindowStyle.Hidden)。
目的:隐蔽执行,避免被用户察觉。
-enc
全称:-EncodedCommand
作用:接受一个 Base64 编码的字符串,PowerShell 会解码并执行其中的命令。
用途:绕过命令行长度限制。

所以后面的那一串应该用base64解码。

题目5: What is the default user agent being used for communications?

解码后的文件中 user-agent 是 $u,指向 Mozilla/5.0

题目6:You are seeing a lot of HTTP traffic. What is the name of a process where malware communicates with a central server asking for instructions at set time intervals?

这种手法叫beaconing

"Malware beaconing lets hackers know they’ve successfully infected a system so they can then send commands and carry out an attack."

题目7: What is the URI containing ‘login’ that the victim machine is communicating to?

用http和frame包含“login”筛选:

题目8: What is the name of the popular post-exploitation framework used for command-and-control communication?

如果我们通过Wireshark检查仅HTTP流量(过滤http),可以识别出机器被感染后请求的一系列不同URL:

/news.php
/login/process.php
/admin/get.php
Google搜索关键词malware +news.php +/login/process.php +/admin/get.php时,发现关联Powershell Empire

题目8:It is believed that data is being exfiltrated. Investigate and provide the decoded password

附带的一份阅读材料链接提到了通过隐蔽通道解码传输的载荷。其中举例的两种协议是DNS和ICMP。查询发现受感染服务器与攻击服务器之间没有出现任何DNS流量,但使用ip.src == 192.168.1.8 and ip.dst == 192.168.1.9 and icmp可以观察到大量ICMP流量——有一万个数据包:

C:\Users\BTLOTest\Desktop\Investigation>tshark.lnk -r C:\Users\BTLOTest\Desktop\Investigation\LAB.pcap -T fields -e data ip.src == 192.168.1.8 and ip.dst == 192.168.1.9 and icmp > C:\Users\BTLOTest\Desktop\data.txt

-T fields 表示输出格式为字段(而不是默认的摘要)
-e data 表示只提取数据包中的 data 字段(即 ICMP 载荷部分)

然后打开data.txt,用CyberChef,三种Recipe:  From Hex, From Base64 and Regex

Y0uthinky0ucAnc4tchm3$$

问题9:What is the account’s username?

上一题有答案 $sec-account

    http://www.xdnf.cn/news/15890.html

    相关文章:

  • MySQL表的基础操作
  • 微软CEO Satya Nadella提出AI重构法则:从范式跃迁到社会盈余
  • 病历数智化3分钟:AI重构医院数据价值链
  • OpenGL鼠标控制沿着指定轴旋转
  • JSX(JavaScript XML)‌简介
  • wordle game(猜词游戏)小demo【react + ts】
  • 删除 XML 格式中双引号内的空格
  • 前后端分离项目进阶1---后端
  • Apache IoTDB(2):时序数据库 IoTDB 集群安装部署的技术优势与适用场景分析
  • Electron 主进程与渲染进程之间交互方式
  • 跑腿小程序|基于微信小程序的跑腿平台小程序设计与实现(源码+数据库+文档)
  • kotlin和Jetpack Compose对于Android系统来说是什么关系?
  • 【HTTP缓存机制深度解析:从ETag到实践策略】
  • c语言 进阶 动态内存管理
  • 客流分析核心算法 trajectory_event_analyzer数据结构
  • 深入解析Hadoop YARN:三层调度模型与资源管理机制
  • 单表查询-counter的使用
  • Centos卷挂载失败系统无法启动
  • c++ duiLib 使用xml文件编写界面布局
  • Protein FID:AI蛋白质结构生成模型评估新指标
  • axios二次封装-单个、特定的实例的拦截器、所有实例的拦截器。
  • Apache基础配置
  • C语言:深入理解指针(2)
  • 《汇编语言:基于X86处理器》第8章 复习题和练习,编程练习
  • Spring Cloud Gateway高危隐患
  • MySQL—表设计和聚合函数以及正则表达式
  • 2024年全国青少年信息素养大赛Scratch算法创意实践挑战赛 小高组 初赛 真题
  • Python适配器模式详解:让不兼容的接口协同工作
  • 【LeetCode数据结构】单链表的应用——环形链表问题详解
  • 详解Mysql索引合并