Detection rules › Sigma

HackTool - Jlaive In-Memory Assembly Execution

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
Jose Luis Sanchez Martinez (@Joseliyo_Jstnk)
Source
github.com/SigmaHQ/sigma

Detects the use of Jlaive to execute assemblies in a copied PowerShell

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: HackTool - Jlaive In-Memory Assembly Execution
id: 0a99eb3e-1617-41bd-b095-13dc767f3def
status: test
description: Detects the use of Jlaive to execute assemblies in a copied PowerShell
references:
    - https://jstnk9.github.io/jstnk9/research/Jlaive-Antivirus-Evasion-Tool
    - https://web.archive.org/web/20220514073704/https://github.com/ch2sh/Jlaive
author: Jose Luis Sanchez Martinez (@Joseliyo_Jstnk)
date: 2022-05-24
modified: 2023-02-22
tags:
    - attack.execution
    - attack.t1059.003
logsource:
    product: windows
    category: process_creation
detection:
    parent_selection:
        ParentImage|endswith: '\cmd.exe'
        ParentCommandLine|endswith: '.bat'
    selection1:
        Image|endswith: '\xcopy.exe'
        CommandLine|contains|all:
            - 'powershell.exe'
            - '.bat.exe'
    selection2:
        Image|endswith: '\xcopy.exe'
        CommandLine|contains|all:
            - 'pwsh.exe'
            - '.bat.exe'
    selection3:
        Image|endswith: '\attrib.exe'
        CommandLine|contains|all:
            - '+s'
            - '+h'
            - '.bat.exe'
    condition: parent_selection and (1 of selection*)
falsepositives:
    - Unknown
level: medium

Stages and Predicates

Stage 0: condition

parent_selection and (1 of selection*)

Stage 1: parent_selection

parent_selection:
    ParentImage|endswith: '\cmd.exe'
    ParentCommandLine|endswith: '.bat'

Stage 2: selection1

selection1:
    Image|endswith: '\xcopy.exe'
    CommandLine|contains|all:
        - 'powershell.exe'
        - '.bat.exe'

Stage 3: selection2

selection2:
    Image|endswith: '\xcopy.exe'
    CommandLine|contains|all:
        - 'pwsh.exe'
        - '.bat.exe'

Stage 4: selection3

selection3:
    Image|endswith: '\attrib.exe'
    CommandLine|contains|all:
        - '+s'
        - '+h'
        - '.bat.exe'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • +h corpus 2 (sigma 1, splunk 1)
  • +s
  • .bat.exe
  • powershell.exe corpus 2 (sigma 2)
  • pwsh.exe corpus 2 (sigma 2)
Imageends_with
  • \attrib.exe corpus 5 (sigma 5)
  • \xcopy.exe corpus 5 (sigma 5)
ParentCommandLineends_with
  • .bat
ParentImageends_with
  • \cmd.exe corpus 20 (sigma 20)