Windows Subsystem for Linux Distribution Installed

Detects changes to the registry that indicates the install of a new Windows Subsystem for Linux distribution by name. Adversaries may enable and use WSL for Linux to avoid detection.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/01/12"
 3integration = ["endpoint", "windows"]
 4maturity = "production"
 5updated_date = "2023/06/22"
 6min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 7min_stack_version = "8.3.0"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Detects changes to the registry that indicates the install of a new Windows Subsystem for Linux 
13distribution by name. Adversaries may enable and use WSL for Linux to avoid detection.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*", "endgame-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Windows Subsystem for Linux Distribution Installed"
20references = ["https://learn.microsoft.com/en-us/windows/wsl/wsl-config"]
21risk_score = 47
22rule_id = "a1699af0-8e1e-4ed0-8ec1-89783538a061"
23severity = "medium"
24tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Defense Evasion", "Data Source: Elastic Endgame", "Data Source: Elastic Defend"]
25timeline_id = "3e47ef71-ebfc-4520-975c-cb27fc090799"
26timeline_title = "Comprehensive Registry Timeline"
27timestamp_override = "event.ingested"
28type = "eql"
29
30query = '''
31registry where host.os.type == "windows" and
32 registry.path : 
33       ("HK*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Lxss\\*\\PackageFamilyName",
34        "\\REGISTRY\\*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Lxss\\*\\PackageFamilyName")
35'''
36
37
38[[rule.threat]]
39framework = "MITRE ATT&CK"
40[[rule.threat.technique]]
41id = "T1112"
42name = "Modify Registry"
43reference = "https://attack.mitre.org/techniques/T1112/"
44
45[[rule.threat.technique]]
46id = "T1202"
47name = "Indirect Command Execution"
48reference = "https://attack.mitre.org/techniques/T1202/"
49
50
51[rule.threat.tactic]
52id = "TA0005"
53name = "Defense Evasion"
54reference = "https://attack.mitre.org/tactics/TA0005/"

References

Related rules

to-top