Back to Intelligence

Retadup Worm Resurfaces in 2026: Detecting the CoffeeLoader 7z.dll NSIS Delivery Chain

SA
Security Arsenal Team
November 16, 2026
11 min read

Seven years after the coordinated takedown of the Retadup botnet in 2019, the worm has resurfaced in active campaigns delivering CoffeeLoader, a sophisticated malware dropper designed to stage additional payloads onto compromised Windows endpoints. This is not a historical retrospective—this is a 2026 active intrusion campaign leveraging patched legitimate binaries and trusted system processes to evade detection.

Security teams must immediately understand the attack chain: Retadup propagates through removable drives and network shares, then deploys an NSIS (Nullsoft Scriptable Install System) installer that drops a weaponized 7z.dll into temporary directories and executes it via rundll32.exe. The use of a patched version of the legitimate 7-Zip library as a malicious DLL represents a classic defense evasion technique that bypasses application whitelisting and static signature detection.

If your organization allows unsigned or unverified NSIS installers, or if users can execute payloads from %TEMP% directories, you are exposed. This post provides the detection logic, hunting queries, and remediation controls required to identify and stop this chain before it stages secondary payloads—likely ransomware or infostealers—onto your network.

Technical Analysis

Threat Overview: Retadup Worm (2026 Resurgence)

Retadup is a worm that originally targeted Latin American organizations, spreading via USB drives and network shares to mine cryptocurrency. The 2026 variant demonstrates evolved capabilities:

  • Propagation Mechanism: Continues to use removable media and writable network shares, exploiting weak access controls and AutoRun behaviors.
  • Delivery Vehicle: NSIS-based installer executables (self-extracting archives common in software distribution).
  • Payload Staging: Drops a file named 7z.dll into the Windows temporary directory (%TEMP% or %TMP%).
  • Execution Method: Invokes the dropped DLL via rundll32.exe, a legitimate Windows binary often abused for DLL execution (MITRE ATT&CK T1218.011).
  • Evasion Technique: The 7z.dll is a patched version of the legitimate 7-Zip compression library. By modifying the export tables or injecting malicious code into a valid signed binary, the attackers bypass static file reputation checks and basic DLL load policies.

CoffeeLoader Malicious Software

CoffeeLoader functions as a second-stage loader. Once executed via rundll32, it establishes persistence and retrieves additional malicious payloads from command-and-control infrastructure. The specific payload delivered varies by victimology but typically includes credential stealers, ransomware, or remote access trojans (RATs).

Attack Chain Breakdown (Defender’s View)

  1. Initial Access: Retadup worm propagates to a new host via network share or USB drive.
  2. Execution: User or automated process executes the NSIS installer (e.g., setup.exe, installer.exe).
  3. Dropper Behavior: The NSIS script extracts 7z.dll to %TEMP%\7z.dll (or a randomized subdirectory).
  4. Execution via LOLBin: The installer spawns rundll32.exe with the command line targeting %TEMP%\7z.dll.
  5. Defense Evasion: Because 7z.dll appears to be a legitimate compression library (albeit patched), static analysis and hash-based blocklists may miss it. The malicious code resides in patched sections or specific export functions.
  6. Persistence & Staging: CoffeeLoader establishes persistence (registry run keys, scheduled tasks, or WMI subscriptions) and retrieves third-stage payloads.

Why This Matters in 2026

The return of Retadup highlights a critical gap in many EDR/XDR implementations: over-reliance on file hash reputation and insufficient monitoring of rundll32.exe command-line arguments. The use of patched legitimate DLLs allows attackers to "live off the land" while appearing benign to signature-based scanners. Organizations with legacy USB device policies or flat network segmentation are particularly vulnerable to the worm’s propagation mechanisms.

Detection & Response

SIGMA Rules

The following Sigma rules detect the specific behaviors observed in the Retadup/CoffeeLoader campaign. These target the intersection of NSIS installers dropping DLLs, rundll32 execution from temporary paths, and DLL loading anomalies.

YAML
---
title: Retadup CoffeeLoader NSIS Rundll32 Execution
id: 8f7e6d5c-4b3a-2c1d-0e9f-8a7b6c5d4e3f
status: experimental
description: Detects NSIS installers dropping and executing 7z.dll via rundll32.exe, indicative of CoffeeLoader delivery.
references:
  - https://thehackernews.com/2026/11/retadup-worm-resurfaces-7-years-after.html
  - https://attack.mitre.org/techniques/T1218/011/
