Unusual Web User Agent

A machine learning job detected a rare and unusual user agent indicating web browsing activity by an unusual process other than a web browser. This can be due to persistence, command-and-control, or exfiltration activity. Uncommon user agents coming from remote sources to local destinations are often the result of scanners, bots, and web scrapers, which are part of common Internet background traffic. Much of this is noise, but more targeted attacks on websites using tools like Burp or SQLmap can sometimes be discovered by spotting uncommon user agents. Uncommon user agents in traffic from local sources to remote destinations can be any number of things, including harmless programs like weather monitoring or stock-trading programs. However, uncommon user agents from local sources can also be due to malware or scanning activity.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2020/03/25"
  3integration = ["endpoint", "network_traffic"]
  4maturity = "production"
  5updated_date = "2024/06/18"
  6
  7[rule]
  8anomaly_threshold = 50
  9author = ["Elastic"]
 10description = """
 11A machine learning job detected a rare and unusual user agent indicating web browsing activity by an unusual process
 12other than a web browser. This can be due to persistence, command-and-control, or exfiltration activity. Uncommon user
 13agents coming from remote sources to local destinations are often the result of scanners, bots, and web scrapers, which
 14are part of common Internet background traffic. Much of this is noise, but more targeted attacks on websites using tools
 15like Burp or SQLmap can sometimes be discovered by spotting uncommon user agents. Uncommon user agents in traffic from
 16local sources to remote destinations can be any number of things, including harmless programs like weather monitoring or
 17stock-trading programs. However, uncommon user agents from local sources can also be due to malware or scanning
 18activity.
 19"""
 20false_positives = [
 21    """
 22    Web activity that is uncommon, like security scans, may trigger this alert and may need to be excluded. A new or
 23    rarely used program that calls web services may trigger this alert.
 24    """,
 25]
 26from = "now-45m"
 27interval = "15m"
 28license = "Elastic License v2"
 29machine_learning_job_id = "packetbeat_rare_user_agent"
 30name = "Unusual Web User Agent"
 31setup = """## Setup
 32
 33This rule requires the installation of associated Machine Learning jobs, as well as data coming in from one of the following integrations:
 34- Elastic Defend
 35- Network Packet Capture
 36
 37### Anomaly Detection Setup
 38
 39Once 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).
 40
 41### Elastic Defend Integration Setup
 42Elastic 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.
 43
 44#### Prerequisite Requirements:
 45- Fleet is required for Elastic Defend.
 46- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
 47
 48#### The following steps should be executed in order to add the Elastic Defend integration to your system:
 49- Go to the Kibana home page and click "Add integrations".
 50- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
 51- Click "Add Elastic Defend".
 52- Configure the integration name and optionally add a description.
 53- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
 54- 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).
 55- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
 56- 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.
 57For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
 58- Click "Save and Continue".
 59- 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.
 60For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
 61
 62### Network Packet Capture Integration Setup
 63The Network Packet Capture integration sniffs network packets on a host and dissects known protocols. Monitoring the network traffic is critical to gaining observability and securing your environment — ensuring high levels of performance and security. The Network Packet Capture integration captures the network traffic between your application servers, decodes common application layer protocols and records the interesting fields for each transaction.
 64
 65#### The following steps should be executed in order to add the Elastic Agent System integration "network_traffic" to your system:
 66- Go to the Kibana home page and click “Add integrations”.
 67- In the query bar, search for “Network Packet Capture” and select the integration to see more details about it.
 68- Click “Add Network Packet Capture”.
 69- Configure the integration name and optionally add a description.
 70- Review optional and advanced settings accordingly.
 71- Add the newly installed “network_traffic” to an existing or a new agent policy, and deploy the agent on your system from which network log files are desirable.
 72- Click “Save and Continue”.
 73- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/network_traffic).
 74"""
 75references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
 76risk_score = 21
 77rule_id = "91f02f01-969f-4167-8d77-07827ac4cee0"
 78severity = "low"
 79tags = [
 80    "Use Case: Threat Detection",
 81    "Rule Type: ML",
 82    "Rule Type: Machine Learning",
 83    "Tactic: Command and Control",
 84]
 85type = "machine_learning"
 86[[rule.threat]]
 87framework = "MITRE ATT&CK"
 88[[rule.threat.technique]]
 89id = "T1071"
 90name = "Application Layer Protocol"
 91reference = "https://attack.mitre.org/techniques/T1071/"
 92[[rule.threat.technique.subtechnique]]
 93id = "T1071.001"
 94name = "Web Protocols"
 95reference = "https://attack.mitre.org/techniques/T1071/001/"
 96
 97
 98
 99[rule.threat.tactic]
100id = "TA0011"
101name = "Command and Control"
102reference = "https://attack.mitre.org/tactics/TA0011/"

References

Related rules

to-top