Remote File Download via Desktopimgdownldr Utility

Identifies the desktopimgdownldr utility being used to download a remote file. An adversary may use desktopimgdownldr to download arbitrary files as an alternative to certutil.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2020/09/03"
  3integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel", "crowdstrike"]
  4maturity = "production"
  5updated_date = "2025/03/20"
  6
  7[transform]
  8[[transform.investigate]]
  9label = "Alerts associated with the user in the last 48h"
 10providers = [
 11  [
 12    { excluded = false, field = "event.kind", queryType = "phrase", value = "signal", valueType = "string" },
 13    { excluded = false, field = "user.id", queryType = "phrase", value = "{{user.id}}", valueType = "string" }
 14  ]
 15]
 16relativeFrom = "now-48h/h"
 17relativeTo = "now"
 18
 19[[transform.investigate]]
 20label = "Alerts associated with the host in the last 48h"
 21providers = [
 22  [
 23    { excluded = false, field = "event.kind", queryType = "phrase", value = "signal", valueType = "string" },
 24    { excluded = false, field = "host.name", queryType = "phrase", value = "{{host.name}}", valueType = "string" }
 25  ]
 26]
 27relativeFrom = "now-48h/h"
 28relativeTo = "now"
 29
 30[[transform.investigate]]
 31label = "Investigate the Subject Process Network Events"
 32providers = [
 33  [
 34    { excluded = false, field = "event.category", queryType = "phrase", value = "network", valueType = "string" },
 35    { excluded = false, field = "process.entity_id", queryType = "phrase", value = "{{process.entity_id}}", valueType = "string" }
 36  ]
 37]
 38
 39[[transform.osquery]]
 40label = "Osquery - Retrieve DNS Cache"
 41query = "SELECT * FROM dns_cache"
 42
 43[[transform.osquery]]
 44label = "Osquery - Retrieve All Services"
 45query = "SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services"
 46
 47[[transform.osquery]]
 48label = "Osquery - Retrieve Services Running on User Accounts"
 49query = """
 50SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE
 51NOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR
 52user_account == null)
 53"""
 54
 55[[transform.osquery]]
 56label = "Osquery - Retrieve Service Unsigned Executables with Virustotal Link"
 57query = """
 58SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,
 59services.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =
 60authenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'
 61"""
 62
 63
 64[rule]
 65author = ["Elastic"]
 66description = """
 67Identifies the desktopimgdownldr utility being used to download a remote file. An adversary may use desktopimgdownldr to
 68download arbitrary files as an alternative to certutil.
 69"""
 70from = "now-9m"
 71index = [
 72    "endgame-*",
 73    "logs-crowdstrike.fdr*",
 74    "logs-endpoint.events.process-*",
 75    "logs-m365_defender.event-*",
 76    "logs-sentinel_one_cloud_funnel.*",
 77    "logs-system.security*",
 78    "logs-windows.forwarded*",
 79    "logs-windows.sysmon_operational-*",
 80    "winlogbeat-*",
 81]
 82language = "eql"
 83license = "Elastic License v2"
 84name = "Remote File Download via Desktopimgdownldr Utility"
 85note = """## Triage and analysis
 86
 87### Investigating Remote File Download via Desktopimgdownldr Utility
 88
 89Attackers commonly transfer tooling or malware from external systems into a compromised environment using the command and control channel. However, they can also abuse signed utilities to drop these files.
 90
 91The `Desktopimgdownldr.exe` utility is used to to configure lockscreen/desktop image, and can be abused with the `lockscreenurl` argument to download remote files and tools, this rule looks for this behavior.
 92
 93> **Note**:
 94> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/current/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
 95> This investigation guide uses the [Investigate Markdown Plugin](https://www.elastic.co/guide/en/security/current/interactive-investigation-guides.html) introduced in Elastic Stack version 8.8.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
 96
 97#### Possible investigation steps
 98
 99- 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.
100- Identify the user account that performed the action and whether it should perform this kind of action.
101- Contact the account owner and confirm whether they are aware of this activity.
102- Investigate other alerts associated with the user/host during the past 48 hours.
103  - $investigate_0
104  - $investigate_1
105- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.
106- Check the reputation of the domain or IP address used to host the downloaded file or if the user downloaded the file from an internal system.
107- Examine the host for derived artifacts that indicate suspicious activities:
108  - Analyze the file using a private sandboxed analysis system.
109  - Observe and collect information about the following activities in both the sandbox and the alert subject host:
110    - Attempts to contact external domains and addresses.
111      - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.
112        - $investigate_2
113      - Examine the DNS cache for suspicious or anomalous entries.
114        - $osquery_0
115    - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
116    - Examine the host services for suspicious or anomalous entries.
117      - $osquery_1
118      - $osquery_2
119      - $osquery_3
120  - Retrieve the files' SHA-256 hash values using the PowerShell `Get-FileHash` cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
121- Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.
122
123### False positive analysis
124
125- This activity is unusual but can be done by administrators. Benign true positives (B-TPs) can be added as exceptions if necessary.
126- Analysts can dismiss the alert if the downloaded file is a legitimate image.
127
128### Response and remediation
129
130- Initiate the incident response process based on the outcome of the triage.
131- Isolate the involved host to prevent further post-compromise behavior.
132- If the triage identified malware, search the environment for additional compromised hosts.
133  - Implement temporary network rules, procedures, and segmentation to contain the malware.
134  - Stop suspicious processes.
135  - Immediately block the identified indicators of compromise (IoCs).
136  - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
137- Remove and block malicious artifacts identified during triage.
138- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
139- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
140- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
141- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
142"""
143references = ["https://labs.sentinelone.com/living-off-windows-land-a-new-native-file-downldr/"]
144risk_score = 47
145rule_id = "15c0b7a7-9c34-4869-b25b-fa6518414899"
146severity = "medium"
147tags = [
148    "Domain: Endpoint",
149    "OS: Windows",
150    "Use Case: Threat Detection",
151    "Tactic: Command and Control",
152    "Resources: Investigation Guide",
153    "Data Source: Elastic Endgame",
154    "Data Source: Elastic Defend",
155    "Data Source: Windows Security Event Logs",
156    "Data Source: Microsoft Defender for Endpoint",
157    "Data Source: SentinelOne",
158    "Data Source: Sysmon",
159    "Data Source: Crowdstrike",
160]
161timestamp_override = "event.ingested"
162type = "eql"
163
164query = '''
165process where host.os.type == "windows" and event.type == "start" and
166  (process.name : "desktopimgdownldr.exe" or ?process.pe.original_file_name == "desktopimgdownldr.exe") and
167  process.args : "/lockscreenurl:http*"
168'''
169
170
171[[rule.threat]]
172framework = "MITRE ATT&CK"
173[[rule.threat.technique]]
174id = "T1105"
175name = "Ingress Tool Transfer"
176reference = "https://attack.mitre.org/techniques/T1105/"
177
178
179[rule.threat.tactic]
180id = "TA0011"
181name = "Command and Control"
182reference = "https://attack.mitre.org/tactics/TA0011/"
...
toml

