Suspicious Remote Registry Access via SeBackupPrivilege

Identifies remote access to the registry using an account with Backup Operators group membership. This may indicate an attempt to exfiltrate credentials by dumping the Security Account Manager (SAM) registry hive in preparation for credential access and privileges elevation.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2022/02/16"
 3integration = ["system", "windows"]
 4maturity = "production"
 5updated_date = "2024/08/07"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Identifies remote access to the registry using an account with Backup Operators group membership. This may indicate an
11attempt to exfiltrate credentials by dumping the Security Account Manager (SAM) registry hive in preparation for
12credential access and privileges elevation.
13"""
14from = "now-9m"
15index = ["winlogbeat-*", "logs-system.*", "logs-windows.*"]
16language = "eql"
17license = "Elastic License v2"
18name = "Suspicious Remote Registry Access via SeBackupPrivilege"
19note = """## Triage and analysis
20
21### Investigating Suspicious Remote Registry Access via SeBackupPrivilege
22
23SeBackupPrivilege is a privilege that allows file content retrieval, designed to enable users to create backup copies of the system. Since it is impossible to make a backup of something you cannot read, this privilege comes at the cost of providing the user with full read access to the file system. This privilege must bypass any access control list (ACL) placed in the system.
24
25This rule identifies remote access to the registry using an account with Backup Operators group membership. This may indicate an attempt to exfiltrate credentials by dumping the Security Account Manager (SAM) registry hive in preparation for credential access and privileges elevation.
26
27#### Possible investigation steps
28
29- Identify the user account that performed the action and whether it should perform this kind of action.
30- Investigate the activities done by the subject user the login session. The field `winlog.event_data.SubjectLogonId` can be used to get this data.
31- Investigate other alerts associated with the user/host during the past 48 hours.
32- Contact the account owner and confirm whether they are aware of this activity.
33- Investigate abnormal behaviors observed by the subject user such as network connections, registry or file modifications, and processes created.
34- Investigate if the registry file was retrieved or exfiltrated.
35
36### False positive analysis
37
38- If this activity is expected and noisy in your environment, benign true positives (B-TPs) can be added as exceptions if necessary.
39
40### Response and remediation
41
42- Initiate the incident response process based on the outcome of the triage.
43- Limit or disable the involved user account to prevent further post-compromise behavior.
44- 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.
45- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
46- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
47- 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).
48"""
49references = [
50    "https://github.com/mpgn/BackupOperatorToDA",
51    "https://raw.githubusercontent.com/Wh04m1001/Random/main/BackupOperators.cpp",
52    "https://www.elastic.co/security-labs/detect-credential-access",
53]
54risk_score = 47
55rule_id = "47e22836-4a16-4b35-beee-98f6c4ee9bf2"
56setup = """## Setup
57
58The 'Audit Detailed File Share' audit policy is required be configured (Success) on Domain Controllers and Sensitive Windows Servers.
59Steps to implement the logging policy with Advanced Audit Configuration:

Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policies Configuration > Audit Policies > Object Access > Audit Detailed File Share (Success)

1
2The 'Special Logon' audit policy must be configured (Success).
3Steps to implement the logging policy with Advanced Audit Configuration:

Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policies Configuration > Audit Policies > Logon/Logoff > Special Logon (Success)

 1"""
 2severity = "medium"
 3tags = [
 4    "Domain: Endpoint",
 5    "OS: Windows",
 6    "Use Case: Threat Detection",
 7    "Tactic: Lateral Movement",
 8    "Tactic: Credential Access",
 9    "Resources: Investigation Guide",
10    "Use Case: Active Directory Monitoring",
11    "Data Source: Active Directory",
12    "Data Source: System",
13]
14type = "eql"
15
16query = '''
17sequence by winlog.computer_name, winlog.event_data.SubjectLogonId with maxspan=1m
18 [iam where event.action == "logged-in-special"  and
19  winlog.event_data.PrivilegeList : "SeBackupPrivilege" and
20
21  /* excluding accounts with existing privileged access */
22  not winlog.event_data.PrivilegeList : "SeDebugPrivilege"]
23 [any where event.action == "Detailed File Share" and winlog.event_data.RelativeTargetName : "winreg"]
24'''
25
26
27[[rule.threat]]
28framework = "MITRE ATT&CK"
29[[rule.threat.technique]]
30id = "T1003"
31name = "OS Credential Dumping"
32reference = "https://attack.mitre.org/techniques/T1003/"
33[[rule.threat.technique.subtechnique]]
34id = "T1003.002"
35name = "Security Account Manager"
36reference = "https://attack.mitre.org/techniques/T1003/002/"
37
38[[rule.threat.technique.subtechnique]]
39id = "T1003.004"
40name = "LSA Secrets"
41reference = "https://attack.mitre.org/techniques/T1003/004/"
42
43
44
45[rule.threat.tactic]
46id = "TA0006"
47name = "Credential Access"
48reference = "https://attack.mitre.org/tactics/TA0006/"
49[[rule.threat]]
50framework = "MITRE ATT&CK"
51[[rule.threat.technique]]
52id = "T1021"
53name = "Remote Services"
54reference = "https://attack.mitre.org/techniques/T1021/"
55
56
57[rule.threat.tactic]
58id = "TA0008"
59name = "Lateral Movement"
60reference = "https://attack.mitre.org/tactics/TA0008/"

Triage and analysis

Investigating Suspicious Remote Registry Access via SeBackupPrivilege

SeBackupPrivilege is a privilege that allows file content retrieval, designed to enable users to create backup copies of the system. Since it is impossible to make a backup of something you cannot read, this privilege comes at the cost of providing the user with full read access to the file system. This privilege must bypass any access control list (ACL) placed in the system.

This rule identifies remote access to the registry using an account with Backup Operators group membership. This may indicate an attempt to exfiltrate credentials by dumping the Security Account Manager (SAM) registry hive in preparation for credential access and privileges elevation.

Possible investigation steps

  • Identify the user account that performed the action and whether it should perform this kind of action.
  • Investigate the activities done by the subject user the login session. The field winlog.event_data.SubjectLogonId can be used to get this data.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Contact the account owner and confirm whether they are aware of this activity.
  • Investigate abnormal behaviors observed by the subject user such as network connections, registry or file modifications, and processes created.
  • Investigate if the registry file was retrieved or exfiltrated.

False positive analysis

  • If this activity is expected and noisy in your environment, benign true positives (B-TPs) can be added as exceptions if necessary.

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Limit or disable the involved user account 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.
  • 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