author: Security Arsenal
date: 2026/11/15
tags:
  - attack.defense_evasion
  - attack.t1218.011
  - attack.execution
logsource:
  category: process_creation
  product: windows
detection:
  selection:	a  - Image|endswith: '\rundll32.exe'
    CommandLine|contains:
      - '7z.dll'
      - '.tmp\'
      - '%TEMP%'
      - 'AppData\Local\Temp'
  condition: selection
falsepositives:
  - Legitimate 7-Zip installations using temporary extraction (rare with rundll32 invocation)
level: high
---
title: Suspicious DLL Dropped in Temporary Directory by NSIS
id: 1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects file creation events where NSIS installers write DLL files to temporary directories, a known CoffeeLoader staging technique.
references:
  - https://thehackernews.com/2026/11/retadup-worm-resurfaces-7-years-after.html
  - https://attack.mitre.org/techniques/T1055/
author: Security Arsenal
date: 2026/11/15
tags:
  - attack.persistence
  - attack.t1055
logsource:
  category: file_event
  product: windows
detection:
  selection:
    Image|contains:
      - 'nsis'
      - 'installer'
      - 'setup'
    TargetFilename|endswith: '.dll'
    TargetFilename|contains:
      - '\Temp\'
      - '\Tmp\'
      - 'AppData\Local\Temp'
  condition: selection
falsepositives:
  - Legitimate software installations using NSIS (noise reduced by correlating with process execution)
level: medium
---
title: Rundll32 Loading Patched 7z.dll from Temp
id: 9c8b7a6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects rundll32.exe loading DLLs from temporary directories with names mimicking legitimate compression utilities.
references:
  - https://attack.mitre.org/techniques/T1218/011/
author: Security Arsenal
date: 2026/11/15
tags:
  - attack.defense_evasion
  - attack.t1218.011
logsource:
  category: image_load
  product: windows
detection:
  selection:
    Image|endswith: '\rundll32.exe'
    ImageLoaded|contains:
      - '\Temp\7z.dll'
      - '\Tmp\7z.dll'
  condition: selection
falsepositives:
  - None expected; legitimate 7-Zip does not load from temp via rundll32
level: critical

KQL Hunting Queries (Microsoft Sentinel / Defender)

Use these queries to hunt for the Retadup delivery chain across your environment. The first query targets the process execution chain; the second looks for the file creation artifact.

KQL — Microsoft Sentinel / Defender
// Hunt 1: Detect NSIS installers spawning rundll32 with 7z.dll from temp paths
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where FileName =~ "rundll32.exe"
| where ProcessCommandLine contains "7z.dll"
| where ProcessCommandLine contains_any ("Temp", "Tmp", "%TEMP%", "AppData")
| extend InitiatingProcessFileName = tostring(InitiatingProcessFileName)
| where InitiatingProcessFileName contains_any ("nsis", "setup", "install", "update")
| project TimeGenerated, DeviceName, FileName, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, SHA256, AccountName
| sort by TimeGenerated desc

// Hunt 2: File creation events for 7z.dll in temp directories by suspicious parent processes
DeviceFileEvents
| where TimeGenerated > ago(7d)
| where FileName =~ "7z.dll"
| where FolderPath contains "Temp" or FolderPath contains "Tmp"
| where InitiatingProcessFileName contains_any ("nsis", "setup", "install")
| project TimeGenerated, DeviceName, FileName, FolderPath, InitiatingProcessFileName, InitiatingProcessCommandLine, SHA256
| sort by TimeGenerated desc

// Hunt 3: Network connections from rundll32 (potential C2 after CoffeeLoader execution)
DeviceNetworkEvents
| where TimeGenerated > ago(24h)
| where InitiatingProcessFileName =~ "rundll32.exe"
| where RemoteUrl !contains "microsoft.com" and RemoteUrl !contains "windows.com"
| project TimeGenerated, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, RemoteUrl, RemoteIP, RemotePort
| sort by TimeGenerated desc

Velociraptor VQL Artifact

