Signed Proxy Execution via MS Work Folders

Identifies the use of Windows Work Folders to execute a potentially masqueraded control.exe file in the current working directory. Misuse of Windows Work Folders could indicate malicious activity.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2022/03/02"
 3integration = ["windows", "system"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2024/01/16"
 8
 9[rule]
10author = ["Elastic", "Austin Songer"]
11description = """
12Identifies the use of Windows Work Folders to execute a potentially masqueraded control.exe file in the current working
13directory. Misuse of Windows Work Folders could indicate malicious activity.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-windows.*", "endgame-*", "logs-system.security*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Signed Proxy Execution via MS Work Folders"
20note = """## Triage and analysis
21
22### Investigating Signed Proxy Execution via MS Work Folders
23
24Work Folders is a role service for file servers running Windows Server that provides a consistent way for users to access their work files from their PCs and devices. This allows users to store work files and access them from anywhere. When called, Work Folders will automatically execute any Portable Executable (PE) named control.exe as an argument before accessing the synced share.
25
26Using Work Folders to execute a masqueraded control.exe could allow an adversary to bypass application controls and increase privileges.
27
28#### Possible investigation steps
29
30- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
31    - Examine the location of the WorkFolders.exe binary to determine if it was copied to the location of the control.exe binary. It resides in the System32 directory by default.
32- Trace the activity related to the control.exe binary to identify any continuing intrusion activity on the host.
33- Review the control.exe binary executed with Work Folders to determine maliciousness such as additional host activity or network traffic.
34- Determine if control.exe was synced to sync share, indicating potential lateral movement.
35- Review how control.exe was originally delivered on the host, such as emailed, downloaded from the web, or written to
36disk from a separate binary.
37
38### False positive analysis
39
40- Windows Work Folders are used legitimately by end users and administrators for file sharing and syncing but not in the instance where a suspicious control.exe is passed as an argument.
41
42### Response and remediation
43
44- Initiate the incident response process based on the outcome of the triage.
45- Isolate the involved host to prevent further post-compromise behavior.
46- Review the Work Folders synced share to determine if the control.exe was shared and if so remove it.
47- If no lateral movement was identified during investigation, take the affected host offline if possible and remove the control.exe binary as well as any additional artifacts identified during investigation.
48- Review integrating Windows Information Protection (WIP) to enforce data protection by encrypting the data on PCs using Work Folders.
49- Confirm with the user whether this was expected or not, and reset their password.
50"""
51references = [
52    "https://docs.microsoft.com/en-us/windows-server/storage/work-folders/work-folders-overview",
53    "https://twitter.com/ElliotKillick/status/1449812843772227588",
54    "https://lolbas-project.github.io/lolbas/Binaries/WorkFolders/",
55]
56risk_score = 47
57rule_id = "ad0d2742-9a49-11ec-8d6b-acde48001122"
58setup = """## Setup
59
60If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
61events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
62Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
63`event.ingested` to @timestamp.
64For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
65"""
66severity = "medium"
67tags = [
68    "Domain: Endpoint",
69    "OS: Windows",
70    "Use Case: Threat Detection",
71    "Tactic: Defense Evasion",
72    "Resources: Investigation Guide",
73    "Data Source: Elastic Endgame",
74]
75timestamp_override = "event.ingested"
76type = "eql"
77
78query = '''
79process where host.os.type == "windows" and event.type == "start"
80    and process.name : "control.exe" and process.parent.name : "WorkFolders.exe"
81    and not process.executable : ("?:\\Windows\\System32\\control.exe", "?:\\Windows\\SysWOW64\\control.exe")
82'''
83
84
85[[rule.threat]]
86framework = "MITRE ATT&CK"
87[[rule.threat.technique]]
88id = "T1218"
89name = "System Binary Proxy Execution"
90reference = "https://attack.mitre.org/techniques/T1218/"
91
92
93[rule.threat.tactic]
94id = "TA0005"
95name = "Defense Evasion"
96reference = "https://attack.mitre.org/tactics/TA0005/"

Triage and analysis

Investigating Signed Proxy Execution via MS Work Folders

Work Folders is a role service for file servers running Windows Server that provides a consistent way for users to access their work files from their PCs and devices. This allows users to store work files and access them from anywhere. When called, Work Folders will automatically execute any Portable Executable (PE) named control.exe as an argument before accessing the synced share.

Using Work Folders to execute a masqueraded control.exe could allow an adversary to bypass application controls and increase privileges.

Possible investigation steps

  • Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
    • Examine the location of the WorkFolders.exe binary to determine if it was copied to the location of the control.exe binary. It resides in the System32 directory by default.
  • Trace the activity related to the control.exe binary to identify any continuing intrusion activity on the host.
  • Review the control.exe binary executed with Work Folders to determine maliciousness such as additional host activity or network traffic.
  • Determine if control.exe was synced to sync share, indicating potential lateral movement.
  • Review how control.exe was originally delivered on the host, such as emailed, downloaded from the web, or written to disk from a separate binary.

False positive analysis

  • Windows Work Folders are used legitimately by end users and administrators for file sharing and syncing but not in the instance where a suspicious control.exe is passed as an argument.

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Isolate the involved host to prevent further post-compromise behavior.
  • Review the Work Folders synced share to determine if the control.exe was shared and if so remove it.
  • If no lateral movement was identified during investigation, take the affected host offline if possible and remove the control.exe binary as well as any additional artifacts identified during investigation.
  • Review integrating Windows Information Protection (WIP) to enforce data protection by encrypting the data on PCs using Work Folders.
  • Confirm with the user whether this was expected or not, and reset their password.

References

Related rules

to-top