If you have seen a fake CAPTCHA that asks you to press Win+R and paste a command, you have seen one of the ways PavinLoader gets onto machines. That trick, known as ClickFix, has spread it since at least March 2026, alongside fake software downloads and trojanized indie games. PavinLoader is a .NET loader, and what it mostly delivers is information stealers.
The builds we took apart arrive as a fake driver installer and a downloaded kit. Each starts a renamed copy of MSBuild, which loads a trojanized copy of an open-source .NET library as a build task. The loader runs inside the build process.
The loader is built in two layers. In the library, a bytecode VM of a few hundred bytes decodes a second .NET assembly hidden in the library’s resources and loads it in memory. That hidden loader picks a C2 server, signs its requests and downloads the next stage. More than a thousand of its methods each run inside their own small virtual machine.
We reversed both layers in two launch kits: the bytecode VM, the per-method virtualization and the C2 logic underneath. The hidden loaders choose from a fixed list of 15 hosts that moves on every 48 hours. Across the two builds there are 17 hosts, and 12 of them are not in any published indicator list we found. We are releasing the unpackers, the VM disassembler, the devirtualizer, the config extractor and the detection rules.
In March, derp.ca documented its ClickFix chain. Malwarebytes tracked an earlier generation in August, and Netskope described this one in November.
Identify the samples
| File | Role | SHA-256 |
|---|---|---|
| Inno Setup installer, 18,609,635 bytes | Fake “NVMe Driver Helper Setup” | 1c085b021de27fa330804e5add96e38db0dbe8c6c0f40cebc53f9cb196bddaa5 |
PhoneNumbers.dll, 35,734,528 bytes | Trojanized libphonenumber-csharp 8.12.38 | a53311077a63b1799c8741a490f3dcc5590ea44aea2afd52a7d5c4e0f60c853b |
DepartmentStore 0.0.0.0, 5,399,040 bytes | Embedded assembly decoded from PhoneNumbers.dll | 0f6f378089189ed64eeb904f36ff7c0e144b99984a114029e997f8bcbfc8caf9 |
Rebus.dll, 23,098,880 bytes | Trojanized Rebus 3.1.5 | 9aa2f6dd84846ce54ad64c3a01eb8b0351b814a46bfaf7564afaacc40fe1e865 |
WriterProxy 0.0.0.0, 5,535,232 bytes | Embedded assembly decoded from Rebus.dll | 6701b55ab0ce465b52e8b45361f42327dddb09b470a36a3c7a8e981a9e65a868 |
The installer and both trojanized libraries are on Hybrid Analysis. The two embedded assemblies exist only inside the libraries. We decoded them ourselves and found no public copy of either.
Two launch kits
The installer is built with Inno Setup 7, setup data version 7.0.0.3. innoextract 1.9 and its master branch at commit 6e9e34e both refuse it, so we wrote an extractor for the 7.0 layout. The installer holds three files: NovosUpdater.exe (MSBuild 4.8, renamed), NovosUpdater.csproj and PhoneNumbers.dll. The [Run] entry starts the renamed MSBuild from %LocalAppData%\9zvs7vuz with a hidden window and does not wait for it:
NovosUpdater.exe /nologo "{app}\NovosUpdater.csproj" /nodereuse:false
The installer’s compiled Pascal Script tries to keep its own wizard hidden. InitializeWizard changes the window style, hides the form and installs a timer and a SetWinEventHook callback, and both callbacks hide the window again. CurPageChanged posts a click to the Next button.
The project file registers the trojanized library as an MSBuild custom task:
<UsingTask TaskName="PhoneNumbers.Internal.DelegatingHandler"
AssemblyFile="PhoneNumbers.dll" Runtime="CLR4" Architecture="*" />
The Dropbox kit does the same with FileController.csproj and Rebus.dll. In both DLLs the malicious code is a class that implements Microsoft.Build.Framework.ITask, and MSBuild calls its Execute() method.