Deploy this VQL artifact across your Windows fleet to hunt for active infections and historical artifacts. This hunts for the specific process execution pattern and the dropped DLL artifact.

VQL — Velociraptor
-- Hunt for Retadup/CoffeeLoader indicators: rundll32 executing 7z.dll from temp
SELECT 
    Pid,
    Name,
    CommandLine,
    Exe,
    Username,
    CreateTime,
    ParentPid
FROM pslist()
WHERE 
    Name =~ "rundll32" 
    AND CommandLine =~ "7z.dll"
    AND (CommandLine =~ "Temp" OR CommandLine =~ "Tmp" OR CommandLine =~ "AppData")

-- Hunt for 7z.dll files in temporary directories (potential staging)
SELECT 
    FullPath,
    Size,
    Created,
    Modified,
    Hash.MD5 AS MD5,
    Hash.SHA256 AS SHA256
FROM glob(globs="C:/Users/*/AppData/Local/Temp/**/7z.dll")
WHERE NOT IsDir

-- Hunt for persistence mechanisms commonly used by CoffeeLoader (Run keys referencing temp paths)
SELECT 
    Name,
    Type,
    Data
FROM glob(globs="HKEY_USERS/*/Software/Microsoft/Windows/CurrentVersion/Run/*")
WHERE Data =~ "Temp" OR Data =~ "AppData"

Remediation & Hardening Script

This PowerShell script checks for indicators of compromise (IoCs) associated with the Retadup/CoffeeLoader campaign, verifies system hardening settings, and removes temporary directory artifacts. Run this on suspected endpoints or deploy via your RMM for hunting.

PowerShell
# Retadup CoffeeLoader Detection and Remediation Script
# Run as Administrator for full visibility

Write-Host "[+] Starting Retadup/CoffeeLoader Hunt..." -ForegroundColor Cyan

# Check 1: Look for 7z.dll in temp directories
$TempPaths = @($env:TEMP, $env:TMP, "C:\Windows\Temp")
$SuspiciousDLLs = @()

foreach ($Path in $TempPaths) {
    if (Test-Path $Path) {
        $DLLs = Get-ChildItem -Path $Path -Filter "7z.dll" -Recurse -ErrorAction SilentlyContinue
        foreach ($DLL in $DLLs) {
            $SuspiciousDLLs += $DLL.FullName
            Write-Host "[!] Found suspicious DLL: $($DLL.FullName)" -ForegroundColor Red
            
            # Get hash for threat intel lookup
            $Hash = Get-FileHash -Path $DLL.FullName -Algorithm SHA256
            Write-Host "    SHA256: $($Hash.Hash)" -ForegroundColor Yellow
        }
    }
}

# Check 2: Look for rundll32 processes with 7z.dll in command line
$SuspiciousProcesses = Get-CimInstance Win32_Process | Where-Object {
    $_.Name -eq "rundll32.exe" -and $_.CommandLine -like "*7z.dll*"
}

if ($SuspiciousProcesses) {
    Write-Host "[!] Active suspicious rundll32 processes detected:" -ForegroundColor Red
    foreach ($Proc in $SuspiciousProcesses) {
        Write-Host "    PID: $($Proc.ProcessId) | Command: $($Proc.CommandLine)" -ForegroundColor Yellow
        # Optionally kill the process (uncomment for active response)
        # Stop-Process -Id $Proc.ProcessId -Force
    }
} else {
    Write-Host "[+] No active rundll32/7z.dll processes found." -ForegroundColor Green
}

# Check 3: Audit registry Run keys for persistence pointing to temp
$RunKeys = @(
    "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run",
    "HKLM:\Software\Microsoft\Windows\CurrentVersion\Run"
)

foreach ($Key in $RunKeys) {
    if (Test-Path $Key) {
        $Values = Get-ItemProperty -Path $Key
        $Values.PSObject.Properties | ForEach-Object {
            if ($_.Value -like "*Temp*" -or $_.Value -like "*AppData*") {
                Write-Host "[!] Suspicious persistence in $Key : $($_.Name) = $($_.Value)" -ForegroundColor Red
            }
        }
    }
}

