Detection rules › Elastic

System Service Discovery through built-in Windows Utilities

Status
production
Kind
building block (feeds higher-level correlation rules; not a standalone alert)
Severity
low
Time window
9m
Author
Elastic
Source
github.com/elastic/detection-rules

Detects the usage of commonly used system service discovery techniques, which attackers may use during the reconnaissance phase after compromising a system in order to gain a better understanding of the environment and/or escalate privileges.

MITRE ATT&CK coverage

Event coverage

Rule body elastic

[metadata]
bypass_bbr_timing = true
creation_date = "2023/01/24"
integration = ["windows", "endpoint", "system"]
maturity = "production"
updated_date = "2026/03/24"

[rule]
author = ["Elastic"]
building_block_type = "default"
description = """
Detects the usage of commonly used system service discovery techniques, which attackers may use during the
reconnaissance phase after compromising a system in order to gain a better understanding of the environment and/or
escalate privileges.
"""
from = "now-9m"
index = [
    "endgame-*",
    "logs-endpoint.events.process-*",
    "logs-system.security*",
    "logs-windows.*",
    "winlogbeat-*",
]
language = "eql"
license = "Elastic License v2"
name = "System Service Discovery through built-in Windows Utilities"
risk_score = 21
rule_id = "e0881d20-54ac-457f-8733-fe0bc5d44c55"
severity = "low"
tags = [
    "Domain: Endpoint",
    "OS: Windows",
    "Use Case: Threat Detection",
    "Tactic: Discovery",
    "Data Source: Elastic Defend",
    "Data Source: Elastic Endgame",
    "Rule Type: BBR",
    "Data Source: Windows Security Event Logs",
]
timestamp_override = "event.ingested"
type = "eql"

query = '''
process where host.os.type == "windows" and event.type == "start" and process.parent.executable != null and
  (
  ((process.name: "net.exe" or process.pe.original_file_name == "net.exe" or (process.name : "net1.exe" and 
    not process.parent.name : "net.exe")) and process.args : ("start", "use") and process.args_count == 2 and
    not process.parent.args : ("*.bat", "*netlogon*", "\\\\*")) or
  ((process.name: "sc.exe" or process.pe.original_file_name == "sc.exe") and process.args: ("query", "q*") and not process.parent.args : "*.bat") or
  ((process.name: "tasklist.exe" or process.pe.original_file_name == "tasklist.exe") and process.args: "/svc" and not process.command_line : "*\\Windows\\TEMP\\nessus_task_list*") or
  (process.name : "psservice.exe" or process.pe.original_file_name == "psservice.exe")
  ) and
  not user.id in ("S-1-5-18", "S-1-5-19", "S-1-5-20") and
  not process.parent.executable in
                       ("C:\\Program Files\\AzureConnectedMachineAgent\\himds.exe",
                        "C:\\Program Files\\AzureConnectedMachineAgent\\azcmagent.exe",
                        "C:\\Program Files\\Varian\\DICOMServices\\VMS.DICOMServices.ServiceFW.GenericControlledServiceHost.exe",
                        "C:\\Senior\\HCM\\jdk-11.0.2\\bin\\java.exe",
                        "D:\\biomerieux\\programs\\ServiceMonitor\\bin\\MylaServiceMonitor.exe",
                        "C:\\ViewPowerPro\\openJDK\\bin\\javaw.exe",
                        "C:\\ServiceNow MID Server mid-server-autosports-prod\\agent\\jre\\bin\\java.exe") and
  not process.command_line in ("sc  queryex SCardSvr",
                               "sc  query \"Axway_Integrator\" ",
                               "sc  query \"Delta enteliVAULT PostgreSQL\" ",
                               "sc  query \"WERMA-WIN-Connector\" ",
                               "sc  query _EWSSynchronizationServer_JDE ",
                               "sc query SchneiderUPSMySQL")
'''


