Skip to content

YARA · CAPE Sandbox (CAPEv2)

CAPE_Modiloader

ModiLoader detonation shim

GenericCAPE Sandbox (CAPEv2)GNU General Public License v3.0Compiles with YARA-X
Author
kevoreilly
Date
2023-10-19
Modified
2025-01-31
Score / Quality
75 / 70

What this rule detects

ModiLoader detonation shim

Targets: Windows PE.

It defines 2 patterns (0 text, 2 hex, 0 regex).

Summary generated from the rule's metadata and condition.

Rule source

modiloader.yarGNU General Public License v3.0
rule CAPE_Modiloader : FILE
{
	meta:
		description = "ModiLoader detonation shim"
		author = "kevoreilly"
		id = "64f9aa51-d668-5d40-9781-c26970acf781"
		date = "2023-10-19"
		modified = "2025-01-31"
		reference = "https://github.com/kevoreilly/CAPEv2"
		source_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/analyzer/windows/data/yara/ModiLoader.yar#L1-L13"
		license_url = "https://github.com/kevoreilly/CAPEv2/blob/6b15e76f28cd83fd1187da6c9aaaad2174255356/LICENSE"
		hash = "1f0cbf841a6bc18d632e0bc3c591266e77c99a7717a15fc4b84d3e936605761f"
		logic_hash = "9e64e0c40192cc832a1ffa7b3ac65a704596af82515d03706cd7aa1f4498f32f"
		score = 75
		quality = 70
		tags = "FILE"
		cape_options = "exclude-apis=NtAllocateVirtualMemory:NtProtectVirtualMemory"

	strings:
		$epilog1 = {81 C2 A1 03 00 00 87 D1 29 D3 33 C0 5A 59 59 64 89 10 68}
		$epilog2 = {6A 00 6A 01 8B 45 ?? 50 FF 55 ?? 33 C0 5A 59 59 64 89 10 68}

	condition:
		uint16( 0 ) == 0x5a4d and all of them
}

Strings (2 patterns)

IdentifierTypeValueModifiers
$epilog1hex{81 C2 A1 03 00 00 87 D1 29 D3 33 C0 5A 59 59 64 89 10 68}
$epilog2hex{6A 00 6A 01 8B 45 ?? 50 FF 55 ?? 33 C0 5A 59 59 64 89 10 68}

Condition

uint16( 0 ) == 0x5a4d and all of them

In plain words (Heuristic)

  • The file must start with “MZ” — a Windows executable (PE).
  • All patterns in the rule must match.

Test this rule in your browser

Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Sample hashes

Hashes of samples the author lists in the rule's meta (look them up in your threat-intelligence platform).

  • 1f0cbf841a6bc18d632e0bc3c591266e77c99a7717a15fc4b84d3e936605761f

Licence & attribution

Author: kevoreilly

Source repository: CAPE Sandbox (CAPEv2) @ 6b15e76f28

Licence: GNU General Public License v3.0 (repository licence)

Copyright notice: Cuckoo Sandbox is copyrighted by the Cuckoo Foundation.

Original rule

Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.

Rule id: 64f9aa51-d668-5d40-9781-c26970acf781

Metadata

cape_optionsexclude-apis=NtAllocateVirtualMemory:NtProtectVirtualMemory

Tags:FILE