# Check 4: Verify Windows Defender/ASR rules are enabled (recommended hardening)
Write-Host "`n[+] Checking Attack Surface Reduction rules..." -ForegroundColor Cyan
$ASR Rules = @{
    "Block executable content from email client and webmail" = "BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550"
    "Block execution of potentially obfuscated scripts" = "5BEB7EFE-FD9A-4556-801D-275E5FFC04CC"
    "Block process creations originating from PSExec and WMI commands" = "D1E49AAC-8F56-4280-B9BA-993A6D77406C"
    "Block untrusted and unsigned processes that run from USB" = "B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4"
}

foreach ($Rule in $ASRRules.GetEnumerator()) {
    $Status = Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Ids -ErrorAction SilentlyContinue
    if ($Status -contains $Rule.Value) {
        Write-Host "[+] ASR Rule '$($Rule.Key)' is enabled." -ForegroundColor Green
    } else {
        Write-Host "[-] ASR Rule '$($Rule.Key)' is NOT enabled. Consider enabling for hardening." -ForegroundColor Yellow
    }
}

# Remediation Actions
Write-Host "`n[+] Recommended Remediation Actions:" -ForegroundColor Cyan
Write-Host "1. If 7z.dll was found in temp paths, isolate the host immediately and acquire memory for forensic analysis." 
Write-Host "2. Block execution of rundll32.exe with command lines containing temp paths via AppLocker or Windows Defender Application Control (WDAC)."
Write-Host "3. Restrict NSIS installer execution to signed, trusted publishers only."
Write-Host "4. Enable ASR rule 'Block untrusted and unsigned processes that run from USB' to mitigate Retadup propagation."
Write-Host "5. Review network segmentation to prevent lateral movement via SMB shares (Retadup propagation vector)."

# Cleanup temporary suspicious files (use with caution - verify before deletion)
if ($SuspiciousDLLs.Count -gt 0) {
    Write-Host "`n[!] Found $($SuspiciousDLLs.Count) suspicious DLLs. Manual review recommended before deletion." -ForegroundColor Red
    # Uncomment to auto-delete:
    # $SuspiciousDLLs | ForEach-Object { Remove-Item -Path $_ -Force -ErrorAction SilentlyContinue }
}

Remediation

Immediate Containment (24-48 Hours)

If you detect indicators of the Retadup/CoffeeLoader chain:

  1. Isolate Affected Hosts: Immediately disconnect from the network to prevent worm propagation to network shares.
  2. Block Execution: Implement AppLocker or Windows Defender Application Control (WDAC) policies to block rundll32.exe from executing DLLs located in %TEMP%, %TMP%, or user-writable directories.
  3. USB/Device Control: Enforce device control policies to block unsigned executables from removable media (Retadup’s primary propagation vector). Enable the ASR rule: Block untrusted and unsigned processes that run from USB (GUID: B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4).
  4. DNS and Network Blocking: While specific C2 domains for this 2026 campaign are not yet published in the summary, block uncategorized outbound connections from rundll32.exe and monitor for DNS tunneling patterns.

Long-Term Hardening

  1. Patch and Update 7-Zip: Ensure legitimate 7-Zip installations are updated to the latest version. Attackers often patch old vulnerable versions; maintaining current versions reduces the chance of DLL confusion.
  2. NSIS Installer Restrictions: Use Software Restriction Policies (SRP) or WDAC to block execution of unsigned NSIS installers. Legitimate software vendors should sign their installers.
  3. EDR Tuning: Configure your EDR to alert on:
    • rundll32.exe spawning from temporary directories.
    • DLL files created by processes with "nsis" or "setup" in the filename.
    • Image loads where the loaded DLL path contains \Temp\ or \AppData\Local\Temp\.
  4. Network Segmentation: Restrict SMB (445/tcp) and NetBIOS (137-139) traffic between workstation VLANs to prevent worm propagation.

Verification

Verify your defenses with the following checks:

  • Run the provided PowerShell script to identify existing infections.
  • Execute a test case using a benign file named 7z.dll in a temp directory to ensure your SIGMA rules fire correctly.
  • Review Windows Event Logs (Event ID 4688 with command line auditing enabled) for historical rundll32 execution patterns matching the CoffeeLoader TTPs.

Related Resources

Security Arsenal Alert Triage Automation AlertMonitor Platform Book a SOC Assessment platform Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.