Attackers commonly transfer tooling or malware from external systems into a compromised environment using the command and control channel. However, they can also abuse signed utilities to drop these files.

The Desktopimgdownldr.exe utility is used to to configure lockscreen/desktop image, and can be abused with the lockscreenurl argument to download remote files and tools, this rule looks for this behavior.

Note: This investigation guide uses the Osquery Markdown Plugin introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide. This investigation guide uses the Investigate Markdown Plugin introduced in Elastic Stack version 8.8.0. Older Elastic Stack versions will display unrendered Markdown in this guide.

  • 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.
  • Identify the user account that performed the action and whether it should perform this kind of action.
  • Contact the account owner and confirm whether they are aware of this activity.
  • Investigate other alerts associated with the user/host during the past 48 hours.
    • $investigate_0
    • $investigate_1
  • Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.
  • Check the reputation of the domain or IP address used to host the downloaded file or if the user downloaded the file from an internal system.
  • Examine the host for derived artifacts that indicate suspicious activities:
    • Analyze the file using a private sandboxed analysis system.
    • Observe and collect information about the following activities in both the sandbox and the alert subject host:
      • Attempts to contact external domains and addresses.
        • Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' process.entity_id.
          • $investigate_2
        • Examine the DNS cache for suspicious or anomalous entries.
          • $osquery_0
      • Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
      • Examine the host services for suspicious or anomalous entries.
        • $osquery_1
        • $osquery_2
        • $osquery_3
    • Retrieve the files' SHA-256 hash values using the PowerShell Get-FileHash cmdlet and search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
  • Investigate potentially compromised accounts. Analysts can do this by searching for login events (for example, 4624) to the target host after the registry modification.
  • This activity is unusual but can be done by administrators. Benign true positives (B-TPs) can be added as exceptions if necessary.
  • Analysts can dismiss the alert if the downloaded file is a legitimate image.
  • Initiate the incident response process based on the outcome of the triage.
  • Isolate the involved host to prevent further post-compromise behavior.
  • If the triage identified malware, search the environment for additional compromised hosts.
    • Implement temporary network rules, procedures, and segmentation to contain the malware.
    • Stop suspicious processes.
    • Immediately block the identified indicators of compromise (IoCs).
    • Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
  • Remove and block malicious artifacts identified during triage.
  • Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
  • Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
  • Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
  • Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

References

Related rules

to-top