online lostsh.github.io self-erasing-crypter | 2026-10-13 rfc 3514: evil bit not set
post 11 2026-10-13 windows | crypter | worm 8 LCG steps

Anatomy of a self-erasing crypter: a 2008 IRC worm, an empty sandbox run, and eight random numbers that explain it

Windows | Crypter | IRC worm | DFIR 30 min read

A teardown of a quarantined Windows sample whose sandbox run showed nothing at all: why it died, what it was carrying, how to get the payload out without running it, and why "it did nothing" was never the right conclusion.

TL;DR

If you take one thing from this: an empty sandbox run is a finding about the sandbox, not about the sample. Find out why it was empty before you close the ticket.

Background: crypters, and a worm from 2008

A resource crypter is a small loader that carries the real payload encrypted inside itself. At run time it checks its environment, decrypts the payload in memory and runs it. A file scanner sees only the loader, which can be rebuilt with a new key in seconds, so the payload's signature never touches disk.

This one is written in Borland Delphi, from the pre-2009 generation of the runtime, with the runtime library stripped down by hand. It supports up to ten payloads, each either dropped to disk or run straight from memory, and its config can switch on anti-sandbox checks, an anti-VM check and a service-stopping step. Its resource names, key string and unit names match nothing public, so the crypter stays unattributed. It looks like a commodity "FUD crypter" of the kind sold on forums at the end of the 2000s (hypothesis).

The payload is from the same era. Win32/Hamweq is an IRC worm family that Microsoft first documented in May 2008 (aliases: W32.Ircbrute at Symantec, DDoS-Leba at McAfee, WORM_HAMWEQ at Trend). Bots of that generation join a channel on an IRC server the operator runs and wait for commands. They spread by writing an autorun.inf to USB sticks, a vector that Windows 7 shut for USB in 2009 and that KB971029 back-ported to XP and Vista. Samples like this still turn up in 2026, most likely from old files and old media that never went away (hypothesis for this sample).

The verdict that started it, and what it missed

The sandbox ran the sample on Windows 11 Pro, build 22621, as a 32-bit process under WOW64. What it recorded, checked against the dumps and the capture:

On top of that sat a verdict of suspicious, 47/100 and an ATT&CK list of 46 entries. Neither survives contact with the sample:

Report said Actually
Verdict suspicious, threat score 47 The score describes a run in which the payload never existed in memory. The sample itself carries a working worm.
Data Encrypted for Impact, OS Credential Dumping, Windows Service, Credential API Hooking Not in either stage. These are string heuristics.
CreateToolhelp32Snapshot, process and token queries, RtlGetVersion, OLE activity, attributed to the sample The stub has no import and no string for any of them. They come from the sandbox's own monitor DLLs, VxSSL32.dll and VxOle32.dll, loaded into the same process.
An "XOR loop" at two file offsets Both offsets fall in .reloc and .rsrc, which are data. False positive. The real cipher lives in the code section.
Nothing about USB spread, persistence or IRC Fair, for once: none of it ran. This is the gap the rest of this post fills.

The report's observations held up under checking; its conclusions did not. The useful question was never "what did it do?" but "why did it do nothing?".

Why the run was empty: the stub erased itself

The first thing the stub does, before it touches its own configuration, is a classic anti-emulation test. It calls GetProcAddress with two NULL arguments and then reads GetLastError. On the Windows versions it was built for, that returns 87, ERROR_INVALID_PARAMETER. An emulator that stubs APIs out often returns something else.

If the value is not 87, the stub does not exit. It does something quieter: it makes its own header page writable and fills all 4,096 bytes of it with 0x01. The same value is also mixed into the payload key, so even if the stub carried on, a wrong value would decrypt garbage. Then it goes about its business as if nothing had happened.

Its business starts with a resource lookup, and FindResourceA has to parse the PE headers to find the resource directory. With the header page overwritten, the lookup fails, the stub's very first config load returns NULL, and the stub takes its clean ExitProcess(0) path. No crash, no error dialog, nothing written. To a sandbox, it is a program that started and stopped.

Proving where it stopped

"It probably exited early" is not a finding. Three independent sources pin the exit point instead.

  1. The sandbox's API log. FindResourceA was called with lpName = 0x4062BC, which is the address of the stub's "MU" string, and the next LoadResource received a resource handle of zero. The GetProcAddress names in the log appear in exactly the order the code requests them, ending with the five resource APIs.
  2. The random-number seed. The stub sprinkles Delphi Random calls through its code as noise, and never seeds the generator from the clock. So the seed in the memory dump is a counter of how many calls ran.
  3. The stub's globals. Only three of its own variables are set: the shell32 handle, the ShellExecuteA pointer and a decoy "Hello World!" string. The config copy, key material and payload pointers are all still zero. (Zero is also the default, so this leg agrees rather than proves.)

The second leg is the one I like. Delphi's Random is a textbook linear congruential generator, so walking it forward from zero is one line of Python:

python | what the seed in the dump says
seed = 0
for step in range(1, 10):
    seed = (seed * 0x08088405 + 1) & 0xFFFFFFFF   # Delphi System.Random
    print(step, hex(seed))

# 1  0x1         one call in the entry point, before the MU load
# 2  ...         seven calls inside one pass of the resource loader
# 8  0x296b6d78  <- the value in the memory dump
# 9  0x5f4b0359  would only run if MU had loaded; it never did

Eight steps: one call before the resource load, seven inside exactly one pass of the resource loader, and not the ninth. That is the corner readout of this post. Together with the API log it puts the exit at the first resource access, with no room for "maybe it did something we didn't see".

Why the lookup failed on a resource that is there

The MU resource is in the file, and the resource section in the memory dump is byte-identical to the file image. The stub asked for it correctly: right module handle, right name, right type. So the resource itself is ruled out, and so is the call. What is left:

Explanation Status
The check got a value other than 87, the stub overwrote its header page, and Windows could no longer parse the image Probable (strong). It explains a NULL on an intact resource, why every earlier API call succeeded, and why the failure lands exactly on the first self-resource access.
Because Windows 11 22621 returns something else for that call Hypothesis. Needs one measurement on a clean Windows 11.
Because the monitor's own GetProcAddress hook changed the thread's last error Hypothesis. The hook was probably live at that moment. Same measurement, with and without the monitor. Either cause produces the same wipe.
The monitor's FindResourceA hook returned NULL by itself Unlikely: it logged correct arguments and passed every other call through.
Resource missing, or wrong handle, name or type Refuted by the dump, the report and the file.

The proof would be the header page itself, filled with 0x01, or the thread's last-error value. Neither was dumped, so the mechanism stays at probable (strong) and the exact value at hypothesis. There was probably a second barrier waiting, too: had the check passed, the next test reads a disk-enumeration registry key for vmware, on a guest that was a VMware VM.

On this OS, under this monitor, the stub is a dud. On a host where that check returns 87, it is a worm. The sandbox run tells you about the sandbox.

