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

to-top