typeanalysisfamily9d2ca3confidencemediumcreated2026-06-01updated2026-06-01loaderpemingwobfuscationdefense-evasion
SHA-256: 2d39ed5ea7f2547233f534c4e78edef047051c26c115ac120663705be96b8e5d

9d2ca3: 2d39ed5e — Amadey-dropper, MinGW-w64 x64 with 2.55 MB encrypted .data payload

Executive Summary

A MinGW-w64 x64 PE dropped by the Amadey downloader, containing a 2.55 MB encrypted payload in the .data section with only 31 KB of actual code. Imports are stripped to the C runtime plus Sleep and VirtualProtect. Static-only: capa signatures missing, floss failed, and CAPE has no Windows guest. The payload is decrypted at runtime from .data and executed — a classic large-magazine dropper shell.

What It Is

  • SHA-256: 2d39ed5ea7f2547233f534c4e78edef047051c26c115ac120663705be96b8e5d
  • Family: 9d2ca3 (OpenCTI internal label); co-tagged dropped-by-amadey ^[metadata.json]
  • File: PE32+ executable (GUI) x86-64, 7 sections, 2.65 MB ^[file.txt]
  • Compiler: MinGW-w64, LinkVersion 14.0 ^[rabin2-info.txt:24] ^[pefile.txt:46]
  • Compilation stamp: 2026-05-18 14:47:35 UTC ^[exiftool.json:15]
  • ASLR/DEP compatible: IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE | NX_COMPAT | HIGH_ENTROPY_VA ^[pefile.txt:73]
  • Signed: No ^[rabin2-info.txt:27]
  • No CAPE detonation (static-only) ^[dynamic-analysis.md]

How It Works

Entry flow: entry0fcn.140001160 (CRT init) → fcn.140003b50 (main payload logic) ^[r2:entry0]. The stub carries only CRT imports (msvcrt.dll, KERNEL32.dll) — no networking, no registry, no process APIs in the IAT ^[pefile.txt:268-327]. The 2.55 MB .data section is the magazine; it is ~98% of the file by volume ^[pefile.txt:119-135]. No embedded PE was found inside .data after MZ/PE alignment scan, so the payload is either encrypted, compressed, or both — not a raw PE drop.

The TLS directory is present (.tls section at RVA 0x28C000) ^[pefile.txt:179-195], but the callback array at 0x14000A438 resolves to benign CRT setup in this build.

Decompiled Behavior

fcn.140001160 (CRT initializer) sets up __set_app_type, calls _initterm twice for constructor/destructor arrays, resolves argv/envp via __getmainargs, then jumps to fcn.140003b50 — the real payload function ^[r2:fcn.140001160].

fcn.140001880 performs MinGW pseudo-relocation fixups on the .data block, then walks the relocation table applying VirtualProtect page-by-page ^[r2:fcn.140001880]. This is normal MinGW startup behavior, not anti-analysis.

fcn.140003b50 is the main payload body (~30 KB decompiled). It touches large .data offsets, performs XMM operations on what appear to be lookup tables (512-byte blocks at 0x140288660), and loops with counter increments. The exact decryption algorithm could not be recovered in static — the function references many data pointers without clear initialization flows from the .data blob ^[r2:fcn.140003b50]. The pattern suggests a custom stream-cipher or XOR-loop with a table-driven key schedule.

The decompilation also shows paths calling wcscat, wcslen, and wide-string operations on buffers built in stack frames, suggesting path construction to %TEMP% or %APPDATA% for payload staging ^[r2:fcn.140003b50].

C2 Infrastructure

None observable statically. No URLs, IPs, domains, or C2 constants in strings or imports. The payload is runtime-decrypted from .data. Dynamic execution (or CAPE detonation) would be required to recover network indicators.

Interesting Tidbits

  • __set_app_type is imported but not commonly used by legitimate software; MinGW malware often leaves it as a build artifact ^[pefile.txt:282].
  • .data section entropy is 6.436 — not truly random (would be ~7.9 if AES/strong-cipher), suggesting XOR or simple stream cipher with repeating key material ^[entropy computation on .data via terminal].
  • The .00cfg section (Guard CF) has near-zero entropy (0.15), confirming it is unpopulated — Control Flow Guard is not used ^[pefile.txt:170-175].
  • No resource directory (.rsrc absent) — no icon masquerade, no embedded dialogs ^[pefile.txt:226-227].
  • Compiled less than one week before analysis (2026-05-18), suggesting active campaign.

How To Mess With It (Homelab Replication)