[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1007"
name = "System Service Discovery"
reference = "https://attack.mitre.org/techniques/T1007/"

[[rule.threat.technique]]
id = "T1057"
name = "Process Discovery"
reference = "https://attack.mitre.org/techniques/T1057/"

[[rule.threat.technique]]
id = "T1135"
name = "Network Share Discovery"
reference = "https://attack.mitre.org/techniques/T1135/"

[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"

Stages and Predicates

Stage 1: process

process where host.os.type == "windows" and event.type == "start" and process.parent.executable != null and
  (
  ((process.name: "net.exe" or process.pe.original_file_name == "net.exe" or (process.name : "net1.exe" and 
    not process.parent.name : "net.exe")) and process.args : ("start", "use") and process.args_count == 2 and
    not process.parent.args : ("*.bat", "*netlogon*", "\\\\*")) or
  ((process.name: "sc.exe" or process.pe.original_file_name == "sc.exe") and process.args: ("query", "q*") and not process.parent.args : "*.bat") or
  ((process.name: "tasklist.exe" or process.pe.original_file_name == "tasklist.exe") and process.args: "/svc" and not process.command_line : "*\\Windows\\TEMP\\nessus_task_list*") or
  (process.name : "psservice.exe" or process.pe.original_file_name == "psservice.exe")
  ) and
  not user.id in ("S-1-5-18", "S-1-5-19", "S-1-5-20") and
  not process.parent.executable in
                       ("C:\\Program Files\\AzureConnectedMachineAgent\\himds.exe",
                        "C:\\Program Files\\AzureConnectedMachineAgent\\azcmagent.exe",
                        "C:\\Program Files\\Varian\\DICOMServices\\VMS.DICOMServices.ServiceFW.GenericControlledServiceHost.exe",
                        "C:\\Senior\\HCM\\jdk-11.0.2\\bin\\java.exe",
                        "D:\\biomerieux\\programs\\ServiceMonitor\\bin\\MylaServiceMonitor.exe",
                        "C:\\ViewPowerPro\\openJDK\\bin\\javaw.exe",
                        "C:\\ServiceNow MID Server mid-server-autosports-prod\\agent\\jre\\bin\\java.exe") and
  not process.command_line in ("sc  queryex SCardSvr",
                               "sc  query \"Axway_Integrator\" ",
                               "sc  query \"Delta enteliVAULT PostgreSQL\" ",
                               "sc  query \"WERMA-WIN-Connector\" ",
                               "sc  query _EWSSynchronizationServer_JDE ",
                               "sc query SchneiderUPSMySQL")

Exclusions

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

FieldKindExcluded values
process.command_lineinsc query "Axway_Integrator" , sc query "Delta enteliVAULT PostgreSQL" , sc query "WERMA-WIN-Connector" , sc query _EWSSynchronizationServer_JDE , sc queryex SCardSvr, sc query SchneiderUPSMySQL
process.parent.executableinC:\Program Files\AzureConnectedMachineAgent\azcmagent.exe, C:\Program Files\AzureConnectedMachineAgent\himds.exe, C:\Program Files\Varian\DICOMServices\VMS.DICOMServices.ServiceFW.GenericControlledServiceHost.exe, C:\Senior\HCM\jdk-11.0.2\bin\java.exe, C:\ServiceNow MID Server mid-server-autosports-prod\agent\jre\bin\java.exe, C:\ViewPowerPro\openJDK\bin\javaw.exe, D:\biomerieux\programs\ServiceMonitor\bin\MylaServiceMonitor.exe
user.idinS-1-5-18, S-1-5-19, S-1-5-20

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
event.typeeq
  • start corpus 606 (elastic 606)
process.argswildcard
  • /svc
  • q*
  • query
  • start corpus 5 (elastic 5)
  • use corpus 4 (elastic 4)
process.args_counteq
  • 2 corpus 9 (elastic 9)
process.namewildcard
  • net.exe corpus 22 (elastic 20, splunk 2)
  • net1.exe corpus 35 (splunk 19, elastic 16)
  • psservice.exe
  • sc.exe corpus 29 (splunk 15, elastic 14)
  • tasklist.exe corpus 9 (elastic 9)
process.parent.executableis_not_null
  • (no value, null check)
process.pe.original_file_nameeq
  • net.exe corpus 28 (sigma 19, elastic 7, splunk 2)
  • psservice.exe corpus 3 (sigma 2, elastic 1)
  • sc.exe corpus 26 (sigma 12, splunk 10, elastic 4)
  • tasklist.exe corpus 4 (sigma 3, elastic 1)