The task the project file names, PhoneNumbers.Internal.DelegatingHandler, in PhoneNumbers.dll. The four short-named types next to it are also part of the loader.
The trojanized libraries
Both libraries keep the type names of the clean NuGet packages and add a loader:
PhoneNumbers.dll | Rebus.dll | |
|---|---|---|
| Clean base | libphonenumber-csharp 8.12.38 | Rebus 3.1.5 |
| Added type names | 31 | 19 |
| Task class | PhoneNumbers.Internal.DelegatingHandler | Newtonsoft.Json.Utilities.CachedBuilder8 |
| Added resources | 6 | 6 |
| Resources the loader reads | 4 | 4 |
Each DLL has two added resources that we did not see the loader read.
What runs inside MSBuild
Each loader guards its bootstrap against repeated entry. The steps are the same in both builds:
- Resolve about ten native APIs by hash. The loader walks the export table of each loaded module and compares a 64-bit hash of each export name.
- Check for a debugger. Both builds query process information with
NtQueryInformationProcessand check the PEB.PhoneNumbers.dllcollects five probe results, including process information classes 7, 30 and 31, and adds them up with a VM program.Rebus.dllalso checksDebugger.IsAttached. A debugger signal ends the run. - Hide the console window.
- Stop before decoding the payload if a
.csprojwith the same name as the host executable is missing or empty. - Wait in short slices, then check for a debugger again.
Rebus.dllwaits 38.5 to 46.7 seconds andPhoneNumbers.dll32.1 to 40.3 seconds. - Delete short environment variables named like
_abc, and set two of its own.Rebus.dllsetsCFG_SYSTEM_TASK_75ceto the host path andCFG_PLATFORM_CFG_98b2to3e04b2.WriterProxyreads theCFG_prefix and treats the six-character value as a mode selector. - Run VM program 0 to decode the embedded assembly and load it with
AppDomain.Load(byte[]). - Set process-wide TLS options and a certificate callback that accepts any certificate.
- Invoke the embedded assembly’s entry method through a timer callback or an STA thread. The entry is
System.Net.NetworkInformation.CheckpointChannel.CommitSignatureinWriterProxyandEnterprise.Runtime.Composition.ContextProxy.StopCommandAsyncinDepartmentStore. - Attempt to zero the PE and CLR headers of the loaded image in memory, then call
Environment.Exit(0).
Header erasure can make a scan for MZ headers in the MSBuild process miss the embedded assembly.
The bootstrap VM
The VM is a stack machine built from C# lambdas. The loader allocates an Action[256], fills every slot from six filler handlers in turn, then overwrites the slots that do real work. Rebus.dll overwrites 26 slots and PhoneNumbers.dll 24. Opcode numbers differ between the two builds. Some filler handlers change state, for example by pushing zero or XORing the top of the stack with 0x5A. Others do nothing, and program 0 uses a few of those as padding.
The bytecode is a manifest resource of 149 bytes in Rebus.dll and 265 bytes in PhoneNumbers.dll. Every byte is XORed with an 8-byte key at position pc & 7. The keys are 4171e0f19e98424b in Rebus.dll and 011c66d58cb657ad in PhoneNumbers.dll. The program starts with a table of 16-bit entry points, and program N starts at the offset stored at byte 1 + 2N.
![ILSpy showing the 8-byte bytecode key, the Action[256] handler table and a filler handler that XORs the top of the stack with 0x5A](/intel/pavinloader-bootstrap-vm/ilspy-bootstrap-vm.png)
The bootstrap VM in Rebus.dll: the bytecode key, the 256-slot handler table and one of the filler handlers.
The real handlers push 8-bit and 32-bit constants, use eight locals, add, subtract, XOR and take a remainder, load, store and measure byte arrays, jump, and return. One opcode calls into native C#. Its one-byte argument selects one of eight operations:
| Sub-op | Rebus.dll |
|---|---|
| 0 | Read the payload resource |
| 1 | Read the loader’s own file and build the book (below) |
| 2 | Allocate a byte array |
| 3 | Read a little-endian int32 from an array |
| 4 | Replace a value with an empty array |
| 5 | XOR with the fold key, then AppDomain.Load |
| 6 | Decrypt a string table |
| 7 | Convert byte arrays to strings |
PhoneNumbers.dll has the same set in a different order, and three more programs. One adds up the debugger probes, one maps an input byte to three outcomes and one searches an array for a qualifying byte. Neither build has a network operation in the VM.
This is program 0 of Rebus.dll from our disassembler, abbreviated. NOPs are omitted and offsets are unchanged:
0009 NATIVE 1 ; book = affine table || own file bytes
000b STLOC 4
000d NATIVE 0 ; payload resource
0010 STLOC 7
0012 LDLOC 7
0014 LDLEN
0015 STLOC 3
0017 LDLOC 3
0019 NATIVE 2 ; out = new byte[len / 4]
001b STLOC 2
001d PUSH_I8 0
001f STLOC 5 ; j = 0
0021 PUSH_I8 0
0023 STLOC 1 ; i = 0
0025 LDLOC 1
0027 LDLOC 3
0029 SUB
002a JZ 004c ; while i != len
002d LDLOC 2
002f LDLOC 5
0031 LDLOC 4
0033 LDLOC 7
0035 LDLOC 1
0037 NATIVE 3 ; index = int32 at payload[i]
0039 LDELEM ; book[index]
003a STELEM ; out[j] = book[index]
003b LDLOC 5
003d PUSH_I8 1
003f ADD
0040 STLOC 5
0042 LDLOC 1
0044 PUSH_I8 4
0046 ADD
0047 STLOC 1
0049 JMP 0025
004d LDLOC 2
004f NATIVE 5 ; XOR fold key, AppDomain.Load
005a RET
The payload is a book cipher over the DLL itself
The large resource is a list of little-endian int32 offsets into a “book”: a 256-byte table followed by every byte of the loader DLL as it sits on disk. Each offset picks one byte of the embedded assembly. The result is then XORed with a 32-byte key:
fold[i] = dll[i] XOR dll[i + 32] for i in 0..31
book = [ ((fold[0] | 1) * k + fold[1]) & 0xFF for k in 0..255 ] + dll
stage[n] = book[offset[n]] XOR fold[n & 31]
The two builds produce the same fold value from the first 64 bytes of the file, 4d5a90000300000004000000ffff0000b8000000000000004000000080000000. The book is the real protection. If one byte of the DLL that an offset points to changes, the decoded assembly changes. The resource cannot be decoded without the exact DLL.
Rebus.dll stores 5,535,232 offsets, which decode to WriterProxy. PhoneNumbers.dll stores 5,399,040 offsets and 153 bytes of trailing padding, which decode to DepartmentStore. Our emulator and a direct Python implementation agree on the first 16,384 decoded bytes, and two independent decoders produce the hashes in the table above for the full output.
A BLAKE2b pin on the bytecode
Before it runs the bytecode, PhoneNumbers.dll hashes the 265-byte resource with keyed BLAKE2b: a 64-byte key, a 16-byte salt, a 16-byte personalization string and a 31-byte digest. It compares the first 16 bytes with a stored value, 199e5c221905595b81b1f766e60f27f8, and stops on a mismatch. Python’s hashlib.blake2b reproduces the full digest from the parameters in the IL. The compression function in the DLL runs 12 rounds over 64-bit words with rotations 32, 24, 16 and 63, which is BLAKE2b. The large resource is not hashed, and Rebus.dll has no pin.
Earlier reporting described a BLAKE3 pin on the large resource and a BLAKE3-derived request MAC. In this build the pin is BLAKE2b on the bytecode, and the request MAC, covered below, is HMAC-SHA256. We found no BLAKE3 code in either DLL.
The bytecode only decodes and loads the hidden assembly. All the network, compression and cipher code is in DepartmentStore, as managed code or inside its virtualized methods.
Strings and decoys
Each loader keeps its strings in two encrypted string tables, plus a few XORed literals in the C# code. Rebus.dll derives the table key with xorshift32 from a 16-byte seed in the IL. PhoneNumbers.dll uses keyed BLAKE2b to generate the XOR blocks. The loaders ask for strings by number through an index of 70 entries in Rebus.dll and 64 in PhoneNumbers.dll.
In Rebus.dll, the identified accessor calls ask for numbers 0 to 56 only. Entries 57 to 69 are unreferenced: fake REST paths such as /api/v2/Kafewuw/lovburli.json, mutex names such as Global\qelti-BB00 and registry keys such as HKLM\SOFTWARE\ruqhuxo\Xupqekje. A string dump of the tables includes them, and they are not indicators.

