August 25, 2025

XLMRat Lab – CyberDefenders

xmlrat lab image

Scenario

A compromised machine has been flagged due to suspicious network traffic. Your task is to analyze the PCAP file to determine the attack method, identify any malicious payloads, and trace the timeline of events. Focus on how the attacker gained access, what tools or techniques were used, and how the malware operated post-compromise.

Documents Provided

  • 236-XMLRat.pcap

Q1: The attacker successfully executed a command to download the first stage of the malware. What is the URL from which the first malware stage was installed?

Analizing the PCAP file I looked for a HTTP using a method “GET” to see what content was obtained or downloaded.

GET method

Two results pop-up from two files obtained, xlm.txt and mdm.jpg. Following the HTTP Stream of xml.txt we find this:

http stream

We can see that there are some string variables that will combine, looking at the strings we can already see a URL:

vars

Combining the strings will reveal the answer.

Click to reveal the answer
http://45.126.209.4:222/mdm.jpg

Q2: Which hosting provider owns the associated IP address?

Here we can analyze the obtained IP address. For example using https://whois.domaintools.com/

whois result

With the info we can obtain the hosting provider

Click to reveal the answer
ReliableSite.Net

Q3: By analyzing the malicious scripts, two payloads were identified: a loader and a secondary executable. What is the SHA256 of the malware executable?

Using wireshark we can obtain this downloaded file mdm.jpg

mdm file

And we can analyze the information it contains.

mdm content

First we can see a variable of a hex string separated by an underscore for obfuscation I guess. Scrolling down we can see what is done with this variable.

mdm content2

And from this code we can see that there are two hex string variables. Using CyberChef I will replace the ”_” and use the receipt “From Hex” for both of these hex strings.

  • For hexString_bbb:

hexString_bbb content

  • For hexString_pe:

hexString_pe content

From here I save both files as an .exe, using CyberChef you can download them directly, im naming one bbb.exe and the other pe.exe referring to the variable that they come from, hexString_bbb and hexString_pe. Then im using pestudio to analyze both files and obtain relevant information. Following the code:

mdm content3

I see that the last variable $EY results in something like this, considering the name I put to the executables: Execute.Invoke($null, [object[]] @('C:\Windows\Microsoft\.NET\Framework\v4.0.30319\RegSvcs.exe', bbb.exe) So im guessing that bbb.exe is the malware executable we are looking for. In pestudio we can see that the SHA256 hash of the file is:

file sha256

Click to reveal the answer
1EB7B02E18F67420F42B1D94E74F3B6289D92672A0FB1786C30C03D68E81D798

Q4: What is the malware family label based on Alibaba?

Pestudio already provide as this information from VirusTotal.com

alibaba clasification

Click to reveal the answer
AsyncRat

Q5: What is the timestamp of the malware’s creation?

Searching in VirusTotal we can find the date of creation.

creation time

Click to reveal the answer
2023-10-30 15:08

Q6: Which LOLBin is leveraged for stealthy process execution in this script? Provide the full path.

In Q3 I already found the full path. Again, looking at the script inside the mdm.jpg and clearing it.

mdm content4

Click to reveal the answer
C:\Windows\Microsoft\.NET\Framework\v4.0.30319\RegSvcs.exe

Q7: The script is designed to drop several files. List the names of the files dropped by the script.

We have to look again at the script inside the mdm.jpg.

mdm content5

And we see 3 files where content is droped because the function used is WriteAllText, these are: Conted.ps1, Conted.bat and Conted.vbs

Click to reveal the answer
Conted.ps1, Conted.bat, Conted.vbs
Share