بسم الله والصلاة والسلام على رسول الله
اللهم علمنا ما ينفعنا وانفعنا بما علمتنا وقنا عذاب النار

Lab Link :
https://cyberdefenders.org/blueteam-ctf-challenges/bankingtroubles/
Scenario : Company X has contacted you to perform forensics work on a recent incident that occurred. One of their employees had received an e-mail from a co-worker that pointed to a PDF file. Upon opening, the employee did not notice anything; however, they recently had unusual activity in their bank account.\
The initial theory is that a user received an e-mail, containing an URL leading to a forged PDF document. Opening that document in Acrobat Reader triggers a malicious Javascript that initiates a sequence of actions to take over the victim’s system.\
Company X was able to obtain a memory image of the employee’s virtual machine upon suspected infection and asked you as a security blue team analyst to analyze the virtual memory and provide answers to the questions.
Q1- What was the local IP address of the victim's machine?
By using the imageinfo plugin, we identified that the image belongs to Windows XP.
As a result, some plugins are not compatible with this version, such as netscan, which does not work properly with Windows XP images.

connections plugin : Lists network connections (Windows XP). Use netscan instead on modern systems.

ans ⇒ 192.168.0.176
Q2-What was the OS environment variable's value?
envars ⇒ Lists environment variables of running processes (can expose injected or suspicious behavior).

ans ⇒ Windows_NT
Q3-What was the Administrator's password?
hashdump ⇒ Extracts user account hashes from memory.

Administrator:500:e52cac67419a9a224a3b108f3fa6cb6d:8846f7eaee8fb117ad06bdd830b7586c:::
username : RID : LM hash : NTLM hash : ...
- Username → Administrator
- RID → 500
- LM hash → e52cac67419a9a224a3b108f3fa6cb6d
- NTLM hash → 8846f7eaee8fb117ad06bdd830b7586c
Using HashCat to crack this hash
hashcat -m 1000 <hash_admin.txt> rockyou.txt
ans ⇒ PASSWORD
Q4-Which process was most likely responsible for the initial exploit?
We will use the pslist plugin to display all running processes.
As described in the lab scenario, the attack chain was initiated by a malicious PDF containing JavaScript.Therefore, the correct answer is AcroRd32.exe.\
AcroRd32.exe is the executable file for Adobe Acrobat Reader, a legitimate application used to view, print, and manage PDF files.

ans ⇒ AcroRd32.exe
Q5-What is the extension of the malicious file retrieved from the process responsible for the
initial exploit?
So, based on the scenario, the correct answer is PDF.

ans ⇒ pdf
Q6-Suspicious processes opened network connections to external IPs. One of them starts with
"2". Provide the full IP.


ans ⇒ 212.150.164.203
Q7-A suspicious URL was present in process svchost.exe memory. Provide the full URL that points
to a PHP page hosted over a public IP (no FQDN).
So the idea here is that since it’s a URL, it should start with http, and because it’s a PHP page, it should end with .php.
So we can filter it like this:
strings Bob.vmem | grep -F '.php' | grep '^http:'

If you notice, this is coming from the IP address with which a connection was established.

ans ⇒ http://193.104.22.71/\~produkt/9j856f\_4m9y8urb.php
Q8-Extract files from the initial process. One file has an MD5 hash ending with
"528afe08e437765cc". When was this file first submitted for analysis on VirusTotal?
using memdump plugin :
python2 vol.py -f /home/kali/Desktop/banking-troubles/Bob.vmem --profile=WinXPSP2x86 memdump -p 1752 -D .


using foremost to extract the dmp file content
output :

This command does the following:
It searches for all files in the current directory and its subdirectories (find . -type f).\
Then, it calculates the MD5 hash for each file and displays only the ones whose hash contains 528afe08e437765cc (md5sum … | grep …).
find . -type f -exec md5sum {} + | grep 528afe08e437765cc




ans ⇒ 2010-03-29 19:31:45
Q9-What was the PID of the process that loaded the file PDF.php?
Acrobat Reader process ⇒ 1752
ans ⇒ 1752
Q10-The JS includes a function meant to hide the call to function eval(). Provide the name of
that function.
Tools like pdf-parser.py or peepdf.py are used to extract JavaScript from a PDF file.
python2 /opt/peepdf/peepdf.py -i "/home/kali/volatility/output/pdf/00601560.pdf"
This means that the JavaScript code is located inside object number 11 (which also contains a stream with a length of 1054 bytes).

stream 1054

This JavaScript appears to be obfuscated.

This part is highly complex because it is obfuscated, so we will use a tool like js-beautify to analyze and format the JavaScript code, making it easier to read and identify which function is intended to hide the call to eval().
We will save this code into a file named js.js. :
sudo apt install jsbeautifier
js-beautify js.js

ans ⇒ HNQYxrFW
Q11- The payload includes 3 shellcodes for different versions of Acrobat reader. Provide the
function name that corresponds to Acrobat v9.
I tried many times on this question but couldn’t reach a solution.If I manage to figure it out, I’ll update it and include the solution steps.
Q12-Process winlogon.exe hosted a popular malware that was first submitted for analysis at
VirusTotal on 2010-03-29 11:34:01. Provide the MD5 hash of that malware.
First, we have the process winlogon.exe, which had a certain code injected into it. We want to scan it and dump all the threads to see which thread is malicious.
We will use malfind to dump all the threads:
python2 vol.py -f /home/kali/Desktop/samples/banking-troubles/Bob.vmem --profile=WinXPSP2x86 malfind --pid=644 -D .

We got multiple threads. Now we want to examine them to see which one is malicious and which one is clean.

We will use ClamAV:
sudo apt update
sudo apt install clamav clamav-freshclam -y
clamscan -r .
It showed us:
/process.0x81e5b2e8.0xa10000.dmp: Win.Spyware.Zbot-9841872-0 FOUND

So this is the malicious one: process.0x81e5b2e8.0xa10000.dmp.We will put it on VirusTotal and check its hash.



ans ⇒ 066f61950bdd31db4ba95959b86b5269
Q13- What is the name of the malicious executable referenced in registry hive
'\WINDOWS\system32\config\software', and is variant of ZeuS trojan?

https://www.sonicwall.com/blog/new-zeus-botnet-kneber-feb-18-2010

Using filescan to list all files

We can also Use hivelist to locate the virtual address of the software hive
python2 vol.py -f /home/kali/Desktop/samples/banking-troubles/Bob.vmem --profile=WinXPSP2x86 hivelist
op ::
0xe1526748 0x036bd748 \Device\HarddiskVolume1\WINDOWS\system32\config\software

using printkey to retrieve the key’s value , We will focus on the Winlogon key, as it is well-known for persistence, especially in the ZeuS trojan.
python2 vol.py -f /home/kali/Desktop/samples/banking-troubles/Bob.vmem --profile=WinXPSP2x86 printkey -o 0xe1526748 -K 'Microsoft\Windows NT\CurrentVersion\Winlogon'

ans ⇒ sdra64.exe
Q14- The shellcode for Acrobat v7 downloads a file named e.exe from a specific URL. Provide the URL.
strings Bob.vmem |grep "http://"|sort|uniq
ans ⇒ http://search-network-plus.com/load.php?a=a\&st=Internet Explorer 6.0\&e=2
Q15-The shellcode for Acrobat v8 exploits a specific vulnerability. Provide the CVE number.
We will upload the PDF file we extracted earlier to VirusTotal.

ans ⇒ cve-2008-2992
سبحانك اللهم وبحمدك, أشهد أن لا إله إلا أنت, نستغفرك ونتوب إليك