Spike in Successful Logon Events from a Source IP

A machine learning job found an unusually large spike in successful authentication events from a particular source IP address. This can be due to password spraying, user enumeration or brute force activity.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2021/06/10"
  3integration = ["auditd_manager", "endpoint", "system"]
  4maturity = "production"
  5updated_date = "2024/06/18"
  6
  7[rule]
  8anomaly_threshold = 75
  9author = ["Elastic"]
 10description = """
 11A machine learning job found an unusually large spike in successful authentication events from a particular source IP
 12address. This can be due to password spraying, user enumeration or brute force activity.
 13"""
 14false_positives = [
 15    """
 16    Build servers and CI systems can sometimes trigger this alert. Security test cycles that include brute force or
 17    password spraying activities may trigger this alert.
 18    """,
 19]
 20from = "now-30m"
 21interval = "15m"
 22license = "Elastic License v2"
 23machine_learning_job_id = "auth_high_count_logon_events_for_a_source_ip"
 24name = "Spike in Successful Logon Events from a Source IP"
 25setup = """## Setup
 26
 27This rule requires the installation of associated Machine Learning jobs, as well as data coming in from one of the following integrations:
 28- Elastic Defend
 29- Auditd Manager
 30- System
 31
 32### Anomaly Detection Setup
 33
 34Once the rule is enabled, the associated Machine Learning job will start automatically. You can view the Machine Learning job linked under the "Definition" panel of the detection rule. If the job does not start due to an error, the issue must be resolved for the job to commence successfully. For more details on setting up anomaly detection jobs, refer to the [helper guide](https://www.elastic.co/guide/en/kibana/current/xpack-ml-anomalies.html).
 35
 36### Elastic Defend Integration Setup
 37Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
 38
 39#### Prerequisite Requirements:
 40- Fleet is required for Elastic Defend.
 41- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
 42
 43#### The following steps should be executed in order to add the Elastic Defend integration to your system:
 44- Go to the Kibana home page and click "Add integrations".
 45- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
 46- Click "Add Elastic Defend".
 47- Configure the integration name and optionally add a description.
 48- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
 49- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
 50- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
 51- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
 52For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
 53- Click "Save and Continue".
 54- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
 55For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
 56
 57### Auditd Manager Integration Setup
 58The Auditd Manager Integration receives audit events from the Linux Audit Framework which is a part of the Linux kernel.
 59Auditd Manager provides a user-friendly interface and automation capabilities for configuring and monitoring system auditing through the auditd daemon. With `auditd_manager`, administrators can easily define audit rules, track system events, and generate comprehensive audit reports, improving overall security and compliance in the system.
 60
 61#### The following steps should be executed in order to add the Elastic Agent System integration "auditd_manager" to your system:
 62- Go to the Kibana home page and click “Add integrations”.
 63- In the query bar, search for “Auditd Manager” and select the integration to see more details about it.
 64- Click “Add Auditd Manager”.
 65- Configure the integration name and optionally add a description.
 66- Review optional and advanced settings accordingly.
 67- Add the newly installed “auditd manager” to an existing or a new agent policy, and deploy the agent on a Linux system from which auditd log files are desirable.
 68- Click “Save and Continue”.
 69- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/auditd_manager).
 70
 71#### Rule Specific Setup Note
 72Auditd Manager subscribes to the kernel and receives events as they occur without any additional configuration.
 73However, if more advanced configuration is required to detect specific behavior, audit rules can be added to the integration in either the "audit rules" configuration box or the "auditd rule files" box by specifying a file to read the audit rules from.
 74- For this detection rule no additional audit rules are required.
 75
 76### System Integration Setup
 77The System integration allows you to collect system logs and metrics from your servers with Elastic Agent.
 78
 79#### The following steps should be executed in order to add the Elastic Agent System integration "system" to your system:
 80- Go to the Kibana home page and click “Add integrations”.
 81- In the query bar, search for “System” and select the integration to see more details about it.
 82- Click “Add System”.
 83- Configure the integration name and optionally add a description.
 84- Review optional and advanced settings accordingly.
 85- Add the newly installed “system” to an existing or a new agent policy, and deploy the agent on your system from which system log files are desirable.
 86- Click “Save and Continue”.
 87- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/system).
 88"""
 89note = """## Triage and analysis
 90
 91### Investigating Spike in Successful Logon Events from a Source IP
 92
 93This rule uses a machine learning job to detect a substantial spike in successful authentication events. This could indicate post-exploitation activities that aim to test which hosts, services, and other resources the attacker can access with the compromised credentials.
 94
 95#### Possible investigation steps
 96
 97- Identify the specifics of the involved assets, such as role, criticality, and associated users.
 98- Check if the authentication comes from different sources.
 99- Use the historical data available to determine if the same behavior happened in the past.
100- Investigate other alerts associated with the involved users during the past 48 hours.
101- Check whether the involved credentials are used in automation or scheduled tasks.
102- If this activity is suspicious, contact the account owner and confirm whether they are aware of it.
103
104### False positive analysis
105
106- Understand the context of the authentications by contacting the asset owners. If this activity is related to a new business process or newly implemented (approved) technology, consider adding exceptions — preferably with a combination of user and source conditions.
107
108### Response and remediation
109
110- Initiate the incident response process based on the outcome of the triage.
111- 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.
112- 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).
113"""
114references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
115risk_score = 21
116rule_id = "e26aed74-c816-40d3-a810-48d6fbd8b2fd"
117severity = "low"
118tags = [
119    "Use Case: Identity and Access Audit",
120    "Use Case: Threat Detection",
121    "Rule Type: ML",
122    "Rule Type: Machine Learning",
123    "Tactic: Credential Access",
124    "Tactic: Defense Evasion",
125    "Resources: Investigation Guide",
126]
127type = "machine_learning"
128[[rule.threat]]
129framework = "MITRE ATT&CK"
130[[rule.threat.technique]]
131id = "T1110"
132name = "Brute Force"
133reference = "https://attack.mitre.org/techniques/T1110/"
134
135
136[rule.threat.tactic]
137id = "TA0006"
138name = "Credential Access"
139reference = "https://attack.mitre.org/tactics/TA0006/"
140[[rule.threat]]
141framework = "MITRE ATT&CK"
142[[rule.threat.technique]]
143id = "T1078"
144name = "Valid Accounts"
145reference = "https://attack.mitre.org/techniques/T1078/"
146[[rule.threat.technique.subtechnique]]
147id = "T1078.002"
148name = "Domain Accounts"
149reference = "https://attack.mitre.org/techniques/T1078/002/"
150
151[[rule.threat.technique.subtechnique]]
152id = "T1078.003"
153name = "Local Accounts"
154reference = "https://attack.mitre.org/techniques/T1078/003/"
155
156
157
158[rule.threat.tactic]
159id = "TA0005"
160name = "Defense Evasion"
161reference = "https://attack.mitre.org/tactics/TA0005/"

Triage and analysis

Investigating Spike in Successful Logon Events from a Source IP

This rule uses a machine learning job to detect a substantial spike in successful authentication events. This could indicate post-exploitation activities that aim to test which hosts, services, and other resources the attacker can access with the compromised credentials.

Possible investigation steps

  • Identify the specifics of the involved assets, such as role, criticality, and associated users.
  • Check if the authentication comes from different sources.
  • Use the historical data available to determine if the same behavior happened in the past.
  • Investigate other alerts associated with the involved users during the past 48 hours.
  • Check whether the involved credentials are used in automation or scheduled tasks.
  • If this activity is suspicious, contact the account owner and confirm whether they are aware of it.

False positive analysis

  • Understand the context of the authentications by contacting the asset owners. If this activity is related to a new business process or newly implemented (approved) technology, consider adding exceptions — preferably with a combination of user and source conditions.

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