Detection rules › Sigma

WSL Kali-Linux Usage

Status
experimental
Severity
high
Log source
product windows, category process_creation
Author
Swachchhanda Shrawan Poudel (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the use of Kali Linux through Windows Subsystem for Linux

MITRE ATT&CK coverage

TacticTechniques
StealthT1202 Indirect Command Execution

Event coverage

Rule body yaml

title: WSL Kali-Linux Usage
id: 6f1a11aa-4b8a-4b7f-9e13-4d3e4ff0e0d4
status: experimental
description: Detects the use of Kali Linux through Windows Subsystem for Linux
references:
    - https://medium.com/@redfanatic7/running-kali-linux-on-windows-51ad95166e6e
    - https://learn.microsoft.com/en-us/windows/wsl/install
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2025-10-10
tags:
    - attack.stealth
    - attack.t1202
logsource:
    category: process_creation
    product: windows
detection:
    selection_img_appdata:
        - Image|contains|all:
              - ':\Users\'
              - '\AppData\Local\packages\KaliLinux'
        - Image|contains|all:
              - ':\Users\'
              - '\AppData\Local\Microsoft\WindowsApps\kali.exe'
    selection_img_windowsapps:
        Image|contains: ':\Program Files\WindowsApps\KaliLinux.'
        Image|endswith: '\kali.exe'
    selection_kali_wsl_parent:
        ParentImage|endswith:
            - '\wsl.exe'
            - '\wslhost.exe'
    selection_kali_wsl_child:
        - Image|contains:
              - '\kali.exe'
              - '\KaliLinux'
        - CommandLine|contains:
              - 'Kali.exe'
              - 'Kali-linux'
              - 'kalilinux'
    filter_main_install_uninstall:
        CommandLine|contains:
            - ' -i '
            - ' --install '
            - ' --unregister '
    condition: 1 of selection_img_* or all of selection_kali_* and not 1 of filter_main_*
falsepositives:
    - Legitimate installation or usage of Kali Linux WSL by administrators or security teams
level: high

Stages and Predicates

Stage 0: condition

1 of selection_img_* or all of selection_kali_* and not 1 of filter_main_*

Stage 1: selection_img_appdata

selection_img_appdata:
    - Image|contains|all:
          - ':\Users\'
          - '\AppData\Local\packages\KaliLinux'
    - Image|contains|all:
          - ':\Users\'
          - '\AppData\Local\Microsoft\WindowsApps\kali.exe'

Stage 2: selection_img_windowsapps

selection_img_windowsapps:
    Image|contains: ':\Program Files\WindowsApps\KaliLinux.'
    Image|endswith: '\kali.exe'

Stage 3: selection_kali_wsl_parent

selection_kali_wsl_parent:
    ParentImage|endswith:
        - '\wsl.exe'
        - '\wslhost.exe'

Stage 4: selection_kali_wsl_child

selection_kali_wsl_child:
    - Image|contains:
          - '\kali.exe'
          - '\KaliLinux'
    - CommandLine|contains:
          - 'Kali.exe'
          - 'Kali-linux'
          - 'kalilinux'

Stage 5: not filter_main_install_uninstall

filter_main_install_uninstall:
    CommandLine|contains:
        - ' -i '
        - ' --install '
        - ' --unregister '

Exclusions

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

FieldKindExcluded values
CommandLinematch --install
CommandLinematch --unregister
CommandLinematch -i

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
  • Kali-linux
  • Kali.exe
  • kalilinux
Imageends_with
  • \kali.exe
Imagematch
  • :\Program Files\WindowsApps\KaliLinux.
  • :\Users\ corpus 3 (sigma 3)
  • \AppData\Local\Microsoft\WindowsApps\kali.exe
  • \AppData\Local\packages\KaliLinux
  • \KaliLinux
  • \kali.exe
ParentImageends_with
  • \wsl.exe corpus 4 (sigma 4)
  • \wslhost.exe corpus 2 (sigma 2)