【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】

连接:Hack The Box

文件下载解压后是一个内存文件santaclaus.bin,使用vol3去进行内存取证,因为该内存镜像是win10版本的

1.What is the name of the file that is likely copied from the shared folder (including the file extension)?【可能从共享文件夹复制的文件的名称是什么(包括文件扩展名)?】

使用命令 vol.py -f santaclaus.bin windows.filescan.FileScan | grep -E "\.txt|\.png|\.jpg|\.gif|\.zip|\.rar|\.7z|\.pdf|\.doc"检索可疑文件,发现有个present_for_santa.zip

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第1张图片

根据题目背景,该文件就是本题flag

2.What is the file name used to trigger the attack (including the file extension)?【用于触发攻击的文件名是什么(包括文件扩展名)?】

把压缩包导出并解压后发现里面有两个文件,一个快捷方式一个vbs脚本,猜测为click_for_present文件,加上后缀名.lnk后提交

3.What is the name of the file executed by click_for_present.lnk (including the file extension)?【click_for_present.lnk执行的文件的名称是什么(包括文件扩展名)?】

右键click_for_present.lnk文件,可以看到目标经过base64编码

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第2张图片

对编码字段进行解码,可以知道触发文件为vbs脚本

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第3张图片

4.What is the name of the program used by the vbs script to execute the next stage?【vbs脚本用于执行下一阶段的程序的名称是什么?】

打开vbs脚本,首先把注释全部去除,这里我是用Sublime正则去除的

然后看代码,可以看到这里有个powerShell

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第4张图片

也可以将最终结果输出后查看

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第5张图片

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第6张图片

可以看到用powerShell执行后续代码

5.What is the name of the function used for the powershell script obfuscation?【用于powershell脚本模糊处理的函数的名称是什么?】

看脚本代码[Function WrapPresent ($Ensproglig){.....]可以知道函数是WrapPresent

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第7张图片

6.What is the URL that the next stage was downloaded from?【下载下一阶段的URL是什么?】

该问题问的是从哪里下载,而该powershell脚本表面看上去没有可以地方,所以要把它每个参数的值经过处理后的字符输出,这里修改powershell脚本

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第8张图片

可以看到输出结果中DownloadFile(¥present,¥persentLocation),可以看到其中persent是一个url,这就是下载连接

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第9张图片

7.What is the IP and port that the executable downloaded the shellcode from (IP:Port)?【可执行文件下载shell代码的IP和端口是什么(IP:port)?】

从上题可以知道最后执行了present.exe

将该文件导出后进行分析,可以看到它创建了一个套接字连接,IP是77.74.198.52,端口是445

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第10张图片

8.What is the process ID of the remote process that the shellcode was injected into?【shell代码被注入到的远程进程的进程ID是什么?】

使用vol3查看网络情况,查看与可疑ip相关的端口

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第11张图片

9.After the attacker established a Command & Control connection, what command did they use to clear all event logs?【攻击者建立命令和控制连接后,他们使用了什么命令来清除所有事件日志?】

翻powershell日志

0xa48dfefe6e50 \Windows\System32\winevt\Logs\Windows PowerShell.evtx 216

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第12张图片

10.What is the full path of the folder that was excluded from defender?【从defender中排除的文件夹的完整路径是什么?】

翻日志【powershell或defender】

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第13张图片

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第14张图片

11.What is the original name of the file that was ingressed to the victim?【受害者收到的文件的原名是什么?】

从powershell日志最新记录可以知道可疑文件名字

导出PresentForNaughtyChild.exe 文件

直接执行或用ida分析,可以看到是ProcDump

12.What is the name of the process targeted by procdump.exe?【procdump.exe所针对的进程的名称是什么?】

直接翻日志可以知道是lsass.exe

flag

【HTB-Sherlocks-OpTinselTrace-3 WP 应急响应-内存取证】_第15张图片

你可能感兴趣的:(网络安全-应急,网络安全)