Unusual Web Request

A machine learning job detected a rare and unusual URL that indicates unusual web browsing activity. This can be due to initial access, persistence, command-and-control, or exfiltration activity. For example, in a strategic web compromise or watering hole attack, when a trusted website is compromised to target a particular sector or organization, targeted users may receive emails with uncommon URLs for trusted websites. These URLs can be used to download and run a payload. When malware is already running, it may send requests to uncommon URLs on trusted websites the malware uses for command-and-control communication. When rare URLs are observed being requested for a local web server by a remote source, these can be due to web scanning, enumeration or attack traffic, or they can be due to bots and web scrapers which are part of common Internet background traffic.

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 URL that indicates unusual web browsing activity. This can be due to
 12initial access, persistence, command-and-control, or exfiltration activity. For example, in a strategic web compromise
 13or watering hole attack, when a trusted website is compromised to target a particular sector or organization, targeted
 14users may receive emails with uncommon URLs for trusted websites. These URLs can be used to download and run a payload.
 15When malware is already running, it may send requests to uncommon URLs on trusted websites the malware uses for
 16command-and-control communication. When rare URLs are observed being requested for a local web server by a remote
 17source, these can be due to web scanning, enumeration or attack traffic, or they can be due to bots and web scrapers
 18which are part of common Internet background traffic.
 19"""
 20false_positives = [
 21    """
 22    Web activity that occurs rarely in small quantities can trigger this alert. Possible examples are browsing technical
 23    support or vendor URLs that are used very sparsely. A user who visits a new and unique web destination may trigger
 24    this alert when the activity is sparse. Web applications that generate URLs unique to a transaction may trigger this
 25    when they are used sparsely. Web domains can be excluded in cases such as these.
 26    """,
 27]
 28from = "now-45m"
 29interval = "15m"
 30license = "Elastic License v2"
 31machine_learning_job_id = "packetbeat_rare_urls"
 32name = "Unusual Web Request"
 33setup = """## Setup
 34
 35This rule requires the installation of associated Machine Learning jobs, as well as data coming in from one of the following integrations:
 36- Elastic Defend
 37- Network Packet Capture
 38
 39### Anomaly Detection Setup
 40
 41Once 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).
 42
 43### Elastic Defend Integration Setup
 44Elastic 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.
 45
 46#### Prerequisite Requirements:
 47- Fleet is required for Elastic Defend.
 48- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
 49
 50#### The following steps should be executed in order to add the Elastic Defend integration to your system:
 51- Go to the Kibana home page and click "Add integrations".
 52- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
 53- Click "Add Elastic Defend".
 54- Configure the integration name and optionally add a description.
 55- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
 56- 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).
 57- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
 58- 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.
 59For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
 60- Click "Save and Continue".
 61- 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.
 62For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
 63
 64### Network Packet Capture Integration Setup
 65The 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.
 66
 67#### The following steps should be executed in order to add the Elastic Agent System integration "network_traffic" to your system:
 68- Go to the Kibana home page and click “Add integrations”.
 69- In the query bar, search for “Network Packet Capture” and select the integration to see more details about it.
 70- Click “Add Network Packet Capture”.
 71- Configure the integration name and optionally add a description.
 72- Review optional and advanced settings accordingly.
 73- 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.
 74- Click “Save and Continue”.
 75- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/network_traffic).
 76"""
 77references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
 78risk_score = 21
 79rule_id = "91f02f01-969f-4167-8f55-07827ac3acc9"
 80severity = "low"
 81tags = [
 82    "Use Case: Threat Detection",
 83    "Rule Type: ML",
 84    "Rule Type: Machine Learning",
 85    "Tactic: Command and Control",
 86]
 87type = "machine_learning"
 88[[rule.threat]]
 89framework = "MITRE ATT&CK"
 90[[rule.threat.technique]]
 91id = "T1071"
 92name = "Application Layer Protocol"
 93reference = "https://attack.mitre.org/techniques/T1071/"
 94[[rule.threat.technique.subtechnique]]
 95id = "T1071.001"
 96name = "Web Protocols"
 97reference = "https://attack.mitre.org/techniques/T1071/001/"
 98
 99
100
101[rule.threat.tactic]
102id = "TA0011"
103name = "Command and Control"
104reference = "https://attack.mitre.org/tactics/TA0011/"

References

Related rules

to-top