Unusual Windows Remote User

A machine learning job detected an unusual remote desktop protocol (RDP) username, which can indicate account takeover or credentialed persistence using compromised accounts. RDP attacks, such as BlueKeep, also tend to use unusual usernames.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2020/03/25"
  3integration = ["endpoint", "windows"]
  4maturity = "production"
  5updated_date = "2024/10/28"
  6min_stack_version = "8.14.0"
  7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
  8
  9[rule]
 10anomaly_threshold = 50
 11author = ["Elastic"]
 12description = """
 13A machine learning job detected an unusual remote desktop protocol (RDP) username, which can indicate account takeover
 14or credentialed persistence using compromised accounts. RDP attacks, such as BlueKeep, also tend to use unusual
 15usernames.
 16"""
 17false_positives = [
 18    """
 19    Uncommon username activity can be due to an engineer logging onto a server instance in order to perform manual
 20    troubleshooting or reconfiguration.
 21    """,
 22]
 23from = "now-45m"
 24interval = "15m"
 25license = "Elastic License v2"
 26machine_learning_job_id = ["v3_windows_rare_user_type10_remote_login"]
 27name = "Unusual Windows Remote User"
 28setup = """## Setup
 29
 30This rule requires the installation of associated Machine Learning jobs, as well as data coming in from one of the following integrations:
 31- Elastic Defend
 32- Windows
 33
 34### Anomaly Detection Setup
 35
 36Once 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).
 37
 38### Elastic Defend Integration Setup
 39Elastic 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.
 40
 41#### Prerequisite Requirements:
 42- Fleet is required for Elastic Defend.
 43- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
 44
 45#### The following steps should be executed in order to add the Elastic Defend integration to your system:
 46- Go to the Kibana home page and click "Add integrations".
 47- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
 48- Click "Add Elastic Defend".
 49- Configure the integration name and optionally add a description.
 50- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
 51- 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).
 52- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
 53- 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.
 54For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
 55- Click "Save and Continue".
 56- 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.
 57For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
 58
 59### Windows Integration Setup
 60The Windows integration allows you to monitor the Windows OS, services, applications, and more.
 61
 62#### The following steps should be executed in order to add the Elastic Agent System integration "windows" to your system:
 63- Go to the Kibana home page and click “Add integrations”.
 64- In the query bar, search for “Windows” and select the integration to see more details about it.
 65- Click “Add Windows”.
 66- Configure the integration name and optionally add a description.
 67- Review optional and advanced settings accordingly.
 68- Add the newly installed “windows” to an existing or a new agent policy, and deploy the agent on your system from which windows log files are desirable.
 69- Click “Save and Continue”.
 70- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/windows).
 71"""
 72note = """## Triage and analysis
 73
 74### Investigating an Unusual Windows User
 75Detection alerts from this rule indicate activity for a rare and unusual Windows RDP (remote desktop) user. Here are some possible avenues of investigation:
 76- Consider the user as identified by the username field. Is the user part of a group who normally logs into Windows hosts using RDP (remote desktop protocol)? Is this logon activity part of an expected workflow for the user?
 77- Consider the source of the login. If the source is remote, could this be related to occasional troubleshooting or support activity by a vendor or an employee working remotely?"""
 78references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
 79risk_score = 21
 80rule_id = "1781d055-5c66-4adf-9e93-fc0fa69550c9"
 81severity = "low"
 82tags = [
 83    "Domain: Endpoint",
 84    "OS: Windows",
 85    "Use Case: Threat Detection",
 86    "Rule Type: ML",
 87    "Rule Type: Machine Learning",
 88    "Tactic: Initial Access",
 89]
 90type = "machine_learning"
 91[[rule.threat]]
 92framework = "MITRE ATT&CK"
 93[[rule.threat.technique]]
 94id = "T1078"
 95name = "Valid Accounts"
 96reference = "https://attack.mitre.org/techniques/T1078/"
 97
 98
 99[rule.threat.tactic]
100id = "TA0001"
101name = "Initial Access"
102reference = "https://attack.mitre.org/tactics/TA0001/"

Triage and analysis

Investigating an Unusual Windows User

Detection alerts from this rule indicate activity for a rare and unusual Windows RDP (remote desktop) user. Here are some possible avenues of investigation:

  • Consider the user as identified by the username field. Is the user part of a group who normally logs into Windows hosts using RDP (remote desktop protocol)? Is this logon activity part of an expected workflow for the user?
  • Consider the source of the login. If the source is remote, could this be related to occasional troubleshooting or support activity by a vendor or an employee working remotely?

References

Related rules

to-top