Our unpacker on Rebus.dll: the decoded WriterProxy, the start of the bytecode listing and the decoy strings.
The embedded loaders
WriterProxy and DepartmentStore are x64 .NET Framework DLLs with more than 1,600 TypeDef rows each. WriterProxy puts its types in fake System.* namespaces, and DepartmentStore uses Acme.* and Enterprise.*. Type and method names are pasted together from real .NET API names, such as TargetParameterCountExceptionStageComponent.
The protection is per-method virtualization. Each protected method body is replaced by a small interpreter that walks its own bytecode, stored in a static RVA field. The interpreter uses separate arrays for tags, object references, numeric values and auxiliary integers. Calls go through tables of function pointers that a static constructor fills with ldftn, and the interpreter calls them with calli. Each method has its own opcode map starting at 1, so the same operation has different numbers in different methods.

A virtualized method in WriterProxy. Devirtualized, it calls two empty stubs and then the main routine, RepositoryFactory.CommitSignature.
Our devirtualizer reads each interpreter’s IL, recovers its opcode map and lifts the bytecode to a readable listing with call targets:
WriterProxy | DepartmentStore | |
|---|---|---|
| Virtualized methods decoded | 1,187 | 1,119 |
| Bytecode records | 68,002 | 66,414 |
| Indexed indirect call sites | 11,350 | 11,118 |
| Computed calls with one established slot | 449 | 441 |
| Computed calls with a candidate set | 357 | 313 |
| Decoding failures | 0 | 0 |
For computed calls it cannot pin to one table slot, the tool lists the compatible candidates. It also marks records where its handler analysis reached its limit: 24 in WriterProxy and 25 in DepartmentStore.
Fifteen hosts on a 48-hour clock
The embedded loaders do not generate domains. Each holds 15 HTTPS hosts, stored encrypted, and picks up to three by date:
i = clamp(trunc((utc_seconds - epoch) / 172800) + 1, 0, 14)
hosts = table[i], table[i - 1], table[i - 2] (indices below 0 are skipped)
WriterProxy | DepartmentStore | |
|---|---|---|
| Epoch | 2026-11-01 16:50:55 UTC | 2026-11-05 16:52:27 UTC |
| First UTC input selecting the final window | 2026-11-27 16:50:55 UTC | 2026-12-01 16:52:27 UTC |
| Final window | gremcako[.]blog, leersasulabs[.]blog, bestulsouv[.]blog | linsaiblerk[.]blog, mespuziot[.]blog, gremcako[.]blog |
DepartmentStore’s list is WriterProxy’s list moved on by two. It drops vutostio[.]cfd and crepiehumru[.]lol from the front and adds mespuziot[.]blog and linsaiblerk[.]blog at the end. The two builds share 13 hosts in the same order. For UTC inputs at or after the times in the table, each selector returns its final three candidates. The selector does not establish which host was contacted.
The selector matched 186 test timestamps per build, including every midnight UTC from 1 November 2026 to 28 February 2027. It keeps no state, so an earlier timestamp still selects earlier hosts.
After a failed attempt, WriterProxy can read HTTP Date headers from a separate pool of 15 HTTPS time sources, including discord.com, registry.npmjs.org and github.com. If it obtains a replacement time, it runs the selector again.
Resolving and requesting
The embedded loaders resolve hosts with DNS over HTTPS. WriterProxy has 1.0.0.2/dns-query, 1.1.1.1/dns-query and 8.8.8.8/resolve in its pool. DepartmentStore has 45.11.45.11/dns-query, 1.0.0.2/dns-query and 1.1.1.1/dns-query. These are pool entries, and their order does not establish attempt order. Ordinary DoH failures can fall back to system DNS. An NXDOMAIN response takes a negative-cache path in WriterProxy.
Both speak HTTP/1.1 themselves over TcpClient and SslStream, with gzip support and a response limit of 60 MiB on the traced request paths. With three candidates, WriterProxy has six attempt slots and stops on the first success. Both builds contain 5 to 10 second delays in the request paths. The first request is a GET for a JavaScript file name:
WriterProxy | DepartmentStore | |
|---|---|---|
| Path | /7uVk3/get/UnsolarBarkhan_51daf77b.js | /5C4NX/get/FiastZunpaest_bbecf478.js |
| User agents | 10 strings like NuGet Client V3/6.9.1.3 (Microsoft Windows NT 10.0.22631.0; Win64; x64) | 6 strings like Windows-Update-Agent/10.0.19041.4522 Client-Protocol/2.47 |
| Mutex | Global\SM0_2560362228_304_WilStaging_02 | not established |
The traced requests include X-Timestamp, X-Nonce and X-Signature. Both builds sign with HMAC-SHA256 over the URL, the timestamp and the nonce, with a key derived from the same three values. Isolated signing checks agreed on six test inputs per build. A fourth header, X-Request-Context, is optional. In WriterProxy, the code that fills it reads MachineGuid from HKLM\SOFTWARE\Microsoft\Cryptography when no cached value exists. We did not verify what a server accepts.
In traffic captured by Netskope, the server answers the first request with a redirect to a tokenized /5C4NX/file/ path, which serves the next stage, a 915 KB .NET DLL named Pegasus.Common. DepartmentStore contains code to follow that 302, extract a nested content field, decode Base64, run an RC4-style cipher and an LZMA decoder, and load an assembly through reflection. WriterProxy has the redirect handling and also a path for a direct 2xx response. Error labels in the code name DECRYPTOR, STAGE2, SHELLCODE and ASSEMBLYLOAD. We did not contact the servers or reconstruct a response end to end.
WriterProxy startup settings
WriterProxy configures a Run value named SecurityHealth and a startup shortcut named SecurityHealth.lnk. Its first-attempt settings turn both creation routes off and turn on app restart and scheduled task handling. Later code can clear the scheduled task flag. We found no later enable for the Run value or the shortcut in the traced path. We did not observe creation of any of these artifacts.
If the environment variable STUBTEST_EXECUTE_INJECT is 1 or true, in any case, WriterProxy skips that configuration path. A nonempty DOTNET_ROLL_FORWARD sends it to a path that waits on an unsignaled event.
A decoded WriterProxy string table, RC4-encrypted with the key 8c6b9b22532182c1e2ef101853d57700, contains AppDomain reflection names and the names AmsiUtils, AmsiScanBuffer and AmsiScanString. The strings alone do not show that it calls those APIs.
Indicators
Hashes and network indicators below are in the STIX bundle. The 17 host names are candidates from the embedded host tables. Five of them also appear in Netskope’s IOC list. For the other 12 we did not verify registration or traffic. Rows marked reference are for context and are not in the bundle. Path and mutex rows are on this page only.
| Indicator | Type | Value |
|---|---|---|
| Inno Setup installer, fake “NVMe Driver Helper Setup” | SHA-256 | 1c085b021de27fa330804e5add96e38db0dbe8c6c0f40cebc53f9cb196bddaa5 |
PhoneNumbers.dll, trojanized libphonenumber-csharp 8.12.38 | SHA-256 | a53311077a63b1799c8741a490f3dcc5590ea44aea2afd52a7d5c4e0f60c853b |
NovosUpdater.csproj | SHA-256 | 68bbd95b310aa84a8ea40f93025ef72eee3d7b3ed9dd1ee063fcb74b0300d529 |
NovosUpdater.exe, genuine MSBuild 4.8 renamed reference | SHA-256 | 3d2b22b6bc51e0918263f4420e6bdf7d982d961b54176c470cac11841d1c9b33 |
DepartmentStore 0.0.0.0, embedded assembly decoded from PhoneNumbers.dll; the bootstrap loads it in memory | SHA-256 | 0f6f378089189ed64eeb904f36ff7c0e144b99984a114029e997f8bcbfc8caf9 |
Rebus.dll, trojanized Rebus 3.1.5 (Dropbox kit) | SHA-256 | 9aa2f6dd84846ce54ad64c3a01eb8b0351b814a46bfaf7564afaacc40fe1e865 |
WriterProxy 0.0.0.0, embedded assembly decoded from Rebus.dll; the bootstrap loads it in memory | SHA-256 | 6701b55ab0ce465b52e8b45361f42327dddb09b470a36a3c7a8e981a9e65a868 |
Pegasus.Common 4.1.0.0, next stage downloaded from the C2 reference | SHA-256 | 5b8ade10e284d1f0da7dab2b77059c9ef1bc2b0d8608566e9b21e52f4ea3fe1a |
Launch project dropped to %LocalAppData%\9zvs7vuz reference | File name | NovosUpdater.csproj |
Embedded host candidate, WriterProxy index 0 | Domain | vutostio.cfd |
Embedded host candidate, WriterProxy index 1 | Domain | crepiehumru.lol |
| Embedded host candidate, both builds | Domain | kenpousland.cfd |
| Embedded host candidate, both builds | Domain | dafoogrupa.blog |
| Embedded host candidate, both builds | Domain | lourohamiv.blog |
| Embedded host candidate, both builds | Domain | tewiascomp.blog |
| Embedded host candidate, both builds | Domain | docardebiary.blog |
| Embedded host candidate, both builds | Domain | koabarpex.blog |
| Embedded host candidate, both builds | Domain | skeegulduz.blog |
| Embedded host candidate, both builds | Domain | loadraze.blog |
| Embedded host candidate, both builds | Domain | viemibog.blog |
| Embedded host candidate, both builds | Domain | foutrizek.blog |
| Embedded host candidate, both builds | Domain | bestulsouv.blog |
| Embedded host candidate, both builds | Domain | leersasulabs.blog |
| Embedded host candidate, both builds | Domain | gremcako.blog |
Embedded host candidate, DepartmentStore index 13 | Domain | mespuziot.blog |
Embedded host candidate, DepartmentStore index 14 | Domain | linsaiblerk.blog |
WriterProxy stage request path | Path | /7uVk3/get/UnsolarBarkhan_51daf77b.js |
DepartmentStore stage request path | Path | /5C4NX/get/FiastZunpaest_bbecf478.js |
DepartmentStore event path | Path | /5C4NX/event |
WriterProxy mutex | mutex | Global\SM0_2560362228_304_WilStaging_02 |
DoH resolver in WriterProxy (/resolve) reference | IPv4 | 8.8.8.8 |
DoH resolver in DepartmentStore reference | IPv4 | 45.11.45.11 |
Host and process:
MSBuild.exeor a renamed copy started from a user-writable directory with/nologo <name>.csproj /nodereuse:false, where the project has aUsingTaskthat points at a DLL in the same directory%LocalAppData%\9zvs7vuz\NovosUpdater.exe,NovosUpdater.csproj,PhoneNumbers.dll- Environment variables
CFG_SYSTEM_TASK_75ceandCFG_PLATFORM_CFG_98b2in an MSBuild process - Mutex
Global\SM0_2560362228_304_WilStaging_02 - A .NET assembly in an MSBuild process whose PE header has been zeroed
Network:
- DNS-over-HTTPS requests from MSBuild to
1[.]1[.]1[.]1,1[.]0[.]0[.]2,8[.]8[.]8[.]8or45[.]11[.]45[.]11 - HTTPS requests with
X-Timestamp,X-NonceandX-Signatureheaders and a NuGet or Windows Update Agent user agent, to paths matching/<5 chars>/get/<Name>_<8 hex>.js - From
WriterProxy, requests from MSBuild todiscord[.]com,registry.npmjs[.]organdgithub[.]comafter a failed stage request
Detection rules
This rule matches both trojanized libraries. It has no hits in the 3,381 DLLs of the .NET 8 SDK, which include genuine MSBuild task assemblies, or in Rebus 3.1.5, Newtonsoft.Json 12.0.3 and 13.0.1, and libphonenumber-csharp 8.12.38.
import "pe"
rule PavinLoader_Stage1_MSBuildTask_Loader
{
meta:
description = "PavinLoader stage 1: trojanized .NET library that adds an MSBuild ITask, resolves Win32 APIs by hash and runs a bootstrap VM that decodes an embedded assembly"
author = "Fenko"
sha256_rebus = "9aa2f6dd84846ce54ad64c3a01eb8b0351b814a46bfaf7564afaacc40fe1e865"
sha256_phonenumbers = "a53311077a63b1799c8741a490f3dcc5590ea44aea2afd52a7d5c4e0f60c853b"
strings:
$msb1 = "Microsoft.Build.Framework" ascii
$msb2 = "IBuildEngine" ascii
$msb3 = "ITaskHost" ascii
$api1 = "GetDelegateForFunctionPointer" ascii
$api2 = "ProcessModuleCollection" ascii
$api3 = "get_BaseAddress" ascii
$api4 = "ReadInt16" ascii
$api5 = "ReadInt32" ascii
$res1 = "GetManifestResourceStream" ascii
$res2 = "HandleProcessCorruptedStateExceptionsAttribute" ascii
$vm1 = { 20 00 01 00 00 8D ?? ?? ?? (01|02) } // ldc.i4 256; newarr
condition:
uint16(0) == 0x5A4D
and pe.data_directories[pe.IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR].virtual_address != 0
and filesize > 2MB
and all of ($msb*)
and $api1 and 2 of ($api2, $api3, $api4, $api5)
and $res1 and $res2
and $vm1
}
The repository also has a rule for the two embedded assemblies. It matches them on disk and also matched file copies with the PE and CLR headers zeroed. It has experimental Sigma rules for the MSBuild launch, the DNS lookups and the request path.
Tools
The tools are in fenkohq/threat-research under the MIT licence:
- An Inno Setup 7.0 extractor that checks every block CRC and file hash.
- A
Rebus.dllunpacker. It reads the key, string-table seed, resource roles and opcode map from the IL, decodes the string tables, marks the unreferenced entries and writes the embedded assembly. - A
PhoneNumbers.dllprofiler, disassembler and lifter, with the BLAKE2b pin check and the opcode map as Markdown and JSON. - The devirtualizer for the embedded loaders’ per-method VM.
- A config extractor for both embedded assemblies, a UTC host selector and a verifier for the reference outputs.
None of the tools runs the sample. The PhoneNumbers.dll tools accept the exact DLL analyzed here. The Rebus.dll tools use this build’s handler and resource layout, and other builds can return incomplete profiles or fail.
Responding to an infected machine
Look for the launch first: a renamed MSBuild in a user-writable directory with a .csproj beside it. Collect a memory image of the MSBuild process and copies of the launch directory before you change anything, because the embedded assembly exists only in memory. Then remove the launch directory, check the Run key for a SecurityHealth value, the Startup folder for SecurityHealth.lnk and the scheduled tasks for entries created around the time of infection, and block the host names at DNS and at the proxy. PavinLoader has delivered Amatera Stealer, so rotate the credentials and session tokens stored on the machine.