Rare User Logon

A machine learning job found an unusual user name in the authentication logs. An unusual user name is one way of detecting credentialed access by means of a new or dormant user account. An inactive user account (because the user has left the organization) that becomes active may be due to credentialed access using a compromised account password. Threat actors will sometimes also create new users as a means of persisting in a compromised web application.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2021/06/10"
 3integration = ["auditd_manager", "endpoint", "system"]
 4maturity = "production"
 5updated_date = "2023/07/27"
 6min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 7min_stack_version = "8.3.0"
 8
 9[rule]
10anomaly_threshold = 75
11author = ["Elastic"]
12description = """
13A machine learning job found an unusual user name in the authentication logs. An unusual user name is one way of
14detecting credentialed access by means of a new or dormant user account. An inactive user account (because the user
15has left the organization) that becomes active may be due to credentialed access using a compromised account password.
16Threat actors will sometimes also create new users as a means of persisting in a compromised web application.
17"""
18false_positives = [
19    """
20    User accounts that are rarely active, such as a site reliability engineer (SRE) or developer logging into a
21    production server for troubleshooting, may trigger this alert. Under some conditions, a newly created user account
22    may briefly trigger this alert while the model is learning.
23    """,
24]
25from = "now-30m"
26interval = "15m"
27license = "Elastic License v2"
28machine_learning_job_id = "auth_rare_user"
29name = "Rare User Logon"
30note = """## Triage and analysis
31
32### Investigating Rare User Logon
33
34This rule uses a machine learning job to detect an unusual user name in authentication logs, which could detect new accounts created for persistence.
35
36#### Possible investigation steps
37
38- Check if the user was newly created and if the company policies were followed.
39  - Identify the user account that performed the action and whether it should perform this kind of action.
40- Investigate other alerts associated with the involved users during the past 48 hours.
41- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.
42
43### False positive analysis
44
45- Accounts that are used for specific purposes — and therefore not normally active — may trigger the alert.
46
47### Response and remediation
48
49- Initiate the incident response process based on the outcome of the triage.
50- 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.
51- 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).
52"""
53references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
54risk_score = 21
55rule_id = "138c5dd5-838b-446e-b1ac-c995c7f8108a"
56severity = "low"
57tags = ["Use Case: Identity and Access Audit", "Use Case: Threat Detection", "Rule Type: ML", "Rule Type: Machine Learning", "Tactic: Initial Access", "Resources: Investigation Guide"]
58type = "machine_learning"
59
60[[rule.threat]]
61framework = "MITRE ATT&CK"
62[[rule.threat.technique]]
63id = "T1078"
64name = "Valid Accounts"
65reference = "https://attack.mitre.org/techniques/T1078/"
66[[rule.threat.technique.subtechnique]]
67id = "T1078.002"
68name = "Domain Accounts"
69reference = "https://attack.mitre.org/techniques/T1078/002/"
70[[rule.threat.technique.subtechnique]]
71id = "T1078.003"
72name = "Local Accounts"
73reference = "https://attack.mitre.org/techniques/T1078/003/"
74
75[rule.threat.tactic]
76id = "TA0001"
77name = "Initial Access"
78reference = "https://attack.mitre.org/tactics/TA0001/"

Triage and analysis

Investigating Rare User Logon

This rule uses a machine learning job to detect an unusual user name in authentication logs, which could detect new accounts created for persistence.

Possible investigation steps

  • Check if the user was newly created and if the company policies were followed.
    • Identify the user account that performed the action and whether it should perform this kind of action.
  • Investigate other alerts associated with the involved users during the past 48 hours.
  • Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.

False positive analysis

  • Accounts that are used for specific purposes — and therefore not normally active — may trigger the alert.

Response and remediation

  • Initiate the incident response process based on the outcome of the 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.
  • 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