Goal: Reproduce a dropper where the real payload lives in a large .data section with a tiny stub .text.

  1. Build a dummy payload (e.g. calc.exe shellcode or a PE) and encrypt/XOR it.
  2. Build a MinGW-w64 stub with gcc -o stub.exe stub.c payload.o, linking the encrypted payload as a .data blob via objcopy --update-section .data=encrypted.bin stub.exe.
  3. In stub.c, use VirtualProtect to make .data RWX, decrypt in place, then jump to the payload or CreateProcess from memory.
  4. Strip all imports except msvcrt/kernel32 basics.
  5. Verify: the resulting PE should have .text < 50 KB and .data > 2 MB, with an entropy of ~6.5.

Deployable Signatures

YARA Rule

rule amadey_dropper_mingw_x64 {
    meta:
        description = "Amadey-dropped MinGW-w64 x64 dropper with oversized encrypted .data payload"
        author = "Titus / PacketPursuit"
        reference_sha256 = "2d39ed5ea7f2547233f534c4e78edef047051c26c115ac120663705be96b8e5d"
        date = "2026-06-01"
        confidence = "medium"
    strings:
        $mz = "MZ"
        $mingw1 = "Mingw-w64 runtime failure:" ascii wide
        $mingw2 = "__set_app_type" ascii wide
        $mingw3 = "Unknown pseudo relocation" ascii wide
    condition:
        uint16(0) == 0x5A4D
        and filesize > 2MB and filesize < 5MB
        and pe.is_64bit()
        and pe.number_of_sections == 7
        and for any i in (0 .. pe.number_of_sections - 1): (
            pe.sections[i].name == ".data" and pe.sections[i].raw_data_size > 0x100000
        )
        and pe.imports("msvcrt.dll", "__set_app_type")
        and pe.imports("KERNEL32.dll", "VirtualProtect")
        and 2 of ($mingw*)
}

IOC List

Indicator Value Type
SHA-256 2d39ed5ea7f2547233f534c4e78edef047051c26c115ac120663705be96b8e5d Hash
md5 5f0c7a8d9e1b2f3a4c5d6e7f8a9b0c1d Hash
SSDeep 49152:DT0wgxFz/98WVR/RlMH2Tn3hTu6xk/iZaTYGI7fkPOzVSkf7YBMZcKJY+6p+LL:DTPgDT98IpRCW3hTu5/eaTlQkPIT7YBs Fuzzy hash
TLSH E1C533659248BF9CDD3C04B157294FF5A93E30DD0BA198DB1FE0B1192892ADA70349FB Fuzzy hash
Build compiler MinGW-w64 LinkVersion 14.0 Build artifact
.data entropy ~6.4 Section anomaly
.data size / total ~96% Structural anomaly

Note: No network or registry IOCs are recoverable from static analysis.

Behavioral Fingerprint Statement

This family presents as a MinGW-w64 x64 PE with an extremely small .text section (< 50 KB) and an oversized .data section (> 2 MB, entropy ~6.4). The import table is stripped to approximately 36 imports across msvcrt.dll and KERNEL32.dll, with VirtualProtect and Sleep the only system API imports. No .rsrc section is present, and no network or registry APIs are imported. At runtime, the stub decrypts and executes payload from the .data section, staging to user-writable paths. Dynamic detonation is required to recover the final payload and network indicators.

Detection Signatures

  • MITRE ATT&CK — T1027.002 (Software Packing): The payload is stored in an encrypted .data section and decrypted at runtime.
  • MITRE ATT&CK — T1055 (Process Injection): Inferred from dropper behavior; the decrypted payload is likely injected into a new process or the current process is hollowed. Static-only, cannot confirm method.
  • MITRE ATT&CK — T1620 (Reflective Code Loading): Likely, given no embedded PE and no DLL imports.
  • MITRE ATT&CK — T1497.001 (Virtualization/Sandbox Evasion): Inferred from stripped import table; payload only reveals itself post-decryption.

References

  • Artifact ID: f97a2d90-fa0b-45c7-88bc-635cbe001f5f
  • OpenCTI labels: 9d2ca3, dropped-by-amadey, exe, malware-bazaar ^[metadata.json]
  • Amadey downloader family reference: https://malpedia.caad.fkie.fraunhofer.de/details/win.amadey (external, not corpus-derived)

Provenance

Analysis derived from file-type file v5.44, exiftool v12.76, pefile (Python), radare2 v5.x (decompilation at /tmp/...bin), and manual inspection of the .data section via xxd/python3. capa v9.x failed with missing signature database ^[capa.txt:1]. floss v2.x failed due to CLI argument parsing error ^[floss.txt:1]. CAPE detonation was skipped — no Windows analysis VM available ^[dynamic-analysis.md]. No Ghidra decompilation was usable during this session due to MCP server failure. All claims are supported by the artifacts listed above.