rule: meta: name: namespace: authors: - scope: function # function | file | basic block description: >- att&ck: - :: [] # Example: Defense Evasion::Process Injection [T1055] mbc: - :: [] # Example: Anti-Behavioral Analysis::Debugger Detection [B0001] references: - examples: - features: # Simple single-feature match: # - api: CreateRemoteThread # Multiple features that must all be present: - and: - api: - api: # String matching (literal): # - string: "literal string" # String matching (case-insensitive): # - string: "text" = description # Regex string matching: # - string: /regex_pattern/i # Byte pattern matching: # - bytes: 4D 5A 90 00 = MZ header # Numeric constant: # - number: 0x5A4D # description: MZ magic # File offset: # - offset: 0x3C = PE header offset # Assembly mnemonic: # - mnemonic: rdtsc # OS restriction: # - os: windows # Architecture restriction: # - arch: i386 # Match another rule: # - match: # .NET property access: # - property/read: System.Environment.UserName # Alternative matches (any one sufficient): # - or: # - api: CreateFileA # - api: CreateFileW # Negation (must NOT be present): # - not: # - api: # Count-based (at least N matches required): # - count(api(Sleep)): 5 or more # - count(string("http")): 2 or more # Optional features (enhance match but not required): # - optional: # - api: # - string: "optional indicator"