Unusual Windows Username
A machine learning job detected activity for a username that is not normally active, which can indicate unauthorized changes, activity by unauthorized users, lateral movement, or compromised credentials. In many organizations, new usernames are not often created apart from specific types of system activities, such as creating new accounts for new employees. These user accounts quickly become active and routine. Events from rarely used usernames can point to suspicious activity. Additionally, automated Linux fleets tend to see activity from rarely used usernames only when personnel log in to make authorized or unauthorized changes, or threat actors have acquired credentials and log in for malicious purposes. Unusual usernames can also indicate pivoting, where compromised credentials are used to try and move laterally from one host to another.
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 activity for a username that is not normally active, which can indicate unauthorized
14changes, activity by unauthorized users, lateral movement, or compromised credentials. In many organizations, new
15usernames are not often created apart from specific types of system activities, such as creating new accounts for new
16employees. These user accounts quickly become active and routine. Events from rarely used usernames can point to
17suspicious activity. Additionally, automated Linux fleets tend to see activity from rarely used usernames only when
18personnel log in to make authorized or unauthorized changes, or threat actors have acquired credentials and log in for
19malicious purposes. Unusual usernames can also indicate pivoting, where compromised credentials are used to try and move
20laterally from one host to another.
21"""
22false_positives = [
23 """
24 Uncommon user activity can be due to an administrator or help desk technician logging onto a workstation or server
25 in order to perform manual troubleshooting or reconfiguration.
26 """,
27]
28from = "now-45m"
29interval = "15m"
30license = "Elastic License v2"
31machine_learning_job_id = ["v3_windows_anomalous_user_name"]
32name = "Unusual Windows Username"
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- Windows
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### Windows Integration Setup
65The Windows integration allows you to monitor the Windows OS, services, applications, and more.
66
67#### The following steps should be executed in order to add the Elastic Agent System integration "windows" to your system:
68- Go to the Kibana home page and click “Add integrations”.
69- In the query bar, search for “Windows” and select the integration to see more details about it.
70- Click “Add Windows”.
71- Configure the integration name and optionally add a description.
72- Review optional and advanced settings accordingly.
73- 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.
74- Click “Save and Continue”.
75- For more details on the integration refer to the [helper guide](https://docs.elastic.co/integrations/windows).
76"""
77note = """## Triage and analysis
78
79### Investigating an Unusual Windows User
80Detection alerts from this rule indicate activity for a Windows user name that is rare and unusual. Here are some possible avenues of investigation:
81- Consider the user as identified by the username field. Is this program part of an expected workflow for the user who ran this program on this host? Could this be related to occasional troubleshooting or support activity?
82- Examine the history of user activity. If this user only manifested recently, it might be a service account for a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business process.
83- Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks that the user is performing.
84- Consider the same for the parent process. If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious."""
85references = ["https://www.elastic.co/guide/en/security/current/prebuilt-ml-jobs.html"]
86risk_score = 21
87rule_id = "1781d055-5c66-4adf-9c59-fc0fa58336a5"
88severity = "low"
89tags = [
90 "Domain: Endpoint",
91 "OS: Windows",
92 "Use Case: Threat Detection",
93 "Rule Type: ML",
94 "Rule Type: Machine Learning",
95 "Tactic: Initial Access",
96]
97type = "machine_learning"
98[[rule.threat]]
99framework = "MITRE ATT&CK"
100[[rule.threat.technique]]
101id = "T1078"
102name = "Valid Accounts"
103reference = "https://attack.mitre.org/techniques/T1078/"
104[[rule.threat.technique.subtechnique]]
105id = "T1078.002"
106name = "Domain Accounts"
107reference = "https://attack.mitre.org/techniques/T1078/002/"
108
109[[rule.threat.technique.subtechnique]]
110id = "T1078.003"
111name = "Local Accounts"
112reference = "https://attack.mitre.org/techniques/T1078/003/"
113
114
115
116[rule.threat.tactic]
117id = "TA0001"
118name = "Initial Access"
119reference = "https://attack.mitre.org/tactics/TA0001/"
Triage and analysis
Investigating an Unusual Windows User
Detection alerts from this rule indicate activity for a Windows user name that is rare and unusual. Here are some possible avenues of investigation:
- Consider the user as identified by the username field. Is this program part of an expected workflow for the user who ran this program on this host? Could this be related to occasional troubleshooting or support activity?
- Examine the history of user activity. If this user only manifested recently, it might be a service account for a new software package. If it has a consistent cadence (for example if it runs monthly or quarterly), it might be part of a monthly or quarterly business process.
- Examine the process arguments, title and working directory. These may provide indications as to the source of the program or the nature of the tasks that the user is performing.
- Consider the same for the parent process. If the parent process is a legitimate system utility or service, this could be related to software updates or system management. If the parent process is something user-facing like an Office application, this process could be more suspicious.
References
Related rules
- Unusual Windows Remote User
- Anomalous Process For a Windows Population
- Suspicious Powershell Script
- Unusual Process For a Windows Host
- Unusual Windows Network Activity