Network Logon Provider Registry Modification
Identifies the modification of the network logon provider registry. Adversaries may register a rogue network logon provider module for persistence and/or credential access via intercepting the authentication credentials in clear text during user logon.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2021/03/18"
3integration = ["endpoint", "m365_defender", "windows"]
4maturity = "production"
5updated_date = "2024/10/17"
6min_stack_version = "8.14.0"
7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
8
9[transform]
10[[transform.osquery]]
11label = "Osquery - Retrieve DNS Cache"
12query = "SELECT * FROM dns_cache"
13
14[[transform.osquery]]
15label = "Osquery - Retrieve All Services"
16query = "SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services"
17
18[[transform.osquery]]
19label = "Osquery - Retrieve Services Running on User Accounts"
20query = """
21SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE
22NOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR
23user_account == null)
24"""
25
26[[transform.osquery]]
27label = "Osquery - Retrieve Service Unsigned Executables with Virustotal Link"
28query = """
29SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,
30services.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =
31authenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'
32"""
33
34
35[rule]
36author = ["Elastic"]
37description = """
38Identifies the modification of the network logon provider registry. Adversaries may register a rogue network logon
39provider module for persistence and/or credential access via intercepting the authentication credentials in clear text
40during user logon.
41"""
42false_positives = ["Authorized third party network logon providers."]
43from = "now-9m"
44index = ["logs-endpoint.events.registry-*", "endgame-*", "logs-windows.sysmon_operational-*", "winlogbeat-*", "logs-m365_defender.event-*"]
45language = "eql"
46license = "Elastic License v2"
47name = "Network Logon Provider Registry Modification"
48note = """## Triage and analysis
49
50### Investigating Network Logon Provider Registry Modification
51
52Network logon providers are components in Windows responsible for handling the authentication process during a network logon.
53
54This rule identifies the modification of the network logon provider registry. Adversaries may register a rogue network logon provider module for persistence and/or credential access via intercepting the authentication credentials in plain text during user logon.
55
56> **Note**:
57> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
58
59### Possible investigation steps
60
61- Examine the `registry.data.strings` field to identify the DLL registered.
62- Identify the process responsible for the registry operation and the file creation and investigate their process execution chains (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 - Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.
64 - Investigate any abnormal behavior by the subject process, such as network connections, DLLs loaded, registry or file modifications, and any spawned child processes.
65- Retrieve the file and examine if it is signed with valid digital signatures from vendors that are supposed to implement this kind of software and approved to use in the environment. Check for prevalence in the environment and whether they are located in expected locations.
66- Investigate other alerts associated with the user/host during the past 48 hours.
67- Examine the host for derived artifacts that indicate suspicious activities:
68 - Analyze the executables of the processes using a private sandboxed analysis system.
69 - Observe and collect information about the following activities in both the sandbox and the alert subject host:
70 - Attempts to contact external domains and addresses.
71 - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process's `process.entity_id`.
72 - Examine the DNS cache for suspicious or anomalous entries.
73 - $osquery_0
74 - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
75 - Examine the host services for suspicious or anomalous entries.
76 - $osquery_1
77 - $osquery_2
78 - $osquery_3
79 - 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.
80
81
82### False positive analysis
83
84- False Positives can include legitimate software installations or updates that modify the network logon provider registry. These modifications may be necessary for the proper functioning of the software and are not indicative of malicious activity.
85
86### Response and Remediation
87
88- Initiate the incident response process based on the outcome of the triage.
89 - If malicious activity is confirmed, perform a broader investigation to identify the scope of the compromise and determine the appropriate remediation steps.
90- Isolate the involved host to prevent further post-compromise behavior.
91- If the triage identified malware, search the environment for additional compromised hosts.
92 - Implement temporary network rules, procedures, and segmentation to contain the malware.
93 - Stop suspicious processes.
94 - Immediately block the identified indicators of compromise (IoCs).
95 - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
96- Remove and block malicious artifacts identified during triage.
97- 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.
98- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
99- Reimage the host operating system or restore the compromised files to clean versions.
100- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
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"""
103references = [
104 "https://github.com/gtworek/PSBits/tree/master/PasswordStealing/NPPSpy",
105 "https://docs.microsoft.com/en-us/windows/win32/api/npapi/nf-npapi-nplogonnotify",
106]
107risk_score = 47
108rule_id = "54c3d186-0461-4dc3-9b33-2dc5c7473936"
109severity = "medium"
110tags = [
111 "Domain: Endpoint",
112 "OS: Windows",
113 "Use Case: Threat Detection",
114 "Tactic: Persistence",
115 "Tactic: Credential Access",
116 "Data Source: Elastic Endgame",
117 "Data Source: Elastic Defend",
118 "Data Source: Sysmon",
119 "Data Source: Microsoft Defender for Endpoint",
120]
121timestamp_override = "event.ingested"
122type = "eql"
123
124query = '''
125registry where host.os.type == "windows" and event.type == "change" and
126 registry.data.strings : "?*" and registry.value : "ProviderPath" and
127 registry.path : (
128 "HKLM\\SYSTEM\\*ControlSet*\\Services\\*\\NetworkProvider\\ProviderPath",
129 "\\REGISTRY\\MACHINE\\SYSTEM\\*ControlSet*\\Services\\*\\NetworkProvider\\ProviderPath"
130 ) and
131 /* Excluding default NetworkProviders RDPNP, LanmanWorkstation and webclient. */
132 not (
133 user.id : "S-1-5-18" and
134 registry.data.strings : (
135 "%SystemRoot%\\System32\\ntlanman.dll",
136 "%SystemRoot%\\System32\\drprov.dll",
137 "%SystemRoot%\\System32\\davclnt.dll",
138 "%SystemRoot%\\System32\\vmhgfs.dll",
139 "?:\\Program Files (x86)\\Citrix\\ICA Client\\x64\\pnsson.dll",
140 "?:\\Program Files\\Dell\\SARemediation\\agent\\DellMgmtNP.dll",
141 "?:\\Program Files (x86)\\CheckPoint\\Endpoint Connect\\\\epcgina.dll"
142 )
143 )
144'''
145
146
147[[rule.threat]]
148framework = "MITRE ATT&CK"
149[[rule.threat.technique]]
150id = "T1556"
151name = "Modify Authentication Process"
152reference = "https://attack.mitre.org/techniques/T1556/"
153
154
155[rule.threat.tactic]
156id = "TA0006"
157name = "Credential Access"
158reference = "https://attack.mitre.org/tactics/TA0006/"
159[[rule.threat]]
160framework = "MITRE ATT&CK"
161[[rule.threat.technique]]
162id = "T1543"
163name = "Create or Modify System Process"
164reference = "https://attack.mitre.org/techniques/T1543/"
165
166
167[rule.threat.tactic]
168id = "TA0003"
169name = "Persistence"
170reference = "https://attack.mitre.org/tactics/TA0003/"
Triage and analysis
Investigating Network Logon Provider Registry Modification
Network logon providers are components in Windows responsible for handling the authentication process during a network logon.
This rule identifies the modification of the network logon provider registry. Adversaries may register a rogue network logon provider module for persistence and/or credential access via intercepting the authentication credentials in plain text during user logon.
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
- Examine the
registry.data.strings
field to identify the DLL registered. - Identify the process responsible for the registry operation and the file creation and investigate their process execution chains (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.
- Validate the activity is not related to planned patches, updates, network administrator activity, or legitimate software installations.
- Investigate any abnormal behavior by the subject process, such as network connections, DLLs loaded, registry or file modifications, and any spawned child processes.
- Retrieve the file and examine if it is signed with valid digital signatures from vendors that are supposed to implement this kind of software and approved to use in the environment. Check for prevalence in the environment and whether they are located in expected locations.
- 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 executables of the processes 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's
process.entity_id
. - Examine the DNS cache for suspicious or anomalous entries.
- $osquery_0
- Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process's
- 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
- Attempts to contact external domains and addresses.
- 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
- False Positives can include legitimate software installations or updates that modify the network logon provider registry. These modifications may be necessary for the proper functioning of the software and are not indicative of malicious activity.
Response and Remediation
- Initiate the incident response process based on the outcome of the triage.
- If malicious activity is confirmed, perform a broader investigation to identify the scope of the compromise and determine the appropriate remediation steps.
- 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.
- Reimage the host operating system or restore the compromised files to clean versions.
- 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
- Persistence via Update Orchestrator Service Hijack
- Potential Credential Access via Windows Utilities
- Adobe Hijack Persistence
- Browser Extension Install
- Command Shell Activity Started via RunDLL32