
بسم الله والصلاة والسلام على رسول الله
اللهم علمنا ما ينفعنا وانفعنا بما علمتنا وقنا عذاب النار
Challenge Link :
https://cyberdefenders.org/blueteam-ctf-challenges/azurepot/
Scenario : This Ubuntu Linux honeypot was deployed in Azure in early October to monitor activities related to the exploitation of CVE-2021–41773.\
→ Initially, the system attracted a significant number of cryptocurrency miners. To mitigate this, a cron script was implemented to remove files named “kinsing” in the /tmp directory. This action was taken to prevent these miners from interfering so that more interesting activities could be observed.
First Section :\
File: sdb.vhd : sdb.vhd.gz: This file is a Virtual Hard Disk (VHD) of the main drive, obtained through an Azure disk snapshot.
There is a script that runs every minute to do cleanup. What is the name of the file?
i use “Autopsy” and “FTK” To open the “VHD” File
from this Guide :

/var/spool/cron/crontabs

ans → .remove.sh
The script in Q1 terminates processes associated with two Bitcoin miner malware files. What is the name of 1st malware file?
the script path : /root/.remove.sh , we need to go to this path and check the file contents

we find 2 malwares that the “remove.sh” kill them at /tmp path
ans → kinsing
The script changes the permissions for some files. What is their new permission?
from the previous image : chmod 444 /tmp/k*
ans → 444
What is the SHA256 of the botnet agent file?
I looked in /tmp because attackers often store odd executables or scripts in paths like /tmp. Sure enough, I found a strangely-named executable, extracted it, calculated its hash, and uploaded it to VirusTotal.



This malware is part of Apache Log4j RCE Attempt(s) (also known as CVE-2021–44228 or Log4Shell).
ans → 0e574fd30e806fe4298b3cbccb8d1089454f42f52892f87554325cb352646049
What is the name of the botnet in Q4?

ans → tsunami
What IP address matches the creation timestamp of the botnet agent file in Q4?


Now I’ll check the Apache logs the attacker is definitely trying to exploit that vulnerability. Indeed, I found the attacker making many POST requests at the same time.
apache logs /var/log/apache2/access_log


ans → 141.135.85.36
What URL did the attacker use to download the botnet agent?
Now the attacker is trying to download his malicious files to the web server, so he’ll likely use tools like wget, curl, wmi, etc.\
I searched the Apache logs for the malware name and found it in error.log a few seconds before the malware’s Created timestamp.

So the attacker attempted to download the malware to the web server at 19:07 and failed, but a few seconds later retried and succeeded — the proof is that we actually found the file on the system.
Ans → http://138.197.206.223:80/wp-content/themes/twentysixteen/dk86
What is the name of the file that the attacker downloaded to execute the malicious script and subsequently remove itself?
“I couldn’t answer it.”
The attacker downloaded SH scripts. What are the names of these files?



ans → 0_cron.sh,0_linux.sh,ap.sh
second section :\
uac.tgz: This file contains the results of User Account Control (UAC) running on the system.
Two suspicious processes were running from a deleted directory. What are their PIDs?
lsof:(short for “list open files”) is a command-line utility used on Unix-like operating systems to display a list of all open files and the processes that opened them
live_response\process\lsof_-nPl.txt


ans → 6388,20645
What is the suspicious command line associated with the PID that ends with `45` in Q10?

ans → sh .src.sh
UAC gathered some data from the second process in Q10. What is the remote IP address and remote port that was used in the attack?
live_response\process\proc\20645 ( PID)


Ans → 116.202.187.77:56590
Which user was responsible for executing the command in Q11?
from Q11
ans → daemon
Two suspicious shell processes were running from the tmp folder. What are their PIDs?


ans → 15853,21785
Third Section : — ubuntu.20211208.mem.gz: This file is a memory dump created using Lime.
What is the MAC address of the captured memory?

ans → 00:22:48:26:3b:16
Based on Bash history. The attacker downloaded the SH script. What is the name of the file?

ans → unk.sh
سبحانك اللهم وبحمدك, أشهد أن لا إله إلا أنت, نستغفرك ونتوب إليك