Getting the payload out without running it

The crypter keeps everything in five RT_BITMAP resources, none of which is a bitmap:

Resource Size Role
MU270 Bconfig: four on/off flags, ten mode bytes for the cipher, an (empty) 256-byte block
MK256 Bencrypted key material
MG114,336 Bthe payload, entropy 7.97
MGPH1256 Bdrop path; "NA" means run in memory
MGOT12 Bwindow mode; "NA"

The stub loops over MG1 to MG10; only MG1 exists. In this build the anti-sandbox flag is on (it exits if its path is c:\sample.exe, if Sandboxie's SbieDll.dll is loaded, or if a debugger is attached), the anti-VM flag is on (it halts if the disk enumeration key mentions virtual, vmware or vbox), the net stop step is off, and the payload runs in memory.

I re-implemented the resource cipher from the disassembly as a one-way extractor: sample in, plaintext out, no way to build or re-encrypt anything. I am not publishing it or the cipher; the YARA rules below key on the cipher instead. Because the payload key includes the value from the anti-emulation check, I swept all 255 possible values.

Here is where I nearly fooled myself. My first acceptance test was "the output starts with MZ". 51 of the 255 values pass that test. The run-time value is only one byte of a short key, and it only touches every fifth byte position, so the first two bytes come out right for a lot of wrong keys. A structural test, MZ plus an intact DOS stub plus PE\0\0 at e_lfanew, accepts exactly one value: 87, which is the value the stub expects from Windows. The decode is right because the structure is right, and because the one value that works is the one the code asks for.

What came out is stage 1: 14,336 bytes, built with Visual C++ 6.0 SP5 and the Processor Pack against Windows Server 2003 SP1 DDK import libraries, one C object, no C runtime, linked 2008-08-11 00:57:52 UTC. MSVC writes the real link time, so the date is probably genuine, but it can be forged. The crypter has no usable date at all: its timestamp is the constant 1992 value the Delphi linker always writes. The wrapping may be years younger than the worm.

One small oddity: the stub's icon resources carry a Swedish (sv-SE) language ID, while every other signal in the case points to Spain. It comes from whoever built the crypter or supplied its icon, and it supports no conclusion.

What the worm does, on paper

Everything in this section is capability, read from the code. Stage 1 never ran anywhere I have telemetry from. The worm's command handlers and its DoS code were outside the scope of this analysis, so those capabilities are named here and not described.

Walk-through: from stub to worm

Self-hollowing. With MGPH1 set to "NA", the stub never writes the worm to disk. It starts a new process from its own image path, swaps that process's memory for stage 1, and resumes it. Observable: a process whose image path equals its parent's, followed by cross-process writes. I named the loader routine and verified its API set; I did not reconstruct it.

Injection. The worm enables SeDebugPrivilege, snapshots the process list and walks its target names in order: explorer.exe, iexplorer.exe, msnmsgr.exe, firefox.exe, opera.exe, svchost.exe. The first running process it can open wins. It allocates read-write-execute memory there, writes itself in with ZwWriteVirtualMemory and starts a remote thread, and the hollowed copy exits. Why it matters: from here on, every artefact is written by explorer.exe (or a browser), not by a malware image. Two details: iexplorer.exe is not Internet Explorer's real image name, so IE never matches (probably a typo); and if the write or the thread fails, the injector exits with no retry and no second target.

Install. Inside the host, the worm takes the mutex asd-6+034997__ (another instance in the same session means it quits), creates C:\RECYCLER\ and C:\RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\ as hidden, system, read-only folders, and drops a Desktop.ini with the Recycle Bin's CLSID so Explorer draws the folder as a Recycle Bin. Then it copies itself in as svchost.exe. The SID is a constant of the malware, shared across Hamweq variants, not an account on any victim. The file it copies is the image the hollowed process was started from, which makes the "worm" on disk probably the crypter stub itself. The host process then keeps that file open for as long as it lives, so you cannot delete it from under the worm.

Persistence, re-armed every two seconds. Ten seconds after injection a watchdog thread starts and loops every 2,000 ms:

Delete the key and it is back within two seconds. Delete the file and you get a sharing violation. That pair of facts sets the removal order further down.

USB spread. A second thread wakes every 10 seconds, lists drives, skips A: and B:, and infects every drive that reports DRIVE_REMOVABLE: the same RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\ folder with svchost.exe and Desktop.ini, plus a root autorun.inf that overwrites any existing one. Fixed, network and optical drives are left alone. The assembled file:

autorun.inf | written to the root of every removable drive
[autorun]
open=RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\svchost.exe
icon=%SystemRoot%\system32\SHELL32.dll,7
action=Open USB
shell\open=Open
shell\open\command=RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\svchost.exe
icon=%SystemRoot%\system32\SHELL32.dll,4
action=Open folder to view files
shell\open=Open
shell\open\command=

Two AutoPlay lures, "Open USB" and "Open folder to view files", both pointing at the hidden copy. When the worm finds itself running from a removable drive, it opens that drive's root in Explorer, so a victim who clicked the lure sees their files and nothing else (intent: probable).

IRC C2. The third thread resolves dci[.]sinip[.]es, botijamen[.]sinip[.]es or morralla[.]sinip[.]es, connects on TCP 20000, sends the server password PASS ohai, registers a random six-letter nick, and joins #dci with the key marikonasfuera. Each infected USB drive is reported to #dci.usb as Infected usb drive: X:. Commands are accepted only from senders whose IRC hostname is ohai[.]com: a hostmask check against a cloak on the operator's IRC server, not a domain the worm ever resolves. Behind the commands sit a download-and-execute capability (HTTP, with the bare User-Agent Mozilla), a self-uninstall routine, and a DoS capability I did not analyse.

One detail matters for responders: the watchdog and USB threads start before the IRC loop and do not depend on it. Blocking the C2 stops the tasking. It does not stop the persistence or the spread.

And the obvious question, was anything stolen? Stage 1 resolves 53 APIs by name, and none of them reads or lists files, harvests the registry, hooks the keyboard, grabs the clipboard or the screen, or uploads anything (its wininet set is download-only). So no exfiltration capability is evident (probable, strong). The caveat is the download-and-execute: after tasking, a follow-on payload can do anything.

Does any of this still work in 2026?

Mostly not, and it is worth being precise about why, because "old malware" is not a reason and "it fails on Windows 11" is only one of three reasons.

  1. Windows 11 22621 kills the stub at its anti-emulation check, at least under the sandbox's monitor. Observed.
  2. x64 Windows probably kills the injection. Stage 1 is 32-bit and its first target, explorer.exe, is 64-bit on any x64 install. A 32-bit process cannot start a thread in a 64-bit one, the code has no architecture check, and a failed injection exits with no fallback. Install and persistence live only inside the injected thread, so nothing gets installed. The code is verified; the outcome is probable, because I did not run it.
  3. AutoRun ignores autorun.inf on USB since Windows 7, and since KB971029 on XP and Vista. The worm still writes the files. A user still has to double-click a hidden svchost.exe.

Where none of the three applies, the whole chain works: 32-bit Windows, which in 2026 means legacy, embedded and OT systems. What it gets there depends on the token of the process it lands in:

Host process token Persistence Everything else
Standard user HKCU Run, that user only C:\RECYCLER install, USB sticks seeded, an IRC bot running as the user
Admin under UAC HKCU Run (the filtered explorer.exe cannot write HKLM) Same as a standard user
Admin, UAC off or XP HKLM Active Setup: runs for every user who logs on SeDebugPrivilege injection into any process; follow-on payloads with full rights

The C2 side is dead for now: all three names are NXDOMAIN, so a bot that does run has no one to talk to. The next section explains the "for now".

Infrastructure: three dead labels on a shared zone

sinip[.]es is not the operator's domain. It is a free dynamic-DNS zone run by the Spanish provider cdmon. Its name servers are cdmon's dynamic-DNS servers, dinamic1/2/3[.]cdmon[.]net, which cdmon's own archived pages describe as such. Its sister domain sinipfija[.]com ("sin IP fija", "without a fixed IP") served cdmon's home page and resolves to the same address. The apex redirected to cdmon from 2009 to 2011, and the Wayback Machine holds fifteen unrelated tenant hostnames under it, from a ham radio club to a plasterer. The operator rented three free labels and could repoint each one within 60 seconds.

C2 name DNS today History
dci[.]sinip[.]es NXDOMAIN, authoritative Listed by Microsoft among Win32/Hamweq's IRC servers. Passive DNS: 67.210.170[.]142 from 2013-11-27 to 2015-10-30
botijamen[.]sinip[.]es NXDOMAIN, authoritative no record
morralla[.]sinip[.]es NXDOMAIN, authoritative no record

That 2013-2015 address sits in a /24 that ARIN lists as "Network Defence Intelligence Inc.", reassigned from Rogers Communications Canada, and reverse passive DNS on it returns only this one hostname. That is a researcher sinkhole (probable), not operator infrastructure. Infected hosts that resolved dci in those years were reporting to researchers. If it shows up in your historical flow data, alert on it. Do not block it: you would only hide your own infected hosts from yourself.

Why the dead names still matter

cdmon lets anyone create a subdomain of its parent zones, for free. NXDOMAIN on a service like that does not mean "gone", it means "unclaimed". Whoever registers dci, botijamen or morralla next receives every stage-1 instance still running anywhere, and the worm obeys anyone presenting the ohai[.]com host on that IRC server (probable; I did not test it and did not register anything). So:

Why Hamweq, and why not Mariposa

Artefact This sample Public reference
C2 hostname dci[.]sinip[.]es Listed by Microsoft under Win32/Hamweq. Exact.
Fake-SID folder \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\ Microsoft, Trend and a Symantec community thread from November 2008. Exact.
Active Setup "GUID" {28ABC5C0-4FCG-11CF-AAX5-81CX5C625612} Identical in Trend's TROJ_BUZUS.JW; Hamweq.AL differs by three characters with the same malformed pattern.
Behaviour Injects into explorer.exe; download-and-execute; floods; USB autorun Matches Microsoft's Hamweq description (generic to IRC bots of the era).
Port 20000 Hamweq.AL used 7000: per-build config.

So stage 1 matches Hamweq on a distinctive constant, a malformed-GUID pattern and a C2 name Microsoft itself attributes, and is a Hamweq variant at probable (strong). Mariposa/Palevo back-ends used other labels in the same zone, which proves nothing: Mariposa spoke a custom UDP protocol, not IRC, and a free DDNS zone is shared by design. I call the campaign "dci" after its C2 label and channels; that is a working name, not a vendor one.

Attribution verdict

Operator: unknown. A Spanish-speaking operator of a 2008-2009 Hamweq campaign is probable (moderate): the channel key is Spanish slang, morralla is Spanish for "small fry", and the DDNS service is Spanish, though it was open to anyone. The crypter's Swedish icon points somewhere else and belongs to whoever built the crypter. Nothing links any of this to the people arrested over Mariposa in 2010. Commodity tooling, a mass worm, no victim-specific configuration: this was not aimed at anyone.

Detection engineering: detect the RECYCLER, not the hash

The hashes in this case are worth exactly one build. The crypter exists to change them, and the stub on disk is the only file a scanner ever sees. What the operator cannot change cheaply is where the worm lives and how it persists: the same RECYCLER trick shows up across Hamweq variants from 2008 to 2012, and every infected USB stick in circulation still carries it. So the most durable detection is not about this sample at all:

Any file created or executed under <drive>:\RECYCLER\ on Windows Vista or later. The Recycle Bin has been $Recycle.Bin since Vista. A RECYCLER folder on a modern volume is either old media or this family's habit, and an executable inside one is never legitimate.

Supporting signals, roughly in order of durability:

What was tested, and how

Format Rules Result
YARA 4 5/5 intended hits (stub ×2, stage-1 file, stage-1 memory on two synthetic views). 0 false positives on 423 Windows PEs (Sysinternals, Python, Notepad++, PuTTY, 7-Zip, NirSoft, and a dozen Delphi and Borland binaries) plus 55 NSIS PEs. 0 hits on the raw ciphertext, on the other stage, and on all seven sandbox dumps. 57 of 58 individual strings hit nothing in the corpus.
Sigma 8 sigma check: 0 issues. Converts to Splunk 8/8 and to Defender KQL 7/8 (the eighth needs a field reference the backend cannot express, so it is hand-written). Never run against a real event log, because none exists: the only detonation died before any of this behaviour. All experimental.
Suricata 10 10/10 load. 0 alerts on the sandbox capture, as expected. On synthetic, outbound-only test traffic, 8 of 8 testable rules fire, and 0 fire on a generic IRC session. The two inbound rules (tasking from @ohai[.]com, the bare Mozilla User-Agent) have no positive test, because I did not build server-side C2 traffic.

The rules below are the tested files with their metadata adapted for publication: author, reference, shorter descriptions, the memory rule's confidence lowered to match how it was validated, and one ATT&CK tag (t1571 on the DNS rule) removed because a DNS query does not show a non-standard port. Strings, conditions and detection blocks are byte-identical to the tested versions, and the published copies were re-checked: yarac clean with the same hits, sigma check clean. The rule text carries live indicator values, because it has to.

YARA

Two rules for the stub (the exact build, and the crypter family with any payload), one for stage 1 on disk, one for stage 1 decoded inside a host process. The memory rule matches strings one at a time, with no header and no layout assumption, because the injector copies each string into its own allocation. Exclude your scanner and EDR processes when you run it: they hold the same strings.

yara | stage 0, the exact stub
/*
   YARA rules: the a1fe17da Delphi crypter stub and the Hamweq-variant IRC/USB worm it carries
   lostsh, https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html
   Requires YARA >= 4.0 (xor(key) modifier). No module imports.

   Stage 0  a1fe17dabb07efaf6508b3e21c90876b238a8c774cc2e980edc78b765892c566  Delphi resource-crypter stub
   Stage 1  543c7c920ac314ffdbc7385aaee6ffc31bad89c8e23af4c270d7a43ae89426ee  MSVC IRC/USB worm (decrypted MG1)

   Tested: 5/5 intended hits, 0 false positives on 423 Windows PEs (+0/55 NSIS PEs). Rule 4 is validated on
   synthetic header-less views only. No rule uses bytes from the worm's DoS code or command handlers (not analysed).
   Memory-scan caveat: the compiled rules hold these strings, so exclude the scanner / AV / EDR processes themselves.
*/

rule MAL_Win32_DelphiCrypter_a1fe17da_Stage0_Stub
{
    meta:
        author      = "lostsh"
        date        = "2026-10-12"
        description = "Stage 0 of case a1fe17da: Delphi resource-crypter stub (MU/MK/MG1 RT_BITMAP resources). Anchored on author code: resource cipher fcn.0040485c, anti-emulation probe + header wipe at 0x405960, 0x01-interleaved string blobs and the crypter resource-name set"
        hash        = "a1fe17dabb07efaf6508b3e21c90876b238a8c774cc2e980edc78b765892c566"
        scope       = "file"
        confidence  = "high (this build); 0 FP on 423-PE goodware corpus, Delphi coverage of the corpus is weak (9-18 files)"
        reference   = "https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html"
    strings:
        // resource cipher fcn.0040485c, block 1 (VA 0x40490d)
        $c1 = { 8B 45 ?? B9 FF 00 00 00 99 F7 F9 88 55 ?? 33 C0 8A 45 ?? 33 45 ?? B9 FF 00 00 00 99 F7 F9 88 55 ?? 8A 45 ?? 32 45 ?? 88 45 ?? 8A 45 ?? 32 45 ?? 32 45 ?? 34 80 88 45 ?? }
        // resource cipher fcn.0040485c, block 2 (VA 0x4049ab)
        $c2 = { 81 E1 7F 00 00 80 79 05 49 83 C9 80 41 32 C1 8B 4D ?? 8B 5D ?? 0F B6 4C 19 FF 03 C9 C1 E9 02 32 C1 32 D0 }
        // resource cipher fcn.0040485c, block 3 (VA 0x404a24)
        $c3 = { 80 FB 01 75 07 8A 44 0E 01 30 45 ?? 80 FB 07 75 0A 8A 44 0E 01 32 45 ?? 30 45 ?? 80 FB 02 75 1A }
        // entry0 0x405960: probe call, cmp eax,0x57, VirtualProtect(ImageBase,1,PAGE_READWRITE) + rep stosb header wipe
        $p1 = { E8 ?? ?? ?? ?? 83 F8 57 74 ?? 6A 00 90 E8 ?? ?? ?? ?? 90 50 90 54 90 6A 04 90 6A 01 90 50 90 97 90 E8 ?? ?? ?? ?? 90 31 C9 90 B5 10 90 F3 AA }
        // 0x01-interleaved string blobs in the stub's DATA section
        $b1 = { 40 01 01 73 01 01 01 73 01 68 01 01 75 01 6E 01 74 01 01 65 01 72 01 01 01 31 01 01 32 01 33 01 00 }   // build-specific key string
        $b2 = { 53 01 62 01 01 01 69 01 01 01 65 01 01 44 01 6C 01 6C 01 2E 01 64 01 01 01 6C 01 6C 01 00 }             // "SbieDll.dll"
        $b3 = { 5A 01 77 01 55 01 6E 01 6D 01 61 01 70 01 56 01 69 01 65 01 77 01 4F 01 66 01 53 01 65 01 63 01 74 01 69 01 6F 01 6E 01 00 } // "ZwUnmapViewOfSection"
        // .rsrc name strings MG1, MGOT1, MGPH1, MK, MU (UTF-16, counted) and Delphi literals 'MG','MGPH','MGOT','NA'
        $r1 = { 03 00 4D 00 47 00 31 00 05 00 4D 00 47 00 4F 00 54 00 31 00 05 00 4D 00 47 00 50 00 48 00 31 00 02 00 4D 00 4B 00 02 00 4D 00 55 00 }
        $r2 = { FF FF FF FF 02 00 00 00 4D 47 00 00 FF FF FF FF 04 00 00 00 4D 47 50 48 00 00 00 00 FF FF FF FF 04 00 00 00 4D 47 4F 54 00 00 00 00 FF FF FF FF 02 00 00 00 4E 41 00 }
    condition:
        uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and filesize < 2MB and
        2 of ($c*) and $p1 and 2 of ($b*, $r*)
}
yara | stage 0, the crypter family (optional, probable)
rule MAL_Win32_DelphiCrypter_MU_MK_MG_Family
{
    meta:
        author      = "lostsh"
        date        = "2026-10-12"
        description = "Generic: the case-a1fe17da Delphi resource crypter with any payload. Cipher fcn.0040485c (2 of 3 sequences) + probe gate (cmp eax,0x57 then VirtualProtect(...,1,PAGE_READWRITE) and rep stosb) + MU/MK/MG<n>/MGPH<n>/MGOT<n> resource names or the MG/MGPH/MGOT/NA code literals. Build-specific key blob not required"
        hash        = "a1fe17dabb07efaf6508b3e21c90876b238a8c774cc2e980edc78b765892c566"
        scope       = "file"
        confidence  = "medium (generalised from one sample; no sibling available to confirm the variable parts); 0 FP on 423-PE corpus"
        reference   = "https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html"
    strings:
        $c1 = { 8B 45 ?? B9 FF 00 00 00 99 F7 F9 88 55 ?? 33 C0 8A 45 ?? 33 45 ?? B9 FF 00 00 00 99 F7 F9 88 55 ?? 8A 45 ?? 32 45 ?? 88 45 ?? 8A 45 ?? 32 45 ?? 32 45 ?? 34 80 88 45 ?? }
        $c2 = { 81 E1 7F 00 00 80 79 05 49 83 C9 80 41 32 C1 8B 4D ?? 8B 5D ?? 0F B6 4C 19 FF 03 C9 C1 E9 02 32 C1 32 D0 }
        $c3 = { 80 FB 01 75 07 8A 44 0E 01 30 45 ?? 80 FB 07 75 0A 8A 44 0E 01 32 45 ?? 30 45 ?? 80 FB 02 75 1A }
        // probe gate, tolerant of junk-byte padding between the instructions
        $g1 = { 83 F8 57 74 ?? [0-48] 6A 04 [0-2] 6A 01 [0-48] F3 AA }
        // resource names, any payload index n (UTF-16 counted strings in .rsrc)
        $n_mu   = { 02 00 4D 00 55 00 }
        $n_mk   = { 02 00 4D 00 4B 00 }
        $n_mg   = { 0? 00 4D 00 47 00 3? 00 }
        $n_mgph = { 0? 00 4D 00 47 00 50 00 48 00 3? 00 }
        $n_mgot = { 0? 00 4D 00 47 00 4F 00 54 00 3? 00 }
        $lit    = { FF FF FF FF 02 00 00 00 4D 47 00 00 FF FF FF FF 04 00 00 00 4D 47 50 48 00 00 00 00 FF FF FF FF 04 00 00 00 4D 47 4F 54 00 00 00 00 FF FF FF FF 02 00 00 00 4E 41 00 }
    condition:
        uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and filesize < 5MB and
        2 of ($c*) and $g1 and ($lit or all of ($n_*))
}
yara | stage 1 on disk
rule MAL_Win32_IRCWorm_dci_a1fe17da_Stage1_File
{
    meta:
        author      = "lostsh"
        date        = "2026-10-12"
        description = "Stage 1 of case a1fe17da (decrypted MG1): MSVC IRC/USB worm-bot injector, dci/sinip.es campaign (Hamweq-like, probable). XOR-0xAB encoded string/API blobs, plaintext config (#dci, marikonasfuera, mutex, Active Setup GUID, sinip.es hosts), string decoders fcn.00401385 / fcn.00402bfb and the injector entry/target-selection sequence (entry0 0x402c68)"
        hash        = "543c7c920ac314ffdbc7385aaee6ffc31bad89c8e23af4c270d7a43ae89426ee"
        parent_hash = "a1fe17dabb07efaf6508b3e21c90876b238a8c774cc2e980edc78b765892c566"
        scope       = "file (for live memory use MAL_Win32_IRCWorm_dci_a1fe17da_Stage1_Memory: the MZ/PE check is not reliable in a process scan)"
        confidence  = "high; 0 FP on 423-PE corpus; each condition branch tested separately"
        reference   = "https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html"
    strings:
        // XOR-0xAB encoded blobs (.data string table 0x405568.. and API-name table 0x4050c4..)
        $x_usb  = "Infected usb drive: " xor(0xAB)
        $x_sid  = "\\S-1-5-21-1482476501-1644491937-682003330-1013" xor(0xAB)
        $x_ar0  = "[autorun]\nopen=" xor(0xAB)
        $x_ar1  = "action=Open USB" xor(0xAB)
        $x_ar2  = "action=Open folder to view files" xor(0xAB)
        $x_as   = "Software\\Microsoft\\Active Setup\\Installed Components" xor(0xAB)
        $x_irc  = "are supported by this server" xor(0xAB)
        $x_api1 = "ZwWriteVirtualMemory" xor(0xAB)
        $x_api2 = "CreateRemoteThread" xor(0xAB)
        // plaintext config (.data 0x405000.., 0x4054c8..)
        $cfg_h1   = "dci.sinip.es" ascii
        $cfg_h2   = "botijamen.sinip.es" ascii
        $cfg_h3   = "morralla.sinip.es" ascii
        $cfg_mtx  = "asd-6+034997__" ascii
        $cfg_guid = "{28ABC5C0-4FCG-11CF-AAX5-81CX5C625612}" ascii
        $cfg_key  = "marikonasfuera" ascii
        $cfg_usb  = "#dci.usb" ascii
        $cfg_blk  = { 66 34 32 34 00 00 00 00 73 76 63 68 6F 73 74 2E 65 78 65 00 }   // config block: string key + "svchost.exe"
        // string-table decoder loop, fcn.00401385 (VA 0x401390)
        $code_sdec = { 8B 46 08 03 C7 80 78 04 01 74 ?? 8B 0E FF 30 33 DB FF 51 ?? 85 C0 7E ?? 8B 4E 08 8B 06 33 ED FF 31 FF 50 ?? 85 C0 7E ?? 8B 46 08 8B 0C 07 8B 00 03 CB 8A 04 28 30 01 }
        // API-name table decoder, fcn.00402bfb (VA 0x402c18)
        $code_adec = { FF 36 33 DB FF D7 85 C0 7E ?? FF 74 24 ?? 33 ED FF D7 85 C0 7E ?? 8B 06 8B 4C 24 ?? 03 C3 51 8A 14 29 30 10 45 FF D7 3B E8 7C ?? 8B 06 03 C3 43 F6 10 }
        // entry0 0x402c68: prologue, SeDebugPrivilege, decode API table, LoadLibraryA
        $code_ep   = { 55 8B EC 81 EC ?? ?? 00 00 83 A5 ?? ?? FF FF 00 53 56 57 6A ?? 33 C0 59 8D BD ?? ?? FF FF F3 AB 68 ?? ?? ?? ?? E8 ?? ?? ?? ?? FF 35 ?? ?? ?? ?? E8 ?? ?? ?? ?? 59 59 FF 35 ?? ?? ?? ?? FF 15 }
        // entry0 0x402cea: CreateToolhelp32Snapshot(0xF,0) + PROCESSENTRY32.dwSize = 0x128
        $code_snap = { 6A 00 6A 0F 89 45 ?? FF D3 83 F8 FF 89 45 ?? 0F 84 ?? ?? ?? ?? 83 3D ?? ?? ?? ?? 00 74 ?? C7 45 ?? ?? ?? ?? ?? 8D 85 ?? ?? ?? ?? C7 85 ?? ?? ?? ?? 28 01 00 00 }
        // entry0 0x402d42: OpenProcess(0x43A, FALSE, pid) on the first matching target
        $code_open = { FF B5 ?? ?? ?? ?? 50 68 3A 04 00 00 FF 55 ?? 8B D8 85 DB 89 5D ?? 75 }
    condition:
        uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and filesize < 1MB and
        (
            ( 2 of ($code_*) and 2 of ($x_*, $cfg_*) ) or
            ( 3 of ($x_*) and 2 of ($cfg_*) )
        )
}
yara | stage 1 in host-process memory (probable)
rule MAL_Win32_IRCWorm_dci_a1fe17da_Stage1_Memory
{
    meta:
        author      = "lostsh"
        date        = "2026-10-12"
        description = "Stage 1 of case a1fe17da running inside an injected host (explorer.exe, iexplorer.exe, msnmsgr.exe, firefox.exe, opera.exe or svchost.exe): plaintext that exists only after fcn.00401385 decodes the string table in the host (autorun.inf templates, 'Infected usb drive: ', RECYCLER fake-SID path, IRC verbs) together with #dci / #dci.usb and config or decoder code. No PE-header dependence; strings are matched individually because entry0 copies each string into its own allocation"
        hash        = "543c7c920ac314ffdbc7385aaee6ffc31bad89c8e23af4c270d7a43ae89426ee"
        scope       = "memory"
        confidence  = "medium (probable): validated on header-less test views built from the stage-1 bytes only (no real infected-host dump exists; the supplied detonation never reached stage 1); 0 FP on 423-PE corpus and the 7 supplied dumps"
        reference   = "https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html"
    strings:
        // decoded-only plaintext (XOR-0xAB on disk)
        $d_usb = "Infected usb drive: " ascii
        $d_sid = "\\S-1-5-21-1482476501-1644491937-682003330-1013" ascii
        $d_ar0 = "[autorun]\nopen=" ascii
        $d_ar1 = "action=Open USB\nshell\\open=Open\nshell\\open\\command=" ascii
        $d_ar2 = "action=Open folder to view files\nshell\\open=Open\nshell\\open\\command=" ascii
        // decoded IRC verbs (each NUL-terminated)
        $i_pass = { 50 41 53 53 20 00 }          // "PASS "
        $i_nick = { 4E 49 43 4B 20 00 }          // "NICK "
        $i_join = { 4A 4F 49 4E 20 00 }          // "JOIN "
        $i_priv = { 50 52 49 56 4D 53 47 00 }    // "PRIVMSG"
        $i_005  = "are supported by this server" ascii
        // channels (plaintext in the image and in the host)
        $ch_dci = { 23 64 63 69 00 }             // "#dci"
        $ch_usb = "#dci.usb" ascii
        // config / code that ride along
        $k_key  = "marikonasfuera" ascii
        $k_mtx  = "asd-6+034997__" ascii
        $k_guid = "{28ABC5C0-4FCG-11CF-AAX5-81CX5C625612}" ascii
        $k_host = ".sinip.es" ascii
        $k_sdec = { 8B 46 08 03 C7 80 78 04 01 74 ?? 8B 0E FF 30 33 DB FF 51 ?? 85 C0 7E ?? 8B 4E 08 8B 06 33 ED FF 31 FF 50 ?? 85 C0 7E ?? 8B 46 08 8B 0C 07 8B 00 03 CB 8A 04 28 30 01 }
    condition:
        2 of ($d_*) and 2 of ($i_*) and 1 of ($ch_*) and 1 of ($k_*)
}

Sigma

Eight rules, one behaviour each. Every stage-1 artefact is written by the injected host process, so the registry and file rules carry no image filter, and the autorun.inf rule keys on the six host names instead. Two known gaps: the remote-thread rule misses the very first infection (the injector then runs under the stub's own name; the self-spawn rule and YARA cover that step), and the self-spawn rule is a hunting rule, not an alert.

sigma | registry_set_a1fe17da_active_setup_stubpath.yml
title: A1FE17DA Stage-1 Bot Active Setup StubPath Persistence (Malformed GUID)
id: b0e2a21f-4881-4dce-8897-e0a9eaf9dc50
status: experimental
description: |
    Detects the worm's primary persistence: HKLM\Software\Microsoft\Active Setup\Installed
    Components\{28ABC5C0-4FCG-11CF-AAX5-81CX5C625612}\StubPath pointing at
    C:\RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\svchost.exe. The subkey name is not a valid
    GUID. The write comes from the injected host process (usually explorer.exe), not from a malware image, and
    is repeated every 2 seconds. The contains match also covers the WOW6432Node view. Built from code; not yet
    tested on real event logs.
references:
    - https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html
author: lostsh
date: 2026-10-12
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.t1547.014
logsource:
    product: windows
    category: registry_set
detection:
    selection:
        TargetObject|contains: '\Microsoft\Active Setup\Installed Components\{28ABC5C0-4FCG-11CF-AAX5-81CX5C625612}'
        TargetObject|endswith: '\StubPath'
    condition: selection
falsepositives:
    - None expected. The subkey name is a malformed GUID that no legitimate component registers.
level: critical
sigma | registry_set_a1fe17da_run_internet_security_service.yml
title: A1FE17DA Stage-1 Bot Run Key Value Internet Security Service
id: d041d9c3-c85f-4837-bd2f-4572262cbec1
status: experimental
description: |
    Detects the worm's fallback persistence: when the HKLM Active Setup key cannot be created (no admin
    rights), it writes the HKCU Run value "Internet Security Service" pointing at its RECYCLER install copy,
    repeated every 2 seconds from inside the injected host process. Built from code; not yet tested on real
    event logs.
references:
    - https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html
author: lostsh
date: 2026-10-12
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.t1547.001
logsource:
    product: windows
    category: registry_set
detection:
    selection_value:
        TargetObject|endswith: '\Software\Microsoft\Windows\CurrentVersion\Run\Internet Security Service'
    selection_recycler_data:
        TargetObject|contains: '\Software\Microsoft\Windows\CurrentVersion\Run\'
        Details|contains: '\RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\'
    condition: 1 of selection_*
falsepositives:
    - A legitimate product that registers a Run value with the exact name "Internet Security Service" (none known; check the value data, which for this malware is a svchost.exe under a RECYCLER folder).
level: high
sigma | file_event_a1fe17da_recycler_fake_sid_install.yml
title: A1FE17DA Stage-1 Bot File Written Under Hard-Coded RECYCLER Fake-SID Folder
id: 95898163-5d90-47be-9171-0e4446aa3668
status: experimental
description: |
    Detects files created in the hard-coded folder \RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\
    that the worm uses on C: (local install) and on removable drives (USB copies): a copy of itself named
    svchost.exe, and a Desktop.ini that makes the folder render as a Recycle Bin. On Vista and later the
    Recycle Bin is $Recycle.Bin, so a RECYCLER folder on a modern host is already anomalous. The SID is a
    malware constant, not a real account. Built from code; not yet tested on real event logs.
references:
    - https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html
author: lostsh
date: 2026-10-12
tags:
    - attack.persistence
    - attack.stealth
    - attack.lateral-movement
    - attack.t1036.005
    - attack.t1564.001
    - attack.t1091
logsource:
    product: windows
    category: file_event
detection:
    selection:
        TargetFilename|contains: '\RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\'
        TargetFilename|endswith:
            - '\svchost.exe'
            - '\Desktop.ini'
    condition: selection
falsepositives:
    - None expected. The SID-like folder name is a constant of this malware family, not a real account SID on the host.
level: critical
sigma | file_event_a1fe17da_autorun_inf_by_injected_host.yml
title: A1FE17DA Stage-1 Bot autorun.inf Written To Drive Root By Injected Host Process
id: 8d559bdd-314d-4352-8bf7-8ff18137ee0f
status: experimental
description: |
    Detects autorun.inf being created in the root of a drive other than C: by one of the processes the worm
    injects into. The worm's USB thread infects every removable drive every 10 seconds and overwrites any
    existing autorun.inf with "Open USB" / "Open folder to view files" lures that point at
    RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\svchost.exe. Sysmon file events carry no drive
    type, so the rule matches any drive root except C:. Built from code; not yet tested on real event logs.
references:
    - https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html
author: lostsh
date: 2026-10-12
tags:
    - attack.lateral-movement
    - attack.initial-access
    - attack.t1091
logsource:
    product: windows
    category: file_event
detection:
    selection_file:
        TargetFilename|endswith: ':\autorun.inf'
    selection_host:
        Image|endswith:
            - '\explorer.exe'
            - '\iexplorer.exe'
            - '\msnmsgr.exe'
            - '\firefox.exe'
            - '\opera.exe'
            - '\svchost.exe'
    filter_main_c:
        TargetFilename|startswith: 'C:\'
    condition: all of selection_* and not 1 of filter_main_*
falsepositives:
    - A user copying an autorun.inf onto a USB stick with Explorer (for example from installation media); check whether a RECYCLER folder appeared on the same drive.
    - A browser saving a download named autorun.inf directly to a drive root.
level: high
sigma | create_remote_thread_a1fe17da_rogue_svchost_or_recycler_source.yml
title: A1FE17DA Stage-1 Bot CreateRemoteThread Into Host Process From Rogue svchost Or RECYCLER Image
id: 67534733-b999-4101-8c83-160425094b14
status: experimental
description: |
    Detects the stage-1 injector of the a1fe17da crypter's Hamweq-variant worm starting a remote thread in one
    of its target processes (explorer.exe, iexplorer.exe, msnmsgr.exe, firefox.exe, opera.exe, svchost.exe)
    from a svchost.exe outside System32/SysWOW64, or from any image under a RECYCLER folder. That is what its
    install copy C:\RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\svchost.exe looks like when its
    persistence relaunches it. Gap: on the first infection the injector runs under the stub's own file name;
    use the self-spawn rule and the YARA rules for that. iexplorer.exe is kept because it is in the worm's
    list (probably a typo for iexplore.exe). Built from code; not yet tested on real event logs.
references:
    - https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html
author: lostsh
date: 2026-10-12
tags:
    - attack.stealth
    - attack.privilege-escalation
    - attack.t1055.002
logsource:
    product: windows
    category: create_remote_thread
detection:
    selection_target:
        TargetImage|endswith:
            - '\explorer.exe'
            - '\iexplorer.exe'
            - '\msnmsgr.exe'
            - '\firefox.exe'
            - '\opera.exe'
            - '\svchost.exe'
    selection_source_svchost:
        SourceImage|endswith: '\svchost.exe'
    filter_source_system:
        SourceImage|startswith:
            - 'C:\Windows\System32\'
            - 'C:\Windows\SysWOW64\'
    selection_source_recycler:
        SourceImage|contains: '\RECYCLER\'
    condition: selection_target and ((selection_source_svchost and not filter_source_system) or selection_source_recycler)
falsepositives:
    - Unlikely. A svchost.exe outside System32/SysWOW64 or any executable under a RECYCLER folder is itself suspicious on Vista and later.
level: high
sigma | dns_query_a1fe17da_c2_hostnames.yml
title: A1FE17DA Stage-1 Bot C2 Hostname DNS Query
id: 8474c0ec-ad3d-4618-883f-3d038f8de14e
status: experimental
description: |
    Detects DNS queries for the three hard-coded IRC C2 hostnames of the worm. All three were NXDOMAIN at the
    provider's authoritative servers in October 2026, so any query is anomalous. Do not extend this rule to
    the parent zone: sinip[.]es is a shared, multi-tenant dynamic-DNS zone with unrelated tenants. Built from
    code; not yet tested on real event logs.
references:
    - https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html
author: lostsh
date: 2026-10-12
tags:
    - attack.command-and-control
    - attack.t1071
logsource:
    product: windows
    category: dns_query
detection:
    selection:
        QueryName:
            - 'dci.sinip.es'
            - 'botijamen.sinip.es'
            - 'morralla.sinip.es'
    condition: selection
falsepositives:
    - Security researchers or sinkhole operators resolving the names on purpose.
level: critical
sigma | proc_creation_a1fe17da_stub_self_spawn_hollowing.yml
title: A1FE17DA Crypter Stub Spawns A New Instance Of Its Own Image (Hollowing Pattern)
id: 75c0342a-6e92-40ce-a314-a66a87d560f2
status: experimental
description: |
    Hunting rule for the a1fe17da crypter stub's in-memory transfer: it starts a new process from its own
    image path and hollows it with the worm. The observable is a process whose image equals its parent's,
    outside the Windows and Program Files folders. Many multi-process applications spawn themselves (browsers,
    Electron apps), hence level low: keep only unsigned images, by joining with Sysmon EID 7 Signed=false or
    EDR certificate data. Built from code; not yet tested on real event logs.
references:
    - https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html
author: lostsh
date: 2026-10-12
tags:
    - attack.stealth
    - attack.privilege-escalation
    - attack.t1055.012
logsource:
    product: windows
    category: process_creation
detection:
    selection:
        Image|fieldref: ParentImage
    filter_main_system_dirs:
        Image|startswith:
            - 'C:\Windows\'
            - 'C:\Program Files\'
            - 'C:\Program Files (x86)\'
    filter_optional_user_apps:
        Image|contains:
            - '\AppData\Local\Programs\'
            - '\AppData\Local\Microsoft\'
            - '\AppData\Local\Google\Chrome\'
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Multi-process applications installed per user (browsers, Electron apps, updaters) that start copies of their own image.
    - Signed software; drop hits whose image is validly signed.
level: low
sigma | proc_creation_a1fe17da_stub_net_stop_firewall_security_center.yml
title: A1FE17DA Crypter Stub Stops Windows Firewall/ICS Or Security Center Via net.exe
id: c01dc22e-87b2-4346-a55b-42445bed5a74
status: experimental
description: |
    Detects net.exe or net1.exe stopping the SharedAccess (Windows Firewall/ICS) or "Security Center" service.
    The a1fe17da crypter stub can do this when a config flag is set. In the analysed build the flag is off, so
    this rule targets other builds of the same crypter and generic defence impairment. Built from code; not
    yet tested on real event logs.
references:
    - https://lostsh.github.io/blog/posts/2026-10-13/self-erasing-crypter.html
author: lostsh
date: 2026-10-12
tags:
    - attack.defense-impairment
    - attack.t1685
    - attack.t1686.003
logsource:
    product: windows
    category: process_creation
detection:
    selection_img:
        - Image|endswith:
              - '\net.exe'
              - '\net1.exe'
        - OriginalFileName:
              - 'net.exe'
              - 'net1.exe'
    selection_cmd_firewall:
        CommandLine|contains|all:
            - 'stop'
            - 'sharedaccess'
    selection_cmd_secctr:
        CommandLine|contains|all:
            - 'stop'
            - 'Security Center'
    condition: selection_img and 1 of selection_cmd_*
falsepositives:
    - Administrators or deployment scripts stopping these services on purpose (rare on managed endpoints).
level: high

The ten Suricata rules are not reproduced here. They key on the three DNS names (exact name or a sub-label, never the apex), the PASS ohai and JOIN #dci marikonasfuera lines, the USER and NICK shapes inside a flow already marked by one of those, the #dci.usb report, inbound tasking from @ohai[.]com, and the bare Mozilla User-Agent. None of them keys on port 20000.

Removal, in this order

Two facts from the code dictate the order. The watchdog re-writes the registry every two seconds, so deleting keys first is undone almost at once. The host process holds the install copy open, so deleting the file first fails. And the thing to stop is not a malware process: it is a thread inside explorer.exe.

  1. Capture before you change anything. Isolate the host from the network (that stops C2 tasking while you work), then take a memory image or at least a dump of the host process, export the registry keys, and copy C:\RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\ without opening anything in it. Keep the stub file.
  2. Find the host process. A live query for the mutex asd-6+034997__ and for an open handle on the SID path (Sysinternals handle64 through your EDR's live response) names it. Check every logon session: the mutex is session-local, so there can be one instance per session.
  3. Suspend it, all threads. That stops the watchdog. If it is explorer.exe, warn the user. If it is svchost.exe (a server with nothing else to inject into), do not kill it: remove the registry entries, reboot, and delete the file after the reboot or schedule the delete for it.
  4. In one script: delete the HKLM Active Setup key in both registry views (WOW6432Node too); kill the suspended host, which releases the file; clear the hidden, system and read-only attributes and delete svchost.exe, Desktop.ini, the SID folder and C:\RECYCLER; delete the original stub, which the worm never removes. Then, for every user profile, delete the per-user Active Setup key and the Internet Security Service Run value, loading the hives of users who are not logged on.
  5. Clean every USB drive that was ever plugged into the host, on a clean machine with AutoRun off and without opening anything: autorun.inf, then the RECYCLER folder. An uncleaned stick re-seeds every host it touches.
  6. Turn AutoRun off by policy, fleet-wide: NoDriveTypeAutoRun = 0xFF and NoAutorun = 1. Modern Windows already ignores autorun.inf on USB; the policy is for the legacy hosts and the changed defaults.
  7. Verify three times: immediately, after two minutes, and after the next logon. If the keys come back after two minutes, an instance survived somewhere: back to step 2. Keep the RECYCLER, autorun.inf, registry and DNS hunts running for 90 days.

Skip any step and it comes back. There are six ways: a surviving host process, an uncleaned USB stick, a leftover install copy behind a missed registry entry, the original stub, a re-registered C2 label, and whatever a download-and-execute command delivered before cleanup. If a C2 session cannot be ruled out, re-image instead of cleaning.

What this post does not cover

Hard lessons

What went well: the code predicted the sandbox's observations exactly. The GetProcAddress names in the report come in the order the code requests them, and the random-number seed sits on exactly the step the code predicts, which turned "it probably exited early" into a pinned exit point. The payload was recovered and identified without running anything. The detection content was tested against 423 real Windows binaries rather than shipped on the assumption that specific-looking strings are specific.

Indicators of compromise

Block the three C2 names. Do not block their parent zone, its name servers or any IP: all of them are shared, and the one historical IP is a sinkhole. Hashes identify one build only; the host artefacts are what last.

Type Value Note
SHA-256 a1fe17dabb07efaf6508b3e21c90876b238a8c774cc2e980edc78b765892c566 The crypter stub, the quarantined file. MD5 e6c3d23edda6d4ee4ddb5957c3181a6d. Probably also every C:\RECYCLER and USB copy.
SHA-256 543c7c920ac314ffdbc7385aaee6ffc31bad89c8e23af4c270d7a43ae89426ee Stage 1, the decrypted worm. MD5 59e1790b71af4cd8d216b194d6f2d658. Exists only in memory in this build: for memory carving.
SHA-256 c56b9de17a0873f92646ea860dcb292211298124f6634411f15f2fd5c268ae45 The encrypted MG1 resource. Matches other stubs carrying the same payload under the same key.
Domain dci[.]sinip[.]es, botijamen[.]sinip[.]es, morralla[.]sinip[.]es Block by name and alert, permanently. IRC C2 on TCP 20000. NXDOMAIN today and re-registrable by anyone.
IRC content PASS ohai, JOIN #dci marikonasfuera, PRIVMSG #dci.usb :Infected usb drive: X: Client lines, any port (default 20000). Suricata labels the flow FTP.
IRC hostmask *!*@ohai[.]com The only sender the worm takes commands from. Content anchor only: the domain is never resolved. Do not block it.
Port 20000/tcp C2 port. Also DNP3: never alert on the port alone in OT networks.
Mutex asd-6+034997__ Held by the injected host process (usually explorer.exe). No Global\ prefix: one per session. Live query only.
Registry HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{28ABC5C0-4FCG-11CF-AAX5-81CX5C625612} → StubPath Primary persistence, re-written every 2 s. Also under WOW6432Node. The per-user copy of the key under HKCU is deleted every 2 s.
Registry HKCU\Software\Microsoft\Windows\CurrentVersion\Run → value Internet Security Service Fallback persistence when HKLM is denied. Check every user's hive.
Path C:\RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\svchost.exe Install copy, plus Desktop.ini beside it. Hidden, system, read-only; held open by the host process. The SID is a malware constant.
Path <removable>:\autorun.inf, <removable>:\RECYCLER\S-1-5-21-1482476501-1644491937-682003330-1013\svchost.exe USB spread, every removable drive every 10 s. Lures: action=Open USB, action=Open folder to view files.
User-Agent Mozilla (exactly that, nothing after it) Download-and-execute requests. Context only: too generic to alert on alone.
IP (DO NOT BLOCK) 67.210.170[.]142 dci resolved here 2013-2015: a probable researcher sinkhole. Alert only; a hit means an infected host.
Shared (DO NOT BLOCK) sinip[.]es, *.sinip[.]es, sinipfija[.]com, dinamic1/2/3[.]cdmon[.]net, 212.36.74[.]109, 35.156.85[.]88 The provider's multi-tenant zone, front-end, name servers and addresses. Blocking them hurts unrelated tenants and stops nothing extra.
Not an IoC VxSSL32.dll, VxOle32.dll, 8.8.8[.]8, www[.]msftconnecttest[.]com, ICMP payload AreeConnectivityProbe The sandbox's monitor and connectivity checks, and Windows' own NCSI lookup. Seen in the run, unrelated to the sample.

Behavioral / host artifacts

Takeaways

  1. An empty sandbox run is a statement about the sandbox. This sample's own anti-emulation check ended the run. Find out why a run was empty before you close it.
  2. Count something the malware cannot fake. An API log in code order and a random-number seed that counts calls turned "it probably exited early" into a pinned exit point.
  3. Decrypt offline, validate by structure. One key in 255 produced a PE. Fifty-one produced MZ.
  4. Old is not harmless, it is narrow. Windows 11, x64 and post-2009 AutoRun each break the chain. 32-bit legacy, embedded and OT hosts break none of them.
  5. Block the label, not the zone. Three FQDNs, permanently. The dynamic-DNS parent, its servers and every IP stay open, and the sinkhole stays visible.
  6. Remove in the order the malware forces. Stop the host process, then files and registry in one action, then the USB sticks. Anything else and it is back in two seconds.