Detection rules › Sigma

Potentially Suspicious Windows App Activity

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

Detects potentially suspicious child process of applications launched from inside the WindowsApps directory. This could be a sign of a rogue ".appx" package installation/execution

Known false positives

  • Legitimate packages that make use of external binaries such as Windows Terminal

MITRE ATT&CK coverage

TacticTechniques
StealthNo specific technique

Telemetry coverage

Rule body

title: Potentially Suspicious Windows App Activity
id: f91ed517-a6ba-471d-9910-b3b4a398c0f3
status: test
description: Detects potentially suspicious child process of applications launched from inside the WindowsApps directory. This could be a sign of a rogue ".appx" package installation/execution
references:
    - https://news.sophos.com/en-us/2021/11/11/bazarloader-call-me-back-attack-abuses-windows-10-apps-mechanism/
    - https://www.sentinelone.com/labs/inside-malicious-windows-apps-for-malware-deployment/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-12
modified: 2025-10-07
tags:
    - attack.stealth
logsource:
    product: windows
    category: process_creation
detection:
    selection_parent:
        # GrandParentImage|endswith: '\sihost.exe'
        ParentImage|contains: 'C:\Program Files\WindowsApps\'
    selection_susp_img:
        Image|endswith:
            # You can add more LOLBINs
            - '\cmd.exe'
            - '\cscript.exe'
            - '\mshta.exe'
            - '\powershell.exe'
            - '\powershell_ise.exe'
            - '\pwsh.exe'
            - '\regsvr32.exe'
            - '\rundll32.exe'
            - '\wscript.exe'
    selection_susp_cli:
        # You can add more potentially suspicious keywords
        CommandLine|contains:
            - 'cmd /c'
            - 'Invoke-'
            - 'Base64'
    filter_optional_terminal:
        ParentImage|contains: ':\Program Files\WindowsApps\Microsoft.WindowsTerminal'
        ParentImage|endswith: '\WindowsTerminal.exe'
        # Note: to avoid FP add the default shells and profiles that your WT integrates
        Image|endswith:
            - '\powershell.exe'
            - '\cmd.exe'
            - '\pwsh.exe'
    filter_optional_sysinternals:
        ParentImage|startswith: 'C:\Program Files\WindowsApps\Microsoft.SysinternalsSuite'
        Image|endswith: '\cmd.exe'
    condition: selection_parent and 1 of selection_susp_* and not 1 of filter_optional_*
falsepositives:
    - Legitimate packages that make use of external binaries such as Windows Terminal
level: medium

Stages and Predicates

Stage 0: condition

selection_parent and 1 of selection_susp_* and not 1 of filter_optional_*

Stage 1: selection_parent

selection_parent:
    ParentImage|contains: 'C:\Program Files\WindowsApps\'

Stage 2: selection_susp_img

selection_susp_img:
    Image|endswith:
        - '\cmd.exe'
        - '\cscript.exe'
        - '\mshta.exe'
        - '\powershell.exe'
        - '\powershell_ise.exe'
        - '\pwsh.exe'
        - '\regsvr32.exe'
        - '\rundll32.exe'
        - '\wscript.exe'

Stage 3: selection_susp_cli

selection_susp_cli:
    CommandLine|contains:
        - 'cmd /c'
        - 'Invoke-'
        - 'Base64'

Stage 4: not filter_optional_*

filter_optional_terminal:
    ParentImage|contains: ':\Program Files\WindowsApps\Microsoft.WindowsTerminal'
    ParentImage|endswith: '\WindowsTerminal.exe'
    Image|endswith:
        - '\powershell.exe'
        - '\cmd.exe'
        - '\pwsh.exe'
filter_optional_sysinternals:
    ParentImage|startswith: 'C:\Program Files\WindowsApps\Microsoft.SysinternalsSuite'
    Image|endswith: '\cmd.exe'

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
Imageends_with\cmd.exeexcludes:Image field:"Image" value:"\cmd.exe"
Imageends_with\powershell.exeexcludes:Image field:"Image" value:"\powershell.exe"
Imageends_with\pwsh.exeexcludes:Image field:"Image" value:"\pwsh.exe"
ParentImageends_with\WindowsTerminal.exeexcludes:ParentImage field:"ParentImage" value:"\WindowsTerminal.exe"
ParentImagematch:\Program Files\WindowsApps\Microsoft.WindowsTerminalexcludes:ParentImage field:"ParentImage" value:":\Program Files\WindowsApps\Microsoft.WindowsTerminal"
ParentImagestarts_withC:\Program Files\WindowsApps\Microsoft.SysinternalsSuiteexcludes:ParentImage field:"ParentImage" value:"C:\Program Files\WindowsApps\Microsoft.SysinternalsSuite"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • Base64 corpus 19 (elastic 12, sigma 7)
  • Invoke- corpus 6 (sigma 6)
  • cmd /c corpus 5 (sigma 5)
field:"CommandLine" kind:match
Imageends_with
  • \cmd.exe corpus 130 (sigma 130)
  • \cscript.exe corpus 72 (sigma 72)
  • \mshta.exe corpus 66 (sigma 66)
  • \powershell.exe corpus 179 (sigma 178, kusto 1)
  • \powershell_ise.exe corpus 41 (sigma 41)
  • \pwsh.exe corpus 165 (sigma 164, kusto 1)
  • \regsvr32.exe corpus 64 (sigma 64)
  • \rundll32.exe corpus 94 (sigma 94)
  • \wscript.exe corpus 74 (sigma 74)
field:"Image" kind:ends_with
ParentImagematch
  • C:\Program Files\WindowsApps\
field:"ParentImage" kind:match value:"C:\Program Files\WindowsApps\"