LoFP LoFP / legitimate administrative activities may involve dnscmd.exe usage or registry changes for dll management in dns servers. filter alerts to exclude authorized administrative actions.

Techniques

Sample rules

Windows Set Custom DNS ServerLevelPlugin Via Dnscmd

Description

The following analytic detects command-line usage of dnscmd.exe to configure the Microsoft DNS ServerLevelPluginDll setting. This setting allows the DNS service to load an arbitrary DLL, which can be abused by attackers with DNS administrative privileges to execute code in the context of the DNS service. If confirmed malicious, this activity could enable persistence, privilege escalation, or domain controller compromise through malicious DLL loading.

Detection logic


| tstats `security_content_summariesonly`
  count min(_time) as firstTime
        max(_time) as lastTime

from datamodel=Endpoint.Processes where

Processes.process_name="dnscmd.exe"
Processes.process="*/config *"
Processes.process="*/serverlevelplugindll *"

by Processes.process Processes.vendor_product Processes.user_id Processes.process_hash
   Processes.parent_process_name Processes.parent_process_exec Processes.action
   Processes.dest Processes.process_current_directory Processes.process_path
   Processes.process_integrity_level Processes.original_file_name Processes.parent_process
   Processes.parent_process_path Processes.parent_process_guid Processes.parent_process_id
   Processes.process_guid Processes.process_id Processes.user Processes.process_name


| `drop_dm_object_name(Processes)`

| `security_content_ctime(firstTime)`

| `security_content_ctime(lastTime)`

| `windows_set_custom_dns_serverlevelplugin_via_dnscmd_filter`