Unusual Network Activity from a Windows System Binary

Identifies network activity from unexpected system applications. This may indicate adversarial activity as these applications are often leveraged by adversaries to execute code and evade detection.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2020/09/02"
  3integration = ["endpoint", "windows"]
  4maturity = "production"
  5updated_date = "2026/05/04"
  6
  7[transform]
  8[[transform.osquery]]
  9label = "Osquery - Retrieve DNS Cache"
 10query = "SELECT * FROM dns_cache"
 11
 12[[transform.osquery]]
 13label = "Osquery - Retrieve All Services"
 14query = "SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services"
 15
 16[[transform.osquery]]
 17label = "Osquery - Retrieve Services Running on User Accounts"
 18query = """
 19SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE
 20NOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR
 21user_account == null)
 22"""
 23
 24[[transform.osquery]]
 25label = "Osquery - Retrieve Service Unsigned Executables with Virustotal Link"
 26query = """
 27SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,
 28services.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =
 29authenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'
 30"""
 31
 32
 33[rule]
 34author = ["Elastic"]
 35description = """
 36Identifies network activity from unexpected system applications. This may indicate adversarial activity as these
 37applications are often leveraged by adversaries to execute code and evade detection.
 38"""
 39from = "now-9m"
 40index = [
 41    "logs-endpoint.events.process-*",
 42    "logs-endpoint.events.network-*",
 43    "logs-windows.sysmon_operational-*",
 44    "winlogbeat-*"
 45]
 46language = "eql"
 47license = "Elastic License v2"
 48name = "Unusual Network Activity from a Windows System Binary"
 49note = """## Triage and analysis
 50
 51### Investigating Unusual Network Activity from a Windows System Binary
 52
 53Attackers can abuse certain trusted developer utilities to proxy the execution of malicious payloads. Since these utilities are usually signed, they can bypass the security controls that were put in place to prevent or detect direct execution.
 54
 55This rule identifies network connections established by trusted developer utilities, which can indicate abuse to execute payloads or process masquerading.
 56
 57> **Note**:
 58> 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.
 59
 60#### Possible investigation steps
 61
 62- 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.
 63- Investigate abnormal behaviors observed by the subject process, such as registry or file modifications, and any spawned child processes.
 64- Investigate other alerts associated with the user/host during the past 48 hours.
 65- Examine the host for derived artifacts that indicate suspicious activities:
 66  - Analyze the process executable using a private sandboxed analysis system.
 67  - Observe and collect information about the following activities in both the sandbox and the alert subject host:
 68    - Attempts to contact external domains and addresses.
 69      - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.
 70      - Examine the DNS cache for suspicious or anomalous entries.
 71        - $osquery_0
 72    - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
 73    - Examine the host services for suspicious or anomalous entries.
 74      - $osquery_1
 75      - $osquery_2
 76      - $osquery_3
 77  - 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.
 78
 79### False positive analysis
 80
 81- As trusted developer utilities have dual-use purposes, alerts derived from this rule are not essentially malicious. If these utilities are contacting internal or known trusted domains, review their security and consider creating exceptions if the domain is safe.
 82
 83### Response and remediation
 84
 85- Initiate the incident response process based on the outcome of the triage.
 86- Isolate the involved host to prevent further post-compromise behavior.
 87- 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.
 88- If the triage identified malware, search the environment for additional compromised hosts.
 89  - Implement temporary network rules, procedures, and segmentation to contain the malware.
 90  - Stop suspicious processes.
 91  - Immediately block the identified indicators of compromise (IoCs).
 92  - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
 93- Remove and block malicious artifacts identified during triage.
 94- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
 95- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
 96  - If the malicious file was delivered via phishing:
 97    - Block the email sender from sending future emails.
 98    - Block the malicious web pages.
 99    - Remove emails from the sender from mailboxes.
100    - Consider improvements to the security awareness program.
101- 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).
102"""
103
104setup = """## Setup
105
106This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
107
108Setup instructions: https://ela.st/install-elastic-defend
109
110### Additional data sources
111
112This rule also supports the following third-party data sources. For setup instructions, refer to the links below:
113
114- [Sysmon Event ID 1 - Process Creation](https://ela.st/sysmon-event-1-setup)
115- [Sysmon Event ID 22 - DNS Query](https://ela.st/sysmon-event-22-setup)
116"""
117
118risk_score = 47
119rule_id = "1fe3b299-fbb5-4657-a937-1d746f2c711a"
120severity = "medium"
121tags = [
122    "Domain: Endpoint",
123    "OS: Windows",
124    "Use Case: Threat Detection",
125    "Tactic: Defense Evasion",
126    "Resources: Investigation Guide",
127    "Data Source: Elastic Defend",
128    "Data Source: Sysmon",
129]
130type = "eql"
131
132query = '''
133sequence by process.entity_id with maxspan=1m
134  [process where host.os.type == "windows" and event.type == "start" and
135
136     /* known applocker bypasses */
137     (process.name : "bginfo.exe" or
138      process.name : "cdb.exe" or
139      process.name : "control.exe" or
140      process.name : "cmstp.exe" or
141      process.name : "csi.exe" or
142      process.name : "dnx.exe" or
143      process.name : "fsi.exe" or
144      process.name : "ieexec.exe" or
145      process.name : "iexpress.exe" or
146      process.name : "installutil.exe" or
147      process.name : "Microsoft.Workflow.Compiler.exe" or
148      process.name : "MSBuild.exe" or
149      process.name : "msdt.exe" or
150      process.name : "mshta.exe" or
151      process.name : "wscript.exe" or
152      process.name : "msiexec.exe" or
153      process.name : "msxsl.exe" or
154      process.name : "odbcconf.exe" or
155      process.name : "rcsi.exe" or
156      process.name : "regsvr32.exe" or
157      process.name : "xwizard.exe") and
158
159  not (process.name : "mshta.exe" and
160       process.parent.executable : ("C:\\Program Files (x86)\\Bentley\\*.exe",
161                                    "C:\\Program Files\\Bentley\\*.exe",
162                                    "C:\\Program Files (x86)\\Amazon\\Amazon Assistant\\amazonAssistantService.exe",
163                                    "C:\\Users\\*\\AppData\\Local\\Temp\\TeamViewer\\TeamViewer.exe"))
164  ]
165  [network where dns.question.name != null and
166      not dns.question.name : ("localhost", "setup.officetimeline.com", "us.deployment.endpoint.ingress.rapid7.com", 
167        "ctldl.windowsupdate.com", "crl?.digicert.com", "ocsp.digicert.com", "addon-cms-asl.eu.goskope.com", "crls.ssl.com", 
168        "evcs-ocsp.ws.symantec.com", "s.symcd.com", "s?.symcb.com", "crl.verisign.com", "oneocsp.microsoft.com", "crl.verisign.com", 
169        "aka.ms", "crl.comodoca.com", "acroipm2.adobe.com", "sv.symcd.com", "_ldap._tcp.*", "..localmachine", "secure.globalsign.com",
170        "acroipm2.adobe.com", "www.ssl.com", "ocsp.digicert.com", "ocsp.verisign.com", "ocsp.comodoca.com", "ocsp.entrust.net", "ocsp.usertrust.com",
171        "ocsp.godaddy.com", "ocsp.camerfirma.com", "ocsp.globalsign.com", "ocsp.sectigo.com", "*.local") and
172
173      not (process.name : "mshta.exe" and
174           dns.question.name : ("client.teamviewer.com", "www.teamviewer.com", "images-na.ssl-images-amazon.com", "searcherbar.tilda.ws")) and
175
176      /* host query itself */
177      not startswith~(dns.question.name, host.name)
178      ]
179'''
180
181
182[[rule.threat]]
183framework = "MITRE ATT&CK"
184
185[[rule.threat.technique]]
186id = "T1036"
187name = "Masquerading"
188reference = "https://attack.mitre.org/techniques/T1036/"
189
190[[rule.threat.technique.subtechnique]]
191id = "T1036.005"
192name = "Match Legitimate Resource Name or Location"
193reference = "https://attack.mitre.org/techniques/T1036/005/"
194
195[[rule.threat.technique]]
196id = "T1127"
197name = "Trusted Developer Utilities Proxy Execution"
198reference = "https://attack.mitre.org/techniques/T1127/"
199
200[[rule.threat.technique.subtechnique]]
201id = "T1127.001"
202name = "MSBuild"
203reference = "https://attack.mitre.org/techniques/T1127/001/"
204
205[[rule.threat.technique]]
206id = "T1218"
207name = "System Binary Proxy Execution"
208reference = "https://attack.mitre.org/techniques/T1218/"
209
210[[rule.threat.technique.subtechnique]]
211id = "T1218.002"
212name = "Control Panel"
213reference = "https://attack.mitre.org/techniques/T1218/002/"
214
215[[rule.threat.technique.subtechnique]]
216id = "T1218.003"
217name = "CMSTP"
218reference = "https://attack.mitre.org/techniques/T1218/003/"
219
220[[rule.threat.technique.subtechnique]]
221id = "T1218.004"
222name = "InstallUtil"
223reference = "https://attack.mitre.org/techniques/T1218/004/"
224
225[[rule.threat.technique.subtechnique]]
226id = "T1218.005"
227name = "Mshta"
228reference = "https://attack.mitre.org/techniques/T1218/005/"
229
230[[rule.threat.technique.subtechnique]]
231id = "T1218.007"
232name = "Msiexec"
233reference = "https://attack.mitre.org/techniques/T1218/007/"
234
235[[rule.threat.technique.subtechnique]]
236id = "T1218.008"
237name = "Odbcconf"
238reference = "https://attack.mitre.org/techniques/T1218/008/"
239
240[[rule.threat.technique.subtechnique]]
241id = "T1218.010"
242name = "Regsvr32"
243reference = "https://attack.mitre.org/techniques/T1218/010/"
244
245[rule.threat.tactic]
246id = "TA0005"
247name = "Defense Evasion"
248reference = "https://attack.mitre.org/tactics/TA0005/"

Triage and analysis

Investigating Unusual Network Activity from a Windows System Binary

Attackers can abuse certain trusted developer utilities to proxy the execution of malicious payloads. Since these utilities are usually signed, they can bypass the security controls that were put in place to prevent or detect direct execution.

This rule identifies network connections established by trusted developer utilities, which can indicate abuse to execute payloads or process masquerading.

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.

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.
  • Investigate abnormal behaviors observed by the subject process, such as registry or file modifications, and any spawned child processes.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Examine the host for derived artifacts that indicate suspicious activities:
    • Analyze the process executable 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.
        • 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.

False positive analysis

  • As trusted developer utilities have dual-use purposes, alerts derived from this rule are not essentially malicious. If these utilities are contacting internal or known trusted domains, review their security and consider creating exceptions if the domain is safe.

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.
  • 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.
  • 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.
  • 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.
    • If the malicious file was delivered via phishing:
      • Block the email sender from sending future emails.
      • Block the malicious web pages.
      • Remove emails from the sender from mailboxes.
      • Consider improvements to the security awareness program.
  • 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).

Related rules

to-top