Detection rules › Sigma

XBAP Execution From Uncommon Locations Via PresentationHost.EXE

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the execution of ".xbap" (Browser Applications) files via PresentationHost.EXE from an uncommon location. These files can be abused to run malicious ".xbap" files any bypass AWL

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: XBAP Execution From Uncommon Locations Via PresentationHost.EXE
id: d22e2925-cfd8-463f-96f6-89cec9d9bc5f
status: test
description: |
    Detects the execution of ".xbap" (Browser Applications) files via PresentationHost.EXE from an uncommon location. These files can be abused to run malicious ".xbap" files any bypass AWL
references:
    - https://lolbas-project.github.io/lolbas/Binaries/Presentationhost/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-07-01
modified: 2023-11-09
tags:
    - attack.execution
    - attack.stealth
    - attack.t1218
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\presentationhost.exe'
        - OriginalFileName: 'PresentationHost.exe'
    selection_cli:
        CommandLine|contains: '.xbap'
    filter_main_generic:
        CommandLine|contains: # Filter out legitimate locations if you find them
            - ' C:\Windows\'
            - ' C:\Program Files'
    condition: all of selection* and not 1 of filter_main_*
falsepositives:
    - Legitimate ".xbap" being executed via "PresentationHost"
level: medium

Stages and Predicates

Stage 0: condition

all of selection* and not 1 of filter_main_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\presentationhost.exe'
    - OriginalFileName: 'PresentationHost.exe'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains: '.xbap'

Stage 3: not filter_main_generic

filter_main_generic:
    CommandLine|contains:
        - ' C:\Windows\'
        - ' C:\Program Files'

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
CommandLinematch C:\Program Files
CommandLinematch C:\Windows\

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
  • .xbap
Imageends_with
  • \presentationhost.exe corpus 2 (sigma 2)
OriginalFileNameeq
  • PresentationHost.exe corpus 2 (sigma 2)