| ID | Technique | Tactic |
|---|---|---|
| T1136.001 | Local Account | Persistence |
| T1564.002 | Hidden Users | Stealth |
Detection: Cisco Secure Endpoint - Hidden Local Account Created And Concealed
Description
This analytic detects a local account created with a dollar suffix and hidden from the logon list by correlating Cisco Secure Endpoint Behavioral Protection account-creation and Winlogon UserList alerts for the same user. Creating and concealing an account can indicate an attacker preparing persistent access to the endpoint. Verify the account owner and any subsequent logons.
Search
1`cisco_secure_endpoint`
2event_type="Threat Detection"
3
4
5| `cisco_secure_endpoint_extract_bp_fields`
6
7
8| where sig_id IN ("20240715220357","20220615133344")
9
10
11| spath path=bp_data.details.matched_activity.events{0}.etw_account:create.target_user output=created_user
12
13| spath path=bp_data.details.matched_activity.events{0}.process:start.cmd_line output=process_command
14
15| spath path=bp_data.details.matched_activity.events{0}.registry:set.value output=registry_user
16
17
18| rex field=process_command "(?i)\s/v\s+(?<hidden_user>\S+)\s+/t\s+REG_DWORD"
19
20
21| rex field=process_command "(?i)\buser\s+(?<created_user_first>\S+\$)\s+\S+\s+/ADD(?:\s
22|$)"
23
24
25| rex field=process_command "(?i)\buser\s+\S+\s+(?<created_user_second>\S+\$)\s+/ADD(?:\s
26|$)"
27
28
29| eval account=lower(coalesce(created_user,registry_user,created_user_first,created_user_second,hidden_user))
30
31
32| eval stage=case(sig_id="20240715220357","created",
33 sig_id="20220615133344","hidden")
34
35
36| eval event_time=tonumber(timestamp)+tonumber(timestamp_nanoseconds)/1000000000
37
38
39| where isnotnull(endpoint_guid)
40 AND isnotnull(account)
41 AND isnotnull(event_time)
42
43
44| sort 0 endpoint_guid account event_time
45
46
47| streamstats max(eval(if(stage="created",event_time,null()))) as create_time
48 by endpoint_guid account
49
50
51| where stage="hidden"
52 AND isnotnull(create_time)
53 AND event_time>=create_time
54 AND event_time-create_time<=600
55
56
57| eval firstTime=create_time,
58 lastTime=event_time,
59 hide_command=process_command
60
61
62| dedup endpoint_guid account create_time
63
64
65| eval user=coalesce(user,"unknown")
66
67
68| table dest user endpoint_guid account hide_command firstTime lastTime
69
70| `security_content_ctime(firstTime)`
71
72| `security_content_ctime(lastTime)`
73
74| `cisco_secure_endpoint___hidden_local_account_created_and_concealed_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Cisco Secure Endpoint Behavioral Protection Threat Detection | Other | 'cisco:se' |
'not_applicable' |
Macros Used
| Name | Value |
|---|---|
| security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
| search bp_engine=apde | |
| spath path=bp_data.details.sig_id output=sig_id | |
| spath path=computer.connector_guid output=endpoint_guid | |
| spath path=computer.hostname output=dest | |
| spath path=bp_data.details.matched_activity.events{0}.process:start.user.name output=user | |
| spath path=bp_data.details.matched_activity.events{0}.registry:set.user.name output=registry_user | |
| spath path=bp_data.details.matched_activity.events{0}.file:create.user.name output=file_user | |
| eval user=coalesce(user,registry_user,file_user) | |
| spath path=bp_data.audit output=bp_audit | |
| spath path=bp_data.details.actions{}.action output=bp_action | |
| spath path=bp_data.details.actions{}.status output=bp_action_status | |
| eval bp_response=case(bp_audit="true","audit mode",isnotnull(bp_action_status),mvjoin(bp_action,", "),true(),"no action reported")` | |
| cisco_secure_endpoint___hidden_local_account_created_and_concealed_filter | search * |
cisco_secure_endpoint___hidden_local_account_created_and_concealed_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | 0 * * * * |
| Earliest Time | -70m@m |
| Latest Time | -10m@m |
| Schedule Window | auto |
| Creates Finding (Notable) | Yes |
| Rule Title | %name% |
| Rule Description | %description% |
| Notable Event Fields | user, dest |
| Creates Intermediate Finding (Risk Event) | No |
Implementation
This search requires Cisco Secure Endpoint Behavioral Protection Threat Detection alerts, which include event_type="Threat Detection".
This search uses an input macro named cisco_secure_endpoint.
We strongly recommend that you specify your environment-specific configurations (index, source, sourcetype, etc.) for Cisco Secure Endpoint Behavioral Protection Threat Detection alerts.
Replace the macro definition with configurations for your Splunk environment.
The cisco_secure_endpoint_extract_bp_fields macro extracts the common signature, endpoint, actor, and prevention-response fields used by this search.
The search also uses a post-filter macro designed to filter out known false positives.
The logs are to be ingested using the Cisco Security Cloud App for Splunk (https://splunkbase.splunk.com/app/7404).
In Protect mode, a Behavioral Protection response can kill or quarantine an earlier stage, so this search requires each later alert to have actually appeared. Review bp_data.audit and bp_data.details.actions in the source events before concluding that a task registered, a process completed, or a transfer succeeded. The included audit-mode fixtures verify alert correlation, not survival of an enforced prevention action.
Known False Positives
Endpoint management software may intentionally create service accounts with a trailing dollar sign and hide them from the logon UI. Review the creator process, account owner, and documented provisioning workflow before escalating.
Associated Analytic Story
Finding
| Title | Entity Field | Entity Type | Risk Score |
|---|---|---|---|
| Local account $account$ created and then hidden from the logon screen on $dest$ | dest | system | 50 |
Threat Objects
| Field | Type |
|---|---|
| account | user |
| hide_command | command |
References
-
https://docs.amp.cisco.com/en/SecureEndpoint/Secure%20Endpoint%20User%20Guide.pdf
-
https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1564.002/T1564.002.md
Atomic Tests
Learn more about Atomic Red Team tests here.
| Atomic Test ID | Atomic Test Name | Supported Platform |
|---|---|---|
| 173126b7-afe4-45eb-8680-fa9f6400431c | Create Hidden User in Registry | Windows |
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | ✅ Passing | N/A | N/A | N/A |
| Unit | ✅ Passing | Dataset | not_applicable |
cisco:se |
| Integration | ✅ Passing | Dataset | not_applicable |
cisco:se |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 1