=Splunk Security Content Detections =

----
All the detections shipped to different Splunk products. Below is a breakdown by kind.

==Application==


===Detect new login attempts to routers===
The search queries the authentication logs for assets that are categorized as routers in the ES Assets and Identity Framework, to identify connections that have not been seen before in the last 30 days.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Authentication
* '''ATT&CK''': 
* '''Last Updated''': 2017-09-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count earliest(_time) as earliest latest(_time) as latest from datamodel=Authentication where Authentication.dest_category=router by Authentication.dest Authentication.user
| eval isOutlier=if(earliest &gt;= relative_time(now(), &#34;-30d@d&#34;), 1, 0) 
| where isOutlier=1
| `security_content_ctime(earliest)`
| `security_content_ctime(latest)` 
| `drop_dm_object_name(&#34;Authentication&#34;)` 
| `detect_new_login_attempts_to_routers_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Router_and_Infrastructure_Security|Router and Infrastructure Security]]


====How To Implement====
To successfully implement this search, you must ensure the network router devices are categorized as &#34;router&#34; in the Assets and identity table. You must also populate the Authentication data model with logs related to users authenticating to routing infrastructure.

====Required field====

* _time

* Authentication.dest_category

* Authentication.dest

* Authentication.user




====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Legitimate router connections may appear as new connections

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Email attachments with lots of spaces===
Attackers often use spaces as a means to obfuscate an attachment&#39;s file extension. This search looks for messages with email attachments that have many spaces within the file names.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Email
* '''ATT&CK''': 
* '''Last Updated''': 2017-09-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(All_Email.recipient) as recipient_address min(_time) as firstTime max(_time) as lastTime from datamodel=Email where All_Email.file_name=&#34;*&#34; by All_Email.src_user, All_Email.file_name All_Email.message_id 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `drop_dm_object_name(&#34;All_Email&#34;)` 
| eval space_ratio = (mvcount(split(file_name,&#34; &#34;))-1)/len(file_name) 
| search space_ratio &gt;= 0.1 
|  rex field=recipient_address &#34;(?&lt;recipient_user&gt;.*)@&#34; 
| `email_attachments_with_lots_of_spaces_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Emotet_Malware__DHS_Report_TA18-201A_|Emotet Malware  DHS Report TA18-201A ]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Emails|Suspicious Emails]]


====How To Implement====
You need to ingest data from emails. Specifically, the sender&#39;s address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. \
 **Splunk Phantom Playbook Integration**\
If Splunk Phantom is also configured in your environment, a playbook called &#34;Suspicious Email Attachment Investigate and Delete&#34; can be configured to run when any results are found by this detection search. To use this integration, install the Phantom App for Splunk `https://splunkbase.splunk.com/app/3411/` and add the correct hostname to the &#34;Phantom Instance&#34; field in the Adaptive Response Actions when configuring this detection search. The notable event will be sent to Phantom and the playbook will gather further information about the file attachment and its network behaviors. If Phantom finds malicious behavior and an analyst approves of the results, the email will be deleted from the user&#39;s inbox.

====Required field====

* _time

* All_Email.recipient

* All_Email.file_name

* All_Email.src_user

* All_Email.file_name

* All_Email.message_id




====Kill Chain Phase====

* Delivery


====Known False Positives====
None at this time

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Email files written outside of the outlook directory===
The search looks at the change-analysis data model and detects email files created outside the normal Outlook directory.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1114/ T1114], [https://attack.mitre.org/techniques/T1114/001/ T1114.001]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Filesystem.file_path) as file_path min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Filesystem where (Filesystem.file_name=*.pst OR Filesystem.file_name=*.ost) Filesystem.file_path != &#34;C:\\Users\\*\\My Documents\\Outlook Files\\*&#34;  Filesystem.file_path!=&#34;C:\\Users\\*\\AppData\\Local\\Microsoft\\Outlook*&#34; by Filesystem.action Filesystem.process_id Filesystem.file_name Filesystem.dest 
| `drop_dm_object_name(&#34;Filesystem&#34;)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `email_files_written_outside_of_the_outlook_directory_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Collection_and_Staging|Collection and Staging]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records the file-system activity from your hosts to populate the Endpoint.Filesystem data model node. This is typically populated via endpoint detection-and-response product, such as Carbon Black, or by other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes.

====Required field====

* _time

* Filesystem.file_path

* Filesystem.file_name

* Filesystem.action

* Filesystem.process_id

* Filesystem.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1114
| Email Collection
| Collection
|-
| T1114.001
| Local Email Collection
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators and users sometimes prefer backing up their email data by moving the email files into a different folder. These attempts will be detected by the search.

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Email servers sending high volume traffic to hosts===
This search looks for an increase of data transfers from your email server to your clients. This could be indicative of a malicious actor collecting data using your email server.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1114/ T1114], [https://attack.mitre.org/techniques/T1114/002/ T1114.002]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` sum(All_Traffic.bytes_out) as bytes_out from datamodel=Network_Traffic where All_Traffic.src_category=email_server by All_Traffic.dest_ip _time span=1d 
| `drop_dm_object_name(&#34;All_Traffic&#34;)` 
| eventstats avg(bytes_out) as avg_bytes_out stdev(bytes_out) as stdev_bytes_out 
| eventstats count as num_data_samples avg(eval(if(_time &lt; relative_time(now(), &#34;@d&#34;), bytes_out, null))) as per_source_avg_bytes_out stdev(eval(if(_time &lt; relative_time(now(), &#34;@d&#34;), bytes_out, null))) as per_source_stdev_bytes_out by dest_ip 
| eval minimum_data_samples = 4, deviation_threshold = 3 
| where num_data_samples &gt;= minimum_data_samples AND bytes_out &gt; (avg_bytes_out + (deviation_threshold * stdev_bytes_out)) AND bytes_out &gt; (per_source_avg_bytes_out + (deviation_threshold * per_source_stdev_bytes_out)) AND _time &gt;= relative_time(now(), &#34;@d&#34;) 
| eval num_standard_deviations_away_from_server_average = round(abs(bytes_out - avg_bytes_out) / stdev_bytes_out, 2), num_standard_deviations_away_from_client_average = round(abs(bytes_out - per_source_avg_bytes_out) / per_source_stdev_bytes_out, 2) 
| table dest_ip, _time, bytes_out, avg_bytes_out, per_source_avg_bytes_out, num_standard_deviations_away_from_server_average, num_standard_deviations_away_from_client_average 
| `email_servers_sending_high_volume_traffic_to_hosts_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Collection_and_Staging|Collection and Staging]]

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]


====How To Implement====
This search requires you to be ingesting your network traffic and populating the Network_Traffic data model.  Your email servers must be categorized as &#34;email_server&#34; for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The &#34;deviation_threshold&#34; field is a multiplying factor to control how much variation you&#39;re willing to tolerate. The &#34;minimum_data_samples&#34; field is the minimum number of connections of data samples required for the statistic to be valid.

====Required field====

* _time

* All_Traffic.bytes_out

* All_Traffic.src_category

* All_Traffic.dest_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1114
| Email Collection
| Collection
|-
| T1114.002
| Remote Email Collection
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Monitor email for brand abuse===
This search looks for emails claiming to be sent from a domain similar to one that you want to have monitored for abuse.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Email
* '''ATT&CK''': 
* '''Last Updated''': 2018-01-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(All_Email.recipient) as recipients, min(_time) as firstTime, max(_time) as lastTime from datamodel=Email by All_Email.src_user, All_Email.message_id 
| `drop_dm_object_name(&#34;All_Email&#34;)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| eval temp=split(src_user, &#34;@&#34;) 
| eval email_domain=mvindex(temp, 1) 
| lookup update=true brandMonitoring_lookup domain as email_domain OUTPUT domain_abuse 
| search domain_abuse=true 
| table message_id, src_user, email_domain, recipients, firstTime, lastTime 
| `monitor_email_for_brand_abuse_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Brand_Monitoring|Brand Monitoring]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Emails|Suspicious Emails]]


====How To Implement====
You need to ingest email header data. Specifically the sender&#39;s address (src_user) must be populated.  You also need to have run the search &#34;ESCU - DNSTwist Domain Names&#34;, which creates the permutations of the domain that will be checked for.

====Required field====

* _time

* All_Email.recipient

* All_Email.src_user

* All_Email.message_id




====Kill Chain Phase====

* Delivery


====Known False Positives====
None at this time

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Multiple okta users with invalid credentials from the same ip===
This search detects Okta login failures due to bad credentials for multiple users originating from the same ip address.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1078/001/ T1078.001]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`okta` outcome.reason=INVALID_CREDENTIALS 
| rename client.geographicalContext.country as country, client.geographicalContext.state as state, client.geographicalContext.city as city 
| stats min(_time) as firstTime max(_time) as lastTime dc(user) as distinct_users values(user) as users by src_ip, displayMessage, outcome.reason, country, state, city  
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
|  search distinct_users &gt; 5
| `multiple_okta_users_with_invalid_credentials_from_the_same_ip_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Okta_Activity|Suspicious Okta Activity]]


====How To Implement====
This search is specific to Okta and requires Okta logs are being ingested in your Splunk deployment.

====Required field====

* _time

* outcome.reason

* client.geographicalContext.country

* client.geographicalContext.state

* client.geographicalContext.city

* user

* src_ip

* displayMessage



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078.001
| Default Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
A single public IP address servicing multiple legitmate users may trigger this search. In addition, the threshold of 5 distinct users may be too low for your needs. You may modify the included filter macro `multiple_okta_users_with_invalid_credentials_from_the_same_ip_filter` to raise the threshold or except specific IP adresses from triggering this search.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===No windows updates in a time frame===
This search looks for Windows endpoints that have not generated an event indicating a successful Windows update in the last 60 days. Windows updates are typically released monthly and applied shortly thereafter. An endpoint that has not successfully applied an update in this time frame indicates the endpoint is not regularly being patched for some reason.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Updates
* '''ATT&CK''': 
* '''Last Updated''': 2017-09-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` max(_time) as lastTime from datamodel=Updates where Updates.status=Installed Updates.vendor_product=&#34;Microsoft Windows&#34; by Updates.dest Updates.status Updates.vendor_product 
| rename Updates.dest as Host 
| rename Updates.status as &#34;Update Status&#34; 
| rename Updates.vendor_product as Product 
| eval isOutlier=if(lastTime &lt;= relative_time(now(), &#34;-60d@d&#34;), 1, 0)  
| `security_content_ctime(lastTime)`  
| search isOutlier=1 
| rename lastTime as &#34;Last Update Time&#34;, 
| table Host, &#34;Update Status&#34;, Product, &#34;Last Update Time&#34; 
| `no_windows_updates_in_a_time_frame_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Monitor_for_Updates|Monitor for Updates]]


====How To Implement====
To successfully implement this search, it requires that the &#39;Update&#39; data model is being populated. This can be accomplished by ingesting Windows events or the Windows Update log via a universal forwarder on the Windows endpoints you wish to monitor. The Windows add-on should be also be installed and configured to properly parse Windows events in Splunk. There may be other data sources which can populate this data model, including vulnerability management systems.

====Required field====

* _time

* Updates.status

* Updates.vendor_product

* Updates.dest




====Kill Chain Phase====


====Known False Positives====
None identified

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Okta account lockout events===
Detect Okta user lockout events

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1078/001/ T1078.001]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`okta` displayMessage=&#34;Max sign in attempts exceeded&#34; 
| rename client.geographicalContext.country as country, client.geographicalContext.state as state, client.geographicalContext.city as city 
| table _time, user, country, state, city, src_ip 
| `okta_account_lockout_events_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Okta_Activity|Suspicious Okta Activity]]


====How To Implement====
This search is specific to Okta and requires Okta logs are being ingested in your Splunk deployment.

====Required field====

* _time

* displayMessage

* client.geographicalContext.country

* client.geographicalContext.state

* client.geographicalContext.city



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078.001
| Default Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
None. Account lockouts should be followed up on to determine if the actual user was the one who caused the lockout, or if it was an unauthorized actor.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Okta failed sso attempts===
Detect failed Okta SSO events

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1078/001/ T1078.001]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`okta` displayMessage=&#34;User attempted unauthorized access to app&#34; 
| stats  min(_time) as firstTime max(_time) as lastTime values(app) as Apps count by user, result ,displayMessage, src_ip 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `okta_failed_sso_attempts_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Okta_Activity|Suspicious Okta Activity]]


====How To Implement====
This search is specific to Okta and requires Okta logs are being ingested in your Splunk deployment.

====Required field====

* _time

* displayMessage

* app

* user

* result

* src_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078.001
| Default Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
There may be a faulty config preventing legitmate users from accessing apps they should have access to.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Okta user logins from multiple cities===
This search detects logins from the same user from different cities in a 24 hour period.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1078/001/ T1078.001]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`okta` displayMessage=&#34;User login to Okta&#34; client.geographicalContext.city!=null 
| stats min(_time) as firstTime max(_time) as lastTime dc(client.geographicalContext.city) as locations values(client.geographicalContext.city) as cities values(client.geographicalContext.state) as states by user 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `okta_user_logins_from_multiple_cities_filter` 
| search locations &gt; 1</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Okta_Activity|Suspicious Okta Activity]]


====How To Implement====
This search is specific to Okta and requires Okta logs are being ingested in your Splunk deployment.

====Required field====

* _time

* displayMessage

* client.geographicalContext.city

* client.geographicalContext.state

* user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078.001
| Default Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
Users in your enviornment may legitmately be travelling and loggin in from different locations. This search is useful for those users that should *not* be travelling for some reason, such as the COVID-19 pandemic. The search also relies on the geographical information being populated in the Okta logs. It is also possible that a connection from another region may be attributed to a login from a remote VPN endpoint.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Phishing email detection by machine learning method - ssa===
Malicious mails can conduct phishing that induces readers to open attachment, click links or trigger third party service. This detect uses Natural Language Processing (NLP) approach to analyze an email message&#39;s content (Sender, Subject and Body) and judge whether it is a phishing email. The detection adopts a deep learning (neural network) model that employs character level embeddings plus LSTM layers to perform classification. The model is pre-trained and then published as ONNX format. Current sample model is trained using the dataset published at https://github.com/splunk/attack_data/tree/master/datasets/T1566_Phishing_Email/splunk_train.json User are expected to re-train the model by combining with their own training data for better accuracy using the provided model file (SMLE notebook). DSP pipeline then processes the email message and passes it as an event to Apply ML Models function, which returns the probability of a phishing email. Current implementation assumes the email is fed to DSP in JSON format contains at least email&#39;s sender, subject and its message body, including reply content, if any.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566]
* '''Last Updated''': 2020-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval eventLine=concat(ucast(map_get(input_event, &#34;From&#34;), &#34;string&#34;, &#34; &#34;), &#34; &#34;, ucast(map_get(input_event, &#34;Subject&#34;), &#34;string&#34;, &#34; &#34;), &#34; &#34;, ucast(map_get(input_event, &#34;Content&#34;), &#34;string&#34;, &#34; &#34;), &#34;                                                                                                                                &#34;), _time=map_get(input_event, &#34;_time&#34;) 
| where eventLine IS NOT NULL 
| eval mapC={&#34; &#34;: 32, &#34;!&#34;: 33, &#34;\&#34;&#34;: 34, &#34;#&#34;: 35, &#34;$&#34;: 36, &#34;%&#34;: 37, &#34;&amp;&#34;: 38, &#34;`&#34;: 39, &#34;(&#34;: 40, &#34;)&#34;: 41, &#34;*&#34;: 42, &#34;+&#34;: 43, &#34;,&#34;: 44, &#34;-&#34;: 45, &#34;.&#34;: 46, &#34;/&#34;: 47, &#34;0&#34;: 48, &#34;1&#34;: 49, &#34;2&#34;: 50, &#34;3&#34;: 51, &#34;4&#34;: 52, &#34;5&#34;: 53, &#34;6&#34;: 54, &#34;7&#34;: 55, &#34;8&#34;: 56, &#34;9&#34;: 57, &#34;:&#34;: 58, &#34;;&#34;: 59, &#34;&lt;&#34;: 60, &#34;=&#34;: 61, &#34;&gt;&#34;: 62, &#34;?&#34;: 63, &#34;@&#34;: 64, &#34;A&#34;: 65, &#34;B&#34;: 66, &#34;C&#34;: 67, &#34;D&#34;: 68, &#34;E&#34;: 69, &#34;F&#34;: 70, &#34;G&#34;: 71, &#34;H&#34;: 72, &#34;I&#34;: 73, &#34;J&#34;: 74, &#34;K&#34;: 75, &#34;L&#34;: 76, &#34;M&#34;: 77, &#34;N&#34;: 78, &#34;O&#34;: 79, &#34;P&#34;: 80, &#34;Q&#34;: 81, &#34;R&#34;: 82, &#34;S&#34;: 83, &#34;T&#34;: 84, &#34;U&#34;: 85, &#34;V&#34;: 86, &#34;W&#34;: 87, &#34;X&#34;: 88, &#34;Y&#34;: 89, &#34;Z&#34;: 90, &#34;[&#34;: 91, &#34;\\&#34;: 92, &#34;]&#34;: 93, &#34;^&#34;: 94, &#34;_&#34;: 95, &#34;`&#34;: 96, &#34;a&#34;: 97, &#34;b&#34;: 98, &#34;c&#34;: 99, &#34;d&#34;: 100, &#34;e&#34;: 101, &#34;f&#34;: 102, &#34;g&#34;: 103, &#34;h&#34;: 104, &#34;i&#34;: 105, &#34;j&#34;: 106, &#34;k&#34;: 107, &#34;l&#34;: 108, &#34;m&#34;: 109, &#34;n&#34;: 110, &#34;o&#34;: 111, &#34;p&#34;: 112, &#34;q&#34;: 113, &#34;r&#34;: 114, &#34;s&#34;: 115, &#34;t&#34;: 116, &#34;u&#34;: 117, &#34;v&#34;: 118, &#34;w&#34;: 119, &#34;x&#34;: 120, &#34;y&#34;: 121, &#34;z&#34;: 122, &#34;{&#34;: 123, &#34;
|&#34;: 124, &#34;}&#34;: 125, &#34;~&#34;: 126}, ml_in = for_each(iterator(mvrange(1,129), &#34;i&#34;), cast(map_get(mapC, substr(eventLine, i, 1)), &#34;float&#34;) ) 
| apply_model connection_id=&#34;YOUR_S3_ONNX_CONNECTOR_ID&#34; name=&#34;phishing_email_v8&#34; path=&#34;s3://smle-experiments/models/phishing_email&#34; 
| eval probability = mvindex(ml_out, 0) 
| where probability &gt; 0.5 
| eval start_time=_time, end_time=_time, entities=&#34;TBD&#34;, body=&#34;TBD&#34; 
| select probability, body, entities, start_time, end_time 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====


====How To Implement====
Events are fed to DSP contains at least email&#39;s sender, subject and its message body.

====Required field====



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Because of imbalance of anomaly data in training, the model will less likely report false positive. Instead, the model is more prone to false negative. Current best recall score is ~85%

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Suspicious email attachment extensions===
This search looks for emails that have attachments with suspicious file extensions.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Email
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/001/ T1566.001], [https://attack.mitre.org/techniques/T1566/ T1566]
* '''Last Updated''': 2020-07-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Email where All_Email.file_name=&#34;*&#34; by All_Email.src_user, All_Email.file_name All_Email.message_id 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `drop_dm_object_name(&#34;All_Email&#34;)` 
| `suspicious_email_attachments` 
| `suspicious_email_attachment_extensions_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Emotet_Malware__DHS_Report_TA18-201A_|Emotet Malware  DHS Report TA18-201A ]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Emails|Suspicious Emails]]


====How To Implement====
You need to ingest data from emails. Specifically, the sender&#39;s address and the file names of any attachments must be mapped to the Email data model. \
 **Splunk Phantom Playbook Integration**\
If Splunk Phantom is also configured in your environment, a Playbook called &#34;Suspicious Email Attachment Investigate and Delete&#34; can be configured to run when any results are found by this detection search. To use this integration, install the Phantom App for Splunk `https://splunkbase.splunk.com/app/3411/`, and add the correct hostname to the &#34;Phantom Instance&#34; field in the Adaptive Response Actions when configuring this detection search. The notable event will be sent to Phantom and the playbook will gather further information about the file attachment and its network behaviors. If Phantom finds malicious behavior and an analyst approves of the results, the email will be deleted from the user&#39;s inbox.

====Required field====

* _time

* All_Email.file_name

* All_Email.src_user

* All_Email.message_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|-
| T1566
| Phishing
| Initial Access
|}


====Kill Chain Phase====

* Delivery


====Known False Positives====
None identified

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Suspicious java classes===
This search looks for suspicious Java classes that are often used to exploit remote command execution in common Java frameworks, such as Apache Struts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': 
* '''Last Updated''': 2018-12-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`stream_http` http_method=POST http_content_length&gt;1 
| regex form_data=&#34;(?i)java\.lang\.(?:runtime
|processbuilder)&#34; 
| rename src_ip as src 
| stats count earliest(_time) as firstTime, latest(_time) as lastTime, values(url) as uri, values(status) as status, values(http_user_agent) as http_user_agent by src, dest 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_java_classes_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Apache_Struts_Vulnerability|Apache Struts Vulnerability]]


====How To Implement====
In order to properly run this search, Splunk needs to ingest data from your web-traffic appliances that serve or sit in the path of your Struts application servers. This can be accomplished by indexing data from a web proxy, or by using network traffic-analysis tools, such as Splunk Stream or Bro.

====Required field====

* _time

* http_method

* http_content_length

* src_ip

* url

* status

* http_user_agent

* src

* dest




====Kill Chain Phase====

* Exploitation


====Known False Positives====
There are no known false positives.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Web servers executing suspicious processes===
This search looks for suspicious processes on all systems labeled as web servers.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1082/ T1082]
* '''Last Updated''': 2019-04-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.dest_category=&#34;web_server&#34; AND (Processes.process=&#34;*whoami*&#34; OR Processes.process=&#34;*ping*&#34; OR Processes.process=&#34;*iptables*&#34; OR Processes.process=&#34;*wget*&#34; OR Processes.process=&#34;*service*&#34; OR Processes.process=&#34;*curl*&#34;) by Processes.process Processes.process_name, Processes.dest Processes.user
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `web_servers_executing_suspicious_processes_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Apache_Struts_Vulnerability|Apache Struts Vulnerability]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model. In addition, web servers will need to be identified in the Assets and Identity Framework of Enterprise Security.

====Required field====

* _time

* Processes.dest_category

* Processes.process

* Processes.process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1082
| System Information Discovery
| Discovery
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Some of these processes may be used legitimately on web servers during maintenance or other administrative tasks.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----



==Cloud==


===Aws create policy version to allow all resources===
This search looks for AWS CloudTrail events where a user created a policy version that allows them to access any resource in their account

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/004/ T1078.004], [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2021-02-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=CreatePolicyVersion eventSource = iam.amazonaws.com errorCode = success 
| spath input=requestParameters.policyDocument output=key_policy_statements path=Statement{} 
| mvexpand key_policy_statements 
| spath input=key_policy_statements output=key_policy_action_1 path=Action 
| search key_policy_action_1 = &#34;*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime values(key_policy_statements) as policy_added by eventName eventSource aws_account_id errorCode userAgent eventID awsRegion userIdentity.principalId user_arn 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
|`aws_create_policy_version_to_allow_all_resources_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_IAM_Privilege_Escalation|AWS IAM Privilege Escalation]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* _time

* eventName

* userAgent

* errorCode

* requestParameters.userName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078.004
| Cloud Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
While this search has no known false positives, it is possible that an AWS admin has legitimately created a policy to allow a user to access all resources. That said, AWS strongly advises against granting full control to all AWS resources

====Reference====


* https://labs.bishopfox.com/tech-blog/privilege-escalation-in-aws

* https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation-part-2/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078/aws_create_policy_version/aws_cloudtrail_events.json


''version'': 2
</div>
</div>

----

===Aws createaccesskey===
This search looks for AWS CloudTrail events where a user A who has already permission to create access keys, makes an API call to create access keys for another user B. Attackers have been know to use this technique for Privilege Escalation in case new victim(user B) has more permissions than old victim(user B)

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1136/003/ T1136.003], [https://attack.mitre.org/techniques/T1136/ T1136]
* '''Last Updated''': 2021-07-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName = CreateAccessKey userAgent !=console.amazonaws.com errorCode = success
| search userIdentity.userName!=requestParameters.userName  
|  stats count min(_time) as firstTime max(_time) as lastTime  by requestParameters.userName src eventName eventSource aws_account_id errorCode userAgent eventID awsRegion userIdentity.principalId user_arn 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
|`aws_createaccesskey_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_IAM_Privilege_Escalation|AWS IAM Privilege Escalation]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* _time

* eventName

* userAgent

* errorCode

* requestParameters.userName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1136.003
| Cloud Account
| Persistence
|-
| T1136
| Create Account
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
While this search has no known false positives, it is possible that an AWS admin has legitimately created keys for another user.

====Reference====


* https://labs.bishopfox.com/tech-blog/privilege-escalation-in-aws

* https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation-part-2/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078/aws_createaccesskey/aws_cloudtrail_events.json


''version'': 2
</div>
</div>

----

===Aws createloginprofile===
This search looks for AWS CloudTrail events where a user A(victim A) creates a login profile for user B, followed by a AWS Console login event from user B from the same src_ip as user B. This correlated event can be indicative of privilege escalation since both events happened from the same src_ip

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1136/003/ T1136.003], [https://attack.mitre.org/techniques/T1136/ T1136]
* '''Last Updated''': 2021-07-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName = CreateLoginProfile 
| rename requestParameters.userName as new_login_profile 
| table src_ip eventName new_login_profile userIdentity.userName  
| join new_login_profile src_ip [
| search `cloudtrail` eventName = ConsoleLogin 
| rename userIdentity.userName  as new_login_profile 
| stats count values(eventName) min(_time) as firstTime max(_time) as lastTime by eventSource aws_account_id errorCode userAgent eventID awsRegion userIdentity.principalId user_arn new_login_profile src_ip 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`] 
| `aws_createloginprofile_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_IAM_Privilege_Escalation|AWS IAM Privilege Escalation]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* _time

* eventName

* userAgent

* errorCode

* requestParameters.userName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1136.003
| Cloud Account
| Persistence
|-
| T1136
| Create Account
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
While this search has no known false positives, it is possible that an AWS admin has legitimately created a login profile for another user.

====Reference====


* https://labs.bishopfox.com/tech-blog/privilege-escalation-in-aws

* https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation-part-2/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078/aws_createloginprofile/aws_cloudtrail_events.json


''version'': 2
</div>
</div>

----

===Aws cross account activity from previously unseen account===
This search looks for AssumeRole events where an IAM role in a different account is requested for the first time.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Authentication
* '''ATT&CK''': 
* '''Last Updated''': 2020-05-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats min(_time) as firstTime max(_time) as lastTime from datamodel=Authentication where Authentication.signature=AssumeRole by Authentication.vendor_account Authentication.user Authentication.src Authentication.user_role 
| `drop_dm_object_name(Authentication)` 
| rex field=user_role &#34;arn:aws:sts:*:(?&lt;dest_account&gt;.*):&#34; 
| where vendor_account != dest_account 
| rename vendor_account as requestingAccountId dest_account as requestedAccountId 
| lookup previously_seen_aws_cross_account_activity requestingAccountId, requestedAccountId, OUTPUTNEW firstTime 
| eval status = if(firstTime &gt; relative_time(now(), &#34;-24h@h&#34;),&#34;New Cross Account Activity&#34;,&#34;Previously Seen&#34;) 
|  where status = &#34;New Cross Account Activity&#34; 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `aws_cross_account_activity_from_previously_unseen_account_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Authentication_Activities|Suspicious Cloud Authentication Activities]]


====How To Implement====
You must be ingesting your cloud infrastructure logs from your cloud provider. You should run the baseline search `Previously Seen AWS Cross Account Activity - Initial` to build the initial table of source IP address, geographic locations, and times. You must also enable the second baseline search `Previously Seen AWS Cross Account Activity - Update` to keep this table up to date and to age out old data. You can also provide additional filtering for this search by customizing the `aws_cross_account_activity_from_previously_unseen_account_filter` macro.

====Required field====

* _time

* Authentication.signature

* Authentication.vendor_account

* Authentication.user

* Authentication.user_role

* Authentication.src




====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Using multiple AWS accounts and roles is perfectly valid behavior. It&#39;s suspicious when an account requests privileges of an account it hasn&#39;t before. You should validate with the account owner that this is a legitimate request.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Aws detect users creating keys with encrypt policy without mfa===
This search provides detection of KMS keys where action kms:Encrypt is accessible for everyone (also outside of your organization). This is an indicator that your account is compromised and the attacker uses the encryption key to compromise another company.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1486/ T1486]
* '''Last Updated''': 2021-01-11

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=CreateKey OR eventName=PutKeyPolicy 
| spath input=requestParameters.policy output=key_policy_statements path=Statement{} 
| mvexpand key_policy_statements 
| spath input=key_policy_statements output=key_policy_action_1 path=Action 
| spath input=key_policy_statements output=key_policy_action_2 path=Action{} 
| eval key_policy_action=mvappend(key_policy_action_1, key_policy_action_2) 
| spath input=key_policy_statements output=key_policy_principal path=Principal.AWS 
| search key_policy_action=&#34;kms:Encrypt&#34; AND key_policy_principal=&#34;*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by eventName eventSource eventID awsRegion userIdentity.principalId 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
|`aws_detect_users_creating_keys_with_encrypt_policy_without_mfa_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware_Cloud|Ransomware Cloud]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs

====Required field====

* _time

* eventName

* eventSource

* eventID

* awsRegion

* requestParameters.policy

* userIdentity.principalId



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1486
| Data Encrypted for Impact
| Impact
|}


====Kill Chain Phase====


====Known False Positives====
unknown

====Reference====


* https://rhinosecuritylabs.com/aws/s3-ransomware-part-1-attack-vector/

* https://github.com/d1vious/git-wild-hunt

* https://www.youtube.com/watch?v=PgzNib37g0M



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1486/aws_kms_key/aws_cloudtrail_events.json


''version'': 1
</div>
</div>

----

===Aws detect users with kms keys performing encryption s3===
This search provides detection of users with KMS keys performing encryption specifically against S3 buckets.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1486/ T1486]
* '''Last Updated''': 2021-01-11

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=CopyObject requestParameters.x-amz-server-side-encryption=&#34;aws:kms&#34; 
| rename requestParameters.bucketName AS bucket_name, requestParameters.x-amz-copy-source AS src_file, requestParameters.key AS dest_file 
| stats count min(_time) as firstTime max(_time) as lastTime values(src_file) AS src_file values(dest_file) AS dest_file values(userAgent) AS userAgent values(region) AS region values(src) AS src by user 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
|`aws_detect_users_with_kms_keys_performing_encryption_s3_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware_Cloud|Ransomware Cloud]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs

====Required field====

* _time

* eventName

* requestParameters.x-amz-server-side-encryption

* requestParameters.bucketName

* requestParameters.x-amz-copy-source

* requestParameters.key

* userAgent

* region



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1486
| Data Encrypted for Impact
| Impact
|}


====Kill Chain Phase====


====Known False Positives====
bucket with S3 encryption

====Reference====


* https://rhinosecuritylabs.com/aws/s3-ransomware-part-1-attack-vector/

* https://github.com/d1vious/git-wild-hunt

* https://www.youtube.com/watch?v=PgzNib37g0M



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1486/s3_file_encryption/aws_cloudtrail_events.json


''version'': 1
</div>
</div>

----

===Aws ecr container scanning findings high===
This search looks for AWS CloudTrail events from AWS Elastic Container Service (ECR). You need to activate image scanning in order to get the event DescribeImageScanFindings with the results.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/003/ T1204.003], [https://attack.mitre.org/techniques/T1204/ T1204]
* '''Last Updated''': 2021-08-17

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventSource=ecr.amazonaws.com eventName=DescribeImageScanFindings 
| spath path=responseElements.imageScanFindings.findings{} output=findings 
| mvexpand findings 
| spath input=findings
| search severity=HIGH 
| rename name as finding_name, description as finding_description, requestParameters.imageId.imageDigest as imageDigest, requestParameters.repositoryName as image 
| eval finding = finding_name.&#34;, &#34;.finding_description 
| eval phase=&#34;release&#34; 
| eval severity=&#34;high&#34; 
| stats min(_time) as firstTime max(_time) as lastTime by awsRegion, eventName, eventSource, imageDigest, image, user, userName, src_ip, finding, phase, severity 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_ecr_container_scanning_findings_high_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* eventSource

* eventName

* responseElements.imageScanFindings.findings{}

* awsRegion

* requestParameters.imageId.imageDigest

* requestParameters.repositoryName

* user

* userName

* src_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204.003
| Malicious Image
| Execution
|-
| T1204
| User Execution
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html



====Test Dataset====


''version'': 1
</div>
</div>

----

===Aws ecr container scanning findings low informational unknown===
This search looks for AWS CloudTrail events from AWS Elastic Container Service (ECR). You need to activate image scanning in order to get the event DescribeImageScanFindings with the results.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/003/ T1204.003], [https://attack.mitre.org/techniques/T1204/ T1204]
* '''Last Updated''': 2021-08-17

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventSource=ecr.amazonaws.com eventName=DescribeImageScanFindings 
| spath path=responseElements.imageScanFindings.findings{} output=findings 
| mvexpand findings 
| spath input=findings
| search severity IN (LOW, INFORMATIONAL, UNKNWON) 
| rename name as finding_name, description as finding_description, requestParameters.imageId.imageDigest as imageDigest, requestParameters.repositoryName as repositoryName 
| eval finding = finding_name.&#34;, &#34;.finding_description 
| eval phase=&#34;release&#34; 
| eval severity=&#34;low&#34; 
| stats min(_time) as firstTime max(_time) as lastTime by awsRegion, eventName, eventSource, imageDigest, repositoryName, user, userName, src_ip, finding, phase, severity 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_ecr_container_scanning_findings_low_informational_unknown_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* eventSource

* eventName

* responseElements.imageScanFindings.findings{}

* awsRegion

* requestParameters.imageId.imageDigest

* requestParameters.repositoryName

* user

* userName

* src_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204.003
| Malicious Image
| Execution
|-
| T1204
| User Execution
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html



====Test Dataset====


''version'': 1
</div>
</div>

----

===Aws ecr container scanning findings medium===
This search looks for AWS CloudTrail events from AWS Elastic Container Service (ECR). You need to activate image scanning in order to get the event DescribeImageScanFindings with the results.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/003/ T1204.003], [https://attack.mitre.org/techniques/T1204/ T1204]
* '''Last Updated''': 2021-08-17

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventSource=ecr.amazonaws.com eventName=DescribeImageScanFindings 
| spath path=responseElements.imageScanFindings.findings{} output=findings 
| mvexpand findings 
| spath input=findings
| search severity=MEDIUM 
| rename name as finding_name, description as finding_description, requestParameters.imageId.imageDigest as imageDigest, requestParameters.repositoryName as image 
| eval finding = finding_name.&#34;, &#34;.finding_description 
| eval phase=&#34;release&#34; 
| eval severity=&#34;medium&#34; 
| stats min(_time) as firstTime max(_time) as lastTime by awsRegion, eventName, eventSource, imageDigest, image, user, userName, src_ip, finding, phase, severity 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_ecr_container_scanning_findings_medium_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* eventSource

* eventName

* responseElements.imageScanFindings.findings{}

* awsRegion

* requestParameters.imageId.imageDigest

* requestParameters.repositoryName

* user

* userName

* src_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204.003
| Malicious Image
| Execution
|-
| T1204
| User Execution
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html



====Test Dataset====


''version'': 1
</div>
</div>

----

===Aws ecr container upload outside business hours===
This search looks for AWS CloudTrail events from AWS Elastic Container Service (ECR). A upload of a new container is normally done during business hours. When done outside business hours, we want to take a look into it.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/003/ T1204.003], [https://attack.mitre.org/techniques/T1204/ T1204]
* '''Last Updated''': 2021-08-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventSource=ecr.amazonaws.com eventName=PutImage date_hour&gt;=20 OR date_hour&lt;8 NOT (date_wday=saturday OR date_wday=sunday) 
| rename requestParameters.* as * 
| rename repositoryName AS image 
| eval phase=&#34;release&#34; 
| eval severity=&#34;medium&#34; 
| stats min(_time) as firstTime max(_time) as lastTime by awsRegion, eventName, eventSource, user, userName, src_ip, imageTag, registryId, image, phase, severity 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_ecr_container_upload_outside_business_hours_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* eventSource

* eventName

* awsRegion

* requestParameters.imageTag

* requestParameters.registryId

* requestParameters.repositoryName

* user

* userName

* src_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204.003
| Malicious Image
| Execution
|-
| T1204
| User Execution
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
When your development is spreaded in different time zones, applying this rule can be difficult.

====Reference====


* https://attack.mitre.org/techniques/T1204/003/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Aws ecr container upload unknown user===
This search looks for AWS CloudTrail events from AWS Elastic Container Service (ECR). A upload of a new container is normally done from only a few known users. When the user was never seen before, we should have a closer look into the event.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/003/ T1204.003], [https://attack.mitre.org/techniques/T1204/ T1204]
* '''Last Updated''': 2021-08-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventSource=ecr.amazonaws.com eventName=PutImage NOT `aws_ecr_users` 
| rename requestParameters.* as * 
| rename repositoryName AS image 
| eval phase=&#34;release&#34; 
| eval severity=&#34;high&#34; 
| stats min(_time) as firstTime max(_time) as lastTime by awsRegion, eventName, eventSource, user, userName, src_ip, imageTag, registryId, image, phase, severity 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_ecr_container_upload_unknown_user_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* eventSource

* eventName

* awsRegion

* requestParameters.imageTag

* requestParameters.registryId

* requestParameters.repositoryName

* user

* userName

* src_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204.003
| Malicious Image
| Execution
|-
| T1204
| User Execution
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://attack.mitre.org/techniques/T1204/003/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Aws excessive security scanning===
This search looks for AWS CloudTrail events and analyse the amount of eventNames which starts with Describe by a single user. This indicates that this user scans the configuration of your AWS cloud environment.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1526/ T1526]
* '''Last Updated''': 2021-04-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=Describe* OR eventName=List* OR eventName=Get*  
| stats dc(eventName) as dc_events min(_time) as firstTime max(_time) as lastTime values(eventName) as eventName values(src) as src values(userAgent) as userAgent by user userIdentity.arn 
| where dc_events &gt; 50 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
|`aws_excessive_security_scanning_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_User_Monitoring|AWS User Monitoring]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* _time

* eventName

* src

* userAgent

* user

* userIdentity.arn



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1526
| Cloud Service Discovery
| Discovery
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
While this search has no known false positives.

====Reference====


* https://github.com/aquasecurity/cloudsploit



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1526/aws_security_scanner/aws_security_scanner.json


''version'': 1
</div>
</div>

----

===Aws iam accessdenied discovery events===
The following detection identifies excessive AccessDenied events within an hour timeframe. It is possible that an access key to AWS may have been stolen and is being misused to perform discovery events. In these instances, the access is not available with the key stolen therefore these events will be generated.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Splunk Security Analytics for AWS
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1580/ T1580]
* '''Last Updated''': 2021-04-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` (errorCode = &#34;AccessDenied&#34;) user_type=IAMUser (userAgent!=*.amazonaws.com) 
| bucket _time span=1h 
| stats count as failures min(_time) as firstTime max(_time) as lastTime, dc(eventName) as methods, dc(eventSource) as sources values(userIdentity.arn) by src_ip, userIdentity.arn, _time 
| where failures &gt;= 5 and methods &gt;= 1 and sources &gt;= 1 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_iam_accessdenied_discovery_events_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_User_Activities|Suspicious Cloud User Activities]]


====How To Implement====
The Splunk AWS Add-on and Splunk App for AWS is required to utilize this data. The search requires AWS Cloudtrail logs.

====Required field====

* _time

* eventName

* eventSource

* userAgent

* errorCode

* userIdentity.type



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1580
| Cloud Infrastructure Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
It is possible to start this detection will need to be tuned by source IP or user. In addition, change the count values to an upper threshold to restrict false positives.

====Reference====


* https://aws.amazon.com/premiumsupport/knowledge-center/troubleshoot-iam-permission-errors/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1580/aws_iam_accessdenied_discovery_events/aws_iam_accessdenied_discovery_events.json


''version'': 1
</div>
</div>

----

===Aws iam assume role policy brute force===
The following detection identifies any malformed policy document exceptions with a status of `failure`. A malformed policy document exception occurs in instances where roles are attempted to be assumed, or brute forced. In a brute force attempt, using a tool like CloudSploit or Pacu, an attempt will look like `arn:aws:iam::111111111111:role/aws-service-role/rds.amazonaws.com/AWSServiceRoleForRDS`.  Meaning, when an adversary is attempting to identify a role name, multiple failures will occur. This detection focuses on the errors of a remote attempt that is failing.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Splunk Security Analytics for AWS
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1580/ T1580], [https://attack.mitre.org/techniques/T1110/ T1110]
* '''Last Updated''': 2021-04-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` (errorCode=MalformedPolicyDocumentException) status=failure (userAgent!=*.amazonaws.com) 
| stats count min(_time) as firstTime max(_time) as lastTime values(requestParameters.policyName) as policy_name by src eventName eventSource aws_account_id errorCode requestParameters.policyDocument userAgent eventID awsRegion userIdentity.principalId user_arn 
| where count &gt;= 2 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_iam_assume_role_policy_brute_force_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_IAM_Privilege_Escalation|AWS IAM Privilege Escalation]]


====How To Implement====
The Splunk AWS Add-on and Splunk App for AWS is required to utilize this data. The search requires AWS Cloudtrail logs. Set the `where count` greater than a value to identify suspicious activity in your environment.

====Required field====

* _time

* eventName

* userAgent

* errorCode

* requestParameters.policyName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1580
| Cloud Infrastructure Discovery
| Discovery
|-
| T1110
| Brute Force
| Credential Access
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
This detection will require tuning to provide high fidelity detection capabilties. Tune based on src addresses (corporate offices, VPN terminations) or by groups of users.

====Reference====


* https://www.praetorian.com/blog/aws-iam-assume-role-vulnerabilities

* https://rhinosecuritylabs.com/aws/assume-worst-aws-assume-role-enumeration/

* https://www.elastic.co/guide/en/security/current/aws-iam-brute-force-of-assume-role-policy.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1580/aws_iam_assume_role_policy_brute_force/aws_iam_assume_role_policy_brute_force.json


''version'': 1
</div>
</div>

----

===Aws iam delete policy===
The following detection identifes when a policy is deleted on AWS. This does not identify whether successful or failed, but the error messages tell a story of suspicious attempts. There is a specific process to follow when deleting a policy. First, detach the policy from all users, groups, and roles that the policy is attached to, using DetachUserPolicy , DetachGroupPolicy , or DetachRolePolicy.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Splunk Security Analytics for AWS
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1098/ T1098]
* '''Last Updated''': 2021-04-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=DeletePolicy (userAgent!=*.amazonaws.com) 
| stats count min(_time) as firstTime max(_time) as lastTime values(requestParameters.policyArn) as policyArn by src eventName eventSource aws_account_id errorCode errorMessage userAgent eventID awsRegion userIdentity.principalId userIdentity.arn 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_iam_delete_policy_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_IAM_Privilege_Escalation|AWS IAM Privilege Escalation]]


====How To Implement====
The Splunk AWS Add-on and Splunk App for AWS is required to utilize this data. The search requires AWS Cloudtrail logs.

====Required field====

* _time

* eventName

* userAgent

* errorCode

* requestParameters.policyArn



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1098
| Account Manipulation
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
This detection will require tuning to provide high fidelity detection capabilties. Tune based on src addresses (corporate offices, VPN terminations) or by groups of users. Not every user with AWS access should have permission to delete policies (least privilege). In addition, this may be saved seperately and tuned for failed or success attempts only.

====Reference====


* https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeletePolicy.html

* https://docs.aws.amazon.com/cli/latest/reference/iam/delete-policy.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1098/aws_iam_delete_policy/aws_iam_delete_policy.json


''version'': 1
</div>
</div>

----

===Aws iam failure group deletion===
This detection identifies failure attempts to delete groups. We want to identify when a group is attempting to be deleted, but either access is denied, there is a conflict or there is no group. This is indicative of administrators performing an action, but also could be suspicious behavior occurring. Review parallel IAM events - recently added users, new groups and so forth.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Splunk Security Analytics for AWS
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1098/ T1098]
* '''Last Updated''': 2021-04-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventSource=iam.amazonaws.com eventName=DeleteGroup errorCode IN (NoSuchEntityException,DeleteConflictException, AccessDenied) (userAgent!=*.amazonaws.com) 
| stats count min(_time) as firstTime max(_time) as lastTime values(requestParameters.groupName) as group_name by src eventName eventSource aws_account_id errorCode errorMessage userAgent eventID awsRegion userIdentity.principalId user_arn 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_iam_failure_group_deletion_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_IAM_Privilege_Escalation|AWS IAM Privilege Escalation]]


====How To Implement====
The Splunk AWS Add-on and Splunk App for AWS is required to utilize this data. The search requires AWS Cloudtrail logs.

====Required field====

* _time

* eventName

* userAgent

* errorCode

* requestParameters.groupName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1098
| Account Manipulation
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
This detection will require tuning to provide high fidelity detection capabilties. Tune based on src addresses (corporate offices, VPN terminations) or by groups of users. Not every user with AWS access should have permission to delete groups (least privilege).

====Reference====


* https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/delete-group.html

* https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteGroup.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1098/aws_iam_failure_group_deletion/aws_iam_failure_group_deletion.json


''version'': 1
</div>
</div>

----

===Aws iam successful group deletion===
The following query uses IAM events to track the success of a group being deleted on AWS. This is typically not indicative of malicious behavior, but a precurser to additional events thay may unfold. Review parallel IAM events - recently added users, new groups and so forth. Inversely, review failed attempts in a similar manner.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Splunk Security Analytics for AWS
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/003/ T1069.003], [https://attack.mitre.org/techniques/T1098/ T1098], [https://attack.mitre.org/techniques/T1069/ T1069]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventSource=iam.amazonaws.com eventName=DeleteGroup errorCode=success (userAgent!=*.amazonaws.com) 
| stats count min(_time) as firstTime max(_time) as lastTime values(requestParameters.groupName) as group_deleted by src eventName eventSource errorCode user_agent awsRegion userIdentity.principalId user_arn 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_iam_successful_group_deletion_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_IAM_Privilege_Escalation|AWS IAM Privilege Escalation]]


====How To Implement====
The Splunk AWS Add-on and Splunk App for AWS is required to utilize this data. The search requires AWS Cloudtrail logs.

====Required field====

* _time

* eventName

* userAgent

* errorCode

* requestParameters.groupName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069.003
| Cloud Groups
| Discovery
|-
| T1098
| Account Manipulation
| Persistence
|-
| T1069
| Permission Groups Discovery
| Discovery
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
This detection will require tuning to provide high fidelity detection capabilties. Tune based on src addresses (corporate offices, VPN terminations) or by groups of users. Not every user with AWS access should have permission to delete groups (least privilege).

====Reference====


* https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/delete-group.html

* https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteGroup.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1098/aws_iam_successful_group_deletion/aws_iam_successful_group_deletion.json


''version'': 1
</div>
</div>

----

===Aws network access control list created with all open ports===
The search looks for AWS CloudTrail events to detect if any network ACLs were created with all the ports open to a specified CIDR.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/007/ T1562.007], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-01-11

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=CreateNetworkAclEntry OR eventName=ReplaceNetworkAclEntry requestParameters.ruleAction=allow requestParameters.egress=false requestParameters.aclProtocol=-1 
| append [search `cloudtrail` eventName=CreateNetworkAclEntry OR eventName=ReplaceNetworkAclEntry requestParameters.ruleAction=allow requestParameters.egress=false requestParameters.aclProtocol!=-1 
| eval port_range=&#39;requestParameters.portRange.to&#39; - &#39;requestParameters.portRange.from&#39; 
| where port_range&gt;1024] 
| fillnull 
| stats count min(_time) as firstTime max(_time) as lastTime by userName userIdentity.principalId eventName requestParameters.ruleAction requestParameters.egress requestParameters.aclProtocol requestParameters.portRange.to requestParameters.portRange.from src userAgent requestParameters.cidrBlock 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `aws_network_access_control_list_created_with_all_open_ports_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_Network_ACL_Activity|AWS Network ACL Activity]]


====How To Implement====
You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS, version 4.4.0 or later, and configure your AWS CloudTrail inputs.

====Required field====

* _time

* eventName

* requestParameters.ruleAction

* requestParameters.egress

* requestParameters.aclProtocol

* requestParameters.portRange.to

* requestParameters.portRange.from

* requestParameters.cidrBlock

* userName

* userIdentity.principalId

* userAgent



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.007
| Disable or Modify Cloud Firewall
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
It&#39;s possible that an admin has created this ACL with all ports open for some legitimate purpose however, this should be scoped and not allowed in production environment.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.007/aws_create_acl/aws_cloudtrail_events.json


''version'': 2
</div>
</div>

----

===Aws network access control list deleted===
Enforcing network-access controls is one of the defensive mechanisms used by cloud administrators to restrict access to a cloud instance. After the attacker has gained control of the AWS console by compromising an admin account, they can delete a network ACL and gain access to the instance from anywhere. This search will query the AWS CloudTrail logs to detect users deleting network ACLs.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/007/ T1562.007], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-01-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=DeleteNetworkAclEntry requestParameters.egress=false 
| fillnull 
| stats count min(_time) as firstTime max(_time) as lastTime by userName userIdentity.principalId eventName requestParameters.egress src userAgent 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `aws_network_access_control_list_deleted_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_Network_ACL_Activity|AWS Network ACL Activity]]


====How To Implement====
You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your AWS CloudTrail inputs.

====Required field====

* _time

* eventName

* requestParameters.egress

* userName

* userIdentity.principalId

* src

* userAgent



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.007
| Disable or Modify Cloud Firewall
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
It&#39;s possible that a user has legitimately deleted a network ACL.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.007/aws_delete_acl/aws_cloudtrail_events.json


''version'': 2
</div>
</div>

----

===Aws saml access by provider user and principal===
This search provides specific SAML access from specific Service Provider, user and targeted principal at AWS. This search provides specific information to detect abnormal access or potential credential hijack or forgery, specially in federated environments using SAML protocol inside the perimeter or cloud provider.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2021-01-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=Assumerolewithsaml 
| stats count min(_time) as firstTime max(_time) as lastTime by requestParameters.principalArn requestParameters.roleArn requestParameters.roleSessionName recipientAccountId responseElements.issuer sourceIPAddress userAgent 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
|`aws_saml_access_by_provider_user_and_principal_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cloud_Federated_Credential_Abuse|Cloud Federated Credential Abuse]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs

====Required field====

* _time

* eventName

* requestParameters.principalArn

* requestParameters.roleArn

* requestParameters.roleSessionName

* recipientAccountId

* responseElements.issuer

* sourceIPAddress

* userAgent



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
Attacks using a Golden SAML or SAML assertion hijacks or forgeries are very difficult to detect as accessing cloud providers with these assertions looks exactly like normal access, however things such as source IP sourceIPAddress user, and principal targeted at receiving cloud provider along with endpoint credential access and abuse detection searches can provide the necessary context to detect these attacks.

====Reference====


* https://us-cert.cisa.gov/ncas/alerts/aa21-008a

* https://www.splunk.com/en_us/blog/security/a-golden-saml-journey-solarwinds-continued.html

* https://www.fireeye.com/content/dam/fireeye-www/blog/pdfs/wp-m-unc2452-2021-000343-01.pdf

* https://www.cyberark.com/resources/threat-research-blog/golden-saml-newly-discovered-attack-technique-forges-authentication-to-cloud-apps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078/assume_role_with_saml/assume_role_with_saml.json


''version'': 1
</div>
</div>

----

===Aws saml update identity provider===
This search provides detection of updates to SAML provider in AWS. Updates to SAML provider need to be monitored closely as they may indicate possible perimeter compromise of federated credentials, or backdoor access from another cloud provider set by attacker.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2021-01-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=UpdateSAMLProvider 
| stats count min(_time) as firstTime max(_time) as lastTime by eventType eventName requestParameters.sAMLProviderArn userIdentity.sessionContext.sessionIssuer.arn sourceIPAddress userIdentity.accessKeyId userIdentity.principalId 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
|`aws_saml_update_identity_provider_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cloud_Federated_Credential_Abuse|Cloud Federated Credential Abuse]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* _time

* eventName

* eventType

* requestParameters.sAMLProviderArn

* userIdentity.sessionContext.sessionIssuer.arn

* sourceIPAddress

* userIdentity.accessKeyId

* userIdentity.principalId



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
Updating a SAML provider or creating a new one may not necessarily be malicious however it needs to be closely monitored.

====Reference====


* https://us-cert.cisa.gov/ncas/alerts/aa21-008a

* https://www.splunk.com/en_us/blog/security/a-golden-saml-journey-solarwinds-continued.html

* https://www.fireeye.com/content/dam/fireeye-www/blog/pdfs/wp-m-unc2452-2021-000343-01.pdf

* https://www.cyberark.com/resources/threat-research-blog/golden-saml-newly-discovered-attack-technique-forges-authentication-to-cloud-apps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078/update_saml_provider/update_saml_provider.json


''version'': 1
</div>
</div>

----

===Aws setdefaultpolicyversion===
This search looks for AWS CloudTrail events where a user has set a default policy versions. Attackers have been know to use this technique for Privilege Escalation in case the previous versions of the policy had permissions to access more resources than the current version of the policy

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/004/ T1078.004], [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2021-03-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=SetDefaultPolicyVersion eventSource = iam.amazonaws.com 
| stats count min(_time) as firstTime max(_time) as lastTime values(requestParameters.policyArn) as policy_arn by src requestParameters.versionId eventName eventSource aws_account_id errorCode userAgent eventID awsRegion userIdentity.principalId user_arn 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `aws_setdefaultpolicyversion_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_IAM_Privilege_Escalation|AWS IAM Privilege Escalation]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* _time

* eventName

* userAgent

* errorCode

* requestParameters.userName

* eventSource



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078.004
| Cloud Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
While this search has no known false positives, it is possible that an AWS admin has legitimately set a default policy to allow a user to access all resources. That said, AWS strongly advises against granting full control to all AWS resources

====Reference====


* https://labs.bishopfox.com/tech-blog/privilege-escalation-in-aws

* https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation-part-2/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078/aws_setdefaultpolicyversion/aws_cloudtrail_events.json


''version'': 1
</div>
</div>

----

===Aws updateloginprofile===
This search looks for AWS CloudTrail events where a user A who has already permission to update login profile, makes an API call to update login profile for another user B . Attackers have been know to use this technique for Privilege Escalation in case new victim(user B) has more permissions than old victim(user B)

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1136/003/ T1136.003], [https://attack.mitre.org/techniques/T1136/ T1136]
* '''Last Updated''': 2021-07-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName = UpdateLoginProfile userAgent !=console.amazonaws.com errorCode = success
| search userIdentity.userName!=requestParameters.userName  
|  stats count min(_time) as firstTime max(_time) as lastTime  by requestParameters.userName src eventName eventSource aws_account_id errorCode userAgent eventID awsRegion userIdentity.userName user_arn 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
|`aws_updateloginprofile_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_IAM_Privilege_Escalation|AWS IAM Privilege Escalation]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* _time

* eventName

* userAgent

* errorCode

* requestParameters.userName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1136.003
| Cloud Account
| Persistence
|-
| T1136
| Create Account
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
While this search has no known false positives, it is possible that an AWS admin has legitimately created keys for another user.

====Reference====


* https://labs.bishopfox.com/tech-blog/privilege-escalation-in-aws

* https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation-part-2/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078/aws_updateloginprofile/aws_cloudtrail_events.json


''version'': 2
</div>
</div>

----

===Abnormally high number of cloud infrastructure api calls===
This search will detect a spike in the number of API calls made to your cloud infrastructure environment by a user.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/004/ T1078.004], [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-09-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats count as api_calls values(All_Changes.command) as command from datamodel=Change where All_Changes.user!=unknown All_Changes.status=success by All_Changes.user _time span=1h 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| eval HourOfDay=strftime(_time, &#34;%H&#34;) 
| eval HourOfDay=floor(HourOfDay/4)*4 
| eval DayOfWeek=strftime(_time, &#34;%w&#34;) 
| eval isWeekend=if(DayOfWeek &gt;= 1 AND DayOfWeek &lt;= 5, 0, 1) 
| join user HourOfDay isWeekend [ summary cloud_excessive_api_calls_v1] 
| where cardinality &gt;=16 
| apply cloud_excessive_api_calls_v1 threshold=0.005 
| rename &#34;IsOutlier(api_calls)&#34; as isOutlier 
| where isOutlier=1 
| eval expected_upper_threshold = mvindex(split(mvindex(BoundaryRanges, -1), &#34;:&#34;), 0) 
| where api_calls &gt; expected_upper_threshold 
| eval distance_from_threshold = api_calls - expected_upper_threshold 
| table _time, user, command, api_calls, expected_upper_threshold, distance_from_threshold 
| `abnormally_high_number_of_cloud_infrastructure_api_calls_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_User_Activities|Suspicious Cloud User Activities]]


====How To Implement====
You must be ingesting your cloud infrastructure logs. You also must run the baseline search `Baseline Of Cloud Infrastructure API Calls Per User` to create the probability density function.

====Required field====

* _time

* All_Changes.command

* All_Changes.user

* All_Changes.status



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078.004
| Cloud Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====


====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Abnormally high number of cloud instances destroyed===
This search finds for the number successfully destroyed cloud instances for every 4 hour block. This is split up between weekdays and the weekend. It then applies the probability densitiy model previously created and alerts on any outliers.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/004/ T1078.004], [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-08-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats count as instances_destroyed values(All_Changes.object_id) as object_id from datamodel=Change where All_Changes.action=deleted AND All_Changes.status=success AND All_Changes.object_category=instance by All_Changes.user _time span=1h 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| eval HourOfDay=strftime(_time, &#34;%H&#34;) 
| eval HourOfDay=floor(HourOfDay/4)*4 
| eval DayOfWeek=strftime(_time, &#34;%w&#34;) 
| eval isWeekend=if(DayOfWeek &gt;= 1 AND DayOfWeek &lt;= 5, 0, 1) 
| join HourOfDay isWeekend [summary cloud_excessive_instances_destroyed_v1] 
| where cardinality &gt;=16 
| apply cloud_excessive_instances_destroyed_v1 threshold=0.005 
| rename &#34;IsOutlier(instances_destroyed)&#34; as isOutlier 
| where isOutlier=1 
| eval expected_upper_threshold = mvindex(split(mvindex(BoundaryRanges, -1), &#34;:&#34;), 0) 
| eval distance_from_threshold = instances_destroyed - expected_upper_threshold 
| table _time, user, instances_destroyed, expected_upper_threshold, distance_from_threshold, object_id 
| `abnormally_high_number_of_cloud_instances_destroyed_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Instance_Activities|Suspicious Cloud Instance Activities]]


====How To Implement====
You must be ingesting your cloud infrastructure logs. You also must run the baseline search `Baseline Of Cloud Instances Destroyed` to create the probability density function.

====Required field====

* _time

* All_Changes.object_id

* All_Changes.action

* All_Changes.status

* All_Changes.object_category

* All_Changes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078.004
| Cloud Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Many service accounts configured within a cloud infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify if this search alerted on a human user.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Abnormally high number of cloud instances launched===
This search finds for the number successfully created cloud instances for every 4 hour block. This is split up between weekdays and the weekend. It then applies the probability densitiy model previously created and alerts on any outliers.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/004/ T1078.004], [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-08-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats count as instances_launched values(All_Changes.object_id) as object_id from datamodel=Change where (All_Changes.action=created) AND All_Changes.status=success AND All_Changes.object_category=instance by All_Changes.user _time span=1h 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| eval HourOfDay=strftime(_time, &#34;%H&#34;) 
| eval HourOfDay=floor(HourOfDay/4)*4 
| eval DayOfWeek=strftime(_time, &#34;%w&#34;) 
| eval isWeekend=if(DayOfWeek &gt;= 1 AND DayOfWeek &lt;= 5, 0, 1) 
| join HourOfDay isWeekend [summary cloud_excessive_instances_created_v1] 
| where cardinality &gt;=16 
| apply cloud_excessive_instances_created_v1 threshold=0.005 
| rename &#34;IsOutlier(instances_launched)&#34; as isOutlier 
| where isOutlier=1 
| eval expected_upper_threshold = mvindex(split(mvindex(BoundaryRanges, -1), &#34;:&#34;), 0) 
| eval distance_from_threshold = instances_launched - expected_upper_threshold 
| table _time, user, instances_launched, expected_upper_threshold, distance_from_threshold, object_id 
| `abnormally_high_number_of_cloud_instances_launched_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cloud_Cryptomining|Cloud Cryptomining]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Instance_Activities|Suspicious Cloud Instance Activities]]


====How To Implement====
You must be ingesting your cloud infrastructure logs. You also must run the baseline search `Baseline Of Cloud Instances Launched` to create the probability density function.

====Required field====

* _time

* All_Changes.object_id

* All_Changes.action

* All_Changes.status

* All_Changes.object_category

* All_Changes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078.004
| Cloud Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Many service accounts configured within an AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify if this search alerted on a human user.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Abnormally high number of cloud security group api calls===
This search will detect a spike in the number of API calls made to your cloud infrastructure environment about security groups by a user.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/004/ T1078.004], [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-09-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats count as security_group_api_calls values(All_Changes.command) as command from datamodel=Change where All_Changes.object_category=firewall AND All_Changes.status=success by All_Changes.user _time span=1h 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| eval HourOfDay=strftime(_time, &#34;%H&#34;) 
| eval HourOfDay=floor(HourOfDay/4)*4 
| eval DayOfWeek=strftime(_time, &#34;%w&#34;) 
| eval isWeekend=if(DayOfWeek &gt;= 1 AND DayOfWeek &lt;= 5, 0, 1) 
| join user HourOfDay isWeekend [ summary cloud_excessive_security_group_api_calls_v1] 
| where cardinality &gt;=16 
| apply cloud_excessive_security_group_api_calls_v1 threshold=0.005 
| rename &#34;IsOutlier(security_group_api_calls)&#34; as isOutlier 
| where isOutlier=1 
| eval expected_upper_threshold = mvindex(split(mvindex(BoundaryRanges, -1), &#34;:&#34;), 0) 
| where security_group_api_calls &gt; expected_upper_threshold 
| eval distance_from_threshold = security_group_api_calls - expected_upper_threshold 
| table _time, user, command, security_group_api_calls, expected_upper_threshold, distance_from_threshold 
| `abnormally_high_number_of_cloud_security_group_api_calls_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_User_Activities|Suspicious Cloud User Activities]]


====How To Implement====
You must be ingesting your cloud infrastructure logs. You also must run the baseline search `Baseline Of Cloud Security Group API Calls Per User` to create the probability density function model.

====Required field====

* _time

* All_Changes.command

* All_Changes.object_category

* All_Changes.status

* All_Changes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078.004
| Cloud Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====


====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Amazon eks kubernetes pod scan detection===
This search provides detection information on unauthenticated requests against Kubernetes&#39; Pods API

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1526/ T1526]
* '''Last Updated''': 2020-04-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`aws_cloudwatchlogs_eks` &#34;user.username&#34;=&#34;system:anonymous&#34; verb=list objectRef.resource=pods requestURI=&#34;/api/v1/pods&#34; 
| rename source as cluster_name sourceIPs{} as src_ip 
| stats count min(_time) as firstTime max(_time) as lastTime values(responseStatus.reason) values(responseStatus.code) values(userAgent) values(verb) values(requestURI) by src_ip cluster_name user.username user.groups{} 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `amazon_eks_kubernetes_pod_scan_detection_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Kubernetes_Scanning_Activity|Kubernetes Scanning Activity]]


====How To Implement====
You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on forAWS (version 4.4.0 or later), then configure your AWS CloudWatch EKS Logs.Please also customize the `kubernetes_pods_aws_scan_fingerprint_detection` macro to filter out the false positives.

====Required field====

* _time

* user.username

* verb

* objectRef.resource

* requestURI

* source

* sourceIPs{}

* responseStatus.reason

* responseStatus.code

* userAgent

* src_ip

* user.groups{}



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1526
| Cloud Service Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Not all unauthenticated requests are malicious, but frequency, UA and source IPs and direct request to API provide context.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Amazon eks kubernetes cluster scan detection===
This search provides information of unauthenticated requests via user agent, and authentication data against Kubernetes cluster in AWS

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1526/ T1526]
* '''Last Updated''': 2020-04-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`aws_cloudwatchlogs_eks` &#34;user.username&#34;=&#34;system:anonymous&#34; userAgent!=&#34;AWS Security Scanner&#34; 
| rename sourceIPs{} as src_ip 
| stats count min(_time) as firstTime max(_time) as lastTime values(responseStatus.reason) values(source) as cluster_name values(responseStatus.code) values(userAgent) as http_user_agent values(verb) values(requestURI) by src_ip user.username user.groups{} 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
|`amazon_eks_kubernetes_cluster_scan_detection_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Kubernetes_Scanning_Activity|Kubernetes Scanning Activity]]


====How To Implement====
You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudWatch EKS Logs inputs.

====Required field====

* _time

* user.username

* userAgent

* sourceIPs{}

* responseStatus.reason

* source

* responseStatus.code

* verb

* requestURI

* src_ip

* user.groups{}



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1526
| Cloud Service Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Not all unauthenticated requests are malicious, but frequency, UA and source IPs will provide context.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Circle ci disable security job===
This search looks for disable security job in CircleCI pipeline.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1554/ T1554]
* '''Last Updated''': 2021-09-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`circleci` 
| rename vcs.committer_name as user vcs.subject as commit_message vcs.url as url workflows.* as *  
| stats values(job_name) as job_names by workflow_id workflow_name user commit_message url branch 
| lookup mandatory_job_for_workflow workflow_name OUTPUTNEW job_name AS mandatory_job 
| search mandatory_job=* 
| eval mandatory_job_executed=if(like(job_names, &#34;%&#34;.mandatory_job.&#34;%&#34;), 1, 0) 
| where mandatory_job_executed=0 
| eval phase=&#34;build&#34; 
| rex field=url &#34;(?&lt;repository&gt;[^\/]*\/[^\/]*)$&#34; 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `circle_ci_disable_security_job_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must index CircleCI logs.

====Required field====

* _times



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1554
| Compromise Client Software Binary
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1554/circle_ci_disable_security_job/circle_ci_disable_security_job.json


''version'': 1
</div>
</div>

----

===Circle ci disable security step===
This search looks for disable security step in CircleCI pipeline.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1554/ T1554]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`circleci` 
| rename workflows.job_id AS job_id 
| join job_id [ 
| search `circleci` 
| stats values(name) as step_names count by job_id job_name ] 
| stats count by step_names job_id job_name vcs.committer_name vcs.subject vcs.url owners{} 
| rename vcs.* as * , owners{} as user 
| lookup mandatory_step_for_job job_name OUTPUTNEW step_name AS mandatory_step 
| search mandatory_step=* 
| eval mandatory_step_executed=if(like(step_names, &#34;%&#34;.mandatory_step.&#34;%&#34;), 1, 0) 
| where mandatory_step_executed=0 
| rex field=url &#34;(?&lt;repository&gt;[^\/]*\/[^\/]*)$&#34; 
| eval phase=&#34;build&#34;  
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `circle_ci_disable_security_step_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must index CircleCI logs.

====Required field====

* _times



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1554
| Compromise Client Software Binary
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1554/circle_ci_disable_security_step/circle_ci_disable_security_step.json


''version'': 1
</div>
</div>

----

===Cloud api calls from previously unseen user roles===
This search looks for new commands from each user role.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-09-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where All_Changes.user_type=AssumedRole AND All_Changes.status=success by All_Changes.user, All_Changes.command All_Changes.object 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| lookup previously_seen_cloud_api_calls_per_user_role user as user, command as command OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenUserApiCall=min(firstTimeSeen) 
| where isnull(firstTimeSeenUserApiCall) OR firstTimeSeenUserApiCall &gt; relative_time(now(),&#34;-24h@h&#34;) 
| table firstTime, user, object, command 
|`security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `cloud_api_calls_from_previously_unseen_user_roles_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_User_Activities|Suspicious Cloud User Activities]]


====How To Implement====
You must be ingesting your cloud infrastructure logs from your cloud provider.  You should run the baseline search `Previously Seen Cloud API Calls Per User Role - Initial` to build the initial table of user roles, commands, and times. You must also enable the second baseline search `Previously Seen Cloud API Calls Per User Role - Update` to keep this table up to date and to age out old data. You can adjust the time window for this search by updating the `cloud_api_calls_from_previously_unseen_user_roles_activity_window` macro. You can also provide additional filtering for this search by customizing the `cloud_api_calls_from_previously_unseen_user_roles_filter`

====Required field====

* _time

* All_Changes.user

* All_Changes.user_type

* All_Changes.status

* All_Changes.command

* All_Changes.object



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Cloud compute instance created by previously unseen user===
This search looks for cloud compute instances created by users who have not created them before.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/004/ T1078.004], [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2021-07-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count earliest(_time) as firstTime, latest(_time) as lastTime values(All_Changes.object) as dest from datamodel=Change where All_Changes.action=created by All_Changes.user All_Changes.vendor_region 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| lookup previously_seen_cloud_compute_creations_by_user user as user OUTPUTNEW firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenUser=min(firstTimeSeen) 
| where isnull(firstTimeSeenUser) OR firstTimeSeenUser &gt; relative_time(now(), &#34;-24h@h&#34;) 
| table firstTime, user, dest, count vendor_region 
| `security_content_ctime(firstTime)` 
| `cloud_compute_instance_created_by_previously_unseen_user_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cloud_Cryptomining|Cloud Cryptomining]]


====How To Implement====
You must be ingesting the appropriate cloud-infrastructure logs Run the &#34;Previously Seen Cloud Compute Creations By User&#34; support search to create of baseline of previously seen users.

====Required field====

* _time

* All_Changes.object

* All_Changes.action

* All_Changes.user

* All_Changes.vendor_region



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078.004
| Cloud Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
It&#39;s possible that a user will start to create compute instances for the first time, for any number of reasons. Verify with the user launching instances that this is the intended behavior.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 2
</div>
</div>

----

===Cloud compute instance created in previously unused region===
This search looks at cloud-infrastructure events where an instance is created in any region within the last hour and then compares it to a lookup file of previously seen regions where instances have been created.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1535/ T1535]
* '''Last Updated''': 2020-09-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats earliest(_time) as firstTime latest(_time) as lastTime values(All_Changes.object_id) as dest, count from datamodel=Change where All_Changes.action=created by All_Changes.vendor_region, All_Changes.user 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| lookup previously_seen_cloud_regions vendor_region as vendor_region OUTPUTNEW firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenRegion=min(firstTimeSeen) 
| where isnull(firstTimeSeenRegion) OR firstTimeSeenRegion &gt; relative_time(now(), &#34;-24h@h&#34;) 
| table firstTime, user, dest, count , vendor_region 
| `security_content_ctime(firstTime)` 
| `cloud_compute_instance_created_in_previously_unused_region_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cloud_Cryptomining|Cloud Cryptomining]]


====How To Implement====
You must be ingesting your cloud infrastructure logs from your cloud provider. You should run the baseline search `Previously Seen Cloud Regions - Initial` to build the initial table of images observed and times. You must also enable the second baseline search `Previously Seen Cloud Regions - Update` to keep this table up to date and to age out old data. You can also provide additional filtering for this search by customizing the `cloud_compute_instance_created_in_previously_unused_region_filter` macro.

====Required field====

* _time

* All_Changes.object_id

* All_Changes.action

* All_Changes.vendor_region

* All_Changes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1535
| Unused/Unsupported Cloud Regions
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
It&#39;s possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Cloud compute instance created with previously unseen image===
This search looks for cloud compute instances being created with previously unseen image IDs.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': 
* '''Last Updated''': 2018-10-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats count earliest(_time) as firstTime, latest(_time) as lastTime values(All_Changes.object_id) as dest from datamodel=Change where All_Changes.action=created by All_Changes.Instance_Changes.image_id, All_Changes.user 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| `drop_dm_object_name(&#34;Instance_Changes&#34;)` 
| where image_id != &#34;unknown&#34; 
| lookup previously_seen_cloud_compute_images image_id as image_id OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenImage=min(firstTimeSeen) 
| where isnull(firstTimeSeenImage) OR firstTimeSeenImage &gt; relative_time(now(), &#34;-24h@h&#34;) 
| table firstTime, user, image_id, count, dest 
| `security_content_ctime(firstTime)` 
| `cloud_compute_instance_created_with_previously_unseen_image_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cloud_Cryptomining|Cloud Cryptomining]]


====How To Implement====
You must be ingesting your cloud infrastructure logs from your cloud provider. You should run the baseline search `Previously Seen Cloud Compute Images - Initial` to build the initial table of images observed and times. You must also enable the second baseline search `Previously Seen Cloud Compute Images - Update` to keep this table up to date and to age out old data. You can also provide additional filtering for this search by customizing the `cloud_compute_instance_created_with_previously_unseen_image_filter` macro.

====Required field====

* _time

* All_Changes.object_id

* All_Changes.action

* All_Changes.Instance_Changes.image_id

* All_Changes.user




====Kill Chain Phase====


====Known False Positives====
After a new image is created, the first systems created with that image will cause this alert to fire.  Verify that the image being used was created by a legitimate user.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Cloud compute instance created with previously unseen instance type===
Find EC2 instances being created with previously unseen instance types.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': 
* '''Last Updated''': 2020-09-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats earliest(_time) as firstTime, latest(_time) as lastTime values(All_Changes.object_id) as dest, count from datamodel=Change where All_Changes.action=created by All_Changes.Instance_Changes.instance_type, All_Changes.user 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| `drop_dm_object_name(&#34;Instance_Changes&#34;)` 
| where instance_type != &#34;unknown&#34; 
| lookup previously_seen_cloud_compute_instance_types instance_type as instance_type OUTPUTNEW firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenInstanceType=min(firstTimeSeen) 
| where isnull(firstTimeSeenInstanceType) OR firstTimeSeenInstanceType &gt; relative_time(now(), &#34;-24h@h&#34;) 
| table firstTime, user, dest, count, instance_type 
| `security_content_ctime(firstTime)` 
| `cloud_compute_instance_created_with_previously_unseen_instance_type_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cloud_Cryptomining|Cloud Cryptomining]]


====How To Implement====
You must be ingesting your cloud infrastructure logs from your cloud provider. You should run the baseline search `Previously Seen Cloud Compute Instance Types - Initial` to build the initial table of instance types observed and times. You must also enable the second baseline search `Previously Seen Cloud Compute Instance Types - Update` to keep this table up to date and to age out old data. You can also provide additional filtering for this search by customizing the `cloud_compute_instance_created_with_previously_unseen_instance_type_filter` macro.

====Required field====

* _time

* All_Changes.object_id

* All_Changes.action

* All_Changes.Instance_Changes.instance_type

* All_Changes.user




====Kill Chain Phase====


====Known False Positives====
It is possible that an admin will create a new system using a new instance type that has never been used before. Verify with the creator that they intended to create the system with the new instance type.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Cloud instance modified by previously unseen user===
This search looks for cloud instances being modified by users who have not previously modified them.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/004/ T1078.004], [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-07-29

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count earliest(_time) as firstTime, latest(_time) as lastTime values(All_Changes.object_id) as object_id values(All_Changes.command) as command from datamodel=Change where All_Changes.action=modified All_Changes.change_type=EC2 All_Changes.status=success by All_Changes.user 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| lookup previously_seen_cloud_instance_modifications_by_user user as user OUTPUTNEW firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenUser=min(firstTimeSeen) 
| where isnull(firstTimeSeenUser) OR firstTimeSeenUser &gt; relative_time(now(), &#34;-24h@h&#34;) 
| table firstTime user command object_id count 
| `security_content_ctime(firstTime)` 
| `cloud_instance_modified_by_previously_unseen_user_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Instance_Activities|Suspicious Cloud Instance Activities]]


====How To Implement====
This search has a dependency on other searches to create and update a baseline of users observed to be associated with this activity. The search &#34;Previously Seen Cloud Instance Modifications By User - Update&#34; should be enabled for this detection to properly work.

====Required field====

* _time

* All_Changes.object_id

* All_Changes.command

* All_Changes.action

* All_Changes.change_type

* All_Changes.status

* All_Changes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078.004
| Cloud Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
It&#39;s possible that a new user will start to modify EC2 instances when they haven&#39;t before for any number of reasons. Verify with the user that is modifying instances that this is the intended behavior.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Cloud provisioning activity from previously unseen city===
This search looks for cloud provisioning activities from previously unseen cities. Provisioning activities are defined broadly as any event that runs or creates something.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-10-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| iplocation src 
| where isnotnull(City) 
| lookup previously_seen_cloud_provisioning_activity_sources City as City OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenCity=min(firstTimeSeen) 
| where isnull(firstTimeSeenCity) OR firstTimeSeenCity &gt; relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, City, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_city_filter` 
| `security_content_ctime(firstTime)`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Provisioning_Activities|Suspicious Cloud Provisioning Activities]]


====How To Implement====
You must be ingesting your cloud infrastructure logs from your cloud provider.  You should run the baseline search `Previously Seen Cloud Provisioning Activity Sources - Initial` to build the initial table of source IP address, geographic locations, and times. You must also enable the second baseline search `Previously Seen Cloud Provisioning Activity Sources - Update` to keep this table up to date and to age out old data. You can adjust the time window for this search by updating the `previously_unseen_cloud_provisioning_activity_window` macro. You can also provide additional filtering for this search by customizing the `cloud_provisioning_activity_from_previously_unseen_city_filter` macro.

====Required field====

* _time

* All_Changes.action

* All_Changes.status

* All_Changes.src

* All_Changes.user

* All_Changes.object

* All_Changes.command



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
This is a strictly behavioral search, so we define &#34;false positive&#34; slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you&#39;re searching within, plus what is stored in the cache feature. But while there are really no &#34;false positives&#34; in a traditional sense, there is definitely lots of noise.\
 This search will fire any time a new IP address is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your country, there should be few false positives. If you are located in countries where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Cloud provisioning activity from previously unseen country===
This search looks for cloud provisioning activities from previously unseen countries. Provisioning activities are defined broadly as any event that runs or creates something.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-10-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| iplocation src 
| where isnotnull(Country) 
| lookup previously_seen_cloud_provisioning_activity_sources Country as Country OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenCountry=min(firstTimeSeen) 
| where isnull(firstTimeSeenCountry) OR firstTimeSeenCountry &gt; relative_time(now(), &#34;-24h@h&#34;) 
| table firstTime, src, Country, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_country_filter` 
| `security_content_ctime(firstTime)`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Provisioning_Activities|Suspicious Cloud Provisioning Activities]]


====How To Implement====
You must be ingesting your cloud infrastructure logs from your cloud provider.  You should run the baseline search `Previously Seen Cloud Provisioning Activity Sources - Initial` to build the initial table of source IP address, geographic locations, and times. You must also enable the second baseline search `Previously Seen Cloud Provisioning Activity Sources - Update` to keep this table up to date and to age out old data. You can adjust the time window for this search by updating the `previously_unseen_cloud_provisioning_activity_window` macro. You can also provide additional filtering for this search by customizing the `cloud_provisioning_activity_from_previously_unseen_country_filter` macro.

====Required field====

* _time

* All_Changes.action

* All_Changes.status

* All_Changes.src

* All_Changes.user

* All_Changes.object

* All_Changes.command



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
This is a strictly behavioral search, so we define &#34;false positive&#34; slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you&#39;re searching within, plus what is stored in the cache feature. But while there are really no &#34;false positives&#34; in a traditional sense, there is definitely lots of noise.\
 This search will fire any time a new IP address is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your country, there should be few false positives. If you are located in countries where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Cloud provisioning activity from previously unseen ip address===
This search looks for cloud provisioning activities from previously unseen IP addresses. Provisioning activities are defined broadly as any event that runs or creates something.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-08-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats earliest(_time) as firstTime, latest(_time) as lastTime, values(All_Changes.object_id) as object_id from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.command 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| lookup previously_seen_cloud_provisioning_activity_sources src as src OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenSrc=min(firstTimeSeen) 
| where isnull(firstTimeSeenSrc) OR firstTimeSeenSrc &gt; relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, user, object_id, command 
| `cloud_provisioning_activity_from_previously_unseen_ip_address_filter` 
| `security_content_ctime(firstTime)`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Provisioning_Activities|Suspicious Cloud Provisioning Activities]]


====How To Implement====
You must be ingesting your cloud infrastructure logs from your cloud provider.  You should run the baseline search `Previously Seen Cloud Provisioning Activity Sources - Initial` to build the initial table of source IP address, geographic locations, and times. You must also enable the second baseline search `Previously Seen Cloud Provisioning Activity Sources - Update` to keep this table up to date and to age out old data. You can adjust the time window for this search by updating the `previously_unseen_cloud_provisioning_activity_window` macro. You can also provide additional filtering for this search by customizing the `cloud_provisioning_activity_from_previously_unseen_ip_address_filter` macro.

====Required field====

* _time

* All_Changes.object_id

* All_Changes.action

* All_Changes.status

* All_Changes.src

* All_Changes.user

* All_Changes.command



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
This is a strictly behavioral search, so we define &#34;false positive&#34; slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you&#39;re searching within, plus what is stored in the cache feature. But while there are really no &#34;false positives&#34; in a traditional sense, there is definitely lots of noise.\
 This search will fire any time a new IP address is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your country, there should be few false positives. If you are located in countries where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Cloud provisioning activity from previously unseen region===
This search looks for cloud provisioning activities from previously unseen regions. Provisioning activities are defined broadly as any event that runs or creates something.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-08-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change where (All_Changes.action=started OR All_Changes.action=created) All_Changes.status=success by All_Changes.src, All_Changes.user, All_Changes.object, All_Changes.command 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| iplocation src 
| where isnotnull(Region) 
| lookup previously_seen_cloud_provisioning_activity_sources Region as Region OUTPUT firstTimeSeen, enough_data 
| eventstats max(enough_data) as enough_data 
| where enough_data=1 
| eval firstTimeSeenRegion=min(firstTimeSeen) 
| where isnull(firstTimeSeenRegion) OR firstTimeSeenRegion &gt; relative_time(now(), `previously_unseen_cloud_provisioning_activity_window`) 
| table firstTime, src, Region, user, object, command 
| `cloud_provisioning_activity_from_previously_unseen_region_filter` 
| `security_content_ctime(firstTime)`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Provisioning_Activities|Suspicious Cloud Provisioning Activities]]


====How To Implement====
You must be ingesting your cloud infrastructure logs from your cloud provider.  You should run the baseline search `Previously Seen Cloud Provisioning Activity Sources - Initial` to build the initial table of source IP address, geographic locations, and times. You must also enable the second baseline search `Previously Seen Cloud Provisioning Activity Sources - Update` to keep this table up to date and to age out old data. You can adjust the time window for this search by updating the `previously_unseen_cloud_provisioning_activity_window` macro. You can also provide additional filtering for this search by customizing the `cloud_provisioning_activity_from_previously_unseen_region_filter` macro.

====Required field====

* _time

* All_Changes.action

* All_Changes.status

* All_Changes.src

* All_Changes.user

* All_Changes.object

* All_Changes.command



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
This is a strictly behavioral search, so we define &#34;false positive&#34; slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you&#39;re searching within, plus what is stored in the cache feature. But while there are really no &#34;false positives&#34; in a traditional sense, there is definitely lots of noise.\
 This search will fire any time a new IP address is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your country, there should be few false positives. If you are located in countries where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Correlation by repository and risk===
This search correlations detections by repository and risk_score

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/003/ T1204.003], [https://attack.mitre.org/techniques/T1204/ T1204]
* '''Last Updated''': 2021-09-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`signals` 
| fillnull 
| stats sum(risk_score) as risk_score values(source) as signals values(user) as user by repository 
| sort - risk_score 
| where risk_score &gt; 80 
| `correlation_by_repository_and_risk_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
For Dev Sec Ops POC

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204.003
| Malicious Image
| Execution
|-
| T1204
| User Execution
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Correlation by user and risk===
This search correlations detections by user and risk_score

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/003/ T1204.003], [https://attack.mitre.org/techniques/T1204/ T1204]
* '''Last Updated''': 2021-09-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`signals` 
| fillnull 
| stats sum(risk_score) as risk_score values(source) as signals values(repository) as repository by user 
| sort - risk_score 
| where risk_score &gt; 80 
| `correlation_by_user_and_risk_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
For Dev Sec Ops POC

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204.003
| Malicious Image
| Execution
|-
| T1204
| User Execution
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect aws console login by new user===
This search looks for AWS CloudTrail events wherein a console login event by a user was recorded within the last hour, then compares the event to a lookup file of previously seen users (by ARN values) who have logged into the console. The alert is fired if the user has logged into the console for the first time within the last hour

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Authentication
* '''ATT&CK''': 
* '''Last Updated''': 2020-05-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats earliest(_time) as firstTime latest(_time) as lastTime from datamodel=Authentication where Authentication.signature=ConsoleLogin by Authentication.user 
| `drop_dm_object_name(Authentication)` 
| inputlookup append=t previously_seen_users_console_logins 
| stats min(firstTime) as firstTime max(lastTime) as lastTime by user 
| eval userStatus=if(firstTime &gt;=relative_time(now(),&#34;-24h@h&#34;), &#34;First Time Logging into AWS Console&#34;, &#34;Previously Seen User&#34;) 
|where userStatus=&#34;First Time Logging into AWS Console&#34; 
|  `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `detect_aws_console_login_by_new_user_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Authentication_Activities|Suspicious Cloud Authentication Activities]]


====How To Implement====
You must install and configure the Splunk Add-on for AWS (version 5.1.0 or later) and Enterprise Security 6.2, which contains the required updates to the Authentication data model for cloud use cases. Run the `Previously Seen Users in AWS CloudTrail - Initial` support search only once to create a baseline of previously seen IAM users within the last 30 days. Run `Previously Seen Users in AWS CloudTrail - Update` hourly (or more frequently depending on how often you run the detection searches) to refresh the baselines.

====Required field====

* _time

* Authentication.signature

* Authentication.user




====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Detect aws console login by user from new city===
This search looks for AWS CloudTrail events wherein a console login event by a user was recorded within the last hour, then compares the event to a lookup file of previously seen users (by ARN values) who have logged into the console. The alert is fired if the user has logged into the console for the first time within the last hour

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Authentication
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1535/ T1535]
* '''Last Updated''': 2020-10-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats earliest(_time) as firstTime latest(_time) as lastTime from datamodel=Authentication where Authentication.signature=ConsoleLogin by Authentication.user Authentication.src 
| iplocation Authentication.src 
| `drop_dm_object_name(Authentication)` 
| table firstTime lastTime user City 
| join user  type=outer [
| inputlookup previously_seen_users_console_logins 
| stats earliest(firstTime) AS earliestseen by user City 
| fields earliestseen user City] 
| eval userCity=if(firstTime &gt;= relative_time(now(), &#34;-24h@h&#34;), &#34;New City&#34;,&#34;Previously Seen City&#34;) 
| eval userStatus=if(earliestseen &gt;= relative_time(now(), &#34;-24h@h&#34;) OR isnull(earliestseen), &#34;New User&#34;,&#34;Old User&#34;) 
| where userCity = &#34;New City&#34; AND userStatus != &#34;Old User&#34; 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| table firstTime lastTime user City  userStatus userCity  
| `detect_aws_console_login_by_user_from_new_city_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_AWS_Login_Activities|Suspicious AWS Login Activities]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Authentication_Activities|Suspicious Cloud Authentication Activities]]


====How To Implement====
You must install and configure the Splunk Add-on for AWS (version 5.1.0 or later) and Enterprise Security 6.2, which contains the required updates to the Authentication data model for cloud use cases. Run the `Previously Seen Users in AWS CloudTrail - Initial` support search only once to create a baseline of previously seen IAM users within the last 30 days. Run `Previously Seen Users in AWS CloudTrail - Update` hourly (or more frequently depending on how often you run the detection searches) to refresh the baselines. You can also provide additional filtering for this search by customizing the `detect_aws_console_login_by_user_from_new_city_filter` macro.

====Required field====

* _time

* Authentication.signature

* Authentication.user

* Authentication.src



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1535
| Unused/Unsupported Cloud Regions
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Detect aws console login by user from new country===
This search looks for AWS CloudTrail events wherein a console login event by a user was recorded within the last hour, then compares the event to a lookup file of previously seen users (by ARN values) who have logged into the console. The alert is fired if the user has logged into the console for the first time within the last hour

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Authentication
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1535/ T1535]
* '''Last Updated''': 2020-10-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats earliest(_time) as firstTime latest(_time) as lastTime from datamodel=Authentication where Authentication.signature=ConsoleLogin by Authentication.user Authentication.src 
| iplocation Authentication.src 
| `drop_dm_object_name(Authentication)` 
| table firstTime lastTime user Country 
| join user  type=outer [
| inputlookup previously_seen_users_console_logins 
| stats earliest(firstTime) AS earliestseen by user Country 
| fields earliestseen user Country] 
| eval userCountry=if(firstTime &gt;= relative_time(now(), &#34;-24h@h&#34;), &#34;New Country&#34;,&#34;Previously Seen Country&#34;) 
| eval userStatus=if(earliestseen &gt;= relative_time(now(),&#34;-24h@h&#34;) OR isnull(earliestseen), &#34;New User&#34;,&#34;Old User&#34;) 
| where userCountry = &#34;New Country&#34; AND userStatus != &#34;Old User&#34; 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| table firstTime lastTime user Country  userStatus userCountry  
| `detect_aws_console_login_by_user_from_new_country_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_AWS_Login_Activities|Suspicious AWS Login Activities]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Authentication_Activities|Suspicious Cloud Authentication Activities]]


====How To Implement====
You must install and configure the Splunk Add-on for AWS (version 5.1.0 or later) and Enterprise Security 6.2, which contains the required updates to the Authentication data model for cloud use cases. Run the `Previously Seen Users in AWS CloudTrail - Initial` support search only once to create a baseline of previously seen IAM users within the last 30 days. Run `Previously Seen Users in AWS CloudTrail - Update` hourly (or more frequently depending on how often you run the detection searches) to refresh the baselines. You can also provide additional filtering for this search by customizing the `detect_aws_console_login_by_user_from_new_country_filter` macro.

====Required field====

* _time

* Authentication.signature

* Authentication.user

* Authentication.src



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1535
| Unused/Unsupported Cloud Regions
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Detect aws console login by user from new region===
This search looks for AWS CloudTrail events wherein a console login event by a user was recorded within the last hour, then compares the event to a lookup file of previously seen users (by ARN values) who have logged into the console. The alert is fired if the user has logged into the console for the first time within the last hour

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Authentication
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1535/ T1535]
* '''Last Updated''': 2020-10-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats earliest(_time) as firstTime latest(_time) as lastTime from datamodel=Authentication where Authentication.signature=ConsoleLogin by Authentication.user Authentication.src 
| iplocation Authentication.src 
| `drop_dm_object_name(Authentication)` 
| table firstTime lastTime user Region 
| join user  type=outer [
| inputlookup previously_seen_users_console_logins 
| stats earliest(firstTime) AS earliestseen by user Region 
| fields earliestseen user Region] 
| eval userRegion=if(firstTime &gt;= relative_time(now(), &#34;-24h@h&#34;), &#34;New Region&#34;,&#34;Previously Seen Region&#34;) 
| eval userStatus=if(earliestseen &gt;= relative_time(now(), &#34;-24h@h&#34;) OR isnull(earliestseen), &#34;New User&#34;,&#34;Old User&#34;) 
| where userRegion = &#34;New Region&#34; AND userStatus != &#34;Old User&#34; 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| table firstTime lastTime user Region  userStatus userRegion  
| `detect_aws_console_login_by_user_from_new_region_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_AWS_Login_Activities|Suspicious AWS Login Activities]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Authentication_Activities|Suspicious Cloud Authentication Activities]]


====How To Implement====
You must install and configure the Splunk Add-on for AWS (version 5.1.0 or later) and Enterprise Security 6.2, which contains the required updates to the Authentication data model for cloud use cases. Run the `Previously Seen Users in AWS CloudTrail - Initial` support search only once to create a baseline of previously seen IAM users within the last 30 days. Run `Previously Seen Users in AWS CloudTrail - Update` hourly (or more frequently depending on how often you run the detection searches) to refresh the baselines. You can also provide additional filtering for this search by customizing the `detect_aws_console_login_by_user_from_new_region_filter` macro.

====Required field====

* _time

* Authentication.signature

* Authentication.user

* Authentication.src



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1535
| Unused/Unsupported Cloud Regions
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/abnormally_high_cloud_instances_launched/cloudtrail_behavioural_detections.json


''version'': 1
</div>
</div>

----

===Detect gcp storage access from a new ip===
This search looks at GCP Storage bucket-access logs and detects new or previously unseen remote IP addresses that have successfully accessed a GCP Storage bucket.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1530/ T1530]
* '''Last Updated''': 2020-08-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`google_gcp_pubsub_message` 
| multikv 
| rename sc_status_ as status 
| rename cs_object_ as bucket_name 
| rename c_ip_ as remote_ip 
| rename cs_uri_ as request_uri 
| rename cs_method_ as operation 
| search status=&#34;\&#34;200\&#34;&#34; 
| stats earliest(_time) as firstTime latest(_time) as lastTime by bucket_name remote_ip operation request_uri 
| table firstTime, lastTime, bucket_name, remote_ip, operation, request_uri 
| inputlookup append=t previously_seen_gcp_storage_access_from_remote_ip.csv 
| stats min(firstTime) as firstTime, max(lastTime) as lastTime by bucket_name remote_ip operation request_uri 
| outputlookup previously_seen_gcp_storage_access_from_remote_ip.csv 
| eval newIP=if(firstTime &gt;= relative_time(now(),&#34;-70m@m&#34;), 1, 0) 
| where newIP=1 
| eval first_time=strftime(firstTime,&#34;%m/%d/%y %H:%M:%S&#34;) 
| eval last_time=strftime(lastTime,&#34;%m/%d/%y %H:%M:%S&#34;) 
| table  first_time last_time bucket_name remote_ip operation request_uri 
| `detect_gcp_storage_access_from_a_new_ip_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_GCP_Storage_Activities|Suspicious GCP Storage Activities]]


====How To Implement====
This search relies on the Splunk Add-on for Google Cloud Platform, setting up a Cloud Pub/Sub input, along with the relevant GCP PubSub topics and logging sink to capture GCP Storage Bucket events (https://cloud.google.com/logging/docs/routing/overview). In order to capture public GCP Storage Bucket access logs, you must also enable storage bucket logging to your PubSub Topic as per https://cloud.google.com/storage/docs/access-logs.  These logs are deposited into the nominated Storage Bucket on an hourly basis and typically show up by 15 minutes past the hour.  It is recommended to configure any saved searches or correlation searches in Enterprise Security to run on an hourly basis at 30 minutes past the hour (cron definition of 30 * * * *).  A lookup table (previously_seen_gcp_storage_access_from_remote_ip.csv) stores the previously seen access requests, and is used by this search to determine any newly seen IP addresses accessing the Storage Buckets.

====Required field====

* _time

* sc_status_

* cs_object_

* c_ip_

* cs_uri_

* cs_method_



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1530
| Data from Cloud Storage Object
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
GCP Storage buckets can be accessed from any IP (if the ACLs are open to allow it), as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past two hours.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect new open gcp storage buckets===
This search looks for GCP PubSub events where a user has created an open/public GCP Storage bucket.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1530/ T1530]
* '''Last Updated''': 2020-08-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`google_gcp_pubsub_message` data.resource.type=gcs_bucket data.protoPayload.methodName=storage.setIamPermissions 
| spath output=action path=data.protoPayload.serviceData.policyDelta.bindingDeltas{}.action 
| spath output=user path=data.protoPayload.authenticationInfo.principalEmail 
| spath output=location path=data.protoPayload.resourceLocation.currentLocations{} 
| spath output=src path=data.protoPayload.requestMetadata.callerIp 
| spath output=bucketName path=data.protoPayload.resourceName 
| spath output=role path=data.protoPayload.serviceData.policyDelta.bindingDeltas{}.role 
| spath output=member path=data.protoPayload.serviceData.policyDelta.bindingDeltas{}.member 
| search (member=allUsers AND action=ADD) 
| table  _time, bucketName, src, user, location, action, role, member 
| search `detect_new_open_gcp_storage_buckets_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_GCP_Storage_Activities|Suspicious GCP Storage Activities]]


====How To Implement====
This search relies on the Splunk Add-on for Google Cloud Platform, setting up a Cloud Pub/Sub input, along with the relevant GCP PubSub topics and logging sink to capture GCP Storage Bucket events (https://cloud.google.com/logging/docs/routing/overview).

====Required field====

* _time

* data.resource.type

* data.protoPayload.methodName

* data.protoPayload.serviceData.policyDelta.bindingDeltas{}.action

* data.protoPayload.authenticationInfo.principalEmail

* data.protoPayload.resourceLocation.currentLocations{}

* data.protoPayload.requestMetadata.callerIp

* data.protoPayload.resourceName

* data.protoPayload.serviceData.policyDelta.bindingDeltas{}.role

* data.protoPayload.serviceData.policyDelta.bindingDeltas{}.member



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1530
| Data from Cloud Storage Object
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
While this search has no known false positives, it is possible that a GCP admin has legitimately created a public bucket for a specific purpose. That said, GCP strongly advises against granting full control to the &#34;allUsers&#34; group.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect new open s3 buckets over aws cli===
This search looks for AWS CloudTrail events where a user has created an open/public S3 bucket over the aws cli.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1530/ T1530]
* '''Last Updated''': 2021-07-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventSource=&#34;s3.amazonaws.com&#34; (userAgent=&#34;[aws-cli*&#34; OR userAgent=aws-cli* ) eventName=PutBucketAcl OR requestParameters.accessControlList.x-amz-grant-read-acp IN (&#34;*AuthenticatedUsers&#34;,&#34;*AllUsers&#34;) OR requestParameters.accessControlList.x-amz-grant-write IN (&#34;*AuthenticatedUsers&#34;,&#34;*AllUsers&#34;) OR requestParameters.accessControlList.x-amz-grant-write-acp IN (&#34;*AuthenticatedUsers&#34;,&#34;*AllUsers&#34;) OR requestParameters.accessControlList.x-amz-grant-full-control IN (&#34;*AuthenticatedUsers&#34;,&#34;*AllUsers&#34;) 
| rename requestParameters.bucketName AS bucketName 
| fillnull 
| stats count min(_time) as firstTime max(_time) as lastTime by userIdentity.userName userIdentity.principalId userAgent bucketName requestParameters.accessControlList.x-amz-grant-read requestParameters.accessControlList.x-amz-grant-read-acp requestParameters.accessControlList.x-amz-grant-write requestParameters.accessControlList.x-amz-grant-write-acp requestParameters.accessControlList.x-amz-grant-full-control 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_new_open_s3_buckets_over_aws_cli_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_AWS_S3_Activities|Suspicious AWS S3 Activities]]


====How To Implement====


====Required field====

* _time

* eventSource

* eventName

* requestParameters.accessControlList.x-amz-grant-read-acp

* requestParameters.accessControlList.x-amz-grant-write

* requestParameters.accessControlList.x-amz-grant-write-acp

* requestParameters.accessControlList.x-amz-grant-full-control

* requestParameters.bucketName

* userIdentity.userName

* userIdentity.principalId

* userAgent

* bucketName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1530
| Data from Cloud Storage Object
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the &#34;All Users&#34; group.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1530/aws_s3_public_bucket/aws_cloudtrail_events.json


''version'': 2
</div>
</div>

----

===Detect new open s3 buckets===
This search looks for AWS CloudTrail events where a user has created an open/public S3 bucket.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1530/ T1530]
* '''Last Updated''': 2021-07-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventSource=s3.amazonaws.com eventName=PutBucketAcl 
| rex field=_raw &#34;(?&lt;json_field&gt;{.+})&#34; 
| spath input=json_field output=grantees path=requestParameters.AccessControlPolicy.AccessControlList.Grant{} 
| search grantees=* 
| mvexpand grantees 
| spath input=grantees output=uri path=Grantee.URI 
| spath input=grantees output=permission path=Permission 
| search uri IN (&#34;http://acs.amazonaws.com/groups/global/AllUsers&#34;,&#34;http://acs.amazonaws.com/groups/global/AuthenticatedUsers&#34;) 
| search permission IN (&#34;READ&#34;,&#34;READ_ACP&#34;,&#34;WRITE&#34;,&#34;WRITE_ACP&#34;,&#34;FULL_CONTROL&#34;) 
| rename requestParameters.bucketName AS bucketName 
| stats count min(_time) as firstTime max(_time) as lastTime by user_arn userIdentity.principalId userAgent uri permission bucketName 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_new_open_s3_buckets_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_AWS_S3_Activities|Suspicious AWS S3 Activities]]


====How To Implement====
You must install the AWS App for Splunk.

====Required field====

* _time

* eventSource

* eventName

* requestParameters.bucketName

* user_arn

* userIdentity.principalId

* userAgent

* uri

* permission



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1530
| Data from Cloud Storage Object
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the &#34;All Users&#34; group.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1530/aws_s3_public_bucket/aws_cloudtrail_events.json


''version'': 3
</div>
</div>

----

===Detect s3 access from a new ip===
This search looks at S3 bucket-access logs and detects new or previously unseen remote IP addresses that have successfully accessed an S3 bucket.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1530/ T1530]
* '''Last Updated''': 2018-06-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`aws_s3_accesslogs` http_status=200  [search `aws_s3_accesslogs` http_status=200 
| stats earliest(_time) as firstTime latest(_time) as lastTime by bucket_name remote_ip 
| inputlookup append=t previously_seen_S3_access_from_remote_ip.csv 
| stats min(firstTime) as firstTime, max(lastTime) as lastTime by bucket_name remote_ip 
| outputlookup previously_seen_S3_access_from_remote_ip.csv 
| eval newIP=if(firstTime &gt;= relative_time(now(), &#34;-70m@m&#34;), 1, 0) 
| where newIP=1 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| table bucket_name remote_ip]
| iplocation remote_ip 
|rename remote_ip as src_ip 
| table _time bucket_name src_ip City Country operation request_uri 
| `detect_s3_access_from_a_new_ip_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_AWS_S3_Activities|Suspicious AWS S3 Activities]]


====How To Implement====
You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your S3 access logs&#39; inputs. This search works best when you run the &#34;Previously Seen S3 Bucket Access by Remote IP&#34; support search once to create a history of previously seen remote IPs and bucket names.

====Required field====

* _time

* http_status

* bucket_name

* remote_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1530
| Data from Cloud Storage Object
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect spike in aws security hub alerts for ec2 instance===
This search looks for a spike in number of of AWS security Hub alerts for an EC2 instance in 4 hours intervals

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': 
* '''Last Updated''': 2021-01-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`aws_securityhub_finding` &#34;Resources{}.Type&#34;=AWSEC2Instance 
| bucket span=4h _time 
| stats count AS alerts values(Title) as Title values(Types{}) as Types values(vendor_account) as vendor_account values(vendor_region) as vendor_region values(severity) as severity by _time dest 
| eventstats avg(alerts) as total_alerts_avg, stdev(alerts) as total_alerts_stdev 
| eval threshold_value = 3 
| eval isOutlier=if(alerts &gt; total_alerts_avg+(total_alerts_stdev * threshold_value), 1, 0) 
| search isOutlier=1 
| table _time dest alerts Title Types vendor_account vendor_region severity isOutlier total_alerts_avg 
| `detect_spike_in_aws_security_hub_alerts_for_ec2_instance_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_Security_Hub_Alerts|AWS Security Hub Alerts]]


====How To Implement====
You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your Security Hub inputs. The threshold_value should be tuned to your environment and schedule these searches according to the bucket span interval.

====Required field====

* _time

* Resources{}.Type

* Title

* Types{}

* vendor_account

* vendor_region

* severity

* dest




====Kill Chain Phase====


====Known False Positives====
None

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/security_hub_ec2_spike/security_hub_ec2_spike.json


''version'': 3
</div>
</div>

----

===Detect spike in aws security hub alerts for user===
This search looks for a spike in number of of AWS security Hub alerts for an AWS IAM User in 4 hours intervals.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': 
* '''Last Updated''': 2021-01-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`aws_securityhub_finding` &#34;findings{}.Resources{}.Type&#34;= AwsIamUser 
| rename findings{}.Resources{}.Id as user 
| bucket span=4h _time 
| stats count AS alerts by _time user 
| eventstats avg(alerts) as total_launched_avg, stdev(alerts) as total_launched_stdev 
| eval threshold_value = 2 
| eval isOutlier=if(alerts &gt; total_launched_avg+(total_launched_stdev * threshold_value), 1, 0) 
| search isOutlier=1 
| table _time user alerts 
|`detect_spike_in_aws_security_hub_alerts_for_user_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_Security_Hub_Alerts|AWS Security Hub Alerts]]


====How To Implement====
You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your Security Hub inputs. The threshold_value should be tuned to your environment and schedule these searches according to the bucket span interval.

====Required field====

* _time

* findings{}.Resources{}.Type

* indings{}.Resources{}.Id

* user




====Kill Chain Phase====


====Known False Positives====
None

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Detect spike in s3 bucket deletion===
This search detects users creating spikes in API activity related to deletion of S3 buckets in your AWS environment. It will also update the cache file that factors in the latest data.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1530/ T1530]
* '''Last Updated''': 2018-11-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=DeleteBucket [search `cloudtrail` eventName=DeleteBucket 
| spath output=arn path=userIdentity.arn 
| stats count as apiCalls by arn 
| inputlookup s3_deletion_baseline append=t 
| fields - latestCount 
| stats values(*) as * by arn 
| rename apiCalls as latestCount 
| eval newAvgApiCalls=avgApiCalls + (latestCount-avgApiCalls)/720 
| eval newStdevApiCalls=sqrt(((pow(stdevApiCalls, 2)*719 + (latestCount-newAvgApiCalls)*(latestCount-avgApiCalls))/720)) 
| eval avgApiCalls=coalesce(newAvgApiCalls, avgApiCalls), stdevApiCalls=coalesce(newStdevApiCalls, stdevApiCalls), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) 
| table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls 
| outputlookup s3_deletion_baseline 
| eval dataPointThreshold = 15, deviationThreshold = 3 
| eval isSpike=if((latestCount &gt; avgApiCalls+deviationThreshold*stdevApiCalls) AND numDataPoints &gt; dataPointThreshold, 1, 0) 
| where isSpike=1 
| rename arn as userIdentity.arn 
| table userIdentity.arn] 
| spath output=user userIdentity.arn 
| spath output=bucketName path=requestParameters.bucketName 
| stats values(bucketName) as bucketName, count as numberOfApiCalls, dc(eventName) as uniqueApisCalled by user 
| `detect_spike_in_s3_bucket_deletion_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_AWS_S3_Activities|Suspicious AWS S3 Activities]]


====How To Implement====
You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your AWS CloudTrail inputs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the minimum number of data points required to have a statistically significant amount of data to determine. The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the &#34;Baseline of S3 Bucket deletion activity by ARN&#34; support search once to create a baseline of previously seen S3 bucket-deletion activity.

====Required field====

* _time

* eventName

* userIdentity.arn



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1530
| Data from Cloud Storage Object
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Based on the values of`dataPointThreshold` and `deviationThreshold`, the false positive rate may vary. Please modify this according the your environment.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect spike in blocked outbound traffic from your aws===
This search will detect spike in blocked outbound network connections originating from within your AWS environment.  It will also update the cache file that factors in the latest data.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': 
* '''Last Updated''': 2018-05-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudwatchlogs_vpcflow` action=blocked (src_ip=10.0.0.0/8 OR src_ip=172.16.0.0/12 OR src_ip=192.168.0.0/16) ( dest_ip!=10.0.0.0/8 AND dest_ip!=172.16.0.0/12 AND dest_ip!=192.168.0.0/16)  [search  `cloudwatchlogs_vpcflow` action=blocked (src_ip=10.0.0.0/8 OR src_ip=172.16.0.0/12 OR src_ip=192.168.0.0/16) ( dest_ip!=10.0.0.0/8 AND dest_ip!=172.16.0.0/12 AND dest_ip!=192.168.0.0/16)  
| stats count as numberOfBlockedConnections by src_ip 
| inputlookup baseline_blocked_outbound_connections append=t 
| fields - latestCount 
| stats values(*) as * by src_ip 
| rename numberOfBlockedConnections as latestCount 
| eval newAvgBlockedConnections=avgBlockedConnections + (latestCount-avgBlockedConnections)/720 
| eval newStdevBlockedConnections=sqrt(((pow(stdevBlockedConnections, 2)*719 + (latestCount-newAvgBlockedConnections)*(latestCount-avgBlockedConnections))/720)) 
| eval avgBlockedConnections=coalesce(newAvgBlockedConnections, avgBlockedConnections), stdevBlockedConnections=coalesce(newStdevBlockedConnections, stdevBlockedConnections), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) 
| table src_ip, latestCount, numDataPoints, avgBlockedConnections, stdevBlockedConnections 
| outputlookup baseline_blocked_outbound_connections 
| eval dataPointThreshold = 5, deviationThreshold = 3 
| eval isSpike=if((latestCount &gt; avgBlockedConnections+deviationThreshold*stdevBlockedConnections) AND numDataPoints &gt; dataPointThreshold, 1, 0) 
| where isSpike=1 
| table src_ip] 
| stats values(dest_ip) as &#34;Blocked Destination IPs&#34;, values(interface_id) as &#34;resourceId&#34; count as numberOfBlockedConnections, dc(dest_ip) as uniqueDestConnections by src_ip 
| `detect_spike_in_blocked_outbound_traffic_from_your_aws_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_Network_ACL_Activity|AWS Network ACL Activity]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_AWS_Traffic|Suspicious AWS Traffic]]

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]


====How To Implement====
You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of &#34;spike.&#34; The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the &#34;Baseline of Blocked Outbound Connection&#34; support search once to create a history of previously seen blocked outbound connections.

====Required field====

* _time

* action

* src_ip

* dest_ip




====Kill Chain Phase====

* Actions on Objectives

* Command and Control


====Known False Positives====
The false-positive rate may vary based on the values of`dataPointThreshold` and `deviationThreshold`. Additionally, false positives may result when AWS administrators roll out policies enforcing network blocks, causing sudden increases in the number of blocked outbound connections.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect shared ec2 snapshot===
The following analytic utilizes AWS CloudTrail events to identify when an EC2 snapshot permissions are modified to be shared with a different AWS account. This method is used by adversaries to exfiltrate the EC2 snapshot.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1537/ T1537]
* '''Last Updated''': 2021-07-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` eventName=ModifySnapshotAttribute 
| rename requestParameters.createVolumePermission.add.items{}.userId as requested_account_id 
| search requested_account_id != NULL 
| eval match=if(requested_account_id==aws_account_id,&#34;Match&#34;,&#34;No Match&#34;) 
| table _time user_arn src_ip requestParameters.attributeType requested_account_id aws_account_id match vendor_region user_agent 
| where match = &#34;No Match&#34; 
| `detect_shared_ec2_snapshot_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Cloud_Instance_Activities|Suspicious Cloud Instance Activities]]

* [[Documentation:ESSOC:stories:UseCase#Data_Exfiltration|Data Exfiltration]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.

====Required field====

* _time

* eventName

* user_arn

* src_ip

* requestParameters.attributeType

* aws_account_id

* vendor_region

* user_agent



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1537
| Transfer Data to Cloud Account
| Exfiltration
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
It is possible that an AWS admin has legitimately shared a snapshot with others for  a specific purpose.

====Reference====


* https://labs.nettitude.com/blog/how-to-exfiltrate-aws-ec2-data/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1537/aws_snapshot_exfil/aws_cloudtrail_events.json


''version'': 2
</div>
</div>

----

===Gcp detect gcploit framework===
This search provides detection of GCPloit exploitation framework. This framework can be used to escalate privileges and move laterally from compromised high privilege accounts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-10-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`google_gcp_pubsub_message` data.protoPayload.request.function.timeout=539s 
| table src src_user data.resource.labels.project_id data.protoPayload.request.function.serviceAccountEmail data.protoPayload.authorizationInfo{}.permission data.protoPayload.request.location http_user_agent 
| `gcp_detect_gcploit_framework_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#GCP_Cross_Account_Activity|GCP Cross Account Activity]]


====How To Implement====
You must install splunk GCP add-on. This search works with gcp:pubsub:message logs

====Required field====

* _time

* data.protoPayload.request.function.timeout

* src

* src_user

* data.resource.labels.project_id

* data.protoPayload.request.function.serviceAccountEmail

* data.protoPayload.authorizationInfo{}.permission

* data.protoPayload.request.location

* http_user_agent



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
Payload.request.function.timeout value can possibly be match with other functions or requests however the source user and target request account may indicate an attempt to move laterally accross acounts or projects

====Reference====


* https://github.com/dxa4481/gcploit

* https://www.youtube.com/watch?v=Ml09R38jpok



====Test Dataset====


''version'': 1
</div>
</div>

----

===Gcp kubernetes cluster pod scan detection===
This search provides information of unauthenticated requests via user agent, and authentication data against Kubernetes cluster&#39;s pods

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1526/ T1526]
* '''Last Updated''': 2020-07-17

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`google_gcp_pubsub_message` category=kube-audit 
|spath input=properties.log 
|search responseStatus.code=401 
|table sourceIPs{} userAgent verb requestURI responseStatus.reason properties.pod 
| `gcp_kubernetes_cluster_pod_scan_detection_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Kubernetes_Scanning_Activity|Kubernetes Scanning Activity]]


====How To Implement====
You must install the GCP App for Splunk (version 2.0.0 or later), then configure stackdriver and set a Pub/Sub subscription to be imported to Splunk.

====Required field====

* _time

* category

* responseStatus.code

* sourceIPs{}

* userAgent

* verb

* requestURI

* responseStatus.reason

* properties.pod



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1526
| Cloud Service Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Not all unauthenticated requests are malicious, but frequency, User Agent, source IPs and pods  will provide context.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Gsuite email suspicious attachment===
This search is to detect a suspicious attachment file extension in Gsuite email that may related to spear phishing attack. This file type is commonly used by malware to lure user to click on it to execute malicious code to compromised targetted machine. But this search can also catch some normal files related to this file type that maybe send by employee or network admin.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/001/ T1566.001], [https://attack.mitre.org/techniques/T1566/ T1566]
* '''Last Updated''': 2021-08-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`gsuite_gmail` &#34;attachment{}.file_extension_type&#34; IN (&#34;pl&#34;, &#34;py&#34;, &#34;rb&#34;, &#34;sh&#34;, &#34;bat&#34;, &#34;exe&#34;, &#34;dll&#34;, &#34;cpl&#34;, &#34;com&#34;, &#34;js&#34;, &#34;vbs&#34;, &#34;ps1&#34;, &#34;reg&#34;,&#34;swf&#34;, &#34;cmd&#34;, &#34;go&#34;) 
| eval phase=&#34;plan&#34; 
| eval severity=&#34;medium&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime values(attachment{}.file_extension_type) as email_attachments, values(attachment{}.sha256) as attachment_sha256, values(payload_size) as payload_size by destination{}.service num_message_attachments  subject destination{}.address source.address phase severity 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `gsuite_email_suspicious_attachment_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs related to gsuite having the file attachment metadata like file type, file extension, source email, destination email, num of attachment and etc.

====Required field====

* _time

* attachment{}.file_extension_type

* attachment{}.sha256

* destination{}.service

* num_message_attachments

* payload_size

* subject

* destination{}.address

* source.address



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|-
| T1566
| Phishing
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network admin and normal user may send this file attachment as part of their day to day work. having a good protocol in attaching this file type to an e-mail may reduce the risk of having a spear phishing attack.

====Reference====


* https://www.redhat.com/en/topics/devops/what-is-devsecops



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/gsuite_susp_attachment_ext/gsuite_gmail_file_ext.log


''version'': 1
</div>
</div>

----

===Github dependabot alert===
This search looks for Dependabot Alerts in Github logs.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1195/001/ T1195.001], [https://attack.mitre.org/techniques/T1195/ T1195]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`github` alert.id=* action=create 
| rename repository.full_name as repository, repository.html_url as repository_url sender.login as user 
| stats min(_time) as firstTime max(_time) as lastTime by action alert.affected_package_name alert.affected_range alert.created_at alert.external_identifier alert.external_reference alert.fixed_in alert.severity repository repository_url user 
| eval phase=&#34;code&#34; 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `github_dependabot_alert_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must index GitHub logs. You can follow the url in reference to onboard GitHub logs.

====Required field====

* _time

* alert.id

* repository.full_name

* repository.html_url

* action

* alert.affected_package_name

* alert.affected_range

* alert.created_at

* alert.external_identifier

* alert.external_reference

* alert.fixed_in

* alert.severity



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1195.001
| Compromise Software Dependencies and Development Tools
| Initial Access
|-
| T1195
| Supply Chain Compromise
| Initial Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://www.splunk.com/en_us/blog/tips-and-tricks/getting-github-data-with-webhooks.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1195.001/github_security_advisor_alert/github_security_advisor_alert.json


''version'': 1
</div>
</div>

----

===Github pull request from unknown user===
This search looks for Pull Request from unknown user.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1195/001/ T1195.001], [https://attack.mitre.org/techniques/T1195/ T1195]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`github` check_suite.pull_requests{}.id=* 
| stats count by check_suite.head_commit.author.name repository.full_name check_suite.pull_requests{}.head.ref check_suite.head_commit.message 
| rename check_suite.head_commit.author.name as user repository.full_name as repository check_suite.pull_requests{}.head.ref as ref_head check_suite.head_commit.message as commit_message 
| search NOT `github_known_users` 
| eval phase=&#34;code&#34; 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `github_pull_request_from_unknown_user_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must index GitHub logs. You can follow the url in reference to onboard GitHub logs.

====Required field====

* _time

* alert.id

* repository.full_name

* repository.html_url

* action

* alert.affected_package_name

* alert.affected_range

* alert.created_at

* alert.external_identifier

* alert.external_reference

* alert.fixed_in

* alert.severity



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1195.001
| Compromise Software Dependencies and Development Tools
| Initial Access
|-
| T1195
| Supply Chain Compromise
| Initial Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://www.splunk.com/en_us/blog/tips-and-tricks/getting-github-data-with-webhooks.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1195.001/github_pull_request/github_pull_request.json


''version'': 1
</div>
</div>

----

===Github commit changes in master===
This search is to detect a pushed or commit to master or main branch. This is to avoid unwanted modification to master without a review to the changes. Ideally in terms of devsecops the changes made in a branch and do a PR for review. of course in some cases admin of the project may did a changes directly to master branch

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1199/ T1199]
* '''Last Updated''': 2021-08-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`github` branches{}.name = main OR branches{}.name = master 
| eval severity=&#34;low&#34; 
| eval phase=&#34;code&#34; 
|  stats count min(_time) as firstTime max(_time) as lastTime  by commit.author.html_url commit.commit.author.email commit.author.login commit.commit.message repository.pushed_at commit.commit.committer.date, phase, severity 
| eval phase=&#34;code&#34; 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `github_commit_changes_in_master_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs related to github logs having the fork, commit, push metadata that can be use to monitor the changes in a github project.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1199
| Trusted Relationship
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin can do changes directly to master branch

====Reference====


* https://www.redhat.com/en/topics/devops/what-is-devsecops



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1199/github_push_master/github_push_master.log


''version'': 1
</div>
</div>

----

===Github commit in develop===
This search is to detect a pushed or commit to develop branch. This is to avoid unwanted modification to develop without a review to the changes. Ideally in terms of devsecops the changes made in a branch and do a PR for review. of course in some cases admin of the project may did a changes directly to master branch

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1199/ T1199]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`github` branches{}.name = main OR branches{}.name = develop 
|  stats count min(_time) as firstTime max(_time) as lastTime  by commit.author.html_url commit.commit.author.email commit.author.login commit.commit.message repository.pushed_at commit.commit.committer.date 
| eval phase=&#34;code&#34; 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `github_commit_in_develop_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs related to github logs having the fork, commit, push metadata that can be use to monitor the changes in a github project.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1199
| Trusted Relationship
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin can do changes directly to develop branch

====Reference====


* https://www.redhat.com/en/topics/devops/what-is-devsecops



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1199/github_push_master/github_push_develop.json


''version'': 1
</div>
</div>

----

===Gsuite drive share in external email===
This search is to detect suspicious google drive or google docs files shared outside or externally. This behavior might be a good hunting query to monitor exfitration of data made by an attacker or insider to a targetted machine.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1567/002/ T1567.002], [https://attack.mitre.org/techniques/T1567/ T1567]
* '''Last Updated''': 2021-08-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`gsuite_drive` NOT (email IN(&#34;&#34;, &#34;null&#34;)) 
| rex field=parameters.owner &#34;[^@]+@(?&lt;src_domain&gt;[^@]+)&#34; 
| rex field=email &#34;[^@]+@(?&lt;dest_domain&gt;[^@]+)&#34; 
| where src_domain = &#34;internal_test_email.com&#34; and not dest_domain = &#34;internal_test_email.com&#34; 
| eval phase=&#34;plan&#34; 
| eval severity=&#34;low&#34; 
| stats values(parameters.doc_title) as doc_title, values(parameters.doc_type) as doc_types, values(email) as dst_email_list, values(parameters.visibility) as visibility, values(parameters.doc_id) as doc_id, count min(_time) as firstTime max(_time) as lastTime by parameters.owner ip_address phase severity  
| rename parameters.owner as user ip_address as src_ip 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `gsuite_drive_share_in_external_email_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs related to gsuite having the file attachment metadata like file type, file extension, source email, destination email, num of attachment and etc. In order for the search to work for your environment, please edit the query to use your company specific email domain instead of `internal_test_email.com`.

====Required field====

* _time

* parameters.doc_title

* src_domain

* dest_domain

* email

* parameters.visibility

* parameters.owner

* parameters.doc_type



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1567.002
| Exfiltration to Cloud Storage
| Exfiltration
|-
| T1567
| Exfiltration Over Web Service
| Exfiltration
|}


====Kill Chain Phase====

* Exfiltration


====Known False Positives====
network admin or normal user may share files to customer and external team.

====Reference====


* https://www.redhat.com/en/topics/devops/what-is-devsecops



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1567.002/gsuite_share_drive/gdrive_share_external.log


''version'': 1
</div>
</div>

----

===Gsuite email suspicious subject with attachment===
This search is to detect a gsuite email contains suspicious subject having known file type used in spear phishing. This technique is a common and effective entry vector of attacker to compromise a network by luring the user to click or execute the suspicious attachment send from external email account because of the effective social engineering of subject related to delivery, bank and so on. On the other hand this detection may catch a normal email traffic related to legitimate transaction so better to check the email sender, spelling and etc. avoid click link or opening the attachment if you are not expecting this type of e-mail.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/001/ T1566.001], [https://attack.mitre.org/techniques/T1566/ T1566]
* '''Last Updated''': 2021-08-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`gsuite_gmail` num_message_attachments &gt; 0 subject IN (&#34;*dhl*&#34;, &#34;* ups *&#34;, &#34;*delivery*&#34;, &#34;*parcel*&#34;, &#34;*label*&#34;, &#34;*invoice*&#34;, &#34;*postal*&#34;, &#34;* fedex *&#34;, &#34;* usps *&#34;, &#34;* express *&#34;, &#34;*shipment*&#34;, &#34;*Banking/Tax*&#34;,&#34;*shipment*&#34;, &#34;*new order*&#34;) attachment{}.file_extension_type IN (&#34;doc&#34;, &#34;docx&#34;, &#34;xls&#34;, &#34;xlsx&#34;, &#34;ppt&#34;, &#34;pptx&#34;, &#34;pdf&#34;, &#34;zip&#34;, &#34;rar&#34;, &#34;html&#34;,&#34;htm&#34;,&#34;hta&#34;) 
| rex field=source.from_header_address &#34;[^@]+@(?&lt;source_domain&gt;[^@]+)&#34; 
| rex field=destination{}.address &#34;[^@]+@(?&lt;dest_domain&gt;[^@]+)&#34; 
| where not source_domain=&#34;internal_test_email.com&#34; and dest_domain=&#34;internal_test_email.com&#34; 
| eval phase=&#34;plan&#34; 
| eval severity=&#34;medium&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime values(attachment{}.file_extension_type) as email_attachments, values(attachment{}.sha256) as attachment_sha256, values(payload_size) as payload_size by destination{}.service num_message_attachments  subject destination{}.address source.address phase severity 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `gsuite_email_suspicious_subject_with_attachment_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs related to gsuite having the file attachment metadata like file type, file extension, source email, destination email, num of attachment and etc.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|-
| T1566
| Phishing
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
normal user or normal transaction may contain the subject and file type attachment that this detection try to search.

====Reference====


* https://www.redhat.com/en/topics/devops/what-is-devsecops

* https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/rpt-top-spear-phishing-words.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/gsuite_susp_subj/gsuite_susp_subj_attach.log


''version'': 1
</div>
</div>

----

===Gsuite email with known abuse web service link===
This analytics is to detect a gmail containing a link that are known to be abused by malware or attacker like pastebin, telegram and discord to deliver malicious payload. This event can encounter some normal email traffic within organization and external email that normally using this application and services.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/001/ T1566.001], [https://attack.mitre.org/techniques/T1566/ T1566]
* '''Last Updated''': 2021-08-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`gsuite_gmail` &#34;link_domain{}&#34; IN (&#34;*pastebin.com*&#34;, &#34;*discord*&#34;, &#34;*telegram*&#34;,&#34;t.me&#34;) 
| rex field=source.from_header_address &#34;[^@]+@(?&lt;source_domain&gt;[^@]+)&#34; 
| rex field=destination{}.address &#34;[^@]+@(?&lt;dest_domain&gt;[^@]+)&#34; 
| where not source_domain=&#34;internal_test_email.com&#34; and dest_domain=&#34;internal_test_email.com&#34; 
| eval phase=&#34;plan&#34; 
| eval severity=&#34;low&#34; 
|stats values(link_domain{}) as link_domains min(_time) as firstTime max(_time) as lastTime count by is_spam source.address source.from_header_address subject destination{}.address phase severity 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `gsuite_email_with_known_abuse_web_service_link_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs related to gsuite having the file attachment metadata like file type, file extension, source email, destination email, num of attachment and etc.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|-
| T1566
| Phishing
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
normal email contains this link that are known application within the organization or network can be catched by this detection.

====Reference====


* https://news.sophos.com/en-us/2021/07/22/malware-increasingly-targets-discord-for-abuse/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/gsuite_susp_url/gsuite_susp_url.log


''version'': 1
</div>
</div>

----

===Gsuite outbound email with attachment to external domain===
This search is to detect a suspicious outbound e-mail from internal email to external email domain. This can be a good hunting query to monitor insider or outbound email traffic for not common domain e-mail. The idea is to parse the domain of destination email check if there is a minimum outbound traffic &lt; 20 with attachment.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1048/003/ T1048.003], [https://attack.mitre.org/techniques/T1048/ T1048]
* '''Last Updated''': 2021-08-17

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`gsuite_gmail` num_message_attachments &gt; 0 
| rex field=source.from_header_address &#34;[^@]+@(?&lt;source_domain&gt;[^@]+)&#34; 
| rex field=destination{}.address &#34;[^@]+@(?&lt;dest_domain&gt;[^@]+)&#34; 
| where source_domain=&#34;internal_test_email.com&#34; and not dest_domain=&#34;internal_test_email.com&#34; 
| eval phase=&#34;plan&#34; 
| eval severity=&#34;low&#34; 
| stats values(subject) as subject, values(source.from_header_address) as src_domain_list, count as numEvents, dc(source.from_header_address) as numSrcAddresses, min(_time) as firstTime max(_time) as lastTime by dest_domain phase severity 
| where numSrcAddresses &lt; 20 
|sort - numSrcAddresses 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `gsuite_outbound_email_with_attachment_to_external_domain_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs related to gsuite having the file attachment metadata like file type, file extension, source email, destination email, num of attachment and etc.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1048.003
| Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol
| Exfiltration
|-
| T1048
| Exfiltration Over Alternative Protocol
| Exfiltration
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network admin and normal user may send this file attachment as part of their day to day work. having a good protocol in attaching this file type to an e-mail may reduce the risk of having a spear phishing attack.

====Reference====


* https://www.redhat.com/en/topics/devops/what-is-devsecops



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/gsuite_outbound_email_to_external/gsuite_external_domain.log


''version'': 1
</div>
</div>

----

===Gsuite suspicious shared file name===
This search is to detect a shared file in google drive with suspicious file name that are commonly used by spear phishing campaign. This technique is very popular to lure the user by running a malicious document or click a malicious link within the shared file that will redirected to malicious website. This detection can also catch some normal email communication between organization and its external customer.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/001/ T1566.001], [https://attack.mitre.org/techniques/T1566/ T1566]
* '''Last Updated''': 2021-08-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`gsuite_drive` parameters.owner_is_team_drive=false &#34;parameters.doc_title&#34; IN (&#34;*dhl*&#34;, &#34;* ups *&#34;, &#34;*delivery*&#34;, &#34;*parcel*&#34;, &#34;*label*&#34;, &#34;*invoice*&#34;, &#34;*postal*&#34;, &#34;*fedex*&#34;, &#34;* usps *&#34;, &#34;* express *&#34;, &#34;*shipment*&#34;, &#34;*Banking/Tax*&#34;,&#34;*shipment*&#34;, &#34;*new order*&#34;) parameters.doc_type IN (&#34;document&#34;,&#34;pdf&#34;, &#34;msexcel&#34;, &#34;msword&#34;, &#34;spreadsheet&#34;, &#34;presentation&#34;) 
| rex field=parameters.owner &#34;[^@]+@(?&lt;source_domain&gt;[^@]+)&#34; 
| rex field=parameters.target_user &#34;[^@]+@(?&lt;dest_domain&gt;[^@]+)&#34; 
| where not source_domain=&#34;internal_test_email.com&#34; and dest_domain=&#34;internal_test_email.com&#34; 
| eval phase=&#34;plan&#34; 
| eval severity=&#34;low&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by email parameters.owner parameters.target_user parameters.doc_title parameters.doc_type phase severity 
| rename parameters.target_user AS user 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `gsuite_suspicious_shared_file_name_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs related to gsuite having the file attachment metadata like file type, file extension, source email, destination email, num of attachment and etc. In order for the search to work for your environment, please edit the query to use your company specific email domain instead of `internal_test_email.com`.

====Required field====

* _time

* parameters.doc_title

* src_domain

* dest_domain

* email

* parameters.visibility

* parameters.owner

* parameters.doc_type



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|-
| T1566
| Phishing
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
normal user or normal transaction may contain the subject and file type attachment that this detection try to search

====Reference====


* https://www.redhat.com/en/topics/devops/what-is-devsecops

* https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/rpt-top-spear-phishing-words.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/gdrive_susp_file_share/gdrive_susp_attach.log


''version'': 1
</div>
</div>

----

===High number of login failures from a single source===
This search will detect more than 5 login failures in Office365 Azure Active Directory from a single source IP address. Please adjust the threshold value of 5 as suited for your environment.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1110/001/ T1110.001], [https://attack.mitre.org/techniques/T1110/ T1110]
* '''Last Updated''': 2020-12-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity` Operation=UserLoginFailed  record_type=AzureActiveDirectoryStsLogon app=AzureActiveDirectory 
| stats count dc(user) as accounts_locked values(user) as user values(LogonError) as LogonError values(authentication_method) as authentication_method values(signature) as signature values(UserAgent) as UserAgent by src_ip record_type Operation app 
| search accounts_locked &gt;= 5
| `high_number_of_login_failures_from_a_single_source_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]


====How To Implement====


====Required field====

* _time

* Operation

* record_type

* app

* user

* LogonError

* authentication_method

* signature

* UserAgent

* src_ip

* record_type



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1110.001
| Password Guessing
| Credential Access
|-
| T1110
| Brute Force
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Kubernetes aws detect suspicious kubectl calls===
This search provides information on anonymous Kubectl calls with IP, verb namespace and object access context

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': 
* '''Last Updated''': 2020-06-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`aws_cloudwatchlogs_eks` userAgent=kubectl* sourceIPs{}!=127.0.0.1 sourceIPs{}!=::1 src_user=system:anonymous  
| table  src_ip src_user verb userAgent requestURI  
| stats  count by src_ip src_user verb userAgent requestURI 
|`kubernetes_aws_detect_suspicious_kubectl_calls_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Kubernetes_Sensitive_Object_Access_Activity|Kubernetes Sensitive Object Access Activity]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with cloudwatch logs.

====Required field====

* _time

* userAgent

* sourceIPs{}

* src_user

* src_ip

* verb

* requestURI




====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
Kubectl calls are not malicious by nature. However source IP, verb and Object can reveal potential malicious activity, specially anonymous suspicious IPs and sensitive objects such as configmaps or secrets

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Kubernetes nginx ingress lfi===
This search uses the Kubernetes logs from a nginx ingress controller to detect local file inclusion attacks.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1212/ T1212]
* '''Last Updated''': 2021-08-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`kubernetes_container_controller` 
| rex field=_raw &#34;^(?&lt;remote_addr&gt;\S+)\s+-\s+-\s+\[(?&lt;time_local&gt;[^\]]*)\]\s\&#34;(?&lt;request&gt;[^\&#34;]*)\&#34;\s(?&lt;status&gt;\S*)\s(?&lt;body_bytes_sent&gt;\S*)\s\&#34;(?&lt;http_referer&gt;[^\&#34;]*)\&#34;\s\&#34;(?&lt;http_user_agent&gt;[^\&#34;]*)\&#34;\s(?&lt;request_length&gt;\S*)\s(?&lt;request_time&gt;\S*)\s\[(?&lt;proxy_upstream_name&gt;[^\]]*)\]\s\[(?&lt;proxy_alternative_upstream_name&gt;[^\]]*)\]\s(?&lt;upstream_addr&gt;\S*)\s(?&lt;upstream_response_length&gt;\S*)\s(?&lt;upstream_response_time&gt;\S*)\s(?&lt;upstream_status&gt;\S*)\s(?&lt;req_id&gt;\S*)&#34; 
| lookup local_file_inclusion_paths local_file_inclusion_paths AS request OUTPUT lfi_path 
| search lfi_path=yes 
| rename remote_addr AS src_ip, upstream_status as status, proxy_upstream_name as proxy 
| rex field=request &#34;^(?&lt;http_method&gt;\S+)\s(?&lt;url&gt;\S+)\s&#34; 
| eval phase=&#34;operate&#34; 
| eval severity=&#34;high&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by src_ip, status, url, http_method, host, http_user_agent, proxy, phase, severity 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `kubernetes_nginx_ingress_lfi_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must ingest Kubernetes logs through Splunk Connect for Kubernetes.

====Required field====

* raw



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1212
| Exploitation for Credential Access
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://github.com/splunk/splunk-connect-for-kubernetes

* https://www.offensive-security.com/metasploit-unleashed/file-inclusion-vulnerabilities/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1212/kubernetes_nginx_lfi_attack/kubernetes_nginx_lfi_attack.log


''version'': 1
</div>
</div>

----

===Kubernetes nginx ingress rfi===
This search uses the Kubernetes logs from a nginx ingress controller to detect remote file inclusion attacks.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1212/ T1212]
* '''Last Updated''': 2021-08-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`kubernetes_container_controller` 
| rex field=_raw &#34;^(?&lt;remote_addr&gt;\S+)\s+-\s+-\s+\[(?&lt;time_local&gt;[^\]]*)\]\s\&#34;(?&lt;request&gt;[^\&#34;]*)\&#34;\s(?&lt;status&gt;\S*)\s(?&lt;body_bytes_sent&gt;\S*)\s\&#34;(?&lt;http_referer&gt;[^\&#34;]*)\&#34;\s\&#34;(?&lt;http_user_agent&gt;[^\&#34;]*)\&#34;\s(?&lt;request_length&gt;\S*)\s(?&lt;request_time&gt;\S*)\s\[(?&lt;proxy_upstream_name&gt;[^\]]*)\]\s\[(?&lt;proxy_alternative_upstream_name&gt;[^\]]*)\]\s(?&lt;upstream_addr&gt;\S*)\s(?&lt;upstream_response_length&gt;\S*)\s(?&lt;upstream_response_time&gt;\S*)\s(?&lt;upstream_status&gt;\S*)\s(?&lt;req_id&gt;\S*)&#34; 
| rex field=request &#34;^(?&lt;http_method&gt;\S+)?\s(?&lt;url&gt;\S+)\s&#34; 
| rex field=url &#34;(?&lt;dest_ip&gt;\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})&#34; 
| search dest_ip=* 
| rename remote_addr AS src_ip, upstream_status as status, proxy_upstream_name as proxy 
| eval phase=&#34;operate&#34; 
| eval severity=&#34;medium&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by src_ip, dest_ip status, url, http_method, host, http_user_agent, proxy, phase, severity 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `kubernetes_nginx_ingress_rfi_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must ingest Kubernetes logs through Splunk Connect for Kubernetes.

====Required field====

* raw



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1212
| Exploitation for Credential Access
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://github.com/splunk/splunk-connect-for-kubernetes

* https://www.netsparker.com/blog/web-security/remote-file-inclusion-vulnerability/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1212/kuberntest_nginx_rfi_attack/kubernetes_nginx_rfi_attack.log


''version'': 1
</div>
</div>

----

===Kubernetes scanner image pulling===
This search uses the Kubernetes logs from Splunk Connect from Kubernetes to detect Kubernetes Security Scanner.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud, Dev Sec Ops Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1526/ T1526]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`kube_objects_events` object.message IN (&#34;Pulling image *kube-hunter*&#34;, &#34;Pulling image *kube-bench*&#34;, &#34;Pulling image *kube-recon*&#34;, &#34;Pulling image *kube-recon*&#34;) 
| rename object.* AS * 
| rename involvedObject.* AS * 
| rename source.host AS host 
| eval phase=&#34;operate&#34; 
| eval severity=&#34;high&#34; 
| stats min(_time) as firstTime max(_time) as lastTime count by host, name, namespace, kind, reason, message, phase, severity 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `kubernetes_scanner_image_pulling_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Dev_Sec_Ops|Dev Sec Ops]]


====How To Implement====
You must ingest Kubernetes logs through Splunk Connect for Kubernetes.

====Required field====

* object.message

* source.host

* object.involvedObject.name

* object.involvedObject.namespace

* object.involvedObject.kind

* object.message

* object.reason



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1526
| Cloud Service Discovery
| Discovery
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://github.com/splunk/splunk-connect-for-kubernetes



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1526/kubernetes_kube_hunter/kubernetes_kube_hunter.json


''version'': 1
</div>
</div>

----

===New container uploaded to aws ecr===
This searches show information on uploaded containers including source user, image id, source IP user type, http user agent, region, first time, last time of operation (PutImage). These searches are based on Cloud Infrastructure Data Model.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1525/ T1525]
* '''Last Updated''': 2020-02-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Cloud_Infrastructure.Compute where Compute.user_type!=&#34;AssumeRole&#34; AND Compute.http_user_agent=&#34;AWS Internal&#34; AND Compute.event_name=&#34;PutImage&#34; by Compute.image_id Compute.src_user Compute.src Compute.region Compute.msg Compute.user_type 
| `drop_dm_object_name(&#34;Compute&#34;)` 
| `new_container_uploaded_to_aws_ecr_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Container_Implantation_Monitoring_and_Investigation|Container Implantation Monitoring and Investigation]]


====How To Implement====
You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your AWS CloudTrail inputs. You must also install Cloud Infrastructure data model. Please also customize the `container_implant_aws_detection_filter` macro to filter out the false positives.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1525
| Implant Internal Image
| Persistence
|}


====Kill Chain Phase====


====Known False Positives====
Uploading container is a normal behavior from developers or users with access to container registry.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===O365 add app role assignment grant user===
This search detects the creation of a new Federation setting by alerting about an specific event related to its creation.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1136/003/ T1136.003], [https://attack.mitre.org/techniques/T1136/ T1136]
* '''Last Updated''': 2021-01-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity` Workload=AzureActiveDirectory Operation=&#34;Add app role assignment grant to user.&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime values(Actor{}.ID) as Actor.ID values(Actor{}.Type) as Actor.Type by ActorIpAddress dest ResultStatus 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `o365_add_app_role_assignment_grant_user_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]

* [[Documentation:ESSOC:stories:UseCase#Cloud_Federated_Credential_Abuse|Cloud Federated Credential Abuse]]


====How To Implement====
You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity

====Required field====

* _time

* Workload

* Operation

* Actor{}.ID

* Actor{}.Type

* ActorIpAddress

* dest

* ResultStatus



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1136.003
| Cloud Account
| Persistence
|-
| T1136
| Create Account
| Persistence
|}


====Kill Chain Phase====

* Actions on Objective


====Known False Positives====
The creation of a new Federation is not necessarily malicious, however this events need to be followed closely, as it may indicate federated credential abuse or backdoor via federated identities at a different cloud provider.

====Reference====


* https://www.fireeye.com/content/dam/fireeye-www/blog/pdfs/wp-m-unc2452-2021-000343-01.pdf

* https://us-cert.cisa.gov/ncas/alerts/aa21-008a



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.003/o365_new_federation/o365_new_federation.json


''version'': 1
</div>
</div>

----

===O365 added service principal===
This search detects the creation of a new Federation setting by alerting about an specific event related to its creation.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1136/003/ T1136.003], [https://attack.mitre.org/techniques/T1136/ T1136]
* '''Last Updated''': 2021-01-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity` Workload=AzureActiveDirectory signature=&#34;Add service principal credentials.&#34; 
| stats min(_time) as firstTime max(_time) as lastTime values(Actor{}.ID) as Actor.ID values(ModifiedProperties{}.Name) as ModifiedProperties.Name values(ModifiedProperties{}.NewValue) as ModifiedProperties.NewValue values(Target{}.ID) as Target.ID by ActorIpAddress signature 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `o365_added_service_principal_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]

* [[Documentation:ESSOC:stories:UseCase#Cloud_Federated_Credential_Abuse|Cloud Federated Credential Abuse]]


====How To Implement====
You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity

====Required field====

* _time

* Workload

* signature

* Actor{}.ID

* ModifiedProperties{}.Name

* ModifiedProperties{}.NewValue

* Target{}.ID

* ActorIpAddress



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1136.003
| Cloud Account
| Persistence
|-
| T1136
| Create Account
| Persistence
|}


====Kill Chain Phase====

* Actions on Objective


====Known False Positives====
The creation of a new Federation is not necessarily malicious, however these events need to be followed closely, as it may indicate federated credential abuse or backdoor via federated identities at a different cloud provider.

====Reference====


* https://www.fireeye.com/content/dam/fireeye-www/blog/pdfs/wp-m-unc2452-2021-000343-01.pdf

* https://us-cert.cisa.gov/ncas/alerts/aa21-008a

* https://www.splunk.com/en_us/blog/security/a-golden-saml-journey-solarwinds-continued.html

* https://www.sygnia.co/golden-saml-advisory



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.003/o365_add_service_principal/o365_add_service_principal.json


''version'': 1
</div>
</div>

----

===O365 bypass mfa via trusted ip===
This search detects newly added IP addresses/CIDR blocks to the list of MFA Trusted IPs to bypass multi factor authentication. Attackers are often known to use this technique so that they can bypass the MFA system.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/007/ T1562.007], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-07-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity` signature=&#34;Set Company Information.&#34; ModifiedProperties{}.Name=StrongAuthenticationPolicy 
| rex max_match=100 field=ModifiedProperties{}.NewValue &#34;(?&lt;ip_addresses_new_added&gt;\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2})&#34; 
| rex max_match=100 field=ModifiedProperties{}.OldValue &#34;(?&lt;ip_addresses_old&gt;\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2})&#34; 
| eval ip_addresses_old=if(isnotnull(ip_addresses_old),ip_addresses_old,&#34;0&#34;) 
| mvexpand ip_addresses_new_added 
| where isnull(mvfind(ip_addresses_old,ip_addresses_new_added)) 
|stats count min(_time) as firstTime max(_time) as lastTime values(ip_addresses_old) as ip_addresses_old by user ip_addresses_new_added signature Workload vendor_account status user_id action 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `o365_bypass_mfa_via_trusted_ip_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]


====How To Implement====
You must install Splunk Microsoft Office 365 add-on. This search works with o365:management:activity

====Required field====

* _time

* signature

* ModifiedProperties{}.Name

* ModifiedProperties{}.NewValue

* ModifiedProperties{}.OldValue

* user

* vendor_account

* status

* user_id

* action



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.007
| Disable or Modify Cloud Firewall
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objective


====Known False Positives====
Unless it is a special case, it is uncommon to continually update Trusted IPs to MFA configuration.

====Reference====


* https://i.blackhat.com/USA-20/Thursday/us-20-Bienstock-My-Cloud-Is-APTs-Cloud-Investigating-And-Defending-Office-365.pdf

* https://attack.mitre.org/techniques/T1562/007/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.007/o365_bypass_mfa_via_trusted_ip/o365_bypass_mfa_via_trusted_ip.json


''version'': 2
</div>
</div>

----

===O365 disable mfa===
This search detects when multi factor authentication has been disabled, what entitiy performed the action and against what user

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1556/ T1556]
* '''Last Updated''': 2020-12-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity` Operation=&#34;Disable Strong Authentication.&#34; 
| stats count earliest(_time) as firstTime latest(_time) as lastTime by UserType Operation user status signature dest ResultStatus 
|`security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `o365_disable_mfa_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]


====How To Implement====
You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity

====Required field====

* _time

* Operation

* UserType

* user

* status

* signature

* dest

* ResultStatus



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1556
| Modify Authentication Process
| Credential Access, Defense Evasion, Persistence
|}


====Kill Chain Phase====

* Actions on Objective


====Known False Positives====
Unless it is a special case, it is uncommon to disable MFA or Strong Authentication

====Reference====


* https://attack.mitre.org/techniques/T1556/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1556/o365_disable_mfa/o365_disable_mfa.json


''version'': 1
</div>
</div>

----

===O365 excessive authentication failures alert===
This search detects when an excessive number of authentication failures occur this search also includes attempts against MFA prompt codes

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1110/ T1110]
* '''Last Updated''': 2020-12-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity` Workload=AzureActiveDirectory UserAuthenticationMethod=* status=Failed 
| stats count earliest(_time) as firstTime latest(_time) values(UserAuthenticationMethod) AS UserAuthenticationMethod values(UserAgent) AS UserAgent values(status) AS status values(src_ip) AS src_ip by user 
| where count &gt; 10 
|`security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `o365_excessive_authentication_failures_alert_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]


====How To Implement====
You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity

====Required field====

* _time

* Workload

* UserAuthenticationMethod

* status

* UserAgent

* src_ip

* user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1110
| Brute Force
| Credential Access
|}


====Kill Chain Phase====

* Not Applicable


====Known False Positives====
The threshold for alert is above 10 attempts and this should reduce the number of false positives.

====Reference====


* https://attack.mitre.org/techniques/T1110/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110/o365_brute_force_login/o365_brute_force_login.json


''version'': 1
</div>
</div>

----

===O365 excessive sso logon errors===
This search detects accounts with high number of Single Sign ON (SSO) logon errors. Excessive logon errors may indicate attempts to bruteforce of password or single sign on token hijack or reuse.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1556/ T1556]
* '''Last Updated''': 2021-01-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity`  Workload=AzureActiveDirectory LogonError=SsoArtifactInvalidOrExpired 
| stats count min(_time) as firstTime max(_time) as lastTime by LogonError ActorIpAddress UserAgent UserId 
| where count &gt; 5 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `o365_excessive_sso_logon_errors_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]

* [[Documentation:ESSOC:stories:UseCase#Cloud_Federated_Credential_Abuse|Cloud Federated Credential Abuse]]


====How To Implement====
You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity

====Required field====

* _time

* Workload

* LogonError

* ActorIpAddress

* UserAgent

* UserId



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1556
| Modify Authentication Process
| Credential Access, Defense Evasion, Persistence
|}


====Kill Chain Phase====

* Actions on Objective


====Known False Positives====
Logon errors may not be malicious in nature however it may indicate attempts to reuse a token or password obtained via credential access attack.

====Reference====


* https://stealthbits.com/blog/bypassing-mfa-with-pass-the-cookie/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1556/o365_sso_logon_errors/o365_sso_logon_errors.json


''version'': 1
</div>
</div>

----

===O365 new federated domain added===
This search detects the addition of a new Federated domain.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1136/003/ T1136.003], [https://attack.mitre.org/techniques/T1136/ T1136]
* '''Last Updated''': 2021-01-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity` Workload=Exchange Operation=&#34;Add-FederatedDomain&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime values(Parameters{}.Value) as Parameters.Value by ObjectId Operation OrganizationName OriginatingServer UserId UserKey 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `o365_new_federated_domain_added_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]

* [[Documentation:ESSOC:stories:UseCase#Cloud_Federated_Credential_Abuse|Cloud Federated Credential Abuse]]


====How To Implement====
You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity.

====Required field====

* _time

* Workload

* Operation

* Parameters{}.Value

* ObjectId

* OrganizationName

* OriginatingServer

* UserId

* UserKey



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1136.003
| Cloud Account
| Persistence
|-
| T1136
| Create Account
| Persistence
|}


====Kill Chain Phase====

* Actions on Objective


====Known False Positives====
The creation of a new Federated domain is not necessarily malicious, however these events need to be followed closely, as it may indicate federated credential abuse or backdoor via federated identities at a similar or different cloud provider.

====Reference====


* https://www.fireeye.com/content/dam/fireeye-www/blog/pdfs/wp-m-unc2452-2021-000343-01.pdf

* https://us-cert.cisa.gov/ncas/alerts/aa21-008a

* https://www.splunk.com/en_us/blog/security/a-golden-saml-journey-solarwinds-continued.html

* https://www.sygnia.co/golden-saml-advisory

* https://o365blog.com/post/aadbackdoor/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.003/o365_new_federated_domain/o365_new_federated_domain.json


''version'': 1
</div>
</div>

----

===O365 pst export alert===
This search detects when a user has performed an Ediscovery search or exported a PST file from the search. This PST file usually has sensitive information including email body content

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1114/ T1114]
* '''Last Updated''': 2020-12-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity` Category=ThreatManagement Name=&#34;eDiscovery search started or exported&#34; 
| stats count earliest(_time) as firstTime latest(_time) as lastTime by Source Severity AlertEntityId Operation Name 
|`security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `o365_pst_export_alert_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]

* [[Documentation:ESSOC:stories:UseCase#Data_Exfiltration|Data Exfiltration]]


====How To Implement====
You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity

====Required field====

* _time

* Category

* Name

* Source

* Severity

* AlertEntityId

* Operation



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1114
| Email Collection
| Collection
|}


====Kill Chain Phase====

* Actions on Objective


====Known False Positives====
PST export can be done for legitimate purposes but due to the sensitive nature of its content it must be monitored.

====Reference====


* https://attack.mitre.org/techniques/T1114/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1114/o365_export_pst_file/o365_export_pst_file.json


''version'': 1
</div>
</div>

----

===O365 suspicious admin email forwarding===
This search detects when an admin configured a forwarding rule for multiple mailboxes to the same destination.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1114/003/ T1114.003], [https://attack.mitre.org/techniques/T1114/ T1114]
* '''Last Updated''': 2020-12-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity` Operation=Set-Mailbox 
| spath input=Parameters 
| rename Identity AS src_user 
| search ForwardingAddress=* 
| stats dc(src_user) AS count_src_user earliest(_time) as firstTime latest(_time) as lastTime values(src_user) AS src_user values(user) AS user by ForwardingAddress 
| where count_src_user &gt; 1 
|`security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
|`o365_suspicious_admin_email_forwarding_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]

* [[Documentation:ESSOC:stories:UseCase#Data_Exfiltration|Data Exfiltration]]


====How To Implement====
You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity

====Required field====

* _time

* Operation

* Parameters



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1114.003
| Email Forwarding Rule
| Collection
|-
| T1114
| Email Collection
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1114.003/o365_email_forwarding_rule/o365_email_forwarding_rule.json


''version'': 1
</div>
</div>

----

===O365 suspicious rights delegation===
This search detects the assignment of rights to accesss content from another mailbox. This is usually only assigned to a service account.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1114/002/ T1114.002], [https://attack.mitre.org/techniques/T1114/ T1114]
* '''Last Updated''': 2020-12-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity` Operation=Add-MailboxPermission 
| spath input=Parameters 
| rename User AS src_user, Identity AS dest_user 
| search AccessRights=FullAccess OR AccessRights=SendAs OR AccessRights=SendOnBehalf 
| stats count earliest(_time) as firstTime latest(_time) as lastTime by user src_user dest_user Operation AccessRights 
|`security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
|`o365_suspicious_rights_delegation_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]


====How To Implement====
You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity

====Required field====

* _time

* Operation

* Parameters



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1114.002
| Remote Email Collection
| Collection
|-
| T1114
| Email Collection
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Service Accounts

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1114.002/suspicious_rights_delegation/suspicious_rights_delegation.json


''version'': 1
</div>
</div>

----

===O365 suspicious user email forwarding===
This search detects when multiple user configured a forwarding rule to the same destination.

* '''Product''': Splunk Security Analytics for AWS, Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1114/003/ T1114.003], [https://attack.mitre.org/techniques/T1114/ T1114]
* '''Last Updated''': 2020-12-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`o365_management_activity` Operation=Set-Mailbox 
| spath input=Parameters 
| rename Identity AS src_user 
| search ForwardingSmtpAddress=* 
| stats dc(src_user) AS count_src_user earliest(_time) as firstTime latest(_time) as lastTime values(src_user) AS src_user values(user) AS user by ForwardingSmtpAddress 
| where count_src_user &gt; 1 
|`security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
|`o365_suspicious_user_email_forwarding_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Office_365_Detections|Office 365 Detections]]

* [[Documentation:ESSOC:stories:UseCase#Data_Exfiltration|Data Exfiltration]]


====How To Implement====
You must install splunk Microsoft Office 365 add-on. This search works with o365:management:activity

====Required field====

* _time

* Operation

* Parameters



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1114.003
| Email Forwarding Rule
| Collection
|-
| T1114
| Email Collection
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1114.003/o365_email_forwarding_rule/o365_email_forwarding_rule.json


''version'': 1
</div>
</div>

----

===Aws detect attach to role policy===
This search provides detection of an user attaching itself to a different role trust policy. This can be used for lateral movement and escalation of privileges.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-07-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`aws_cloudwatchlogs_eks` attach policy
| spath requestParameters.policyArn 
| table sourceIPAddress user_access_key userIdentity.arn userIdentity.sessionContext.sessionIssuer.arn eventName errorCode errorMessage status action requestParameters.policyArn userIdentity.sessionContext.attributes.mfaAuthenticated userIdentity.sessionContext.attributes.creationDate  
| `aws_detect_attach_to_role_policy_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_Cross_Account_Activity|AWS Cross Account Activity]]


====How To Implement====
You must install splunk AWS add-on and Splunk App for AWS. This search works with cloudwatch logs

====Required field====

* _time

* requestParameters.policyArn



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
Attach to policy can create a lot of noise. This search can be adjusted to provide specific values to identify cases of abuse (i.e status=failure). The search can provide context for common users attaching themselves to higher privilege policies or even newly created policies.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Aws detect permanent key creation===
This search provides detection of accounts creating permanent keys. Permanent keys are not created by default and they are only needed for programmatic calls. Creation of Permanent key is an important event to monitor.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-07-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`aws_cloudwatchlogs_eks` CreateAccessKey 
| spath eventName 
| search eventName=CreateAccessKey &#34;userIdentity.type&#34;=IAMUser 
| table sourceIPAddress userName userIdentity.type userAgent action status responseElements.accessKey.createDate responseElements.accessKey.status responseElements.accessKey.accessKeyId 
|`aws_detect_permanent_key_creation_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_Cross_Account_Activity|AWS Cross Account Activity]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with cloudwatch logs

====Required field====

* _time

* eventName

* userIdentity.type

* sourceIPAddress

* userName userIdentity.type

* userAgent

* action

* status

* responseElements.accessKey.createDate

* esponseElements.accessKey.status

* responseElements.accessKey.accessKeyId



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
Not all permanent key creations are malicious. If there is a policy of rotating keys this search can be adjusted to provide better context.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Aws detect role creation===
This search provides detection of role creation by IAM users. Role creation is an event by itself if user is creating a new role with trust policies different than the available in AWS and it can be used for lateral movement and escalation of privileges.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-07-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`aws_cloudwatchlogs_eks` event_name=CreateRole action=created userIdentity.type=AssumedRole requestParameters.description=Allows* 
| table sourceIPAddress userIdentity.principalId userIdentity.arn action event_name awsRegion http_user_agent mfa_auth msg requestParameters.roleName requestParameters.description responseElements.role.arn responseElements.role.createDate 
| `aws_detect_role_creation_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_Cross_Account_Activity|AWS Cross Account Activity]]


====How To Implement====
You must install splunk AWS add-on and Splunk App for AWS. This search works with cloudwatch logs

====Required field====

* _time

* event_name

* action

* userIdentity.type

* requestParameters.description

* sourceIPAddress

* userIdentity.principalId

* userIdentity.arn

* action

* event_name

* awsRegion

* http_user_agent

* mfa_auth

* msg

* requestParameters.roleName

* requestParameters.description

* responseElements.role.arn

* responseElements.role.createDate



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
CreateRole is not very common in common users. This search can be adjusted to provide specific values to identify cases of abuse. In general AWS provides plenty of trust policies that fit most use cases.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Aws detect sts assume role abuse===
This search provides detection of suspicious use of sts:AssumeRole. These tokens can be created on the go and used by attackers to move laterally and escalate privileges.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078]
* '''Last Updated''': 2020-07-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cloudtrail` user_type=AssumedRole userIdentity.sessionContext.sessionIssuer.type=Role 
| table sourceIPAddress userIdentity.arn user_agent user_access_key status action requestParameters.roleName responseElements.role.roleName responseElements.role.createDate 
| `aws_detect_sts_assume_role_abuse_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_Cross_Account_Activity|AWS Cross Account Activity]]


====How To Implement====
You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs

====Required field====

* _time

* user_type

* userIdentity.sessionContext.sessionIssuer.type

* sourceIPAddress

* userIdentity.arn

* user_agent

* user_access_key

* status

* action

* requestParameters.roleName

* esponseElements.role.roleName

* esponseElements.role.createDate



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
Sts:AssumeRole can be very noisy as it is a standard mechanism to provide cross account and cross resources access. This search can be adjusted to provide specific values to identify cases of abuse.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Aws detect sts get session token abuse===
This search provides detection of suspicious use of sts:GetSessionToken. These tokens can be created on the go and used by attackers to move laterally and escalate privileges.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1550/ T1550]
* '''Last Updated''': 2020-07-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`aws_cloudwatchlogs_eks` ASIA  userIdentity.type=IAMUser
| spath eventName 
| search eventName=GetSessionToken 
| table sourceIPAddress eventTime userIdentity.arn userName userAgent user_type status region 
| `aws_detect_sts_get_session_token_abuse_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#AWS_Cross_Account_Activity|AWS Cross Account Activity]]


====How To Implement====
You must install splunk AWS add-on and Splunk App for AWS. This search works with cloudwatch logs

====Required field====

* _time

* userIdentity.type

* eventName

* sourceIPAddress

* eventTime

* userIdentity.arn

* userName

* userAgent

* user_type

* status

* region



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1550
| Use Alternate Authentication Material
| Defense Evasion, Lateral Movement
|}


====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
Sts:GetSessionToken can be very noisy as in certain environments numerous calls of this type can be executed. This search can be adjusted to provide specific values to identify cases of abuse. In specific environments the use of field requestParameters.serialNumber will need to be used.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----



==Endpoint==


===7zip commandline to smb share path===
This search is to detect a suspicious 7z process with commandline pointing to SMB network share. This technique was seen in CONTI LEAK tools where it use 7z to archive a sensitive files and place it in network share tmp folder. This search is a good hunting query that may give analyst a hint why specific user try to archive a file pointing to SMB user which is un usual.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1560/001/ T1560.001], [https://attack.mitre.org/techniques/T1560/ T1560]
* '''Last Updated''': 2021-08-17

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name =&#34;7z.exe&#34; OR Processes.process_name = &#34;7za.exe&#34; OR Processes.original_file_name = &#34;7z.exe&#34; OR Processes.original_file_name =  &#34;7za.exe&#34;) AND (Processes.process=&#34;*\\C$\\*&#34; OR Processes.process=&#34;*\\Admin$\\*&#34; OR Processes.process=&#34;*\\IPC$\\*&#34;) by Processes.original_file_name Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process Processes.parent_process_id Processes.process_id  Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `7zip_commandline_to_smb_share_path_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed 7z.exe may be used.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.parent_process_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1560.001
| Archive via Utility
| Collection
|-
| T1560
| Archive Collected Data
| Collection
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://threadreaderapp.com/thread/1423361119926816776.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/conti/conti_leak/windows-sysmon_7z.log


''version'': 1
</div>
</div>

----

===Access lsass memory for dump creation===
Detect memory dumping of the LSASS process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/001/ T1003.001], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2019-12-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=10 TargetImage=*lsass.exe CallTrace=*dbgcore.dll* OR CallTrace=*dbghelp.dll* 
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, TargetImage, TargetProcessId, SourceImage, SourceProcessId 
| rename Computer as dest 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `access_lsass_memory_for_dump_creation_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
This search requires Sysmon Logs and a Sysmon configuration, which includes EventCode 10 for lsass.exe. This search uses an input macro named `sysmon`. We strongly recommend that you specify your environment-specific configurations (index, source, sourcetype, etc.) for Windows Sysmon logs. Replace the macro definition with configurations for your Splunk environment. The search also uses a post-filter macro designed to filter out known false positives.

====Required field====

* _time

* EventCode

* TargetImage

* CallTrace

* Computer

* TargetProcessId

* SourceImage

* SourceProcessId



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.001
| LSASS Memory
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators can create memory dumps for debugging purposes, but memory dumps of the LSASS process would be unusual.

====Reference====


* https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.001/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Account discovery with net app===
this search is to detect a potential account discovery series of command used by several malware or attack to recon the target machine. This technique is also seen in some note worthy malware like trickbot where it runs a cmd process, or even drop its module that will execute the said series of net command. This series of command are good correlation search and indicator of attacker recon if seen in the machines within a none technical user or department (HR, finance, ceo and etc) network.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.parent_process) as parent_process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_net` AND (Processes.process=&#34;*user*&#34; OR  Processes.process=&#34;*config*&#34; OR Processes.process=&#34;*view /all*&#34;) by  Processes.process_name Processes.dest Processes.user Processes.parent_process_name 
| where count &gt;=5 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `account_discovery_with_net_app_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product..

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
admin or power user may used this series of command.

====Reference====


* https://labs.vipre.com/trickbot-and-its-modules/

* https://blog.whitehat.eu/2019/05/incident-trickbot-ryuk-2.html

* https://app.any.run/tasks/48414a33-3d66-4a46-afe5-c2003bb55ccf/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/trickbot/infection/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Active setup registry autostart===
This analytic is to detect a suspicious modification of the active setup registry for persistence and privilege escalation. This technique was seen in several malware (poisonIvy), adware and APT to gain persistence to the compromised machine upon boot up. This TTP is a good indicator to further check the process id that do the modification since modification of this registry is not commonly done. check the legitimacy of the file and process involve in this rules to check if it is a valid setup installer that creating or modifying this registry.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/014/ T1547.014], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2021-09-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_value_name = &#34;StubPath&#34; Registry.registry_key_name = &#34;*\\SOFTWARE\\Microsoft\\Active Setup\\Installed Components*&#34; by Registry.dest  Registry.user Registry.registry_path Registry.registry_key_name Registry.registry_value_name 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `active_setup_registry_autostart_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.dest

* Registry.user

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.014
| Active Setup
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Active setup installer may add or modify this registry.

====Reference====


* https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?Name=Backdoor%3aWin32%2fPoisonivy.E

* https://attack.mitre.org/techniques/T1547/014/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/t1547.014/active_setup_stubpath/sysmon.log


''version'': 1
</div>
</div>

----

===Add defaultuser and password in registry===
this search is to detect a suspicious registry modification to implement auto admin logon to a host. This technique was seen in BlackMatter ransomware to automatically logon to the compromise host after  triggering a safemode boot to continue encrypting the whole network. This behavior is not a common practice and really a suspicious TTP or alert need to be consider if found within then network premise.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1552/002/ T1552.002], [https://attack.mitre.org/techniques/T1552/ T1552]
* '''Last Updated''': 2021-09-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon*&#34; AND Registry.registry_key_name= DefaultPassword OR Registry.registry_key_name= DefaultUserName by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `add_defaultuser_and_password_in_registry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#BlackMatter_Ransomware|BlackMatter Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1552.002
| Credentials in Registry
| Credential Access
|-
| T1552
| Unsecured Credentials
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://news.sophos.com/en-us/2021/08/09/blackmatter-ransomware-emerges-from-the-shadow-of-darkside/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1552.002/autoadminlogon/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Adsisearcher account discovery===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the `[Adsisearcher]` type accelerator being used to query Active Directory for domain groups. Red Teams and adversaries may leverage `[Adsisearcher]` to enumerate domain users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*[adsisearcher]*&#34; Message = &#34;*objectcategory=user*&#34; Message = &#34;*.findAll()*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `adsisearcher_account_discovery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
The following Hunting analytic requires PowerShell operational logs to be imported. Modify the powershell macro as needed to match the sourcetype or add index. This analytic is specific to 4104, or PowerShell Script Block Logging.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1087/002/

* https://www.blackhillsinfosec.com/red-blue-purple/

* https://devblogs.microsoft.com/scripting/use-the-powershell-adsisearcher-type-accelerator-to-search-active-directory/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Allow file and printing sharing in firewall===
This search is to detect a suspicious modification of firewall to allow file and printer sharing. This technique was seen in ransomware to be able to discover more machine connected to the compromised host to encrypt more files

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/007/ T1562.007], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-06-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_netsh` Processes.process= &#34;*firewall*&#34; Processes.process= &#34;*group=\&#34;File and Printer Sharing\&#34;*&#34;  Processes.process=&#34;*enable=Yes*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `allow_file_and_printing_sharing_in_firewall_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.007
| Disable or Modify Cloud Firewall
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network admin may modify this firewall feature that may cause this rule to be triggered.

====Reference====


* https://kb.fortinet.com/kb/documentLink.do?externalID=FD52469

* https://app.any.run/tasks/c0f98850-af65-4352-9746-fbebadee4f05/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data2/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Allow inbound traffic by firewall rule registry===
This analytic detects a potential suspicious modification of firewall rule registry allowing inbound traffic in specific port with public profile. This technique was identified when an adversary wants to grant remote access to a machine by allowing the traffic in a firewall rule.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/001/ T1021.001], [https://attack.mitre.org/techniques/T1021/ T1021]
* '''Last Updated''': 2021-05-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\System\\CurrentControlSet\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\FirewallRules\\*&#34; Registry.registry_value_name = &#34;*
|Action=Allow
|*&#34; Registry.registry_value_name = &#34;*
|Dir=In
|*&#34; Registry.registry_value_name = &#34;*
|Profile=Public
|*&#34; Registry.registry_value_name = &#34;*
|LPort=*&#34; by Registry.registry_path Registry.registry_key_name Registry.user Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `allow_inbound_traffic_by_firewall_rule_registry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Prohibited_Traffic_Allowed_or_Protocol_Mismatch|Prohibited Traffic Allowed or Protocol Mismatch]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_value_name

* Registry.registry_key_name

* Registry.dest

* Registry.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021.001
| Remote Desktop Protocol
| Lateral Movement
|-
| T1021
| Remote Services
| Lateral Movement
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network admin may add/remove/modify public inbound firewall rule that may cause this rule to be triggered.

====Reference====


* https://docs.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/honeypots/casper/datasets1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Allow inbound traffic in firewall rule===
The following analytic identifies suspicious PowerShell command to allow inbound traffic inbound to a specific local port within the public profile. This technique was seen in some attacker want to have a remote access to a machine by allowing the traffic in firewall rule.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/001/ T1021.001], [https://attack.mitre.org/techniques/T1021/ T1021]
* '''Last Updated''': 2021-05-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*firewall*&#34; Message = &#34;*Inbound*&#34; Message = &#34;*Allow*&#34;  Message = &#34;*-LocalPort*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `allow_inbound_traffic_in_firewall_rule_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Prohibited_Traffic_Allowed_or_Protocol_Mismatch|Prohibited Traffic Allowed or Protocol Mismatch]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the powershell logs  from your endpoints. make sure you enable needed registry to monitor this event.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021.001
| Remote Desktop Protocol
| Lateral Movement
|-
| T1021
| Remote Services
| Lateral Movement
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
administrator may allow inbound traffic in certain network or machine.

====Reference====


* https://docs.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/honeypots/casper/datasets1/windows-powershell.log


''version'': 1
</div>
</div>

----

===Allow network discovery in firewall===
This search is to detect a suspicious modification to the firewall to allow network discovery on a machine. This technique was seen in couple of ransomware (revil, reddot) to discover other machine connected to the compromised host to encrypt more files.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/007/ T1562.007], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-06-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_netsh` Processes.process= &#34;*firewall*&#34; Processes.process= &#34;*group=\&#34;Network Discovery\&#34;*&#34;  Processes.process=&#34;*enable*&#34; Processes.process=&#34;*Yes*&#34; by Processes.dest Processes.user Processes.parent_process Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `allow_network_discovery_in_firewall_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Revil_Ransomware|Revil Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.007
| Disable or Modify Cloud Firewall
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network admin may modify this firewall feature that may cause this rule to be triggered.

====Reference====


* https://kb.fortinet.com/kb/documentLink.do?externalID=FD52469

* https://app.any.run/tasks/c0f98850-af65-4352-9746-fbebadee4f05/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data2/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Allow operation with consent admin===
This analytic identifies a potential privilege escalation attempt to perform malicious task. This registry modification is designed to allow the `Consent Admin` to perform an operation that requires elevation without consent or credentials. We also found this in some attacker to gain privilege escalation to the compromise machine.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\Microsoft\\Windows\\CurrentVersion\\Policies\\System*&#34; Registry.registry_key_name = ConsentPromptBehaviorAdmin Registry.registry_value_name = &#34;DWORD (0x00000000)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `allow_operation_with_consent_admin_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-gpsb/341747f5-6b5d-4d30-85fc-fa1cc04038d4

* https://www.trendmicro.com/vinfo/no/threat-encyclopedia/malware/Ransom.Win32.MRDEC.MRA/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Anomalous usage of 7zip===
The following detection identifies a 7z.exe spawned from `Rundll32.exe` or `Dllhost.exe`. It is assumed that the adversary has brought in `7z.exe` and `7z.dll`. It has been observed where an adversary will rename `7z.exe`. Additional coverage may be required to identify the behavior of renamed instances of `7z.exe`. During triage, identify the source of injection into `Rundll32.exe` or `Dllhost.exe`. Capture any files written to disk and analyze as needed. Review parallel processes for additional behaviors. Typically, archiving files will result in exfiltration.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1560/001/ T1560.001], [https://attack.mitre.org/techniques/T1560/ T1560]
* '''Last Updated''': 2021-04-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN (&#34;rundll32.exe&#34;, &#34;dllhost.exe&#34;) Processes.process_name=*7z* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `anomalous_usage_of_7zip_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.process_name

* Processes.parent_process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1560.001
| Archive via Utility
| Collection
|-
| T1560
| Archive Collected Data
| Collection
|}


====Kill Chain Phase====

* Actions on Objective


====Known False Positives====
False positives should be limited as this behavior is not normal for `rundll32.exe` or `dllhost.exe` to spawn and run 7zip.

====Reference====


* https://attack.mitre.org/techniques/T1560/001/

* https://www.microsoft.com/security/blog/2021/01/20/deep-dive-into-the-solorigate-second-stage-activation-from-sunburst-to-teardrop-and-raindrop/

* https://thedfirreport.com/2021/01/31/bazar-no-ryuk/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1560.001/archive_utility/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Any powershell downloadfile===
The following analytic identifies the use of PowerShell downloading a file using `DownloadFile` method. This particular method is utilized in many different PowerShell frameworks to download files and output to disk. Identify the source (IP/domain) and destination file and triage appropriately. If AMSI logging or PowerShell transaction logs are available, review for further details of the implant.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-03-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_powershell` Processes.process=*DownloadFile* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `any_powershell_downloadfile_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]

* [[Documentation:ESSOC:stories:UseCase#Ingress_Tool_Transfer|Ingress Tool Transfer]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives may be present and filtering will need to occur by parent process or command line argument. It may be required to modify this query to an EDR product for more granular coverage.

====Reference====


* https://docs.microsoft.com/en-us/dotnet/api/system.net.webclient.downloadfile?view=net-5.0

* https://blog.malwarebytes.com/malwarebytes-news/2021/02/lazyscripter-from-empire-to-double-rat/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1059.001/T1059.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Any powershell downloadstring===
The following analytic identifies the use of PowerShell downloading a file using `DownloadString` method. This particular method is utilized in many different PowerShell frameworks to download files and output to disk. Identify the source (IP/domain) and destination file and triage appropriately. If AMSI logging or PowerShell transaction logs are available, review for further details of the implant.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-03-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_powershell` Processes.process=*.DownloadString*  by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `any_powershell_downloadstring_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]

* [[Documentation:ESSOC:stories:UseCase#Ingress_Tool_Transfer|Ingress Tool Transfer]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives may be present and filtering will need to occur by parent process or command line argument. It may be required to modify this query to an EDR product for more granular coverage.

====Reference====


* https://docs.microsoft.com/en-us/dotnet/api/system.net.webclient.downloadstring?view=net-5.0

* https://blog.malwarebytes.com/malwarebytes-news/2021/02/lazyscripter-from-empire-to-double-rat/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1059.001/T1059.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Applying stolen credentials via mimikatz modules===
This detection indicates use of Mimikatz modules that facilitate Pass-the-Token attack, Golden or Silver kerberos ticket attack, and Skeleton key attack.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055], [https://attack.mitre.org/techniques/T1068/ T1068], [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1098/ T1098], [https://attack.mitre.org/techniques/T1134/ T1134], [https://attack.mitre.org/techniques/T1543/ T1543], [https://attack.mitre.org/techniques/T1547/ T1547], [https://attack.mitre.org/techniques/T1548/ T1548], [https://attack.mitre.org/techniques/T1554/ T1554], [https://attack.mitre.org/techniques/T1556/ T1556], [https://attack.mitre.org/techniques/T1558/ T1558]
* '''Last Updated''': 2020-11-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)kerberos::ptt/)=true OR match_regex(cmd_line, /(?i)kerberos::golden/)=true OR match_regex(cmd_line, /(?i)kerberos::silver/)=true OR match_regex(cmd_line, /(?i)misc::skeleton/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1098
| Account Manipulation
| Persistence
|-
| T1134
| Access Token Manipulation
| Defense Evasion, Privilege Escalation
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|-
| T1554
| Compromise Client Software Binary
| Persistence
|-
| T1556
| Modify Authentication Process
| Credential Access, Defense Evasion, Persistence
|-
| T1558
| Steal or Forge Kerberos Tickets
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz

* https://adsecurity.org/?p=1275



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1555/applying_stolen_credentials/logAllMimikatzModules.log


''version'': 1
</div>
</div>

----

===Applying stolen credentials via powersploit modules===
Stolen credentials are applied by methods such as user impersonation, credential injection, spoofing of authentication processes or getting hold of critical accounts. This detection indicates such activities carried out by PowerSploit exploit kit APIs.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055], [https://attack.mitre.org/techniques/T1068/ T1068], [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1098/ T1098], [https://attack.mitre.org/techniques/T1134/ T1134], [https://attack.mitre.org/techniques/T1543/ T1543], [https://attack.mitre.org/techniques/T1547/ T1547], [https://attack.mitre.org/techniques/T1548/ T1548], [https://attack.mitre.org/techniques/T1554/ T1554], [https://attack.mitre.org/techniques/T1555/ T1555], [https://attack.mitre.org/techniques/T1558/ T1558]
* '''Last Updated''': 2020-11-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Invoke-CredentialInjection/)=true OR match_regex(cmd_line, /(?i)Invoke-TokenManipulation/)=true OR match_regex(cmd_line, /(?i)Invoke-UserImpersonation/)=true OR match_regex(cmd_line, /(?i)Get-System/)=true OR match_regex(cmd_line, /(?i)Invoke-RevertToSelf/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1098
| Account Manipulation
| Persistence
|-
| T1134
| Access Token Manipulation
| Defense Evasion, Privilege Escalation
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|-
| T1554
| Compromise Client Software Binary
| Persistence
|-
| T1555
| Credentials from Password Stores
| Credential Access
|-
| T1558
| Steal or Forge Kerberos Tickets
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1555/applying_stolen_credentials/logAllPowerSploitModulesWithOldNames.log


''version'': 1
</div>
</div>

----

===Assessment of credential strength via dsinternals modules===
This detection identifies use of DSInternals modules that verify password strength, i.e., identify week accounts that would be easily compromised.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1098/ T1098], [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1201/ T1201], [https://attack.mitre.org/techniques/T1552/ T1552], [https://attack.mitre.org/techniques/T1555/ T1555]
* '''Last Updated''': 2020-11-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Test-PasswordQuality/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1098
| Account Manipulation
| Persistence
|-
| T1087
| Account Discovery
| Discovery
|-
| T1201
| Password Policy Discovery
| Discovery
|-
| T1552
| Unsecured Credentials
| Credential Access
|-
| T1555
| Credentials from Password Stores
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/MichaelGrafnetter/DSInternals



====Test Dataset====


''version'': 1
</div>
</div>

----

===Attacker tools on endpoint===
This search looks for execution of commonly used attacker tools on an endpoint.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036/005/ T1036.005], [https://attack.mitre.org/techniques/T1036/ T1036], [https://attack.mitre.org/techniques/T1003/ T1003], [https://attack.mitre.org/techniques/T1595/ T1595]
* '''Last Updated''': 2021-06-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Processes.process) as process values(Processes.parent_process) as parent_process from datamodel=Endpoint.Processes where Processes.dest!=unknown Processes.user!=unknown by Processes.dest Processes.user Processes.process_name Processes.process 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `drop_dm_object_name(Processes)` 
| lookup attacker_tools attacker_tool_names AS process_name OUTPUT description 
| search description=* 
| `attacker_tools_on_endpoint_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Monitor_for_Unauthorized_Software|Monitor for Unauthorized Software]]

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is usually generated via logs that report process tracking in your Windows audit settings.

====Required field====

* Processes.dest

* Processes.user

* Processes.process_name

* Processes.parent_process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1036.005
| Match Legitimate Name or Location
| Defense Evasion
|-
| T1036
| Masquerading
| Defense Evasion
|-
| T1003
| OS Credential Dumping
| Credential Access
|-
| T1595
| Active Scanning
| Reconnaissance
|}


====Kill Chain Phase====

* Installation

* Command and Control

* Actions on Objectives


====Known False Positives====
Some administrator activity can be potentially triggered, please add those users to the filter macro.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1595/attacker_scan_tools/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Attempt to add certificate to untrusted store===
Attempt To Add Certificate To Untrusted Store

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1553/004/ T1553.004], [https://attack.mitre.org/techniques/T1553/ T1553]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime values(Processes.process) as process max(_time) as lastTime from datamodel=Endpoint.Processes where `process_certutil` (Processes.process=*-addstore*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `attempt_to_add_certificate_to_untrusted_store_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Disabling_Security_Tools|Disabling Security Tools]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.process_name

* Processes.process

* Processes.parent_process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1553.004
| Install Root Certificate
| Defense Evasion
|-
| T1553
| Subvert Trust Controls
| Defense Evasion
|}


====Kill Chain Phase====

* Installation

* Actions on Objectives


====Known False Positives====
There may be legitimate reasons for administrators to add a certificate to the untrusted certificate store. In such cases, this will typically be done on a large number of systems.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1553.004/T1553.004.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1553.004/atomic_red_team/windows-sysmon.log


''version'': 7
</div>
</div>

----

===Attempt to disable services===
This analytic will identify suspicious series of command-line to disable several services. This technique is seen where the adversary attempts to disable security app services or other malware services to complete the objective on the compromised system.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1489/ T1489]
* '''Last Updated''': 2021-06-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval _datamodels=ucast(map_get(input_event, &#34;_datamodels&#34;), &#34;collection&lt;string&gt;&#34;, []), body={} 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=lower(ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null)), process_name=lower(ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null)), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line IS NOT NULL AND like(cmd_line, &#34;%disabled%&#34;) AND like(cmd_line, &#34;%config%&#34;) AND process_name=&#34;sc.exe&#34; 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name, &#34;process_path&#34;, process_path]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed sc.exe may be used.

====Required field====

* _time

* dest_device_id

* process_name

* parent_process_name

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1489
| Service Stop
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/

* https://app.any.run/tasks/c0f98850-af65-4352-9746-fbebadee4f05/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/ssa_data1/sc_disable.log


''version'': 2
</div>
</div>

----

===Attempt to stop security service===
This search looks for attempts to stop security-related services on the endpoint.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_net` OR  Processes.process_name = sc.exe Processes.process=&#34;* stop *&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
|lookup security_services_lookup service as process OUTPUTNEW category, description 
| search category=security 
| `attempt_to_stop_security_service_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Disabling_Security_Tools|Disabling Security Tools]]

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Installation

* Actions on Objectives


====Known False Positives====
None identified. Attempts to disable security-related services should be identified and understood.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1562.001/T1562.001.md#atomic-test-14---disable-arbitrary-security-windows-service



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_defend_service_stop/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Attempt to delete services===
This analytic identifies suspicious series of attempt to kill multiple services on a system using either `net.exe` or `sc.exe`. This technique is use by adversaries to terminate security services or other related services to continue there objective and evade detections.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1489/ T1489]
* '''Last Updated''': 2021-06-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=lower(ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null)), process_name=lower(ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null)), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line IS NOT NULL AND like(cmd_line, &#34;%delete%&#34;) AND process_name = &#34;sc.exe&#34; 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name, &#34;process_path&#34;, process_path]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed sc.exe may be used.

====Required field====

* _time

* dest_device_id

* process_name

* parent_process_name

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1489
| Service Stop
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/ssa_data1/sc_del.log


''version'': 2
</div>
</div>

----

===Attempted credential dump from registry via reg exe===
Monitor for execution of reg.exe with parameters specifying an export of keys that contain hashed credentials that attackers may try to crack offline.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/002/ T1003.002], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_reg` OR `process_cmd` Processes.process=*save* (Processes.process=*HKEY_LOCAL_MACHINE\\Security* OR Processes.process=*HKEY_LOCAL_MACHINE\\SAM* OR Processes.process=*HKEY_LOCAL_MACHINE\\System* OR Processes.process=*HKLM\\Security* OR Processes.process=*HKLM\\System* OR Processes.process=*HKLM\\SAM*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `attempted_credential_dump_from_registry_via_reg_exe_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.002
| Security Account Manager
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.002/T1003.002.md#atomic-test-1---registry-dump-of-sam-creds-and-secrets



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.002/atomic_red_team/windows-sysmon.log


''version'': 6
</div>
</div>

----

===Attempted credential dump from registry via reg exe===
Monitor for execution of reg.exe with parameters specifying an export of keys that contain hashed credentials that attackers may try to crack offline.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-6-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)) 
| eval process_name=lower(ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), dest_user_id=ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), dest_device_id=ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where process_name=&#34;cmd.exe&#34; OR process_name=&#34;reg.exe&#34; 
| where cmd_line != null  AND match_regex(cmd_line, /(?i)save\s+/)=true AND ( match_regex(cmd_line, /(?i)HKLM\\Security/)=true OR match_regex(cmd_line, /(?i)HKLM\\SAM/)=true OR match_regex(cmd_line, /(?i)HKLM\\System/)=true OR match_regex(cmd_line, /(?i)HKEY_LOCAL_MACHINE\\Security/)=true OR match_regex(cmd_line, /(?i)HKEY_LOCAL_MACHINE\\SAM/)=true OR match_regex(cmd_line, /(?i)HKEY_LOCAL_MACHINE\\System/)=true ) 
| eval start_time = timestamp, end_time = timestamp, entities = mvappend(dest_device_id, dest_user_id), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name]) 
| into write_ssa_detected_events(); </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
You must be ingesting windows endpoint data that tracks process activity, including parent-child relationships from your endpoints.

====Required field====

* process_name

* _time

* dest_device_id

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/splunk/security_content/blob/55a17c65f9f56c2220000b62701765422b46125d/detections/attempted_credential_dump_from_registry_via_reg_exe.yml



====Test Dataset====


''version'': 1
</div>
</div>

----

===Auto admin logon registry entry===
this search is to detect a suspicious registry modification to implement auto admin logon to a host. This technique was seen in BlackMatter ransomware to automatically logon to the compromise host after  triggering a safemode boot to continue encrypting the whole network. This behavior is not a common practice and really a suspicious TTP or alert need to be consider if found within then network premise.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1552/002/ T1552.002], [https://attack.mitre.org/techniques/T1552/ T1552]
* '''Last Updated''': 2021-09-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon*&#34; AND Registry.registry_key_name=AutoAdminLogon AND Registry.registry_value_name=1 by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `auto_admin_logon_registry_entry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#BlackMatter_Ransomware|BlackMatter Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1552.002
| Credentials in Registry
| Credential Access
|-
| T1552
| Unsecured Credentials
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://news.sophos.com/en-us/2021/08/09/blackmatter-ransomware-emerges-from-the-shadow-of-darkside/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1552.002/autoadminlogon/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Bcdedit failure recovery modification===
This search looks for flags passed to bcdedit.exe modifications to the built-in Windows error recovery boot configurations. This is typically used by ransomware to prevent recovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1490/ T1490]
* '''Last Updated''': 2020-12-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = bcdedit.exe Processes.process=&#34;*recoveryenabled*&#34; (Processes.process=&#34;* no*&#34;) by Processes.process_name Processes.process Processes.parent_process_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `bcdedit_failure_recovery_modification_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. Tune based on parent process names.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1490
| Inhibit System Recovery
| Impact
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators may modify the boot configuration.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1490/T1490.md#atomic-test-4---windows---disable-windows-recovery-console-repair



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1490/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Bits job persistence===
The following query identifies Microsoft Background Intelligent Transfer Service utility `bitsadmin.exe` scheduling a BITS job to persist on an endpoint. The query identifies the parameters used to create, resume or add a file to a BITS job. Typically seen combined in a oneliner or ran in sequence. If identified, review the BITS job created and capture any files written to disk. It is possible for BITS to be used to upload files and this may require further network data analysis to identify. You can use `bitsadmin /list /verbose` to list out the jobs during investigation.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1197/ T1197]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_bitsadmin` Processes.process IN (*create*, *addfile*, *setnotifyflags*, *setnotifycmdline*, *setminretrydelay*, *setcustomheaders*, *resume* ) by Processes.dest Processes.user Processes.original_file_name Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `bits_job_persistence_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#BITS_Jobs|BITS Jobs]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1197
| BITS Jobs
| Defense Evasion, Persistence
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives will be present. Typically, applications will use `BitsAdmin.exe`. Any filtering should be done based on command-line arguments (legitimate applications) or parent process.

====Reference====


* https://attack.mitre.org/techniques/T1197/

* https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1197/T1197.md#atomic-test-3---persist-download--execute

* https://lolbas-project.github.io/lolbas/Binaries/Bitsadmin/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1197/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Bitsadmin download file===
The following query identifies Microsoft Background Intelligent Transfer Service utility `bitsadmin.exe` using the `transfer` parameter to download a remote object. In addition, look for `download` or `upload` on the command-line, the switches are not required to perform a transfer. Capture any files downloaded. Review the reputation of the IP or domain used. Typically once executed, a follow on command will be used to execute the dropped file. Note that the network connection or file modification events related will not spawn or create from `bitsadmin.exe`, but the artifacts will appear in a parallel process of `svchost.exe` with a command-line similar to `svchost.exe -k netsvcs -s BITS`. It&#39;s important to review all parallel and child processes to capture any behaviors and artifacts. In some suspicious and malicious instances, BITS jobs will be created. You can use `bitsadmin /list /verbose` to list out the jobs during investigation.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1197/ T1197], [https://attack.mitre.org/techniques/T1105/ T1105]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_bitsadmin` Processes.process=*transfer* by Processes.dest Processes.user Processes.parent_process Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `bitsadmin_download_file_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ingress_Tool_Transfer|Ingress Tool Transfer]]

* [[Documentation:ESSOC:stories:UseCase#BITS_Jobs|BITS Jobs]]

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1197
| BITS Jobs
| Defense Evasion, Persistence
|-
| T1105
| Ingress Tool Transfer
| Command And Control
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives, however it may be required to filter based on parent process name or network connection.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/8eb52117b748d378325f7719554a896e37bccec7/atomics/T1105/T1105.md#atomic-test-9---windows---bitsadmin-bits-download

* https://github.com/redcanaryco/atomic-red-team/blob/bc705cb7aaa5f26f2d96585fac8e4c7052df0ff9/atomics/T1197/T1197.md

* https://docs.microsoft.com/en-us/windows/win32/bits/bitsadmin-tool

* https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1197/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Batch file write to system32===
The search looks for a batch file (.bat) written to the Windows system directory tree.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/ T1204], [https://attack.mitre.org/techniques/T1204/002/ T1204.002]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name=*  by _time span=1h Processes.process_id Processes.process_name Processes.dest 
| `drop_dm_object_name(Processes)` 
| join process_guid, _time [
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_path IN (&#34;*\\system32\\*&#34;, &#34;*\\syswow64\\*&#34;) Filesystem.file_name=&#34;*.bat&#34; by _time span=1h Filesystem.dest Filesystem.file_create_time Filesystem.file_name Filesystem.file_path 
| `drop_dm_object_name(Filesystem)` 
| fields _time dest file_create_time file_name file_path process_name process_path process] 
| dedup file_create_time 
| table dest file_create_time, file_name, file_path, process_name  
| `batch_file_write_to_system32_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Filesystem.dest

* Filesystem.file_name

* Filesystem.user

* Filesystem.file_path

* Processes.process_id

* Processes.process_name

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204
| User Execution
| Execution
|-
| T1204.002
| Malicious File
| Execution
|}


====Kill Chain Phase====

* Delivery


====Known False Positives====
It is possible for this search to generate a notable event for a batch file write to a path that includes the string &#34;system32&#34;, but is not the actual Windows system directory. As such, you should confirm the path of the batch file identified by the search. In addition, a false positive may be generated by an administrator copying a legitimate batch file in this directory tree. You should confirm that the activity is legitimate and modify the search to add exclusions, as necessary.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1204.002/batch_file_in_system32/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Bcdedit command back to normal mode boot===
This search is to detect a suspicious bcdedit commandline to configure the host from safe mode back to normal boot configuration. This technique was seen in blackMatter ransomware where it force the compromised host to boot in safe mode to continue its encryption and bring back to normal boot using bcdedit deletevalue command. This TTP can be a good alert for host that booted from safe mode forcefully since it need to modify the boot configuration to bring it back to normal.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1490/ T1490]
* '''Last Updated''': 2021-09-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = bcdedit.exe Processes.process=&#34;*/deletevalue*&#34; Processes.process=&#34;*{current}*&#34;  Processes.process=&#34;*safeboot*&#34; by Processes.process_name Processes.process Processes.parent_process_name Processes.dest Processes.user 
|`drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `bcdedit_command_back_to_normal_mode_boot_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#BlackMatter_Ransomware|BlackMatter Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.parent_process

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1490
| Inhibit System Recovery
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://news.sophos.com/en-us/2021/08/09/blackmatter-ransomware-emerges-from-the-shadow-of-darkside/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1552.002/autoadminlogon/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Chcp command execution===
This search is to detect execution of chcp.exe application. this utility is used to change the active code page of the console. This technique was seen in icedid malware to know the locale region/language/country of the compromise host.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059]
* '''Last Updated''': 2021-07-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=chcp.com Processes.parent_process_name = cmd.exe Processes.parent_process=*/c* by  Processes.process_name Processes.process Processes.parent_process_name Processes.parent_process Processes.process_id Processes.parent_process_id Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `chcp_command_execution_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed chcp.com may be used.

====Required field====

* _time

* process_name

* process

* parent_process_name

* parent_process

* process_id

* parent_process_id

* dest

* user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
other tools or script may used this to change code page to UTF-* or others

====Reference====


* https://ss64.com/nt/chcp.html

* https://twitter.com/tccontre18/status/1419941156633329665?s=20



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/simulated_icedid/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Cmd echo pipe - escalation===
This analytic identifies a common behavior by Cobalt Strike and other frameworks where the adversary will escalate privileges, either via `jump` (Cobalt Strike PTH) or `getsystem`, using named-pipe impersonation. A suspicious event will look like `cmd.exe /c echo 4sgryt3436 &gt; \\.\Pipe\5erg53`.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/003/ T1059.003], [https://attack.mitre.org/techniques/T1543/003/ T1543.003], [https://attack.mitre.org/techniques/T1543/ T1543]
* '''Last Updated''': 2021-05-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_cmd` OR Processes.process=*%comspec%* (Processes.process=*echo* AND Processes.process=*pipe*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `cmd_echo_pipe___escalation_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.003
| Windows Command Shell
| Execution
|-
| T1543.003
| Windows Service
| Persistence, Privilege Escalation
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation

* Privilege Escalation


====Known False Positives====
Unknown. It is possible filtering may be required to ensure fidelity.

====Reference====


* https://redcanary.com/threat-detection-report/threats/cobalt-strike/

* https://github.com/rapid7/meterpreter/blob/master/source/extensions/priv/server/elevate/namedpipe.c



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Cmlua or cmstplua uac bypass===
This analytic detects a potential process using COM Object like CMLUA or CMSTPLUA to bypass UAC. This technique has been used by ransomware adversaries to gain administrative privileges to its running process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/003/ T1218.003]
* '''Last Updated''': 2021-05-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=7  ImageLoaded IN (&#34;*\\CMLUA.dll&#34;, &#34;*\\CMSTPLUA.dll&#34;, &#34;*\\CMLUAUTIL.dll&#34;) NOT(process_name IN(&#34;CMSTP.exe&#34;, &#34;CMMGR32.exe&#34;)) NOT(Image IN(&#34;*\\windows\\*&#34;, &#34;*\\program files*&#34;)) 
| stats count min(_time) as firstTime max(_time) as lastTime by Image ImageLoaded process_name Computer EventCode Signed ProcessId 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `cmlua_or_cmstplua_uac_bypass_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name and imageloaded executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Image

* ImageLoaded

* process_name

* Computer

* EventCode

* Signed

* ProcessId



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.003
| CMSTP
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Legitimate windows application that are not on the list loading this dll. Filter as needed.

====Reference====


* https://attack.mitre.org/techniques/T1218/003/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548/darkside_cmstp_com/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Certutil download with urlcache and split arguments===
Certutil.exe may download a file from a remote destination using `-urlcache`. This behavior does require a URL to be passed on the command-line. In addition, `-f` (force) and `-split` (Split embedded ASN.1 elements, and save to files) will be used. It is not entirely common for `certutil.exe` to contact public IP space. However, it is uncommon for `certutil.exe` to write files to world writeable paths.\ During triage, capture any files on disk and review. Review the reputation of the remote IP or domain in question.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1105/ T1105]
* '''Last Updated''': 2021-03-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_certutil` Processes.process=*urlcache* Processes.process=*split* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.original_file_name Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `certutil_download_with_urlcache_and_split_arguments_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ingress_Tool_Transfer|Ingress Tool Transfer]]

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1105
| Ingress Tool Transfer
| Command And Control
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives in most environments, however tune as needed based on parent-child relationship or network connection.

====Reference====


* https://attack.mitre.org/techniques/T1105/

* https://www.avira.com/en/blog/certutil-abused-by-attackers-to-spread-threats

* https://www.fireeye.com/blog/threat-research/2019/10/certutil-qualms-they-came-to-drop-fombs.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1105/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Certutil download with verifyctl and split arguments===
Certutil.exe may download a file from a remote destination using `-VerifyCtl`. This behavior does require a URL to be passed on the command-line. In addition, `-f` (force) and `-split` (Split embedded ASN.1 elements, and save to files) will be used. It is not entirely common for `certutil.exe` to contact public IP space. \ During triage, capture any files on disk and review. Review the reputation of the remote IP or domain in question. Using `-VerifyCtl`, the file will either be written to the current working directory or `%APPDATA%\..\LocalLow\Microsoft\CryptnetUrlCache\Content\&lt;hash&gt;`. 

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1105/ T1105]
* '''Last Updated''': 2021-03-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_certutil` Processes.process=*verifyctl* Processes.process=*split* by Processes.dest Processes.user Processes.original_file_name Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `certutil_download_with_verifyctl_and_split_arguments_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ingress_Tool_Transfer|Ingress Tool Transfer]]

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1105
| Ingress Tool Transfer
| Command And Control
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives in most environments, however tune as needed based on parent-child relationship or network connection.

====Reference====


* https://attack.mitre.org/techniques/T1105/

* https://www.hexacorn.com/blog/2020/08/23/certutil-one-more-gui-lolbin/

* https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc732443(v=ws.11)#-verifyctl

* https://www.avira.com/en/blog/certutil-abused-by-attackers-to-spread-threats



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1105/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Certutil with decode argument===
CertUtil.exe may be used to `encode` and `decode` a file, including PE and script code. Encoding will convert a file to base64 with `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----` tags. Malicious usage will include decoding a encoded file that was downloaded. Once decoded, it will be loaded by a parallel process. Note that there are two additional command switches that may be used - `encodehex` and `decodehex`. Similarly, the file will be encoded in HEX and later decoded for further execution. During triage, identify the source of the file being decoded. Review its contents or execution behavior for further analysis.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1140/ T1140]
* '''Last Updated''': 2021-03-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_certutil` Processes.process=*decode* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `certutil_with_decode_argument_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Deobfuscate-Decode_Files_or_Information|Deobfuscate-Decode Files or Information]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1140
| Deobfuscate/Decode Files or Information
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Typically seen used to `encode` files, but it is possible to see legitimate use of `decode`. Filter based on parent-child relationship, file paths, endpoint or user.

====Reference====


* https://attack.mitre.org/techniques/T1140/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1140/T1140.md

* https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/certutil

* https://www.bleepingcomputer.com/news/security/certutilexe-could-allow-attackers-to-download-malware-while-bypassing-av/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1140/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Certutil exe certificate extraction===
This search looks for arguments to certutil.exe indicating the manipulation or extraction of Certificate. This certificate can then be used to sign new authentication tokens specially inside Federated environments such as Windows ADFS.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': 
* '''Last Updated''': 2021-01-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=certutil.exe Processes.process = &#34;*-exportPFX*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `certutil_exe_certificate_extraction_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Cloud_Federated_Credential_Abuse|Cloud Federated Credential Abuse]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id




====Kill Chain Phase====

* Installation


====Known False Positives====
Unless there are specific use cases, manipulating or exporting certificates using certutil is uncommon. Extraction of certificate has been observed during attacks such as Golden SAML and other campaigns targeting Federated services.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/suspicious_behaviour/certutil_exe_certificate_extraction/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Change default file association===
This analytic is developed to detect suspicious registry modification to change the default file association of windows to malicious payload. This techninique was seen in some APT where it modify the default process to run file association, like .txt to notepad.exe. Instead notepad.exe it will point to a Script or other payload that will load malicious command to the compromised host.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1546/001/ T1546.001], [https://attack.mitre.org/techniques/T1546/ T1546]
* '''Last Updated''': 2021-09-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path =&#34;*\\shell\\open\\command\\*&#34; Registry.registry_path = &#34;*HKCR\\*&#34; by Registry.dest  Registry.user Registry.registry_path Registry.registry_key_name Registry.registry_value_name 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `change_default_file_association_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.dest

* Registry.user

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1546.001
| Change Default File Association
| Privilege Escalation, Persistence
|-
| T1546
| Event Triggered Execution
| Privilege Escalation, Persistence
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://dmcxblue.gitbook.io/red-team-notes-2-0/red-team-techniques/privilege-escalation/untitled-3/accessibility-features



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.001/txtfile_reg/sysmon.log


''version'': 1
</div>
</div>

----

===Change to safe mode with network config===
This search is to detect a suspicious bcdedit commandline to configure the host to boot in safe mode with network config. This technique was seen in blackMatter ransomware where it force the compromised host to boot in safe mode to continue its encryption and bring back to normal boot using bcdedit deletevalue command. This TTP can be a good alert for host that booted from safe mode forcefully since it need to modify the boot configuration to bring it back to normal.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1490/ T1490]
* '''Last Updated''': 2021-09-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = bcdedit.exe Processes.process=&#34;*/set*&#34; Processes.process=&#34;*{current}*&#34;  Processes.process=&#34;*safeboot*&#34; Processes.process=&#34;*network*&#34; by Processes.process_name Processes.process Processes.parent_process_name Processes.dest Processes.user 
|`drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `change_to_safe_mode_with_network_config_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#BlackMatter_Ransomware|BlackMatter Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.parent_process

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1490
| Inhibit System Recovery
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://news.sophos.com/en-us/2021/08/09/blackmatter-ransomware-emerges-from-the-shadow-of-darkside/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1552.002/autoadminlogon/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Check elevated cmd using whoami===
This search is to detect a suspicious whoami execution to check if the cmd or shell instance process is with elevated privileges. This technique was seen in FIN7 js implant where it execute this as part of its data collection to the infected machine to check if the running shell cmd process is elevated or not. This TTP is really a good alert for known attacker that recon on the targetted host. This command is not so commonly executed by a normal user or even an admin to check if a process is elevated.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1033/ T1033]
* '''Last Updated''': 2021-09-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where  Processes.process = &#34;*whoami*&#34; Processes.process = &#34;*/group*&#34; Processes.process = &#34;* find *&#34; Processes.process = &#34;*12288*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `check_elevated_cmd_using_whoami_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Processes.parent_process_name

* Processes.parent_process

* Processes.process_name

* Processes.process_id

* Processes.process

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1033
| System Owner/User Discovery
| Discovery
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/fin7/fin7_js_2/sysmon.log


''version'': 1
</div>
</div>

----

===Child processes of spoolsv exe===
This search looks for child processes of spoolsv.exe. This activity is associated with a POC privilege-escalation exploit associated with CVE-2018-8440. Spoolsv.exe is the process associated with the Print Spooler service in Windows and typically runs as SYSTEM.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1068/ T1068]
* '''Last Updated''': 2020-03-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process_name) as process_name values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=spoolsv.exe AND Processes.process_name!=regsvr32.exe by Processes.dest Processes.parent_process Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `child_processes_of_spoolsv_exe_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model. Update the `children_of_spoolsv_filter` macro to filter out legitimate child processes spawned by spoolsv.exe.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.process_name

* Processes.dest

* Processes.parent_process

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Some legitimate printer-related processes may show up as children of spoolsv.exe. You should confirm that any activity as legitimate and may be added as exclusions in the search.

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Clear unallocated sector using cipher app===
this search is to detect execution of `cipher.exe` to clear the unallocated sectors of a specific disk. This technique was seen in some ransomware to make it impossible to forensically recover deleted files.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/004/ T1070.004], [https://attack.mitre.org/techniques/T1070/ T1070]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = &#34;cipher.exe&#34; Processes.process = &#34;*/w:*&#34; by Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process Processes.dest Processes.user Processes.process_id Processes.process_guid 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `clear_unallocated_sector_using_cipher_app_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070.004
| File Deletion
| Defense Evasion
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
administrator may execute this app to manage disk

====Reference====


* https://unit42.paloaltonetworks.com/vatet-pyxie-defray777/3/

* https://www.sophos.com/en-us/medialibrary/PDFs/technical-papers/sophoslabs-ransomware-behavior-report.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Clop common exec parameter===
The following analytics are designed to identifies some CLOP ransomware variant that using arguments to execute its main code or feature of its code. In this variant if the parameter is &#34;runrun&#34;, CLOP ransomware will try to encrypt files in network shares and if it is &#34;temp.dat&#34;, it will try to read from some stream pipe or file start encrypting files within the infected local machines. This technique can be also identified as an anti-sandbox technique to make its code non-responsive since it is waiting for some parameter to execute properly.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/ T1204]
* '''Last Updated''': 2021-03-17

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as cmdline values(Processes.parent_process_name) as parent_process values(Processes.process_name) count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name != &#34;*temp.dat*&#34; Processes.process = &#34;*runrun*&#34; OR Processes.process = &#34;*temp.dat*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `clop_common_exec_parameter_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204
| User Execution
| Execution
|}


====Kill Chain Phase====

* Obfuscation


====Known False Positives====
Operators can execute third party tools using these parameters.

====Reference====


* https://www.fireeye.com/blog/threat-research/2020/10/fin11-email-campaigns-precursor-for-ransomware-data-theft.html

* https://blog.virustotal.com/2020/11/keep-your-friends-close-keep-ransomware.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/clop/clop_b/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Clop ransomware known service name===
This detection is to identify the common service name created by the CLOP ransomware as part of its persistence and high privilege code execution in the infected machine. Ussually CLOP ransomware use StartServiceCtrlDispatcherW API in creating this service entry.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1543/ T1543]
* '''Last Updated''': 2021-03-17

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_system` EventCode=7045 Service_Name IN (&#34;SecurityCenterIBM&#34;, &#34;WinCheckDRVs&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Service_File_Name Service_Name Service_Start_Type Service_Type 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `clop_ransomware_known_service_name_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the Service name, Service File Name Service Start type, and Service Type from your endpoints.

====Required field====

* EventCode

* cmdline

* _time

* parent_process_name

* process_name

* OriginalFileName

* process_path



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Privilege Escalation


====Known False Positives====
unknown

====Reference====


* https://www.fireeye.com/blog/threat-research/2020/10/fin11-email-campaigns-precursor-for-ransomware-data-theft.html

* https://blog.virustotal.com/2020/11/keep-your-friends-close-keep-ransomware.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/clop/clop_a/windows-system.log


''version'': 1
</div>
</div>

----

===Cmdline tool not executed in cmd shell===
This search is to detect a suspicious parent process execution of commandline tool not in shell commandline. This technique was seen in FIN7 JSSLoader .net compile payload where it run ipconfig.exe and systeminfo.exe using .net application. This event cause some good TTP since those tool are commonly run in commandline not by another application. This TTP is a good indicator for application gather host information either an attacker or an automated tool made by admin.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/007/ T1059.007]
* '''Last Updated''': 2021-09-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where  (Processes.process_name = &#34;ipconfig.exe&#34; OR Processes.process_name = &#34;systeminfo.exe&#34;) AND NOT (Processes.parent_process_name = &#34;cmd.exe&#34; OR Processes.parent_process_name = &#34;powershell*&#34; OR Processes.parent_process_name = &#34;explorer.exe&#34;) by Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process_id Processes.process Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `cmdline_tool_not_executed_in_cmd_shell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.parent_process_name

* Processes.parent_process

* Processes.process_name

* Processes.process_id

* Processes.process

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.007
| JavaScript
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network operator or admin may create this type of tool to gather host information

====Reference====


* https://www.fireeye.com/blog/threat-research/2018/08/fin7-pursuing-an-enigmatic-and-evasive-global-criminal-operation.html

* https://attack.mitre.org/groups/G0046/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/fin7/jssloader/sysmon.log


''version'': 1
</div>
</div>

----

===Cobalt strike named pipes===
The following analytic identifies the use of default or publicly known named pipes used with Cobalt Strike. A named pipe is a named, one-way or duplex pipe for communication between the pipe server and one or more pipe clients. Cobalt Strike uses named pipes in many ways and has default values used with the Artifact Kit and Malleable C2 Profiles. The following query assists with identifying these default named pipes. Each EDR product presents named pipes a little different. Consider taking the values and generating a query based on the product of choice. \
Upon triage, review the process performing the named pipe. If it is explorer.exe, It is possible it was injected into by another process. Review recent parallel processes to identify suspicious patterns or behaviors. A parallel process may have a network connection, review and follow the connection back to identify any file modifications.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-02-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventID=17 OR EventID=18 PipeName IN (\\msagent_*, \\wkssvc*, \\DserNamePipe*, \\srvsvc_*, \\mojo.*, \\postex_*, \\status_*, \\MSSE-*, \\spoolss_*, \\win_svc*, \\ntsvcs*, \\winsock*, \\UIA_PIPE*) 
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, process_name, process_id process_path, PipeName 
| rename Computer as dest 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `cobalt_strike_named_pipes_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* EventID

* PipeName

* Computer

* process_name

* process_path

* process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
The idea of using named pipes with Cobalt Strike is to blend in. Therefore, some of the named pipes identified and added may cause false positives. Filter by process name or pipe name to reduce false positives.

====Reference====


* https://attack.mitre.org/techniques/T1218/009/

* https://docs.microsoft.com/en-us/windows/win32/ipc/named-pipes

* https://www.cobaltstrike.com/help-smb-beacon

* https://blog.cobaltstrike.com/2021/02/09/learn-pipe-fitting-for-all-of-your-offense-projects/

* https://gist.github.com/MHaggis/6c600e524045a6d49c35291a21e10752

* https://www.fireeye.com/blog/threat-research/2021/05/shining-a-light-on-darkside-ransomware-operations.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Common ransomware extensions===
The search looks for file modifications with extensions commonly used by Ransomware

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1485/ T1485]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Filesystem.user) as user values(Filesystem.dest) as dest values(Filesystem.file_path) as file_path from datamodel=Endpoint.Filesystem by Filesystem.file_name 
| `drop_dm_object_name(Filesystem)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)`
| rex field=file_name &#34;(?&lt;file_extension&gt;\.[^\.]+)$&#34; 
| `ransomware_extensions` 
| `common_ransomware_extensions_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint file-system data model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data.\
This search produces fields (`query`,`query_length`,`count`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure &gt; Incident Management &gt; Incident Review Settings &gt; Add New Entry):\\n1. **Label:** Name, **Field:** Name\
1. \
1. **Label:** File Extension, **Field:** file_extension\
Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details`

====Required field====

* _time

* Filesystem.user

* Filesystem.dest

* Filesystem.file_path

* Filesystem.file_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1485
| Data Destruction
| Impact
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
It is possible for a legitimate file with these extensions to be created. If this is a true ransomware attack, there will be a large number of files created with these extensions.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1485/ransomware_extensions/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Common ransomware notes===
The search looks for files created with names matching those typically used in ransomware notes that tell the victim how to get their data back.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1485/ T1485]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Filesystem.user) as user values(Filesystem.dest) as dest values(Filesystem.file_path) as file_path from datamodel=Endpoint.Filesystem by Filesystem.file_name 
| `drop_dm_object_name(Filesystem)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `ransomware_notes` 
| `common_ransomware_notes_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
You must be ingesting data that records file-system activity from your hosts to populate the Endpoint Filesystem data-model node. This is typically populated via endpoint detection-and-response product, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes.

====Required field====

* _time

* Filesystem.user

* Filesystem.dest

* Filesystem.file_path

* Filesystem.file_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1485
| Data Destruction
| Impact
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
It&#39;s possible that a legitimate file could be created with the same name used by ransomware note files.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1485/ransomware_notes/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Conti common exec parameter===
This search detects the suspicious commandline argument of revil ransomware to encrypt specific or all local drive and network shares of the compromised machine or host.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/ T1204]
* '''Last Updated''': 2021-06-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process = &#34;*-m local*&#34; OR Processes.process = &#34;*-m net*&#34; OR Processes.process = &#34;*-m all*&#34; OR Processes.process = &#34;*-nomutex*&#34; by Processes.process_name Processes.process Processes.parent_process_name Processes.parent_process Processes.dest Processes.user Processes.process_id Processes.process_guid 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `conti_common_exec_parameter_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204
| User Execution
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
3rd party tool may have commandline parameter that can trigger this detection.

====Reference====


* https://malpedia.caad.fkie.fraunhofer.de/details/win.conti



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/conti/inf1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Control loading from world writable directory===
The following detection identifies control.exe loading either a .cpl or .inf from a writable directory. This is related to CVE-2021-40444. During triage, review parallel processes, parent and child, for further suspicious behaviors. In addition, capture file modifications and analyze.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/002/ T1218.002]
* '''Last Updated''': 2021-09-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=control.exe OR Processes.original_file_name=CONTROL.EXE) AND Processes.process IN (&#34;*\\appdata\\*&#34;, &#34;*\\windows\\temp\\*&#34;, &#34;*\\programdata\\*&#34;) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `control_loading_from_world_writable_directory_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Microsoft_MSHTML_Remote_Code_Execution_CVE-2021-40444|Microsoft MSHTML Remote Code Execution CVE-2021-40444]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.002
| Control Panel
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives will be present as control.exe does not natively load from writable paths as defined. One may add .cpl or .inf to the command-line if there is any false positives. Tune as needed.

====Reference====


* https://strontic.github.io/xcyclopedia/library/rundll32.exe-111474C61232202B5B588D2B512CBB25.html

* https://app.any.run/tasks/36c14029-9df8-439c-bba0-45f2643b0c70/

* https://attack.mitre.org/techniques/T1218/011/

* https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.002/T1218.002.yaml



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.002/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Create remote thread in shell application===
This search is to detect suspicious process injection in command shell. This technique was seen in IcedID where it execute cmd.exe process to inject its shellcode as part of its execution as banking trojan. It is really uncommon to have a create remote thread execution in the following application.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-08-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=8 TargetImage IN (&#34;*\\cmd.exe&#34;, &#34;*\\powershell*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by  TargetImage TargetProcessId SourceProcessId  EventCode StartAddress SourceImage Computer 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `create_remote_thread_in_shell_application_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* SourceImage

* TargetImage

* TargetProcessId

* SourceProcessId

* StartAddress

* EventCode

* Computer



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://thedfirreport.com/2021/07/19/icedid-and-cobalt-strike-vs-antivirus/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/simulated_icedid/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Create remote thread into lsass===
Detect remote thread creation into LSASS consistent with credential dumping.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/001/ T1003.001], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2019-12-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventID=8 TargetImage=*lsass.exe 
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, EventCode, TargetImage, TargetProcessId 
| rename Computer as dest 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `create_remote_thread_into_lsass_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
This search needs Sysmon Logs with a Sysmon configuration, which includes EventCode 8 with lsass.exe. This search uses an input macro named `sysmon`. We strongly recommend that you specify your environment-specific configurations (index, source, sourcetype, etc.) for Windows Sysmon logs. Replace the macro definition with configurations for your Splunk environment. The search also uses a post-filter macro designed to filter out known false positives.

====Required field====

* _time

* EventID

* TargetImage

* Computer

* EventCode

* TargetImage

* TargetProcessId

* dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.001
| LSASS Memory
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Other tools can access LSASS for legitimate reasons and generate an event. In these cases, tweaking the search may help eliminate noise.

====Reference====


* https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.001/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Create service in suspicious file path===
This detection is to identify a creation of &#34;user mode service&#34; where the service file path is located in non-common service folder in windows.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1569/ T1569], [https://attack.mitre.org/techniques/T1569/002/ T1569.002]
* '''Last Updated''': 2021-03-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> `wineventlog_system` EventCode=7045  Service_File_Name = &#34;*\.exe&#34; NOT (Service_File_Name IN (&#34;C:\\Windows\\*&#34;, &#34;C:\\Program File*&#34;, &#34;C:\\Programdata\\*&#34;, &#34;%systemroot%\\*&#34;)) Service_Type = &#34;user mode service&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Service_File_Name Service_Name Service_Start_Type Service_Type 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `create_service_in_suspicious_file_path_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the Service name, Service File Name Service Start type, and Service Type from your endpoints.

====Required field====

* EventCode

* Service_File_Name

* Service_Type

* _time

* Service_Name

* Service_Start_Type



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1569
| System Services
| Execution
|-
| T1569.002
| Service Execution
| Execution
|}


====Kill Chain Phase====

* Privilege Escalation


====Known False Positives====
unknown

====Reference====


* https://www.fireeye.com/blog/threat-research/2020/10/fin11-email-campaigns-precursor-for-ransomware-data-theft.html

* https://blog.virustotal.com/2020/11/keep-your-friends-close-keep-ransomware.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/clop/clop_a/windows-system.log


''version'': 1
</div>
</div>

----

===Create local admin accounts using net exe===
This search looks for the creation of local administrator accounts using net.exe .

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1136/001/ T1136.001], [https://attack.mitre.org/techniques/T1136/ T1136]
* '''Last Updated''': 2021-09-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.user) as user values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=net.exe OR Processes.process_name=net1.exe) AND Processes.process=*/add* AND (Processes.process=*administrators* OR Processes.process=*administratoren* OR Processes.process=*administrateurs* OR Processes.process=*administrador* OR Processes.process=*amministratori* OR Processes.process=*administratorer*) by Processes.process Processes.process_name Processes.dest 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `create_local_admin_accounts_using_net_exe_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1136.001
| Local Account
| Persistence
|-
| T1136
| Create Account
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators often leverage net.exe to create admin accounts.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.001/atomic_red_team/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.001/atomic_red_team/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.001/atomic_red_team/windows-sysmon.log


''version'': 6
</div>
</div>

----

===Create or delete windows shares using net exe===
This search looks for the creation or deletion of hidden shares using net.exe.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/ T1070], [https://attack.mitre.org/techniques/T1070/005/ T1070.005]
* '''Last Updated''': 2020-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.user) as user values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_net` by Processes.process Processes.process_name Processes.original_file_name Processes.dest 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| search process=*share* 
| `create_or_delete_windows_shares_using_net_exe_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Hidden_Cobra_Malware|Hidden Cobra Malware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|-
| T1070.005
| Network Share Connection Removal
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators often leverage net.exe to create or delete network shares. You should verify that the activity was intentional and is legitimate.

====Reference====


* https://attack.mitre.org/techniques/T1070/005



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1070.005/atomic_red_team/windows-sysmon.log


''version'': 6
</div>
</div>

----

===Creation of shadow copy===
Monitor for signs that Vssadmin or Wmic has been used to create a shadow copy.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/003/ T1003.003], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2019-12-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=vssadmin.exe Processes.process=*create* Processes.process=*shadow*) OR (Processes.process_name=wmic.exe Processes.process=*shadowcopy* Processes.process=*create*) by Processes.dest Processes.user Processes.process_name Processes.process  Processes.parent_process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `creation_of_shadow_copy_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints, to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.003
| NTDS
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Legitimate administrator usage of Vssadmin or Wmic will create false positives.

====Reference====


* https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.003/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Creation of shadow copy with wmic and powershell===
This search detects the use of wmic and Powershell to create a shadow copy.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/003/ T1003.003], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_wmic` OR `process_powershell` Processes.process=*shadowcopy* Processes.process=*create* by Processes.user Processes.process_name Processes.original_file_name Processes.process Processes.dest 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `creation_of_shadow_copy_with_wmic_and_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.003
| NTDS
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Legtimate administrator usage of wmic to create a shadow copy.

====Reference====


* https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.003/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Creation of lsass dump with taskmgr===
Detect the hands on keyboard behavior of Windows Task Manager creating a process dump of lsass.exe. Upon this behavior occurring, a file write/modification will occur in the users profile under \AppData\Local\Temp. The dump file, lsass.dmp, cannot be renamed, however if the dump occurs more than once, it will be named lsass (2).dmp.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/001/ T1003.001], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-02-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventID=11 process_name=taskmgr.exe TargetFilename=*lsass*.dmp 
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, object_category, process_name, TargetFilename 
| rename Computer as dest 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `creation_of_lsass_dump_with_taskmgr_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
This search requires Sysmon Logs and a Sysmon configuration, which includes EventCode 11 for detecting file create of lsass.dmp. This search uses an input macro named `sysmon`. We strongly recommend that you specify your environment-specific configurations (index, source, sourcetype, etc.) for Windows Sysmon logs. Replace the macro definition with configurations for your Splunk environment. The search also uses a post-filter macro designed to filter out known false positives.

====Required field====

* _time

* EventID

* process_name

* TargetFilename

* Computer

* object_category



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.001
| LSASS Memory
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators can create memory dumps for debugging purposes, but memory dumps of the LSASS process would be unusual.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.001/T1003.001.md#atomic-test-5---dump-lsassexe-memory-using-windows-task-manager

* https://attack.mitre.org/techniques/T1003/001/

* https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.001/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Credential dumping via copy command from shadow copy===
This search detects credential dumping using copy command from a shadow copy.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/003/ T1003.003], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_cmd` (Processes.process=*\\system32\\config\\sam* OR Processes.process=*\\system32\\config\\security* OR Processes.process=*\\system32\\config\\system* OR Processes.process=*\\windows\\ntds\\ntds.dit*) by Processes.dest Processes.user Processes.process_name Processes.process  Processes.parent_process Processes.original_file_name Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `credential_dumping_via_copy_command_from_shadow_copy_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.003
| NTDS
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.003/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Credential dumping via symlink to shadow copy===
This search detects the creation of a symlink to a shadow copy.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/003/ T1003.003], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_cmd` Processes.process=*mklink* Processes.process=*HarddiskVolumeShadowCopy* by Processes.dest Processes.user Processes.process_name Processes.process  Processes.parent_process Processes.original_file_name Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `credential_dumping_via_symlink_to_shadow_copy_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.003
| NTDS
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.003/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Credential extraction indicative of fgdump and cachedump with s option===
Credential extraction is often an illegal recovery of credential material from secured authentication resources and repositories. This process may also involve decryption or other transformations of the stored credential material. FGdump is a newer version of pwdump tool that extracts NTLM and LanMan password hashes from Windows. Cachedump is a publicly-available tool that extracts cached password hashes from a system&#39;s registry.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND process_name != null AND parent_process_name != null AND match_regex(parent_process_name, /(?i)System32\\services.exe/)=true AND match_regex(process_name, /(?i)cachedump\d{0,2}.exe/)=true AND match_regex(process_path, /(?i)\\Temp/)=true AND match_regex(cmd_line, /(?i)\-s/)=true

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* process_name

* parent_process_name

* _time

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logFgdump.log


''version'': 1
</div>
</div>

----

===Credential extraction indicative of fgdump and cachedump with v option===
Credential extraction is often an illegal recovery of credential material from secured authentication resources and repositories. This process may also involve decryption or other transformations of the stored credential material. FGdump is a newer version of pwdump tool that extracts NTLM and LanMan password hashes from Windows. Cachedump is a publicly-available tool that extracts cached password hashes from a system&#39;s registry.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND process_name != null AND process_path != null AND match_regex(process_name, /(?i)cachedump\d{0,2}.exe/)=true AND match_regex(process_path, /(?i)\\Temp/)=true AND match_regex(cmd_line, /(?i)\-v/)=true

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* process_name

* _time

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logFgdump.log


''version'': 1
</div>
</div>

----

===Credential extraction indicative of lazagne command line options===
Credential extraction is often an illegal recovery of credential material from secured authentication resources and repositories. This process may also involve decryption or other transformations of the stored credential material. LaZagne is a tool that extracts various kinds of credentials from a local computer, including account passwords, domain passwords, browser passwords, etc.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003], [https://attack.mitre.org/techniques/T1555/ T1555]
* '''Last Updated''': 2020-10-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND match_regex(cmd_line, /(?i)all\s+\-oA\s+\-output/)=true

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|-
| T1555
| Credentials from Password Stores
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logLazagneCredDump.log


''version'': 1
</div>
</div>

----

===Credential extraction indicative of use of dsinternals credential conversion modules===
Credential extraction is often an illegal recovery of credential material from secured authentication resources and repositories. This process may also involve decryption or other transformations of the stored credential material. DSInternals is a collection of PowerShell modules commonly employed in exploits.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)ConvertFrom-ADManagedPasswordBlob/)=true OR match_regex(cmd_line, /(?i)ConvertFrom-GPPrefPassword/)=true OR match_regex(cmd_line, /(?i)ConvertFrom-UnicodePassword/)=true OR match_regex(cmd_line, /(?i)ConvertTo-GPPrefPassword/)=true OR match_regex(cmd_line, /(?i)ConvertTo-KerberosKey/)=true OR match_regex(cmd_line, /(?i)ConvertTo-LMHash/)=true OR match_regex(cmd_line, /(?i)ConvertTo-NTHash/)=true OR match_regex(cmd_line, /(?i)ConvertTo-OrgIdHash/)=true OR match_regex(cmd_line, /(?i)ConvertTo-UnicodePassword/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* process_name

* parent_process_name

* _time

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/MichaelGrafnetter/DSInternals



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logAllDSInternalsModules.log


''version'': 1
</div>
</div>

----

===Credential extraction indicative of use of dsinternals modules===
Credential extraction is often an illegal recovery of credential material from secured authentication resources and repositories. This process may also involve decryption or other transformations of the stored credential material. DSInternals is a collection of PowerShell modules commonly employed in exploits.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Get-ADDBBackupKey/)=true OR match_regex(cmd_line, /(?i)Get-ADDBDomainController/)=true OR match_regex(cmd_line, /(?i)Get-ADDBKdsRootKey/)=true OR match_regex(cmd_line, /(?i)Get-ADDBSchemaAttribute/)=true OR match_regex(cmd_line, /(?i)Get-ADKeyCredential/)=true OR match_regex(cmd_line, /(?i)Get-ADReplAccount/)=true OR match_regex(cmd_line, /(?i)Get-ADReplBackupKey/)=true OR match_regex(cmd_line, /(?i)Get-ADSIAccount/)=true OR match_regex(cmd_line, /(?i)Get-AzureADUserEx/)=true OR match_regex(cmd_line, /(?i)Get-BootKey/)=true OR match_regex(cmd_line, /(?i)Get-LsaBackupKey/)=true OR match_regex(cmd_line, /(?i)Get-LsaPolicyInformation/)=true OR match_regex(cmd_line, /(?i)Get-SamPasswordPolicy/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* process_name

* parent_process_name

* _time

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/MichaelGrafnetter/DSInternals



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logAllDSInternalsModules.log


''version'': 1
</div>
</div>

----

===Credential extraction indicative of use of mimikatz modules===
Credential extraction is often an illegal recovery of credential material from secured authentication resources and repositories. This process may also involve decryption or other transformations of the stored credential material. Mimikatz is a collection of tools and modules commonly employed in Windows exploits.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)CRYPTO::Certificates/)=true OR match_regex(cmd_line, /(?i)CRYPTO::keys/)=true OR match_regex(cmd_line, /(?i)kerberos::list/)=true OR match_regex(cmd_line, /(?i)kerberos::tgt/)=true OR match_regex(cmd_line, /(?i)lsadump::sam/)=true OR match_regex(cmd_line, /(?i)lsadump::secrets/)=true OR match_regex(cmd_line, /(?i)lsadump::cache/)=true OR match_regex(cmd_line, /(?i)lsadump::lsa/)=true OR match_regex(cmd_line, /(?i)lsadump::trust/)=true OR match_regex(cmd_line, /(?i)lsadump::backupkeys/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logAllMimikatzModules.log


''version'': 1
</div>
</div>

----

===Credential extraction indicative of use of powersploit modules===
Credential extraction is often an illegal recovery of credential material from secured authentication resources and repositories. This process may also involve decryption or other transformations of the stored credential material. PowerSploit is a collection of Microsoft PowerShell modules commonly employed in exploits.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Get-ApplicationHost/)=true OR match_regex(cmd_line, /(?i)Get-CachedGPPPassword/)=true OR match_regex(cmd_line, /(?i)Get-GPPAutologon/)=true OR match_regex(cmd_line, /(?i)Get-GPPPassword/)=true OR match_regex(cmd_line, /(?i)Get-RegistryAutoLogon/)=true OR match_regex(cmd_line, /(?i)Get-SiteListPassword/)=true OR match_regex(cmd_line, /(?i)Get-SPNTicket/)=true OR match_regex(cmd_line, /(?i)Request-SPNTicket/)=true OR match_regex(cmd_line, /(?i)Get-VaultCredential/)=true OR match_regex(cmd_line, /(?i)Invoke-Kerberoast/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logAllPowerSploitModulesWithOldNames.log


''version'': 1
</div>
</div>

----

===Credential extraction native microsoft debuggers peek into the kernel===
Credential extraction is often an illegal recovery of credential material from secured authentication resources and repositories. This process may also involve decryption or other transformations of the stored credential material. Native Microsoft debuggers, such as kd, ntkd, livekd and windbg, can be leveraged to read credential material directly from memory and process dumps.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND parent_process_name != null AND process_name != null  AND ( match_regex(parent_process_name, /(?i)ntkd\.exe/)=true OR match_regex(parent_process_name, /(?i)livekd\.exe/)=true ) AND match_regex(process_name, /(?i)conhost\.exe/)=true AND match_regex(cmd_line, /(?i)0xffffffff/)=true AND match_regex(cmd_line, /(?i)\-ForceV1/)=true

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* process_name

* parent_process_name

* _time

* dest_device_id

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, using debuggers this way may be indicative of developers analyzing crash dumps of their code. Note, even for developers this is an unusual way of working on code - debuggers are mostly used to step through code, not analyze its crash dumps.

====Reference====


* https://medium.com/@clermont1050/covid-19-cyber-infection-c615ead7c29



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logLiveKDFullKernelDump.log


''version'': 1
</div>
</div>

----

===Credential extraction native microsoft debuggers via z command line option===
Credential extraction is often an illegal recovery of credential material from secured authentication resources and repositories. This process may also involve decryption or other transformations of the stored credential material. Native Microsoft debuggers, such as kd, ntkd, livekd and windbg, can be leveraged to read credential material directly from memory and process dumps.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND process_name != null AND ( match_regex(process_name, /^(?i)ntkd\.exe/)=true OR match_regex(process_name, /^(?i)kd\.exe/)=true ) AND match_regex(cmd_line, /(?i)\-z\s+/)=true

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* process_name

* _time

* dest_device_id

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, using debuggers this way may be indicative of developers analyzing crash dumps of their code. Note, even for developers this is an unusual way of working on code - debuggers are mostly used to step through code, not analyze its crash dumps.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logLiveKDFullKernelDump.log


''version'': 1
</div>
</div>

----

===Credential extraction via get-addbaccount module present in powersploit and dsinternals===
Credential extraction is often an illegal recovery of credential material from secured authentication resources and repositories. This process may also involve decryption or other transformations of the stored credential material. PowerSploit and DSInternals are common exploit APIs offering PowerShell modules for various exploits of Windows and Active Directory environments.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND match_regex(cmd_line, /(?i)Get-ADDBAccount/)=true AND match_regex(cmd_line, /(?i)\-dbpath[\s;:\.\
|]+/)=true

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logPowerShellModule.log


''version'': 1
</div>
</div>

----

===Dllhost with no command line arguments with network===
The following analytic identifies DLLHost.exe with no command line arguments with a network connection. It is unusual for DLLHost.exe to execute with no command line arguments present. This particular behavior is common with malicious software, including Cobalt Strike. During investigation, triage any network connections and parallel processes. Identify any suspicious module loads related to credential dumping or file writes. DLLHost.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-10-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name=dllhost.exe by _time span=1h  Processes.process_guid Processes.process_name Processes.dest Processes.process_path Processes.process Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| regex process=&#34;(dllhost\.exe.{0,4}$)&#34; 
| join  process_guid [
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Ports where Ports.dest_port !=&#34;0&#34; by Ports.process_guid Ports.dest Ports.dest_port 
| `drop_dm_object_name(Ports)` 
| rename  dest as connection_to_CNC] 
| table _time dest parent_process_name process_name process_path process process_guid connection_to_CNC dest_port 
| `dllhost_with_no_command_line_arguments_with_network_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` and `port` node.

====Required field====

* _time

* EventID

* process_name

* process_id

* parent_process_name

* dest_port

* process_path



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Although unlikely, some legitimate third party applications may use a moved copy of dllhost, triggering a false positive.

====Reference====


* https://raw.githubusercontent.com/threatexpress/malleable-c2/c3385e481159a759f79b8acfe11acf240893b830/jquery-c2.4.2.profile

* https://blog.cobaltstrike.com/2021/02/09/learn-pipe-fitting-for-all-of-your-offense-projects/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon_dllhost.log


''version'': 2
</div>
</div>

----

===Dns exfiltration using nslookup app===
this search is to detect potential DNS exfiltration using nslookup application. This technique are seen in couple of malware and APT group to exfiltrated collected data in a infected machine or infected network. This detection is looking for unique use of nslookup where it tries to use specific record type, TXT, A, AAAA, that are commonly used by attacker and also the retry parameter which is designed to query C2 DNS multiple tries.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1048/ T1048]
* '''Last Updated''': 2021-04-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.process_id) as process_id values(Processes.parent_process) as parent_process count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = &#34;nslookup.exe&#34; Processes.process = &#34;*-querytype=*&#34; OR Processes.process=&#34;*-qt=*&#34; OR Processes.process=&#34;*-q=*&#34; OR Processes.process=&#34;-type=*&#34; OR Processes.process=&#34;*-retry=*&#34; by Processes.dest Processes.user Processes.process_name  
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `dns_exfiltration_using_nslookup_app_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_DNS_Traffic|Suspicious DNS Traffic]]

* [[Documentation:ESSOC:stories:UseCase#Dynamic_DNS|Dynamic DNS]]

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]

* [[Documentation:ESSOC:stories:UseCase#Data_Exfiltration|Data Exfiltration]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances of nslookup.exe may be used.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1048
| Exfiltration Over Alternative Protocol
| Exfiltration
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin nslookup usage

====Reference====


* https://www.fireeye.com/blog/threat-research/2017/03/fin7_spear_phishing.html

* https://www.varonis.com/blog/dns-tunneling/

* https://www.microsoft.com/security/blog/2021/01/20/deep-dive-into-the-solorigate-second-stage-activation-from-sunburst-to-teardrop-and-raindrop/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1048.003/nslookup_exfil/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Dsquery domain discovery===
The following analytic identifies &#34;dsquery.exe&#34; execution with arguments looking for `TrustedDomain` query directly on the command-line. This is typically indicative of an Administrator or adversary perform domain trust discovery. Note that this query does not identify any other variations of &#34;Dsquery.exe&#34; usage.\
Within this detection, it is assumed `dsquery.exe` is not moved or renamed.\
The search will return the first time and last time these command-line arguments were used for these executions, as well as the target system, the user, process &#34;dsquery.exe&#34; and its parent process.\
DSQuery.exe is natively found in `C:\Windows\system32` and `C:\Windows\syswow64` and only on Server operating system.\
The following DLL(s) are loaded when DSQuery.exe is launched `dsquery.dll`. If found loaded by another process, it is possible dsquery is running within that process context in memory.\
In addition to trust discovery, review parallel processes for additional behaviors performed. Identify the parent process and capture any files (batch files, for example) being used.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1482/ T1482]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=dsquery.exe Processes.process=*trustedDomain* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `dsquery_domain_discovery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Domain_Trust_Discovery|Domain Trust Discovery]]

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1482
| Domain Trust Discovery
| Discovery
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives. If there is a true false positive, filter based on command-line or parent process.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1482/T1482.md

* http://www.harmj0y.net/blog/redteaming/a-guide-to-attacking-domain-trusts/

* https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc732952(v=ws.11)

* https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc754232(v=ws.11)



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1482/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Delete a net user===
This analytic will detect a suspicious net.exe/net1.exe command-line to delete a user on a system. This technique may be use by an administrator for legitimate purposes, however this behavior has been used in the wild to impair some user or deleting adversaries tracks created during its lateral movement additional systems. During triage, review parallel processes for additional behavior. Identify any other user accounts created before or after.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1489/ T1489]
* '''Last Updated''': 2021-06-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=lower(ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null)), process_name=lower(ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null)), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line IS NOT NULL AND like(cmd_line, &#34;%/delete%&#34;) AND (process_name=&#34;net1.exe&#34; OR process_name=&#34;net.exe&#34;) 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name, &#34;process_path&#34;, process_path]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
o successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed net.exe may be used.

====Required field====

* _time

* dest_device_id

* process_name

* parent_process_name

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1489
| Service Stop
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
System administrators or scripts may delete user accounts via this technique. Filter as needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/ssa_data1/net_user_del.log


''version'': 2
</div>
</div>

----

===Delete shadowcopy with powershell===
This following analytic detects PowerShell command to delete shadow copy using the WMIC PowerShell module. This technique was seen used by a recent adversary to deploy DarkSide Ransomware where it executed a child process of PowerShell to execute a hex encoded command to delete shadow copy. This hex encoded command was able to be decrypted by PowerShell log.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1490/ T1490]
* '''Last Updated''': 2021-05-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message= &#34;*ShadowCopy*&#34; (Message = &#34;*Delete*&#34; OR Message = &#34;*Remove*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `delete_shadowcopy_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Revil_Ransomware|Revil Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the powershell logs  from your endpoints. make sure you enable needed registry to monitor this event.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1490
| Inhibit System Recovery
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.fireeye.com/blog/threat-research/2021/05/shining-a-light-on-darkside-ransomware-operations.html

* https://searchwindowsserver.techtarget.com/tutorial/Set-up-PowerShell-script-block-logging-for-added-security



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/revil/inf1/windows-powershell.log


''version'': 1
</div>
</div>

----

===Deleting of net users===
This analytic will detect a suspicious net.exe/net1.exe command-line to delete a user on a system. This technique may be use by an administrator for legitimate purposes, however this behavior has been used in the wild to impair some user or deleting adversaries tracks created during its lateral movement additional systems. During triage, review parallel processes for additional behavior. Identify any other user accounts created before or after.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1531/ T1531]
* '''Last Updated''': 2021-05-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.parent_process) as parent_process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_net` AND Processes.process=&#34;*user*&#34; AND  Processes.process=&#34;*/delete*&#34; by  Processes.process_name Processes.original_file_name Processes.dest Processes.user Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `deleting_of_net_users_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1531
| Account Access Removal
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
System administrators or scripts may delete user accounts via this technique. Filter as needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Deleting shadow copies===
The vssadmin.exe utility is used to interact with the Volume Shadow Copy Service.  Wmic is an interface to the Windows Management Instrumentation.  This search looks for either of these tools being used to delete shadow copies.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1490/ T1490]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=vssadmin.exe OR Processes.process_name=wmic.exe) Processes.process=*delete* Processes.process=*shadow* by Processes.user Processes.process_name Processes.parent_process_name Processes.dest  
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `deleting_shadow_copies_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Log_Manipulation|Windows Log Manipulation]]

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1490
| Inhibit System Recovery
| Impact
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
vssadmin.exe and wmic.exe are standard applications shipped with modern versions of windows. They may be used by administrators to legitimately delete old backup copies, although this is typically rare.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1490/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Deny permission using cacls utility===
This analytic identifies a potential adversary that changes the security permission of a specific file or directory. This technique is commonly seen in APT tradecraft, ransomware or coinminer scripts. This behavior is meant to evade detection and prevent access to their component files.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1222/ T1222]
* '''Last Updated''': 2021-06-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line IS NOT NULL AND match_regex(cmd_line, /(?i)deny/)=true AND (process_name=&#34;cacls.exe&#34; OR process_name=&#34;xcacls.exe&#34; OR process_name=&#34;icacls.exe&#34;) 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name, &#34;process_path&#34;, process_path]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed icacls.exe may be used.

====Required field====

* _time

* dest_device_id

* process_name

* parent_process_name

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1222
| File and Directory Permissions Modification
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network administrator may use this windows utility but this is not a common practice.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1222.001/ssa_cacls/all_icalc.log


''version'': 2
</div>
</div>

----

===Detect activity related to pass the hash attacks===
This search looks for specific authentication events from the Windows Security Event logs to detect potential attempts at using the Pass-the-Hash technique.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1550/ T1550], [https://attack.mitre.org/techniques/T1550/002/ T1550.002]
* '''Last Updated''': 2020-10-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4624 (Logon_Type=3 Logon_Process=NtLmSsp WorkstationName=WORKSTATION NOT AccountName=&#34;ANONYMOUS LOGON&#34;) OR (Logon_Type=9 Logon_Process=seclogo) 
| fillnull 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode, Logon_Type, WorkstationName, user, dest 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_activity_related_to_pass_the_hash_attacks_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]


====How To Implement====
To successfully implement this search, you must ingest your Windows Security Event logs and leverage the latest TA for Windows.

====Required field====

* _time

* EventCode

* Logon_Type

* Logon_Process

* WorkstationName

* user

* dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1550
| Use Alternate Authentication Material
| Defense Evasion, Lateral Movement
|-
| T1550.002
| Pass the Hash
| Defense Evasion, Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1550.002/atomic_red_team/windows-security.log


''version'': 5
</div>
</div>

----

===Detect azurehound command-line arguments===
The following analytic identifies the common command-line argument used by AzureHound `Invoke-AzureHound`. Being the script is FOSS, function names may be modified, but these changes are dependent upon the operator. In most instances the defaults are used. This analytic works to identify the common command-line attributes used. It does not cover the entirety of every argument in order to avoid false positives.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1069/001/ T1069.001], [https://attack.mitre.org/techniques/T1482/ T1482], [https://attack.mitre.org/techniques/T1087/001/ T1087.001], [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1069/002/ T1069.002], [https://attack.mitre.org/techniques/T1069/ T1069]
* '''Last Updated''': 2021-06-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process IN (&#34;*invoke-azurehound*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_azurehound_command_line_arguments_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Discovery_Techniques|Discovery Techniques]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1069.001
| Local Groups
| Discovery
|-
| T1482
| Domain Trust Discovery
| Discovery
|-
| T1087.001
| Local Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|-
| T1069
| Permission Groups Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Unknown.

====Reference====


* https://attack.mitre.org/software/S0521/

* https://github.com/BloodHoundAD/BloodHound/tree/master/Collectors

* https://posts.specterops.io/introducing-bloodhound-4-0-the-azure-update-9b2b26c5e350

* https://github.com/BloodHoundAD/BloodHound/blob/master/Collectors/AzureHound.ps1



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/sharphound/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect azurehound file modifications===
The following analytic is similar to SharpHound file modifications, but this instance covers the use of Invoke-AzureHound. AzureHound is the SharpHound equivilent but for Azure. It&#39;s possible this may never be seen in an environment as most attackers may execute this tool remotely. Once execution is complete, a zip file with a similar name will drop `20210601090751-azurecollection.zip`. In addition to the zip, multiple .json files will be written to disk, which are in the zip.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1069/001/ T1069.001], [https://attack.mitre.org/techniques/T1482/ T1482], [https://attack.mitre.org/techniques/T1087/001/ T1087.001], [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1069/002/ T1069.002], [https://attack.mitre.org/techniques/T1069/ T1069]
* '''Last Updated''': 2021-06-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Filesystem where Filesystem.file_name IN (&#34;*-azurecollection.zip&#34;, &#34;*-azprivroleadminrights.json&#34;, &#34;*-azglobaladminrights.json&#34;, &#34;*-azcloudappadmins.json&#34;, &#34;*-azapplicationadmins.json&#34;) by Filesystem.file_create_time Filesystem.process_id  Filesystem.file_name Filesystem.file_path Filesystem.dest 
| `drop_dm_object_name(Filesystem)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_azurehound_file_modifications_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Discovery_Techniques|Discovery Techniques]]


====How To Implement====
To successfully implement this search you need to be ingesting information on file modifications that include the name of the process, and file, responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Filesystem` node.

====Required field====

* _time

* file_path

* dest

* file_name

* process_id

* file_create_time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1069.001
| Local Groups
| Discovery
|-
| T1482
| Domain Trust Discovery
| Discovery
|-
| T1087.001
| Local Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|-
| T1069
| Permission Groups Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
False positives should be limited as the analytic is specific to a filename with extension .zip. Filter as needed.

====Reference====


* https://posts.specterops.io/introducing-bloodhound-4-0-the-azure-update-9b2b26c5e350

* https://raw.githubusercontent.com/BloodHoundAD/BloodHound/master/Collectors/AzureHound.ps1



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/sharphound/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect baron samedit cve-2021-3156===
This search detects the heap-based buffer overflow of sudoedit

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1068/ T1068]
* '''Last Updated''': 2021-01-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`linux_hosts` 
| search &#34;sudoedit -s \\&#34; 
| `detect_baron_samedit_cve_2021_3156_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Baron_Samedit_CVE-2021-3156|Baron Samedit CVE-2021-3156]]


====How To Implement====
Splunk Universal Forwarder running on Linux systems, capturing logs from the /var/log directory. The vulnerability is exposed when a non privledged user tries passing in a single \ character at the end of the command while using the shell and edit flags.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://blog.qualys.com/vulnerabilities-research/2021/01/26/cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect baron samedit cve-2021-3156 segfault===
This search detects the heap-based buffer overflow of sudoedit

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1068/ T1068]
* '''Last Updated''': 2021-01-29

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`linux_hosts` 
| search sudoedit segfault 
| stats count min(_time) as firstTime max(_time) as lastTime by host 
| search count &gt; 5 
| `detect_baron_samedit_cve_2021_3156_segfault_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Baron_Samedit_CVE-2021-3156|Baron Samedit CVE-2021-3156]]


====How To Implement====
Splunk Universal Forwarder running on Linux systems (tested on Centos and Ubuntu), where segfaults are being logged.  This also captures instances where the exploit has been compiled into a binary. The detection looks for greater than 5 instances of sudoedit combined with segfault over your search time period on a single host

====Required field====

* _time

* host



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
If sudoedit is throwing segfaults for other reasons this will pick those up too.

====Reference====


* https://blog.qualys.com/vulnerabilities-research/2021/01/26/cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect baron samedit cve-2021-3156 via osquery===
This search detects the heap-based buffer overflow of sudoedit

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1068/ T1068]
* '''Last Updated''': 2021-01-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`osquery_process` 
| search &#34;columns.cmdline&#34;=&#34;sudoedit -s \\*&#34; 
| `detect_baron_samedit_cve_2021_3156_via_osquery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Baron_Samedit_CVE-2021-3156|Baron Samedit CVE-2021-3156]]


====How To Implement====
OSQuery installed and configured to pick up process events (info at https://osquery.io) as well as using the Splunk OSQuery Add-on https://splunkbase.splunk.com/app/4402. The vulnerability is exposed when a non privledged user tries passing in a single \ character at the end of the command while using the shell and edit flags.

====Required field====

* _time

* columns.cmdline



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://blog.qualys.com/vulnerabilities-research/2021/01/26/cve-2021-3156-heap-based-buffer-overflow-in-sudo-baron-samedit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect computer changed with anonymous account===
This search looks for Event Code 4742 (Computer Change) or EventCode 4624 (An account was successfully logged on) with an anonymous account.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1210/ T1210]
* '''Last Updated''': 2020-09-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4624 OR EventCode=4742 TargetUserName=&#34;ANONYMOUS LOGON&#34; LogonType=3 
| stats count values(host) as host, values(TargetDomainName) as Domain, values(user) as user 
| `detect_computer_changed_with_anonymous_account_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Detect_Zerologon_Attack|Detect Zerologon Attack]]


====How To Implement====
This search requires audit computer account management to be enabled on the system in order to generate Event ID 4742. We strongly recommend that you specify your environment-specific configurations (index, source, sourcetype, etc.) for Windows Event Logs. Replace the macro definition with configurations for your Splunk environment. The search also uses a post-filter macro designed to filter out known false positives.

====Required field====

* _time

* EventCode

* TargetUserName

* LogonType

* TargetDomainName

* user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1210
| Exploitation of Remote Services
| Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None thus far found

====Reference====


* https://www.lares.com/blog/from-lares-labs-defensive-guidance-for-zerologon-cve-2020-1472/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect copy of shadowcopy with script block logging===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable on critical endpoints or all. \
This analytic identifies `copy` or `[System.IO.File]::Copy` being used to capture the SAM, SYSTEM or SECURITY hives identified in script block. This will catch the most basic use cases for credentials being taken for offline cracking. \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/002/ T1003.002], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message IN (&#34;*copy*&#34;,&#34;*[System.IO.File]::Copy*&#34;) AND Message IN (&#34;*System32\\config\\SAM*&#34;, &#34;*System32\\config\\SYSTEM*&#34;,&#34;*System32\\config\\SECURITY*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by OpCode ComputerName User EventCode Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_copy_of_shadowcopy_with_script_block_logging_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Message

* OpCode

* ComputerName

* User

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.002
| Security Account Manager
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives as the scope is limited to SAM, SYSTEM and SECURITY hives.

====Reference====


* https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-36934

* https://github.com/GossiTheDog/HiveNightmare

* https://github.com/JumpsecLabs/Guidance-Advice/tree/main/SAM_Permissions



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.002/serioussam/windows-powershell.log


''version'': 1
</div>
</div>

----

===Detect credential dumping through lsass access===
This search looks for reading lsass memory consistent with credential dumping.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/001/ T1003.001], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2019-12-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=10 TargetImage=*lsass.exe (GrantedAccess=0x1010 OR GrantedAccess=0x1410) 
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, SourceImage, SourceProcessId, TargetImage, TargetProcessId, EventCode, GrantedAccess 
| rename Computer as dest 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_credential_dumping_through_lsass_access_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#Detect_Zerologon_Attack|Detect Zerologon Attack]]


====How To Implement====
This search needs Sysmon Logs and a sysmon configuration, which includes EventCode 10 with lsass.exe. This search uses an input macro named `sysmon`. We strongly recommend that you specify your environment-specific configurations (index, source, sourcetype, etc.) for Windows Sysmon logs. Replace the macro definition with configurations for your Splunk environment. The search also uses a post-filter macro designed to filter out known false positives.

====Required field====

* _time

* EventCode

* TargetImage

* GrantedAccess

* Computer

* SourceImage

* SourceProcessId

* TargetImage

* TargetProcessId



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.001
| LSASS Memory
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
The activity may be legitimate. Other tools can access lsass for legitimate reasons, and it&#39;s possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.001/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Detect dump lsass memory using comsvcs===
This search detects the memory of lsass.exe being dumped for offline credential theft attack.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/003/ T1003.003], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-09-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval tenant=ucast(map_get(input_event, &#34;_tenant&#34;), &#34;string&#34;, null), machine=ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null), process_name=lower(ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null)), timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), process=lower(ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null)), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where process_name LIKE &#34;%rundll32.exe%&#34; AND match_regex(process, /(?i)comsvcs.dll[,\s]+MiniDump/)=true 
| eval start_time = timestamp, end_time = timestamp, entities = mvappend(machine), body=create_map([&#34;event_id&#34;, event_id, &#34;process_name&#34;, process_name, &#34;process&#34;, process]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including Windows command line logging. You can see how we test this with [Event Code 4688](https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4688a) on the [attack_range](https://github.com/splunk/attack_range/blob/develop/ansible/roles/windows_common/tasks/windows-enable-4688-cmd-line-audit.yml).

====Required field====

* process_name

* _tenant

* _time

* dest_device_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.003
| NTDS
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.001/atomic_red_team/windows-security.log


''version'': 1
</div>
</div>

----

===Detect empire with powershell script block logging===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable on critical endpoints or all. \
This analytic identifies the common PowerShell stager used by PowerShell-Empire. Each stager that may use PowerShell all uses the same pattern. The initial HTTP will be base64 encoded and use `system.net.webclient`. Note that some obfuscation may evade the analytic. \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-06-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104  (Message=*system.net.webclient* AND Message=*frombase64string*) 
| stats count min(_time) as firstTime max(_time) as lastTime by OpCode ComputerName User EventCode Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_empire_with_powershell_script_block_logging_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Message

* OpCode

* ComputerName

* User

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives may only pertain to it not being related to Empire, but another framework. Filter as needed if any applications use the same pattern.

====Reference====


* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/

* https://github.com/BC-SECURITY/Empire



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/powershell_script_block_logging/windows-powershell.log


''version'': 1
</div>
</div>

----

===Detect excessive account lockouts from endpoint===
This search identifies endpoints that have caused a relatively high number of account lockouts in a short period.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1078/002/ T1078.002]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(All_Changes.user) as user from datamodel=Change.All_Changes where nodename=All_Changes.Account_Management All_Changes.result=&#34;lockout&#34; by All_Changes.dest All_Changes.result 
|`drop_dm_object_name(&#34;All_Changes&#34;)` 
|`drop_dm_object_name(&#34;Account_Management&#34;)`
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| search count &gt; 5 
| `detect_excessive_account_lockouts_from_endpoint_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Account_Monitoring_and_Controls|Account Monitoring and Controls]]


====How To Implement====
You must ingest your Windows security event logs in the `Change` datamodel under the nodename is `Account_Management`, for this search to execute successfully. Please consider updating the cron schedule and the count of lockouts you want to monitor, according to your environment. \
 **Splunk&gt;Phantom Playbook Integration**\
If Splunk&gt;Phantom is also configured in your environment, a Playbook called &#34;Excessive Account Lockouts Enrichment and Response&#34; can be configured to run when any results are found by this detection search. The Playbook executes the Contextual and Investigative searches in this Story, conducts additional information gathering on Windows endpoints, and takes a response action to shut down the affected endpoint. To use this integration, install the Phantom App for Splunk `https://splunkbase.splunk.com/app/3411/`, add the correct hostname to the &#34;Phantom Instance&#34; field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active. \
(Playbook Link:`https://my.phantom.us/4.1/playbook/excessive-account-lockouts-enrichment-and-response/`).\


====Required field====

* _time

* All_Changes.user

* nodename

* All_Changes.result

* All_Changes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078.002
| Domain Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
It&#39;s possible that a widely used system, such as a kiosk, could cause a large number of account lockouts.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078.002/account_lockout/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078.002/account_lockout/windows-system.log


''version'': 5
</div>
</div>

----

===Detect excessive user account lockouts===
This search detects user accounts that have been locked out a relatively high number of times in a short period.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1078/003/ T1078.003]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Change.All_Changes where nodename=All_Changes.Account_Management All_Changes.result=&#34;lockout&#34; by All_Changes.user All_Changes.result 
|`drop_dm_object_name(&#34;All_Changes&#34;)` 
|`drop_dm_object_name(&#34;Account_Management&#34;)`
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| search count &gt; 5 
| `detect_excessive_user_account_lockouts_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Account_Monitoring_and_Controls|Account Monitoring and Controls]]


====How To Implement====
ou must ingest your Windows security event logs in the `Change` datamodel under the nodename is `Account_Management`, for this search to execute successfully. Please consider updating the cron schedule and the count of lockouts you want to monitor, according to your environment.

====Required field====

* _time

* All_Changes.result

* nodename

* All_Changes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1078.003
| Local Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|}


====Kill Chain Phase====


====Known False Positives====
It is possible that a legitimate user is experiencing an issue causing multiple account login failures leading to lockouts.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078.002/account_lockout/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1078.002/account_lockout/windows-system.log


''version'': 3
</div>
</div>

----

===Detect exchange web shell===
The following query identifies suspicious .aspx created in 3 paths identified by Microsoft as known drop locations for Exchange exploitation related to HAFNIUM group and recently disclosed vulnerablity named ProxyShell. Paths include: `\HttpProxy\owa\auth\`, `\inetpub\wwwroot\aspnet_client\`, and `\HttpProxy\OAB\`. Upon triage, the suspicious .aspx file will likely look obvious on the surface. inspect the contents for script code inside. Identify additional log sources, IIS included, to review source and other potential exploitation. It is often the case that a particular threat is only applicable to a specific subset of systems in your environment. Typically analytics to detect those threats are written without the benefit of being able to only target those systems as well. Writing analytics against all systems when those behaviors are limited to identifiable subsets of those systems is suboptimal. Consider the case ProxyShell vulnerability on Microsoft Exchange Servers. With asset information, a hunter can limit their analytics to systems that have been identified as Exchange servers. A hunter may start with the theory that the exchange server is communicating with new systems that it has not previously. If this theory is run against all publicly facing systems, the amount of noise it will generate will likely render this theory untenable. However, using the asset information to limit this analytic to just the Exchange servers will reduce the noise allowing the hunter to focus only on the systems where this behavioral change is relevant.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1505/ T1505], [https://attack.mitre.org/techniques/T1505/003/ T1505.003]
* '''Last Updated''': 2021-10-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name=System  by _time span=1h Processes.process_id Processes.process_name Processes.dest 
| `drop_dm_object_name(Processes)` 
| join process_guid, _time [
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_path IN (&#34;*\\HttpProxy\\owa\\auth\\*&#34;, &#34;*\\inetpub\\wwwroot\\aspnet_client\\*&#34;, &#34;*\\HttpProxy\\OAB\\*&#34;) Filesystem.file_name=&#34;*.aspx&#34; by _time span=1h Filesystem.dest Filesystem.file_create_time Filesystem.file_name Filesystem.file_path 
| `drop_dm_object_name(Filesystem)` 
| fields _time dest file_create_time file_name file_path process_name process_path process] 
| dedup file_create_time 
| table dest file_create_time, file_name, file_path, process_name 
| `detect_exchange_web_shell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]

* [[Documentation:ESSOC:stories:UseCase#ProxyShell|ProxyShell]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node and `Filesystem` node.

====Required field====

* _time

* Filesystem.file_path

* Filesystem.process_id

* Filesystem.file_name

* Filesystem.file_hash

* Filesystem.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1505
| Server Software Component
| Persistence
|-
| T1505.003
| Web Shell
| Persistence
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
The query is structured in a way that `action` (read, create) is not defined. Review the results of this query, filter, and tune as necessary. It may be necessary to generate this query specific to your endpoint product.

====Reference====


* https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Sample%20Data/Feeds/MSTICIoCs-ExchangeServerVulnerabilitiesDisclosedMarch2021.csv

* https://www.zerodayinitiative.com/blog/2021/8/17/from-pwn2own-2021-a-new-attack-surface-on-microsoft-exchange-proxyshell

* https://www.youtube.com/watch?v=FC6iHw258RI

* https://www.huntress.com/blog/rapid-response-microsoft-exchange-servers-still-vulnerable-to-proxyshell-exploit#what-should-you-do



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1505.003/windows-sysmon_proxylogon.log


''version'': 3
</div>
</div>

----

===Detect html help renamed===
The following analytic identifies a renamed instance of hh.exe (HTML Help) executing a Compiled HTML Help (CHM). This particular technique will load Windows script code from a compiled help file. CHM files may contain nearly any file type embedded, but only execute html/htm. Upon a successful execution, the following script engines may be used for execution - JScript, VBScript, VBScript.Encode, JScript.Encode, JScript.Compact. Analyst may identify vbscript.dll or jscript.dll loading into hh.exe upon execution. The &#34;htm&#34; and &#34;html&#34; file extensions were the only extensions observed to be supported for the execution of Shortcut commands or WSH script code. During investigation, identify script content origination. Validate it is the legitimate version of hh.exe by reviewing the PE metadata. hh.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/001/ T1218.001]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_hh` by Processes.dest Processes.user Processes.parent_process_name Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_html_help_renamed_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Compiled_HTML_Activity|Suspicious Compiled HTML Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.001
| Compiled HTML File
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely a renamed instance of hh.exe will be used legitimately, filter as needed.

====Reference====


* https://attack.mitre.org/techniques/T1218/001/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.001/T1218.001.md

* https://lolbas-project.github.io/lolbas/Binaries/Hh/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.001/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Detect html help spawn child process===
The following analytic identifies hh.exe (HTML Help) execution of a Compiled HTML Help (CHM) that spawns a child process. This particular technique will load Windows script code from a compiled help file. CHM files may contain nearly any file type embedded, but only execute html/htm. Upon a successful execution, the following script engines may be used for execution - JScript, VBScript, VBScript.Encode, JScript.Encode, JScript.Compact. Analyst may identify vbscript.dll or jscript.dll loading into hh.exe upon execution. The &#34;htm&#34; and &#34;html&#34; file extensions were the only extensions observed to be supported for the execution of Shortcut commands or WSH script code. During investigation, identify script content origination. Review child process events and investigate further. hh.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/001/ T1218.001]
* '''Last Updated''': 2021-02-11

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=hh.exe by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_html_help_spawn_child_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Compiled_HTML_Activity|Suspicious Compiled HTML Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.001
| Compiled HTML File
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, some legitimate applications (ex. web browsers) may spawn a child process. Filter as needed.

====Reference====


* https://attack.mitre.org/techniques/T1218/001/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.001/T1218.001.md

* https://lolbas-project.github.io/lolbas/Binaries/Hh/

* https://gist.github.com/mgeeky/cce31c8602a144d8f2172a73d510e0e7

* https://cyberforensicator.com/2019/01/20/silence-dissecting-malicious-chm-files-and-performing-forensic-analysis/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.001/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect html help url in command line===
The following analytic identifies hh.exe (HTML Help) execution of a Compiled HTML Help (CHM) file from a remote url. This particular technique will load Windows script code from a compiled help file. CHM files may  contain nearly any file type embedded, but only execute html/htm. Upon a successful execution, the following script engines may be used for execution - JScript, VBScript, VBScript.Encode, JScript.Encode, JScript.Compact. Analyst may identify vbscript.dll or jscript.dll loading into hh.exe upon execution. The &#34;htm&#34; and &#34;html&#34; file extensions were the only extensions observed to be supported for the execution of Shortcut commands or WSH script code. During investigation, identify script content origination. Review reputation of remote IP and domain. Some instances, it is worth decompiling the .chm file to review its original contents. hh.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/001/ T1218.001]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_hh` Processes.process=*http* by Processes.dest Processes.user Processes.parent_process Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_html_help_url_in_command_line_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Compiled_HTML_Activity|Suspicious Compiled HTML Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.001
| Compiled HTML File
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, some legitimate applications may retrieve a CHM remotely, filter as needed.

====Reference====


* https://attack.mitre.org/techniques/T1218/001/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.001/T1218.001.md

* https://lolbas-project.github.io/lolbas/Binaries/Hh/

* https://blog.sevagas.com/?Hacking-around-HTA-files

* https://gist.github.com/mgeeky/cce31c8602a144d8f2172a73d510e0e7

* https://cyberforensicator.com/2019/01/20/silence-dissecting-malicious-chm-files-and-performing-forensic-analysis/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.001/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect html help using infotech storage handlers===
The following analytic identifies hh.exe (HTML Help) execution of a Compiled HTML Help (CHM) file using InfoTech Storage Handlers. This particular technique will load Windows script code from a compiled help file, using InfoTech Storage Handlers. itss.dll will load upon execution. Three InfoTech Storage handlers are supported - ms-its, its, mk:@MSITStore. ITSS may be used to launch a specific html/htm file from within a CHM file. CHM files may contain nearly any file type embedded. Upon a successful execution, the following script engines may be used for execution - JScript, VBScript, VBScript.Encode, JScript.Encode, JScript.Compact. Analyst may identify vbscript.dll or jscript.dll loading into hh.exe upon execution. The &#34;htm&#34; and &#34;html&#34; file extensions were the only extensions observed to be supported for the execution of Shortcut commands or WSH script code. During investigation, identify script content origination. hh.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/001/ T1218.001]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_hh` Processes.process IN (&#34;*its:*&#34;, &#34;*mk:@MSITStore:*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_html_help_using_infotech_storage_handlers_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Compiled_HTML_Activity|Suspicious Compiled HTML Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.001
| Compiled HTML File
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
It is rare to see instances of InfoTech Storage Handlers being used, but it does happen in some legitimate instances. Filter as needed.

====Reference====


* https://attack.mitre.org/techniques/T1218/001/

* https://www.kb.cert.org/vuls/id/851869

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.001/T1218.001.md

* https://lolbas-project.github.io/lolbas/Binaries/Hh/

* https://gist.github.com/mgeeky/cce31c8602a144d8f2172a73d510e0e7

* https://cyberforensicator.com/2019/01/20/silence-dissecting-malicious-chm-files-and-performing-forensic-analysis/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.001/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect kerberoasting===
This search detects a potential kerberoasting attack via service principal name requests

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1558/003/ T1558.003], [https://attack.mitre.org/techniques/T1558/ T1558]
* '''Last Updated''': 2020-10-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| from read_ssa_enriched_events() 
| eval _time=map_get(input_event, &#34;_time&#34;), EventCode=map_get(input_event, &#34;event_code&#34;), TicketOptions=map_get(input_event, &#34;ticket_options&#34;), TicketEncryptionType=map_get(input_event, &#34;ticket_encryption_type&#34;), ServiceName=map_get(input_event, &#34;service_name&#34;), ServiceID=map_get(input_event, &#34;service_id&#34;), dest_user_id=ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), dest_device_id=ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where EventCode=&#34;4769&#34; AND TicketOptions=&#34;0x40810000&#34; AND TicketEncryptionType=&#34;0x17&#34; 
| first_time_event input_columns=[&#34;EventCode&#34;,&#34;TicketOptions&#34;,&#34;TicketEncryptionType&#34;,&#34;ServiceName&#34;,&#34;ServiceID&#34;] 
| where first_time_EventCode_TicketOptions_TicketEncryptionType_ServiceName_ServiceID 
| eval start_time=_time, end_time=_time, body=create_map([&#34;event_id&#34;, event_id, &#34;EventCode&#34;, EventCode, &#34;ServiceName&#34;, ServiceName, &#34;TicketOptions&#34;, TicketOptions, &#34;TicketEncryptionType&#34;, TicketEncryptionType]), entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null))
| select start_time, end_time, entities, body 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
The test data is converted from Windows Security Event logs generated from Attach Range simulation and used in SPL search and extended to SPL2

====Required field====

* service_name

* _time

* event_code

* ticket_encryption_type

* service_id

* ticket_options



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1558.003
| Kerberoasting
| Credential Access
|-
| T1558
| Steal or Forge Kerberos Tickets
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Older systems that support kerberos RC4 by default NetApp may generate false positives

====Reference====


* Initial ESCU implementation by Jose Hernandez and Patrick Bareiss



====Test Dataset====


''version'': 2
</div>
</div>

----

===Detect mshta url in command line===
This analytic identifies when Microsoft HTML Application Host (mshta.exe) utility is used to make remote http connections. Adversaries may use mshta.exe to proxy the download and execution of remote .hta files. The analytic identifies command line arguments of http and https being used. This technique is commonly used by malicious software to bypass preventative controls. The search will return the first time and last time these command-line arguments were used for these executions, as well as the target system, the user, process &#34;rundll32.exe&#34; and its parent process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/005/ T1218.005]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_mshta` (Processes.process=&#34;*http://*&#34; OR Processes.process=&#34;*https://*&#34;) by Processes.user Processes.process_name Processes.parent_process_name Processes.original_file_name Processes.dest  
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_mshta_url_in_command_line_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_MSHTA_Activity|Suspicious MSHTA Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.005
| Mshta
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
It is possible legitimate applications may perform this behavior and will need to be filtered.

====Reference====


* https://github.com/redcanaryco/AtomicTestHarnesses

* https://redcanary.com/blog/introducing-atomictestharnesses/

* https://docs.microsoft.com/en-us/windows/win32/search/-search-3x-wds-extidx-prot-implementing



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.005/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect mimikatz using loaded images===
This search looks for reading loaded Images unique to credential dumping with Mimikatz. Deprecated because mimikatz libraries changed and very noisy sysmon Event Code.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/001/ T1003.001], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2019-12-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=7 
| stats values(ImageLoaded) as ImageLoaded values(ProcessId) as ProcessId by Computer, Image 
| search ImageLoaded=*WinSCard.dll ImageLoaded=*cryptdll.dll ImageLoaded=*hid.dll ImageLoaded=*samlib.dll ImageLoaded=*vaultcli.dll 
| rename Computer as dest 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_mimikatz_using_loaded_images_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#Detect_Zerologon_Attack|Detect Zerologon Attack]]

* [[Documentation:ESSOC:stories:UseCase#Cloud_Federated_Credential_Abuse|Cloud Federated Credential Abuse]]

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]


====How To Implement====
This search needs Sysmon Logs and a sysmon configuration, which includes EventCode 7 with powershell.exe. This search uses an input macro named `sysmon`. We strongly recommend that you specify your environment-specific configurations (index, source, sourcetype, etc.) for Windows Sysmon logs. Replace the macro definition with configurations for your Splunk environment. The search also uses a post-filter macro designed to filter out known false positives.

====Required field====

* _time

* EventCode

* ImageLoaded

* ProcessId

* Computer

* Image



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.001
| LSASS Memory
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Other tools can import the same DLLs. These tools should be part of a whitelist. False positives may be present with any process that authenticates or uses credentials, PowerShell included. Filter based on parent process.

====Reference====


* https://cyberwardog.blogspot.com/2017/03/chronicles-of-threat-hunter-hunting-for.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect mimikatz with powershell script block logging===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable no critical endpoints or all. \
This analytic identifies common Mimikatz functions that may be identified in the script block, including `mimikatz`. This will catch the most basic use cases for Pass the Ticket, Pass the Hash and `-DumprCreds`. \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-06-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message IN (*mimikatz*, *-dumpcr*, *sekurlsa::pth*, *kerberos::ptt*, *kerberos::golden*) 
| stats count min(_time) as firstTime max(_time) as lastTime by OpCode ComputerName User EventCode Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_mimikatz_with_powershell_script_block_logging_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Message

* OpCode

* ComputerName

* User

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited as the commands being identifies are quite specific to EventCode 4104 and Mimikatz. Filter as needed.

====Reference====


* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/powershell_script_block_logging/windows-powershell.log


''version'': 1
</div>
</div>

----

===Detect new local admin account===
This search looks for newly created accounts that have been elevated to local administrators.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1136/001/ T1136.001], [https://attack.mitre.org/techniques/T1136/ T1136]
* '''Last Updated''': 2020-07-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4720 OR (EventCode=4732 Group_Name=Administrators) 
| transaction member_id connected=false maxspan=180m 
| rename member_id as user 
| stats count min(_time) as firstTime max(_time) as lastTime by user dest 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_new_local_admin_account_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]


====How To Implement====
You must be ingesting Windows event logs using the Splunk Windows TA and collecting event code 4720 and 4732

====Required field====

* _time

* EventCode

* Group_Name

* member_id

* dest

* user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1136.001
| Local Account
| Persistence
|-
| T1136
| Create Account
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives

* Command and Control


====Known False Positives====
The activity may be legitimate. For this reason, it&#39;s best to verify the account with an administrator and ask whether there was a valid service request for the account creation. If your local administrator group name is not &#34;Administrators&#34;, this search may generate an excessive number of false positives

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.001/atomic_red_team/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.001/atomic_red_team/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.001/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect outlook exe writing a zip file===
This search looks for execution of process `outlook.exe` where the process is writing a `.zip` file to the disk.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly`  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes where Processes.process_name=outlook.exe OR Processes.process_name=explorer.exe by _time span=5m Processes.parent_process_id Processes.process_id Processes.dest Processes.process_name Processes.parent_process_name Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| rename process_id as malicious_id
| rename parent_process_id as outlook_id
| join malicious_id type=inner[
| tstats `security_content_summariesonly` count values(Filesystem.file_path) as file_path values(Filesystem.file_name) as file_name  FROM datamodel=Endpoint.Filesystem where (Filesystem.file_path=*zip*   OR Filesystem.file_name=*.lnk ) AND (Filesystem.file_path=C:\\Users* OR Filesystem.file_path=*Local\\Temp*) by  _time span=5m Filesystem.process_id Filesystem.file_hash Filesystem.dest  
| `drop_dm_object_name(Filesystem)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| rename process_id as malicious_id
| fields malicious_id outlook_id dest file_path file_name file_hash count file_id] 
| table firstTime lastTime user malicious_id outlook_id process_name parent_process_name file_name  file_path 
| where file_name != &#34;&#34; 
| `detect_outlook_exe_writing_a_zip_file_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]


====How To Implement====
You must be ingesting data that records filesystem and process activity from your hosts to populate the Endpoint data model. This is typically populated via endpoint detection-and-response product, such as Carbon Black, or endpoint data sources, such as Sysmon.

====Required field====

* _time

* Processes.process_name

* Processes.parent_process_id

* Processes.process_id

* Processes.dest

* Processes.parent_process_name

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Installation

* Actions on Objectives


====Known False Positives====
It is not uncommon for outlook to write legitimate zip files to the disk.

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Detect pass the hash===
This search looks for specific authentication events from the Windows Security Event logs to detect potential attempts using Pass-the-Hash technique.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1550/ T1550], [https://attack.mitre.org/techniques/T1550/002/ T1550.002]
* '''Last Updated''': 2020-10-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)) 
| eval signature_id=map_get(input_event, &#34;signature_id&#34;), authentication_type=map_get(input_event, &#34;authentication_type&#34;), authentication_method=map_get(input_event, &#34;authentication_method&#34;), origin_device_domain=map_get(input_event, &#34;origin_device_domain&#34;), dest_user_id=ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), dest_device_id=ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null)

| where (authentication_type=&#34;3&#34; AND authentication_method=&#34;NtLmSsp&#34;) OR (authentication_type=&#34;9&#34; AND authentication_method=&#34;seclogo&#34;)

| eval start_time=timestamp, end_time=timestamp, entities=mvappend(dest_device_id, dest_user_id), body=create_map([&#34;event_id&#34;, event_id, &#34;authentication_type&#34;, authentication_type, &#34;authentication_method&#34;, authentication_method]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]


====How To Implement====
The test data is converted from Windows Security Event logs generated from Attach Range simulation and used in SPL search and extended to SPL2

====Required field====

* signature_id

* authentication_type

* _time

* authentication_method

* origin_device_domain

* dest_user_id

* dest_device_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1550
| Use Alternate Authentication Material
| Defense Evasion, Lateral Movement
|-
| T1550.002
| Pass the Hash
| Defense Evasion, Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate.

====Reference====


* Initial ESCU implementation by Bhavin Patel and Patrick Bareiss



====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect path interception by creation of program exe===
The detection Detect Path Interception By Creation Of program exe is detecting the abuse of unquoted service paths, which is a popular technique for privilege escalation. 

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1574/009/ T1574.009], [https://attack.mitre.org/techniques/T1574/ T1574]
* '''Last Updated''': 2020-07-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=services.exe by Processes.user Processes.process_name Processes.process Processes.dest 
| `drop_dm_object_name(Processes)` 
| rex field=process &#34;^.*?\\\\(?&lt;service_process&gt;[^\\\\]*\.(?:exe
|bat
|com
|ps1))&#34; 
| eval process_name = lower(process_name) 
| eval service_process = lower(service_process) 
| where process_name != service_process 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_path_interception_by_creation_of_program_exe_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1574.009
| Path Interception by Unquoted Path
| Persistence, Privilege Escalation, Defense Evasion
|-
| T1574
| Hijack Execution Flow
| Persistence, Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://medium.com/@SumitVerma101/windows-privilege-escalation-part-1-unquoted-service-path-c7a011a8d8ae



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1574.009/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Detect prohibited applications spawning cmd exe===
This search looks for executions of cmd.exe spawned by a process that is often abused by attackers and that does not typically launch cmd.exe. This is a SPL2 implementation of the rule `Detect Prohibited Applications Spawning cmd.exe` by @bpatel.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059]
* '''Last Updated''': 2020-7-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)) 
| eval process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), parent_process=lower(ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null)), dest_user_id=ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), dest_device_id=ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null)

| where process_name=&#34;cmd.exe&#34; 
| rex field=parent_process &#34;(?&lt;field0&gt;[^\\\\]+)$&#34; 
| where field0=&#34;winword.exe&#34; OR field0=&#34;excel.exe&#34; OR field0=&#34;outlook.exe&#34; OR field0=&#34;powerpnt.exe&#34; OR field0=&#34;visio.exe&#34; OR field0=&#34;mspub.exe&#34; OR field0=&#34;acrobat.exe&#34; OR field0=&#34;acrord32.exe&#34; OR field0=&#34;chrome.exe&#34; OR field0=&#34;iexplore.exe&#34; OR field0=&#34;opera.exe&#34; OR field0=&#34;firefox.exe&#34; OR field0=&#34;java.exe&#34; OR field0=&#34;powershell.exe&#34;

| eval start_time=timestamp, end_time=timestamp, entities=mvappend(dest_device_id, dest_user_id), body=create_map([&#34;event_id&#34;, event_id,  &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Command-Line_Executions|Suspicious Command-Line Executions]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_MSHTA_Activity|Suspicious MSHTA Activity]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Zoom_Child_Processes|Suspicious Zoom Child Processes]]

* [[Documentation:ESSOC:stories:UseCase#Sunburst_Malware|Sunburst Malware]]


====How To Implement====
You must be ingesting sysmon logs. This search has been modified to process raw sysmon data from attack_range&#39;s nxlogs on DSP.

====Required field====

* process_name

* parent_process_name

* _time

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
There are circumstances where an application may legitimately execute and interact with the Windows command-line interface. Investigate and modify the lookup file, as appropriate.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect prohibited applications spawning cmd exe===
This search looks for executions of cmd.exe spawned by a process that is often abused by attackers and that does not typically launch cmd.exe.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/003/ T1059.003]
* '''Last Updated''': 2020-11-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_cmd` by Processes.parent_process_name Processes.process_name Processes.original_file_name Processes.dest Processes.user
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
|search [`prohibited_apps_launching_cmd`] 
| `detect_prohibited_applications_spawning_cmd_exe_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Command-Line_Executions|Suspicious Command-Line Executions]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_MSHTA_Activity|Suspicious MSHTA Activity]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Zoom_Child_Processes|Suspicious Zoom Child Processes]]

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
You must be ingesting data that records process activity from your hosts and populates the Endpoint data model with the resultant dataset. This search includes a lookup file, `prohibited_apps_launching_cmd.csv`, that contains a list of processes that should not be spawning cmd.exe. You can modify this lookup to better suit your environment. To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.003
| Windows Command Shell
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
There are circumstances where an application may legitimately execute and interact with the Windows command-line interface. Investigate and modify the lookup file, as appropriate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.003/powershell_spawn_cmd/windows-sysmon.log


''version'': 6
</div>
</div>

----

===Detect psexec with accepteula flag===
This search looks for events where `PsExec.exe` is run with the `accepteula` flag in the command line. PsExec is a built-in Windows utility that enables you to execute processes on other systems. It is fully interactive for console applications. This tool is widely used for launching interactive command prompts on remote systems. Threat actors leverage this extensively for executing code on compromised systems. If an attacker is running PsExec for the first time, they will be prompted to accept the end-user license agreement (EULA), which can be passed as the argument `accepteula` within the command line.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/ T1021], [https://attack.mitre.org/techniques/T1021/002/ T1021.002]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_psexec` Processes.process=*accepteula* by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_psexec_with_accepteula_flag_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021
| Remote Services
| Lateral Movement
|-
| T1021.002
| SMB/Windows Admin Shares
| Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators can leverage PsExec for accessing remote systems and might pass `accepteula` as an argument if they are running this tool for the first time. However, it is not likely that you&#39;d see multiple occurrences of this event on a machine

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1021.002/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Detect rclone command-line usage===
This analytic identifies commonly used command-line arguments used by `rclone.exe` to initiate a file transfer. Some arguments were negated as they are specific to the configuration used by adversaries. In particular, an adversary may list the files or directories of the remote file share using `ls` or `lsd`, which is not indicative of malicious behavior. During triage, at this stage of a ransomware event, exfiltration is about to occur or has already. Isolate the endpoint and continue investigating by review file modifications and parallel processes.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1020/ T1020]
* '''Last Updated''': 2021-05-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process IN (&#34;*copy*&#34;, &#34;*mega*&#34;, &#34;*pcloud*&#34;, &#34;*ftp*&#34;, &#34;*--config*&#34;, &#34;*--progress*&#34;, &#34;*--no-check-certificate*&#34;, &#34;*--ignore-existing*&#34;, &#34;*--auto-confirm*&#34;, &#34;*--transfers*&#34;, &#34;*--multi-thread-streams*&#34;)  by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process   Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
|  `security_content_ctime(lastTime)` 
| `detect_rclone_command_line_usage_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1020
| Automated Exfiltration
| Exfiltration
|}


====Kill Chain Phase====

* Exfiltration


====Known False Positives====
There is potential for false positives as these arguments may be used by other applications. Filter or tune the analytic as needed.

====Reference====


* https://redcanary.com/blog/rclone-mega-extortion/

* https://www.fireeye.com/blog/threat-research/2021/05/shining-a-light-on-darkside-ransomware-operations.html

* https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1020/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect rare executables===
This search will return a table of rare processes, the names of the systems running them, and the users who initiated each process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': 
* '''Last Updated''': 2020-03-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.dest) as dest values(Processes.user) as user min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes by Processes.process_name  
| rename Processes.process_name as process 
| rex field=user &#34;(?&lt;user_domain&gt;.*)\\\\(?&lt;user_name&gt;.*)&#34; 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| search [
| tstats count from datamodel=Endpoint.Processes by Processes.process_name 
| rare Processes.process_name limit=30 
| rename Processes.process_name as process
| `filter_rare_process_allow_list`
| table process ] 
| `detect_rare_executables_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Emotet_Malware__DHS_Report_TA18-201A_|Emotet Malware  DHS Report TA18-201A ]]

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]

* [[Documentation:ESSOC:stories:UseCase#Cloud_Federated_Credential_Abuse|Cloud Federated Credential Abuse]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records process activity from your hosts and populating the endpoint data model with the resultant dataset. The macro `filter_rare_process_allow_list` searches two lookup files for allowed processes.  These consist of `rare_process_allow_list_default.csv` and `rare_process_allow_list_local.csv`. To add your own processes to the allow list, add them to `rare_process_allow_list_local.csv`. If you wish to remove an entry from the default lookup file, you will have to modify the macro itself to set the allow_list value for that process to false. You can modify the limit parameter and search scheduling to better suit your environment.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.process_name




====Kill Chain Phase====

* Installation

* Command and Control

* Actions on Objectives


====Known False Positives====
Some legitimate processes may be only rarely executed in your environment. As these are identified, update `rare_process_allow_list_local.csv` to filter them out of your search results.

====Reference====


====Test Dataset====


''version'': 5
</div>
</div>

----

===Detect regasm spawning a process===
The following analytic identifies regasm.exe spawning a process. This particular technique has been used in the wild to bypass application control products. Regasm.exe and Regsvcs.exe are signed by Microsoft. Spawning of a child process is rare from either process and should be investigated further. During investigation, identify and retrieve the content being loaded. Review parallel processes for additional suspicious behavior. Gather any other file modifications and review accordingly. regsvcs.exe and regasm.exe are natively found in C:\Windows\Microsoft.NET\Framework\v*\regasm|regsvcs.exe and C:\Windows\Microsoft.NET\Framework64\v*\regasm|regsvcs.exe.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/009/ T1218.009]
* '''Last Updated''': 2021-02-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=regasm.exe by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_regasm_spawning_a_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvcs_Regasm_Activity|Suspicious Regsvcs Regasm Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.parent_process_name

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.009
| Regsvcs/Regasm
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, limited instances of regasm.exe or regsvcs.exe may cause a false positive. Filter based endpoint usage, command line arguments, or process lineage.

====Reference====


* https://attack.mitre.org/techniques/T1218/009/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.009/T1218.009.md

* https://lolbas-project.github.io/lolbas/Binaries/Regsvcs/

* https://lolbas-project.github.io/lolbas/Binaries/Regasm/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.009/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect regasm with network connection===
The following analytic identifies regasm.exe with a network connection to a public IP address, exluding private IP space. This particular technique has been used in the wild to bypass application control products. Regasm.exe and Regsvcs.exe are signed by Microsoft. By contacting a remote command and control server, the adversary will have the ability to escalate privileges and complete the objectives. During investigation, identify and retrieve the content being loaded. Review parallel processes for additional suspicious behavior. Gather any other file modifications and review accordingly. Review the reputation of the remote IP or domain and block as needed. regsvcs.exe and regasm.exe are natively found in C:\Windows\Microsoft.NET\Framework\v*\regasm|regsvcs.exe and C:\Windows\Microsoft.NET\Framework64\v*\regasm|regsvcs.exe.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/009/ T1218.009]
* '''Last Updated''': 2021-02-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventID=3 dest_ip!=10.0.0.0/12 dest_ip!=172.16.0.0/12 dest_ip!=192.168.0.0/16 process_name=regasm.exe 
| rename Computer as dest 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, User, process_name, src_ip, dest_host, dest_ip 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_regasm_with_network_connection_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvcs_Regasm_Activity|Suspicious Regsvcs Regasm Activity]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* EventID

* dest_ip

* process_name

* Computer

* User

* src_ip

* dest_host

* dest_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.009
| Regsvcs/Regasm
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, limited instances of regasm.exe with a network connection may cause a false positive. Filter based endpoint usage, command line arguments, or process lineage.

====Reference====


* https://attack.mitre.org/techniques/T1218/009/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.009/T1218.009.md

* https://lolbas-project.github.io/lolbas/Binaries/Regasm/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.009/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect regasm with no command line arguments===
The following analytic identifies regasm.exe with no command line arguments. This particular behavior occurs when another process injects into regasm.exe, no command line arguments will be present. During investigation, identify any network connections and parallel processes. Identify any suspicious module loads related to credential dumping or file writes. Regasm.exe are natively found in C:\Windows\Microsoft.NET\Framework\v*\regasm|regsvcs.exe and C:\Windows\Microsoft.NET\Framework64\v*\regasm|regsvcs.exe.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/009/ T1218.009]
* '''Last Updated''': 2021-09-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where `process_regasm` by _time span=1h  Processes.process_id Processes.process_name Processes.dest Processes.process_path Processes.process Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| regex process=&#34;(regasm\.exe.{0,4}$)&#34; 
| `detect_regasm_with_no_command_line_arguments_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvcs_Regasm_Activity|Suspicious Regsvcs Regasm Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.009
| Regsvcs/Regasm
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, limited instances of regasm.exe or may cause a false positive. Filter based endpoint usage, command line arguments, or process lineage.

====Reference====


* https://attack.mitre.org/techniques/T1218/009/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.009/T1218.009.md

* https://lolbas-project.github.io/lolbas/Binaries/Regasm/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.009/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect regsvcs spawning a process===
The following analytic identifies regsvcs.exe spawning a process. This particular technique has been used in the wild to bypass application control products. Regasm.exe and Regsvcs.exe are signed by Microsoft. Spawning of a child process is rare from either process and should be investigated further. During investigation, identify and retrieve the content being loaded. Review parallel processes for additional suspicious behavior. Gather any other file modifications and review accordingly. regsvcs.exe and regasm.exe are natively found in C:\Windows\Microsoft.NET\Framework\v*\regasm|regsvcs.exe and C:\Windows\Microsoft.NET\Framework64\v*\regasm|regsvcs.exe.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/009/ T1218.009]
* '''Last Updated''': 2021-02-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=regsvcs.exe by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_regsvcs_spawning_a_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvcs_Regasm_Activity|Suspicious Regsvcs Regasm Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.parent_process_name

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.009
| Regsvcs/Regasm
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, limited instances of regasm.exe or regsvcs.exe may cause a false positive. Filter based endpoint usage, command line arguments, or process lineage.

====Reference====


* https://attack.mitre.org/techniques/T1218/009/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.009/T1218.009.md

* https://lolbas-project.github.io/lolbas/Binaries/Regsvcs/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.009/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect regsvcs with network connection===
The following analytic identifies Regsvcs.exe with a network connection to a public IP address, exluding private IP space. This particular technique has been used in the wild to bypass application control products. Regasm.exe and Regsvcs.exe are signed by Microsoft. By contacting a remote command and control server, the adversary will have the ability to escalate privileges and complete the objectives. During investigation, identify and retrieve the content being loaded. Review parallel processes for additional suspicious behavior. Gather any other file modifications and review accordingly. Review the reputation of the remote IP or domain and block as needed. regsvcs.exe and regasm.exe are natively found in C:\Windows\Microsoft.NET\Framework\v*\regasm|regsvcs.exe and C:\Windows\Microsoft.NET\Framework64\v*\regasm|regsvcs.exe.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/009/ T1218.009]
* '''Last Updated''': 2021-02-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventID=3 dest_ip!=10.0.0.0/12 dest_ip!=172.16.0.0/12 dest_ip!=192.168.0.0/16 process_name=regsvcs.exe 
| rename Computer as dest 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, User, process_name, src_ip, dest_host, dest_ip 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_regsvcs_with_network_connection_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvcs_Regasm_Activity|Suspicious Regsvcs Regasm Activity]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* EventID

* dest_ip

* process_name

* Computer

* User

* src_ip

* dest_host



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.009
| Regsvcs/Regasm
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, limited instances of regsvcs.exe may cause a false positive. Filter based endpoint usage, command line arguments, or process lineage.

====Reference====


* https://attack.mitre.org/techniques/T1218/009/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.009/T1218.009.md

* https://lolbas-project.github.io/lolbas/Binaries/Regsvcs/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.009/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect regsvcs with no command line arguments===
The following analytic identifies regsvcs.exe with no command line arguments. This particular behavior occurs when another process injects into regsvcs.exe, no command line arguments will be present. During investigation, identify any network connections and parallel processes. Identify any suspicious module loads related to credential dumping or file writes. Regasm.exe are natively found in C:\Windows\Microsoft.NET\Framework\v*\regasm|regsvcs.exe and C:\Windows\Microsoft.NET\Framework64\v*\regasm|regsvcs.exe.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/009/ T1218.009]
* '''Last Updated''': 2021-09-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where `process_regsvcs` by _time span=1h  Processes.process_id Processes.process_name Processes.dest Processes.process_path Processes.process Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| regex process=&#34;(regsvcs\.exe.{0,4}$)&#34;
| `detect_regsvcs_with_no_command_line_arguments_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvcs_Regasm_Activity|Suspicious Regsvcs Regasm Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.009
| Regsvcs/Regasm
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, limited instances of regsvcs.exe may cause a false positive. Filter based endpoint usage, command line arguments, or process lineage.

====Reference====


* https://attack.mitre.org/techniques/T1218/009/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.009/T1218.009.md

* https://lolbas-project.github.io/lolbas/Binaries/Regsvcs/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.009/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect regsvr32 application control bypass===
Adversaries may abuse Regsvr32.exe to proxy execution of malicious code. Regsvr32.exe is a command-line program used to register and unregister object linking and embedding controls, including dynamic link libraries (DLLs), on Windows systems. Regsvr32.exe is also a Microsoft signed binary.This variation of the technique is often referred to as a &#34;Squiblydoo&#34; attack. \
Upon investigating, look for network connections to remote destinations (internal or external). Be cautious to modify the query to look for &#34;scrobj.dll&#34;, the &#34;.dll&#34; is not required to load scrobj. &#34;scrobj.dll&#34; will be loaded by &#34;regsvr32.exe&#34; upon execution. 

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/010/ T1218.010]
* '''Last Updated''': 2021-01-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_regsvr32` Processes.process=*scrobj* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.original_file_name Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_regsvr32_application_control_bypass_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvr32_Activity|Suspicious Regsvr32 Activity]]

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.010
| Regsvr32
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Limited false positives related to third party software registering .DLL&#39;s.

====Reference====


* https://attack.mitre.org/techniques/T1218/010/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.010/T1218.010.md

* https://lolbas-project.github.io/lolbas/Binaries/Regsvr32/

* https://support.microsoft.com/en-us/topic/how-to-use-the-regsvr32-tool-and-troubleshoot-regsvr32-error-messages-a98d960a-7392-e6fe-d90a-3f4e0cb543e5



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.010/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect renamed 7-zip===
The following analytic identifies renamed 7-Zip usage using Sysmon. At this stage of an attack, review parallel processes and file modifications for data that is staged or potentially have been exfiltrated. This analytic utilizes the OriginalFileName to capture the renamed process. During triage, validate this is the legitimate version of `7zip` by reviewing the PE metadata. In addition, review parallel processes for further suspicious behavior.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1560/001/ T1560.001], [https://attack.mitre.org/techniques/T1560/ T1560]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.original_file_name=7z*.exe AND Processes.process_name!=7z*.exe) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_renamed_7_zip_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Collection_and_Staging|Collection and Staging]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1560.001
| Archive via Utility
| Collection
|-
| T1560
| Archive Collected Data
| Collection
|}


====Kill Chain Phase====

* Exfiltration


====Known False Positives====
Limited false positives, however this analytic will need to be modified for each environment if Sysmon is not used.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1560.001/T1560.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1560.001/archive_utility/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect renamed psexec===
The following analytic identifies renamed instances of `PsExec.exe` being utilized on an endpoint. Most instances, it is highly probable to capture `Psexec.exe` or other SysInternal utility usage with the command-line argument of `-accepteula`. During triage, validate this is the legitimate version of `PsExec` by reviewing the PE metadata. In addition, review parallel processes for further suspicious behavior.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1569/ T1569], [https://attack.mitre.org/techniques/T1569/002/ T1569.002]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_psexec` by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_renamed_psexec_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1569
| System Services
| Execution
|-
| T1569.002
| Service Execution
| Execution
|}


====Kill Chain Phase====

* Exploitation

* Lateral Movement

* Execution


====Known False Positives====
Limited false positives should be present. It is possible some third party applications may use older versions of PsExec, filter as needed.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1569.002/T1569.002.yaml

* https://redcanary.com/blog/threat-hunting-psexec-lateral-movement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1569.002/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Detect renamed rclone===
The following analytic identifies the usage of `rclone.exe`, renamed, being used to exfiltrate data to a remote destination. RClone has been used by multiple ransomware groups to exfiltrate data. In many instances, it will be downloaded from the legitimate site and executed accordingly. During triage, isolate the endpoint and begin to review parallel processes for additional behavior. At this stage, the adversary may have staged data to be exfiltrated.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1020/ T1020]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.original_file_name=rclone.exe AND Processes.process_name!=rclone.exe) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_renamed_rclone_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1020
| Automated Exfiltration
| Exfiltration
|}


====Kill Chain Phase====

* Exfiltration


====Known False Positives====
False positives should be limited as this analytic identifies renamed instances of `rclone.exe`. Filter as needed if there is a legitimate business use case.

====Reference====


* https://redcanary.com/blog/rclone-mega-extortion/

* https://www.fireeye.com/blog/threat-research/2021/05/shining-a-light-on-darkside-ransomware-operations.html

* https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1020/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect renamed winrar===
The following analtyic identifies renamed instances of `WinRAR.exe`. In most cases, it is not common for WinRAR to be used renamed, however it is common to be installed by a third party application and executed from a non-standard path. During triage, validate additional metadata from the binary that this is `WinRAR`. Review parallel processes and file modifications.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1560/001/ T1560.001], [https://attack.mitre.org/techniques/T1560/ T1560]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.original_file_name=WinRAR.exe (Processes.process_name!=rar.exe OR Processes.process_name!=winrar.exe) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_renamed_winrar_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Collection_and_Staging|Collection and Staging]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1560.001
| Archive via Utility
| Collection
|-
| T1560
| Archive Collected Data
| Collection
|}


====Kill Chain Phase====

* Exploitation

* Exfiltration


====Known False Positives====
Unknown. It is possible third party applications use renamed instances of WinRAR.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1560.001/T1560.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1560.001/archive_utility/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Detect rundll32 application control bypass - advpack===
The following analytic identifies rundll32.exe loading advpack.dll and ieadvpack.dll by calling the LaunchINFSection function on the command line. This particular technique will load script code from a file. Upon a successful execution, the following module loads may occur - clr.dll, jscript.dll and scrobj.dll. During investigation, identify script content origination. Generally, a child process will spawn from rundll32.exe, but that may be bypassed based on script code contents. Rundll32.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64. During investigation, review any network connections and obtain the script content executed. It&#39;s possible other files are on disk.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-02-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_rundll32` Processes.process=*advpack* by Processes.dest Processes.user Processes.parent_process_name Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_rundll32_application_control_bypass___advpack_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, some legitimate applications may use advpack.dll or ieadvpack.dll, triggering a false positive.

====Reference====


* https://attack.mitre.org/techniques/T1218/011/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.011/T1218.011.md

* https://lolbas-project.github.io/lolbas/Binaries/Rundll32

* https://lolbas-project.github.io/lolbas/Libraries/Advpack/

* https://bohops.com/2018/02/26/leveraging-inf-sct-fetch-execute-techniques-for-bypass-evasion-persistence/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.011/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect rundll32 application control bypass - setupapi===
The following analytic identifies rundll32.exe loading setupapi.dll and iesetupapi.dll by calling the LaunchINFSection function on the command line. This particular technique will load script code from a file. Upon a successful execution, the following module loads may occur - clr.dll, jscript.dll and scrobj.dll. During investigation, identify script content origination. Generally, a child process will spawn from rundll32.exe, but that may be bypassed based on script code contents. Rundll32.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64. During investigation, review any network connections and obtain the script content executed. It&#39;s possible other files are on disk.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-02-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_rundll32` Processes.process=*setupapi* by Processes.dest Processes.user Processes.parent_process_name Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_rundll32_application_control_bypass___setupapi_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, some legitimate applications may use setupapi triggering a false positive.

====Reference====


* https://attack.mitre.org/techniques/T1218/011/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.011/T1218.011.md

* https://lolbas-project.github.io/lolbas/Binaries/Rundll32

* https://lolbas-project.github.io/lolbas/Libraries/Setupapi/

* https://bohops.com/2018/02/26/leveraging-inf-sct-fetch-execute-techniques-for-bypass-evasion-persistence/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.011/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect rundll32 application control bypass - syssetup===
The following analytic identifies rundll32.exe loading syssetup.dll by calling the LaunchINFSection function on the command line. This particular technique will load script code from a file. Upon a successful execution, the following module loads may occur - clr.dll, jscript.dll and scrobj.dll. During investigation, identify script content origination. Generally, a child process will spawn from rundll32.exe, but that may be bypassed based on script code contents. Rundll32.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64. During investigation, review any network connections and obtain the script content executed. It&#39;s possible other files are on disk.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-02-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_rundll32` Processes.process=*syssetup* by Processes.dest Processes.user Processes.parent_process_name Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_rundll32_application_control_bypass___syssetup_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, some legitimate applications may use syssetup.dll, triggering a false positive.

====Reference====


* https://attack.mitre.org/techniques/T1218/011/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.011/T1218.011.md

* https://lolbas-project.github.io/lolbas/Binaries/Rundll32

* https://lolbas-project.github.io/lolbas/Libraries/Syssetup/

* https://bohops.com/2018/02/26/leveraging-inf-sct-fetch-execute-techniques-for-bypass-evasion-persistence/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.011/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect rundll32 inline hta execution===
The following analytic identifies &#34;rundll32.exe&#34; execution with inline protocol handlers. &#34;JavaScript&#34;, &#34;VBScript&#34;, and &#34;About&#34; are the only supported options when invoking HTA content directly on the command-line. This type of behavior is commonly observed with fileless malware or application whitelisting bypass techniques. The search will return the first time and last time these command-line arguments were used for these executions, as well as the target system, the user, process &#34;rundll32.exe&#34; and its parent process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/005/ T1218.005]
* '''Last Updated''': 2021-01-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_rundll32` (Processes.process=*vbscript* OR Processes.process=*javascript* OR Processes.process=*about*) by Processes.user Processes.process_name Processes.parent_process_name Processes.original_file_name Processes.dest  
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_rundll32_inline_hta_execution_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_MSHTA_Activity|Suspicious MSHTA Activity]]

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.005
| Mshta
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Although unlikely, some legitimate applications may exhibit this behavior, triggering a false positive.

====Reference====


* https://github.com/redcanaryco/AtomicTestHarnesses

* https://redcanary.com/blog/introducing-atomictestharnesses/

* https://docs.microsoft.com/en-us/windows/win32/search/-search-3x-wds-extidx-prot-implementing



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.005/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect sharphound command-line arguments===
The following analytic identifies common command-line arguments used by SharpHound `-collectionMethod` and `invoke-bloodhound`. Being the script is FOSS, function names may be modified, but these changes are dependent upon the operator. In most instances the defaults are used. This analytic works to identify the common command-line attributes used. It does not cover the entirety of every argument in order to avoid false positives.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1069/001/ T1069.001], [https://attack.mitre.org/techniques/T1482/ T1482], [https://attack.mitre.org/techniques/T1087/001/ T1087.001], [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1069/002/ T1069.002], [https://attack.mitre.org/techniques/T1069/ T1069]
* '''Last Updated''': 2021-06-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process IN (&#34;*-collectionMethod*&#34;,&#34;*invoke-bloodhound*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_sharphound_command_line_arguments_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Discovery_Techniques|Discovery Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1069.001
| Local Groups
| Discovery
|-
| T1482
| Domain Trust Discovery
| Discovery
|-
| T1087.001
| Local Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|-
| T1069
| Permission Groups Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
False positives should be limited as the arguments used are specific to SharpHound. Filter as needed or add more command-line arguments as needed.

====Reference====


* https://attack.mitre.org/software/S0521/

* https://thedfirreport.com/?s=bloodhound

* https://github.com/BloodHoundAD/BloodHound/tree/master/Collectors

* https://github.com/BloodHoundAD/SharpHound3

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1059.001/T1059.001.md#atomic-test-2---run-bloodhound-from-local-disk



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/sharphound/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect sharphound file modifications===
SharpHound is used as a reconnaissance collector, ingestor, for BloodHound. SharpHound will query the domain controller and begin gathering all the data related to the domain and trusts. For output, it will drop a .zip file upon completion following a typical pattern that is often not changed. This analytic focuses on the default file name scheme. Note that this may be evaded with different parameters within SharpHound, but that depends on the operator. `-randomizefilenames` and `-encryptzip` are two examples. In addition, executing SharpHound via .exe or .ps1 without any command-line arguments will still perform activity and dump output to the default filename. Example default filename `20210601181553_BloodHound.zip`. SharpHound creates multiple temp files following the same pattern `20210601182121_computers.json`, `domains.json`, `gpos.json`, `ous.json` and `users.json`. Tuning may be required, or remove these json&#39;s entirely if it is too noisy. During traige, review parallel processes for further suspicious behavior. Typically, the process executing the `.ps1` ingestor will be PowerShell.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1069/001/ T1069.001], [https://attack.mitre.org/techniques/T1482/ T1482], [https://attack.mitre.org/techniques/T1087/001/ T1087.001], [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1069/002/ T1069.002], [https://attack.mitre.org/techniques/T1069/ T1069]
* '''Last Updated''': 2021-05-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Filesystem where Filesystem.file_name IN (&#34;*bloodhound.zip&#34;, &#34;*_computers.json&#34;, &#34;*_gpos.json&#34;, &#34;*_domains.json&#34;, &#34;*_users.json&#34;, &#34;*_groups.json&#34;) by Filesystem.file_create_time Filesystem.process_id  Filesystem.file_name Filesystem.file_path Filesystem.dest 
| `drop_dm_object_name(Filesystem)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_sharphound_file_modifications_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Discovery_Techniques|Discovery Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on file modifications that include the name of the process, and file, responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Filesystem` node.

====Required field====

* _time

* file_path

* dest

* file_name

* process_id

* file_create_time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1069.001
| Local Groups
| Discovery
|-
| T1482
| Domain Trust Discovery
| Discovery
|-
| T1087.001
| Local Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|-
| T1069
| Permission Groups Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
False positives should be limited as the analytic is specific to a filename with extension .zip. Filter as needed.

====Reference====


* https://attack.mitre.org/software/S0521/

* https://thedfirreport.com/?s=bloodhound

* https://github.com/BloodHoundAD/BloodHound/tree/master/Collectors

* https://github.com/BloodHoundAD/SharpHound3

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1059.001/T1059.001.md#atomic-test-2---run-bloodhound-from-local-disk



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/sharphound/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect sharphound usage===
The following analytic identifies SharpHound binary usage by using the original filena,e. In addition to renaming the PE, other coverage is available to detect command-line arguments. This particular analytic looks for the original_file_name of `SharpHound.exe` and the process name. It is possible older instances of SharpHound.exe have different original filenames. Dependent upon the operator, the code may be re-compiled and the attributes removed or changed to anything else. During triage, review the metadata of the binary in question. Review parallel processes for suspicious behavior. Identify the source of this binary.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1069/001/ T1069.001], [https://attack.mitre.org/techniques/T1482/ T1482], [https://attack.mitre.org/techniques/T1087/001/ T1087.001], [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1069/002/ T1069.002], [https://attack.mitre.org/techniques/T1069/ T1069]
* '''Last Updated''': 2021-05-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=sharphound.exe OR Processes.original_file_name=SharpHound.exe) by Processes.dest Processes.user Processes.parent_process_name Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_sharphound_usage_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Discovery_Techniques|Discovery Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1069.001
| Local Groups
| Discovery
|-
| T1482
| Domain Trust Discovery
| Discovery
|-
| T1087.001
| Local Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|-
| T1069
| Permission Groups Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
False positives should be limited as this is specific to a file attribute not used by anything else. Filter as needed.

====Reference====


* https://attack.mitre.org/software/S0521/

* https://thedfirreport.com/?s=bloodhound

* https://github.com/BloodHoundAD/BloodHound/tree/master/Collectors

* https://github.com/BloodHoundAD/SharpHound3

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1059.001/T1059.001.md#atomic-test-2---run-bloodhound-from-local-disk



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/sharphound/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect use of cmd exe to launch script interpreters===
This search looks for the execution of the cscript.exe or wscript.exe processes, with a parent of cmd.exe. The search will return the count, the first and last time this execution was seen on a machine, the user, and the destination of the machine

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/003/ T1059.003]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=&#34;cmd.exe&#34; (Processes.process_name=cscript.exe OR Processes.process_name =wscript.exe) by Processes.parent_process Processes.process_name Processes.user Processes.dest 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)` 
| `detect_use_of_cmd_exe_to_launch_script_interpreters_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Emotet_Malware__DHS_Report_TA18-201A_|Emotet Malware  DHS Report TA18-201A ]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Command-Line_Executions|Suspicious Command-Line Executions]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.process

* Processes.parent_process_name

* Processes.process_name

* Processes.parent_process

* Processes.user

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.003
| Windows Command Shell
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Some legitimate applications may exhibit this behavior.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.003/cmd_spawns_cscript/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Detect wmi event subscription persistence===
The following analytic identifies the use of WMI Event Subscription to establish persistence or perform privilege escalation.  WMI can be used to install event filters, providers, consumers, and bindings that execute code when a defined event occurs. WMI subscription execution is proxied by the WMI Provider Host process (WmiPrvSe.exe) and thus may result in elevated SYSTEM privileges. This analytic is restricted by commonly added process execution and a path. If the volume is low enough, remove the values and flag on any new subscriptions.\
All event subscriptions have three components \
1. Filter - WQL Query for the events we want. EventID equals 19 \
1. Consumer - An action to take upon triggering the filter. EventID equals 20 \
1. Binding - Registers a filter to a consumer. EventID equals 21 \
Monitor for the creation of new WMI EventFilter, EventConsumer, and FilterToConsumerBinding. It may be pertinent to review all 3 to identify the flow of execution. In addition, EventCode 4104 may assist with any other PowerShell script usage that registered the subscription.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1546/003/ T1546.003], [https://attack.mitre.org/techniques/T1546/ T1546]
* '''Last Updated''': 2021-06-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventID=20 
| stats count min(_time) as firstTime max(_time) as lastTime by Computer User Destination 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_wmi_event_subscription_persistence_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_WMI_Use|Suspicious WMI Use]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with that provide WMI Event Subscription from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA and have enabled EventID 19, 20 and 21. Tune and filter known good to limit the volume.

====Required field====

* _time

* Destination

* Computer

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1546.003
| Windows Management Instrumentation Event Subscription
| Privilege Escalation, Persistence
|-
| T1546
| Event Triggered Execution
| Privilege Escalation, Persistence
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
It is possible some applications will create a consumer and may be required to be filtered. For tuning, add any additional LOLBin&#39;s for further depth of coverage.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.003/T1546.003.md

* https://www.eideon.com/2018-03-02-THL03-WMIBackdoors/

* https://github.com/trustedsec/SysmonCommunityGuide/blob/master/WMI-events.md

* https://in.security/an-intro-into-abusing-and-identifying-wmi-event-subscriptions-for-persistence/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.003/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Detect mshta inline hta execution===
The following analytic identifies &#34;mshta.exe&#34; execution with inline protocol handlers. &#34;JavaScript&#34;, &#34;VBScript&#34;, and &#34;About&#34; are the only supported options when invoking HTA content directly on the command-line. The search will return the first time and last time these command-line arguments were used for these executions, as well as the target system, the user, process &#34;mshta.exe&#34; and its parent process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/005/ T1218.005]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_mshta` (Processes.process=*vbscript* OR Processes.process=*javascript* OR Processes.process=*about*) by Processes.user Processes.process_name Processes.original_file_name Processes.parent_process_name Processes.dest  
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_mshta_inline_hta_execution_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_MSHTA_Activity|Suspicious MSHTA Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.005
| Mshta
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Although unlikely, some legitimate applications may exhibit this behavior, triggering a false positive.

====Reference====


* https://github.com/redcanaryco/AtomicTestHarnesses

* https://redcanary.com/blog/introducing-atomictestharnesses/

* https://docs.microsoft.com/en-us/windows/win32/search/-search-3x-wds-extidx-prot-implementing



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.005/atomic_red_team/windows-sysmon.log


''version'': 6
</div>
</div>

----

===Detect mshta renamed===
The following analytic identifies renamed instances of mshta.exe executing. Mshta.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64. This analytic utilizes the internal name of the PE to identify if is the legitimate mshta binary. Further analysis should be performed to review the executed content and validation it is the real mshta.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/005/ T1218.005]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_mshta` by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_mshta_renamed_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_MSHTA_Activity|Suspicious MSHTA Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.005
| Mshta
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Although unlikely, some legitimate applications may use a moved copy of mshta.exe, but never renamed, triggering a false positive.

====Reference====


* https://github.com/redcanaryco/AtomicTestHarnesses

* https://redcanary.com/blog/introducing-atomictestharnesses/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.005/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detect processes used for system network configuration discovery===
This search looks for fast execution of processes used for system network configuration discovery on the endpoint.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1016/ T1016]
* '''Last Updated''': 2020-11-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where NOT Processes.user IN (&#34;&#34;,&#34;unknown&#34;) by Processes.dest Processes.process_name Processes.user _time 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `drop_dm_object_name(Processes)` 
| search `system_network_configuration_discovery_tools` 
| transaction dest connected=false maxpause=5m 
|where eventcount&gt;=5 
| table firstTime lastTime dest user process_name process parent_process eventcount 
| `detect_processes_used_for_system_network_configuration_discovery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
You must be ingesting data that records registry activity from your hosts to populate the Endpoint data model in the processes node. This is typically populated via endpoint detection-and-response product, such as Carbon Black, or endpoint data sources, such as Sysmon. The data used for this search is usually generated via logs that report reads and writes to the registry or that are populated via Windows event logs, after enabling process tracking in your Windows audit settings.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1016
| System Network Configuration Discovery
| Discovery
|}


====Kill Chain Phase====

* Installation

* Command and Control

* Actions on Objectives


====Known False Positives====
It is uncommon for normal users to execute a series of commands used for network discovery. System administrators often use scripts to execute these commands. These can generate false positives.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1016/discovery_commands/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Detection of tools built by nirsoft===
This search looks for specific command-line arguments that may indicate the execution of tools made by Nirsoft, which are legitimate, but may be abused by attackers.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1072/ T1072]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) values(Processes.process) as process max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process=&#34;* /stext *&#34; OR Processes.process=&#34;* /scomma *&#34; ) by Processes.parent_process Processes.process_name Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `detection_of_tools_built_by_nirsoft_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Emotet_Malware__DHS_Report_TA18-201A_|Emotet Malware  DHS Report TA18-201A ]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.process

* Processes.parent_process

* Processes.process_name

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1072
| Software Deployment Tools
| Execution, Lateral Movement
|}


====Kill Chain Phase====

* Installation

* Actions on Objectives


====Known False Positives====
While legitimate, these NirSoft tools are prone to abuse. You should verfiy that the tool was used for a legitimate purpose.

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Disable amsi through registry===
this search is to identify modification in registry to disable AMSI windows feature to evade detections. This technique was seen in several ransomware, RAT and even APT to impaire defenses of the compromise machine and to be able to execute payload with minimal alert as much as possible.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-06-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows Script\\Settings\\AmsiEnable&#34; Registry.registry_value_name = &#34;DWORD (0x00000000)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `disable_amsi_through_registry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network operator may disable this feature of windows but not so common.

====Reference====


* https://blog.f-secure.com/hunting-for-amsi-bypasses/

* https://gist.github.com/rxwx/8955e5abf18dc258fd6b43a3a7f4dbf9



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data2/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disable etw through registry===
this search is to identify modification in registry to disable ETW windows feature to evade detections. This technique was seen in several ransomware, RAT and even APT to impaire defenses of the compromise machine and to be able to execute payload with minimal alert as much as possible.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-06-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\.NETFramework\\ETWEnabled&#34; Registry.registry_value_name = &#34;DWORD (0x00000000)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `disable_etw_through_registry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network operator may disable this feature of windows but not so common.

====Reference====


* https://app.any.run/tasks/c0f98850-af65-4352-9746-fbebadee4f05/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data2/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disable logs using wevtutil===
This search is to detect execution of wevtutil.exe to disable logs. This technique was seen in several ransomware to disable the event logs to evade alerts and detections.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/ T1070], [https://attack.mitre.org/techniques/T1070/001/ T1070.001]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = &#34;wevtutil.exe&#34; Processes.process = &#34;*sl*&#34; Processes.process = &#34;*/e:false*&#34; by Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process Processes.dest Processes.user Processes.process_id Processes.process_guid 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `disable_logs_using_wevtutil_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.parent_process_name

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user

* Processes.process_id

* Processes.process_guid



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|-
| T1070.001
| Clear Windows Event Logs
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network operator may disable audit event logs for debugging purposes.

====Reference====


* https://www.bleepingcomputer.com/news/security/new-ransom-x-ransomware-used-in-texas-txdot-cyberattack/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disable net user account===
This analytic will identify a suspicious command-line that disables a user account using the `net.exe` utility native to Windows. This technique may used by the adversaries to interrupt availability of such users to do their malicious act.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1489/ T1489]
* '''Last Updated''': 2021-06-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=lower(ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null)), process_name=lower(ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null)), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line IS NOT NULL AND like(cmd_line, &#34;%/active:no%&#34;) AND (process_name=&#34;net1.exe&#34; OR process_name=&#34;net.exe&#34;) 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name, &#34;process_path&#34;, process_path]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed net.exe/net1.exe may be used.

====Required field====

* _time

* dest_device_id

* process_name

* parent_process_name

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1489
| Service Stop
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network operator may use this approach to quickly disable an account but not a common practice.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/ssa_data1/net_user_dis.log


''version'': 2
</div>
</div>

----

===Disable registry tool===
This search identifies modification of registry to disable the regedit or registry tools of the windows operating system. Since registry tool is a swiss knife in analyzing registry, malware such as RAT or trojan Spy disable this application to prevent the removal of their registry entry such as persistence, file less components and defense evasion.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableRegistryTools&#34; Registry.registry_value_name = &#34;DWORD (0x00000001)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `disable_registry_tool_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin may disable this application for non technical user.

====Reference====


* https://any.run/report/ea4ea08407d4ee72e009103a3b77e5a09412b722fdef67315ea63f22011152af/a866d7b1-c236-4f26-a391-5ae32213dfc4#registry



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disable security logs using minint registry===
This analytic is to detect a suspicious registry modification to disable security audit logs. This technique was shared by a researcher to disable Security logs of windows by adding this registry. The Windows will think it is WinPE and will not log any event to the Security Log

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1112/ T1112]
* '''Last Updated''': 2021-10-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path=&#34;*\\Control\\MiniNt\\*&#34; by Registry.dest Registry.user Registry.registry_value_name Registry.registry_key_name Registry.registry_path Registry.registry_value_data 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `disable_security_logs_using_minint_registry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.dest

* Registry.user

* Registry.registry_value_name

* Registry.registry_key_name

* Registry.registry_path

* Registry.registry_value_data



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1112
| Modify Registry
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Unknown.

====Reference====


* https://twitter.com/0gtweet/status/1182516740955226112



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1112/minint_reg/sysmon.log


''version'': 1
</div>
</div>

----

===Disable show hidden files===
The following analytic is to identify a modification in the Windows registry to prevent users from seeing all the files with hidden attributes. This event or techniques are known on some worm and trojan spy malware that will drop hidden files on the infected machine.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1564/001/ T1564.001], [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1564/ T1564], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where (Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\Hidden&#34; OR Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\HideFileExt&#34; Registry.registry_value_name = &#34;DWORD (0x00000001)&#34;) OR (Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\ShowSuperHidden&#34; Registry.registry_value_name = &#34;DWORD (0x00000000)&#34;) by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `disable_show_hidden_files_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_nam



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1564.001
| Hidden Files and Directories
| Defense Evasion
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1564
| Hide Artifacts
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.sophos.com/en-us/threat-center/threat-analyses/viruses-and-spyware/W32~Tiotua-P/detailed-analysis.aspx



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disable uac remote restriction===
This analytic is to detect a suspicious modification of registry to disable UAC remote restriction. This technique was well documented in Microsoft page where attacker may modify this registry value to bypassed UAC feature of windows host. This is a good indicator that some tries to bypassed UAC to suspicious process or gain privilege escalation.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/002/ T1548.002], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-09-29

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path =&#34;*\\CurrentVersion\\Policies\\System*&#34; Registry.registry_value_name=&#34;LocalAccountTokenFilterPolicy&#34; Registry.registry_value_data=&#34;0x00000001&#34; by Registry.dest  Registry.user Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.registry_value_data 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `disable_uac_remote_restriction_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Windows_Registry_Activities|Suspicious Windows Registry Activities]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.dest

* Registry.user

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.registry_value_data



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548.002
| Bypass User Account Control
| Privilege Escalation, Defense Evasion
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin may set this policy for non-critical machine.

====Reference====


* https://docs.microsoft.com/en-us/troubleshoot/windows-server/windows-security/user-account-control-and-remote-restriction



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548.002/LocalAccountTokenFilterPolicy/sysmon.log


''version'': 1
</div>
</div>

----

===Disable windows app hotkeys===
This analytic detects a suspicious registry modification to disable Windows hotkey (shortcut keys) for native Windows applications. This technique is commonly used to disable certain or several Windows applications like `taskmgr.exe` and `cmd.exe`. This technique is used to impair the analyst in analyzing and removing the attacker implant in compromised systems.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-05-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Registry.registry_key_name) as registry_key_name values(Registry.registry_path) as registry_path min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path=&#34;*\\Windows NT\\CurrentVersion\\Image File Execution Options\\*&#34; AND Registry.registry_value_name = &#34;HotKey Disabled&#34; AND Registry.registry_key_name = &#34;Debugger&#34; by Registry.dest Registry.user Registry.registry_value_name 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `disable_windows_app_hotkeys_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as CarbonBlack or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.registry_value_name

* Registry.dest Registry.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/hotkey_disabled_hidden_user/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disable windows behavior monitoring===
This search is to identifies a modification in registry to disable the windows denfender real time behavior monitoring. This event or technique is commonly seen in RAT, bot, or Trojan to disable AV to evade detections.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\\DisableBehaviorMonitoring&#34; OR Registry.registry_path= &#34;*\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\\DisableOnAccessProtection&#34; OR Registry.registry_path= &#34;*\\SOFTWARE\\Policies\\Microsoft\\Windows Defender\\Real-Time Protection\\DisableScanOnRealtimeEnable&#34; OR Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows Defender\\Real-Time Protection\\DisableRealtimeMonitoring&#34; OR Registry.registry_path= &#34;*\\Real-Time Protection\\DisableIntrusionPreventionSystem&#34; OR Registry.registry_path= &#34;*\\Real-Time Protection\\DisableIOAVProtection&#34; OR Registry.registry_path= &#34;*\\Real-Time Protection\\DisableScriptScanning&#34; Registry.registry_value_name = &#34;DWORD (0x00000001)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `disable_windows_behavior_monitoring_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Revil_Ransomware|Revil Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin or user may choose to disable this windows features.

====Reference====


* https://tccontre.blogspot.com/2020/01/remcos-rat-evading-windows-defender-av.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disable windows smartscreen protection===
The following search identifies a modification of registry to disable the smartscreen protection of windows machine. This is windows feature provide an early warning system against website that might engage in phishing attack or malware distribution. This modification are seen in RAT malware to cover their tracks upon downloading other of its component or other payload.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SmartScreenEnabled&#34;  Registry.registry_value_name = &#34;Off&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `disable_windows_smartscreen_protection_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_nam



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin or user may choose to disable this windows features.

====Reference====


* https://tccontre.blogspot.com/2020/01/remcos-rat-evading-windows-defender-av.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disabling cmd application===
this search is to identify modification in registry to disable cmd prompt application. This technique is commonly seen in RAT, Trojan or WORM to prevent triaging or deleting there samples through cmd application which is one of the tool of analyst to traverse on directory and files.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\SOFTWARE\\Policies\\Microsoft\\Windows\\System\\DisableCMD&#34; Registry.registry_value_name = &#34;DWORD (0x00000001)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `disabling_cmd_application_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin may disable this application for non technical user.

====Reference====


* https://any.run/report/ea4ea08407d4ee72e009103a3b77e5a09412b722fdef67315ea63f22011152af/a866d7b1-c236-4f26-a391-5ae32213dfc4#registry



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disabling controlpanel===
this search is to identify registry modification to disable control panel window. This technique is commonly seen in malware to prevent their artifacts , persistence removed on the infected machine.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoControlPanel&#34; Registry.registry_value_name = &#34;DWORD (0x00000001)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `disabling_controlpanel_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin may disable this application for non technical user.

====Reference====


* https://any.run/report/ea4ea08407d4ee72e009103a3b77e5a09412b722fdef67315ea63f22011152af/a866d7b1-c236-4f26-a391-5ae32213dfc4#registry



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disabling firewall with netsh===
This search is to identifies suspicious firewall disabling using netsh application. this technique is commonly seen in malware that tries to communicate or download its component or other payload to its C2 server.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_netsh` Processes.process= &#34;*firewall*&#34; (Processes.process= &#34;*off*&#34; OR  Processes.process= &#34;*disable*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `disabling_firewall_with_netsh_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin may disable firewall during testing or fixing network problem.

====Reference====


* https://tccontre.blogspot.com/2020/01/remcos-rat-evading-windows-defender-av.htm



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Disabling folderoptions windows feature===
This search is to identify registry modification to disable folder options feature of windows to show hidden files, file extension and etc. This technique used by malware in combination if disabling show hidden files feature to hide their files and also to hide the file extension to lure the user base on file icons or fake file extensions.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoFolderOptions&#34; Registry.registry_value_name = &#34;DWORD (0x00000001)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `disabling_folderoptions_windows_feature_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin may disable this application for non technical user.

====Reference====


* https://any.run/report/ea4ea08407d4ee72e009103a3b77e5a09412b722fdef67315ea63f22011152af/a866d7b1-c236-4f26-a391-5ae32213dfc4#registry



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disabling net user account===
This analytic will identify a suspicious command-line that disables a user account using the `net.exe` utility native to Windows. This technique may used by the adversaries to interrupt availability of such users to do their malicious act.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1531/ T1531]
* '''Last Updated''': 2021-05-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.parent_process) as parent_process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_net` AND Processes.process=&#34;*user*&#34; AND Processes.process=&#34;*/active:no*&#34; by  Processes.process_name Processes.original_file_name Processes.dest Processes.user Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `disabling_net_user_account_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1531
| Account Access Removal
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Disabling norun windows app===
This search is to identify modification of registry to disable run application in window start menu. this application is known to be a helpful shortcut to windows OS user to run known application and also to execute some reg or batch script. This technique is used malware to make cleaning of its infection more harder by preventing known application run easily through run shortcut.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer\\NoRun&#34; Registry.registry_value_name = &#34;DWORD (0x00000001)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `disabling_norun_windows_app_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin may disable this application for non technical user.

====Reference====


* https://any.run/report/ea4ea08407d4ee72e009103a3b77e5a09412b722fdef67315ea63f22011152af/a866d7b1-c236-4f26-a391-5ae32213dfc4#registry

* https://blog.malwarebytes.com/detections/pum-optional-norun/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disabling remote user account control===
The search looks for modifications to registry keys that control the enforcement of Windows User Account Control (UAC).

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/002/ T1548.002], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2020-11-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path=*HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\EnableLUA* Registry.registry_value_name=&#34;DWORD (0x00000000)&#34; by Registry.dest, Registry.registry_key_name Registry.user Registry.registry_path Registry.registry_value_name Registry.action 
| `drop_dm_object_name(Registry)` 
| `disabling_remote_user_account_control_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Windows_Registry_Activities|Suspicious Windows Registry Activities]]

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report registry modifications.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_value_name

* Registry.dest

* Registry.registry_key_name

* Registry.user

* Registry.action



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548.002
| Bypass User Account Control
| Privilege Escalation, Defense Evasion
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
This registry key may be modified via administrators to implement a change in system policy. This type of change should be a very rare occurrence.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548.002/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Disabling systemrestore in registry===
The following search identifies the modification of registry related in disabling the system restore of a machine. This event or behavior are seen in some RAT malware to make the restore of the infected machine  difficult and keep their infection on the box.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\\DisableSR&#34; OR Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore\\DisableConfig&#34; Registry.registry_value_name = &#34;DWORD (0x00000001)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `disabling_systemrestore_in_registry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
in some cases admin can disable systemrestore on a machine.

====Reference====


* https://tccontre.blogspot.com/2020/01/remcos-rat-evading-windows-defender-av.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Disabling task manager===
This search is to identifies modification of registry to disable the task manager of windows operating system. this event or technique are commonly seen in malware such as RAT, Trojan, TrojanSpy or worm to prevent the user to terminate their process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\DisableTaskMgr&#34; Registry.registry_value_name = &#34;DWORD (0x00000001)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `disabling_task_manager_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin may disable this application for non technical user.

====Reference====


* https://any.run/report/ea4ea08407d4ee72e009103a3b77e5a09412b722fdef67315ea63f22011152af/a866d7b1-c236-4f26-a391-5ae32213dfc4#registry

* https://blog.talosintelligence.com/2020/05/threat-roundup-0424-0501.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/win_app_defender_disabling/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Domain account discovery with net app===
This analytic looks for the execution of `net.exe` or `net1.exe` with command-line arguments utilized to query for domain users. Red Teams and adversaries alike may use net.exe to enumerate domain users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_net` AND Processes.process = &#34;* user*&#34; AND Processes.process = &#34;*/do*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `domain_account_discovery_with_net_app_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id

* Processes.parent_process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://docs.microsoft.com/en-us/defender-for-identity/playbook-domain-dominance

* https://attack.mitre.org/techniques/T1087/002/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Domain account discovery with dsquery===
This analytic looks for the execution of `dsquery.exe` with command-line arguments utilized to discover  domain users. The `user` argument returns a list of all users registered in the domain. Red Teams and adversaries alike engage in remote system discovery for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=&#34;dsquery.exe&#34; AND Processes.process = &#34;*user*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `domain_account_discovery_with_dsquery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id

* Processes.parent_process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://jpcertcc.github.io/ToolAnalysisResultSheet/details/dsquery.htm

* https://attack.mitre.org/techniques/T1087/002/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Domain account discovery with wmic===
This analytic looks for the execution of `wmic.exe` with command-line arguments utilized to query for domain users. Red Teams and adversaries alike use wmic.exe to enumerate domain users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=&#34;wmic.exe&#34; AND Processes.process = &#34;*/NAMESPACE:\\\\root\\directory\\ldap*&#34; AND Processes.process = &#34;*ds_user*&#34; AND Processes.process = &#34;*GET*&#34; AND Processes.process = &#34;*ds_samaccountname*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `domain_account_discovery_with_wmic_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id

* Processes.parent_process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1087/002/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Domain controller discovery with nltest===
This analytic looks for the execution of `nltest.exe` with command-line arguments utilized to discover remote systems. The arguments `/dclist:` and &#39;/dsgetdc:&#39;, can be used to return a list of all domain controllers. Red Teams and adversaries alike may use nltest.exe to identify domain controllers in a Windows Domain for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-08-30

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;nltest.exe&#34;) (Processes.process=&#34;*/dclist:*&#34; OR Processes.process=&#34;*/dsgetdc:*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `domain_controller_discovery_with_nltest_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Domain controller discovery with wmic===
This analytic looks for the execution of `wmic.exe` with command-line arguments utilized to discover remote systems. The arguments utilized in this command line return a list of all domain controllers in a Windows domain. Red Teams and adversaries alike use *.exe to identify remote systems for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;wmic.exe&#34;) (Processes.process=&#34;&#34; OR Processes.process=&#34;*DomainControllerAddress*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `domain_controller_discovery_with_wmic_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Domain group discovery with dsquery===
This analytic looks for the execution of `dsquery.exe` with command-line arguments utilized to query for domain groups. The argument `group`, returns a list of all domain groups. Red Teams and adversaries alike use may leverage dsquery.exe to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;dsquery.exe&#34;) (Processes.process=&#34;*group*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `domain_group_discovery_with_dsquery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Domain group discovery with net===
This analytic looks for the execution of `net.exe` with command-line arguments utilized to query for domain groups. The argument `group /domain`, returns a list of all domain groups. Red Teams and adversaries alike use net.exe to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;net.exe&#34; OR Processes.process_name=&#34;net1.exe&#34;) (Processes.process=*group* AND Processes.process=*/do*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `domain_group_discovery_with_net_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Domain group discovery with wmic===
This analytic looks for the execution of `wmic.exe` with command-line arguments utilized to query for domain groups. The arguments utilized in this command return a list of all domain groups. Red Teams and adversaries alike use wmic.exe to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;wmic.exe&#34;) (Processes.process=*/NAMESPACE:\\\\root\\directory\\ldap* AND Processes.process=*ds_group* AND Processes.process=&#34;*GET ds_samaccountname*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `domain_group_discovery_with_wmic_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Domain group discovery with adsisearcher===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the `[Adsisearcher]` type accelerator being used to query Active Directory for domain groups. Red Teams and adversaries may leverage `[Adsisearcher]` to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*[adsisearcher]*&#34; AND Message = &#34;*(objectcategory=group)*&#34; AND Message = &#34;*findAll()*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `domain_group_discovery_with_adsisearcher_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use Adsisearcher for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/

* https://devblogs.microsoft.com/scripting/use-the-powershell-adsisearcher-type-accelerator-to-search-active-directory/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Download files using telegram===
The following analytic will identify a suspicious download by the Telegram application on a Windows system. This behavior was identified on a honeypot where the adversary gained access, installed Telegram and followed through with downloading different network scanners (port, bruteforcer, masscan) to the system and later used to mapped the whole network and further move laterally.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1105/ T1105]
* '''Last Updated''': 2021-05-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode= 15 process_name = &#34;telegram.exe&#34; TargetFilename = &#34;*:Zone.Identifier&#34; 
|stats count min(_time) as firstTime max(_time) as lastTime by Computer EventCode Image process_id TargetFilename Hash 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `download_files_using_telegram_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name and TargetFilename from your endpoints or Events that monitor filestream events which is happened when process download something. (EventCode 15) If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Computer

* EventCode

* Image

* process_id

* TargetFilename

* Hash



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1105
| Ingress Tool Transfer
| Command And Control
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
normal download of file in telegram app. (if it was a common app in network)

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/minergate/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Drop icedid license dat===
This search is to detect dropping a suspicious file named as &#34;license.dat&#34; in %appdata%. This behavior seen in latest IcedID malware that contain the actual core bot that will be injected in other process to do banking stealing.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/ T1204], [https://attack.mitre.org/techniques/T1204/002/ T1204.002]
* '''Last Updated''': 2021-07-30

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode= 11  TargetFilename = &#34;*\\license.dat&#34; AND (TargetFilename=&#34;*\\appdata\\*&#34; OR TargetFilename=&#34;*\\programdata\\*&#34;) 
|stats count min(_time) as firstTime max(_time) as lastTime by TargetFilename EventCode process_id  process_name Computer 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `drop_icedid_license_dat_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204
| User Execution
| Execution
|-
| T1204.002
| Malicious File
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.cisecurity.org/white-papers/security-primer-icedid/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/simulated_icedid/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Dump lsass via comsvcs dll===
Detect the usage of comsvcs.dll for dumping the lsass process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/001/ T1003.001], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-02-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_rundll32` Processes.process=*comsvcs.dll* Processes.process=*MiniDump* by Processes.user Processes.process_name Processes.original_file_name Processes.process Processes.dest 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `dump_lsass_via_comsvcs_dll_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.001
| LSASS Memory
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://modexp.wordpress.com/2019/08/30/minidumpwritedump-via-com-services-dll/

* https://twitter.com/SBousseaden/status/1167417096374050817



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.001/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Dump lsass via procdump===
Detect procdump.exe dumping the lsass process. This query looks for both -mm and -ma usage. -mm will produce a mini dump file and -ma will write a dump file with all process memory. Both are highly suspect and should be reviewed. This query does not monitor for the internal name (original_file_name=procdump) of the PE or look for procdump64.exe. Modify the query as needed.\
During triage, confirm this is procdump.exe executing. If it is the first time a Sysinternals utility has been ran, it is possible there will be a -accepteula on the command line. Review other endpoint data sources for cross process (injection) into lsass.exe.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/001/ T1003.001], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_procdump` (Processes.process=*-ma* OR Processes.process=*-mm*) Processes.process=*lsass* by Processes.user Processes.process_name Processes.process Processes.original_file_name Processes.dest 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `dump_lsass_via_procdump_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.001
| LSASS Memory
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://attack.mitre.org/techniques/T1003/001/

* https://docs.microsoft.com/en-us/sysinternals/downloads/procdump

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.001/T1003.001.md#atomic-test-2---dump-lsassexe-memory-using-procdump



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.001/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Etw registry disabled===
This analytic is to detect a registry modification to disable ETW feature of windows. This technique is to evade EDR appliance to evade detections and hide its execution from audit logs.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/006/ T1562.006], [https://attack.mitre.org/techniques/T1127/ T1127], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-10-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where (Registry.registry_path=&#34;*\\SOFTWARE\\Microsoft\\.NETFramework*&#34;) Registry.registry_value_name = ETWEnabled Registry.registry_value_data=0x00000000 by Registry.dest Registry.user Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.registry_value_data 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `etw_registry_disabled_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.dest

* Registry.user

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.registry_value_data



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.006
| Indicator Blocking
| Defense Evasion
|-
| T1127
| Trusted Developer Utilities Proxy Execution
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://gist.github.com/Cyb3rWard0g/a4a115fd3ab518a0e593525a379adee3



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1127/etw_disable/sysmon.log


''version'': 1
</div>
</div>

----

===Elevated group discovery with net===
This analytic looks for the execution of `net.exe` or `net1.exe`  with command-line arguments utilized to query for specific elevated domain groups. Red Teams and adversaries alike use net.exe to enumerate elevated domain groups for situational awareness and Active Directory Discovery to identify high privileged users.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;net.exe&#34; OR Processes.process_name=&#34;net1.exe&#34;) (Processes.process=&#34;*group*&#34; AND Processes.process=&#34;*/do*&#34;) (Processes.process=&#34;*Domain Admins*&#34; OR Processes.process=&#34;*Enterprise Admins*&#34; OR Processes.process=&#34;*Schema Admins*&#34; OR Processes.process=&#34;*Account Operators*&#34; OR Processes.process=&#34;*Server Operators*&#34; OR Processes.process=&#34;*Protected Users*&#34; OR Processes.process=&#34;*Dns Admins*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `elevated_group_discovery_with_net_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/

* https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-b--privileged-accounts-and-groups-in-active-directory

* https://adsecurity.org/?p=3658



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Elevated group discovery with wmic===
This analytic looks for the execution of `wmic.exe` with command-line arguments utilized to query for specific domain groups. Red Teams and adversaries alike use net.exe to enumerate elevated domain groups for situational awareness and Active Directory Discovery to identify high privileged users.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;wmic.exe&#34;) (Processes.process=*/NAMESPACE:\\\\root\\directory\\ldap*) (Processes.process=&#34;*Domain Admins*&#34; OR Processes.process=&#34;*Enterprise Admins*&#34; OR Processes.process=&#34;*Schema Admins*&#34; OR Processes.process=&#34;*Account Operators*&#34; OR Processes.process=&#34;*Server Operators*&#34; OR Processes.process=&#34;*Protected Users*&#34; OR Processes.process=&#34;*Dns Admins*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `elevated_group_discovery_with_wmic_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/

* https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-b--privileged-accounts-and-groups-in-active-directory

* https://adsecurity.org/?p=3658



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Elevated group discovery with powerview===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-DomainGroupMember` commandlet. `Get-DomainGroupMember` is part of PowerView, a PowerShell tool used to perform enumeration on Windows domains. As the name suggests, `Get-DomainGroupMember` is used to list the members of an specific domain group. Red Teams and adversaries alike use PowerView to enumerate elevated domain groups for situational awareness and Active Directory Discovery to identify high privileged users.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*Get-DomainGroupMember*&#34;) AND Message IN (&#34;*Domain Admins*&#34;,&#34;*Enterprise Admins*&#34;, &#34;*Schema Admins*&#34;, &#34;*Account Operators*&#34; , &#34;*Server Operators*&#34;, &#34;*Protected Users*&#34;,  &#34;*Dns Admins*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `elevated_group_discovery_with_powerview_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerView for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/

* https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainGroupMember/

* https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/plan/security-best-practices/appendix-b--privileged-accounts-and-groups-in-active-directory

* https://attack.mitre.org/techniques/T1069/002/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Enable rdp in other port number===
This search is to detect a modification to registry to enable rdp to a machine with different port number. This technique was seen in some atttacker tries to do lateral movement and remote access to a compromised machine to gain control of it.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/ T1021]
* '''Last Updated''': 2021-05-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Registry.registry_key_name) as registry_key_name values(Registry.registry_path) as registry_path min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path=&#34;*HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp*&#34; Registry.registry_key_name = &#34;PortNumber&#34; by Registry.dest Registry.user Registry.registry_value_name 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `enable_rdp_in_other_port_number_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Prohibited_Traffic_Allowed_or_Protocol_Mismatch|Prohibited Traffic Allowed or Protocol Mismatch]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Registry.registry_path

* Registry.dest

* Registry.user

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021
| Remote Services
| Lateral Movement
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.mvps.net/docs/how-to-secure-remote-desktop-rdp/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/honeypots/casper/datasets1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Enable wdigest uselogoncredential registry===
This analytic is to detect a suspicious registry modification to enable plain text credential feature of windows. This technique was used by several malware and also by mimikatz to be able to dumpe the a plain text credential to the compromised or target host. This TTP is really a good indicator that someone wants to dump the crendential of the host so it must be a good pivot for credential dumping techniques.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1112/ T1112], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-10-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path=&#34;*\\System\\CurrentControlSet\\Control\\SecurityProviders\\WDigest\\*&#34; Registry.registry_value_name = &#34;UseLogonCredential&#34; Registry.registry_value_data = 0x00000001 by Registry.dest Registry.user Registry.registry_value_name Registry.registry_key_name Registry.registry_path Registry.registry_value_data 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `enable_wdigest_uselogoncredential_registry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.dest

* Registry.user

* Registry.registry_value_name

* Registry.registry_key_name

* Registry.registry_path

* Registry.registry_value_data



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1112
| Modify Registry
| Defense Evasion
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.csoonline.com/article/3438824/how-to-detect-and-halt-credential-theft-via-windows-wdigest.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/wdigest_enable/sysmon.log


''version'': 1
</div>
</div>

----

===Enumerate users local group using telegram===
This analytic will detect a suspicious Telegram process enumerating all network users in a local group. This technique was seen in a Monero infected honeypot to mapped all the users on the compromised system. EventCode 4798 is generated when a process enumerates a user&#39;s security-enabled local groups on a computer or device.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-05-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4798  Process_Name = &#34;*\\telegram.exe&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by ComputerName EventCode Process_Name  Process_ID Account_Name Account_Domain Logon_ID Security_ID Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `enumerate_users_local_group_using_telegram_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the Task Schedule (Exa. Security Log EventCode 4798) endpoints. Tune and filter known instances of process like logonUI used in your environment.

====Required field====

* _time

* ComputerName

* EventCode

* Process_Name

* Process_ID

* Account_Name

* Account_Domain

* Logon_ID

* Security_ID

* Message



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4798



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/minergate/windows-security.log


''version'': 1
</div>
</div>

----

===Esentutl sam copy===
The following analytic identifies the process - `esentutl.exe` - being used to capture credentials stored in ntds.dit or the SAM file on disk. During triage, review parallel processes and determine if legitimate activity. Upon determination of illegitimate activity, take further action to isolate and contain the threat.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/002/ T1003.002], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-08-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_esentutl` Processes.process IN (&#34;*ntds*&#34;, &#34;*SAM*&#34;) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `esentutl_sam_copy_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.002
| Security Account Manager
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Privilege Escalation

* Lateral Movement


====Known False Positives====
False positives should be limited. Filter as needed.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/6a570c2a4630cf0c2bd41a2e8375b5d5ab92f700/atomics/T1003.002/T1003.002.md

* https://attack.mitre.org/software/S0404/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Eventvwr uac bypass===
The following search identifies Eventvwr bypass by identifying the registry modification into a specific path that eventvwr.msc looks to (but is not valid) upon execution. A successful attack will include a suspicious command to be executed upon eventvwr.msc loading. Upon triage, review the parallel processes that have executed. Identify any additional registry modifications on the endpoint that may look suspicious. Remediate as necessary.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/002/ T1548.002], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-03-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Registry.registry_key_name) as registry_key_name values(Registry.registry_path) as registry_path min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where  Registry.registry_path=&#34;*mscfile\\shell\\open\\command\\*&#34;  by Registry.user, Registry.dest , Registry.registry_value_name
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `eventvwr_uac_bypass_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.user

* Registry.dest

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548.002
| Bypass User Account Control
| Privilege Escalation, Defense Evasion
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation

* Privilege Escalation


====Known False Positives====
Some false positives may be present and will need to be filtered.

====Reference====


* https://blog.malwarebytes.com/malwarebytes-news/2021/02/lazyscripter-from-empire-to-double-rat/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1548.002/T1548.002.md

* https://attack.mitre.org/techniques/T1548/002

* https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548.002/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Excel spawning powershell===
The following detection identifies Microsoft Excel spawning PowerShell. Typically, this is not common behavior and not default with Excel.exe. Excel.exe will generally be found in the following path `C:\Program Files\Microsoft Office\root\Office16` (version will vary). PowerShell spawning from Excel.exe is common for a spearphishing attachment and is actively used. Albeit, the command executed will most likely be encoded and captured via another detection. During triage, review parallel processes and identify any files that may have been written.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/002/ T1003.002], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-04-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=&#34;excel.exe&#34; `process_powershell` by Processes.parent_process Processes.process_name Processes.user Processes.dest Processes.original_file_name 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)` 
| `excel_spawning_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.002
| Security Account Manager
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited, but if any are present, filter as needed.

====Reference====


* https://redcanary.com/threat-detection-report/techniques/powershell/

* https://attack.mitre.org/techniques/T1566/001/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Excel spawning windows script host===
The following detection identifies Microsoft Excel spawning Windows Script Host - `cscript.exe` or `wscript.exe`. Typically, this is not common behavior and not default with Excel.exe. Excel.exe will generally be found in the following path `C:\Program Files\Microsoft Office\root\Office16` (version will vary). `cscript.exe` or `wscript.exe` default location is `c:\windows\system32\` or c:windows\syswow64`. `cscript.exe` or `wscript.exe` spawning from Excel.exe is common for a spearphishing attachment and is actively used. Albeit, the command-line executed will most likely be obfuscated and captured via another detection. During triage, review parallel processes and identify any files that may have been written. Review the reputation of the remote destination and block accordingly.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/002/ T1003.002], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-04-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=&#34;excel.exe&#34; Processes.process_name IN (&#34;cscript.exe&#34;, &#34;wscript.exe&#34;)  by Processes.parent_process Processes.process_name Processes.user Processes.dest 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)` 
| `excel_spawning_windows_script_host_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* process_name

* process_id

* parent_process_name

* dest

* user

* parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.002
| Security Account Manager
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited, but if any are present, filter as needed. In some instances, `cscript.exe` is used for legitimate business practices.

====Reference====


* https://app.any.run/tasks/8ecfbc29-03d0-421c-a5bf-3905d29192a2/

* https://attack.mitre.org/techniques/T1566/001/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Excessive attempt to disable services===
This analytic will identify suspicious series of command-line to disable several services. This technique is seen where the adversary attempts to disable security app services or other malware services to complete the objective on the compromised system.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1489/ T1489]
* '''Last Updated''': 2021-05-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime  from datamodel=Endpoint.Processes where   Processes.process_name = &#34;sc.exe&#34; AND Processes.process=&#34;*config*&#34; OR Processes.process=&#34;*Disabled*&#34; by Processes.process_name Processes.parent_process_name Processes.dest Processes.user _time span=1m 
| where count &gt;=5 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `excessive_attempt_to_disable_services_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed sc.exe may be used.

====Required field====

* _time

* Processes.process

* Processes.process_id

* Processes.process_name

* Processes.parent_process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1489
| Service Stop
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Excessive service stop attempt===
This analytic identifies suspicious series of attempt to kill multiple services on a system using either `net.exe` or `sc.exe`. This technique is use by adversaries to terminate security services or other related services to continue there objective and evade detections.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1489/ T1489]
* '''Last Updated''': 2021-05-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime  from datamodel=Endpoint.Processes where `process_net` OR  Processes.process_name = &#34;sc.exe&#34; OR  Processes.process_name = &#34;net1.exe&#34; AND Processes.process=&#34;*stop*&#34; OR Processes.process=&#34;*delete*&#34; by Processes.process_name Processes.original_file_name Processes.parent_process_name Processes.dest Processes.user _time span=1m 
| where count &gt;=5 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `excessive_service_stop_attempt_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1489
| Service Stop
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Excessive usage of cacls app===
The following analytic identifies excessive usage of `cacls.exe`, `xcacls.exe` or `icacls.exe` application to change file or folder permission. This behavior is commonly seen where the adversary attempts to impair some users from deleting or accessing its malware components or artifact from the compromised system.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1222/ T1222]
* '''Last Updated''': 2021-05-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.process_id) as process_id  values(Processes.process_name) as process_name count min(_time) as firstTime max(_time) as lastTime  from datamodel=Endpoint.Processes where Processes.process_name = &#34;cacls.exe&#34; OR Processes.process_name = &#34;icacls.exe&#34; OR Processes.process_name = &#34;XCACLS.exe&#34; by Processes.parent_process_name Processes.parent_process Processes.dest Processes.user _time span=1m 
| where count &gt;=10 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `excessive_usage_of_cacls_app_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process

* Processes.process_id

* Processes.process_name

* Processes.parent_process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1222
| File and Directory Permissions Modification
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Administrators or administrative scripts may use this application. Filter as needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Excessive usage of net app===
This analytic identifies excessive usage of `net.exe` or `net1.exe` within a bucket of time (1 minute). This behavior was seen in a Monero incident where the adversary attempts to create many users, delete and disable users as part of its malicious behavior.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1531/ T1531]
* '''Last Updated''': 2021-05-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime  from datamodel=Endpoint.Processes where `process_net` by Processes.process_name Processes.parent_process_name Processes.original_file_name Processes.dest Processes.user _time span=1m 
| where count &gt;=10 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `excessive_usage_of_net_app_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1531
| Account Access Removal
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown. Filter as needed. Modify the time span as needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Excessive usage of sc service utility===
This search is to detect a suspicious excessive usage of sc.exe in a host machine. This technique was seen in several ransomware , xmrig and other malware to create, modify, delete or disable a service may related to security application or to gain privilege escalation.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1569/ T1569], [https://attack.mitre.org/techniques/T1569/002/ T1569.002]
* '''Last Updated''': 2021-06-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode = 1 process_name = &#34;sc.exe&#34; 
|  bucket _time span=15m 
| stats values(process) as process count as numScExe by Computer, _time 
|  eventstats avg(numScExe) as avgScExe, stdev(numScExe) as stdScExe, count as numSlots by Computer 
|  eval upperThreshold=(avgScExe + stdScExe *3) 
|  eval isOutlier=if(avgScExe &gt; 5 and avgScExe &gt;= upperThreshold, 1, 0) 
|  search isOutlier=1 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `excessive_usage_of_sc_service_utility_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed taskkill.exe may be used.

====Required field====

* _time

* EventCode

* process_name

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1569
| System Services
| Execution
|-
| T1569.002
| Service Execution
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
excessive execution of sc.exe is quite suspicious since it can modify or execute app in high privilege permission.

====Reference====


* https://app.any.run/tasks/c0f98850-af65-4352-9746-fbebadee4f05/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data2/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Excessive usage of taskkill===
This analytic identifies excessive usage of `taskkill.exe` application. This application is commonly used by adversaries to evade detections by killing security product processes or even other processes to evade detection.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-05-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = &#34;taskkill.exe&#34;  by Processes.parent_process_name Processes.process_name Processes.dest Processes.user _time span=1m 
| where count &gt;=10 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `excessive_usage_of_taskkill_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed taskkill.exe may be used.

====Required field====

* _time

* Processes.parent_process_name

* Processes.process_name

* Processes.dest

* Processes.user

* Processes.process

* Processes.process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Unknown. Filter as needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Excessive usage of nslookup app===
This search is to detect potential DNS exfiltration using nslookup application. This technique are seen in couple of malware and APT group to exfiltrated collected data in a infected machine or infected network. This detection is looking for unique use of nslookup where it tries to use specific record type (TXT, A, AAAA) that are commonly used by attacker and also the retry parameter which is designed to query C2 DNS multiple tries.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1048/ T1048]
* '''Last Updated''': 2021-04-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode = 1 process_name = &#34;nslookup.exe&#34; 
|  bucket _time span=15m 
| stats count as numNsLookup by Computer, _time 
|  eventstats avg(numNsLookup) as avgNsLookup, stdev(numNsLookup) as stdNsLookup, count as numSlots by Computer 
|  eval upperThreshold=(avgNsLookup + stdNsLookup *3) 
|  eval isOutlier=if(avgNsLookup &gt; 20 and avgNsLookup &gt;= upperThreshold, 1, 0) 
|  search isOutlier=1 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `excessive_usage_of_nslookup_app_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_DNS_Traffic|Suspicious DNS Traffic]]

* [[Documentation:ESSOC:stories:UseCase#Dynamic_DNS|Dynamic DNS]]

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]

* [[Documentation:ESSOC:stories:UseCase#Data_Exfiltration|Data Exfiltration]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances of nslookup.exe may be used.

====Required field====

* _time

* Computer

* process_name

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1048
| Exfiltration Over Alternative Protocol
| Exfiltration
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.fireeye.com/blog/threat-research/2017/03/fin7_spear_phishing.html

* https://www.varonis.com/blog/dns-tunneling/

* https://www.microsoft.com/security/blog/2021/01/20/deep-dive-into-the-solorigate-second-stage-activation-from-sunburst-to-teardrop-and-raindrop/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1048.003/nslookup_exfil/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Excessive number of distinct processes created in windows temp folder===
This analytic will identify suspicious series of process executions.  We have observed that post exploit framework tools like Koadic and Meterpreter will launch an excessive number of processes with distinct file paths from Windows\Temp to execute actions on objective.  This behavior is extremely anomalous compared to typical application behaviors that use Windows\Temp.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059]
* '''Last Updated''': 2021-06-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process distinct_count(Processes.process) as distinct_process_count  min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process = &#34;*\\Windows\\Temp\\*&#34; by Processes.dest Processes.user  _time span=20m 
| where distinct_process_count &gt; 37 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `excessive_number_of_distinct_processes_created_in_windows_temp_folder_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Meterpreter|Meterpreter]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the full process path in the process field of CIM&#39;s Process data model. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed sc.exe may be used.

====Required field====

* _time

* Processes.process

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Many benign applications will create processes from executables in Windows\Temp, although unlikely to exceed the given threshold.  Filter as needed.

====Reference====


* https://www.offensive-security.com/metasploit-unleashed/about-meterpreter/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059/meterpreter/windows_temp_processes/logExcessiveWindowsTemp.log


''version'': 1
</div>
</div>

----

===Excessive number of service control start as disabled===
This detection targets behaviors observed when threat actors have used sc.exe to modify services. We observed malware in a honey pot spawning numerous sc.exe processes in a short period of time, presumably to impair defenses, possibly to block others from compromising the same machine.  This detection will alert when we see both an excessive number of sc.exe processes launched with specific commandline arguments to disable the start of certain services.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-06-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` distinct_count(Processes.process) as distinct_cmdlines values(Processes.process_id) as process_ids min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes WHERE Processes.process_name = &#34;sc.exe&#34; AND Processes.process=&#34;*start= disabled*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.parent_process_id, _time span=30m 
| where distinct_cmdlines &gt;= 8 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `excessive_number_of_service_control_start_as_disabled_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must be ingesting logs with both the process name and command line from your endpoints. The complete process name with command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Legitimate programs and administrators will execute sc.exe with the start disabled flag.  It is possible, but unlikely from the telemetry of normal Windows operation we observed, that sc.exe will be called more than seven times in a short period of time.

====Reference====


* https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/sc-create

* https://attack.mitre.org/techniques/T1562/001/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/sc_service_start_disabled/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Excessive number of taskhost processes===
This detection targets behaviors observed in post exploit kits like Meterpreter and Koadic that are run in memory.  We have observed that these tools must invoke an excessive number of taskhost.exe and taskhostex.exe processes to complete various actions (discovery, lateral movement, etc.).  It is extremely uncommon in the course of normal operations to see so many distinct taskhost and taskhostex processes running concurrently in a short time frame.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1033/ T1033]
* '''Last Updated''': 2021-06-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process_id) as process_ids  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes WHERE Processes.process_name = &#34;taskhost.exe&#34; OR Processes.process_name = &#34;taskhostex.exe&#34; BY Processes.dest Processes.process_name _time span=1h 
| `drop_dm_object_name(Processes)` 
| eval pid_count=mvcount(process_ids) 
| eval taskhost_count_=if(process_name == &#34;taskhost.exe&#34;, pid_count, 0) 
| eval taskhostex_count_=if(process_name == &#34;taskhostex.exe&#34;, pid_count, 0) 
| stats sum(taskhost_count_) as taskhost_count, sum(taskhostex_count_) as taskhostex_count by _time, dest, firstTime, lastTime 
| where taskhost_count &gt; 10 and taskhostex_count &gt; 10 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `excessive_number_of_taskhost_processes_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Meterpreter|Meterpreter]]


====How To Implement====
To successfully implement this search you need to be ingesting events related to processes on the endpoints that include the name of the process and process id into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process_id

* Processes.process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1033
| System Owner/User Discovery
| Discovery
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Administrators, administrative actions or certain applications may run many instances of taskhost and taskhostex concurrently.  Filter as needed.

====Reference====


* https://attack.mitre.org/software/S0250/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059/meterpreter/taskhost_processes/logExcessiveTaskHost.log


''version'': 1
</div>
</div>

----

===Exchange powershell abuse via ssrf===
This analytic identifies suspicious behavior related to ProxyShell against on-premise Microsoft Exchange servers. \
Modification of this analytic is requried to ensure fields are mapped accordingly. \
A suspicious event will have `PowerShell`, the method `POST` and `autodiscover.json`. This is indicative of accessing PowerShell on the back end of Exchange with SSRF. \
An event will look similar to `POST /autodiscover/autodiscover.json a=dsxvu@fnsso.flq/powershell/?X-Rps-CAT=VgEAVAdXaW5kb3d...` (abbreviated) \
Review the source attempting to perform this activity against your environment. In addition, review PowerShell logs and access recently granted to Exchange roles.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1190/ T1190]
* '''Last Updated''': 2021-08-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| `exchange` c_uri=&#34;*//autodiscover.json*&#34; cs_uri_query=&#34;*PowerShell*&#34; cs_method=&#34;POST&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, cs_uri_query, cs_method, c_uri 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `exchange_powershell_abuse_via_ssrf_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#ProxyShell|ProxyShell]]


====How To Implement====
The following analytic requires on-premise Exchange to be logging to Splunk using the TA - https://splunkbase.splunk.com/app/3225. Ensure logs are parsed correctly, or tune the analytic for your environment.

====Required field====

* _time

* dest

* cs_uri_query

* cs_method

* c_uri



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1190
| Exploit Public-Facing Application
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives, however, tune as needed.

====Reference====


* https://github.com/GossiTheDog/ThreatHunting/blob/master/AzureSentinel/Exchange-Powershell-via-SSRF

* https://blog.orange.tw/2021/08/proxylogon-a-new-attack-surface-on-ms-exchange-part-1.html

* https://peterjson.medium.com/reproducing-the-proxyshell-pwn2own-exploit-49743a4ea9a1



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1190/exchange-events.json


''version'': 1
</div>
</div>

----

===Exchange powershell module usage===
The following analytic identifies the usage of Exchange PowerShell modules that were recently used for a proof of concept related to ProxyShell. Currently, there is no active data shared or data we could re-produce relate to this part of the ProxyShell chain of exploits.  \
Inherently, the usage of the modules is not malicious, but reviewing parallel processes, and user, of the session will assist with determining the intent. \
Module - New-MailboxExportRequest will begin the process of exporting contents of a primary mailbox or archive to a .pst file. \
Module - New-managementroleassignment can assign a management role to a management role group, management role assignment policy, user, or universal security group (USG).

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-08-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message IN (&#34;*New-MailboxExportRequest*&#34;, &#34;*New-ManagementRoleAssignment*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by Path Message OpCode ComputerName User EventCode
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `exchange_powershell_module_usage_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#ProxyShell|ProxyShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Path

* Message

* OpCode

* ComputerName

* User

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Reconnaissance

* Exploitation


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://docs.microsoft.com/en-us/powershell/module/exchange/new-mailboxexportrequest?view=exchange-ps

* https://docs.microsoft.com/en-us/powershell/module/exchange/new-managementroleassignment?view=exchange-ps

* https://blog.orange.tw/2021/08/proxyshell-a-new-attack-surface-on-ms-exchange-part-3.html

* https://www.zerodayinitiative.com/blog/2021/8/17/from-pwn2own-2021-a-new-attack-surface-on-microsoft-exchange-proxyshell



====Test Dataset====


''version'': 1
</div>
</div>

----

===Executables or script creation in suspicious path===
This analytic will identify suspicious executable or scripts (known file extensions) in list of suspicious file path in Windows. This technique is used by adversaries to evade detection. The suspicious file path are known paths used in the wild and are not common to have executable or scripts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036/ T1036]
* '''Last Updated''': 2021-05-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
|tstats `security_content_summariesonly` values(Filesystem.file_path) as file_path count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Filesystem where (Filesystem.file_name = *.exe OR Filesystem.file_name = *.dll OR Filesystem.file_name = *.sys OR Filesystem.file_name = *.com OR Filesystem.file_name = *.vbs OR Filesystem.file_name = *.vbe OR Filesystem.file_name = *.js OR Filesystem.file_name = *.ps1 OR Filesystem.file_name = *.bat OR Filesystem.file_name = *.cmd OR Filesystem.file_name = *.pif) AND ( Filesystem.file_path = *\\windows\\fonts\\* OR Filesystem.file_path = *\\windows\\temp\\* OR Filesystem.file_path = *\\users\\public\\* OR Filesystem.file_path = *\\windows\\debug\\* OR Filesystem.file_path = *\\Users\\Administrator\\Music\\* OR Filesystem.file_path = *\\Windows\\servicing\\* OR Filesystem.file_path = *\\Users\\Default\\* OR Filesystem.file_path = *Recycle.bin* OR Filesystem.file_path = *\\Windows\\Media\\* OR Filesystem.file_path = *\\Windows\\repair\\* OR Filesystem.file_path = *\\AppData\\Local\\Temp*) by Filesystem.file_create_time Filesystem.process_id  Filesystem.file_name Filesystem.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `executables_or_script_creation_in_suspicious_path_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the Filesystem responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Filesystem` node.

====Required field====

* _time

* Filesystem.file_path

* Filesystem.file_create_time

* Filesystem.process_id

* Filesystem.file_name

* Filesystem.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1036
| Masquerading
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Administrators may allow creation of script or exe in the paths specified. Filter as needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Execute javascript with jscript com clsid===
This analytic will identify suspicious process of cscript.exe where it tries to execute javascript using jscript.encode CLSID (COM OBJ). This technique was seen in ransomware (reddot ransomware) where it execute javascript with this com object with combination of amsi disabling technique.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/005/ T1059.005]
* '''Last Updated''': 2021-06-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = &#34;cscript.exe&#34; Processes.process=&#34;*-e:{F414C262-6AC0-11CF-B6D1-00AA00BBBB58}*&#34; by Processes.parent_process_name Processes.process_name Processes.process Processes.parent_process Processes.process_id Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `execute_javascript_with_jscript_com_clsid_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the Filesystem responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Filesystem` node.

====Required field====

* _time

* Processes.parent_process_name

* Processes.process_name

* Processes.process

* Processes.parent_process

* Processes.process_id

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.005
| Visual Basic
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://app.any.run/tasks/c0f98850-af65-4352-9746-fbebadee4f05/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data2/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Execution of file with multiple extensions===
This search looks for processes launched from files that have double extensions in the file name. This is typically done to obscure the &#34;real&#34; file extension and make it appear as though the file being accessed is a data file, as opposed to executable content.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036/ T1036], [https://attack.mitre.org/techniques/T1036/003/ T1036.003]
* '''Last Updated''': 2020-11-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process = *.doc.exe OR Processes.process = *.htm.exe OR Processes.process = *.html.exe OR Processes.process = *.txt.exe OR Processes.process = *.pdf.exe OR Processes.process = *.doc.exe by Processes.dest Processes.user Processes.process Processes.parent_process 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `drop_dm_object_name(Processes)` 
| `execution_of_file_with_multiple_extensions_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_File_Extension_and_Association_Abuse|Windows File Extension and Association Abuse]]

* [[Documentation:ESSOC:stories:UseCase#Masquerading_-_Rename_System_Utilities|Masquerading - Rename System Utilities]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node.

====Required field====

* _time

* Processes.process

* Processes.dest

* Processes.user

* Processes.parent_process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1036
| Masquerading
| Defense Evasion
|-
| T1036.003
| Rename System Utilities
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1036.003/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Extraction of registry hives===
The following analytic identifies the use of `reg.exe` exporting Windows Registry hives containing credentials. Adversaries may use this technique to export registry hives for offline credential access attacks. Typically found executed from a untrusted process or script. Upon execution, a file will be written to disk.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/002/ T1003.002], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-09-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_reg` (Processes.process=*save* OR Processes.process=*export*) AND (Processes.process=&#34;*\sam *&#34; OR Processes.process=&#34;*\system *&#34; OR Processes.process=&#34;*\security *&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `extraction_of_registry_hives_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.002
| Security Account Manager
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
It is possible some agent based products will generate false positives. Filter as needed.

====Reference====


* https://www.fireeye.com/blog/threat-research/2021/05/shining-a-light-on-darkside-ransomware-operations.html

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.002/T1003.002.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.002/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===File with samsam extension===
The search looks for file writes with extensions consistent with a SamSam ransomware attack.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': 
* '''Last Updated''': 2018-12-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Filesystem.user) as user values(Filesystem.dest) as dest values(Filesystem.file_path) as file_path from datamodel=Endpoint.Filesystem by Filesystem.file_name 
| `drop_dm_object_name(Filesystem)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)`
| rex field=file_name &#34;(?&lt;file_extension&gt;\.[^\.]+)$&#34; 
| search file_extension=.stubbin OR file_extension=.berkshire OR file_extension=.satoshi OR file_extension=.sophos OR file_extension=.keyxml 
| `file_with_samsam_extension_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]


====How To Implement====
You must be ingesting data that records file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data.

====Required field====

* _time

* Filesystem.user

* Filesystem.dest

* Filesystem.file_path

* Filesystem.file_name




====Kill Chain Phase====

* Installation


====Known False Positives====
Because these extensions are not typically used in normal operations, you should investigate all results.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1036.003/samsam_extension/windows-sysmon.log


''version'': 1
</div>
</div>

----

===First time seen child process of zoom===
This search looks for child processes spawned by zoom.exe or zoom.us that has not previously been seen.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1068/ T1068]
* '''Last Updated''': 2020-05-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` min(_time) as firstTime values(Processes.parent_process_name) as parent_process_name values(Processes.parent_process_id) as parent_process_id values(Processes.process_name) as process_name values(Processes.process) as process from datamodel=Endpoint.Processes where (Processes.parent_process_name=zoom.exe OR Processes.parent_process_name=zoom.us) by Processes.process_id Processes.dest 
| `drop_dm_object_name(Processes)` 
| lookup zoom_first_time_child_process dest as dest process_name as process_name OUTPUT firstTimeSeen 
| where isnull(firstTimeSeen) OR firstTimeSeen &gt; relative_time(now(), &#34;`previously_seen_zoom_child_processes_window`&#34;) 
| `security_content_ctime(firstTime)` 
| table firstTime dest, process_id, process_name, parent_process_id, parent_process_name 
|`first_time_seen_child_process_of_zoom_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Zoom_Child_Processes|Suspicious Zoom Child Processes]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You should run the baseline search `Previously Seen Zoom Child Processes - Initial` to build the initial table of child processes and hostnames for this search to work. You should also schedule at the same interval as this search the second baseline search `Previously Seen Zoom Child Processes - Update` to keep this table up to date and to age out old child processes. Please update the `previously_seen_zoom_child_processes_window` macro to adjust the time window.

====Required field====

* _time

* Processes.parent_process_name

* Processes.parent_process_id

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.process_id

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
A new child process of zoom isn&#39;t malicious by that fact alone. Further investigation of the actions of the child process is needed to verify any malicious behavior is taken.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1068/zoom_child_process/windows-sysmon.log


''version'': 1
</div>
</div>

----

===First time seen running windows service===
This search looks for the first and last time a Windows service is seen running in your environment. This table is then cached.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1569/ T1569], [https://attack.mitre.org/techniques/T1569/002/ T1569.002]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_system` EventCode=7036 
| rex field=Message &#34;The (?&lt;service&gt;[-\(\)\s\w]+) service entered the (?&lt;state&gt;\w+) state&#34; 
| where state=&#34;running&#34; 
| lookup previously_seen_running_windows_services service as service OUTPUT firstTimeSeen 
| where isnull(firstTimeSeen) OR firstTimeSeen &gt; relative_time(now(), `previously_seen_windows_services_window`) 
| table _time dest service 
| `first_time_seen_running_windows_service_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Service_Abuse|Windows Service Abuse]]

* [[Documentation:ESSOC:stories:UseCase#Orangeworm_Attack_Group|Orangeworm Attack Group]]

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
While this search does not require you to adhere to Splunk CIM, you must be ingesting your Windows system event logs in order for this search to execute successfully. You should run the baseline search `Previously Seen Running Windows Services - Initial` to build the initial table of child processes and hostnames for this search to work. You should also schedule at the same interval as this search the second baseline search `Previously Seen Running Windows Services - Update` to keep this table up to date and to age out old Windows Services. Please update the `previously_seen_windows_services_window` macro to adjust the time window. Please ensure that the Splunk Add-on for Microsoft Windows is version 8.0.0 or above.

====Required field====

* _time

* EventCode

* Message

* dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1569
| System Services
| Execution
|-
| T1569.002
| Service Execution
| Execution
|}


====Kill Chain Phase====

* Installation

* Actions on Objectives


====Known False Positives====
A previously unseen service is not necessarily malicious. Verify that the service is legitimate and that was installed by a legitimate process.

====Reference====


====Test Dataset====


''version'': 4
</div>
</div>

----

===First time seen command line argument===
This search looks for command-line arguments that use a `/c` parameter to execute a command that has not previously been seen. This is an implementation on SPL2 of the rule `First time seen command line argument` by @bpatel.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1117/ T1117], [https://attack.mitre.org/techniques/T1202/ T1202]
* '''Last Updated''': 2021-2-1

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)) 
| eval dest_user_id=ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), dest_device_id=ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), cmd_line_norm=lower(cmd_line), cmd_line_norm=replace(cmd_line_norm, /[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/, &#34;GUID&#34;), cmd_line_norm=replace(cmd_line_norm, /(?&lt;=\s)+\\[^:]*(?=\\.*\.\w{3}(\s
|$)+)/, &#34;\\PATH&#34;), /* replaces &#34; \\Something\\Something\\command.ext&#34; =&gt; &#34;PATH\\command.ext&#34; */ cmd_line_norm=replace(cmd_line_norm, /\w:\\[^:]*(?=\\.*\.\w{3}(\s
|$)+)/, &#34;\\PATH&#34;), /* replaces &#34;C:\\Something\\Something\\command.ext&#34; =&gt; &#34;PATH\\command.ext&#34; */ cmd_line_norm=replace(cmd_line_norm, /\d+/, &#34;N&#34;), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where process_name=&#34;cmd.exe&#34; AND match_regex(ucast(cmd_line, &#34;string&#34;, &#34;&#34;), /.* \/[cC] .*/)=true 
| select process_name, cmd_line, cmd_line_norm, timestamp, dest_device_id, dest_user_id 
| first_time_event input_columns=[&#34;cmd_line_norm&#34;] 
| where first_time_cmd_line_norm 
| eval start_time = timestamp, end_time = timestamp, entities = mvappend(dest_device_id, dest_user_id), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
You must be populating the endpoint data model for SSA and specifically the process_name and the process fields

====Required field====

* process_name

* _time

* dest_device_id

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1117
| Regsvr32
| 
|-
| T1202
| Indirect Command Execution
| Defense Evasion
|}


====Kill Chain Phase====

* Command and Control

* Actions on Objectives


====Known False Positives====
Legitimate programs can also use command-line arguments to execute. Please verify the command-line arguments to check what command/program is being executed. We recommend customizing the `first_time_seen_cmd_line_filter` macro to exclude legitimate parent_process_name

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Fodhelper uac bypass===
Fodhelper.exe has a known UAC bypass as it attempts to look for specific registry keys upon execution, that do not exist. Therefore, an attacker can write its malicious commands in these registry keys to be executed by fodhelper.exe with the highest privilege. \
1. `HKCU:\Software\Classes\ms-settings\shell\open\command`\
1. `HKCU:\Software\Classes\ms-settings\shell\open\command\DelegateExecute`\
1. `HKCU:\Software\Classes\ms-settings\shell\open\command\(default)`\
Upon triage, fodhelper.exe will have a child process and read access will occur on the registry keys. Isolate the endpoint and review parallel processes for additional behavior.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1112/ T1112], [https://attack.mitre.org/techniques/T1548/002/ T1548.002], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-03-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=fodhelper.exe by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `fodhelper_uac_bypass_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.parent_process_name

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1112
| Modify Registry
| Defense Evasion
|-
| T1548.002
| Bypass User Account Control
| Privilege Escalation, Defense Evasion
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation

* Privilege Escalation


====Known False Positives====
Limited to no false positives are expected.

====Reference====


* https://blog.malwarebytes.com/malwarebytes-news/2021/02/lazyscripter-from-empire-to-double-rat/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1548.002/T1548.002.md

* https://github.com/gushmazuko/WinBypass/blob/master/FodhelperBypass.ps1

* https://attack.mitre.org/techniques/T1548/002



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548.002/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Fsutil zeroing file===
This search is to detect a suspicious fsutil process to zeroing a target file. This technique was seen in lockbit ransomware where it tries to zero out its malware path as part of its defense evasion after encrypting the compromised host.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/ T1070]
* '''Last Updated''': 2021-08-11

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=fsutil.exe Processes.process=&#34;*setzerodata*&#34; by Processes.user Processes.process_name Processes.parent_process_name Processes.dest  Processes.process Processes.parent_process 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `fsutil_zeroing_file_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.user

* Processes.process_name

* Processes.parent_process_name

* Processes.dest

* Processes.process

* Processes.parent_process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://app.any.run/tasks/e0ac072d-58c9-4f53-8a3b-3e491c7ac5db/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1070/fsutil_file_zero/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Gpupdate with no command line arguments with network===
The following analytic identifies gpupdate.exe with no command line arguments and with a network connection. It is unusual for gpupdate.exe to execute with no command line arguments present. This particular behavior is common with malicious software, including Cobalt Strike. During investigation, triage any network connections and parallel processes. Identify any suspicious module loads related to credential dumping or file writes. gpupdate.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-04-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name=gpupdate.exe by _time span=1h  Processes.process_guid Processes.process_name Processes.dest Processes.process_path Processes.process Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| regex process=&#34;(gpupdate\.exe.{0,4}$)&#34; 
| join  process_guid [
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Ports where Ports.dest_port !=&#34;0&#34; by Ports.process_guid Ports.dest Ports.dest_port
| `drop_dm_object_name(Ports)` 
| rename  dest as connection_to_CNC] 
| table _time dest parent_process_name process_name process_path process process_guid connection_to_CNC dest_port 
| `gpupdate_with_no_command_line_arguments_with_network_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* EventID

* process_name

* process_id

* parent_process_name

* dest_port

* process_path



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives may be present in small environments. Tuning may be required based on parent process.

====Reference====


* https://raw.githubusercontent.com/xx0hcd/Malleable-C2-Profiles/0ef8cf4556e26f6d4190c56ba697c2159faa5822/crimeware/trick_ryuk.profile

* https://blog.cobaltstrike.com/2021/02/09/learn-pipe-fitting-for-all-of-your-offense-projects/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Get addefaultdomainpasswordpolicy with powershell===
This analytic looks for the execution of `powershell.exe` executing the Get-ADDefaultDomainPasswordPolicy commandlet used to obtain the password policy in a Windows domain. Red Teams and adversaries alike may use PowerShell to enumerate domain policies for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1201/ T1201]
* '''Last Updated''': 2021-08-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;cmd.exe&#34; OR Processes.process_name=&#34;powershell*&#34;) AND Processes.process = &#34;*Get-ADDefaultDomainPasswordPolicy*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_addefaultdomainpasswordpolicy_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id

* Processes.parent_process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1201
| Password Policy Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet

* https://attack.mitre.org/techniques/T1201/

* https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-addefaultdomainpasswordpolicy?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1201/pwd_policy_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Get addefaultdomainpasswordpolicy with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-ADDefaultDomainPasswordPolicy` commandlet used to obtain the password policy in a Windows domain. Red Teams and adversaries alike may use PowerShell to enumerate domain policies for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1201/ T1201]
* '''Last Updated''': 2021-08-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message =&#34;*Get-ADDefaultDomainPasswordPolicy*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_addefaultdomainpasswordpolicy_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
The following Hunting analytic requires PowerShell operational logs to be imported. Modify the powershell macro as needed to match the sourcetype or add index. This analytic is specific to 4104, or PowerShell Script Block Logging.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1201
| Password Policy Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet

* https://attack.mitre.org/techniques/T1201/

* https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-addefaultdomainpasswordpolicy?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1201/pwd_policy_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Get aduser with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to enumerate domain users. The `Get-AdUser&#39; commandlet returns a list of all domain users. Red Teams and adversaries alike may use this commandlet to identify remote systems for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;cmd.exe&#34; OR Processes.process_name=&#34;powershell*&#34;) AND Processes.process = &#34;*Get-ADUser*&#34; AND Processes.process = &#34;*-filter*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_aduser_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id

* Processes.parent_process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://www.blackhillsinfosec.com/red-blue-purple/

* https://attack.mitre.org/techniques/T1087/002/

* https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-aduser?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Get aduser with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-AdGUser` commandlet. The `Get-AdUser` commandlet is used to return a list of all domain users. Red Teams and adversaries may leverage this commandlet to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*get-aduser*&#34; Message = &#34;*-filter*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_aduser_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
The following Hunting analytic requires PowerShell operational logs to be imported. Modify the powershell macro as needed to match the sourcetype or add index. This analytic is specific to 4104, or PowerShell Script Block Logging.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://www.blackhillsinfosec.com/red-blue-purple/

* https://attack.mitre.org/techniques/T1087/002/

* https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-aduser?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Get aduserresultantpasswordpolicy with powershell===
This analytic looks for the execution of `powershell.exe` executing the Get ADUserResultantPasswordPolicy commandlet used to obtain the password policy in a Windows domain. Red Teams and adversaries alike may use PowerShell to enumerate domain policies for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1201/ T1201]
* '''Last Updated''': 2021-08-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;cmd.exe&#34; OR Processes.process_name=&#34;powershell*&#34;) AND Processes.process = &#34;*Get-ADUserResultantPasswordPolicy*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_aduserresultantpasswordpolicy_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id

* Processes.parent_process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1201
| Password Policy Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet

* https://attack.mitre.org/techniques/T1201/

* https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-aduserresultantpasswordpolicy?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1201/pwd_policy_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Get aduserresultantpasswordpolicy with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-ADUserResultantPasswordPolicy` commandlet used to obtain the password policy in a Windows domain. Red Teams and adversaries alike may use PowerShell to enumerate domain policies for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1201/ T1201]
* '''Last Updated''': 2021-08-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message =&#34;*Get-ADUserResultantPasswordPolicy*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_aduserresultantpasswordpolicy_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
The following Hunting analytic requires PowerShell operational logs to be imported. Modify the powershell macro as needed to match the sourcetype or add index. This analytic is specific to 4104, or PowerShell Script Block Logging.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1201
| Password Policy Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet

* https://attack.mitre.org/techniques/T1201/

* https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-aduserresultantpasswordpolicy?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1201/pwd_policy_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Get domainpolicy with powershell===
This analytic looks for the execution of `powershell.exe` executing the `Get-DomainPolicy` commandlet used to obtain the password policy in a Windows domain. Red Teams and adversaries alike may use PowerShell to enumerate domain policies for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1201/ T1201]
* '''Last Updated''': 2021-08-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;cmd.exe&#34; OR Processes.process_name=&#34;powershell*&#34;) AND Processes.process = &#34;*Get-DomainPolicy*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_domainpolicy_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id

* Processes.parent_process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1201
| Password Policy Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet

* https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainPolicy/

* https://attack.mitre.org/techniques/T1201/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1201/pwd_policy_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Get domainpolicy with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get DomainPolicy` commandlet used to obtain the password policy in a Windows domain. Red Teams and adversaries alike may use PowerShell to enumerate domain policies for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1201/ T1201]
* '''Last Updated''': 2021-08-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message =&#34;*Get-DomainPolicy*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_domainpolicy_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
The following Hunting analytic requires PowerShell operational logs to be imported. Modify the powershell macro as needed to match the sourcetype or add index. This analytic is specific to 4104, or PowerShell Script Block Logging.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1201
| Password Policy Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet

* https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainPolicy/

* https://attack.mitre.org/techniques/T1201/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1201/pwd_policy_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Get domainuser with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to enumerate domain users. `Get-DomainUser` is part of PowerView, a PowerShell tool used to perform enumeration on Windows domains. Red Teams and adversaries alike may leverage PowerView to enumerate domain users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;cmd.exe&#34; OR Processes.process_name=&#34;powershell*&#34;) AND Processes.process = &#34;*Get-DomainUser*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_domainuser_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id

* Processes.parent_process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainUser/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Get domainuser with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-DomainUser` commandlet. `GetDomainUser` is part of PowerView, a PowerShell tool used to perform enumeration on Windows domains. Red Teams and adversaries alike may use PowerView to enumerate domain users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*Get-DomainUser*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_domainuser_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
The following Hunting analytic requires PowerShell operational logs to be imported. Modify the powershell macro as needed to match the sourcetype or add index. This analytic is specific to 4104, or PowerShell Script Block Logging.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainUser/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Get wmiobject group discovery===
The following hunting analytic identifies the use of `Get-WMIObject Win32_Group` being used with PowerShell to identify local groups on the endpoint. \ Typically, by itself, is not malicious but may raise suspicion based on time of day, endpoint and username. \ During triage, review parallel processes and identify any further suspicious behavior.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/001/ T1069.001]
* '''Last Updated''': 2021-09-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=powershell.exe OR processes.process_name=cmd.exe) (Processes.process=&#34;*Get-WMIObject*&#34; AND Processes.process=&#34;*Win32_Group*&#34;) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.original_file_name Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`  
| `get_wmiobject_group_discovery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.001
| Local Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
False positives may be present. Tune as needed.

====Reference====


* https://attack.mitre.org/techniques/T1069/001/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.001/T1069.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.001/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Get wmiobject group discovery with script block logging===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable on critical endpoints or all. \
This analytic identifies the usage of `Get-WMIObject Win32_Group`, which is typically used as a way to identify groups on the endpoint.  Typically, by itself, is not malicious but may raise suspicion based on time of day, endpoint and username. \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/001/ T1069.001]
* '''Last Updated''': 2021-09-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*Get-WMIObject*&#34; AND Message = &#34;*Win32_Group*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by  Message OpCode ComputerName User EventCode
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_wmiobject_group_discovery_with_script_block_logging_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.001
| Local Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
False positives may be present. Tune as needed.

====Reference====


* https://www.splunk.com/en_us/blog/security/powershell-detections-threat-research-release-august-2021.html

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.001/T1069.001.md

* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.001/atomic_red_team/windows-powershell.log


''version'': 1
</div>
</div>

----

===Get-domaintrust with powershell===
This analytic identifies Get-DomainTrust from PowerView in order to gather domain trust information. Typically, this is utilized within a script being executed and used to enumerate the domain trust information. This grants the adversary an understanding of how large or small the domain is. During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1482/ T1482]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process=*get-domaintrust* by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_domaintrust_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1482
| Domain Trust Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Limited false positives as this requires an active Administrator or adversary to bring in, import, and execute.

====Reference====


* http://www.harmj0y.net/blog/redteaming/a-guide-to-attacking-domain-trusts/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1482/discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Get-domaintrust with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable on critical endpoints or all. \
This analytic identifies Get-DomainTrust from PowerView in order to gather domain trust information. \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1482/ T1482]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*get-foresttrust*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by Message ComputerName User EventCode 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_domaintrust_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* Path

* OpCode

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1482
| Domain Trust Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
It is possible certain system management frameworks utilize this command to gather trust information.

====Reference====


* http://www.harmj0y.net/blog/redteaming/a-guide-to-attacking-domain-trusts/

* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1482/discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Get-foresttrust with powershell===
This analytic identifies Get-ForestTrust from PowerSploit in order to gather domain trust information. Typically, this is utilized within a script being executed and used to enumerate the domain trust information. This grants the adversary an understanding of how large or small the domain is. During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1482/ T1482]
* '''Last Updated''': 2021-09-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=powershell.exe OR Processes.process_name=cmd.exe Processes.process=*get-foresttrust* by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_foresttrust_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1482
| Domain Trust Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Limited false positives as this requires an active Administrator or adversary to bring in, import, and execute.

====Reference====


* https://powersploit.readthedocs.io/en/latest/Recon/Get-ForestTrust/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1482/discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Get-foresttrust with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable on critical endpoints or all. \
This analytic identifies Get-ForestTrust from PowerSploit in order to gather domain trust information. \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1482/ T1482]
* '''Last Updated''': 2021-09-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*get-foresttrust*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by  Message OpCode ComputerName User EventCode 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `get_foresttrust_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* Path

* OpCode

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1482
| Domain Trust Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
UPDATE_KNOWN_FALSE_POSITIVES

====Reference====


* https://powersploit.readthedocs.io/en/latest/Recon/Get-ForestTrust/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1482/discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getadcomputer with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to discover remote systems. The `Get-AdComputer&#39; commandlet returns a list of all domain computers. Red Teams and adversaries alike may use this commandlet to identify remote systems for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-09-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=*Get-AdComputer*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getadcomputer_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getadcomputer with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-AdGroup` commandlet. The `Get-AdGroup` commandlet is used to return a list of all domain computers. Red Teams and adversaries may leverage this commandlet to enumerate domain computers for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*Get-AdComputer*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `getadcomputer_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/

* https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-adgroup?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getadgroup with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to query for domain groups. The `Get-AdGroup` commandlnet is used to return a list of all groups available in a Windows Domain. Red Teams and adversaries alike may leverage this commandlet to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=*Get-AdGroup*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getadgroup_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/

* https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-adgroup?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getadgroup with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-AdGroup` commandlet. The `Get-AdGroup` commandlet is used to return a list of all domain groups. Red Teams and adversaries may leverage this commandlet to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*Get-ADGroup*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `getadgroup_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/

* https://docs.microsoft.com/en-us/powershell/module/activedirectory/get-adgroup?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getcurrent user with powershell===
This analytic looks for the execution of `powerhsell.exe` with command-line arguments that execute the `GetCurrent` method of the WindowsIdentity .NET class. This method returns an object that represents the current Windows user. Red Teams and adversaries may leverage this method to identify the logged user on a compromised endpoint for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1033/ T1033]
* '''Last Updated''': 2021-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=*System.Security.Principal.WindowsIdentity* OR Processes.process=*GetCurrent()*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getcurrent_user_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1033
| System Owner/User Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1033/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1033/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getcurrent user with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `GetCurrent` method of the WindowsIdentity .NET class. This method returns an object that represents the current Windows user. Red Teams and adversaries may leverage this method to identify the logged user on a compromised endpoint for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1033/ T1033]
* '''Last Updated''': 2021-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*[System.Security.Principal.WindowsIdentity]*&#34; AND Message = &#34;*GetCurrent()*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `getcurrent_user_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Path

* Message

* OpCode

* ComputerName

* User

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1033
| System Owner/User Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1033/

* https://docs.microsoft.com/en-us/dotnet/api/system.security.principal.windowsidentity.getcurrent?view=net-5.0



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1033/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getdomaincomputer with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to discover remote systems. `Get-DomainComputer` is part of PowerView, a PowerShell tool used to perform enumeration on Windows domains. Red Teams and adversaries alike may leverage PowerView to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-09-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=*Get-DomainComputer*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getdomaincomputer_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use PowerView for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getdomaincomputer with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-DomainComputer` commandlet. `GetDomainComputer` is part of PowerView, a PowerShell tool used to perform enumeration on Windows domains. Red Teams and adversaries alike may use PowerView to enumerate domain computers for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-09-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*Get-DomainComputer*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `getdomaincomputer_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use PowerView for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/

* https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainComputer/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getdomaincontroller with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to discover remote systems. `Get-DomainController` is part of PowerView, a PowerShell tool used to perform enumeration on Windows domains. Red Teams and adversaries alike may leverage PowerView to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-09-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=*Get-DomainController*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getdomaincontroller_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use PowerView for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/

* https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainController/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getdomaincontroller with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-DomainController` commandlet. `Get-DomainController` is part of PowerView, a PowerShell tool used to perform enumeration on Windows domains. Red Teams and adversaries alike may use PowerView to enumerate domain computers for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-09-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*Get-DomainController*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `getdomaincontroller_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/

* https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainController/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getdomaingroup with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to query for domain groups. `Get-DomainGroup` is part of PowerView, a PowerShell tool used to perform enumeration on Windows domains. Red Teams and adversaries alike may leverage PowerView to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=*Get-DomainGroup*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getdomaingroup_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/

* https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainGroup/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getdomaingroup with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-DomainGroup` commandlet. `Get-DomainGroup` is part of PowerView, a PowerShell tool used to perform enumeration on Windows domains. As the name suggests, `Get-DomainGroup` is used to query domain groups. Red Teams and adversaries may leverage this function to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*Get-DomainGroup*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `getdomaingroup_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerView functions for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/

* https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainGroup/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getlocaluser with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to query for local users. The `Get-LocalUser` commandlet is used to return a list of all local users. Red Teams and adversaries may leverage this commandlet to enumerate users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1087/001/ T1087.001]
* '''Last Updated''': 2021-08-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=*Get-LocalUser*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getlocaluser_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087
| Account Discovery
| Discovery
|-
| T1087.001
| Local Account
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1087/001/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.001/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getlocaluser with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-LocalUser` commandlet. The `Get-LocalUser` commandlet is used to return a list of all local users. Red Teams and adversaries may leverage this commandlet to enumerate users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1087/001/ T1087.001]
* '''Last Updated''': 2021-08-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*Get-LocalUser*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `getlocaluser_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087
| Account Discovery
| Discovery
|-
| T1087.001
| Local Account
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1087/001/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.001/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getnettcpconnection with powershell===
This analytic looks for the execution of `powershell.exe` with command-line utilized to get a listing of network connections on a compromised system. The `Get-NetTcpConnection` commandlet lists the current TCP connections. Red Teams and adversaries alike may use this commandlet for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1049/ T1049]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=*Get-NetTcpConnection*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getnettcpconnection_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1049
| System Network Connections Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1049/

* https://docs.microsoft.com/en-us/powershell/module/nettcpip/get-nettcpconnection?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1049/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getnettcpconnection with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-NetTcpconnection ` commandlet. This commandlet is used to return a listing of network connections on a compromised system. Red Teams and adversaries alike may use this commandlet for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1049/ T1049]
* '''Last Updated''': 2021-09-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*Get-NetTcpconnection*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `getnettcpconnection_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1049
| System Network Connections Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1049/

* https://docs.microsoft.com/en-us/powershell/module/nettcpip/get-nettcpconnection?view=windowsserver2019-ps



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1049/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getwmiobject ds user with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to query for domain users. The `Get-WmiObject` commandlet combined with the `-class ds_user` parameter can be used to return the full list of users in a Windows domain. Red Teams and adversaries alike may leverage WMI in this case, using PowerShell, to enumerate domain users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;cmd.exe&#34; OR Processes.process_name=&#34;powershell*&#34;) AND Processes.process = &#34;*get-wmiobject*&#34; AND Processes.process = &#34;*ds_user*&#34; AND Processes.process = &#34;*root\\directory\\ldap*&#34; AND Processes.process = &#34;*-namespace*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getwmiobject_ds_user_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id

* Processes.parent_process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://jpcertcc.github.io/ToolAnalysisResultSheet/details/dsquery.htm



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getwmiobject ds user with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-WmiObject` commandlet. The `DS_User` class parameter leverages WMI to query for all domain users. Red Teams and adversaries may leverage this commandlet to enumerate domain users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-08-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*get-wmiobject*&#34; Message = &#34;*ds_user*&#34; Message = &#34;*-namespace*&#34; Message = &#34;*root\\directory\\ldap*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getwmiobject_ds_user_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
he following Hunting analytic requires PowerShell operational logs to be imported. Modify the powershell macro as needed to match the sourcetype or add index. This analytic is specific to 4104, or PowerShell Script Block Logging.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://www.blackhillsinfosec.com/red-blue-purple/

* https://docs.microsoft.com/en-us/windows/win32/wmisdk/describing-the-ldap-namespace



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getwmiobject ds computer with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to discover remote systems. The `Get-WmiObject` commandlet combined with the `DS_Computer` parameter can be used to return a list of all domain computers. Red Teams and adversaries alike may leverage WMI in this case, using PowerShell, to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-09-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=*Get-WmiObject* AND Processes.process=&#34;*namespace root\\directory\\ldap*&#34; AND Processes.process=&#34;*class ds_computer*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getwmiobject_ds_computer_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getwmiobject ds computer with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-WmiObject` commandlet. The `DS_Computer` class parameter leverages WMI to query for all domain computers. Red Teams and adversaries may leverage this commandlet to enumerate domain computers for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message=*Get-WmiObject* AND Message=*&#34;namespace root\\directory\\ldap&#34;* AND Message=*&#34;class ds_computer&#34;*) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `getwmiobject_ds_computer_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/

* https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getwmiobject ds group with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to query for domain groups. The `Get-WmiObject` commandlet combined with the `-class ds_group` parameter can be used to return the full list of groups in a Windows domain. Red Teams and adversaries alike may leverage WMI in this case, using PowerShell, to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=*Get-WmiObject* AND Processes.process=&#34;*namespace root\\directory\\ldap*&#34; AND Processes.process=&#34;*class ds_group*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getwmiobject_ds_group_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/

* https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getwmiobject ds group with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-WmiObject` commandlet used with specific parameters . The `DS_Group` parameter leverages WMI to query for all domain groups. Red Teams and adversaries may leverage this commandlet to enumerate domain groups for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/002/ T1069.002]
* '''Last Updated''': 2021-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message=*Get-WmiObject* AND Message=*&#34;namespace root\\directory\\ldap&#34;* AND Message=*&#34;class ds_group&#34;*) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `getwmiobject_ds_group_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.002
| Domain Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/002/

* https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Getwmiobject user account with powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments utilized to query local users. The `Get-WmiObject` commandlet combined with the `Win32_UserAccount` parameter is used to return a list of all local users. Red Teams and adversaries may leverage this commandlet to enumerate users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1087/001/ T1087.001]
* '''Last Updated''': 2021-08-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=*Get-WmiObject* AND Processes.process=*Win32_UserAccount*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `getwmiobject_user_account_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087
| Account Discovery
| Discovery
|-
| T1087.001
| Local Account
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1087/001/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.001/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Getwmiobject user account with powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the execution of the `Get-WmiObject` commandlet used with specific parameters. The `Win32_UserAccount` parameter is used to return a list of all local users. Red Teams and adversaries may leverage this commandlet to enumerate users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1087/001/ T1087.001]
* '''Last Updated''': 2021-08-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message=&#34;*Get-WmiObject*&#34; AND Message=&#34;*Win32_UserAccount*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `getwmiobject_user_account_with_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087
| Account Discovery
| Discovery
|-
| T1087.001
| Local Account
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1087/001/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.001/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Grant permission using cacls utility===
This analytic identifies potential adversaries that modify the security permission of a specific file or directory. This technique is commonly seen in APT tradecraft, ransomware and coinminer scripts to evade detections and restrict access to their component files.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1222/ T1222]
* '''Last Updated''': 2021-06-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line IS NOT NULL AND match_regex(cmd_line, /(?i)grant/)=true AND (process_name=&#34;cacls.exe&#34; OR process_name=&#34;xcacls.exe&#34; OR process_name=&#34;icacls.exe&#34;) 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name, &#34;process_path&#34;, process_path]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed icacls.exe may be used.

====Required field====

* _time

* dest_device_id

* process_name

* parent_process_name

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1222
| File and Directory Permissions Modification
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network administrator may use this windows utility but this is not a common practice.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1222.001/ssa_cacls/all_icalc.log


''version'': 2
</div>
</div>

----

===Hide user account from sign-in screen===
This analytic identifies a suspicious registry modification to hide a user account on the Windows Login screen. This technique was seen in some tradecraft where the adversary will create a hidden user account with Admin privileges in login screen to avoid noticing by the user that they already compromise and to persist on that said machine.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-05-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Registry.registry_key_name) as registry_key_name values(Registry.registry_path) as registry_path min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path=&#34;*\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\Userlist*&#34; AND Registry.registry_value_name = &#34;DWORD (0x00000000)&#34; by Registry.dest Registry.user Registry.registry_value_name 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `hide_user_account_from_sign_in_screen_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as CarbonBlack or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.registry_value_name

* Registry.dest Registry.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Unknown. Filter as needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/hotkey_disabled_hidden_user/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Hiding files and directories with attrib exe===
Attackers leverage an existing Windows binary, attrib.exe, to mark specific as hidden by using specific flags so that the victim does not see the file.  The search looks for specific command-line arguments to detect the use of attrib.exe to hide files.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1222/ T1222], [https://attack.mitre.org/techniques/T1222/001/ T1222.001]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) values(Processes.process) as process max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=attrib.exe (Processes.process=*+h*) by Processes.parent_process Processes.process_name Processes.user Processes.dest 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)`
| `hiding_files_and_directories_with_attrib_exe_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.process

* Processes.process_name

* Processes.parent_process

* Processes.user

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1222
| File and Directory Permissions Modification
| Defense Evasion
|-
| T1222.001
| Windows File and Directory Permissions Modification
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Some applications and users may legitimately use attrib.exe to interact with the files. 

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1222.001/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===High file deletion frequency===
This search looks for high frequency of file deletion relative to process name and process id. These events usually happen when the ransomware tries to encrypt the files with the ransomware file extensions and sysmon treat the original files to be deleted as soon it was replace as encrypted data.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1485/ T1485]
* '''Last Updated''': 2021-03-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=23 TargetFilename IN (&#34;*\.cmd&#34;, &#34;*\.ini&#34;,&#34;*\.gif&#34;, &#34;*\.jpg&#34;, &#34;*\.jpeg&#34;, &#34;*\.db&#34;, &#34;*\.ps1&#34;, &#34;*\.doc*&#34;, &#34;*\.xls*&#34;, &#34;*\.ppt*&#34;, &#34;*\.bmp&#34;,&#34;*\.zip&#34;, &#34;*\.rar&#34;, &#34;*\.7z&#34;, &#34;*\.chm&#34;, &#34;*\.png&#34;, &#34;*\.log&#34;, &#34;*\.vbs&#34;, &#34;*\.js&#34;) 
| stats values(TargetFilename) as deleted_files min(_time) as firstTime max(_time) as lastTime count by Computer user EventCode Image ProcessID 
|where count &gt;=100 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `high_file_deletion_frequency_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the deleted target file name, process name and process id  from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* EventCode

* TargetFilename

* Computer

* user

* Image

* ProcessID

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1485
| Data Destruction
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
user may delete bunch of pictures or files in a folder.

====Reference====


* https://www.fireeye.com/blog/threat-research/2020/10/fin11-email-campaigns-precursor-for-ransomware-data-theft.html

* https://blog.virustotal.com/2020/11/keep-your-friends-close-keep-ransomware.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/clop/clop_a/windows-sysmon.log


''version'': 1
</div>
</div>

----

===High process termination frequency===
This analytics are designed to indentify a high frequency of process termination on a machine which is a common behavior of ransomware malware before encrypting files. This technique is designed to avoid an exception error while accessing (docs, images, database and etc..) in the infected machine for encryption.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1486/ T1486]
* '''Last Updated''': 2021-03-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=5 
|bin _time span=3s 
|stats values(Image) as proc_terminated min(_time) as firstTime max(_time) as lastTime  count by Computer EventCode ProcessID 
| where count &gt;= 15 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `high_process_termination_frequency_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the Image (process full path of terminated process) from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* EventCode

* Image

* Computer

* _time

* ProcessID



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1486
| Data Encrypted for Impact
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
admin or user tool that can terminate multiple process.

====Reference====


* https://www.fireeye.com/blog/threat-research/2020/10/fin11-email-campaigns-precursor-for-ransomware-data-theft.html

* https://blog.virustotal.com/2020/11/keep-your-friends-close-keep-ransomware.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/clop/clop_a/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Icacls grant command===
This analytic identifies potential adversaries that modify the security permission of a specific file or directory. This technique is commonly seen in APT tradecraft and coinminer scripts to evade detections and restrict access to their component files.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1222/ T1222]
* '''Last Updated''': 2021-05-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = &#34;icacls.exe&#34; OR Processes.process_name = &#34;cacls.exe&#34; OR Processes.process_name = &#34;xcacls.exe&#34; AND Processes.process = &#34;*/grant*&#34; by Processes.parent_process_name Processes.process_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `icacls_grant_command_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed icacls.exe may be used.

====Required field====

* _time

* Processes.parent_process_name

* Processes.process_name

* Processes.dest

* Processes.user

* Processes.process_id

* Processes.process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1222
| File and Directory Permissions Modification
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Unknown. Filter as needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Icacls deny command===
This analytic identifies a potential adversary that changes the security permission of a specific file or directory. This technique is commonly seen in APT tradecraft or coinminer scripts. This behavior is meant to evade detection and prevent access to their component files.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1222/ T1222]
* '''Last Updated''': 2021-04-29

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = &#34;icacls.exe&#34; OR Processes.process_name = &#34;cacls.exe&#34; OR Processes.process_name = &#34;xcacls.exe&#34; AND Processes.process = &#34;*/deny*&#34; by Processes.parent_process_name Processes.process_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `icacls_deny_command_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed icacls.exe may be used.

====Required field====

* _time

* Processes.parent_process_name

* Processes.process_name

* Processes.dest

* Processes.user

* Processes.process_id

* Processes.process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1222
| File and Directory Permissions Modification
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Unknown. It is possible some administrative scripts use ICacls. Filter as needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Icedid exfiltrated archived file creation===
This search is to detect a suspicious file creation namely passff.tar and cookie.tar. This files are possible archived of stolen browser information like history and cookies in a compromised machine with IcedID.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1560/001/ T1560.001], [https://attack.mitre.org/techniques/T1560/ T1560]
* '''Last Updated''': 2021-07-30

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode= 11  (TargetFilename = &#34;*\\passff.tar&#34; OR TargetFilename = &#34;*\\cookie.tar&#34;) 
|stats count min(_time) as firstTime max(_time) as lastTime by TargetFilename EventCode process_id  process_name Computer 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `icedid_exfiltrated_archived_file_creation_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* TargetFilename

* EventCode

* process_id

* process_name

* Computer



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1560.001
| Archive via Utility
| Collection
|-
| T1560
| Archive Collected Data
| Collection
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.cisecurity.org/white-papers/security-primer-icedid/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/simulated_icedid/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Illegal access to user content via powersploit modules===
This detection identifies access to PowerSploit modules that enable illegaly access user content, such as key logging, audio recording, screenshots, tapping into http and RDP sessions, etc.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/ T1021], [https://attack.mitre.org/techniques/T1113/ T1113], [https://attack.mitre.org/techniques/T1123/ T1123], [https://attack.mitre.org/techniques/T1563/ T1563]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Get-HttpStatus/)=true OR match_regex(cmd_line, /(?i)Get-Keystrokes/)=true OR match_regex(cmd_line, /(?i)Get-MicrophoneAudio/)=true OR match_regex(cmd_line, /(?i)Get-NetRDPSession/)=true OR match_regex(cmd_line, /(?i)Get-TimedScreenshot/)=true OR match_regex(cmd_line, /(?i)Get-WebConfig/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021
| Remote Services
| Lateral Movement
|-
| T1113
| Screen Capture
| Collection
|-
| T1123
| Audio Capture
| Collection
|-
| T1563
| Remote Service Session Hijacking
| Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1021/illegal_access_to_content/logAllPowerSploitModulesWithOldNames.log


''version'': 1
</div>
</div>

----

===Illegal account creation via powersploit modules===
This detection identifies access to PowerSploit modules that create accounts illegaly.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1585/ T1585]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)New-DomainUser/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1585
| Establish Accounts
| Resource Development
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1585/illegal_account_creation/logAllPowerSploitModulesWithOldNames.log


''version'': 1
</div>
</div>

----

===Illegal deletion of logs via mimikatz modules===
This detection identifies access to PowerSploit modules that delete event logs.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/ T1070]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)event::drop/)=true OR match_regex(cmd_line, /(?i)event::clear/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Log_Manipulation|Windows Log Manipulation]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1070/illegal_log_deletion/logAllMimikatzModules.log


''version'': 1
</div>
</div>

----

===Illegal enabling or disabling of accounts via dsinternals modules===
This detection identifies use of DSInternals modules that enable or disable accounts illegaly.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1098/ T1098]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Disable-ADDBAccount/)=true OR match_regex(cmd_line, /(?i)Enable-ADDBAccount/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1098
| Account Manipulation
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/MichaelGrafnetter/DSInternals



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1098/account_manipulation/logAllDSInternalsModules.log


''version'': 1
</div>
</div>

----

===Illegal management of active directory elements and policies via dsinternals modules===
This detection identifies use of DSInternals modules for illegal management of Active Directoty elements and policies.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1098/ T1098], [https://attack.mitre.org/techniques/T1207/ T1207], [https://attack.mitre.org/techniques/T1484/ T1484]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Remove-ADDBObject/)=true OR match_regex(cmd_line, /(?i)Set-ADDBDomainController/)=true OR match_regex(cmd_line, /(?i)Set-ADDBPrimaryGroup/)=true OR match_regex(cmd_line, /(?i)Set-LsaPolicyInformation/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1098
| Account Manipulation
| Persistence
|-
| T1207
| Rogue Domain Controller
| Defense Evasion
|-
| T1484
| Domain Policy Modification
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/MichaelGrafnetter/DSInternals



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1484/logAllDSInternalsModules.log


''version'': 1
</div>
</div>

----

===Illegal management of computers and active directory elements via powersploit modules===
This detection identifies access to PowerSploit modules that enable illegal management of computers and Active Directory elements.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1098/ T1098], [https://attack.mitre.org/techniques/T1207/ T1207], [https://attack.mitre.org/techniques/T1484/ T1484]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Set-DomainObject/)=true OR match_regex(cmd_line, /(?i)Set-ADObject/)=true OR match_regex(cmd_line, /(?i)Set-DomainObjectOwner/)=true OR match_regex(cmd_line, /(?i)Set-MasterBootRecord/)=true )


| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1098
| Account Manipulation
| Persistence
|-
| T1207
| Rogue Domain Controller
| Defense Evasion
|-
| T1484
| Domain Policy Modification
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1484/logAllPowerSploitModulesWithOldNames.log


''version'': 1
</div>
</div>

----

===Illegal privilege elevation and persistence via powersploit modules===
This detection identifies access to PowerSploit modules that illegaly elevate general privileges or ensure persistence, e.g., enable manipulation of registry, task scheduling, persistent WMI, access to OS objects under desired identities.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1053/ T1053], [https://attack.mitre.org/techniques/T1134/ T1134], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Add-DomainObjectAcl/)=true OR match_regex(cmd_line, /(?i)Add-ObjectAcl/)=true OR match_regex(cmd_line, /(?i)Enable-Privilege/)=true OR match_regex(cmd_line, /(?i)New-ElevatedPersistenceOption/)=true OR match_regex(cmd_line, /(?i)New-UserPersistenceOption/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|-
| T1134
| Access Token Manipulation
| Defense Evasion, Privilege Escalation
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548/logAllPowerSploitModulesWithOldNames.log


''version'': 1
</div>
</div>

----

===Illegal privilege elevation via mimikatz modules===
This detection identifies use of Mimikatz modules for illegal privilege elevation.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1134/ T1134], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)privilege::debug/)=true OR match_regex(cmd_line, /(?i)token::elevate/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1134
| Access Token Manipulation
| Defense Evasion, Privilege Escalation
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548/logAllMimikatzModules.log


''version'': 1
</div>
</div>

----

===Illegal service and process control via mimikatz modules===
This detection identifies use of Mimikatz modules for illegal control over services and processes, including the authentication service.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055], [https://attack.mitre.org/techniques/T1106/ T1106], [https://attack.mitre.org/techniques/T1569/ T1569]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)process::start/)=true OR match_regex(cmd_line, /(?i)service::\+/)=true OR match_regex(cmd_line, /(?i)service::\-/)=true OR match_regex(cmd_line, /(?i)service::start/)=true OR match_regex(cmd_line, /(?i)service::stop/)=true OR match_regex(cmd_line, /(?i)service::suspend/)=true OR match_regex(cmd_line, /(?i)misc::memssp/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Service_Abuse|Windows Service Abuse]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|-
| T1106
| Native API
| Execution
|-
| T1569
| System Services
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logAllMimikatzModules.log


''version'': 1
</div>
</div>

----

===Illegal service and process control via powersploit modules===
This detection identifies access to PowerSploit modules that enable illegal control of services and processes, such as installing or spoofing of malicious services, injecting malicious code in DLLs and EXEs, invoking shell code and WMI commands, modifying access to service objects, etc.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055], [https://attack.mitre.org/techniques/T1106/ T1106], [https://attack.mitre.org/techniques/T1569/ T1569]
* '''Last Updated''': 2020-11-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Install-SSP/)=true OR match_regex(cmd_line, /(?i)Set-CriticalProcess/)=true OR match_regex(cmd_line, /(?i)Install-ServiceBinary/)=true OR match_regex(cmd_line, /(?i)Restore-ServiceBinary/)=true OR match_regex(cmd_line, /(?i)Write-ServiceBinary/)=true OR match_regex(cmd_line, /(?i)Set-ServiceBinaryPath/)=true OR match_regex(cmd_line, /(?i)Invoke-ReflectivePEInjection/)=true OR match_regex(cmd_line, /(?i)Invoke-DllInjection/)=true OR match_regex(cmd_line, /(?i)Invoke-ServiceAbuse/)=true OR match_regex(cmd_line, /(?i)Invoke-Shellcode/)=true OR match_regex(cmd_line, /(?i)Invoke-WScriptUACBypass/)=true OR match_regex(cmd_line, /(?i)Invoke-WmiCommand/)=true OR match_regex(cmd_line, /(?i)Write-HijackDll/)=true OR match_regex(cmd_line, /(?i)Add-ServiceDacl/)=true )


| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Service_Abuse|Windows Service Abuse]]

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|-
| T1106
| Native API
| Execution
|-
| T1569
| System Services
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003/credential_extraction/logAllPowerSploitModulesWithOldNames.log


''version'': 1
</div>
</div>

----

===Jscript execution using cscript app===
This search is to detect a execution of jscript using cscript process. Commonly when a user run jscript file it was executed by wscript.exe application. This technique was seen in FIN7 js implant to execute its malicious script using cscript process. This behavior is uncommon and a good artifacts to check further anomalies within the network

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/007/ T1059.007]
* '''Last Updated''': 2021-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.parent_process_name = &#34;cscript.exe&#34; AND Processes.parent_process = &#34;*//e:jscript*&#34;) OR (Processes.process_name = &#34;cscript.exe&#34; AND Processes.process = &#34;*//e:jscript*&#34;) by Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process_id Processes.process Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `jscript_execution_using_cscript_app_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.parent_process_name

* Processes.parent_process

* Processes.process_name

* Processes.process_id

* Processes.process

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.007
| JavaScript
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.fireeye.com/blog/threat-research/2018/08/fin7-pursuing-an-enigmatic-and-evasive-global-criminal-operation.html

* https://attack.mitre.org/groups/G0046/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/fin7/fin7_macro_js_1/sysmon.log


''version'': 1
</div>
</div>

----

===Kerberoasting spn request with rc4 encryption===
This search detects a potential kerberoasting attack via service principal name requests

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1558/003/ T1558.003], [https://attack.mitre.org/techniques/T1558/ T1558]
* '''Last Updated''': 2020-10-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4769 Ticket_Options=0x40810000 Ticket_Encryption_Type=0x17 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, service, service_id, Ticket_Encryption_Type, Ticket_Options 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `kerberoasting_spn_request_with_rc4_encryption_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, and include the windows security event logs that contain kerberos

====Required field====

* _time

* EventCode

* Ticket_Options

* Ticket_Encryption_Type

* dest

* service

* service_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1558.003
| Kerberoasting
| Credential Access
|-
| T1558
| Steal or Forge Kerberos Tickets
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Older systems that support kerberos RC4 by default NetApp may generate false positives

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1208/T1208.md

* https://www.trimarcsecurity.com/post/trimarcresearch-detecting-kerberoasting-activity



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1558.003/atomic_red_team/windows-security.log


''version'': 3
</div>
</div>

----

===Known services killed by ransomware===
This search detects a suspicioous termination of known services killed by ransomware before encrypting files in a compromised machine. This technique is commonly seen in most of ransomware now a days to avoid exception error while accessing the targetted files it wants to encrypts because of the open handle of those services to the targetted file.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1490/ T1490]
* '''Last Updated''': 2021-06-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_system` EventCode=7036 Message IN (&#34;*Volume Shadow Copy*&#34;,&#34;*VSS*&#34;, &#34;*backup*&#34;, &#34;*sophos*&#34;, &#34;*sql*&#34;, &#34;*memtas*&#34;, &#34;*mepocs*&#34;, &#34;*veeam*&#34;, &#34;*svc$*&#34;) Message=&#34;*service entered the stopped state*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message dest Type 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `known_services_killed_by_ransomware_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#BlackMatter_Ransomware|BlackMatter Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the 7036 EventCode ScManager in System audit Logs from your endpoints.

====Required field====

* _time

* EventCode

* Message

* dest

* Type



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1490
| Inhibit System Recovery
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Admin activities or installing related updates may do a sudden stop to list of services we monitor.

====Reference====


* https://krebsonsecurity.com/2021/05/a-closer-look-at-the-darkside-ransomware-gang/

* https://www.mcafee.com/blogs/other-blogs/mcafee-labs/mcafee-atr-analyzes-sodinokibi-aka-revil-ransomware-as-a-service-what-the-code-tells-us/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/revil/inf3/windows-system.log


''version'': 1
</div>
</div>

----

===Local account discovery with wmic===
This analytic looks for the execution of `wmic.exe` with command-line arguments utilized to query for local users. The argument `useraccount` is used to leverage WMI to return a list of all local users. Red Teams and adversaries alike use net.exe to enumerate users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1087/001/ T1087.001]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_wmic` (Processes.process=*useraccount*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `local_account_discovery_with_wmic_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087
| Account Discovery
| Discovery
|-
| T1087.001
| Local Account
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1087/001/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.001/AD_discovery/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Local account discovery with net===
This analytic looks for the execution of `net.exe` or `net1.exe` with command-line arguments utilized to query for local users. The two arguments `user` and &#39;users&#39;, return a list of all local users. Red Teams and adversaries alike use net.exe to enumerate users for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1087/001/ T1087.001]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_net` (Processes.process=*user OR Processes.process=*users) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `local_account_discovery_with_net_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087
| Account Discovery
| Discovery
|-
| T1087.001
| Local Account
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1087/001/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.001/AD_discovery/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Logon script event trigger execution===
This search is to detect a suspicious modification of registry entry to persist and gain privilege escalation upon booting up of compromised host. This technique was seen in several APT and malware where it modify UserInitMprLogonScript registry entry to its malicious payload to be executed upon boot up of the machine.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1037/ T1037], [https://attack.mitre.org/techniques/T1037/001/ T1037.001]
* '''Last Updated''': 2021-09-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path IN (&#34;*\\Environment\\UserInitMprLogonScript&#34;) by Registry.dest  Registry.user Registry.registry_path Registry.registry_key_name Registry.registry_value_name 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `logon_script_event_trigger_execution_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.dest

* Registry.user

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1037
| Boot or Logon Initialization Scripts
| Persistence, Privilege Escalation
|-
| T1037.001
| Logon Script (Windows)
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://attack.mitre.org/techniques/T1037/001



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1037.001/logonscript_reg/sysmon.log


''version'': 1
</div>
</div>

----

===Ms scripting process loading ldap module===
This search is to detect a suspicious MS scripting process such as wscript.exe or cscript.exe that loading ldap module to process ldap query. This behavior was seen in FIN7 implant where it uses javascript to execute ldap query to parse host information that will send to its C2 server. this anomaly detections is a good initial step to hunt further a suspicious ldap query or ldap related events to the host that may give you good information regarding ldap or AD information processing or might be a attacker.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/007/ T1059.007]
* '''Last Updated''': 2021-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode =7 Image IN (&#34;*\\wscript.exe&#34;, &#34;*\\cscript.exe&#34;) ImageLoaded IN (&#34;*\\Wldap32.dll&#34;, &#34;*\\adsldp.dll&#34;, &#34;*\\adsldpc.dll&#34;) 
| stats min(_time) as firstTime max(_time) as lastTime count by Image EventCode process_name ProcessId ProcessGuid Computer ImageLoaded 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `ms_scripting_process_loading_ldap_module_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Image

* EventCode

* process_name

* ProcessId

* ProcessGuid

* Computer

* ImageLoaded



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.007
| JavaScript
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
automation scripting language may used by network operator to do ldap query.

====Reference====


* https://www.fireeye.com/blog/threat-research/2018/08/fin7-pursuing-an-enigmatic-and-evasive-global-criminal-operation.html

* https://attack.mitre.org/groups/G0046/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/fin7/fin7_js_2/sysmon.log


''version'': 1
</div>
</div>

----

===Ms scripting process loading wmi module===
This search is to detect a suspicious MS scripting process such as wscript.exe or cscript.exe that loading wmi module to process wmi query. This behavior was seen in FIN7 implant where it uses javascript to execute wmi query to parse host information that will send to its C2 server. this anomaly detections is a good initial step to hunt further a suspicious wmi query or wmi related events to the host that may give you good information regarding process that are commonly using wmi query or modules or might be an attacker using this technique.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/007/ T1059.007]
* '''Last Updated''': 2021-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode =7 Image IN (&#34;*\\wscript.exe&#34;, &#34;*\\cscript.exe&#34;) ImageLoaded IN (&#34;*\\fastprox.dll&#34;, &#34;*\\wbemdisp.dll&#34;, &#34;*\\wbemprox.dll&#34;, &#34;*\\wbemsvc.dll&#34; , &#34;*\\wmiutils.dll&#34;, &#34;*\\wbemcomn.dll&#34;) 
| stats min(_time) as firstTime max(_time) as lastTime count by Image EventCode process_name ProcessId ProcessGuid Computer ImageLoaded 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `ms_scripting_process_loading_wmi_module_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Image

* EventCode

* process_name

* ProcessId

* ProcessGuid

* Computer

* ImageLoaded



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.007
| JavaScript
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
automation scripting language may used by network operator to do ldap query.

====Reference====


* https://www.fireeye.com/blog/threat-research/2018/08/fin7-pursuing-an-enigmatic-and-evasive-global-criminal-operation.html

* https://attack.mitre.org/groups/G0046/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/fin7/fin7_js_2/sysmon.log


''version'': 1
</div>
</div>

----

===Msbuild suspicious spawned by script process===
This analytic is to detect a suspicious child process of MSBuild spawned by Windows Script Host - cscript or wscript. This behavior or event are commonly seen and used by malware or adversaries to execute malicious msbuild process using malicious script in the compromised host. During triage, review parallel processes and identify any file modifications. MSBuild may load a script from the same path without having command-line arguments.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1127/001/ T1127.001], [https://attack.mitre.org/techniques/T1127/ T1127]
* '''Last Updated''': 2021-10-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process_name) as process_name values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN (&#34;wscript.exe&#34;, &#34;cscript.exe&#34;) AND `process_msbuild` by Processes.dest Processes.parent_process Processes.parent_process_name Processes.process_name Processes.original_file_name Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `msbuild_suspicious_spawned_by_script_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trusted_Developer_Utilities_Proxy_Execution_MSBuild|Trusted Developer Utilities Proxy Execution MSBuild]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.parent_process

* Processes.parent_process_name

* Processes.process_name

* Processes.original_file_name

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1127.001
| MSBuild
| Defense Evasion
|-
| T1127
| Trusted Developer Utilities Proxy Execution
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited as developers do not spawn MSBuild via a WSH.

====Reference====


* https://app.any.run/tasks/dc93ee63-050c-4ff8-b07e-8277af9ab939/#



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1127.001/regsvr32_silent/sysmon.log


''version'': 1
</div>
</div>

----

===Mshtml module load in office product===
The following detection identifies the module load of mshtml.dll into an Office product. This behavior has been related to CVE-2021-40444, whereas the malicious document will load ActiveX, which activates the MSHTML component. The vulnerability resides in the MSHTML component. During triage, identify parallel processes and capture any file modifications for analysis.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-09-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventID=7  process_name IN (&#34;winword.exe&#34;,&#34;excel.exe&#34;,&#34;powerpnt.exe&#34;,&#34;mspub.exe&#34;,&#34;visio.exe&#34;,&#34;wordpad.exe&#34;,&#34;wordview.exe&#34;) ImageLoaded IN (&#34;*\\mshtml.dll&#34;, &#34;*\\Microsoft.mshtml.dll&#34;,&#34;*\\IE.Interop.MSHTML.dll&#34;,&#34;*\\MshtmlDac.dll&#34;,&#34;*\\MshtmlDed.dll&#34;,&#34;*\\MshtmlDer.dll&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, process_name, ImageLoaded, OriginalFileName, process_id 
| rename Computer as dest 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `mshtml_module_load_in_office_product_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]

* [[Documentation:ESSOC:stories:UseCase#Microsoft_MSHTML_Remote_Code_Execution_CVE-2021-40444|Microsoft MSHTML Remote Code Execution CVE-2021-40444]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process names and image loads from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* ImageLoaded

* process_name

* OriginalFileName

* process_id

* dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives will be present, however, tune as necessary.

====Reference====


* https://app.any.run/tasks/36c14029-9df8-439c-bba0-45f2643b0c70/

* https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444

* https://strontic.github.io/xcyclopedia/index-dll



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon_mshtml.log


''version'': 1
</div>
</div>

----

===Macos - re-opened applications===
This search looks for processes referencing the plist files that determine which applications are re-opened when a user reboots their machine.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': 
* '''Last Updated''': 2020-02-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process=&#34;*com.apple.loginwindow*&#34; by Processes.user Processes.process_name Processes.parent_process_name Processes.dest 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `macos___re_opened_applications_filter`</search>

====Associated Analytic Story====


====How To Implement====
In order to properly run this search, Splunk needs to ingest process data from your osquery deployed agents with the [splunk.conf](https://github.com/splunk/TA-osquery/blob/master/config/splunk.conf) pack enabled. Also the [TA-OSquery](https://github.com/splunk/TA-osquery) must be deployed across your indexers and universal forwarders in order to have the data populate the Endpoint data model.

====Required field====

* _time

* Processes.process

* Processes.parent_process

* Processes.user

* Processes.process_name

* Processes.parent_process_name

* Processes.dest




====Kill Chain Phase====

* Installation

* Command and Control


====Known False Positives====
At this stage, there are no known false positives. During testing, no process events refering the com.apple.loginwindow.plist files were observed during normal operation of re-opening applications on reboot. Therefore, it can be asumed that any occurences of this in the process events would be worth investigating. In the event that the legitimate modification by the system of these files is in fact logged to the process log, then the process_name of that process can be added to an allow list.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Mailsniper invoke functions===
This search is to detect known mailsniper.ps1 functions executed in a machine. This technique was seen in some attacker to harvest some sensitive e-mail in a compromised exchange server.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1114/ T1114], [https://attack.mitre.org/techniques/T1114/001/ T1114.001]
* '''Last Updated''': 2021-05-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message IN (&#34;*Invoke-GlobalO365MailSearch*&#34;, &#34;*Invoke-GlobalMailSearch*&#34;, &#34;*Invoke-SelfSearch*&#34;, &#34;*Invoke-PasswordSprayOWA*&#34;, &#34;*Invoke-PasswordSprayEWS*&#34;,&#34;*Invoke-DomainHarvestOWA*&#34;, &#34;*Invoke-UsernameHarvestOWA*&#34;,&#34;*Invoke-OpenInboxFinder*&#34;,&#34;*Invoke-InjectGEventAPI*&#34;,&#34;*Invoke-InjectGEvent*&#34;,&#34;*Invoke-SearchGmail*&#34;, &#34;*Invoke-MonitorCredSniper*&#34;, &#34;*Invoke-AddGmailRule*&#34;,&#34;*Invoke-PasswordSprayEAS*&#34;,&#34;*Invoke-UsernameHarvestEAS*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `mailsniper_invoke_functions_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Data_Exfiltration|Data Exfiltration]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the powershell logs  from your endpoints. make sure you enable needed registry to monitor this event.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1114
| Email Collection
| Collection
|-
| T1114.001
| Local Email Collection
| Collection
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.blackhillsinfosec.com/introducing-mailsniper-a-tool-for-searching-every-users-email-for-sensitive-data/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/honeypots/casper/datasets1/windows-powershell.log


''version'': 1
</div>
</div>

----

===Malicious inprocserver32 modification===
The following analytic identifies a process modifying the registry with a known malicious CLSID under InProcServer32. Most COM classes are registered with the operating system and are identified by a GUID that represents the Class Identifier (CLSID) within the registry (usually under HKLM\\Software\\Classes\\CLSID or HKCU\\Software\\Classes\\CLSID).  Behind the implementation of a COM class is the server (some binary) that is referenced within registry keys under the CLSID.  The LocalServer32 key represents a path to an executable (exe) implementation, and the InprocServer32 key represents a path to a dynamic link library (DLL) implementation (Bohops). During triage, review parallel processes for suspicious activity. Pivot on the process GUID to see the full timeline of events. Analyze the value and look for file modifications. Being this is looking for inprocserver32, a DLL found in the value will most likely be loaded by a parallel process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/010/ T1218.010], [https://attack.mitre.org/techniques/T1112/ T1112]
* '''Last Updated''': 2021-10-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes by _time Processes.process_id Processes.process_name Processes.dest Processes.process_guid Processes.user 
| `drop_dm_object_name(Processes)` 
| join process_guid [
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\CLSID\\{89565275-A714-4a43-912E-978B935EDCCC}\\InProcServer32\\(Default)&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest Registry.process_guid Registry.user 
| `drop_dm_object_name(Registry)` 
| fields _time dest registry_path registry_key_name registry_value_name process_name process_path process process_guid user] 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, process_name registry_path registry_key_name registry_value_name user 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `malicious_inprocserver32_modification_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvr32_Activity|Suspicious Regsvr32 Activity]]

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* dest

* process_name

* registry_path

* registry_key_name

* registry_value_name

* user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218.010
| Regsvr32
| Defense Evasion
|-
| T1112
| Modify Registry
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited, filter as needed. In our test case, Remcos used regsvr32.exe to modify the registry. It may be required, dependent upon the EDR tool producing registry events, to remove (Default) from the command-line.

====Reference====


* https://bohops.com/2018/06/28/abusing-com-registry-structure-clsid-localserver32-inprocserver32/

* https://tria.ge/210929-ap75vsddan

* https://www.virustotal.com/gui/file/cb77b93150cb0f7fe65ce8a7e2a5781e727419451355a7736db84109fa215a89



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/remcos/remcos/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Malicious powershell process - connect to internet with hidden window===
The following hunting analytic identifies PowerShell commands utilizing the WindowStyle parameter to hide the window on the compromised endpoint. This combination of command-line options is suspicious because it is overriding the default PowerShell execution policy, attempts to hide its activity from the user, and connects to the Internet. Removed in this version of the query is New-Object. The analytic identifies all variations of WindowStyle, as PowerShell allows the ability to shorten the parameter. For example w, win, windowsty and so forth. In addition, through our research it was identified that PowerShell will interpret different command switch types beyond the hyphen. We have added endash, emdash, horizontal bar, and forward slash.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/001/ T1059.001], [https://attack.mitre.org/techniques/T1059/ T1059]
* '''Last Updated''': 2021-10-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_powershell` by Processes.user Processes.process_name Processes.process Processes.parent_process_name Processes.original_file_name Processes.dest Processes.process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| where match(process,&#34;(?i)[\-
|\/
|–
|—
|―]w(in*d*o*w*s*t*y*l*e*)*\s+[^-]&#34;) 
| `malicious_powershell_process___connect_to_internet_with_hidden_window_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]

* [[Documentation:ESSOC:stories:UseCase#Possible_Backdoor_Activity_Associated_With_MUDCARP_Espionage_Campaigns|Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns]]

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.process

* Processes.process_name

* Processes.user

* Processes.parent_process_name

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059.001
| PowerShell
| Execution
|-
| T1059
| Command and Scripting Interpreter
| Execution
|}


====Kill Chain Phase====

* Command and Control

* Actions on Objectives


====Known False Positives====
Legitimate process can have this combination of command-line options, but it&#39;s not common.

====Reference====


* https://regexr.com/663rr

* https://github.com/redcanaryco/AtomicTestHarnesses/blob/master/TestHarnesses/T1059.001_PowerShell/OutPowerShellCommandLineParameter.ps1

* https://ss64.com/ps/powershell.html

* https://twitter.com/M_haggis/status/1440758396534214658?s=20



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/hidden_powershell/windows-sysmon.log


''version'': 7
</div>
</div>

----

===Malicious powershell process - encoded command===
The following analytic identifies the use of the EncodedCommand PowerShell parameter. This is typically used by Administrators to run complex scripts, but commonly used by adversaries to hide their code. \
The analytic identifies all variations of EncodedCommand, as PowerShell allows the ability to shorten the parameter. For example enc, enco, encod and so forth. In addition, through our research it was identified that PowerShell will interpret different command switch types beyond the hyphen. We have added endash, emdash, horizontal bar, and forward slash. \
During triage, review parallel events to determine legitimacy. Tune as needed based on admin scripts in use. \
Alternatively, may use regex per matching here https://regexr.com/662ov.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1027/ T1027]
* '''Last Updated''': 2021-10-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_powershell` by Processes.user Processes.process_name Processes.process Processes.parent_process_name Processes.original_file_name Processes.dest Processes.process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| where match(process,&#34;(?i)[\-
|\/
|–
|—
|―]e(nc*o*d*e*d*c*o*m*m*a*n*d*)*\s+[^-]&#34;) 
| `malicious_powershell_process___encoded_command_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.user

* Processes.parent_process_name

* Processes.dest

* Processes.process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1027
| Obfuscated Files or Information
| Defense Evasion
|}


====Kill Chain Phase====

* Command and Control

* Actions on Objectives


====Known False Positives====
System administrators may use this option, but it&#39;s not common.

====Reference====


* https://regexr.com/662ov

* https://github.com/redcanaryco/AtomicTestHarnesses/blob/master/TestHarnesses/T1059.001_PowerShell/OutPowerShellCommandLineParameter.ps1

* https://ss64.com/ps/powershell.html

* https://twitter.com/M_haggis/status/1440758396534214658?s=20



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1027/atomic_red_team/windows-sysmon.log


''version'': 6
</div>
</div>

----

===Malicious powershell process - execution policy bypass===
This search looks for PowerShell processes started with parameters used to bypass the local execution policy for scripts. These parameters are often observed in attacks leveraging PowerShell scripts as they override the default PowerShell execution policy.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process_id) as process_id, values(Processes.parent_process_id) as parent_process_id values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_powershell` (Processes.process=&#34;* -ex*&#34; OR Processes.process=&#34;* bypass *&#34;) by Processes.process_id, Processes.user, Processes.dest 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `malicious_powershell_process___execution_policy_bypass_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Command and Control

* Actions on Objectives


====Known False Positives====
There may be legitimate reasons to bypass the PowerShell execution policy. The PowerShell script being run with this parameter should be validated to ensure that it is legitimate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/encoded_powershell/windows-sysmon.log


''version'': 5
</div>
</div>

----

===Malicious powershell process with obfuscation techniques===
This search looks for PowerShell processes launched with arguments that have characters indicative of obfuscation on the command-line.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-01-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_powershell` by Processes.user Processes.process_name Processes.original_file_name Processes.parent_process_name Processes.dest Processes.process 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| eval num_obfuscation = (mvcount(split(process,&#34;`&#34;))-1) + (mvcount(split(process, &#34;^&#34;))-1) + (mvcount(split(process, &#34;&#39;&#34;))-1) 
| `malicious_powershell_process_with_obfuscation_techniques_filter` 
| search num_obfuscation &gt; 10 </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Command and Control

* Actions on Objectives


====Known False Positives====
These characters might be legitimately on the command-line, but it is not common.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/obfuscated_powershell/windows-sysmon.log


''version'': 5
</div>
</div>

----

===Malicious powershell executed as a service===
This detection is to identify the abuse the Windows SC.exe to execute malicious commands or payloads via PowerShell.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1569/ T1569], [https://attack.mitre.org/techniques/T1569/002/ T1569.002]
* '''Last Updated''': 2021-04-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> `wineventlog_system` EventCode=7045 
| eval l_Service_File_Name=lower(Service_File_Name) 
| regex l_Service_File_Name=&#34;powershell[.\s]
|powershell_ise[.\s]
|pwsh[.\s]
|psexec[.\s]&#34; 
| regex l_Service_File_Name=&#34;-nop[rofile\s]+
|-w[indowstyle]*\s+hid[den]*
|-noe[xit\s]+
|-enc[odedcommand\s]+&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Service_File_Name Service_Name Service_Start_Type Service_Type Service_Account user 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `malicious_powershell_executed_as_a_service_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_Powershell|Malicious Powershell]]


====How To Implement====
To successfully implement this search, you need to be ingesting Windows System logs with the Service name, Service File Name Service Start type, and Service Type from your endpoints.

====Required field====

* EventCode

* Service_File_Name

* Service_Type

* _time

* Service_Name

* Service_Start_Type

* Service_Account

* user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1569
| System Services
| Execution
|-
| T1569.002
| Service Execution
| Execution
|}


====Kill Chain Phase====

* Privilege Escalation


====Known False Positives====
Creating a hidden powershell service is rare and could key off of those instances.

====Reference====


* https://www.fireeye.com/content/dam/fireeye-www/blog/pdfs/dosfuscation-report.pdf

* http://az4n6.blogspot.com/2017/

* https://www.danielbohannon.com/blog-1/2017/3/12/powershell-execution-argument-obfuscation-how-it-can-make-detection-easier



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1569.002/atomic_red_team/windows-system.log


''version'': 1
</div>
</div>

----

===Modification of wallpaper===
This analytic identifies suspicious modification of registry to deface or change the wallpaper of a compromised machines as part of its payload. This technique was commonly seen in ransomware like REVIL where it create a bitmap file contain a note that the machine was compromised and make it as a wallpaper.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1491/ T1491]
* '''Last Updated''': 2021-06-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode =13  (TargetObject= &#34;*\\Control Panel\\Desktop\\Wallpaper&#34; AND Image != &#34;*\\explorer.exe&#34;) OR (TargetObject= &#34;*\\Control Panel\\Desktop\\Wallpaper&#34; AND Details = &#34;*\\temp\\*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Image TargetObject Details  Computer process_guid process_id user_id 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `modification_of_wallpaper_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Revil_Ransomware|Revil Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#BlackMatter_Ransomware|BlackMatter Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the Image, TargetObject registry key, registry Details from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* EventCode

* Image

* TargetObject

* Details

* Computer

* process_guid

* process_id

* user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1491
| Defacement
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
3rd party tool may used to changed the wallpaper of the machine

====Reference====


* https://krebsonsecurity.com/2021/05/a-closer-look-at-the-darkside-ransomware-gang/

* https://www.mcafee.com/blogs/other-blogs/mcafee-labs/mcafee-atr-analyzes-sodinokibi-aka-revil-ransomware-as-a-service-what-the-code-tells-us/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/revil/inf1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Modify acl permission to files or folder===
This analytic identifies suspicious modification of ACL permission to a files or folder to make it available to everyone. This technique may be used by the adversary to evade ACLs or protected files access. This changes is commonly configured by the file or directory owner with appropriate permission. This behavior is a good indicator if this command seen on a machine utilized by an account with no permission to do so.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1222/ T1222]
* '''Last Updated''': 2021-05-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = &#34;cacls.exe&#34; OR Processes.process_name = &#34;icacls.exe&#34; OR Processes.process_name = &#34;xcacls.exe&#34; AND (Processes.process = &#34;*/G everyone:*&#34;  OR Processes.process = &#34;*/G SYSTEM:*&#34;) by Processes.parent_process_name Processes.process_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `modify_acl_permission_to_files_or_folder_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed cacls.exe may be used.

====Required field====

* _time

* Processes.parent_process_name

* Processes.process_name

* Processes.dest

* Processes.user

* Processes.process

* Processes.process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1222
| File and Directory Permissions Modification
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
administrators may use this command. Filter as needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Modify acls permission of files or folders===
This analytic identifies suspicious modification of ACL permission to a files or folder to make it available to everyone or to a specific user. This technique may be used by the adversary to evade ACLs or protected files access. This changes is commonly configured by the file or directory owner with appropriate permission. This behavior is a good indicator if this command seen on a machine utilized by an account with no permission to do so.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1222/ T1222]
* '''Last Updated''': 2021-06-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line IS NOT NULL AND like(cmd_line, &#34;%/G%&#34;) AND (match_regex(cmd_line, /(?i)everyone:/)=true OR match_regex(cmd_line, /(?i)SYSTEM:/)=true) AND (process_name=&#34;cacls.exe&#34; OR process_name=&#34;xcacls.exe&#34; OR process_name=&#34;icacls.exe&#34;) 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name, &#34;process_path&#34;, process_path]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed cacls.exe may be used.

====Required field====

* _time

* dest_device_id

* process_name

* parent_process_name

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1222
| File and Directory Permissions Modification
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network administrator may use this windows utility. filter is needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1222.001/ssa_cacls/all_icalc.log


''version'': 1
</div>
</div>

----

===Monitor registry keys for print monitors===
This search looks for registry activity associated with modifications to the registry key `HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors`. In this scenario, an attacker can load an arbitrary .dll into the print-monitor registry by giving the full path name to the after.dll. The system will execute the .dll with elevated (SYSTEM) permissions and will persist after reboot.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/010/ T1547.010], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2020-11-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.action=modified AND Registry.registry_path=&#34;*CurrentControlSet\\Control\\Print\\Monitors*&#34; by Registry.dest, Registry.registry_key_name Registry.user Registry.registry_path Registry.registry_value_name Registry.action 
| `drop_dm_object_name(Registry)` 
| `monitor_registry_keys_for_print_monitors_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Windows_Registry_Activities|Suspicious Windows Registry Activities]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report registry modifications.

====Required field====

* _time

* Registry.action

* Registry.registry_path

* Registry.dest

* Registry.registry_key_name

* Registry.user

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.010
| Port Monitors
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
You will encounter noise from legitimate print-monitor registry entries.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.010/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===More than usual number of lolbas applications in short time period===
Attacker activity may compromise executing several LOLBAS applications in conjunction to accomplish their objectives. We are looking for more than usual LOLBAS applications over a window of time, by building profiles per machine.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1053/ T1053]
* '''Last Updated''': 2020-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| from read_ssa_enriched_events() 
| eval device=ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null), process_name=lower(ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null)), timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)) 
| where process_name==&#34;regsvcs.exe&#34; OR process_name==&#34;ftp.exe&#34; OR process_name==&#34;dfsvc.exe&#34; OR process_name==&#34;rasautou.exe&#34; OR process_name==&#34;schtasks.exe&#34; OR process_name==&#34;xwizard.exe&#34; OR process_name==&#34;findstr.exe&#34; OR process_name==&#34;esentutl.exe&#34; OR process_name==&#34;cscript.exe&#34; OR process_name==&#34;reg.exe&#34; OR process_name==&#34;csc.exe&#34; OR process_name==&#34;atbroker.exe&#34; OR process_name==&#34;print.exe&#34; OR process_name==&#34;pcwrun.exe&#34; OR process_name==&#34;vbc.exe&#34; OR process_name==&#34;rpcping.exe&#34; OR process_name==&#34;wsreset.exe&#34; OR process_name==&#34;ilasm.exe&#34; OR process_name==&#34;certutil.exe&#34; OR process_name==&#34;replace.exe&#34; OR process_name==&#34;mshta.exe&#34; OR process_name==&#34;bitsadmin.exe&#34; OR process_name==&#34;wscript.exe&#34; OR process_name==&#34;ieexec.exe&#34; OR process_name==&#34;cmd.exe&#34; OR process_name==&#34;microsoft.workflow.compiler.exe&#34; OR process_name==&#34;runscripthelper.exe&#34; OR process_name==&#34;makecab.exe&#34; OR process_name==&#34;forfiles.exe&#34; OR process_name==&#34;desktopimgdownldr.exe&#34; OR process_name==&#34;control.exe&#34; OR process_name==&#34;msbuild.exe&#34; OR process_name==&#34;register-cimprovider.exe&#34; OR process_name==&#34;tttracer.exe&#34; OR process_name==&#34;ie4uinit.exe&#34; OR process_name==&#34;sc.exe&#34; OR process_name==&#34;bash.exe&#34; OR process_name==&#34;hh.exe&#34; OR process_name==&#34;cmstp.exe&#34; OR process_name==&#34;mmc.exe&#34; OR process_name==&#34;jsc.exe&#34; OR process_name==&#34;scriptrunner.exe&#34; OR process_name==&#34;odbcconf.exe&#34; OR process_name==&#34;extexport.exe&#34; OR process_name==&#34;msdt.exe&#34; OR process_name==&#34;diskshadow.exe&#34; OR process_name==&#34;extrac32.exe&#34; OR process_name==&#34;eventvwr.exe&#34; OR process_name==&#34;mavinject.exe&#34; OR process_name==&#34;regasm.exe&#34; OR process_name==&#34;gpscript.exe&#34; OR process_name==&#34;rundll32.exe&#34; OR process_name==&#34;regsvr32.exe&#34; OR process_name==&#34;regedit.exe&#34; OR process_name==&#34;msiexec.exe&#34; OR process_name==&#34;gfxdownloadwrapper.exe&#34; OR process_name==&#34;presentationhost.exe&#34; OR process_name==&#34;regini.exe&#34; OR process_name==&#34;wmic.exe&#34; OR process_name==&#34;runonce.exe&#34; OR process_name==&#34;syncappvpublishingserver.exe&#34; OR process_name==&#34;verclsid.exe&#34; OR process_name==&#34;psr.exe&#34; OR process_name==&#34;infdefaultinstall.exe&#34; OR process_name==&#34;explorer.exe&#34; OR process_name==&#34;expand.exe&#34; OR process_name==&#34;installutil.exe&#34; OR process_name==&#34;netsh.exe&#34; OR process_name==&#34;wab.exe&#34; OR process_name==&#34;dnscmd.exe&#34; OR process_name==&#34;at.exe&#34; OR process_name==&#34;pcalua.exe&#34; OR process_name==&#34;cmdkey.exe&#34; OR process_name==&#34;msconfig.exe&#34; 
| stats count(process_name) as lolbas_counter by device,span(timestamp, 300s) 
| eval lolbas_counter=lolbas_counter*1.0 
| rename window_end as timestamp 
| adaptive_threshold algorithm=&#34;quantile&#34; value=&#34;lolbas_counter&#34; entity=&#34;device&#34; window=2419200000L 
| where label AND quantile&gt;0.99 
| eval start_time = window_start, end_time = timestamp, entities = mvappend(device), body=create_map([&#34;lolbas_counter&#34;, lolbas_counter, &#34;quantile&#34;, quantile, &#34;device&#34;, device]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
Collect endpoint data such as sysmon or 4688 events.

====Required field====

* dest_device_id

* _time

* process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Some administrative tasks may involve multiple use of LOLBAS applications in a short period of time. This might trigger false positives at the beginning when it hasn&#39;t collected yet enough data to construct the baseline.


====Reference====


* https://github.com/LOLBAS-Project/LOLBAS/tree/master/yml/OSBinaries



====Test Dataset====


''version'': 2
</div>
</div>

----

===Mshta spawning rundll32 or regsvr32 process===
This search is to detect a suspicious mshta.exe process that spawn rundll32 or regsvr32 child process. This technique was seen in several malware nowadays like trickbot to load its initial .dll stage loader to execute and download the the actual trickbot payload.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/005/ T1218.005]
* '''Last Updated''': 2021-07-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name = &#34;mshta.exe&#34;  `process_rundll32` OR `process_regsvr32` by Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.process_guid Processes.user Processes.dest 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `mshta_spawning_rundll32_or_regsvr32_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.005
| Mshta
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
limitted. this anomaly behavior is not commonly seen in clean host.

====Reference====


* https://twitter.com/cyb3rops/status/1416050325870587910?s=21



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/trickbot/spear_phish/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Msmpeng application dll side loading===
This search is to detect a suspicious creation of msmpeng.exe or mpsvc.dll in non default windows defender folder. This technique was seen couple days ago with revil ransomware in Kaseya Supply chain. The approach is to drop an old version of msmpeng.exe to load the actual payload name as mspvc.dll which will load the revil ransomware to the compromise machine

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1574/002/ T1574.002], [https://attack.mitre.org/techniques/T1574/ T1574]
* '''Last Updated''': 2021-07-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
|tstats `security_content_summariesonly` values(Filesystem.file_path) as file_path count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Filesystem where (Filesystem.file_name = &#34;msmpeng.exe&#34; OR Filesystem.file_name = &#34;mpsvc.dll&#34;)  AND Filesystem.file_path != &#34;*\\Program Files\\windows defender\\*&#34; by Filesystem.file_create_time Filesystem.process_id  Filesystem.file_name Filesystem.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `msmpeng_application_dll_side_loading_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Revil_Ransomware|Revil Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the Filesystem responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Filesystem` node.

====Required field====

* _time

* Filesystem.file_create_time

* Filesystem.process_id

* Filesystem.file_name

* Filesystem.user

* Filesystem.file_path



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1574.002
| DLL Side-Loading
| Persistence, Privilege Escalation, Defense Evasion
|-
| T1574
| Hijack Execution Flow
| Persistence, Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
quite minimal false positive expected.

====Reference====


* https://community.sophos.com/b/security-blog/posts/active-ransomware-attack-on-kaseya-customers



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets//malware/revil/msmpeng_side/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Multiple disabled users failing to authenticate from host using kerberos===
The following analytic identifies one source endpoint failing to authenticate with multiple disabled domain users using the Kerberos protocol. This behavior could represent an adversary performing a Password Spraying attack against an Active Directory environment using Kerberos to obtain initial access or elevate privileges. As attackers progress in a breach, mistakes will be made. In certain scenarios, adversaries may execute a password spraying attack against disabled users. Event 4768 is generated every time the Key Distribution Center issues a Kerberos Ticket Granting Ticket (TGT). Failure code `0x12` stands for `clients credentials have been revoked` (account disabled, expired or locked out).\
The detection calculates the standard deviation for each host and leverages the 3-sigma statistical rule to identify an unusual number of users. To customize this analytic, users can try different combinations of the `bucket` span time and the calculation of the `upperBound` field. This logic can be used for real time security monitoring as well as threat hunting exercises.\
This detection will only trigger on domain controllers, not on member servers or workstations.\
The analytics returned fields allow analysts to investigate the event further by providing fields like source ip and attempted user accounts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1110/003/ T1110.003], [https://attack.mitre.org/techniques/T1110/ T1110]
* '''Last Updated''': 2021-04-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4768 Account_Name!=&#34;*$&#34; Result_Code=0x12 
| bucket span=2m _time 
| stats dc(Account_Name) AS unique_accounts values(Account_Name) as tried_accounts by _time, Client_Address 
| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by Client_Address 
| eval upperBound=(comp_avg+comp_std*3) 
| eval isOutlier=if(unique_accounts &gt; 10 and unique_accounts &gt;= upperBound, 1, 0) 
| search isOutlier=1 
| `multiple_disabled_users_failing_to_authenticate_from_host_using_kerberos_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Password_Spraying|Active Directory Password Spraying]]


====How To Implement====
To successfully implement this search, you need to be ingesting Domain Controller and Kerberos events. The Advanced Security Audit policy setting `Audit Kerberos Authentication Service` within `Account Logon` needs to be enabled.

====Required field====

* _time

* EventCode

* Result_Code

* Account_Name

* Client_Address



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1110.003
| Password Spraying
| Credential Access
|-
| T1110
| Brute Force
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
A host failing to authenticate with multiple disabled domain users is not a common behavior for legitimate systems. Possible false positive scenarios include but are not limited to vulnerability scanners, multi-user systems missconfigured systems.

====Reference====


* https://attack.mitre.org/techniques/T1110/003/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110.003/purplesharp_disabled_users_kerberos/windows-security.log


''version'': 1
</div>
</div>

----

===Multiple invalid users failing to authenticate from host using kerberos===
The following analytic identifies one source endpoint failing to authenticate with multiple invalid domain users using the Kerberos protocol. This behavior could represent an adversary performing a Password Spraying attack against an Active Directory environment using Kerberos to obtain initial access or elevate privileges. As attackers progress in a breach, mistakes will be made. In certain scenarios, adversaries may execute a password spraying attack using an invalid list of users. Event 4768 is generated every time the Key Distribution Center issues a Kerberos Ticket Granting Ticket (TGT). Failure code 0x6 stands for `client not found in Kerberos database` (the attempted user is not a valid domain user).\
The detection calculates the standard deviation for each host and leverages the 3-sigma statistical rule to identify an unusual number of users. To customize this analytic, users can try different combinations of the `bucket` span time and the calculation of the `upperBound` field. This logic can be used for real time security monitoring as well as threat hunting exercises.\
This detection will only trigger on domain controllers, not on member servers or workstations.\
The analytics returned fields allow analysts to investigate the event further by providing fields like source ip and attempted user accounts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1110/003/ T1110.003], [https://attack.mitre.org/techniques/T1110/ T1110]
* '''Last Updated''': 2021-04-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4768 Result_Code=0x6 Account_Name!=&#34;*$&#34; 
| bucket span=2m _time 
| stats dc(Account_Name) AS unique_accounts values(Account_Name) as tried_accounts by _time, Client_Address 
| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by Client_Address 
| eval upperBound=(comp_avg+comp_std*3) 
| eval isOutlier=if(unique_accounts &gt; 10 and unique_accounts &gt;= upperBound, 1, 0) 
| search isOutlier=1 
| `multiple_invalid_users_failing_to_authenticate_from_host_using_kerberos_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Password_Spraying|Active Directory Password Spraying]]


====How To Implement====
To successfully implement this search, you need to be ingesting Domain Controller and Kerberos events. The Advanced Security Audit policy setting `Audit Kerberos Authentication Service` within `Account Logon` needs to be enabled.

====Required field====

* _time

* EventCode

* Result_Code

* Account_Name

* Client_Address



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1110.003
| Password Spraying
| Credential Access
|-
| T1110
| Brute Force
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
A host failing to authenticate with multiple invalid domain users is not a common behavior for legitimate systems. Possible false positive scenarios include but are not limited to vulnerability scanners, multi-user systems and missconfigured systems.

====Reference====


* https://attack.mitre.org/techniques/T1110/003/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110.003/purplesharp_invalid_users_kerberos/windows-security.log


''version'': 1
</div>
</div>

----

===Multiple invalid users failing to authenticate from host using ntlm===
The following analytic identifies one source endpoint failing to authenticate with multiple invalid users using the NTLM protocol. This behavior could represent an adversary performing a Password Spraying attack against an Active Directory environment using NTLM to obtain initial access or elevate privileges. As attackers progress in a breach, mistakes will be made. In certain scenarios, adversaries may execute a password spraying attack using an invalid list of users. Event 4776 is generated on the computer that is authoritative for the provided credentials. For domain accounts, the domain controller is authoritative. For local accounts, the local computer is authoritative. Error code 0xC0000064 stands for `The username you typed does not exist` (the attempted user is a legitimate domain user).\
The detection calculates the standard deviation for each host and leverages the 3-sigma statistical rule to identify an unusual number of users. To customize this analytic, users can try different combinations of the `bucket` span time and the calculation of the `upperBound` field. This logic can be used for real time security monitoring as well as threat hunting exercises.\
This detection will only trigger on domain controllers, not on member servers or workstations.\
The analytics returned fields allow analysts to investigate the event further by providing fields like source workstation name and attempted user accounts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1110/003/ T1110.003], [https://attack.mitre.org/techniques/T1110/ T1110]
* '''Last Updated''': 2021-04-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> `wineventlog_security` EventCode=4776 Logon_Account!=&#34;*$&#34; 0xC0000064 action=failure 
| bucket span=2m _time 
| stats dc(Logon_Account) AS unique_accounts values(Logon_Account) as tried_accounts by _time, Source_Workstation 
| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by Source_Workstation 
| eval upperBound=(comp_avg+comp_std*3) 
| eval isOutlier=if(unique_accounts &gt; 10 and unique_accounts &gt;= upperBound, 1, 0) 
| search isOutlier=1 
| `multiple_invalid_users_failing_to_authenticate_from_host_using_ntlm_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Password_Spraying|Active Directory Password Spraying]]


====How To Implement====
To successfully implement this search, you need to be ingesting Domain Controller events. The Advanced Security Audit policy setting `Audit Credential Validation&#39; within `Account Logon` needs to be enabled.

====Required field====

* _time

* EventCode

* action

* Logon_Account

* Source_Workstation



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1110.003
| Password Spraying
| Credential Access
|-
| T1110
| Brute Force
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
A host failing to authenticate with multiple invalid domain users is not a common behavior for legitimate systems. Possible false positive scenarios include but are not limited to vulnerability scanners and missconfigured systems. If this detection triggers on a host other than a Domain Controller, the behavior could represent a password spraying attack against the host&#39;s local accounts.

====Reference====


* https://attack.mitre.org/techniques/T1110/003/

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-credential-validation

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4776



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110.003/purplesharp_invalid_users_ntlm/windows-security.log


''version'': 1
</div>
</div>

----

===Multiple users attempting to authenticate using explicit credentials===
The following analytic identifies a source user failing to authenticate with multiple users using explicit credentials on a host. This behavior could represent an adversary performing a Password Spraying attack against an Active Directory environment to obtain initial access or elevate privileges. Event 4648 is generated when a process attempts an account logon by explicitly specifying that accounts credentials. This event generates on domain controllers, member servers, and workstations.\
The detection calculates the standard deviation for each host and leverages the 3-sigma statistical rule to identify an unusual number of users. To customize this analytic, users can try different combinations of the `bucket` span time and the calculation of the `upperBound` field. This logic can be used for real time security monitoring as well as threat hunting exercises.\
This detection will trigger on the potenfially malicious host, perhaps controlled via a trojan or operated by an insider threat, from where a password spraying attack is being executed.\
The analytics returned fields allow analysts to investigate the event further by providing fields like source account, attempted user accounts and the endpoint were the behavior was identified.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1110/003/ T1110.003], [https://attack.mitre.org/techniques/T1110/ T1110]
* '''Last Updated''': 2021-04-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> `wineventlog_security` EventCode=4648 
| bucket span=2m _time 
| eval Source_Account = mvindex(Account_Name, 0) 
| eval Destination_Account = mvindex(Account_Name, 1) 
| search Source_Account != &#34;*$&#34; Source_Account !=&#34;-&#34; Destination_Account !=&#34;*$&#34; 
| stats dc(Destination_Account) AS unique_accounts values(Destination_Account) as tried_account by _time, ComputerName, Source_Account 
| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by ComputerName 
| eval upperBound=(comp_avg+comp_std*3) 
| eval isOutlier=if(unique_accounts &gt; 10 and unique_accounts &gt;= upperBound, 1, 0) 
| search isOutlier=1 
| `multiple_users_attempting_to_authenticate_using_explicit_credentials_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Password_Spraying|Active Directory Password Spraying]]


====How To Implement====
To successfully implement this search, you need to be ingesting Windows Event Logs from domain controllers as well as member servers and workstations. The Advanced Security Audit policy setting `Audit Logon` within `Logon/Logoff` needs to be enabled.

====Required field====

* _time

* EventCode

* Security_ID

* Account_Name

* ComputerName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1110.003
| Password Spraying
| Credential Access
|-
| T1110
| Brute Force
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
A source user failing attempting to authenticate multiple users on a host is not a common behavior for regular systems. Some applications, however, may exhibit this behavior in which case sets of users hosts can be added to an allow list. Possible false positive scenarios include systems where several users connect to like Mail servers, identity providers, remote desktop services, Citrix, etc.

====Reference====


* https://attack.mitre.org/techniques/T1110/003/

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4648

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/basic-audit-logon-events



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110.003/purplesharp_explicit_credential_spray/windows-security.log


''version'': 1
</div>
</div>

----

===Multiple users failing to authenticate from host using kerberos===
The following analytic identifies one source endpoint failing to authenticate with multiple valid users using the Kerberos protocol. This behavior could represent an adversary performing a Password Spraying attack against an Active Directory environment using Kerberos to obtain initial access or elevate privileges. Event 4771 is generated when the Key Distribution Center fails to issue a Kerberos Ticket Granting Ticket (TGT). Failure code 0x18 stands for `wrong password provided` (the attempted user is a legitimate domain user).\
The detection calculates the standard deviation for each host and leverages the 3-sigma statistical rule to identify an unusual number of users. To customize this analytic, users can try different combinations of the `bucket` span time and the calculation of the `upperBound` field. This logic can be used for real time security monitoring as well as threat hunting exercises.\
This detection will only trigger on domain controllers, not on member servers or workstations.\
The analytics returned fields allow analysts to investigate the event further by providing fields like source ip and attempted user accounts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1110/003/ T1110.003], [https://attack.mitre.org/techniques/T1110/ T1110]
* '''Last Updated''': 2021-04-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4771 Failure_Code=0x18 Account_Name!=&#34;*$&#34; 
| bucket span=2m _time 
| stats dc(Account_Name) AS unique_accounts values(Account_Name) as tried_accounts by _time, Client_Address 
| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by Client_Address 
| eval upperBound=(comp_avg+comp_std*3) 
| eval isOutlier=if(unique_accounts &gt; 10 and unique_accounts &gt;= upperBound, 1, 0) 
| search isOutlier=1 
| `multiple_users_failing_to_authenticate_from_host_using_kerberos_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Password_Spraying|Active Directory Password Spraying]]


====How To Implement====
To successfully implement this search, you need to be ingesting Domain Controller and Kerberos events. The Advanced Security Audit policy setting `Audit Kerberos Authentication Service` within `Account Logon` needs to be enabled.

====Required field====

* _time

* EventCode

* Result_Code

* Account_Name

* Client_Address



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1110.003
| Password Spraying
| Credential Access
|-
| T1110
| Brute Force
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
A host failing to authenticate with multiple valid domain users is not a common behavior for legitimate systems. Possible false positive scenarios include but are not limited to vulnerability scanners, missconfigured systems and multi-user systems like Citrix farms.

====Reference====


* https://attack.mitre.org/techniques/T1110/003/

* https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn319109(v=ws.11)

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4771



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110.003/purplesharp_valid_users_kerberos/windows-security.log


''version'': 1
</div>
</div>

----

===Multiple users failing to authenticate from host using ntlm===
The following analytic identifies one source endpoint failing to authenticate with multiple valid users using the NTLM protocol. This behavior could represent an adversary performing a Password Spraying attack against an Active Directory environment using NTLM to obtain initial access or elevate privileges. Event 4776 is generated on the computer that is authoritative for the provided credentials. For domain accounts, the domain controller is authoritative. For local accounts, the local computer is authoritative. Error code 0xC000006A means: misspelled or bad password (the attempted user is a legitimate domain user).\
The detection calculates the standard deviation for each host and leverages the 3-sigma statistical rule to identify an unusual number of users. To customize this analytic, users can try different combinations of the `bucket` span time and the calculation of the `upperBound` field. This logic can be used for real time security monitoring as well as threat hunting exercises.\
This detection will only trigger on domain controllers, not on member servers or workstations.\
The analytics returned fields allow analysts to investigate the event further by providing fields like source workstation name and attempted user accounts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1110/003/ T1110.003], [https://attack.mitre.org/techniques/T1110/ T1110]
* '''Last Updated''': 2021-04-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> `wineventlog_security` EventCode=4776 Logon_Account!=&#34;*$&#34; 0xC000006A action=failure 
| bucket span=2m _time 
| stats dc(Logon_Account) AS unique_accounts values(Logon_Account) as tried_accounts by _time, Source_Workstation 
| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by Source_Workstation 
| eval upperBound=(comp_avg+comp_std*3) 
| eval isOutlier=if(unique_accounts &gt; 10 and unique_accounts &gt;= upperBound, 1, 0) 
| search isOutlier=1 
| `multiple_users_failing_to_authenticate_from_host_using_ntlm_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Password_Spraying|Active Directory Password Spraying]]


====How To Implement====
To successfully implement this search, you need to be ingesting Domain Controller events. The Advanced Security Audit policy setting `Audit Credential Validation` within `Account Logon` needs to be enabled.

====Required field====

* _time

* EventCode

* action

* Logon_Account

* Source_Workstation



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1110.003
| Password Spraying
| Credential Access
|-
| T1110
| Brute Force
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
A host failing to authenticate with multiple valid domain users is not a common behavior for legitimate systems. Possible false positive scenarios include but are not limited to vulnerability scanners and missconfigured systems. If this detection triggers on a host other than a Domain Controller, the behavior could represent a password spraying attack against the host&#39;s local accounts.

====Reference====


* https://attack.mitre.org/techniques/T1110/003/

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-credential-validation

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4776



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110.003/purplesharp_valid_users_ntlm/windows-security.log


''version'': 1
</div>
</div>

----

===Multiple users failing to authenticate from process===
The following analytic identifies a source process name failing to authenticate with multiple users. This behavior could represent an adversary performing a Password Spraying attack against an Active Directory environment to obtain initial access or elevate privileges. Event 4625 generates on domain controllers, member servers, and workstations when an account fails to logon. Logon Type 2 describes an iteractive logon attempt.\
The detection calculates the standard deviation for each host and leverages the 3-sigma statistical rule to identify an unusual number of users. To customize this analytic, users can try different combinations of the `bucket` span time and the calculation of the `upperBound` field. This logic can be used for real time security monitoring as well as threat hunting exercises.\
This detection will trigger on the potenfially malicious host, perhaps controlled via a trojan or operated by an insider threat, from where a password spraying attack is being executed. This could be a domain controller as well as a member server or workstation.\
The analytics returned fields allow analysts to investigate the event further by providing fields like source process name, source account and attempted user accounts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1110/003/ T1110.003], [https://attack.mitre.org/techniques/T1110/ T1110]
* '''Last Updated''': 2021-04-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> `wineventlog_security` EventCode=4625 Logon_Type=2 Caller_Process_Name!=&#34;-&#34; 
| bucket span=2m _time 
| eval Source_Account = mvindex(Account_Name, 0) 
| eval Destination_Account = mvindex(Account_Name, 1) 
| stats dc(Destination_Account) AS unique_accounts values(Account_Name) as tried_accounts by _time, Caller_Process_Name, Source_Account, ComputerName 
| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by Caller_Process_Name, Source_Account, ComputerName 
| eval upperBound=(comp_avg+comp_std*3) 
| eval isOutlier=if(unique_accounts &gt; 10 and unique_accounts &gt;= upperBound, 1, 0) 
| search isOutlier=1 
| `multiple_users_failing_to_authenticate_from_process_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Password_Spraying|Active Directory Password Spraying]]


====How To Implement====
To successfully implement this search, you need to be ingesting Windows Event Logs from domain controllers aas well as member servers and workstations. The Advanced Security Audit policy setting `Audit Logon` within `Logon/Logoff` needs to be enabled.

====Required field====

* _time

* EventCode

* Logon_Type

* Caller_Process_Name

* Security_ID

* Account_Name

* ComputerName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1110.003
| Password Spraying
| Credential Access
|-
| T1110
| Brute Force
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
A process failing to authenticate with multiple users is not a common behavior for legitimate user sessions. Possible false positive scenarios include but are not limited to vulnerability scanners and missconfigured systems.

====Reference====


* https://attack.mitre.org/techniques/T1110/003/

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4625

* https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4625

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/basic-audit-logon-events



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110.003/purplesharp_multiple_users_from_process/windows-security.log


''version'': 1
</div>
</div>

----

===Multiple users remotely failing to authenticate from host===
The following analytic identifies a source host failing to authenticate against a remote host with multiple users. This behavior could represent an adversary performing a Password Spraying attack against an Active Directory environment to obtain initial access or elevate privileges. Event 4625 documents each and every failed attempt to logon to the local computer. This event generates on domain controllers, member servers, and workstations. Logon Type 3 describes an remote authentication attempt.\
The detection calculates the standard deviation for each host and leverages the 3-sigma statistical rule to identify an unusual number of users. To customize this analytic, users can try different combinations of the `bucket` span time and the calculation of the `upperBound` field. This logic can be used for real time security monitoring as well as threat hunting exercises.\
This detection will trigger on the host that is the target of the password spraying attack. This could be a domain controller as well as a member server or workstation.\
The analytics returned fields allow analysts to investigate the event further by providing fields like source process name, source account and attempted user accounts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1110/003/ T1110.003], [https://attack.mitre.org/techniques/T1110/ T1110]
* '''Last Updated''': 2021-04-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> `wineventlog_security` EventCode=4625 Logon_Type=3 Source_Network_Address!=&#34;-&#34; 
| bucket span=2m _time 
| eval Destination_Account = mvindex(Account_Name, 1) 
| stats dc(Destination_Account) AS unique_accounts values(Destination_Account) as tried_accounts by _time, Source_Network_Address, ComputerName 
| eventstats avg(unique_accounts) as comp_avg , stdev(unique_accounts) as comp_std by Source_Network_Address, ComputerName 
| eval upperBound=(comp_avg+comp_std*3) 
| eval isOutlier=if(unique_accounts &gt; 10 and unique_accounts &gt;= upperBound, 1, 0) 
| search isOutlier=1 
| `multiple_users_remotely_failing_to_authenticate_from_host_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Password_Spraying|Active Directory Password Spraying]]


====How To Implement====
To successfully implement this search, you need to be ingesting Windows Event Logs from domain controllers as as well as member servers and workstations. The Advanced Security Audit policy setting `Audit Logon` within `Logon/Logoff` needs to be enabled.

====Required field====

* _time

* EventCode

* Logon_Type

* Security_ID

* Account_Name

* ComputerName

* Source_Network_Address



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1110.003
| Password Spraying
| Credential Access
|-
| T1110
| Brute Force
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
A host failing to authenticate with multiple valid users against a remote host is not a common behavior for legitimate systems. Possible false positive scenarios include but are not limited to vulnerability scanners, remote administration tools, missconfigyred systems, etc.

====Reference====


* https://attack.mitre.org/techniques/T1110/003/

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4625

* https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4625

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/basic-audit-logon-events



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1110.003/purplesharp_remote_spray/windows-security.log


''version'': 1
</div>
</div>

----

===Net profiler uac bypass===
This search is to detect modification of registry to bypass UAC windows feature. This technique is to add a payload dll path on .NET COR file path that will be loaded by mmc.exe as soon it was executed. This detection rely on monitoring the registry key and values in the detection area. It may happened that windows update some dll related to mmc.exe and add dll path in this registry. In this case filtering is needed.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/002/ T1548.002], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-07-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\Environment\\COR_PROFILER_PATH&#34; Registry.registry_value_name = &#34;*.dll&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `net_profiler_uac_bypass_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548.002
| Bypass User Account Control
| Privilege Escalation, Defense Evasion
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
limited false positive. It may trigger by some windows update that will modify this registry.

====Reference====


* https://offsec.almond.consulting/UAC-bypass-dotnet.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548/uac_bypass/windows-sysmon2.log


''version'': 1
</div>
</div>

----

===Nltest domain trust discovery===
This search looks for the execution of `nltest.exe` with command-line arguments utilized to query for Domain Trust information. Two arguments `/domain trusts`, returns a list of trusted domains, and `/all_trusts`, returns all trusted domains. Red Teams and adversaries alike use NLTest.exe to enumerate the current domain to assist with further understanding where to pivot next.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1482/ T1482]
* '''Last Updated''': 2021-01-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=nltest.exe OR Processes.process_name!=nltest.exe) (Processes.process=*/domain_trusts* OR Processes.process=*/all_trusts*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `nltest_domain_trust_discovery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Domain_Trust_Discovery|Domain Trust Discovery]]

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1482
| Domain Trust Discovery
| Discovery
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Administrators may use nltest for troubleshooting purposes, otherwise, rarely used.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1482/T1482.md

* https://malware.news/t/lets-learn-trickbot-implements-network-collector-module-leveraging-cmd-wmi-ldap/19104

* https://attack.mitre.org/techniques/T1482/

* https://www.owasp.org/images/4/4b/Red_Team_Operating_in_a_Modern_Environment.pdf

* https://ss64.com/nt/nltest.html

* https://redcanary.com/threat-detection-report/techniques/domain-trust-discovery/

* https://thedfirreport.com/2020/10/08/ryuks-return/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1482/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Net localgroup discovery===
The following hunting analytic will identify the use of localgroup discovery using `net localgroup`. During triage, review parallel processes and identify any further suspicious behavior.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/001/ T1069.001]
* '''Last Updated''': 2021-09-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=net.exe OR Processes.process_name=net1.exe (Processes.process=&#34;*localgroup*&#34;) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.original_file_name Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `net_localgroup_discovery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.001
| Local Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
False positives may be present. Tune as needed.

====Reference====


* https://attack.mitre.org/techniques/T1069/001/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.001/T1069.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.001/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Network connection discovery with arp===
This analytic looks for the execution of `arp.exe` utilized to get a listing of network connections on a compromised system. Red Teams and adversaries alike may use arp.exe for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1049/ T1049]
* '''Last Updated''': 2021-09-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;arp.exe&#34;) (Processes.process=*-a*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `network_connection_discovery_with_arp_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1049
| System Network Connections Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1049/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1049/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Network connection discovery with net===
This analytic looks for the execution of `net.exe` with command-line arguments utilized to get a listing of network connections on a compromised system. Red Teams and adversaries alike may use net.exe for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1049/ T1049]
* '''Last Updated''': 2021-09-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;net.exe&#34; OR Processes.process_name=&#34;net1.exe&#34;) (Processes.process=*use*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `network_connection_discovery_with_net_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1049
| System Network Connections Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1049/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1049/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Network connection discovery with netstat===
This analytic looks for the execution of `netstat.exe` with command-line arguments utilized to get a listing of network connections on a compromised system. Red Teams and adversaries alike may use netstat.exe for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1049/ T1049]
* '''Last Updated''': 2021-09-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;netstat.exe&#34;) (Processes.process=*-a*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `network_connection_discovery_with_netstat_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1049
| System Network Connections Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1049/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1049/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Nishang powershelltcponeline===
This query detects the Nishang Invoke-PowerShellTCPOneLine utility that spawns a call back to a remote command and control server. This is a powershell oneliner. In addition, this will capture on the command-line additional utilities used by Nishang. Triage the endpoint and identify any parallel processes that look suspicious. Review the reputation of the remote IP or domain contacted by the powershell process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-03-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_powershell` (Processes.process=*Net.Sockets.TCPClient* AND Processes.process=*System.Text.ASCIIEncoding*) by Processes.dest Processes.user Processes.parent_process Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `nishang_powershelltcponeline_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives may be present. Filter as needed based on initial analysis.

====Reference====


* https://github.com/samratashok/nishang/blob/master/Shells/Invoke-PowerShellTcpOneLine.ps1

* https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities/

* https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/

* https://blog.rapid7.com/2021/03/03/rapid7s-insightidr-enables-detection-and-response-to-microsoft-exchange-0-day/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Non chrome process accessing chrome default dir===
This search is to detect an anomaly event of non-chrome process accessing the files in chrome user default folder. This folder contains all the sqlite database of the chrome browser related to users login, history, cookies and etc. Most of the RAT, trojan spy as well as FIN7 jssloader try to parse the those sqlite database to collect information on the compromised host. This SACL Event (4663) need to be enabled to tthe firefox profile directory to be eable to use this. Since you monitoring this access to the folder a noise coming from firefox need to be filter and also sqlite db browser and explorer .exe to make this detection more stable.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1555/ T1555], [https://attack.mitre.org/techniques/T1555/003/ T1555.003]
* '''Last Updated''': 2021-09-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4663 NOT (process_name IN (&#34;*\\chrome.exe&#34;, &#34;*\\explorer.exe&#34;, &#34;*sql*&#34;)) Object_Name=&#34;*\\Google\\Chrome\\User Data\\Default*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by Object_Name Object_Type process_name Access_Mask Accesses process_id EventCode dest user 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `non_chrome_process_accessing_chrome_default_dir_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]


====How To Implement====
To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663. For 4663, enable &#34;Audit Object Access&#34; in Group Policy. Then check the two boxes listed for both &#34;Success&#34; and &#34;Failure.&#34;

====Required field====

* _time

* Object_Name

* Object_Type

* process_name

* Access_Mask

* Accesses

* process_id

* EventCode

* dest

* user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1555
| Credentials from Password Stores
| Credential Access
|-
| T1555.003
| Credentials from Web Browsers
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
other browser not listed related to firefox may catch by this rule.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/fin7/fin7_sacl/security2.log


''version'': 1
</div>
</div>

----

===Non firefox process access firefox profile dir===
This search is to detect an anomaly event of non-firefox process accessing the files in  profile folder. This folder contains all the sqlite database of the firefox browser related to users login, history, cookies and etc. Most of the RAT, trojan spy as well as FIN7 jssloader try to parse the those sqlite database to collect information on the compromised host. This SACL Event (4663) need to be enabled to tthe firefox profile directory to be eable to use this. Since you monitoring this access to the folder a noise coming from firefox need to be filter and also sqlite db browser and explorer .exe to make this detection more stable.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1555/ T1555], [https://attack.mitre.org/techniques/T1555/003/ T1555.003]
* '''Last Updated''': 2021-09-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4663 NOT (process_name IN (&#34;*\\firefox.exe&#34;, &#34;*\\explorer.exe&#34;, &#34;*sql*&#34;)) Object_Name=&#34;*\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by Object_Name Object_Type process_name Access_Mask Accesses process_id EventCode dest user 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `non_firefox_process_access_firefox_profile_dir_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]


====How To Implement====
To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663. For 4663, enable &#34;Audit Object Access&#34; in Group Policy. Then check the two boxes listed for both &#34;Success&#34; and &#34;Failure.&#34;

====Required field====

* _time

* Object_Name

* Object_Type

* process_name

* Access_Mask

* Accesses

* process_id

* EventCode

* dest

* user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1555
| Credentials from Password Stores
| Credential Access
|-
| T1555.003
| Credentials from Web Browsers
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
other browser not listed related to firefox may catch by this rule.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/fin7/fin7_sacl/security.log


''version'': 1
</div>
</div>

----

===Ntdsutil export ntds===
Monitor for signs that Ntdsutil is being used to Extract Active Directory database - NTDS.dit, typically used for offline password cracking. It may be used in normal circumstances with no command line arguments or shorthand variations of more common arguments. Ntdsutil.exe is typically seen run on a Windows Server. Typical command used to dump ntds.dit \
ntdsutil &#34;ac i ntds&#34; &#34;ifm&#34; &#34;create full C:\Temp&#34; q q \
This technique uses &#34;Install from Media&#34; (IFM), which will extract a copy of the Active Directory database. A successful export of the Active Directory database will yield a file modification named ntds.dit to the destination.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/003/ T1003.003], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-01-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=ntdsutil.exe Processes.process=*ntds* Processes.process=*create*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `ntdsutil_export_ntds_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints, to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.003
| NTDS
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Highly possible Server Administrators will troubleshoot with ntdsutil.exe, generating false positives.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.003/T1003.003.md#atomic-test-3---dump-active-directory-database-with-ntdsutil

* https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc753343(v=ws.11)

* https://2017.zeronights.org/wp-content/uploads/materials/ZN17_Kheirkhabarov_Hunting_for_Credentials_Dumping_in_Windows_Environment.pdf

* https://strontic.github.io/xcyclopedia/library/vss_ps.dll-97B15BDAE9777F454C9A6BA25E938DB3.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1003.003/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Office application drop executable===
This search is to detect a suspicious MS office application that drop or create executables or script in the host. This behavior is commonly seen in spear phishing office attachment where it drop malicious files or script to compromised the host. It might be some normal macro may drop script or tools as part of automation but still this behavior is reallly suspicious and not commonly seen in normal office application

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name IN (&#34;winword.exe&#34;,&#34;excel.exe&#34;,&#34;powerpnt.exe&#34;,&#34;mspub.exe&#34;,&#34;visio.exe&#34;,&#34;wordpad.exe&#34;,&#34;wordview.exe&#34;) by _time span=1h Processes.process_id Processes.process_name Processes.process Processes.dest 
| `drop_dm_object_name(Processes)` 
| join process_guid, _time [
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_name IN (&#34;*.exe&#34;,&#34;*.dll&#34;,&#34;*.pif&#34;,&#34;*.scr&#34;,&#34;*.js&#34;,&#34;*.vbs&#34;,&#34;*.vbe&#34;,&#34;*.ps1&#34;) by _time span=1h Filesystem.dest Filesystem.file_create_time Filesystem.file_name Filesystem.file_path 
| `drop_dm_object_name(Filesystem)` 
| fields _time dest file_create_time file_name file_path process_name process_path process] 
| dedup file_create_time 
| table dest, process_name, process, file_create_time, file_name, file_path 
| `office_application_drop_executable_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Image

* TargetFilename

* ProcessGuid

* dest

* user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
office macro for automation may do this behavior

====Reference====


* https://www.fireeye.com/blog/threat-research/2018/08/fin7-pursuing-an-enigmatic-and-evasive-global-criminal-operation.html

* https://attack.mitre.org/groups/G0046/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/fin7/fin7_macro_js_1/sysmon.log


''version'': 1
</div>
</div>

----

===Office application spawn regsvr32 process===
this detection was designed to identifies suspicious spawned process of known MS office application due to macro or malicious code. this technique can be seen in so many malware like IcedID that used MS office as its weapon or attack vector to initially infect the machines.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-07-30

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.parent_process_name = &#34;winword.exe&#34; OR Processes.parent_process_name = &#34;excel.exe&#34; OR Processes.parent_process_name = &#34;powerpnt.exe&#34; OR Processes.parent_process_name = &#34;outlook.exe&#34;) `process_regsvr32` by Processes.parent_process_name Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.process_guid Processes.user Processes.dest 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `office_application_spawn_regsvr32_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.joesandbox.com/analysis/380662/0/html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/phish_icedid/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Office application spawn rundll32 process===
this detection was designed to identifies suspicious spawned process of known MS office application due to macro or malicious code. this technique can be seen in so many malware like trickbot that used MS office as its weapon or attack vector to initially infect the machines.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-04-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.parent_process_name = &#34;winword.exe&#34; OR Processes.parent_process_name = &#34;excel.exe&#34; OR Processes.parent_process_name = &#34;powerpnt.exe&#34;) `process_rundll32`  by Processes.parent_process Processes.process_name Processes.process_id Processes.process_guid Processes.user Processes.dest 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)` 
| `office_application_spawn_rundll32_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://any.run/malware-trends/trickbot

* https://any.run/report/47561b4e949041eff0a0f4693c59c81726591779fe21183ae9185b5eb6a69847/aba3722a-b373-4dae-8273-8730fb40cdbe



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/datasets/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Office document creating schedule task===
this search detects a potential malicious office document that create schedule task entry through macro VBA api or through loading taskschd.dll. This technique was seen in so many malicious macro malware that create persistence , beaconing using task schedule malware entry The search will return the first time and last time the task was registered, as well as the `Command` to be executed, `Task Name`, `Author`, `Enabled`, and whether it is `Hidden` or not. schtasks.exe is natively found in `C:\Windows\system32` and `C:\Windows\syswow64`. The following DLL(s) are loaded when schtasks.exe or TaskService is launched -`taskschd.dll`. If found loaded by another process, it&#39;s possible a scheduled task is being registered within that process context in memory. Upon triage, identify the task scheduled source. Was it schtasks.exe or via TaskService? Review the job created and the Command to be executed. Capture any artifacts on disk and review. Identify any parallel processes within the same timeframe to identify source.&#39;

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-04-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=7 process_name IN (&#34;WINWORD.EXE&#34;, &#34;EXCEL.EXE&#34;, &#34;POWERPNT.EXE&#34;) ImageLoaded = &#34;*\\taskschd.dll&#34; 
| stats min(_time) as firstTime max(_time) as lastTime values(ImageLoaded) as AllImageLoaded count by Computer EventCode Image process_name ProcessId ProcessGuid 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `office_document_creating_schedule_task_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name and ImageLoaded (Like sysmon EventCode 7) from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Also be sure to include those monitored dll to your own sysmon config.

====Required field====

* ImageLoaded

* AllImageLoaded

* Computer

* EventCode

* Image

* process_name

* ProcessId

* ProcessGuid

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://research.checkpoint.com/2021/irans-apt34-returns-with-an-updated-arsenal/

* https://redcanary.com/threat-detection-report/techniques/scheduled-task-job/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/datasets/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Office document executing macro code===
this detection was designed to identifies suspicious office documents that using macro code. Macro code is known to be one of the prevalent weaponization or attack vector of threat actor. This malicious macro code is embed to a office document as an attachment that may execute malicious payload, download malware payload or other malware component. It is really good practice to disable macro by default to avoid automatically execute macro code while opening or closing a office document files.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-04-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=7 process_name IN (&#34;WINWORD.EXE&#34;, &#34;EXCEL.EXE&#34;, &#34;POWERPNT.EXE&#34;) ImageLoaded IN (&#34;*\\VBE7INTL.DLL&#34;,&#34;*\\VBE7.DLL&#34;, &#34;*\\VBEUI.DLL&#34;) 
| stats min(_time) as firstTime max(_time) as lastTime values(ImageLoaded) as AllImageLoaded count by Computer EventCode Image process_name ProcessId ProcessGuid 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `office_document_executing_macro_code_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name and ImageLoaded (Like sysmon EventCode 7) from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Also be sure to include those monitored dll to your own sysmon config.

====Required field====

* ImageLoaded

* AllImageLoaded

* Computer

* EventCode

* Image

* process_name

* ProcessId

* ProcessGuid

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Normal Office Document macro use for automation

====Reference====


* https://www.joesandbox.com/analysis/386500/0/html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/datasets/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Office document spawned child process to download===
This search is to detect potential malicious office document executing lolbin child process to download payload or other malware. Since most of the attacker abused the capability of office document to execute living on land application to blend it to the normal noise in the infected machine to cover its track.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-09-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN (&#34;winword.exe&#34;,&#34;excel.exe&#34;,&#34;powerpnt.exe&#34;,&#34;mspub.exe&#34;,&#34;visio.exe&#34;) Processes.process IN (&#34;*http:*&#34;,&#34;*https:*&#34;) NOT (Processes.original_file_name IN(&#34;firefox.exe&#34;, &#34;chrome.exe&#34;,&#34;iexplore.exe&#34;,&#34;msedge.exe&#34;))  by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `office_document_spawned_child_process_to_download_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances office application and browser may be used.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Default browser not in the filter list.

====Reference====


* https://app.any.run/tasks/92d7ef61-bfd7-4c92-bc15-322172b4ebec/#



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/datasets2/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Office product spawn cmd process===
this search is to detect a suspicious office product process that spawn cmd child process. This is commonly seen in a ms office product having macro to execute shell command to download or execute malicious lolbin relative to its malicious code. This is seen in trickbot spear phishing doc where it execute shell cmd to run mshta payload.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/005/ T1218.005]
* '''Last Updated''': 2021-07-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.parent_process_name = &#34;winword.exe&#34; OR Processes.parent_process_name= &#34;excel.exe&#34; OR Processes.parent_process_name = &#34;powerpnt.exe&#34;) `process_cmd` by Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.process_guid Processes.user Processes.dest Processes.original_file_name 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `office_product_spawn_cmd_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.005
| Mshta
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
IT or network admin may create an document automation that will run shell script.

====Reference====


* https://twitter.com/cyb3rops/status/1416050325870587910?s=21



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/trickbot/spear_phish/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Office product spawning bitsadmin===
The following detection identifies the latest behavior utilized by different malware families (including TA551, IcedID). This detection identifies any Windows Office Product spawning `bitsadmin.exe`. In malicious instances, the command-line of `bitsadmin.exe` will contain a URL to a remote destination or similar command-line arguments as transfer, Download, priority, Foreground. In addition, Threat Research has released a detections identifying suspicious use of `bitsadmin.exe`. In this instance, we narrow our detection down to the Office suite as a parent process. During triage, review all file modifications. Capture and analyze any artifacts on disk. The Office Product, or `bitsadmin.exe` will have reached out to a remote destination, capture and block the IPs or domain. Review additional parallel processes for further activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-04-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN (&#34;winword.exe&#34;,&#34;excel.exe&#34;,&#34;powerpnt.exe&#34;,&#34;mspub.exe&#34;,&#34;visio.exe&#34;) `process_bitsadmin` by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `office_product_spawning_bitsadmin_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
No false positives known. Filter as needed.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1197/T1197.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon_macros.log


''version'': 2
</div>
</div>

----

===Office product spawning certutil===
The following detection identifies the latest behavior utilized by different malware families (including TA551, IcedID). This detection identifies any Windows Office Product spawning `certutil.exe`. In malicious instances, the command-line of `certutil.exe` will contain a URL to a remote destination. In addition, Threat Research has released a detections identifying suspicious use of `certutil.exe`. In this instance, we narrow our detection down to the Office suite as a parent process. During triage, review all file modifications. Capture and analyze any artifacts on disk. The Office Product, or `certutil.exe` will have reached out to a remote destination, capture and block the IPs or domain. Review additional parallel processes for further activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-04-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN (&#34;winword.exe&#34;,&#34;excel.exe&#34;,&#34;powerpnt.exe&#34;,&#34;mspub.exe&#34;,&#34;visio.exe&#34;) `process_certutil` by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `office_product_spawning_certutil_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
No false positives known. Filter as needed.

====Reference====


* https://redcanary.com/threat-detection-report/threats/TA551/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1105/T1105.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon_macros.log


''version'': 2
</div>
</div>

----

===Office product spawning mshta===
The following detection identifies the latest behavior utilized by different malware families (including TA551, IcedID). This detection identifies any Windows Office Product spawning `mshta.exe`. In malicious instances, the command-line of `mshta.exe` will contain the `hta` file locally, or a URL to the remote destination. In addition, Threat Research has released a detections identifying suspicious use of `mshta.exe`. In this instance, we narrow our detection down to the Office suite as a parent process. During triage, review all file modifications. Capture and analyze any artifacts on disk. The Office Product, or `mshta.exe` will have reached out to a remote destination, capture and block the IPs or domain. Review additional parallel processes for further activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-04-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN (&#34;winword.exe&#34;,&#34;excel.exe&#34;,&#34;powerpnt.exe&#34;,&#34;mspub.exe&#34;,&#34;visio.exe&#34;) `process_mshta` by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `office_product_spawning_mshta_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
No false positives known. Filter as needed.

====Reference====


* https://redcanary.com/threat-detection-report/threats/TA551/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon_macros.log


''version'': 2
</div>
</div>

----

===Office product spawning rundll32 with no dll===
The following detection identifies the latest behavior utilized by IcedID malware family. This detection identifies any Windows Office Product spawning `rundll32.exe` without a `.dll` file extension. In malicious instances, the command-line of `rundll32.exe` will look like `rundll32 ..\oepddl.igk2,DllRegisterServer`. In addition, Threat Research has released a detection identifying the use of `DllRegisterServer` on the command-line of `rundll32.exe`. In this instance, we narrow our detection down to the Office suite as a parent process. During triage, review all file modifications. Capture and analyze the `DLL` that was dropped to disk. The Office Product will have reached out to a remote destination, capture and block the IPs or domain. Review additional parallel processes for further activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-04-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN (&#34;winword.exe&#34;,&#34;excel.exe&#34;,&#34;powerpnt.exe&#34;,&#34;mspub.exe&#34;,&#34;visio.exe&#34;) `process_rundll32` (Processes.process!=*.dll*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `office_product_spawning_rundll32_with_no_dll_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited, but if any are present, filter as needed.

====Reference====


* https://www.joesandbox.com/analysis/395471/0/html

* https://app.any.run/tasks/cef4b8ba-023c-4b3b-b2ef-6486a44f6ed9/

* https://any.run/malware-trends/icedid



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon_icedid.log


''version'': 2
</div>
</div>

----

===Office product spawning wmic===
The following detection identifies the latest behavior utilized by Ursnif malware family. This detection identifies any Windows Office Product spawning `wmic.exe`. In malicious instances, the command-line of `wmic.exe` will contain `wmic process call create`. In addition, Threat Research has released a detection identifying the use of `wmic process call create` on the command-line of `wmic.exe`. In this instance, we narrow our detection down to the Office suite as a parent process. During triage, review all file modifications. Capture and analyze any artifacts on disk. The Office Product, or `wmic.exe` will have reached out to a remote destination, capture and block the IPs or domain. Review additional parallel processes for further activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN (&#34;winword.exe&#34;,&#34;excel.exe&#34;,&#34;powerpnt.exe&#34;,&#34;mspub.exe&#34;,&#34;visio.exe&#34;) `process_wmic` by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `office_product_spawning_wmic_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
No false positives known. Filter as needed.

====Reference====


* https://app.any.run/tasks/fb894ab8-a966-4b72-920b-935f41756afd/

* https://attack.mitre.org/techniques/T1047/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1047/T1047.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon_macros.log


''version'': 3
</div>
</div>

----

===Office product writing cab or inf===
The following analytic identifies behavior related to CVE-2021-40444. Whereas the malicious document will load ActiveX and download the remote payload (.inf, .cab). During triage, review parallel processes and further activity on endpoint to identify additional patterns. Retrieve the file modifications and analyze further.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-09-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name IN (&#34;winword.exe&#34;,&#34;excel.exe&#34;,&#34;powerpnt.exe&#34;,&#34;mspub.exe&#34;,&#34;visio.exe&#34;,&#34;wordpad.exe&#34;,&#34;wordview.exe&#34;) by _time span=1h Processes.process_id Processes.process_name Processes.process Processes.dest 
| `drop_dm_object_name(Processes)` 
| join process_guid, _time [
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_name IN (&#34;*.inf&#34;,&#34;*.cab&#34;) by _time span=1h Filesystem.dest Filesystem.file_create_time Filesystem.file_name Filesystem.file_path 
| `drop_dm_object_name(Filesystem)` 
| fields _time dest file_create_time file_name file_path process_name process_path process] 
| dedup file_create_time 
| table dest, process_name, process, file_create_time, file_name, file_path 
| `office_product_writing_cab_or_inf_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]

* [[Documentation:ESSOC:stories:UseCase#Microsoft_MSHTML_Remote_Code_Execution_CVE-2021-40444|Microsoft MSHTML Remote Code Execution CVE-2021-40444]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node and `Filesystem` node.

====Required field====

* _time

* dest

* process_name

* process

* file_create_time

* file_name

* file_path



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
The query is structured in a way that `action` (read, create) is not defined. Review the results of this query, filter, and tune as necessary. It may be necessary to generate this query specific to your endpoint product.

====Reference====


* https://twitter.com/vxunderground/status/1436326057179860992?s=20

* https://app.any.run/tasks/36c14029-9df8-439c-bba0-45f2643b0c70/

* https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444

* https://twitter.com/RonnyTNL/status/1436334640617373699?s=20



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon_cabinf.log


''version'': 1
</div>
</div>

----

===Office spawning control===
The following detection identifies control.exe spawning from an office product. This detection identifies any Windows Office Product spawning `control.exe`. In malicious instances, the command-line of `control.exe` will contain a file path to a .cpl or .inf, related to CVE-2021-40444. In this instance, we narrow our detection down to the Office suite as a parent process. During triage, review all file modifications. Capture and analyze any artifacts on disk. review parallel and child processes to identify further suspicious behavior

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-09-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN (&#34;winword.exe&#34;,&#34;excel.exe&#34;,&#34;powerpnt.exe&#34;,&#34;mspub.exe&#34;,&#34;visio.exe&#34;,&#34;wordpad.exe&#34;,&#34;wordview.exe&#34;) Processes.process_name=control.exe by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `office_spawning_control_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]

* [[Documentation:ESSOC:stories:UseCase#Microsoft_MSHTML_Remote_Code_Execution_CVE-2021-40444|Microsoft MSHTML Remote Code Execution CVE-2021-40444]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives should be present.

====Reference====


* https://strontic.github.io/xcyclopedia/library/control.exe-1F13E714A0FEA8887707DFF49287996F.html

* https://app.any.run/tasks/36c14029-9df8-439c-bba0-45f2643b0c70/

* https://attack.mitre.org/techniques/T1218/011/

* https://www.echotrail.io/insights/search/control.exe

* https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.002/T1218.002.yaml



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon_control.log


''version'': 1
</div>
</div>

----

===Overwriting accessibility binaries===
Microsoft Windows contains accessibility features that can be launched with a key combination before a user has logged in. An adversary can modify or replace these programs so they can get a command prompt or backdoor without logging in to the system. This search looks for modifications to these binaries.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1546/ T1546], [https://attack.mitre.org/techniques/T1546/008/ T1546.008]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Filesystem.user) as user values(Filesystem.dest) as dest values(Filesystem.file_path) as file_path from datamodel=Endpoint.Filesystem where (Filesystem.file_path=*\\Windows\\System32\\sethc.exe* OR Filesystem.file_path=*\\Windows\\System32\\utilman.exe* OR Filesystem.file_path=*\\Windows\\System32\\osk.exe* OR Filesystem.file_path=*\\Windows\\System32\\Magnify.exe* OR Filesystem.file_path=*\\Windows\\System32\\Narrator.exe* OR Filesystem.file_path=*\\Windows\\System32\\DisplaySwitch.exe* OR Filesystem.file_path=*\\Windows\\System32\\AtBroker.exe*) by Filesystem.file_name Filesystem.dest 
| `drop_dm_object_name(Filesystem)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `overwriting_accessibility_binaries_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]


====How To Implement====
You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint file-system data model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data.

====Required field====

* _time

* Filesystem.dest

* Filesystem.file_path

* Filesystem.file_name

* Filesystem.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1546
| Event Triggered Execution
| Privilege Escalation, Persistence
|-
| T1546.008
| Accessibility Features
| Privilege Escalation, Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Microsoft may provide updates to these binaries. Verify that these changes do not correspond with your normal software update cycle.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.008/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Password policy discovery with net===
This analytic looks for the execution of `net.exe` or `net1.exe` with command line arguments used to obtain the domain password policy. Red Teams and adversaries may leverage `net.exe` for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1201/ T1201]
* '''Last Updated''': 2021-08-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;net.exe&#34; OR Processes.process_name=&#34;net1.exe&#34;) AND Processes.process = &#34;*accounts*&#34; AND Processes.process = &#34;*/domain*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `password_policy_discovery_with_net_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id

* Processes.parent_process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1201
| Password Policy Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1201/pwd_policy_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Permission modification using takeown app===
This search is to detect a modification of file or directory permission using takeown.exe windows app. This technique was seen in some ransomware that take the ownership of a folder or files to encrypt or delete it.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1222/ T1222]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = &#34;takeown.exe&#34; Processes.process = &#34;*/f*&#34; by Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process Processes.dest Processes.user Processes.process_id Processes.process_guid 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `permission_modification_using_takeown_app_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.parent_process_name

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user

* Processes.process_id

* Processes.process_guid



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1222
| File and Directory Permissions Modification
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
takeown.exe is a normal windows application that may used by network operator.

====Reference====


* https://research.nccgroup.com/2020/06/23/wastedlocker-a-new-ransomware-variant-developed-by-the-evil-corp-group/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Petitpotam network share access request===
The following analytic utilizes Windows Event Code 5145, &#34;A network share object was checked to see whether client can be granted desired access&#34;. During our research into PetitPotam, CVE-2021-36942, we identified the ocurrence of this event on the target host with specific values. \
To enable 5145 events via Group Policy - Computer Configuration-&gt;Polices-&gt;Windows Settings-&gt;Security Settings-&gt;Advanced Audit Policy Configuration. Expand this node, go to Object Access (Audit Polices-&gt;Object Access), then select the Setting Audit Detailed File Share Audit \
It is possible this is not enabled by default and may need to be reviewed and enabled. \
During triage, review parallel security events to identify further suspicious activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1187/ T1187]
* '''Last Updated''': 2021-08-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` Account_Name=&#34;ANONYMOUS LOGON&#34; EventCode=5145 Relative_Target_Name=lsarpc 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, Security_ID, Share_Name, Source_Address, Accesses, Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `petitpotam_network_share_access_request_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#PetitPotam_NTLM_Relay_on_Active_Directory_Certificate_Services|PetitPotam NTLM Relay on Active Directory Certificate Services]]


====How To Implement====
Windows Event Code 5145 is required to utilize this analytic and it may not be enabled in most environments.

====Required field====

* _time

* dest

* Security_ID

* Share_Name

* Source_Address

* Accesses

* Message



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1187
| Forced Authentication
| Credential Access
|}


====Kill Chain Phase====

* Exploitation

* Lateral Movement


====Known False Positives====
False positives have been limited when the Anonymous Logon is used for Account Name.

====Reference====


* https://attack.mitre.org/techniques/T1187/

* https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=5145

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5145



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1187/petitpotam/windows-security.log


''version'': 1
</div>
</div>

----

===Petitpotam suspicious kerberos tgt request===
The following analytic identifes Event Code 4768, A `Kerberos authentication ticket (TGT) was requested`, successfull occurs. This behavior has been identified to assist with detecting PetitPotam, CVE-2021-36942. Once an attacer obtains a computer certificate by abusing Active Directory Certificate Services in combination with PetitPotam, the next step would be to leverage the certificate for malicious purposes. One way of doing this is to request a Kerberos Ticket Granting Ticket using a tool like Rubeus. This request will generate a 4768 event with some unusual fields depending on the environment. This analytic will require tuning, we recommend filtering Account_Name to Domain Controllers for your environment.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-08-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4768 Client_Address!=&#34;::1&#34; Certificate_Thumbprint!=&#34;&#34; Account_Name=*$ 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, Account_Name, Client_Address, action, Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `petitpotam_suspicious_kerberos_tgt_request_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#PetitPotam_NTLM_Relay_on_Active_Directory_Certificate_Services|PetitPotam NTLM Relay on Active Directory Certificate Services]]


====How To Implement====
The following analytic requires Event Code 4768. Ensure that it is logging no Domain Controllers and appearing in Splunk.

====Required field====

* _time

* dest

* Account_Name

* Client_Address

* action

* Message



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Exploitation

* Lateral Movement


====Known False Positives====
False positives are possible if the environment is using certificates for authentication.

====Reference====


* https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=4768

* https://isc.sans.edu/forums/diary/Active+Directory+Certificate+Services+ADCS+PKI+domain+admin+vulnerability/27668/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1187/petitpotam/windows-security.log


''version'': 1
</div>
</div>

----

===Potential pass the token or hash observed at the destination device===
This detection identifies potential Pass the Token or Pass the Hash credential exploits. We detect the main side effect of these attacks, which is a transition from the dominant Kerberos logins to rare NTLM logins for a given user, as reported by a detination device.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1550/ T1550], [https://attack.mitre.org/techniques/T1550/002/ T1550.002]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=      parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), dest_user=      lower(ucast(map_get(input_event, &#34;dest_user_primary_artifact&#34;), &#34;string&#34;, null)), dest_user_id=   lower(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null)), dest_device_id=       lower(ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), signature_id=   lower(ucast(map_get(input_event, &#34;signature_id&#34;), &#34;string&#34;, null)), authentication_method=  lower(ucast(map_get(input_event, &#34;authentication_method&#34;), &#34;string&#34;, null))

| where signature_id = &#34;4624&#34; AND (authentication_method=&#34;ntlmssp&#34; OR authentication_method=&#34;kerberos&#34;) AND dest_user_id != null AND dest_device_id != null

| eval isKerberos=if(authentication_method == &#34;kerberos&#34;, 1, 0), isNtlm=if(authentication_method == &#34;ntlmssp&#34;, 1, 0), timeNTLM=if(isNtlm &gt; 0, timestamp, null)

| stats sum(isKerberos) as totalKerberos, sum(isNtlm)     as totalNtlm, min(timestamp)  as startTime, min(timeNTLM)   as startNTLMTime, max(timestamp)  as endTime, max(timeNTLM)   as endNTLMTime by dest_user_id, dest_user, dest_device_id, span(timestamp, 86400s)

| where NOT dest_user=&#34;-&#34; AND totalKerberos &gt; 0 AND totalNtlm &gt; 0 AND endTime - startTime &gt; 1800000 AND (totalKerberos &gt; 10 * totalNtlm AND totalKerberos &gt; 50)  AND (endTime - startTime) &gt; 3 * (endNTLMTime - startNTLMTime)

| eval start_time=ucast(startNTLMTime, &#34;long&#34;, null), end_time=ucast(endNTLMTime, &#34;long&#34;, null), entities=mvappend(dest_user_id, dest_device_id), body=create_map([&#34;total_kerberos&#34;, totalKerberos, &#34;total_ntlm&#34;, totalNtlm, &#34;analysis_start_time&#34;, startTime, &#34;analysis_end_time&#34;, endTime, &#34;pth_start_time&#34;, startNTLMTime, &#34;pth_end_time&#34;, endNTLMTime])

| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]


====How To Implement====
You must be ingesting Windows Security logs from endpoint devices, i.e., destinations of interest. Please make sure that event ID 4624 is being logged.

====Required field====

* _time

* signature_id

* dest_user

* dest_user_id

* dest_device_id

* authentication_method



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1550
| Use Alternate Authentication Material
| Defense Evasion, Lateral Movement
|-
| T1550.002
| Pass the Hash
| Defense Evasion, Lateral Movement
|}


====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
Environments in which NTLM is used extremely rarely and for benign purposes (such as a rare use of SMB shares).

====Reference====


* https://attack.mitre.org/techniques/T1550/002/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Potential pass the token or hash observed by an event collecting device===
This detection identifies potential Pass the Token or Pass the Hash credential exploits. We detect the main side effect of these attacks, which is a transition from the dominant Kerberos logins to rare NTLM logins for a given user, as reported by an event-collecting device (i.e., a specific domain controller or an endpoint destination).

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1550/ T1550], [https://attack.mitre.org/techniques/T1550/002/ T1550.002]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=      parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), dest_user=      lower(ucast(map_get(input_event, &#34;dest_user_primary_artifact&#34;), &#34;string&#34;, null)), dest_user_id=   lower(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null)), origin_device_id=       lower(ucast(map_get(input_event, &#34;origin_device_id&#34;), &#34;string&#34;, null)), signature_id=   lower(ucast(map_get(input_event, &#34;signature_id&#34;), &#34;string&#34;, null)), authentication_method=  lower(ucast(map_get(input_event, &#34;authentication_method&#34;), &#34;string&#34;, null))

| where signature_id = &#34;4624&#34; AND (authentication_method=&#34;ntlmssp&#34; OR authentication_method=&#34;kerberos&#34;) AND dest_user_id != null AND origin_device_id != null

| eval isKerberos=if(authentication_method == &#34;kerberos&#34;, 1, 0), isNtlm=if(authentication_method == &#34;ntlmssp&#34;, 1, 0), timeNTLM=if(isNtlm &gt; 0, timestamp, null)

| stats sum(isKerberos) as totalKerberos, sum(isNtlm)     as totalNtlm, min(timestamp)  as startTime, min(timeNTLM)   as startNTLMTime, max(timestamp)  as endTime, max(timeNTLM)   as endNTLMTime by dest_user_id, dest_user, origin_device_id, span(timestamp, 86400s)

| where NOT dest_user=&#34;-&#34; AND totalKerberos &gt; 0 AND totalNtlm &gt; 0 AND endTime - startTime &gt; 1800000 AND (totalKerberos &gt; 10 * totalNtlm AND totalKerberos &gt; 50)  AND (endTime - startTime) &gt; 3 * (endNTLMTime - startNTLMTime)

| eval start_time=startNTLMTime, end_time=endNTLMTime, entities=mvappend(dest_user_id, origin_device_id), body=create_map([&#34;total_kerberos&#34;, totalKerberos, &#34;total_ntlm&#34;, totalNtlm, &#34;analysis_start_time&#34;, startTime, &#34;analysis_end_time&#34;, endTime, &#34;detection_start_time&#34;, startNTLMTime, &#34;detection_end_time&#34;, endNTLMTime])

| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest - at least from domain controllers. Please make sure that event ID 4624 is being logged.

====Required field====

* _time

* signature_id

* dest_user

* dest_user_id

* origin_device_id

* authentication_method



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1550
| Use Alternate Authentication Material
| Defense Evasion, Lateral Movement
|-
| T1550.002
| Pass the Hash
| Defense Evasion, Lateral Movement
|}


====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
Environments in which NTLM is used extremely rarely and for benign purposes (such as a rare use of SMB shares).

====Reference====


* https://attack.mitre.org/techniques/T1550/002/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Powershell 4104 hunting===
The following Hunting analytic assists with identifying suspicious PowerShell execution using Script Block Logging, or EventCode 4104. This analytic is not meant to be ran hourly, but occasionally to identify malicious or suspicious PowerShell. This analytic is a combination of work completed by Alex Teixeira and Splunk Threat Research Team.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-08-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 
| eval DoIt = if(match(Message,&#34;(?i)(\$doit)&#34;), &#34;4&#34;, 0) 
| eval enccom=if(match(Message,&#34;[A-Za-z0-9+\/]{44,}([A-Za-z0-9+\/]{4}
|[A-Za-z0-9+\/]{3}=
|[A-Za-z0-9+\/]{2}==)&#34;) OR match(Message, &#34;(?i)[-]e(nc*o*d*e*d*c*o*m*m*a*n*d*)*\s+[^-]&#34;),4,0) 
| eval suspcmdlet=if(match(Message, &#34;(?i)Add-Exfiltration
|Add-Persistence
|Add-RegBackdoor
|Add-ScrnSaveBackdoor
|Check-VM
|Do-Exfiltration
|Enabled-DuplicateToken
|Exploit-Jboss
|Find-Fruit
|Find-GPOLocation
|Find-TrustedDocuments
|Get-ApplicationHost
|Get-ChromeDump
|Get-ClipboardContents
|Get-FoxDump
|Get-GPPPassword
|Get-IndexedItem
|Get-Keystrokes
|LSASecret
|Get-PassHash
|Get-RegAlwaysInstallElevated
|Get-RegAutoLogon
|Get-RickAstley
|Get-Screenshot
|Get-SecurityPackages
|Get-ServiceFilePermission
|Get-ServicePermission
|Get-ServiceUnquoted
|Get-SiteListPassword
|Get-System
|Get-TimedScreenshot
|Get-UnattendedInstallFile
|Get-Unconstrained
|Get-VaultCredential
|Get-VulnAutoRun
|Get-VulnSchTask
|Gupt-Backdoor
|HTTP-Login
|Install-SSP
|Install-ServiceBinary
|Invoke-ACLScanner
|Invoke-ADSBackdoor
|Invoke-ARPScan
|Invoke-AllChecks
|Invoke-BackdoorLNK
|Invoke-BypassUAC
|Invoke-CredentialInjection
|Invoke-DCSync
|Invoke-DllInjection
|Invoke-DowngradeAccount
|Invoke-EgressCheck
|Invoke-Inveigh
|Invoke-InveighRelay
|Invoke-Mimikittenz
|Invoke-NetRipper
|Invoke-NinjaCopy
|Invoke-PSInject
|Invoke-Paranoia
|Invoke-PortScan
|Invoke-PoshRat
|Invoke-PostExfil
|Invoke-PowerDump
|Invoke-PowerShellTCP
|Invoke-PsExec
|Invoke-PsUaCme
|Invoke-ReflectivePEInjection
|Invoke-ReverseDNSLookup
|Invoke-RunAs
|Invoke-SMBScanner
|Invoke-SSHCommand
|Invoke-Service
|Invoke-Shellcode
|Invoke-Tater
|Invoke-ThunderStruck
|Invoke-Token
|Invoke-UserHunter
|Invoke-VoiceTroll
|Invoke-WScriptBypassUAC
|Invoke-WinEnum
|MailRaider
|New-HoneyHash
|Out-Minidump
|Port-Scan
|PowerBreach
|PowerUp
|PowerView
|Remove-Update
|Set-MacAttribute
|Set-Wallpaper
|Show-TargetScreen
|Start-CaptureServer
|VolumeShadowCopyTools
|NEEEEWWW
|(Computer
|User)Property
|CachedRDPConnection
|get-net\S+
|invoke-\S+hunter
|Install-Service
|get-\S+(credent
|password)
|remoteps
|Kerberos.*(policy
|ticket)
|netfirewall
|Uninstall-Windows
|Verb\s+Runas
|AmsiBypass
|nishang
|Invoke-Interceptor
|EXEonRemote
|NetworkRelay
|PowerShelludp
|PowerShellIcmp
|CreateShortcut
|copy-vss
|invoke-dll
|invoke-mass
|out-shortcut
|Invoke-ShellCommand&#34;),1,0) 
| eval base64 = if(match(lower(Message),&#34;frombase64&#34;), &#34;4&#34;, 0) 
| eval empire=if(match(lower(Message),&#34;system.net.webclient&#34;) AND match(lower(Message), &#34;frombase64string&#34;) ,5,0) 
| eval mimikatz=if(match(lower(Message),&#34;mimikatz&#34;) OR match(lower(Message), &#34;-dumpcr&#34;) OR match(lower(Message), &#34;SEKURLSA::Pth&#34;) OR match(lower(Message), &#34;kerberos::ptt&#34;) OR match(lower(Message), &#34;kerberos::golden&#34;) ,5,0) 
| eval iex = if(match(lower(Message),&#34;iex&#34;), &#34;2&#34;, 0) 
| eval webclient=if(match(lower(Message),&#34;http&#34;) OR match(lower(Message),&#34;web(client
|request)&#34;) OR match(lower(Message),&#34;socket&#34;) OR match(lower(Message),&#34;download(file
|string)&#34;) OR match(lower(Message),&#34;bitstransfer&#34;) OR match(lower(Message),&#34;internetexplorer.application&#34;) OR match(lower(Message),&#34;xmlhttp&#34;),5,0) 
| eval get = if(match(lower(Message),&#34;get-&#34;), &#34;1&#34;, 0) 
| eval rundll32 = if(match(lower(Message),&#34;rundll32&#34;), &#34;4&#34;, 0) 
| eval suspkeywrd=if(match(Message, &#34;(?i)(bitstransfer
|mimik
|metasp
|AssemblyBuilderAccess
|Reflection\.Assembly
|shellcode
|injection
|cnvert
|shell\.application
|start-process
|Rc4ByteStream
|System\.Security\.Cryptography
|lsass\.exe
|localadmin
|LastLoggedOn
|hijack
|BackupPrivilege
|ngrok
|comsvcs
|backdoor
|brute.?force
|Port.?Scan
|Exfiltration
|exploit
|DisableRealtimeMonitoring
|beacon)&#34;),1,0) 
| eval syswow64 = if(match(lower(Message),&#34;syswow64&#34;), &#34;3&#34;, 0) 
| eval httplocal = if(match(lower(Message),&#34;http://127.0.0.1&#34;), &#34;4&#34;, 0) 
| eval reflection = if(match(lower(Message),&#34;reflection&#34;), &#34;1&#34;, 0) 
| eval invokewmi=if(match(lower(Message), &#34;(?i)(wmiobject
|WMIMethod
|RemoteWMI
|PowerShellWmi
|wmicommand)&#34;),5,0) 
| eval downgrade=if(match(Message, &#34;(?i)([-]ve*r*s*i*o*n*\s+2)&#34;) OR match(lower(Message),&#34;powershell -version&#34;),3,0) 
| eval compressed=if(match(Message, &#34;(?i)GZipStream
|::Decompress
|IO.Compression
|write-zip
|(expand
|compress)-Archive&#34;),5,0) 
| eval invokecmd = if(match(lower(Message),&#34;invoke-command&#34;), &#34;4&#34;, 0) 
| addtotals fieldname=Score DoIt, enccom, suspcmdlet, suspkeywrd, compressed, downgrade, mimikatz, iex, empire, rundll32, webclient, syswow64, httplocal, reflection, invokewmi, invokecmd, base64, get 
| stats values(Score) by DoIt, enccom, compressed, downgrade, iex, mimikatz, rundll32, empire, webclient, syswow64, httplocal, reflection, invokewmi, invokecmd, base64, get, suspcmdlet, suspkeywrd 
| `powershell_4104_hunting_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
The following Hunting analytic requires PowerShell operational logs to be imported. Modify the powershell macro as needed to match the sourcetype or add index. This analytic is specific to 4104, or PowerShell Script Block Logging.

====Required field====

* _time

* Message



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives. May filter as needed.

====Reference====


* https://github.com/inodee/threathunting-spl/blob/master/hunt-queries/powershell_qualifiers.md

* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell

* https://github.com/marcurdy/dfir-toolset/blob/master/Powershell%20Blueteam.txt

* https://devblogs.microsoft.com/powershell/powershell-the-blue-team/

* https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_logging?view=powershell-5.1

* https://www.fireeye.com/blog/threat-research/2016/02/greater_visibilityt.html

* https://hurricanelabs.com/splunk-tutorials/how-to-use-powershell-transcription-logs-in-splunk/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Powershell domain enumeration===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable on critical endpoints or all. \
This analytic identifies specific PowerShell modules typically used to enumerate an organizations domain or users. \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message IN (*get-netdomaintrust*, *get-netforesttrust*, *get-addomain*, *get-adgroupmember*, *get-domainuser*) 
| stats count min(_time) as firstTime max(_time) as lastTime by ComputerName EventCode Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_domain_enumeration_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Message

* ComputerName

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
It is possible there will be false positives, filter as needed.

====Reference====


* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/powershell_script_block_logging/windows-powershell.log


''version'': 1
</div>
</div>

----

===Powershell get localgroup discovery===
The following hunting analytic identifies the use of `get-localgroup` being used with PowerShell to identify local groups on the endpoint. During triage, review parallel processes and identify any further suspicious behavior.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/001/ T1069.001]
* '''Last Updated''': 2021-09-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=powershell.exe OR Processes.process_name=cmd.exe) (Processes.process=&#34;*get-localgroup*&#34;) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `powershell_get_localgroup_discovery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.001
| Local Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
False positives may be present. Tune as needed.

====Reference====


* https://attack.mitre.org/techniques/T1069/001/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.001/T1069.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.001/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Powershell loading dotnet into memory via system reflection assembly===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable no critical endpoints or all. \
This analytic identifies the use of PowerShell loading .net assembly via reflection. This is commonly found in malicious PowerShell usage, including Empire and Cobalt Strike. In addition, the `load(` value may be modifed by removing `(` and it will identify more events to review. \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message IN (&#34;*[system.reflection.assembly]::load(*&#34;,&#34;*[reflection.assembly]*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by OpCode ComputerName User EventCode Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_loading_dotnet_into_memory_via_system_reflection_assembly_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Message

* OpCode

* ComputerName

* User

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited as day to day scripts do not use this method.

====Reference====


* https://docs.microsoft.com/en-us/dotnet/api/system.reflection.assembly?view=net-5.0

* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/powershell_script_block_logging/windows-powershell.log


''version'': 1
</div>
</div>

----

===Powershell start-bitstransfer===
Start-BitsTransfer is the PowerShell &#34;version&#34; of BitsAdmin.exe. Similar functionality is present. This technique variation is not as commonly used by adversaries, but has been abused in the past. Lesser known uses include the ability to set the `-TransferType` to `Upload` for exfiltration of files. In an instance where `Upload` is used, it is highly possible files will be archived. During triage, review parallel processes and process lineage. Capture any files on disk and review. For the remote domain or IP, what is the reputation?

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1197/ T1197]
* '''Last Updated''': 2021-03-29

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_powershell` Processes.process=*start-bitstransfer* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.original_file_name Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_start_bitstransfer_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#BITS_Jobs|BITS Jobs]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1197
| BITS Jobs
| Defense Evasion, Persistence
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives. It is possible administrators will utilize Start-BitsTransfer for administrative tasks, otherwise filter based parent process or command-line arguments.

====Reference====


* https://isc.sans.edu/diary/Investigating+Microsoft+BITS+Activity/23281

* https://docs.microsoft.com/en-us/windows/win32/bits/using-windows-powershell-to-create-bits-transfer-jobs



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1197/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Powershell creating thread mutex===
The following analytic identifies suspicious PowerShell script execution via EventCode 4104 that is using the `mutex` function. This function is commonly seen in some obfuscated PowerShell scripts to make sure that only one instance of there process is running on a compromise machine. During triage, review parallel processes within the same timeframe. Review the full script block to identify other related artifacts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1027/ T1027], [https://attack.mitre.org/techniques/T1027/005/ T1027.005]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*Threading.Mutex*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_creating_thread_mutex_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1027
| Obfuscated Files or Information
| Defense Evasion
|-
| T1027.005
| Indicator Removal from Tools
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
powershell developer may used this function in their script for instance checking too.

====Reference====


* https://isc.sans.edu/forums/diary/Some+Powershell+Malicious+Code/22988/

* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/honeypots/pwsh/windows-powershell.log


''version'': 1
</div>
</div>

----

===Powershell disable security monitoring===
This search is to identifies a modification in registry to disable the windows denfender real time behavior monitoring. This event or technique is commonly seen in RAT, bot, or Trojan to disable AV to evade detections.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-07-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_powershell` Processes.process=&#34;*set-mppreference*&#34; AND Processes.process IN (&#34;*disablerealtimemonitoring*&#34;,&#34;*disableioavprotection*&#34;,&#34;*disableintrusionpreventionsystem*&#34;,&#34;*disablescriptscanning*&#34;,&#34;*disableblockatfirstseen*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_disable_security_monitoring_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Revil_Ransomware|Revil Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives. However, tune based on scripts that may perform this action.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1562.001/T1562.001.md#atomic-test-15---tamper-with-windows-defender-atp-powershell



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/pwh_defender_disabling/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Powershell enable smb1protocol feature===
This search is to detect a suspicious enabling of smb1protocol through &#34;powershell.exe&#34;. This technique was seen in some ransomware (like reddot) where it enable smb share to do the lateral movement and encrypt other files within the compromise network system.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1027/ T1027], [https://attack.mitre.org/techniques/T1027/005/ T1027.005]
* '''Last Updated''': 2021-06-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*Enable-WindowsOptionalFeature*&#34; Message = &#34;*SMB1Protocol*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_enable_smb1protocol_feature_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the powershell logs  from your endpoints. make sure you enable needed registry to monitor this event.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1027
| Obfuscated Files or Information
| Defense Evasion
|-
| T1027.005
| Indicator Removal from Tools
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network operator may enable or disable this windows feature.

====Reference====


* https://app.any.run/tasks/c0f98850-af65-4352-9746-fbebadee4f05/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data2/windows-powershell.log


''version'': 1
</div>
</div>

----

===Powershell execute com object===
This search is to detect a COM CLSID execution through powershell. This technique was seen in several adversaries and malware like ransomware conti where it has a feature to execute command using COM Object. This technique may use by network operator at some cases but a good indicator if some application want to gain privilege escalation or bypass uac.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1546/015/ T1546.015], [https://attack.mitre.org/techniques/T1546/ T1546]
* '''Last Updated''': 2021-08-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*CreateInstance([type]::GetTypeFromCLSID*&#34; OR Message = &#34;*CreateInstance([Type]::GetTypeFromProgID*&#34;
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_execute_com_object_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1546.015
| Component Object Model Hijacking
| Privilege Escalation, Persistence
|-
| T1546
| Event Triggered Execution
| Privilege Escalation, Persistence
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network operrator may use this command.

====Reference====


* https://threadreaderapp.com/thread/1423361119926816776.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/conti/conti_leak/windows-powershell.log


''version'': 1
</div>
</div>

----

===Powershell fileless process injection via getprocaddress===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable no critical endpoints or all. \
This analytic identifies `GetProcAddress` in the script block. This is not normal to be used by most PowerShell scripts and is typically unsafe/malicious. Many attack toolkits use GetProcAddress to obtain code execution. \
In use, `$var_gpa = $var_unsafe_native_methods.GetMethod(GetProcAddress` and later referenced/executed elsewhere. \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1055/ T1055], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-06-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message=*getprocaddress* 
| stats count min(_time) as firstTime max(_time) as lastTime by OpCode ComputerName User EventCode Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_fileless_process_injection_via_getprocaddress_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Message

* OpCode

* ComputerName

* User

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives. Filter as needed.

====Reference====


* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/powershell_script_block_logging/windows-powershell.log


''version'': 1
</div>
</div>

----

===Powershell fileless script contains base64 encoded content===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable on critical endpoints or all. \
This analytic identifies `FromBase64String` within the script block. A typical malicious instance will include additional code. \
Command example - `[Byte[]]$var_code = [System.Convert]::FromBase64String(38uqIyMjQ6rG....` \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1027/ T1027], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-06-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message=*frombase64string* 
| stats count min(_time) as firstTime max(_time) as lastTime by OpCode ComputerName User EventCode Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_fileless_script_contains_base64_encoded_content_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Message

* OpCode

* ComputerName

* User

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1027
| Obfuscated Files or Information
| Defense Evasion
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Exploitation

* Privilege Escalation


====Known False Positives====
False positives should be limited. Filter as needed.

====Reference====


* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/powershell_script_block_logging/windows-powershell.log


''version'': 1
</div>
</div>

----

===Powershell get localgroup discovery with script block logging===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable on critical endpoints or all. \
This analytic identifies PowerShell cmdlet - `get-localgroup` being ran. Typically, by itself, is not malicious but may raise suspicion based on time of day, endpoint and username. \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/001/ T1069.001]
* '''Last Updated''': 2021-09-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*get-localgroup*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by Message OpCode ComputerName User EventCode
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_get_localgroup_discovery_with_script_block_logging_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.001
| Local Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
False positives may be present. Tune as needed.

====Reference====


* https://www.splunk.com/en_us/blog/security/powershell-detections-threat-research-release-august-2021.html

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.001/T1069.001.md

* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.001/atomic_red_team/windows-powershell.log


''version'': 1
</div>
</div>

----

===Powershell processing stream of data===
The following analytic identifies suspicious PowerShell script execution via EventCode 4104 that is processing compressed stream data. This is typically found in obfuscated PowerShell or PowerShell executing embedded .NET or binary files that are stream flattened and will be deflated durnig execution. During triage, review parallel processes within the same timeframe. Review the full script block to identify other related artifacts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*IO.Compression.*&#34; OR Message = &#34;*IO.StreamReader*&#34; OR Message = &#34;*]::Decompress*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_processing_stream_of_data_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User

* Score



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
powershell may used this function to process compressed data.

====Reference====


* https://medium.com/@ahmedjouini99/deobfuscating-emotets-powershell-payload-e39fb116f7b9

* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/honeypots/pwsh/windows-powershell.log


''version'': 1
</div>
</div>

----

===Powershell remote thread to known windows process===
this search is designed to detect suspicious powershell process that tries to inject code and to known/critical windows process and execute it using CreateRemoteThread. This technique is seen in several malware like trickbot and offensive tooling like cobaltstrike where it load a shellcode to svchost.exe to execute reverse shell to c2 and download another payload

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-04-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode = 8 process_name IN (&#34;powershell_ise.exe&#34;, &#34;powershell.exe&#34;) TargetImage IN (&#34;*\\svchost.exe&#34;,&#34;*\\csrss.exe&#34; &#34;*\\gpupdate.exe&#34;, &#34;*\\explorer.exe&#34;,&#34;*\\services.exe&#34;,&#34;*\\winlogon.exe&#34;,&#34;*\\smss.exe&#34;,&#34;*\\wininit.exe&#34;,&#34;*\\userinit.exe&#34;,&#34;*\\spoolsv.exe&#34;,&#34;*\\taskhost.exe&#34;) 
| stats  min(_time) as firstTime max(_time) as lastTime count by SourceImage process_name SourceProcessId SourceProcessGuid TargetImage TargetProcessId NewThreadId StartAddress Computer EventCode 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_remote_thread_to_known_windows_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, Create Remote thread from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances of create remote thread may be used.

====Required field====

* _time

* SourceImage

* process_name

* SourceProcessId

* SourceProcessGuid

* TargetImage

* TargetProcessId

* NewThreadId

* StartAddress

* Computer

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://thedfirreport.com/2021/01/11/trickbot-still-alive-and-well/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/trickbot/infection/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Powershell using memory as backing store===
The following analytic identifies suspicious PowerShell script execution via EventCode 4104 that is using memory stream as new object backstore. The malicious PowerShell script will contain stream flate data and will be decompressed in memory to run or drop the actual payload. During triage, review parallel processes within the same timeframe. Review the full script block to identify other related artifacts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1140/ T1140]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message = &#34;*New-Object IO.MemoryStream*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_using_memory_as_backing_store_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1140
| Deobfuscate/Decode Files or Information
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
powershell may used this function to store out object into memory.

====Reference====


* https://www.carbonblack.com/blog/decoding-malicious-powershell-streams/

* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/honeypots/pwsh/windows-powershell.log


''version'': 1
</div>
</div>

----

===Prevent automatic repair mode using bcdedit===
This search is to detect a suspicious bcdedit.exe execution to ignore all failures. This technique was used by ransomware to prevent the compromise machine automatically boot in repair mode.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1490/ T1490]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = &#34;bcdedit.exe&#34; Processes.process = &#34;*bootstatuspolicy*&#34;  Processes.process = &#34;*ignoreallfailures*&#34; by Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process Processes.dest Processes.user Processes.process_id Processes.process_guid 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `prevent_automatic_repair_mode_using_bcdedit_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed bcdedit.exe may be used.

====Required field====

* _time

* Processes.parent_process_name

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user

* Processes.process_id

* Processes.process_guid



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1490
| Inhibit System Recovery
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Administrators may modify the boot configuration ignore failure during testing and debugging.

====Reference====


* https://jsac.jpcert.or.jp/archive/2020/pdf/JSAC2020_1_tamada-yamazaki-nakatsuru_en.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Print processor registry autostart===
This analytic is to detect a suspicious modification or new registry entry regarding print processor. This registry is known to be abuse by turla or other APT to gain persistence and privilege escalation to the compromised machine. This is done by adding the malicious dll payload on the new created key in this registry that will be executed as it restarted the spoolsv.exe process and services.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/012/ T1547.012], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2021-09-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path =&#34;*\\Control\\Print\\Environments\\Windows x64\\Print Processors*&#34; by Registry.dest  Registry.user Registry.registry_path Registry.registry_key_name Registry.registry_value_name 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `print_processor_registry_autostart_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.dest

* Registry.user

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.012
| Print Processors
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
possible new printer installation may add driver component on this registry.

====Reference====


* https://attack.mitre.org/techniques/T1547/012/

* https://www.welivesecurity.com/2020/05/21/no-game-over-winnti-group/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.012/print_reg/sysmon_print.log


''version'': 1
</div>
</div>

----

===Print spooler adding a printer driver===
The following analytic identifies new printer drivers being load by utilizing the Windows PrintService operational logs, EventCode 316. This was identified during our testing of CVE-2021-34527 previously (CVE-2021-1675) or PrintNightmare. \
Within the proof of concept code, the following event will occur - &#34;Printer driver 1234 for Windows x64 Version-3 was added or updated. Files:- UNIDRV.DLL, kernelbase.dll, evil.dll. No user action is required.&#34; \
During triage, isolate the endpoint and review for source of exploitation. Capture any additional file modification events and review the source of where the exploitation began.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/012/ T1547.012], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2021-07-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`printservice` EventCode=316 category = &#34;Adding a printer driver&#34; Message = &#34;*kernelbase.dll,*&#34; Message = &#34;*UNIDRV.DLL,*&#34; Message = &#34;*.DLL.*&#34; 
| stats  count min(_time) as firstTime max(_time) as lastTime by OpCode EventCode ComputerName Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `print_spooler_adding_a_printer_driver_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#PrintNightmare_CVE-2021-34527|PrintNightmare CVE-2021-34527]]


====How To Implement====
You will need to ensure PrintService Admin and Operational logs are being logged to Splunk from critical or all systems.

====Required field====

* _time

* OpCode

* EventCode

* ComputerName

* Message



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.012
| Print Processors
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Unknown. This may require filtering.

====Reference====


* https://twitter.com/MalwareJake/status/1410421445608476679?s=20

* https://blog.truesec.com/2021/06/30/fix-for-printnightmare-cve-2021-1675-exploit-to-keep-your-print-servers-running-while-a-patch-is-not-available/

* https://blog.truesec.com/2021/06/30/exploitable-critical-rce-vulnerability-allows-regular-users-to-fully-compromise-active-directory-printnightmare-cve-2021-1675/

* https://www.reddit.com/r/msp/comments/ob6y02/critical_vulnerability_printnightmare_exposes



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.012/printnightmare/windows-printservice_operational.log


''version'': 1
</div>
</div>

----

===Print spooler failed to load a plug-in===
The following analytic identifies driver load errors utilizing the Windows PrintService Admin logs. This was identified during our testing of CVE-2021-34527 previously (CVE-2021-1675) or PrintNightmare. \
Within the proof of concept code, the following error will occur - &#34;The print spooler failed to load a plug-in module C:\Windows\system32\spool\DRIVERS\x64\3\meterpreter.dll, error code 0x45A. See the event user data for context information.&#34; \
The analytic is based on file path and failure to load the plug-in. \
During triage, isolate the endpoint and review for source of exploitation. Capture any additional file modification events.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/012/ T1547.012], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2021-07-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`printservice` ((ErrorCode=&#34;0x45A&#34; (EventCode=&#34;808&#34; OR EventCode=&#34;4909&#34;)) OR (&#34;The print spooler failed to load a plug-in module&#34; OR &#34;\\drivers\\x64\\&#34;)) 
| stats count min(_time) as firstTime max(_time) as lastTime by OpCode EventCode ComputerName Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `print_spooler_failed_to_load_a_plug_in_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#PrintNightmare_CVE-2021-34527|PrintNightmare CVE-2021-34527]]


====How To Implement====
You will need to ensure PrintService Admin and Operational logs are being logged to Splunk from critical or all systems.

====Required field====

* _time

* OpCode

* EventCode

* ComputerName

* Message



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.012
| Print Processors
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives are unknown and filtering may be required.

====Reference====


* https://blog.truesec.com/2021/06/30/fix-for-printnightmare-cve-2021-1675-exploit-to-keep-your-print-servers-running-while-a-patch-is-not-available/

* https://blog.truesec.com/2021/06/30/exploitable-critical-rce-vulnerability-allows-regular-users-to-fully-compromise-active-directory-printnightmare-cve-2021-1675/

* https://www.reddit.com/r/msp/comments/ob6y02/critical_vulnerability_printnightmare_exposes



====Test Dataset====


''version'': 1
</div>
</div>

----

===Probing access with stolen credentials via powersploit modules===
This detection identifies use of PowerSploit modules that facilitate access probing with admin credentials as well as probing access to system services.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1098/ T1098]
* '''Last Updated''': 2020-11-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Test-AdminAccess/)=true OR match_regex(cmd_line, /(?i)Invoke-CheckLocalAdminAccess/)=true OR match_regex(cmd_line, /(?i)Test-ServiceDaclPermission/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_user_id

* dest_device_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1098
| Account Manipulation
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Process creating lnk file in suspicious location===
This search looks for a process launching an `*.lnk` file under `C:\User*` or `*\Local\Temp\*`. This is common behavior used by various spear phishing tools.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/002/ T1566.002]
* '''Last Updated''': 2021-08-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_name=&#34;*.lnk&#34; AND (Filesystem.file_path=&#34;C:\\User\\*&#34; OR Filesystem.file_path=&#34;*\\Temp\\*&#34;) by _time span=1h Filesystem.process_guid Filesystem.file_name Filesystem.file_path Filesystem.file_hash Filesystem.user 
| `drop_dm_object_name(Filesystem)` 
| rename process_guid as lnk_guid 
| join lnk_guid, _time [
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name=* by _time span=1h Processes.parent_process_guid Processes.process_id Processes.process_name Processes.dest Processes.process_path Processes.process 
| `drop_dm_object_name(Processes)` 
| rename parent_process_guid as lnk_guid 
| fields _time lnk_guid process_id dest process_name process_path process] 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| table firstTime, lastTime, lnk_guid, process_id, user, dest, file_name, file_path, process_name, process, process_path, file_hash 
| `process_creating_lnk_file_in_suspicious_location_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]


====How To Implement====
You must be ingesting data that records filesystem and process activity from your hosts to populate the Endpoint data model. This is typically populated via endpoint detection-and-response product, such as Carbon Black, or endpoint data sources, such as Sysmon.

====Required field====

* _time

* Filesystem.file_name

* Filesystem.file_path

* Filesystem.process_id

* Filesystem.file_name

* Filesystem.file_path

* Filesystem.file_hash

* Filesystem.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.002
| Spearphishing Link
| Initial Access
|}


====Kill Chain Phase====

* Installation

* Actions on Objectives


====Known False Positives====
This detection should yield little or no false positive results. It is uncommon for LNK files to be executed from temporary or user directories.

====Reference====


* https://attack.mitre.org/techniques/T1566/001/

* https://www.trendmicro.com/en_us/research/17/e/rising-trend-attackers-using-lnk-files-download-malware.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.002/lnk_file_temp_folder/windows-sysmon.log


''version'': 5
</div>
</div>

----

===Process deleting its process file path===
This detection is to identify a suspicious process that tries to delete the process file path related to its process. This technique is known to be defense evasion once a certain condition of malware is satisfied or not. Clop ransomware use this technique where it will try to delete its process file path using a .bat command if the keyboard layout is not the layout it tries to infect.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/ T1070]
* '''Last Updated''': 2021-03-17

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=1 cmdline = &#34;*/c del*&#34; Image = &#34;*\\cmd.exe&#34; 
|eval result = if(like(process,&#34;%&#34;.parent_process.&#34;%&#34;), &#34;Found&#34;, &#34;Not Found&#34;) 
| stats min(_time) as firstTime max(_time) as lastTime count by Computer user ParentImage ParentCommandLine Image cmdline EventCode ProcessID result 
| where result = &#34;Found&#34; 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `process_deleting_its_process_file_path_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* EventCode

* Computer

* user

* ParentImage

* ParentCommandLine

* Image

* cmdline

* ProcessID

* result

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.fireeye.com/blog/threat-research/2020/10/fin11-email-campaigns-precursor-for-ransomware-data-theft.html

* https://blog.virustotal.com/2020/11/keep-your-friends-close-keep-ransomware.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/clop/clop_a/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Process execution via wmi===
The following analytic identifies `WmiPrvSE.exe` spawning a process. This typically occurs when a process is instantiated from a local or remote process using `wmic.exe`. During triage, review parallel processes for suspicious behavior or commands executed. Review the process and command-line spawning from `wmiprvse.exe`. Contain and remediate the endpoint as necessary.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1047/ T1047]
* '''Last Updated''': 2020-03-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=WmiPrvSE.exe by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `process_execution_via_wmi_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_WMI_Use|Suspicious WMI Use]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.process

* Processes.parent_process_name

* Processes.user

* Processes.dest

* Processes.process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1047
| Windows Management Instrumentation
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, administrators may use wmi to execute commands for legitimate purposes.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1047/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Process kill base on file path===
The following analytic identifies the use of `wmic.exe` using `delete` to remove a executable path. This is typically ran via a batch file during beginning stages of an adversary setting up for mining on an endpoint.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-05-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime  from datamodel=Endpoint.Processes where `process_wmic` AND Processes.process=&#34;*process*&#34; AND Processes.process=&#34;*executablepath*&#34; AND Processes.process=&#34;*delete*&#34; by  Processes.parent_process_name Processes.process_name Processes.original_file_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `process_kill_base_on_file_path_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Unknown.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Process writing dynamicwrapperx===
DynamicWrapperX is an ActiveX component that can be used in a script to call Windows API functions, but it requires the dynwrapx.dll to be installed and registered. With that, a binary writing dynwrapx.dll to disk and registering it into the registry is highly suspect. Why is it needed? In most malicious instances, it will be written to disk at a non-standard location. During triage, review parallel processes and pivot on the process_guid. Review the registry for any suspicious modifications meant to load dynwrapx.dll. Identify any suspicious module loads of dynwrapx.dll. This will identify the process that will invoke vbs/wscript/cscript.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1559/001/ T1559.001]
* '''Last Updated''': 2021-10-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes by _time Processes.process_id Processes.process_name Processes.dest Processes.process_guid Processes.user 
| `drop_dm_object_name(Processes)` 
| join process_guid [
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Filesystem where Filesystem.file_name=&#34;dynwrapx.dll&#34; by _time Filesystem.dest Filesystem.file_create_time Filesystem.file_name Filesystem.file_path Filesystem.process_guid Filesystem.user 
| `drop_dm_object_name(Filesystem)` 
| fields _time process_guid file_path file_name file_create_time user dest process_name] 
| stats count min(_time) as firstTime max(_time) as lastTime by dest process_name process_guid file_name file_path file_create_time user 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `process_writing_dynamicwrapperx_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` and `Filesystem` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* dest

* process_name

* process_guid

* file_name

* file_path

* file_create_time user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1559.001
| Component Object Model
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited, however it is possible to filter by Processes.process_name and specific processes (ex. wscript.exe). Filter as needed. This may need modification based on EDR telemetry and how it brings in registry data. For example, removal of (Default).

====Reference====


* https://blog.f-secure.com/hunting-for-koadic-a-com-based-rootkit/

* https://www.script-coding.com/dynwrapx_eng.html

* https://bohops.com/2018/06/28/abusing-com-registry-structure-clsid-localserver32-inprocserver32/

* https://tria.ge/210929-ap75vsddan

* https://www.virustotal.com/gui/file/cb77b93150cb0f7fe65ce8a7e2a5781e727419451355a7736db84109fa215a89



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/remcos/remcos/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Processes tapping keyboard events===
This search looks for processes in an MacOS system that is tapping keyboard events in MacOS, and essentially monitoring all keystrokes made by a user. This is a common technique used by RATs to log keystrokes from a victim, although it can also be used by legitimate processes like Siri to react on human input

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': 
* '''Last Updated''': 2019-01-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from datamodel Alerts.Alerts 
| search app=osquery:results name=pack_osx-attacks_Keyboard_Event_Taps 
| rename columns.cmdline as cmd, columns.name as process_name, columns.pid as process_id
| dedup host,process_name 
| table host,process_name, cmd, process_id 
| `processes_tapping_keyboard_events_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#ColdRoot_MacOS_RAT|ColdRoot MacOS RAT]]


====How To Implement====
In order to properly run this search, Splunk needs to ingest data from your osquery deployed agents with the [osx-attacks.conf](https://github.com/facebook/osquery/blob/experimental/packs/osx-attacks.conf#L599) pack enabled. Also the [TA-OSquery](https://github.com/d1vious/TA-osquery) must be deployed across your indexers and universal forwarders in order to have the osquery data populate the Alerts data model.

====Required field====

* _time

* app

* name

* columns.cmdline

* columns.name

* columns.pid

* host




====Kill Chain Phase====

* Command and Control


====Known False Positives====
There might be some false positives as keyboard event taps are used by processes like Siri and Zoom video chat, for some good examples of processes to exclude please see [this](https://github.com/facebook/osquery/pull/5345#issuecomment-454639161) comment.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Processes launching netsh===
This search looks for processes launching netsh.exe. Netsh is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running. Netsh can be used as a persistence proxy technique to execute a helper DLL when netsh.exe is executed. In this search, we are looking for processes spawned by netsh.exe and executing commands via the command line.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/004/ T1562.004], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-09-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) AS Processes.process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_netsh` by Processes.parent_process_name Processes.parent_process Processes.original_file_name Processes.process_name Processes.user Processes.dest 
|`drop_dm_object_name(&#34;Processes&#34;)` 
|`security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
|`processes_launching_netsh_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Netsh_Abuse|Netsh Abuse]]

* [[Documentation:ESSOC:stories:UseCase#Disabling_Security_Tools|Disabling Security Tools]]

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.process

* Processes.parent_process_name

* Processes.parent_process

* Processes.process_name

* Processes.user

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.004
| Disable or Modify System Firewall
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Some VPN applications are known to launch netsh.exe. Outside of these instances, it is unusual for an executable to launch netsh.exe and run commands.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.004/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Ransomware notes bulk creation===
The following analytics identifies a big number of instance of ransomware notes (filetype e.g .txt, .html, .hta) file creation to the infected machine. This behavior is a good sensor if the ransomware note filename is quite new for security industry or the ransomware note filename is not in your ransomware lookup table list for monitoring.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1486/ T1486]
* '''Last Updated''': 2021-03-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=11 file_name IN (&#34;*\.txt&#34;,&#34;*\.html&#34;,&#34;*\.hta&#34;) 
|bin _time span=10s 
| stats min(_time) as firstTime max(_time) as lastTime dc(TargetFilename) as unique_readme_path_count values(TargetFilename) as list_of_readme_path by Computer Image file_name 
| where unique_readme_path_count &gt;= 15 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `ransomware_notes_bulk_creation_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#BlackMatter_Ransomware|BlackMatter Ransomware]]


====How To Implement====
You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint file-system data model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data.

====Required field====

* EventCode

* file_name

* _time

* TargetFilename

* Computer

* Image

* user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1486
| Data Encrypted for Impact
| Impact
|}


====Kill Chain Phase====

* Obfuscation


====Known False Positives====
unknown

====Reference====


* https://www.fireeye.com/blog/threat-research/2020/10/fin11-email-campaigns-precursor-for-ransomware-data-theft.html

* https://blog.virustotal.com/2020/11/keep-your-friends-close-keep-ransomware.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/clop/clop_a/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Rare parent-child process relationship===
An attacker may use LOLBAS tools spawned from vulnerable applications not typically used by system administrators. This search leverages the Splunk Streaming ML DSP plugin to find rare parent/child relationships. The list of application has been extracted from https://github.com/LOLBAS-Project/LOLBAS/tree/master/yml/OSBinaries

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1203/ T1203], [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1053/ T1053], [https://attack.mitre.org/techniques/T1072/ T1072]
* '''Last Updated''': 2021-05-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)) 
| eval parent_process=lower(ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null)), parent_process_name=mvindex(split(parent_process, &#34;\\&#34;), -1), process_name=lower(ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), dest_user_id=ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), dest_device_id=ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where parent_process_name!=null 
| select parent_process_name, process_name, cmd_line, timestamp, dest_device_id, dest_user_id 
| conditional_anomaly conditional=&#34;parent_process_name&#34; target=&#34;process_name&#34; 
| where (process_name=&#34;powershell.exe&#34; OR process_name=&#34;regsvcs.exe&#34; OR process_name=&#34;ftp.exe&#34; OR process_name=&#34;dfsvc.exe&#34; OR process_name=&#34;rasautou.exe&#34; OR process_name=&#34;schtasks.exe&#34; OR process_name=&#34;xwizard.exe&#34; OR process_name=&#34;findstr.exe&#34; OR process_name=&#34;esentutl.exe&#34; OR process_name=&#34;cscript.exe&#34; OR process_name=&#34;reg.exe&#34; OR process_name=&#34;csc.exe&#34; OR process_name=&#34;atbroker.exe&#34; OR process_name=&#34;print.exe&#34; OR process_name=&#34;pcwrun.exe&#34; OR process_name=&#34;vbc.exe&#34; OR process_name=&#34;rpcping.exe&#34; OR process_name=&#34;wsreset.exe&#34; OR process_name=&#34;ilasm.exe&#34; OR process_name=&#34;certutil.exe&#34; OR process_name=&#34;replace.exe&#34; OR process_name=&#34;mshta.exe&#34; OR process_name=&#34;bitsadmin.exe&#34; OR process_name=&#34;wscript.exe&#34; OR process_name=&#34;ieexec.exe&#34; OR process_name=&#34;cmd.exe&#34; OR process_name=&#34;microsoft.workflow.compiler.exe&#34; OR process_name=&#34;runscripthelper.exe&#34; OR process_name=&#34;makecab.exe&#34; OR process_name=&#34;forfiles.exe&#34; OR process_name=&#34;desktopimgdownldr.exe&#34; OR process_name=&#34;control.exe&#34; OR process_name=&#34;msbuild.exe&#34; OR process_name=&#34;register-cimprovider.exe&#34; OR process_name=&#34;tttracer.exe&#34; OR process_name=&#34;ie4uinit.exe&#34; OR process_name=&#34;sc.exe&#34; OR process_name=&#34;bash.exe&#34; OR process_name=&#34;hh.exe&#34; OR process_name=&#34;cmstp.exe&#34; OR process_name=&#34;mmc.exe&#34; OR process_name=&#34;jsc.exe&#34; OR process_name=&#34;scriptrunner.exe&#34; OR process_name=&#34;odbcconf.exe&#34; OR process_name=&#34;extexport.exe&#34; OR process_name=&#34;msdt.exe&#34; OR process_name=&#34;diskshadow.exe&#34; OR process_name=&#34;extrac32.exe&#34; OR process_name=&#34;eventvwr.exe&#34; OR process_name=&#34;mavinject.exe&#34; OR process_name=&#34;regasm.exe&#34; OR process_name=&#34;gpscript.exe&#34; OR process_name=&#34;rundll32.exe&#34; OR process_name=&#34;regsvr32.exe&#34; OR process_name=&#34;regedit.exe&#34; OR process_name=&#34;msiexec.exe&#34; OR process_name=&#34;gfxdownloadwrapper.exe&#34; OR process_name=&#34;presentationhost.exe&#34; OR process_name=&#34;regini.exe&#34; OR process_name=&#34;wmic.exe&#34; OR process_name=&#34;runonce.exe&#34; OR process_name=&#34;syncappvpublishingserver.exe&#34; OR process_name=&#34;verclsid.exe&#34; OR process_name=&#34;psr.exe&#34; OR process_name=&#34;infdefaultinstall.exe&#34; OR process_name=&#34;explorer.exe&#34; OR process_name=&#34;expand.exe&#34; OR process_name=&#34;installutil.exe&#34; OR process_name=&#34;netsh.exe&#34; OR process_name=&#34;wab.exe&#34; OR process_name=&#34;dnscmd.exe&#34; OR process_name=&#34;at.exe&#34; OR process_name=&#34;pcalua.exe&#34; OR process_name=&#34;cmdkey.exe&#34; OR process_name=&#34;msconfig.exe&#34;) 
| eval input = (-1)*log(output) 
| adaptive_threshold algorithm=&#34;gaussian&#34; threshold=0.001 window=604800000L 
| where label AND input &gt; mean 
| eval start_time = timestamp, end_time = timestamp, entities = mvappend(dest_device_id, dest_user_id), body = create_map([&#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name, &#34;input&#34;, input, &#34;mean&#34;, mean, &#34;variance&#34;, variance, &#34;output&#34;, output, &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
Collect endpoint data such as sysmon or 4688 events.

====Required field====

* process

* process_name

* parent_process_name

* _time

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1203
| Exploitation for Client Execution
| Execution
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|-
| T1072
| Software Deployment Tools
| Execution, Lateral Movement
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Some custom tools used by admins could be used rarely to launch remotely applications. This might trigger false positives at the beginning when it hasn&#39;t collected yet enough data to construct the baseline.


====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Recon avproduct through pwh or wmi===
The following analytic identifies suspicious PowerShell script execution via EventCode 4104 performing checks to identify anti-virus products installed on the endpoint. This technique is commonly found in malware and APT events where the adversary will map all running security applications or services. During triage, review parallel processes within the same timeframe. Review the full script block to identify other related artifacts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1592/ T1592]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*SELECT*&#34; OR Message = &#34;*WMIC*&#34;) AND (Message = &#34;*AntiVirusProduct*&#34; OR Message = &#34;*AntiSpywareProduct*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `recon_avproduct_through_pwh_or_wmi_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1592
| Gather Victim Host Information
| Reconnaissance
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
network administrator may used this command for checking purposes

====Reference====


* https://news.sophos.com/en-us/2020/05/12/maze-ransomware-1-year-counting/

* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/honeypots/pwsh/windows-powershell.log


''version'': 1
</div>
</div>

----

===Recon using wmi class===
The following analytic identifies suspicious PowerShell via EventCode 4104, where WMI is performing an event query looking for running processes or running services. This technique is commonly found where the adversary will identify services and system information on the compromised machine. During triage, review parallel processes within the same timeframe. Review the full script block to identify other related artifacts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1592/ T1592]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message= &#34;*SELECT*&#34; OR Message= &#34;*Get-WmiObject*&#34;) AND (Message= &#34;*Win32_Bios*&#34; OR Message= &#34;*Win32_OperatingSystem*&#34; OR Message= &#34;*Win32_Processor*&#34; OR Message= &#34;*Win32_ComputerSystem*&#34; OR Message= &#34;*Win32_ComputerSystemProduct*&#34; OR Message= &#34;*Win32_ShadowCopy*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `recon_using_wmi_class_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1592
| Gather Victim Host Information
| Reconnaissance
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
network administrator may used this command for checking purposes

====Reference====


* https://news.sophos.com/en-us/2020/05/12/maze-ransomware-1-year-counting/

* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/honeypots/pwsh/windows-powershell.log


''version'': 1
</div>
</div>

----

===Reconnaissance and access to accounts groups and policies via powersploit modules===
This detection identifies access to PowerSploit modules that discover accounts, groups and policies that can be accessed or taken over.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1484/ T1484]
* '''Last Updated''': 2020-11-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Find-DomainLocalGroupMember/)=true OR match_regex(cmd_line, /(?i)Invoke-EnumerateLocalAdmin/)=true OR match_regex(cmd_line, /(?i)Find-DomainUserEvent/)=true OR match_regex(cmd_line, /(?i)Invoke-EventHunter/)=true OR match_regex(cmd_line, /(?i)Find-DomainUserLocation/)=true OR match_regex(cmd_line, /(?i)Invoke-UserHunter/)=true OR match_regex(cmd_line, /(?i)Get-DomainForeignGroupMember/)=true OR match_regex(cmd_line, /(?i)Find-ForeignGroup/)=true OR match_regex(cmd_line, /(?i)Get-DomainForeignUser/)=true OR match_regex(cmd_line, /(?i)Find-ForeignUser/)=true OR match_regex(cmd_line, /(?i)Get-DomainGPO/)=true OR match_regex(cmd_line, /(?i)Get-NetGPO/)=true OR match_regex(cmd_line, /(?i)Get-DomainGPOComputerLocalGroupMapping/)=true OR match_regex(cmd_line, /(?i)Find-GPOComputerAdmin/)=true OR match_regex(cmd_line, /(?i)Get-DomainGPOLocalGroup/)=true OR match_regex(cmd_line, /(?i)Get-NetGPOGroup/)=true OR match_regex(cmd_line, /(?i)Get-DomainGPOUserLocalGroupMapping/)=true OR match_regex(cmd_line, /(?i)Find-GPOLocation/)=true OR match_regex(cmd_line, /(?i)Get-DomainGroup/)=true OR match_regex(cmd_line, /(?i)Get-NetGroup/)=true OR match_regex(cmd_line, /(?i)Get-DomainGroupMember/)=true OR match_regex(cmd_line, /(?i)Get-NetGroupMember/)=true OR match_regex(cmd_line, /(?i)Get-DomainManagedSecurityGroup/)=true OR match_regex(cmd_line, /(?i)Find-ManagedSecurityGroups/)=true OR match_regex(cmd_line, /(?i)Get-DomainOU/)=true OR match_regex(cmd_line, /(?i)Get-NetOU/)=true OR match_regex(cmd_line, /(?i)Get-DomainUser/)=true OR match_regex(cmd_line, /(?i)Get-NetUser/)=true OR match_regex(cmd_line, /(?i)Get-DomainUserEvent/)=true OR match_regex(cmd_line, /(?i)Get-UserEvent/)=true OR match_regex(cmd_line, /(?i)Get-NetLocalGroup/)=true OR match_regex(cmd_line, /(?i)Get-NetLocalGroupMember/)=true OR match_regex(cmd_line, /(?i)Get-NetLoggedon/)=true OR match_regex(cmd_line, /(?i)Get-RegLoggedOn/)=true OR match_regex(cmd_line, /(?i)Get-WMIRegLastLoggedOn/)=true OR match_regex(cmd_line, /(?i)Get-LastLoggedOn/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1087
| Account Discovery
| Discovery
|-
| T1484
| Domain Policy Modification
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance and access to accounts and groups via mimikatz modules===
This detection identifies use of Mimikatz modules for discovery of accounts and groups and access to them.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1087/ T1087], [https://attack.mitre.org/techniques/T1484/ T1484]
* '''Last Updated''': 2020-11-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)net::user/)=true OR match_regex(cmd_line, /(?i)net::group/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1087
| Account Discovery
| Discovery
|-
| T1484
| Domain Policy Modification
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance and access to active directoty infrastructure via powersploit modules===
This detection identifies access to PowerSploit modules for reconnaissance and access to elements of Active Directory infrastructure, such as domain identifiers, AD sites and forests, and trust relations.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1199/ T1199], [https://attack.mitre.org/techniques/T1482/ T1482], [https://attack.mitre.org/techniques/T1590/ T1590], [https://attack.mitre.org/techniques/T1591/ T1591], [https://attack.mitre.org/techniques/T1595/ T1595]
* '''Last Updated''': 2020-11-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Get-DomainSID/)=true OR match_regex(cmd_line, /(?i)Get-DomainSite/)=true OR match_regex(cmd_line, /(?i)Get-NetSite/)=true OR match_regex(cmd_line, /(?i)Get-DomainSubnet/)=true OR match_regex(cmd_line, /(?i)Get-NetSubnet/)=true OR match_regex(cmd_line, /(?i)Get-DomainTrust/)=true OR match_regex(cmd_line, /(?i)Get-NetDomainTrust/)=true OR match_regex(cmd_line, /(?i)Get-DomainTrustMapping/)=true OR match_regex(cmd_line, /(?i)Invoke-MapDomainTrust/)=true OR match_regex(cmd_line, /(?i)Get-Forest/)=true OR match_regex(cmd_line, /(?i)Get-NetForest/)=true OR match_regex(cmd_line, /(?i)Get-ForestDomain/)=true OR match_regex(cmd_line, /(?i)Get-NetForestDomain/)=true OR match_regex(cmd_line, /(?i)Get-ForestGlobalCatalog/)=true OR match_regex(cmd_line, /(?i)Get-NetForestCatalog/)=true OR match_regex(cmd_line, /(?i)Get-ForestTrust/)=true OR match_regex(cmd_line, /(?i)Get-NetForestTrust/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1199
| Trusted Relationship
| Initial Access
|-
| T1482
| Domain Trust Discovery
| Discovery
|-
| T1590
| Gather Victim Network Information
| Reconnaissance
|-
| T1591
| Gather Victim Org Information
| Reconnaissance
|-
| T1595
| Active Scanning
| Reconnaissance
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance and access to computers and domains via powersploit modules===
This detection identifies access to PowerSploit modules that discover computers, servers and domains that can be accessed or taken over.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1592/ T1592], [https://attack.mitre.org/techniques/T1590/ T1590], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2020-11-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Get-ComputerDetail/)=true OR match_regex(cmd_line, /(?i)Get-Domain/)=true OR match_regex(cmd_line, /(?i)Get-NetDomain/)=true OR match_regex(cmd_line, /(?i)Get-DomainComputer/)=true OR match_regex(cmd_line, /(?i)Get-NetComputer/)=true OR match_regex(cmd_line, /(?i)Get-DomainController/)=true OR match_regex(cmd_line, /(?i)Get-NetDomainController/)=true OR match_regex(cmd_line, /(?i)Get-DomainFileServer/)=true OR match_regex(cmd_line, /(?i)Get-NetFileServer/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1592
| Gather Victim Host Information
| Reconnaissance
|-
| T1590
| Gather Victim Network Information
| Reconnaissance
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance and access to computers via mimikatz modules===
This detection identifies use of Mimikatz modules for discovery of computers and servers and access to them.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1592/ T1592]
* '''Last Updated''': 2020-11-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)net::ServerInfo/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1592
| Gather Victim Host Information
| Reconnaissance
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance and access to operating system elements via powersploit modules===
This detection identifies access to PowerSploit modules that discover and access operating system elements, such as processes, services, registry locations, security packages and files.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1057/ T1057], [https://attack.mitre.org/techniques/T1083/ T1083], [https://attack.mitre.org/techniques/T1592/002/ T1592.002], [https://attack.mitre.org/techniques/T1046/ T1046], [https://attack.mitre.org/techniques/T1012/ T1012], [https://attack.mitre.org/techniques/T1007/ T1007], [https://attack.mitre.org/techniques/T1047/ T1047], [https://attack.mitre.org/techniques/T1592/ T1592], [https://attack.mitre.org/techniques/T1518/ T1518]
* '''Last Updated''': 2020-11-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Find-DomainProcess/)=true OR match_regex(cmd_line, /(?i)Invoke-ProcessHunter/)=true OR match_regex(cmd_line, /(?i)Get-ServiceDetail/)=true OR match_regex(cmd_line, /(?i)Get-WMIProcess/)=true OR match_regex(cmd_line, /(?i)Get-NetProcess/)=true OR match_regex(cmd_line, /(?i)Get-SecurityPackage/)=true OR match_regex(cmd_line, /(?i)Find-DomainObjectPropertyOutlier/)=true OR match_regex(cmd_line, /(?i)Get-DomainObject/)=true OR match_regex(cmd_line, /(?i)Get-ADObject/)=true OR match_regex(cmd_line, /(?i)Get-WMIRegMountedDrive/)=true OR match_regex(cmd_line, /(?i)Get-RegistryMountedDrive/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1057
| Process Discovery
| Discovery
|-
| T1083
| File and Directory Discovery
| Discovery
|-
| T1592.002
| Software
| Reconnaissance
|-
| T1046
| Network Service Scanning
| Discovery
|-
| T1012
| Query Registry
| Discovery
|-
| T1007
| System Service Discovery
| Discovery
|-
| T1047
| Windows Management Instrumentation
| Execution
|-
| T1592
| Gather Victim Host Information
| Reconnaissance
|-
| T1518
| Software Discovery
| Discovery
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance and access to processes and services via mimikatz modules===
This detection identifies use of Mimikatz modules for discovery and access to services and processes.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1007/ T1007], [https://attack.mitre.org/techniques/T1046/ T1046], [https://attack.mitre.org/techniques/T1057/ T1057]
* '''Last Updated''': 2020-11-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)process::list/)=true OR match_regex(cmd_line, /(?i)service::list/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1007
| System Service Discovery
| Discovery
|-
| T1046
| Network Service Scanning
| Discovery
|-
| T1057
| Process Discovery
| Discovery
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance and access to shared resources via mimikatz modules===
This detection identifies use of Mimikatz modules for discovery and access to network shares.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/ T1021], [https://attack.mitre.org/techniques/T1039/ T1039], [https://attack.mitre.org/techniques/T1135/ T1135], [https://attack.mitre.org/techniques/T1021/002/ T1021.002]
* '''Last Updated''': 2020-11-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)net::share/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021
| Remote Services
| Lateral Movement
|-
| T1039
| Data from Network Shared Drive
| Collection
|-
| T1135
| Network Share Discovery
| Discovery
|-
| T1021.002
| SMB/Windows Admin Shares
| Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance and access to shared resources via powersploit modules===
This detection identifies access to PowerSploit modules that discover and access network and distributed file system shares.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/ T1021], [https://attack.mitre.org/techniques/T1039/ T1039], [https://attack.mitre.org/techniques/T1135/ T1135], [https://attack.mitre.org/techniques/T1021/002/ T1021.002]
* '''Last Updated''': 2020-11-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Find-DomainShare/)=true OR match_regex(cmd_line, /(?i)Invoke-ShareFinder/)=true OR match_regex(cmd_line, /(?i)Find-InterestingDomainShareFile/)=true OR match_regex(cmd_line, /(?i)Invoke-FileFinder/)=true OR match_regex(cmd_line, /(?i)Find-InterestingFile/)=true OR match_regex(cmd_line, /(?i)Get-DomainDFSShare/)=true OR match_regex(cmd_line, /(?i)Get-DFSshare/)=true OR match_regex(cmd_line, /(?i)Get-NetShare/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021
| Remote Services
| Lateral Movement
|-
| T1039
| Data from Network Shared Drive
| Collection
|-
| T1135
| Network Share Discovery
| Discovery
|-
| T1021.002
| SMB/Windows Admin Shares
| Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance of access and persistence opportunities via powersploit modules===
This detection identifies use of PowerSploit modules that discover opportunities for malicious access and persistence. Some examples include access to admin accounts, weak access control policies, landing paths for dropping malicious software or data to exfiltrate, registry locations to land autorun parameters, task scheduling opportunities, as well as services and system files that can be compromised.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1053/ T1053], [https://attack.mitre.org/techniques/T1068/ T1068], [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1543/ T1543], [https://attack.mitre.org/techniques/T1547/ T1547], [https://attack.mitre.org/techniques/T1574/ T1574]
* '''Last Updated''': 2020-11-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Find-LocalAdminAccess/)=true OR match_regex(cmd_line, /(?i)Find-InterestingDomainAcl/)=true OR match_regex(cmd_line, /(?i)Invoke-ACLScanner/)=true OR match_regex(cmd_line, /(?i)Find-PathDLLHijack/)=true OR match_regex(cmd_line, /(?i)Find-ProcessDLLHijack/)=true OR match_regex(cmd_line, /(?i)Get-DomainObjectAcl/)=true OR match_regex(cmd_line, /(?i)Get-ObjectAcl/)=true OR match_regex(cmd_line, /(?i)Get-DomainPolicy/)=true OR match_regex(cmd_line, /(?i)Get-ModifiablePath/)=true OR match_regex(cmd_line, /(?i)Get-ModifiableRegistryAutoRun/)=true OR match_regex(cmd_line, /(?i)Get-ModifiableScheduledTaskFile/)=true OR match_regex(cmd_line, /(?i)Get-ModifiableService/)=true OR match_regex(cmd_line, /(?i)Get-ModifiableServiceFile/)=true OR match_regex(cmd_line, /(?i)Get-PathAcl/)=true OR match_regex(cmd_line, /(?i)Get-UnattendedInstallFile/)=true OR match_regex(cmd_line, /(?i)Get-UnquotedService/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|-
| T1574
| Hijack Execution Flow
| Persistence, Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance of connectivity via powersploit modules===
This detection identifies access to PowerSploit modules for reconnaissance of connectivity.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/ T1021], [https://attack.mitre.org/techniques/T1039/ T1039], [https://attack.mitre.org/techniques/T1135/ T1135], [https://attack.mitre.org/techniques/T1021/002/ T1021.002]
* '''Last Updated''': 2020-11-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Get-DomainDNSRecord/)=true OR match_regex(cmd_line, /(?i)Get-DNSRecord/)=true OR match_regex(cmd_line, /(?i)Get-DomainDNSZone/)=true OR match_regex(cmd_line, /(?i)Get-DNSZone/)=true OR match_regex(cmd_line, /(?i)Invoke-ReverseDnsLookup/)=true OR match_regex(cmd_line, /(?i)Get-WMIRegCachedRDPConnection/)=true OR match_regex(cmd_line, /(?i)Get-CachedRDPConnection/)=true OR match_regex(cmd_line, /(?i)Get-WMIRegProxy/)=true OR match_regex(cmd_line, /(?i)Get-Proxy/)=true OR match_regex(cmd_line, /(?i)Invoke-Portscan/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021
| Remote Services
| Lateral Movement
|-
| T1039
| Data from Network Shared Drive
| Collection
|-
| T1135
| Network Share Discovery
| Discovery
|-
| T1021.002
| SMB/Windows Admin Shares
| Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance of credential stores and services via mimikatz modules===
This detection identifies reconnaissance of credential stores and use of CryptoAPI services by Mimikatz modules.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1098/ T1098], [https://attack.mitre.org/techniques/T1590/001/ T1590.001], [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1589/001/ T1589.001], [https://attack.mitre.org/techniques/T1590/ T1590], [https://attack.mitre.org/techniques/T1068/ T1068], [https://attack.mitre.org/techniques/T1589/ T1589], [https://attack.mitre.org/techniques/T1590/003/ T1590.003]
* '''Last Updated''': 2020-11-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)crypto::capi/)=true OR match_regex(cmd_line, /(?i)crypto::cng/)=true OR match_regex(cmd_line, /(?i)crypto::providers/)=true OR match_regex(cmd_line, /(?i)crypto::stores/)=true OR match_regex(cmd_line, /(?i)crypto::sc/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1098
| Account Manipulation
| Persistence
|-
| T1590.001
| Domain Properties
| Reconnaissance
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1589.001
| Credentials
| Reconnaissance
|-
| T1590
| Gather Victim Network Information
| Reconnaissance
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|-
| T1589
| Gather Victim Identity Information
| Reconnaissance
|-
| T1590.003
| Network Trust Dependencies
| Reconnaissance
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance of defensive tools via powersploit modules===
This detection identifies use of PowerSploit modules for assessment of presence of defensive tools.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1592/002/ T1592.002], [https://attack.mitre.org/techniques/T1595/002/ T1595.002], [https://attack.mitre.org/techniques/T1592/ T1592], [https://attack.mitre.org/techniques/T1595/ T1595]
* '''Last Updated''': 2020-11-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Find-AVSignature/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1592.002
| Software
| Reconnaissance
|-
| T1595.002
| Vulnerability Scanning
| Reconnaissance
|-
| T1592
| Gather Victim Host Information
| Reconnaissance
|-
| T1595
| Active Scanning
| Reconnaissance
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance of privilege escalation opportunities via powersploit modules===
This detection identifies use of PowerSploit modules for assessment of privilege escalation opportunities.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1068/ T1068], [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1098/ T1098]
* '''Last Updated''': 2020-11-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Invoke-PrivescAudit/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1098
| Account Manipulation
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====


''version'': 1
</div>
</div>

----

===Reconnaissance of process or service hijacking opportunities via mimikatz modules===
This detection identifies use of Mimikatz modules for discovery of process or service hijacking opportunities via Microsoft Detours compatibility. Microsoft Detours is an open source library for intercepting, monitoring and instrumenting binary functions on Microsoft Windows. Detours intercepts Win32 functions by re-writing the in-memory code for target functions. The Detours package also contains utilities to attach arbitrary DLLs and data segments called payloads to any Win32 binary.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1543/ T1543], [https://attack.mitre.org/techniques/T1055/ T1055], [https://attack.mitre.org/techniques/T1574/ T1574]
* '''Last Updated''': 2020-11-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)misc::detours/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Discovery_Techniques|Windows Discovery Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* _time

* process

* dest_device_id

* dest_user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|-
| T1574
| Hijack Execution Flow
| Persistence, Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz

* https://en.wikipedia.org/wiki/Microsoft_Detours



====Test Dataset====


''version'': 1
</div>
</div>

----

===Recursive delete of directory in batch cmd===
This search is to detect a suspicious commandline designed to delete files or directory recursive using batch command. This technique was seen in ransomware (reddot) where it it tries to delete the files in recycle bin to impaire user from recovering deleted files.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/004/ T1070.004], [https://attack.mitre.org/techniques/T1070/ T1070]
* '''Last Updated''': 2021-06-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_cmd` Processes.process=*/c*  Processes.process=* rd * Processes.process=&#34;*/s*&#34; Processes.process=&#34;*/q*&#34; by Processes.user Processes.process_name Processes.parent_process_name Processes.parent_process Processes.process Processes.process_id Processes.dest 
|`drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `recursive_delete_of_directory_in_batch_cmd_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070.004
| File Deletion
| Defense Evasion
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network operator may use this batch command to delete recursively a directory or files within directory

====Reference====


* https://app.any.run/tasks/c0f98850-af65-4352-9746-fbebadee4f05/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data2/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Reg exe manipulating windows services registry keys===
The search looks for reg.exe modifying registry keys that define Windows services and their configurations.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1574/011/ T1574.011], [https://attack.mitre.org/techniques/T1574/ T1574]
* '''Last Updated''': 2020-11-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Processes.process_name) as process_name values(Processes.parent_process_name) as parent_process_name values(Processes.user) as user FROM datamodel=Endpoint.Processes where Processes.process_name=reg.exe Processes.process=*reg* Processes.process=*add* Processes.process=*Services* by Processes.process_id Processes.dest Processes.process 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `reg_exe_manipulating_windows_services_registry_keys_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Service_Abuse|Windows Service Abuse]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Processes.process_name

* Processes.parent_process_name

* Processes.user

* Processes.process

* Processes.process_id

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1574.011
| Services Registry Permissions Weakness
| Persistence, Privilege Escalation, Defense Evasion
|-
| T1574
| Hijack Execution Flow
| Persistence, Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Installation


====Known False Positives====
It is unusual for a service to be created or modified by directly manipulating the registry. However, there may be legitimate instances of this behavior. It is important to validate and investigate, as appropriate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1574.011/change_registry_path_service/windows-sysmon.log


''version'': 5
</div>
</div>

----

===Registry keys used for persistence===
The search looks for modifications to registry keys that can be used to launch an application or service at system startup.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/001/ T1547.001], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2021-09-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Registry.registry_key_name) as registry_key_name values(Registry.registry_path) as registry_path min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where (Registry.registry_path=*\\currentversion\\run* OR Registry.registry_path=*\\currentVersion\\Windows\\Appinit_Dlls* OR Registry.registry_path=*\\CurrentVersion\\Winlogon\\Shell* OR Registry.registry_path=*\\CurrentVersion\\Winlogon\\Notify* OR Registry.registry_path=*\\CurrentVersion\\Winlogon\\Userinit* OR Registry.registry_path=*\\CurrentVersion\\Winlogon\\VmApplet* OR Registry.registry_path=*\\currentversion\\policies\\explorer\\run* OR Registry.registry_path=*\\currentversion\\runservices* OR Registry.registry_path=HKLM\\SOFTWARE\\Microsoft\\Netsh\\* OR (Registry.registry_path=&#34;*Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options*&#34; AND Registry.registry_key_name=Debugger) OR (Registry.registry_path=&#34;*\\CurrentControlSet\\Control\\Lsa&#34; AND Registry.registry_key_name=&#34;Security Packages&#34;) OR (Registry.registry_path=&#34;*\\CurrentControlSet\\Control\\Lsa\\OSConfig&#34; AND Registry.registry_key_name=&#34;Security Packages&#34;) OR (Registry.registry_path=&#34;*\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\*&#34;) OR (Registry.registry_path=&#34;*currentVersion\\Windows&#34; AND Registry.registry_key_name=&#34;Load&#34;) OR (Registry.registry_path=&#34;*\\CurrentVersion&#34; AND Registry.registry_key_name=&#34;Svchost&#34;) OR (Registry.registry_path=&#34;*\\CurrentControlSet\Control\Session Manager&#34;AND Registry.registry_key_name=&#34;BootExecute&#34;) OR (Registry.registry_path=&#34;*\\Software\\Run&#34; AND Registry.registry_key_name=&#34;auto_update&#34;)) by Registry.dest Registry.user 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `registry_keys_used_for_persistence_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Windows_Registry_Activities|Suspicious Windows Registry Activities]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_MSHTA_Activity|Suspicious MSHTA Activity]]

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]

* [[Documentation:ESSOC:stories:UseCase#Possible_Backdoor_Activity_Associated_With_MUDCARP_Espionage_Campaigns|Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Emotet_Malware__DHS_Report_TA18-201A_|Emotet Malware  DHS Report TA18-201A ]]

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.dest

* Registry.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.001
| Registry Run Keys / Startup Folder
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
There are many legitimate applications that must execute on system startup and will use these registry keys to accomplish that task.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.001/atomic_red_team/windows-sysmon.log


''version'': 6
</div>
</div>

----

===Registry keys used for privilege escalation===
This search looks for modifications to registry keys that can be used to elevate privileges. The registry keys under &#34;Image File Execution Options&#34; are used to intercept calls to an executable and can be used to attach malicious binaries to benign system binaries.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1546/012/ T1546.012], [https://attack.mitre.org/techniques/T1546/ T1546]
* '''Last Updated''': 2020-11-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where (Registry.registry_path=&#34;*Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options*&#34;) AND (Registry.registry_key_name=GlobalFlag OR Registry.registry_key_name=Debugger) by Registry.dest  Registry.user Registry.registry_path Registry.registry_key_name 
| `security_content_ctime(lastTime)`  
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `registry_keys_used_for_privilege_escalation_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Windows_Registry_Activities|Suspicious Windows Registry Activities]]

* [[Documentation:ESSOC:stories:UseCase#Cloud_Federated_Credential_Abuse|Cloud Federated Credential Abuse]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black, or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_key_name

* Registry.dest

* Registry.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1546.012
| Image File Execution Options Injection
| Privilege Escalation, Persistence
|-
| T1546
| Event Triggered Execution
| Privilege Escalation, Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
There are many legitimate applications that must execute upon system startup and will use these registry keys to accomplish that task.

====Reference====


* https://blog.malwarebytes.com/101/2015/12/an-introduction-to-image-file-execution-options/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.012/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Registry keys for creating shim databases===
This search looks for registry activity associated with application compatibility shims, which can be leveraged by attackers for various nefarious purposes.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1546/011/ T1546.011], [https://attack.mitre.org/techniques/T1546/ T1546]
* '''Last Updated''': 2020-11-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Registry.registry_key_name) as registry_key_name min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path=*CurrentVersion\\AppCompatFlags\\Custom* OR Registry.registry_path=*CurrentVersion\\AppCompatFlags\\InstalledSDB* by Registry.dest Registry.user 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `registry_keys_for_creating_shim_databases_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Windows_Registry_Activities|Suspicious Windows Registry Activities]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
To successfully implement this search, you must populate the Change_Analysis data model. This is typically populated via endpoint detection and response product, such as Carbon Black or other endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_path

* Registry.dest

* Registry.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1546.011
| Application Shimming
| Privilege Escalation, Persistence
|-
| T1546
| Event Triggered Execution
| Privilege Escalation, Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
There are many legitimate applications that leverage shim databases for compatibility purposes for legacy applications

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.011/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Regsvr32 silent param dll loading===
This analytic is to detect a loading of dll using regsvr32 application with silent parameter and dllinstall execution. This technique was seen in several RAT malware like remcos, njrat and APT&#39;s to load their malicious dll in the compromised machine. This TTP may executed by normal 3rd party application so it is better to pivot the parent process, parent commandline and commandline of the file that execute this regsvr32.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/010/ T1218.010]
* '''Last Updated''': 2021-10-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = regsvr32.exe Processes.process=&#34;*/i*&#34; Processes.process=&#34;*/s*&#34; by Processes.dest Processes.parent_process Processes.process Processes.parent_process_name Processes.process_name Processes.original_file_name Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `regsvr32_silent_param_dll_loading_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvr32_Activity|Suspicious Regsvr32 Activity]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.010
| Regsvr32
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Other third part application may used this parameter but not so common in base windows environment.

====Reference====


* https://app.any.run/tasks/dc93ee63-050c-4ff8-b07e-8277af9ab939/#

* https://attack.mitre.org/techniques/T1218/010/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.005/vbs_wscript/sysmon.log


''version'': 1
</div>
</div>

----

===Remcos rat file creation in remcos folder===
This search is to detect file creation in remcos folder in appdata which is the keylog and clipboard logs that will be send to its c2 server. This is really a good TTP indicator that there is a remcos rat in the system that do keylogging, clipboard grabbing and audio recording.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1113/ T1113]
* '''Last Updated''': 2021-09-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
|tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_name IN (&#34;*.dat&#34;) Filesystem.file_path = &#34;*\\remcos\\*&#34; by _time Filesystem.file_name Filesystem.file_path Filesystem.dest Filesystem.file_create_time 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `remcos_rat_file_creation_in_remcos_folder_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* dest

* file_create_time

* file_name

* file_path



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1113
| Screen Capture
| Collection
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://success.trendmicro.com/solution/1123281-remcos-malware-information

* https://blog.malwarebytes.com/threat-intelligence/2021/07/remcos-rat-delivered-via-visual-basic/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/remcos/remcos_agent/sysmon.log


''version'': 1
</div>
</div>

----

===Remcos client registry install entry===
This search detects registry key license at host where Remcos RAT agent is installed.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1112/ T1112]
* '''Last Updated''': 2021-09-24

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Registry.registry_path) as  registry_path FROM datamodel=Endpoint.Registry where (Registry.registry_key_name=*\\Software\\Remcos*) by Registry.dest  Registry.user Registry.registry_key_name Registry.process_id
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)`
|`remcos_client_registry_install_entry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_key_name

* Registry.process_id

* Registry.dest

* Registry.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1112
| Modify Registry
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://attack.mitre.org/software/S0332/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/remcos/remcos_panel_client/remcos_registry_entry.log


''version'': 1
</div>
</div>

----

===Remote desktop process running on system===
This search looks for the remote desktop process mstsc.exe running on systems upon which it doesn&#39;t typically run. This is accomplished by filtering out all systems that are noted in the `common_rdp_source category` in the Assets and Identity framework.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/001/ T1021.001], [https://attack.mitre.org/techniques/T1021/ T1021]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process=*mstsc.exe AND Processes.dest_category!=common_rdp_source by Processes.dest Processes.user Processes.process 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `drop_dm_object_name(Processes)` 
| `remote_desktop_process_running_on_system_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Hidden_Cobra_Malware|Hidden Cobra Malware]]

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records process activity from your hosts to populate the endpoint data model in the processes node. The search requires you to identify systems that do not commonly use remote desktop. You can use the included support search &#34;Identify Systems Using Remote Desktop&#34; to identify these systems. After identifying them, you will need to add the &#34;common_rdp_source&#34; category to that system using the Enterprise Security Assets and Identities framework. This can be done by adding an entry in the assets.csv file located in `SA-IdentityManagement/lookups`.

====Required field====

* _time

* Processes.process

* Processes.dest_category

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021.001
| Remote Desktop Protocol
| Lateral Movement
|-
| T1021
| Remote Services
| Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Remote Desktop may be used legitimately by users on the network.

====Reference====


====Test Dataset====


''version'': 5
</div>
</div>

----

===Remote process instantiation via wmi===
This analytic identifies wmic.exe being launched with parameters to spawn a process on a remote system.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1047/ T1047]
* '''Last Updated''': 2020-11-30

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_wmic` Processes.process=&#34;*/node*&#34; Processes.process=&#34;*process*&#34; Processes.process=&#34;*call*&#34; Processes.process=&#34;*create*&#34;   by Processes.process_name Processes.original_file_name Processes.parent_process_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `remote_process_instantiation_via_wmi_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_WMI_Use|Suspicious WMI Use]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1047
| Windows Management Instrumentation
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
The wmic.exe utility is a benign Windows application. It may be used legitimately by Administrators with these parameters for remote system administration, but it&#39;s relatively uncommon.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1047/atomic_red_team/windows-sysmon.log


''version'': 6
</div>
</div>

----

===Remote system discovery with adsisearcher===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the `[Adsisearcher]` type accelerator being used to query Active Directory for domain computers. Red Teams and adversaries may leverage `[Adsisearcher]` to enumerate domain computers for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*[adsisearcher]*&#34; AND Message = &#34;*objectclass=computer*&#34; AND Message = &#34;*findAll()*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `remote_system_discovery_with_adsisearcher_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use Adsisearcher for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/

* https://devblogs.microsoft.com/scripting/use-the-powershell-adsisearcher-type-accelerator-to-search-active-directory/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Remote system discovery with dsquery===
This analytic looks for the execution of `dsquery.exe` with command-line arguments utilized to discover remote systems. The `computer` argument returns a list of all computers registered in the domain. Red Teams and adversaries alike engage in remote system discovery for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-08-31

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;dsquery.exe&#34;) (Processes.process=&#34;*computer*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `remote_system_discovery_with_dsquery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/

* https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc732952(v=ws.11)



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Remote system discovery with net===
This analytic looks for the execution of `net.exe` or `net1.exe` with command-line arguments utilized to discover remote systems. The argument `domain computers /domain` returns a list of all domain computers. Red Teams and adversaries alike use net.exe to identify remote systems for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-08-30

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;net.exe&#34; OR Processes.process_name=&#34;net1.exe&#34;) (Processes.process=&#34;*domain computers*&#34; AND Processes.process=*/do*) OR (Processes.process=&#34;*view*&#34; AND Processes.process=*/do*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `remote_system_discovery_with_net_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Remote system discovery with wmic===
This analytic looks for the execution of `wmic.exe` with command-line arguments utilized to discover remote systems. The arguments utilized in this command return a list of all the systems registered in the domain. Red Teams and adversaries alike may leverage WMI and wmic.exe to identify remote systems for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2021-09-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;wmic.exe&#34;) (Processes.process=*/NAMESPACE:\\\\root\\directory\\ldap* AND Processes.process=*ds_computer* AND Processes.process=&#34;*GET ds_samaccountname*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `remote_system_discovery_with_wmic_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1018/

* https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmic



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Remote wmi command attempt===
The following analytic identifies usage of `wmic.exe` spawning a local or remote process, identified by the `node` switch. During triage, review parallel processes for additional commands executed. Look for any file modifications before and after `wmic.exe` execution. In addition, identify the remote endpoint and confirm execution or file modifications. Contain and isolate the endpoint as needed.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1047/ T1047]
* '''Last Updated''': 2018-12-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_wmic` Processes.process=*node* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `remote_wmi_command_attempt_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_WMI_Use|Suspicious WMI Use]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product. Deprecated because duplicate of Remote Process Instantiation via WMI.

====Required field====

* _time

* Processes.user

* Processes.process_name

* Processes.parent_process_name

* Processes.dest

* Processes.parent_process

* Processes.parent_process_id

* Processes.process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1047
| Windows Management Instrumentation
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators may use this legitimately to gather info from remote systems. Filter as needed.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1047/T1047.yaml



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1047/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Resize shadowstorage volume===
The following analytics identifies the resizing of shadowstorage by ransomware malware to avoid the shadow volumes being made again. this technique is an alternative by ransomware attacker than deleting the shadowstorage which is known alert in defensive team. one example of ransomware that use this technique is CLOP ransomware where it drops a .bat file that will resize the shadowstorage to minimum size as much as possible

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1490/ T1490]
* '''Last Updated''': 2021-03-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as cmdline values(Processes.parent_process_name) as parent_process values(Processes.process_name) as process_name min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name = &#34;cmd.exe&#34; OR Processes.parent_process_name = &#34;powershell.exe&#34; OR Processes.parent_process_name = &#34;powershell_ise.exe&#34; OR Processes.parent_process_name =  &#34;wmic.exe&#34; Processes.process_name = &#34;vssadmin.exe&#34; Processes.process=&#34;*resize*&#34; Processes.process=&#34;*shadowstorage*&#34; Processes.process=&#34;*/maxsize*&#34; by Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process Processes.dest Processes.user Processes.process_id Processes.process_guid 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `resize_shadowstorage_volume_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* Processes.process

* Process.parent_process_name

* _time

* Processes.process_name

* Processes.parent_process

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1490
| Inhibit System Recovery
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network admin can resize the shadowstorage for valid purposes.

====Reference====


* https://www.fireeye.com/blog/threat-research/2020/10/fin11-email-campaigns-precursor-for-ransomware-data-theft.html

* https://blog.virustotal.com/2020/11/keep-your-friends-close-keep-ransomware.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/clop/clop_a/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Resize shadowstorage volume===
The following analytics identifies the resizing of shadowstorage by ransomware malware to avoid the shadow volumes being made again. this technique is an alternative by ransomware attacker than deleting the shadowstorage which is known alert in defensive team. one example of ransomware that use this technique is CLOP ransomware where it drops a .bat file that will resize the shadowstorage to minimum size as much as possible

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1489/ T1489]
* '''Last Updated''': 2021-06-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=lower(ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null)), process_name=lower(ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null)), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line IS NOT NULL AND like(cmd_line, &#34;%resize%&#34;) AND like(cmd_line, &#34;%shadowstorage%&#34;) AND like(cmd_line, &#34;%maxsize%&#34;) AND process_name=&#34;vssadmin.exe&#34; 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name, &#34;process_path&#34;, process_path]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* dest_device_id

* process_name

* parent_process_name

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1489
| Service Stop
| Impact
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network admin can resize the shadowstorage for valid purposes.

====Reference====


* https://www.fireeye.com/blog/threat-research/2020/10/fin11-email-campaigns-precursor-for-ransomware-data-theft.html

* https://blog.virustotal.com/2020/11/keep-your-friends-close-keep-ransomware.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/ssa_data1/windows-security.log


''version'': 2
</div>
</div>

----

===Revil common exec parameter===
This analytic identifies suspicious commandline parameter that are commonly used by REVIL ransomware to encrypts the compromise machine.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/ T1204]
* '''Last Updated''': 2021-06-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process = &#34;* -nolan *&#34; OR Processes.process = &#34;* -nolocal *&#34; OR Processes.process = &#34;* -fast *&#34; OR Processes.process = &#34;* -full *&#34; by Processes.process_name Processes.process Processes.parent_process_name Processes.parent_process Processes.dest Processes.user Processes.process_id Processes.process_guid 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `revil_common_exec_parameter_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Revil_Ransomware|Revil Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.parent_process

* Processes.dest

* Processes.user

* Processes.process_id

* Processes.process_guid



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204
| User Execution
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
third party tool may have same command line parameters as revil ransomware.

====Reference====


* https://krebsonsecurity.com/2021/05/a-closer-look-at-the-darkside-ransomware-gang/

* https://www.mcafee.com/blogs/other-blogs/mcafee-labs/mcafee-atr-analyzes-sodinokibi-aka-revil-ransomware-as-a-service-what-the-code-tells-us/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/revil/inf1/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Revil registry entry===
This analytic identifies suspicious modification in registry entry to keep some malware data during its infection. This technique seen in several apt implant, malware and ransomware like REVIL where it keep some information like the random generated file extension it uses for all the encrypted files and ransomware notes file name in the compromised host.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1112/ T1112]
* '''Last Updated''': 2021-06-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Registry.registry_key_name) as registry_key_name values(Registry.registry_path) as registry_path min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where (Registry.registry_path=&#34;*\\SOFTWARE\\WOW6432Node\\Facebook_Assistant\\*&#34; OR Registry.registry_path=&#34;*\\SOFTWARE\\WOW6432Node\\BlackLivesMatter*&#34;) AND (Registry.registry_value_name = &#34;\.*&#34; OR Registry.registry_value_name = &#34;Binary Data&#34;) by Registry.registry_value_name Registry.dest Registry.user 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `revil_registry_entry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Revil_Ransomware|Revil Ransomware]]


====How To Implement====
to successfully implement this search, you need to be ingesting logs with the Image, TargetObject registry key, registry Details from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Registry.dest

* Registry.user

* Registry.registry_value_name

* Registry.registry_path

* Registry.registry_key_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1112
| Modify Registry
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://krebsonsecurity.com/2021/05/a-closer-look-at-the-darkside-ransomware-gang/

* https://www.mcafee.com/blogs/other-blogs/mcafee-labs/mcafee-atr-analyzes-sodinokibi-aka-revil-ransomware-as-a-service-what-the-code-tells-us/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/revil/inf1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Rundll loading dll by ordinal===
This search looks for executing scripts with rundll32. Adversaries may abuse rundll32.exe to proxy execution of malicious code. Using rundll32.exe, vice executing directly, may avoid triggering security tools that may not monitor execution of the rundll32.exe process because of allowlists or false positives from normal operations.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2020-11-30

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_rundll32` by Processes.process_name Processes.parent_process_name Processes.original_file_name Processes.process Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `rundll_loading_dll_by_ordinal_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Installation


====Known False Positives====
While not common, loading a DLL under %AppData% and calling a function by ordinal is possible by a legitimate process

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.011/atomic_red_team/windows-sysmon.log


''version'': 5
</div>
</div>

----

===Rundll32 control rundll hunt===
The following hunting detection identifies rundll32.exe with `control_rundll` within the command-line, loading a .cpl or another file type. Developed in relation to CVE-2021-40444. Rundll32.exe can also be used to execute Control Panel Item files (.cpl) through the undocumented shell32.dll functions Control_RunDLL and Control_RunDLLAsUser. Double-clicking a .cpl file also causes rundll32.exe to execute. \ This is written to be a bit more broad by not including .cpl. \ During triage, review parallel processes to identify any further suspicious behavior.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-09-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=rundll32.exe OR Processes.original_file_name=RUNDLL32.EXE) Processes.process=*Control_RunDLL*  by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `rundll32_control_rundll_hunt_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]

* [[Documentation:ESSOC:stories:UseCase#Microsoft_MSHTML_Remote_Code_Execution_CVE-2021-40444|Microsoft MSHTML Remote Code Execution CVE-2021-40444]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
This is a hunting detection, meant to provide a understanding of how voluminous control_rundll is within the environment.

====Reference====


* https://strontic.github.io/xcyclopedia/library/rundll32.exe-111474C61232202B5B588D2B512CBB25.html

* https://app.any.run/tasks/36c14029-9df8-439c-bba0-45f2643b0c70/

* https://attack.mitre.org/techniques/T1218/011/

* https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.002/T1218.002.yaml



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.002/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Rundll32 control rundll world writable directory===
The following detection identifies rundll32.exe with `control_rundll` within the command-line, loading a .cpl or another file type from windows\temp, programdata, or appdata. Developed in relation to CVE-2021-40444. Rundll32.exe can also be used to execute Control Panel Item files (.cpl) through the undocumented shell32.dll functions Control_RunDLL and Control_RunDLLAsUser. Double-clicking a .cpl file also causes rundll32.exe to execute. This is written to be a bit more broad by not including .cpl. The paths are specified, add more as needed. During triage, review parallel processes to identify any further suspicious behavior.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-09-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=rundll32.exe OR Processes.original_file_name=RUNDLL32.EXE) Processes.process=*Control_RunDLL* AND Processes.process IN (&#34;*\\appdata\\*&#34;, &#34;*\\windows\\temp\\*&#34;, &#34;*\\programdata\\*&#34;)  by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `rundll32_control_rundll_world_writable_directory_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]

* [[Documentation:ESSOC:stories:UseCase#Microsoft_MSHTML_Remote_Code_Execution_CVE-2021-40444|Microsoft MSHTML Remote Code Execution CVE-2021-40444]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
This may be tuned, or a new one related, by adding .cpl to command-line. However, it&#39;s important to look for both. Tune/filter as needed.

====Reference====


* https://strontic.github.io/xcyclopedia/library/rundll32.exe-111474C61232202B5B588D2B512CBB25.html

* https://app.any.run/tasks/36c14029-9df8-439c-bba0-45f2643b0c70/

* https://attack.mitre.org/techniques/T1218/011/

* https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.002/T1218.002.yaml



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.002/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Rundll32 create remote thread to a process===
This analytic identifies the suspicious Remote Thread execution of rundll32.exe process to cmd.exe process. This technique was seen in IcedID malware to execute its malicious code in normal process for defense evasion and to steal sensitive information the the compromised host. browser process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-07-29

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=8 SourceImage = &#34;*\\rundll32.exe&#34; TargetImage = &#34;*.exe&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by SourceImage TargetImage TargetProcessId SourceProcessId StartAddress EventCode Computer 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `rundll32_create_remote_thread_to_a_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the SourceImage, TargetImage, and EventCode executions from your endpoints related to create remote thread or injecting codes. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* SourceImage

* TargetImage

* TargetProcessId

* SourceProcessId

* StartAddress

* EventCode

* Computer



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.joesandbox.com/analysis/380662/0/html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/inf_icedid/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Rundll32 createremotethread in browser===
This analytic identifies the suspicious Remote Thread execution of rundll32.exe process to &#34;firefox.exe&#34; and &#34;chrome.exe&#34; browser. This technique was seen in IcedID malware where it hooks the browser to parse banking information as user used the targetted browser process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-07-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=8 SourceImage = &#34;*\\rundll32.exe&#34; TargetImage IN (&#34;*\\firefox.exe&#34;, &#34;*\\chrome.exe&#34;, &#34;*\\iexplore.exe&#34;,&#34;*\\microsoftedgecp.exe&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by SourceImage TargetImage TargetProcessId SourceProcessId StartAddress EventCode Computer 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `rundll32_createremotethread_in_browser_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the SourceImage, TargetImage, and EventCode executions from your endpoints related to create remote thread or injecting codes. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* SourceImage

* TargetImage

* TargetProcessId

* SourceProcessId

* StartAddress

* EventCode

* Computer



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.joesandbox.com/analysis/380662/0/html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/inf_icedid/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Rundll32 dnsquery===
This search is to detect a suspicious rundll32.exe process having a http connection and do a dns query in some web domain. This technique was seen in IcedID malware where the rundll32 that execute its payload will contact amazon.com to check internet connect and to communicate to its C&amp;C server to download config and other file component.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-07-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=22 process_name=&#34;rundll32.exe&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by Image QueryName QueryStatus ProcessId direction Computer 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `rundll32_dnsquery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name and eventcode = 22 dnsquery executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Image

* QueryName

* QueryStatus

* ProcessId

* direction

* Computer



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://any.run/malware-trends/icedid



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/inf_icedid/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Rundll32 process creating exe dll files===
This search is to detect a suspicious rundll32 process that drops executable (.exe or .dll) files. this behavior seen in rundll32 process of IcedID that tries to drop copy of itself in temp folder or download executable drop it either appdata or programdata as part of its execution.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-07-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=11 process_name=&#34;rundll32.exe&#34; TargetFilename IN (&#34;*.exe&#34;, &#34;*.dll&#34;,) 
| stats count min(_time) as firstTime max(_time) as lastTime by Image TargetFilename ProcessGuid dest user_id 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `rundll32_process_creating_exe_dll_files_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, TargetFilename, and eventcode 11 executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* Image

* TargetFilename

* ProcessGuid

* dest

* user_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://any.run/malware-trends/icedid



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/inf_icedid/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Rundll32 shimcache flush===
This analytic is to detect a suspicious rundll32 commandline to clear shim cache. This technique is a anti-forensic technique to clear the cache taht are one important artifacts in terms of digital forensic during attacks or incident. This TTP is a good indicator that someone tries to evade some tools and clear foothold on the machine.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1112/ T1112]
* '''Last Updated''': 2021-10-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where  `process_rundll32` AND Processes.process = &#34;*apphelp.dll,ShimFlushCache*&#34; by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `rundll32_shimcache_flush_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1112
| Modify Registry
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://blueteamops.medium.com/shimcache-flush-89daff28d15e



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1112/shimcache_flush/sysmon.log


''version'': 1
</div>
</div>

----

===Rundll32 with no command line arguments with network===
The following analytic identifies rundll32.exe with no command line arguments and performing a network connection. It is unusual for rundll32.exe to execute with no command line arguments present. This particular behavior is common with malicious software, including Cobalt Strike. During investigation, triage any network connections and parallel processes. Identify any suspicious module loads related to credential dumping or file writes. Rundll32.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-10-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where `process_rundll32` by _time span=1h  Processes.process_guid Processes.process_name Processes.dest Processes.process_path Processes.process Processes.parent_process_name Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| regex process=&#34;(rundll32\.exe.{0,4}$)&#34; 
| join  process_guid [
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Ports where Ports.dest_port !=&#34;0&#34; by Ports.process_guid Ports.dest Ports.dest_port
| `drop_dm_object_name(Ports)` 
| rename  dest as connection_to_CNC] 
| table _time dest parent_process_name process_name process_path process process_guid connection_to_CNC dest_port 
| `rundll32_with_no_command_line_arguments_with_network_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]

* [[Documentation:ESSOC:stories:UseCase#PrintNightmare_CVE-2021-34527|PrintNightmare CVE-2021-34527]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` and `port` node. To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Although unlikely, some legitimate applications may use a moved copy of rundll32, triggering a false positive.

====Reference====


* https://attack.mitre.org/techniques/T1218/011/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.011/T1218.011.md

* https://lolbas-project.github.io/lolbas/Binaries/Rundll32

* https://bohops.com/2018/02/26/leveraging-inf-sct-fetch-execute-techniques-for-bypass-evasion-persistence/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Ryuk test files detected===
The search looks for files that contain the key word *Ryuk* under any folder in the C drive, which is consistent with Ryuk propagation.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1486/ T1486]
* '''Last Updated''': 2020-11-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem WHERE &#34;Filesystem.file_path&#34;=C:\\*Ryuk* BY &#34;Filesystem.dest&#34;, &#34;Filesystem.user&#34;, &#34;Filesystem.file_path&#34; 
| `drop_dm_object_name(Filesystem)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `ryuk_test_files_detected_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]


====How To Implement====
You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint Filesystem data-model object. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data.

====Required field====

* _time

* Filesystem.file_path

* Filesystem.dest

* Filesystem.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1486
| Data Encrypted for Impact
| Impact
|}


====Kill Chain Phase====

* Delivery


====Known False Positives====
If there are files with this keywoord as file names it might trigger false possitives, please make use of our filters to tune out potential FPs.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ryuk/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Ryuk wake on lan command===
This Splunk query identifies the use of Wake-on-LAN utilized by Ryuk ransomware. The Ryuk Ransomware uses the Wake-on-Lan feature to turn on powered off devices on a compromised network to have greater success encrypting them. This is a high fidelity indicator of Ryuk ransomware executing on an endpoint. Upon triage, isolate the endpoint. Additional file modification events will be within the users profile (\appdata\roaming) and in public directories (users\public\). Review all Scheduled Tasks on the isolated endpoint and across the fleet. Suspicious Scheduled Tasks will include a path to a unknown binary and those endpoints should be isolated until triaged.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/003/ T1059.003]
* '''Last Updated''': 2021-03-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process=&#34;*8 LAN*&#34; OR Processes.process=&#34;*9 REP*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `ryuk_wake_on_lan_command_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.003
| Windows Command Shell
| Execution
|}


====Kill Chain Phase====

* Exploitation

* Lateral Movement


====Known False Positives====
Limited to no known false positives.

====Reference====


* https://www.bleepingcomputer.com/news/security/ryuk-ransomware-uses-wake-on-lan-to-encrypt-offline-devices/

* https://www.bleepingcomputer.com/news/security/ryuk-ransomware-now-self-spreads-to-other-windows-lan-devices/

* https://www.cert.ssi.gouv.fr/uploads/CERTFR-2021-CTI-006.pdf



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.003/ryuk/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Sam database file access attempt===
The following analytic identifies access to SAM, SYSTEM or SECURITY databases&#39; within the file path of `windows\system32\config` using Windows Security EventCode 4663. This particular behavior is related to credential access, an attempt to either use a Shadow Copy or recent CVE-2021-36934 to access the SAM database. The Security Account Manager (SAM) is a database file in Windows XP, Windows Vista, Windows 7, 8.1 and 10 that stores users&#39; passwords.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/002/ T1003.002], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-07-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` (EventCode=4663)  process_name!=*\\dllhost.exe Object_Name IN (&#34;*\\Windows\\System32\\config\\SAM*&#34;,&#34;*\\Windows\\System32\\config\\SYSTEM*&#34;,&#34;*\\Windows\\System32\\config\\SECURITY*&#34;) 
| stats values(Accesses) count by process_name Object_Name  dest user 
| `sam_database_file_access_attempt_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663. For 4663, enable &#34;Audit Object Access&#34; in Group Policy. Then check the two boxes listed for both &#34;Success&#34; and &#34;Failure.&#34;

====Required field====

* _time

* process_name

* Object_Name

* dest

* user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.002
| Security Account Manager
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Natively, `dllhost.exe` will access the files. Every environment will have additional native processes that do as well. Filter by process_name. As an aside, one can remove process_name entirely and add `Object_Name=*ShadowCopy*`.

====Reference====


* https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4663

* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4663

* https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-36934

* https://github.com/GossiTheDog/HiveNightmare

* https://github.com/JumpsecLabs/Guidance-Advice/tree/main/SAM_Permissions

* https://en.wikipedia.org/wiki/Security_Account_Manager



====Test Dataset====


''version'': 1
</div>
</div>

----

===Slui runas elevated===
The following analytic identifies the Microsoft Software Licensing User Interface Tool, `slui.exe`, elevating access using the `-verb runas` function. This particular bypass utilizes a registry key/value. Identified by two sources, the registry keys are `HKCU\Software\Classes\exefile\shell` and `HKCU\Software\Classes\launcher.Systemsettings\Shell\open\command`. To simulate this behavior, multiple POC are available. The analytic identifies the use of `runas` by `slui.exe`.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/002/ T1548.002], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-05-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=slui.exe (Processes.process=*-verb* Processes.process=*runas*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `slui_runas_elevated_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548.002
| Bypass User Account Control
| Privilege Escalation, Defense Evasion
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives should be present as this is not commonly used by legitimate applications.

====Reference====


* https://www.exploit-db.com/exploits/46998

* https://medium.com/@mattharr0ey/privilege-escalation-uac-bypass-in-changepk-c40b92818d1b

* https://gist.github.com/r00t-3xp10it/0c92cd554d3156fd74f6c25660ccc466

* https://www.rapid7.com/db/modules/exploit/windows/local/bypassuac_sluihijack/

* https://www.fireeye.com/blog/threat-research/2021/05/shining-a-light-on-darkside-ransomware-operations.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548.002/slui/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Slui spawning a process===
The following analytic identifies the Microsoft Software Licensing User Interface Tool, `slui.exe`, spawning a child process. This behavior is associated with publicly known UAC bypass. `slui.exe` is commonly associated with software updates and is most often spawned by `svchost.exe`. The `slui.exe` process should not have child processes, and any processes spawning from it will be running with elevated privileges. During triage, review the child process and additional parallel processes. Identify any file modifications that may have lead to the bypass.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/002/ T1548.002], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-05-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=slui.exe by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `slui_spawning_a_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DarkSide_Ransomware|DarkSide Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548.002
| Bypass User Account Control
| Privilege Escalation, Defense Evasion
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Certain applications may spawn from `slui.exe` that are legitimate. Filtering will be needed to ensure proper monitoring.

====Reference====


* https://www.exploit-db.com/exploits/46998

* https://www.rapid7.com/db/modules/exploit/windows/local/bypassuac_sluihijack/

* https://www.fireeye.com/blog/threat-research/2021/05/shining-a-light-on-darkside-ransomware-operations.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548.002/slui/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Samsam test file write===
The search looks for a file named &#34;test.txt&#34; written to the windows system directory tree, which is consistent with Samsam propagation.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1486/ T1486]
* '''Last Updated''': 2018-12-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Filesystem.user) as user values(Filesystem.dest) as dest values(Filesystem.file_name) as file_name from datamodel=Endpoint.Filesystem where Filesystem.file_path=*\\windows\\system32\\test.txt by Filesystem.file_path 
| `drop_dm_object_name(Filesystem)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `samsam_test_file_write_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]


====How To Implement====
You must be ingesting data that records the file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data.

====Required field====

* _time

* Filesystem.user

* Filesystem.dest

* Filesystem.file_name

* Filesystem.file_path



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1486
| Data Encrypted for Impact
| Impact
|}


====Kill Chain Phase====

* Delivery


====Known False Positives====
No false positives have been identified.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1486/sam_sam_note/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Sc exe manipulating windows services===
This search looks for arguments to sc.exe indicating the creation or modification of a Windows service.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1543/003/ T1543.003], [https://attack.mitre.org/techniques/T1543/ T1543]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = sc.exe (Processes.process=&#34;* create *&#34; OR Processes.process=&#34;* config *&#34;) by Processes.process_name Processes.parent_process_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `sc_exe_manipulating_windows_services_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Service_Abuse|Windows Service Abuse]]

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]

* [[Documentation:ESSOC:stories:UseCase#Orangeworm_Attack_Group|Orangeworm Attack Group]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Disabling_Security_Tools|Disabling Security Tools]]

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1543.003
| Windows Service
| Persistence, Privilege Escalation
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Installation


====Known False Positives====
Using sc.exe to manipulate Windows services is uncommon. However, there may be legitimate instances of this behavior. It is important to validate and investigate as appropriate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1543.003/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Schcache change by app connect and create adsi object===
This analytic is to detect an application try to connect and create ADSI Object to do LDAP query. Every time an application connects to the directory and attempts to create an ADSI object, the Active Directory Schema is checked for changes. If it has changed since the last connection, the schema is downloaded and stored in a cache on the local computer either in %LOCALAPPDATA%\Microsoft\Windows\SchCache or %systemroot%\SchCache. We found this a good anomaly use case to detect suspicious application like blackmatter ransomware that use ADS object api to execute ldap query. having a good list of ldap or normal AD query tool used within the network is a good start to reduce the noise.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1087/002/ T1087.002], [https://attack.mitre.org/techniques/T1087/ T1087]
* '''Last Updated''': 2021-09-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=11  TargetFilename = &#34;*\\Windows\\SchCache\\*&#34; TargetFilename = &#34;*.sch*&#34; NOT (Image IN (&#34;*\\Windows\\system32\\mmc.exe&#34;)) 
|stats count min(_time) as firstTime max(_time) as lastTime by Image TargetFilename EventCode process_id  process_name Computer 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `schcache_change_by_app_connect_and_create_adsi_object_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#blackMatter_ransomware|blackMatter ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Image

* TargetFilename

* EventCode

* process_id

* process_name

* Computer



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1087.002
| Domain Account
| Discovery
|-
| T1087
| Account Discovery
| Discovery
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
normal application like mmc.exe and other ldap query tool may trigger this detections.

====Reference====


* https://docs.microsoft.com/en-us/windows/win32/adsi/adsi-and-uac

* https://news.sophos.com/en-us/2021/08/09/blackmatter-ransomware-emerges-from-the-shadow-of-darkside/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1087.002/blackmatter_schcache/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Schedule task with http command arguments===
The following query utilizes Windows Security EventCode 4698, `A scheduled task was created`, to identify suspicious tasks registered on Windows either via schtasks.exe OR TaskService with an arguments &#34;HTTP&#34; string that are unique entry of malware or attack that uses lolbin to download other file or payload to the infected machine. The search will return the first time and last time the task was registered, as well as the `Command` to be executed, `Task Name`, `Author`, `Enabled`, and whether it is `Hidden` or not. schtasks.exe is natively found in `C:\Windows\system32` and `C:\Windows\syswow64`. The following DLL(s) are loaded when schtasks.exe or TaskService is launched -`taskschd.dll`. If found loaded by another process, it is possible a scheduled task is being registered within that process context in memory. Upon triage, identify the task scheduled source. Was it schtasks.exe or via TaskService? Review the job created and the Command to be executed. Capture any artifacts on disk and review. Identify any parallel processes within the same timeframe to identify source.&#39;

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1053/ T1053]
* '''Last Updated''': 2021-04-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4698 
| xmlkv Message
| search Arguments IN (&#34;*http*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, Task_Name, Command, Author, Enabled, Hidden, Arguments 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `schedule_task_with_http_command_arguments_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the task schedule (Exa. Security Log EventCode 4698) endpoints. Tune and filter known instances of Task schedule used in your environment.

====Required field====

* _time

* dest

* Task_Name

* Command

* Author

* Enabled

* Hidden

* Arguments



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://app.any.run/tasks/92d7ef61-bfd7-4c92-bc15-322172b4ebec/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.005/tasksched/windows-security.log


''version'': 1
</div>
</div>

----

===Schedule task with rundll32 command trigger===
The following query utilizes Windows Security EventCode 4698, `A scheduled task was created`, to identify suspicious tasks registered on Windows either via schtasks.exe OR TaskService with a command to be executed with a Rundll32. This technique is common in new trickbot that uses rundll32 to load is trickbot downloader. The search will return the first time and last time the task was registered, as well as the `Command` to be executed, `Task Name`, `Author`, `Enabled`, and whether it is `Hidden` or not. schtasks.exe is natively found in `C:\Windows\system32` and `C:\Windows\syswow64`. The following DLL(s) are loaded when schtasks.exe or TaskService is launched -`taskschd.dll`. If found loaded by another process, it is possible a scheduled task is being registered within that process context in memory. Upon triage, identify the task scheduled source. Was it schtasks.exe or via TaskService? Review the job created and the Command to be executed. Capture any artifacts on disk and review. Identify any parallel processes within the same timeframe to identify source.&#39;

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1053/ T1053]
* '''Last Updated''': 2021-04-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4698 
| xmlkv Message 
| search Command IN (&#34;*rundll32*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, Task_Name, Command, Author, Enabled, Hidden, Arguments 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `schedule_task_with_rundll32_command_trigger_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the task schedule (Exa. Security Log EventCode 4698) endpoints. Tune and filter known instances of Task schedule used in your environment.

====Required field====

* _time

* dest

* Task_Name

* Command

* Author

* Enabled

* Hidden

* Arguments



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://labs.vipre.com/trickbot-and-its-modules/

* https://blog.whitehat.eu/2019/05/incident-trickbot-ryuk-2.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/trickbot/tasksched/windows-security.log


''version'': 1
</div>
</div>

----

===Scheduled task deleted or created via cmd===
This search looks for flags passed to schtasks.exe on the command-line that indicate a task was created via command like. This has been associated with the Dragonfly threat actor, and the SUNBURST attack against Solarwinds.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1053/005/ T1053.005], [https://attack.mitre.org/techniques/T1053/ T1053]
* '''Last Updated''': 2020-12-17

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=schtasks.exe (Processes.process=*delete* OR Processes.process=*create*) by Processes.user Processes.process_name Processes.parent_process_name Processes.dest 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `scheduled_task_deleted_or_created_via_cmd_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.process

* Processes.parent_process

* Processes.process_name

* Processes.user

* Processes.parent_process_name

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1053.005
| Scheduled Task
| Execution, Persistence, Privilege Escalation
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Tasks should not be manually created via CLI, this is rarely done by admins as well

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.005/atomic_red_team/windows-sysmon.log


''version'': 5
</div>
</div>

----

===Schtasks run task on demand===
This analytic identifies an on demand run of a Windows Schedule Task through shell or command-line. This technique has been used by adversaries that force to run their created Schedule Task as their persistence mechanism or for lateral movement as part of their malicious attack to the compromised machine.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1053/ T1053]
* '''Last Updated''': 2021-05-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime  from datamodel=Endpoint.Processes where Processes.process_name = &#34;schtasks.exe&#34; Processes.process = &#34;*/run*&#34; by Processes.process_name Processes.parent_process_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `schtasks_run_task_on_demand_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed schtasks.exe may be used.

====Required field====

* _time

* Processes.process

* Processes.process_id

* Processes.process_name

* Processes.parent_process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Administrators may use to debug Schedule Task entries. Filter as needed.

====Reference====


* https://thedfirreport.com/2020/04/20/sqlserver-or-the-miner-in-the-basement/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Schtasks scheduling job on remote system===
This search looks for flags passed to schtasks.exe on the command-line that indicate a job is being scheduled on a remote system.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1053/005/ T1053.005], [https://attack.mitre.org/techniques/T1053/ T1053]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = schtasks.exe Processes.process=&#34;*/create*&#34; (Processes.process=&#34;* /s *&#34; OR Processes.process=&#34;* /S *&#34;) by Processes.process_name Processes.process Processes.parent_process_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `schtasks_scheduling_job_on_remote_system_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1053.005
| Scheduled Task
| Execution, Persistence, Privilege Escalation
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators may create jobs on remote systems, but this activity is usually limited to a small set of hosts or users. It is important to validate and investigate as appropriate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.005/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Schtasks used for forcing a reboot===
This search looks for flags passed to schtasks.exe on the command-line that indicate that a forced reboot of system is scheduled.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1053/005/ T1053.005], [https://attack.mitre.org/techniques/T1053/ T1053]
* '''Last Updated''': 2020-12-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=schtasks.exe Processes.process=&#34;*shutdown*&#34; Processes.process=&#34;*/create *&#34; by Processes.process_name Processes.parent_process_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `schtasks_used_for_forcing_a_reboot_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.process

* Processes.process_name

* Processes.parent_process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1053.005
| Scheduled Task
| Execution, Persistence, Privilege Escalation
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators may create jobs on systems forcing reboots to perform updates, maintenance, etc.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.005/schtask_shutdown/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Screensaver event trigger execution===
This analytic is developed to detect possible event trigger execution through screensaver registry entry modification for persistence or privilege escalation. This technique was seen in several APT and malware where they put the malicious payload path to the SCRNSAVE.EXE registry key to redirect the execution to their malicious payload path. This TTP is a good indicator that some attacker may modify this entry for their persistence and privilege escalation.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1546/ T1546], [https://attack.mitre.org/techniques/T1546/002/ T1546.002]
* '''Last Updated''': 2021-09-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where (Registry.registry_path=&#34;*\\Control Panel\\Desktop\\SCRNSAVE.EXE*&#34;) by Registry.dest Registry.user Registry.registry_path Registry.registry_key_name Registry.registry_value_name 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `screensaver_event_trigger_execution_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.dest

* Registry.user

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1546
| Event Triggered Execution
| Privilege Escalation, Persistence
|-
| T1546.002
| Screensaver
| Privilege Escalation, Persistence
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://attack.mitre.org/techniques/T1546/002/

* https://dmcxblue.gitbook.io/red-team-notes-2-0/red-team-techniques/privilege-escalation/untitled-3/screensaver



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.002/scrnsave_reg/sysmon.log


''version'': 1
</div>
</div>

----

===Script execution via wmi===
This search looks for scripts launched via WMI.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1047/ T1047]
* '''Last Updated''': 2020-03-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=scrcons.exe by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `script_execution_via_wmi_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_WMI_Use|Suspicious WMI Use]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.process_name

* Processes.user

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1047
| Windows Management Instrumentation
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, administrators may use wmi to launch scripts for legitimate purposes. Filter as needed.

====Reference====


* https://redcanary.com/blog/child-processes/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1047/execution_scrcons/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Sdclt uac bypass===
This search is to detect a suspicious sdclt.exe registry modification. This technique is commonly seen when attacker try to bypassed UAC by using sdclt.exe application by modifying some registry that sdclt.exe tries to open or query with payload file path on it to be executed.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/002/ T1548.002], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-07-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where (Registry.registry_path= &#34;*\\Windows\\CurrentVersion\\App Paths\\control.exe*&#34; OR Registry.registry_path= &#34;*\\exefile\\shell\\runas\\command\\*&#34;) (Registry.registry_key_name = &#34;(Default)&#34; OR Registry.registry_key_name = &#34;IsolatedCommand&#34;) by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `sdclt_uac_bypass_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548.002
| Bypass User Account Control
| Privilege Escalation, Defense Evasion
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited to no false positives are expected.

====Reference====


* https://enigma0x3.net/2017/03/17/fileless-uac-bypass-using-sdclt-exe/

* https://github.com/hfiref0x/UACME

* https://www.cyborgsecurity.com/cyborg_labs/threat-hunt-deep-dives-user-account-control-bypass-via-registry-modification/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548/uac_bypass/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Sdelete application execution===
This analytic is to detect the execution of sdelete.exe application sysinternal tools. This tool is one of the most use tool of malware and adversaries to remove or clear their tracks and artifact in the targetted host. This tool is designed to delete securely a file in file system that remove the forensic evidence on the machine. A good TTP query to check why user execute this application which is not a common practice.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1485/ T1485], [https://attack.mitre.org/techniques/T1070/004/ T1070.004], [https://attack.mitre.org/techniques/T1070/ T1070]
* '''Last Updated''': 2021-10-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.parent_process) as parent_process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_sdelete` by  Processes.process_name Processes.original_file_name Processes.dest Processes.user Processes.parent_process_name Processes.parent_process 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `sdelete_application_execution_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Masquerading_-_Rename_System_Utilities|Masquerading - Rename System Utilities]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1485
| Data Destruction
| Impact
|-
| T1070.004
| File Deletion
| Defense Evasion
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
user may execute and use this application

====Reference====


* https://app.any.run/tasks/956f50be-2c13-465a-ac00-6224c14c5f89/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1485/sdelete/sysmon.log


''version'': 1
</div>
</div>

----

===Searchprotocolhost with no command line with network===
The following analytic identifies searchprotocolhost.exe with no command line arguments and with a network connection. It is unusual for searchprotocolhost.exe to execute with no command line arguments present. This particular behavior is common with malicious software, including Cobalt Strike. During investigation, identify any network connections and parallel processes. Identify any suspicious module loads related to credential dumping or file writes. searchprotocolhost.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-10-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name=searchprotocolhost.exe by _time span=1h  Processes.process_guid Processes.process_name Processes.dest Processes.process_path Processes.process Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| regex process=&#34;(searchprotocolhost\.exe.{0,4}$)&#34; 
| join  process_guid [
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Ports where Ports.dest_port !=&#34;0&#34; by Ports.process_guid Ports.dest Ports.dest_port 
| `drop_dm_object_name(Ports)` 
| rename  dest as connection_to_CNC] 
| table _time dest parent_process_name process_name process_path process process_guid connection_to_CNC dest_port 
| `searchprotocolhost_with_no_command_line_with_network_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` and `ports` node.

====Required field====

* _time

* process_name

* process_id

* parent_process_name

* dest_port

* process_path



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives may be present in small environments. Tuning may be required based on parent process.

====Reference====


* https://github.com/fireeye/red_team_tool_countermeasures/blob/master/rules/PGF/supplemental/hxioc/SUSPICIOUS%20EXECUTION%20OF%20SEARCHPROTOCOLHOST%20(METHODOLOGY).ioc



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon_searchprotocolhost.log


''version'': 2
</div>
</div>

----

===Secretdumps offline ntds dumping tool===
This analytic detects a potential usage of secretsdump.py tool for dumping credentials (ntlm hash) from a copy of ntds.dit and SAM.Security,SYSTEM registrry hive. This technique was seen in some attacker that dump ntlm hashes offline after having a copy of ntds.dit and SAM/SYSTEM/SECURITY registry hive.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/003/ T1003.003], [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2021-05-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = &#34;python*.exe&#34; Processes.process = &#34;*.py*&#34; Processes.process = &#34;*-ntds*&#34; (Processes.process = &#34;*-system*&#34; OR Processes.process = &#34;*-sam*&#34; OR Processes.process = &#34;*-security*&#34; OR Processes.process = &#34;*-bootkey*&#34;) by Processes.process_name Processes.process Processes.parent_process_name Processes.parent_process Processes.dest Processes.user Processes.process_id Processes.process_guid 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `secretdumps_offline_ntds_dumping_tool_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.parent_process

* Processes.dest

* Processes.user

* Processes.process_id

* Processes.process_guid



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.003
| NTDS
| Credential Access
|-
| T1003
| OS Credential Dumping
| Credential Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://github.com/SecureAuthCorp/impacket/blob/master/examples/secretsdump.py



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/honeypots/casper/datasets1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Serviceprincipalnames discovery with powershell===
The following analytic identifies `powershell.exe` usage, using Script Block Logging EventCode 4104, related to querying the domain for Service Principle Names. typically, this is a precursor activity related to kerberoasting or the silver ticket attack. \
What is a ServicePrincipleName? \
A service principal name (SPN) is a unique identifier of a service instance. SPNs are used by Kerberos authentication to associate a service instance with a service logon account. This allows a client application to request that the service authenticate an account even if the client does not have the account name.\
The following analytic identifies the use of KerberosRequestorSecurityToken class within the script block. Using .NET System.IdentityModel.Tokens.KerberosRequestorSecurityToken class in PowerShell is the equivelant of using setspn.exe. \
During triage, review parallel processes for further suspicious activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1558/003/ T1558.003]
* '''Last Updated''': 2021-10-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message=&#34;*KerberosRequestorSecurityToken*&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by Message OpCode ComputerName User EventCode 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `serviceprincipalnames_discovery_with_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1558.003
| Kerberoasting
| Credential Access
|}


====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
False positives should be limited, however filter as needed.

====Reference====


* https://docs.microsoft.com/en-us/windows/win32/ad/service-principal-names

* https://docs.microsoft.com/en-us/dotnet/api/system.identitymodel.tokens.kerberosrequestorsecuritytoken?view=netframework-4.8

* https://www.ired.team/offensive-security-experiments/active-directory-kerberos-abuse/t1208-kerberoasting

* https://strontic.github.io/xcyclopedia/library/setspn.exe-5C184D581524245DAD7A0A02B51FD2C2.html

* https://attack.mitre.org/techniques/T1558/003/

* https://social.technet.microsoft.com/wiki/contents/articles/717.service-principal-names-spn-setspn-syntax.aspx

* https://www.harmj0y.net/blog/powershell/kerberoasting-without-mimikatz/

* https://blog.zsec.uk/paving-2-da-wholeset/

* https://msitpros.com/?p=3113

* https://adsecurity.org/?p=3466

* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1558.003/atomic_red_team/windows-powershell_kerberos.log


''version'': 1
</div>
</div>

----

===Serviceprincipalnames discovery with setspn===
The following analytic identifies `setspn.exe` usage related to querying the domain for Service Principle Names. typically, this is a precursor activity related to kerberoasting or the silver ticket attack. \
What is a ServicePrincipleName? \
A service principal name (SPN) is a unique identifier of a service instance. SPNs are used by Kerberos authentication to associate a service instance with a service logon account. This allows a client application to request that the service authenticate an account even if the client does not have the account name.\
Example usage includes the following \
1. setspn -T offense -Q */* 1. setspn -T attackrange.local -F -Q MSSQLSvc/* 1. setspn -Q */* &gt; allspns.txt 1. setspn -q \
Values \
1. -F = perform queries at the forest, rather than domain level 1. -T = perform query on the specified domain or forest (when -F is also used) 1. -Q = query for existence of SPN \
During triage, review parallel processes for further suspicious activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1558/003/ T1558.003]
* '''Last Updated''': 2021-10-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_setspn` (Processes.process=&#34;*-t*&#34; AND Processes.process=&#34;*-f*&#34;) OR (Processes.process=&#34;*-q*&#34; AND Processes.process=&#34;**/**&#34;) OR (Processes.process=&#34;*-q*&#34;) OR (Processes.process=&#34;*-s*&#34;) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `serviceprincipalnames_discovery_with_setspn_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1558.003
| Kerberoasting
| Credential Access
|}


====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
False positives may be caused by Administrators resetting SPNs or querying for SPNs. Filter as needed.

====Reference====


* https://docs.microsoft.com/en-us/windows/win32/ad/service-principal-names

* https://www.ired.team/offensive-security-experiments/active-directory-kerberos-abuse/t1208-kerberoasting

* https://strontic.github.io/xcyclopedia/library/setspn.exe-5C184D581524245DAD7A0A02B51FD2C2.html

* https://attack.mitre.org/techniques/T1558/003/

* https://social.technet.microsoft.com/wiki/contents/articles/717.service-principal-names-spn-setspn-syntax.aspx

* https://www.harmj0y.net/blog/powershell/kerberoasting-without-mimikatz/

* https://blog.zsec.uk/paving-2-da-wholeset/

* https://msitpros.com/?p=3113

* https://adsecurity.org/?p=3466



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1558.003/atomic_red_team/windows-sysmon_setspn.log


''version'': 1
</div>
</div>

----

===Services escalate exe===
The following analytic identifies the use of `svc-exe` with Cobalt Strike. The behavior typically follows after an adversary has already gained initial access and is escalating privileges. Using `svc-exe`, a randomly named binary will be downloaded from the remote Teamserver and placed on disk within `C:\Windows\400619a.exe`. Following, the binary will be added to the registry under key `HKLM\System\CurrentControlSet\Services\400619a\` with multiple keys and values added to look like a legitimate service. Upon loading, `services.exe` will spawn the randomly named binary from `\\127.0.0.1\ADMIN$\400619a.exe`. The process lineage is completed with `400619a.exe` spawning rundll32.exe, which is the default `spawnto_` value for Cobalt Strike. The `spawnto_` value is arbitrary and may be any process on disk (typically system32/syswow64 binary). The `spawnto_` process will also contain a network connection. During triage, review parallel procesess and identify any additional file modifications.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-05-18

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=services.exe Processes.process_path=*admin$* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `services_escalate_exe_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]


====How To Implement====
To successfully implement this search, you will need to ensure that DNS data is populating the Network_Resolution data model.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation

* Privilege Escalation


====Known False Positives====
False positives should be limited as `services.exe` should never spawn a process from `ADMIN$`. Filter as needed.

====Reference====


* https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/

* https://attack.mitre.org/techniques/T1548/

* https://www.cobaltstrike.com/help-beacon



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Set default powershell execution policy to unrestricted or bypass===
Monitor for changes of the ExecutionPolicy in the registry to the values &#34;unrestricted&#34; or &#34;bypass,&#34; which allows the execution of malicious scripts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1059/001/ T1059.001]
* '''Last Updated''': 2020-11-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path=*Software\\Microsoft\\Powershell\\1\\ShellIds\\Microsoft.PowerShell* Registry.registry_key_name=ExecutionPolicy (Registry.registry_value_name=Unrestricted OR Registry.registry_value_name=Bypass) by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)` 
| `set_default_powershell_execution_policy_to_unrestricted_or_bypass_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]

* [[Documentation:ESSOC:stories:UseCase#Credential_Dumping|Credential Dumping]]

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Registry node. You must also be ingesting logs with the fields registry_path, registry_key_name, and registry_value_name from your endpoints.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|-
| T1059.001
| PowerShell
| Execution
|}


====Kill Chain Phase====

* Installation

* Actions on Objectives


====Known False Positives====
Administrators may attempt to change the default execution policy on a system for a variety of reasons. However, setting the policy to &#34;unrestricted&#34; or &#34;bypass&#34; as this search is designed to identify, would be unusual. Hits should be reviewed and investigated as appropriate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/powershell_execution_policy/windows-sysmon.log


''version'': 6
</div>
</div>

----

===Setting credentials via dsinternals modules===
This detection identifies illegal setting of credentials via DSInternals modules.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1068/ T1068], [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1098/ T1098]
* '''Last Updated''': 2020-11-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Add-ADDBSidHistory/)=true OR match_regex(cmd_line, /(?i)Add-ADReplNgcKey/)=true OR match_regex(cmd_line, /(?i)Set-ADDBAccountPassword/)=true OR match_regex(cmd_line, /(?i)Set-ADDBAccountPasswordHash/)=true OR match_regex(cmd_line, /(?i)Set-ADDBBootKey/)=true OR match_regex(cmd_line, /(?i)Set-SamAccountPasswordHash/)=true OR match_regex(cmd_line, /(?i)Set-AzureADUserEx/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* process_name

* parent_process_name

* _time

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1098
| Account Manipulation
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/MichaelGrafnetter/DSInternals



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1098/account_manipulation/logAllDSInternalsModules.log


''version'': 1
</div>
</div>

----

===Setting credentials via mimikatz modules===
This detection identifies illegal setting of credentials via Mimikatz modules.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1068/ T1068], [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1098/ T1098]
* '''Last Updated''': 2020-11-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)misc::addsid/)=true OR match_regex(cmd_line, /(?i)CRYPTO::scauth/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1098
| Account Manipulation
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/gentilkiwi/mimikatz



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1098/account_manipulation/logAllMimikatzModules.log


''version'': 1
</div>
</div>

----

===Setting credentials via powersploit modules===
This detection identifies illegal setting of credentials via PowerSploit modules.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1068/ T1068], [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1098/ T1098]
* '''Last Updated''': 2020-11-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events()

| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line != null AND ( match_regex(cmd_line, /(?i)Set-DomainUserPassword/)=true )

| eval start_time = timestamp, end_time = timestamp, entities = mvappend( ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id,  &#34;cmd_line&#34;, cmd_line]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting Windows Security logs from devices of interest, including the event ID 4688 with enabled command line logging.

====Required field====

* dest_device_id

* dest_user_id

* process

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|-
| T1078
| Valid Accounts
| Defense Evasion, Persistence, Privilege Escalation, Initial Access
|-
| T1098
| Account Manipulation
| Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified.

====Reference====


* https://github.com/PowerShellMafia/PowerSploit



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1098/account_manipulation/logAllPowerSploitModulesWithOldNames.log


''version'': 1
</div>
</div>

----

===Shim database file creation===
This search looks for shim database files being written to default directories. The sdbinst.exe application is used to install shim database files (.sdb). According to Microsoft, a shim is a small library that transparently intercepts an API, changes the parameters passed, handles the operation itself, or redirects the operation elsewhere.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1546/011/ T1546.011], [https://attack.mitre.org/techniques/T1546/ T1546]
* '''Last Updated''': 2020-12-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Filesystem.action) values(Filesystem.file_hash) as file_hash values(Filesystem.file_path) as file_path  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_path=*Windows\\AppPatch\\Custom* by Filesystem.file_name Filesystem.dest 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
|`drop_dm_object_name(Filesystem)` 
| `shim_database_file_creation_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting data that records the filesystem activity from your hosts to populate the Endpoint file-system data model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data.

====Required field====

* _time

* Filesystem.file_hash

* Filesystem.file_path

* Filesystem.file_name

* Filesystem.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1546.011
| Application Shimming
| Privilege Escalation, Persistence
|-
| T1546
| Event Triggered Execution
| Privilege Escalation, Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Because legitimate shim files are created and used all the time, this event, in itself, is not suspicious. However, if there are other correlating events, it may warrant further investigation.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.011/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Shim database installation with suspicious parameters===
This search detects the process execution and arguments required to silently create a shim database.  The sdbinst.exe application is used to install shim database files (.sdb). A shim is a small library which transparently intercepts an API, changes the parameters passed, handles the operation itself, or redirects the operation elsewhere.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1546/011/ T1546.011], [https://attack.mitre.org/techniques/T1546/ T1546]
* '''Last Updated''': 2020-11-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = sdbinst.exe by Processes.process_name Processes.parent_process_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `shim_database_installation_with_suspicious_parameters_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.process_name

* Processes.parent_process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1546.011
| Application Shimming
| Privilege Escalation, Persistence
|-
| T1546
| Event Triggered Execution
| Privilege Escalation, Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.011/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Short lived windows accounts===
This search detects accounts that were created and deleted in a short time period.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Change
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1136/001/ T1136.001], [https://attack.mitre.org/techniques/T1136/ T1136]
* '''Last Updated''': 2020-07-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(All_Changes.result_id) as result_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Change where All_Changes.result_id=4720 OR All_Changes.result_id=4726 by _time span=4h All_Changes.user All_Changes.dest 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(&#34;All_Changes&#34;)` 
| search result_id = 4720 result_id=4726 
| transaction user connected=false maxspan=240m 
| table firstTime lastTime count user dest result_id 
| `short_lived_windows_accounts_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Account_Monitoring_and_Controls|Account Monitoring and Controls]]


====How To Implement====
This search requires you to have enabled your Group Management Audit Logs in your Local Windows Security Policy and be ingesting those logs.  More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/

====Required field====

* _time

* All_Changes.result_id

* All_Changes.user

* All_Changes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1136.001
| Local Account
| Persistence
|-
| T1136
| Create Account
| Persistence
|}


====Kill Chain Phase====


====Known False Positives====
It is possible that an administrator created and deleted an account in a short time period.  Verifying activity with an administrator is advised.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.001/atomic_red_team/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.001/atomic_red_team/windows-system.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1136.001/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Silentcleanup uac bypass===
This search is to detect a suspicious modification of registry that may related to UAC bypassed. This registry will be trigger once the attacker abuse the silentcleanup task schedule to gain high privilege execution that will bypass User control account.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/002/ T1548.002], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-07-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\Environment\\windir&#34; Registry.registry_value_name = &#34;*.exe*&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `silentcleanup_uac_bypass_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548.002
| Bypass User Account Control
| Privilege Escalation, Defense Evasion
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://github.com/hfiref0x/UACME

* https://www.intezer.com/blog/malware-analysis/klingon-rat-holding-on-for-dear-life/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548/uac_bypass/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Single letter process on endpoint===
This search looks for process names that consist only of a single letter.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1204/ T1204], [https://attack.mitre.org/techniques/T1204/002/ T1204.002]
* '''Last Updated''': 2020-12-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes by Processes.dest, Processes.user, Processes.process, Processes.process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| eval process_name_length = len(process_name), endExe = if(substr(process_name, -4) == &#34;.exe&#34;, 1, 0) 
| search process_name_length=5 AND endExe=1 
| table count, firstTime, lastTime, dest, user, process, process_name 
| `single_letter_process_on_endpoint_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.process

* Processes.process_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1204
| User Execution
| Execution
|-
| T1204.002
| Malicious File
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Single-letter executables are not always malicious. Investigate this activity with your normal incident-response process.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1204.002/single_letter_exe/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Spike in file writes===
The search looks for a sharp increase in the number of files written to a particular host

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': 
* '''Last Updated''': 2020-03-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Filesystem where Filesystem.action=created by _time span=1h, Filesystem.dest 
| `drop_dm_object_name(Filesystem)` 
| eventstats max(_time) as maxtime 
| stats count as num_data_samples max(eval(if(_time &gt;= relative_time(maxtime, &#34;-1d@d&#34;), count, null))) as &#34;count&#34; avg(eval(if(_time&lt;relative_time(maxtime, &#34;-1d@d&#34;), count,null))) as avg stdev(eval(if(_time&lt;relative_time(maxtime, &#34;-1d@d&#34;), count, null))) as stdev by &#34;dest&#34; 
| eval upperBound=(avg+stdev*4), isOutlier=if((count &gt; upperBound) AND num_data_samples &gt;=20, 1, 0) 
| search isOutlier=1 
| `spike_in_file_writes_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
In order to implement this search, you must populate the Endpoint file-system data model node. This is typically populated via endpoint detection and response product, such as Carbon Black or endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the file system.

====Required field====

* _time

* Filesystem.action

* Filesystem.dest




====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
It is important to understand that if you happen to install any new applications on your hosts or are copying a large number of files, you can expect to see a large increase of file modifications.

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Spoolsv spawning rundll32===
The following analytic identifies a suspicious child process, `rundll32.exe`, with no command-line arguments being spawned from `spoolsv.exe`. This was identified during our testing of CVE-2021-34527 previously (CVE-2021-1675) or PrintNightmare. Typically, this is not normal behavior for `spoolsv.exe` to spawn a process. During triage, isolate the endpoint and review for source of exploitation. Capture any additional file modification events.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/012/ T1547.012], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2021-07-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=spoolsv.exe `process_rundll32` by Processes.dest Processes.user Processes.parent_process Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `spoolsv_spawning_rundll32_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#PrintNightmare_CVE-2021-34527|PrintNightmare CVE-2021-34527]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.012
| Print Processors
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives have been identified. There are limited instances where `rundll32.exe` may be spawned by a legitimate print driver.

====Reference====


* https://blog.truesec.com/2021/06/30/fix-for-printnightmare-cve-2021-1675-exploit-to-keep-your-print-servers-running-while-a-patch-is-not-available/

* https://blog.truesec.com/2021/06/30/exploitable-critical-rce-vulnerability-allows-regular-users-to-fully-compromise-active-directory-printnightmare-cve-2021-1675/

* https://www.reddit.com/r/msp/comments/ob6y02/critical_vulnerability_printnightmare_exposes



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.012/printnightmare/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Spoolsv suspicious loaded modules===
This search is to detect suspicious loading of dll in specific path relative to printnightmare exploitation. In this search we try to detect the loaded modules made by spoolsv.exe after the exploitation.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/012/ T1547.012], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2021-07-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=7 Image =&#34;*\\spoolsv.exe&#34; ImageLoaded=&#34;*\\Windows\\System32\\spool\\drivers\\x64\\*&#34; ImageLoaded = &#34;*.dll&#34; 
| stats dc(ImageLoaded) as countImgloaded values(ImageLoaded) as ImgLoaded count min(_time) as firstTime max(_time) as lastTime by Image Computer process_id EventCode 
| where countImgloaded &gt;= 3 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `spoolsv_suspicious_loaded_modules_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#PrintNightmare_CVE-2021-34527|PrintNightmare CVE-2021-34527]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name and imageloaded executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Image

* Computer

* EventCode

* ImageLoaded



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.012
| Print Processors
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://raw.githubusercontent.com/hieuttmmo/sigma/dceb13fe3f1821b119ae495b41e24438bd97e3d0/rules/windows/image_load/sysmon_cve_2021_1675_print_nightmare.yml



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.012/printnightmare/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Spoolsv suspicious process access===
This analytic identifies a suspicious behavior related to PrintNightmare, or CVE-2021-34527 previously (CVE-2021-1675),  to gain privilege escalation on the vulnerable machine. This exploit attacks a critical Windows Print Spooler Vulnerability to elevate privilege. This detection is to look for suspicious process access made by the spoolsv.exe that may related to the attack.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1068/ T1068]
* '''Last Updated''': 2021-07-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=10 SourceImage = &#34;*\\spoolsv.exe&#34; CallTrace = &#34;*\\Windows\\system32\\spool\\DRIVERS\\x64\\*&#34; TargetImage IN (&#34;*\\rundll32.exe&#34;, &#34;*\\spoolsv.exe&#34;) GrantedAccess = 0x1fffff 
| stats  count min(_time) as firstTime max(_time) as lastTime by Computer SourceImage TargetImage GrantedAccess CallTrace  EventCode ProcessID
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `spoolsv_suspicious_process_access_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#PrintNightmare_CVE-2021-34527|PrintNightmare CVE-2021-34527]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with process access event where SourceImage, TargetImage, GrantedAccess and CallTrace executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances of spoolsv.exe.

====Required field====

* _time

* SourceImage

* TargetImage

* GrantedAccess

* CallTrace

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Unknown. Filter as needed.

====Reference====


* https://github.com/cube0x0/impacket/commit/73b9466c17761384ece11e1028ec6689abad6818

* https://blog.truesec.com/2021/06/30/fix-for-printnightmare-cve-2021-1675-exploit-to-keep-your-print-servers-running-while-a-patch-is-not-available/

* https://blog.truesec.com/2021/06/30/exploitable-critical-rce-vulnerability-allows-regular-users-to-fully-compromise-active-directory-printnightmare-cve-2021-1675/

* https://www.reddit.com/r/msp/comments/ob6y02/critical_vulnerability_printnightmare_exposes



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.012/printnightmare/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Spoolsv writing a dll===
The following analytic identifies a `.dll` being written by `spoolsv.exe`. This was identified during our testing of CVE-2021-34527 previously (CVE-2021-1675) or PrintNightmare. Typically, this is not normal behavior for `spoolsv.exe` to write a `.dll`. Current POC code used will write the suspicious DLL to disk within a path of `\spool\drivers\x64\`. During triage, isolate the endpoint and review for source of exploitation. Capture any additional file modification events.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/012/ T1547.012], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2021-07-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name=spoolsv.exe by _time Processes.process_id Processes.process_name Processes.dest 
| `drop_dm_object_name(Processes)` 
| join process_guid, _time [
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_path=&#34;*\\spool\\drivers\\x64\\*&#34; Filesystem.file_name=&#34;*.dll&#34; by _time Filesystem.dest Filesystem.file_create_time Filesystem.file_name Filesystem.file_path 
| `drop_dm_object_name(Filesystem)` 
| fields _time dest file_create_time file_name file_path process_name process_path process] 
| dedup file_create_time 
| table dest file_create_time, file_name, file_path, process_name 
| `spoolsv_writing_a_dll_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#PrintNightmare_CVE-2021-34527|PrintNightmare CVE-2021-34527]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node and `Filesystem` node.

====Required field====

* _time

* Filesystem.dest

* Filesystem.file_create_time

* Filesystem.file_name

* Filesystem.file_path

* Processes.process_name

* Processes.process_id

* Processes.process_name

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.012
| Print Processors
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Unknown.

====Reference====


* https://blog.truesec.com/2021/06/30/fix-for-printnightmare-cve-2021-1675-exploit-to-keep-your-print-servers-running-while-a-patch-is-not-available/

* https://blog.truesec.com/2021/06/30/exploitable-critical-rce-vulnerability-allows-regular-users-to-fully-compromise-active-directory-printnightmare-cve-2021-1675/

* https://www.reddit.com/r/msp/comments/ob6y02/critical_vulnerability_printnightmare_exposes



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.012/printnightmare/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Spoolsv writing a dll - sysmon===
The following analytic identifies a `.dll` being written by `spoolsv.exe`. This was identified during our testing of CVE-2021-34527 previously(CVE-2021-1675) or PrintNightmare. Typically, this is not normal behavior for `spoolsv.exe` to write a `.dll`. Current POC code used will write the suspicious DLL to disk within a path of `\spool\drivers\x64\`. During triage, isolate the endpoint and review for source of exploitation. Capture any additional file modification events.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/012/ T1547.012], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2021-07-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventID=11 process_name=spoolsv.exe file_path=&#34;*\\spool\\drivers\\x64\\*&#34; file_name=*.dll 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, UserID, process_name, file_path, file_name, TargetFilename, process_id 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `spoolsv_writing_a_dll___sysmon_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#PrintNightmare_CVE-2021-34527|PrintNightmare CVE-2021-34527]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances where renamed rundll32.exe may be used.

====Required field====

* _time

* dest

* UserID

* process_name

* file_path

* file_name

* TargetFilename



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.012
| Print Processors
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives. Filter as needed.

====Reference====


* https://github.com/cube0x0/impacket/commit/73b9466c17761384ece11e1028ec6689abad6818

* https://blog.truesec.com/2021/06/30/fix-for-printnightmare-cve-2021-1675-exploit-to-keep-your-print-servers-running-while-a-patch-is-not-available/

* https://blog.truesec.com/2021/06/30/exploitable-critical-rce-vulnerability-allows-regular-users-to-fully-compromise-active-directory-printnightmare-cve-2021-1675/

* https://www.reddit.com/r/msp/comments/ob6y02/critical_vulnerability_printnightmare_exposes



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.012/printnightmare/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Sqlite module in temp folder===
This search is to detect a suspicious file creation of sqlite3.dll in %temp% folder. This behavior was seen in IcedID malware where it download sqlite module to parse browser database like for chrome or firefox to stole browser information related to bank, credit card or credentials.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1005/ T1005]
* '''Last Updated''': 2021-08-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=11 (TargetFilename = &#34;*\\sqlite32.dll&#34; OR TargetFilename = &#34;*\\sqlite64.dll&#34;) (TargetFilename = &#34;*\\temp\\*&#34;) 
|stats count min(_time) as firstTime max(_time) as lastTime by process_name TargetFilename EventCode ProcessId Image 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `sqlite_module_in_temp_folder_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* process_name

* TargetFilename

* EventCode

* ProcessId

* Image



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1005
| Data from Local System
| Collection
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.cisecurity.org/white-papers/security-primer-icedid/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/simulated_icedid/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Start up during safe mode boot===
This search is to detect a modification or registry add to the safeboot registry as an autostart mechanism. This technique was seen in some ransomware to automatically execute its code upon a safe mode boot.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/001/ T1547.001], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2021-06-10

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path=&#34;*\\System\\CurrentControlSet\\Control\\SafeBoot\\Minimal\*&#34; by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `start_up_during_safe_mode_boot_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.001
| Registry Run Keys / Startup Folder
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
updated windows application needed in safe boot may used this registry

====Reference====


* https://malware.news/t/threat-analysis-unit-tau-threat-intelligence-notification-snatch-ransomware/36365



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ransomware_ttp/data1/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Sunburst correlation dll and network event===
The malware sunburst will load the malicious dll by SolarWinds.BusinessLayerHost.exe. After a period of 12-14 days, the malware will attempt to resolve a subdomain of avsvmcloud.com. This detections will correlate both events.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1203/ T1203]
* '''Last Updated''': 2020-12-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>(`sysmon` EventCode=7 ImageLoaded=*SolarWinds.Orion.Core.BusinessLayer.dll) OR (`sysmon` EventCode=22 QueryName=*avsvmcloud.com) 
| eventstats dc(EventCode) AS dc_events 
| where dc_events=2 
| stats min(_time) as firstTime max(_time) as lastTime values(ImageLoaded) AS ImageLoaded values(QueryName) AS QueryName by host 
| rename host as dest 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `sunburst_correlation_dll_and_network_event_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
This detection relies on sysmon logs with the Event ID 7, Driver loaded. Please tune your sysmon config that you DriverLoad event for SolarWinds.Orion.Core.BusinessLayer.dll is captured by Sysmon. Additionally, you need sysmon logs for Event ID 22, DNS Query. We suggest to run this detection at least once a day over the last 14 days.

====Required field====

* _time

* EventCode

* ImageLoaded

* QueryName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1203
| Exploitation for Client Execution
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
unknown

====Reference====


* https://www.fireeye.com/blog/threat-research/2020/12/evasive-attacker-leverages-solarwinds-supply-chain-compromises-with-sunburst-backdoor.html



====Test Dataset====


''version'': 1
</div>
</div>

----

===Suspicious copy on system32===
This analytic is to detect a suspicious copy of file from systemroot folder of the windows OS. This technique is commonly used by APT or other malware as part of execution (LOLBIN) to run its malicious code using the available legitimate tool in OS. this type of event may seen or may execute of normal user in some instance but this is really a anomaly that needs to be check within the network.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036/003/ T1036.003], [https://attack.mitre.org/techniques/T1036/ T1036]
* '''Last Updated''': 2021-10-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN(&#34;cmd.exe&#34;, &#34;powershell*&#34;,&#34;pwsh.exe&#34;, &#34;sqlps.exe&#34;, &#34;sqltoolsps.exe&#34;, &#34;powershell_ise.exe&#34;) AND `process_copy` AND Processes.process IN(&#34;*\\Windows\\System32\*&#34;, &#34;*\\Windows\\SysWow64\\*&#34;) AND Processes.process = &#34;*copy*&#34; by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `suspicious_copy_on_system32_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1036.003
| Rename System Utilities
| Defense Evasion
|-
| T1036
| Masquerading
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
every user may do this event but very un-ussual.

====Reference====


* https://www.hybrid-analysis.com/sample/8da5b75b6380a41eee3a399c43dfe0d99eeefaa1fd21027a07b1ecaa4cd96fdd?environmentId=120



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1036.003/copy_sysmon/sysmon.log


''version'': 1
</div>
</div>

----

===Suspicious curl network connection===
The following analytic identifies the use of a curl contacting suspicious remote domains to checkin to command and control servers or download further implants. In the context of Silver Sparrow, curl is identified contacting s3.amazonaws.com. This particular behavior is common with MacOS adware-malicious software.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1105/ T1105]
* '''Last Updated''': 2021-02-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=curl Processes.process=s3.amazonaws.com by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `suspicious_curl_network_connection_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Silver_Sparrow|Silver Sparrow]]

* [[Documentation:ESSOC:stories:UseCase#Ingress_Tool_Transfer|Ingress Tool Transfer]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1105
| Ingress Tool Transfer
| Command And Control
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Unknown. Filter as needed.

====Reference====


* https://redcanary.com/blog/clipping-silver-sparrows-wings/

* https://marcosantadev.com/manage-plist-files-plistbuddy/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Suspicious dllhost no command line arguments===
The following analytic identifies DLLHost.exe with no command line arguments. It is unusual for DLLHost.exe to execute with no command line arguments present. This particular behavior is common with malicious software, including Cobalt Strike. During investigation, identify any network connections and parallel processes. Identify any suspicious module loads related to credential dumping or file writes. DLLHost.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-09-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where `process_dllhost` by _time span=1h  Processes.process_id Processes.process_name Processes.dest Processes.process_path Processes.process Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| regex process=&#34;(dllhost\.exe.{0,4}$)&#34; 
| `suspicious_dllhost_no_command_line_arguments_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives may be present in small environments. Tuning may be required based on parent process.

====Reference====


* https://raw.githubusercontent.com/threatexpress/malleable-c2/c3385e481159a759f79b8acfe11acf240893b830/jquery-c2.4.2.profile

* https://blog.cobaltstrike.com/2021/02/09/learn-pipe-fitting-for-all-of-your-offense-projects/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious driver loaded path===
This analytic will detect suspicious driver loaded paths. This technique is commonly used by malicious software like coin miners (xmrig) to register its malicious driver from notable directories where executable or drivers do not commonly exist. During triage, validate this driver is for legitimate business use. Review the metadata and certificate information. Unsigned drivers from non-standard paths is not normal, but occurs. In addition, review driver loads into `ntoskrnl.exe` for possible other drivers of interest. Long tail analyze drivers by path (outside of default, and in default) for further review.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1543/003/ T1543.003], [https://attack.mitre.org/techniques/T1543/ T1543]
* '''Last Updated''': 2021-04-29

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=6 ImageLoaded = &#34;*.sys&#34; NOT (ImageLoaded IN(&#34;*\\WINDOWS\\inf&#34;,&#34;*\\WINDOWS\\System32\\drivers\\*&#34;, &#34;*\\WINDOWS\\System32\\DriverStore\\FileRepository\\*&#34;)) 
|  stats  min(_time) as firstTime max(_time) as lastTime count by Computer ImageLoaded Hashes IMPHASH Signature Signed 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_driver_loaded_path_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the driver loaded and Signature from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Computer

* ImageLoaded

* Hashes

* IMPHASH

* Signature

* Signed



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1543.003
| Windows Service
| Persistence, Privilege Escalation
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives will be present. Some applications do load drivers

====Reference====


* https://www.trendmicro.com/vinfo/hk/threat-encyclopedia/malware/trojan.ps1.powtran.a/

* https://redcanary.com/blog/tracking-driver-inventory-to-expose-rootkits/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Suspicious event log service behavior===
The following analytic utilizes Windows Event ID 1100 to identify when Windows event log service is shutdown. Note that this is a voluminous analytic that will require tuning or restricted to specific endpoints based on criticality. This event generates every time Windows Event Log service has shut down. It also generates during normal system shutdown. During triage, based on time of day and user, determine if this was planned. If not planned, follow through with reviewing parallel alerts and other data sources to determine what else may have occurred.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/ T1070], [https://attack.mitre.org/techniques/T1070/001/ T1070.001]
* '''Last Updated''': 2021-06-17

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>(`wineventlog_security` EventCode=1100) 
| stats count min(_time) as firstTime max(_time) as lastTime by dest Message EventCode 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_event_log_service_behavior_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Log_Manipulation|Windows Log Manipulation]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting Windows event logs from your hosts. In addition, the Splunk Windows TA is needed.

====Required field====

* _time

* EventCode

* dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|-
| T1070.001
| Clear Windows Event Logs
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
It is possible the Event Logging service gets shut down due to system errors or legitimately administration tasks. Filter as needed.

====Reference====


* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-1100

* https://www.ired.team/offensive-security/defense-evasion/disabling-windows-event-logs-by-suspending-eventlog-service-threads

* https://attack.mitre.org/techniques/T1070/001/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1070.001/T1070.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1070.001/atomic_red_team/windows-security.log


''version'': 1
</div>
</div>

----

===Suspicious gpupdate no command line arguments===
The following analytic identifies gpupdate.exe with no command line arguments. It is unusual for gpupdate.exe to execute with no command line arguments present. This particular behavior is common with malicious software, including Cobalt Strike. During investigation, identify any network connections and parallel processes. Identify any suspicious module loads related to credential dumping or file writes. gpupdate.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-09-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where `process_gpupdate` by _time span=1h  Processes.process_id Processes.process_name Processes.dest Processes.process_path Processes.process Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| regex process=&#34;(gpupdate\.exe.{0,4}$)&#34;  
| `suspicious_gpupdate_no_command_line_arguments_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives may be present in small environments. Tuning may be required based on parent process.

====Reference====


* https://raw.githubusercontent.com/xx0hcd/Malleable-C2-Profiles/0ef8cf4556e26f6d4190c56ba697c2159faa5822/crimeware/trick_ryuk.profile

* https://blog.cobaltstrike.com/2021/02/09/learn-pipe-fitting-for-all-of-your-offense-projects/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious icedid regsvr32 cmdline===
this search is to detect a suspicious regsvr32 commandline &#34;-s&#34; to execute a dll files. This technique was seen in IcedID malware to execute its initial downloader dll that will download the 2nd stage loader that will download and decrypt the config payload.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/010/ T1218.010]
* '''Last Updated''': 2021-07-27

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_regsvr32` Processes.process=*-s* by  Processes.process_name Processes.process Processes.parent_process_name Processes.original_file_name Processes.parent_process Processes.process_id Processes.parent_process_id Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_icedid_regsvr32_cmdline_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.010
| Regsvr32
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
minimal. but network operator can use this application to load dll.

====Reference====


* https://app.any.run/tasks/56680cba-2bbc-4b34-8633-5f7878ddf858/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/inf_icedid/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious icedid rundll32 cmdline===
This search is to detect a suspicious rundll32.exe commandline to execute dll file. This technique was seen in IcedID malware to load its payload dll with the following parameter to load encrypted dll payload which is the license.dat.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-07-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_rundll32` Processes.process=*/i:* by  Processes.process_name Processes.process Processes.parent_process_name Processes.parent_process Processes.process_id Processes.parent_process_id Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_icedid_rundll32_cmdline_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
limitted. this parameter is not commonly used by windows application but can be used by the network operator.

====Reference====


* https://threatpost.com/icedid-banking-trojan-surges-emotet/165314/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/inf_icedid/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious image creation in appdata folder===
This search is to detect a suspicious creation of image in appdata folder made by process that also has a file reference in appdata folder. This technique was seen in remcos rat that capture screenshot of the compromised machine and place it in the appdata and will be send to its C2 server. This TTP is really a good indicator to check that process because it is in suspicious folder path and image files are not commonly created by user in this folder path.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1113/ T1113]
* '''Last Updated''': 2021-09-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name=*.exe Processes.process_path=&#34;*\\appdata\\Roaming\\*&#34; by _time span=1h Processes.process_id Processes.process_name Processes.process Processes.dest 
| `drop_dm_object_name(Processes)` 
| join process_guid, _time [
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_name IN (&#34;*.png&#34;,&#34;*.jpg&#34;,&#34;*.bmp&#34;,&#34;*.gif&#34;,&#34;*.tiff&#34;) Filesystem.file_path = &#34;*\\appdata\\Roaming\\*&#34; by _time span=1h Filesystem.dest Filesystem.file_create_time Filesystem.file_name Filesystem.file_path 
| `drop_dm_object_name(Filesystem)` 
| fields _time dest file_create_time file_name file_path process_name process_path process] 
| `suspicious_image_creation_in_appdata_folder_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* dest

* file_create_time

* file_name

* file_path

* process_name

* process_path

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1113
| Screen Capture
| Collection
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://success.trendmicro.com/solution/1123281-remcos-malware-information

* https://blog.malwarebytes.com/threat-intelligence/2021/07/remcos-rat-delivered-via-visual-basic/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/remcos/remcos_agent/sysmon.log


''version'': 1
</div>
</div>

----

===Suspicious msbuild rename===
The following analytic identifies renamed instances of msbuild.exe executing. Msbuild.exe is natively found in C:\Windows\Microsoft.NET\Framework\v4.0.30319 and C:\Windows\Microsoft.NET\Framework64\v4.0.30319. During investigation, identify the code executed and what is executing a renamed instance of MSBuild.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036/ T1036], [https://attack.mitre.org/techniques/T1127/ T1127], [https://attack.mitre.org/techniques/T1036/003/ T1036.003], [https://attack.mitre.org/techniques/T1127/001/ T1127.001]
* '''Last Updated''': 2021-01-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_msbuild` by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_msbuild_rename_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trusted_Developer_Utilities_Proxy_Execution_MSBuild|Trusted Developer Utilities Proxy Execution MSBuild]]

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]

* [[Documentation:ESSOC:stories:UseCase#Masquerading_-_Rename_System_Utilities|Masquerading - Rename System Utilities]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1036
| Masquerading
| Defense Evasion
|-
| T1127
| Trusted Developer Utilities Proxy Execution
| Defense Evasion
|-
| T1036.003
| Rename System Utilities
| Defense Evasion
|-
| T1127.001
| MSBuild
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Although unlikely, some legitimate applications may use a moved copy of msbuild, triggering a false positive.

====Reference====


* https://lolbas-project.github.io/lolbas/Binaries/Msbuild/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1127.001/T1127.001.md

* https://github.com/infosecn1nja/MaliciousMacroMSBuild/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1127.001/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious msbuild spawn===
The following analytic identifies wmiprvse.exe spawning msbuild.exe. This behavior is indicative of a COM object being utilized to spawn msbuild from wmiprvse.exe. It is common for MSBuild.exe to be spawned from devenv.exe while using Visual Studio. In this instance, there will be command line arguments and file paths. In a malicious instance, MSBuild.exe will spawn from non-standard processes and have no command line arguments. For example, MSBuild.exe spawning from explorer.exe, powershell.exe is far less common and should be investigated.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1127/ T1127], [https://attack.mitre.org/techniques/T1127/001/ T1127.001]
* '''Last Updated''': 2021-01-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process_name) as process_name values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=wmiprvse.exe AND `process_msbuild` by Processes.dest Processes.parent_process Processes.original_file_name Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_msbuild_spawn_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trusted_Developer_Utilities_Proxy_Execution_MSBuild|Trusted Developer Utilities Proxy Execution MSBuild]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1127
| Trusted Developer Utilities Proxy Execution
| Defense Evasion
|-
| T1127.001
| MSBuild
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Although unlikely, some legitimate applications may exhibit this behavior, triggering a false positive.

====Reference====


* https://lolbas-project.github.io/lolbas/Binaries/Msbuild/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1127.001/T1127.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1127.001/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious plistbuddy usage===
The following analytic identifies the use of a native MacOS utility, PlistBuddy, creating or modifying a properly list (.plist) file. In the instance of Silver Sparrow, the following commands were executed:\
- PlistBuddy -c &#34;Add :Label string init_verx&#34; ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c &#34;Add :RunAtLoad bool true&#34; ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c &#34;Add :StartInterval integer 3600&#34; ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c &#34;Add :ProgramArguments array&#34; ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c &#34;Add :ProgramArguments:0 string /bin/sh&#34; ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c &#34;Add :ProgramArguments:1 string -c&#34; ~/Library/Launchagents/init_verx.plist \
Upon triage, capture the property list file being written to disk and review for further indicators. Contain the endpoint and triage further.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1543/001/ T1543.001], [https://attack.mitre.org/techniques/T1543/ T1543]
* '''Last Updated''': 2021-02-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=PlistBuddy (Processes.process=*LaunchAgents* OR Processes.process=*RunAtLoad* OR Processes.process=*true*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
|  `suspicious_plistbuddy_usage_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Silver_Sparrow|Silver Sparrow]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1543.001
| Launch Agent
| Persistence, Privilege Escalation
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Some legitimate applications may use PlistBuddy to create or modify property lists and possibly generate false positives. Review the property list being modified or created to confirm.

====Reference====


* https://redcanary.com/blog/clipping-silver-sparrows-wings/

* https://marcosantadev.com/manage-plist-files-plistbuddy/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Suspicious plistbuddy usage via osquery===
The following analytic identifies the use of a native MacOS utility, PlistBuddy, creating or modifying a properly list (.plist) file. In the instance of Silver Sparrow, the following commands were executed:\
- PlistBuddy -c &#34;Add :Label string init_verx&#34; ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c &#34;Add :RunAtLoad bool true&#34; ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c &#34;Add :StartInterval integer 3600&#34; ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c &#34;Add :ProgramArguments array&#34; ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c &#34;Add :ProgramArguments:0 string /bin/sh&#34; ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c &#34;Add :ProgramArguments:1 string -c&#34; ~/Library/Launchagents/init_verx.plist \
Upon triage, capture the property list file being written to disk and review for further indicators. Contain the endpoint and triage further.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1543/001/ T1543.001], [https://attack.mitre.org/techniques/T1543/ T1543]
* '''Last Updated''': 2021-02-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`osquery_process` &#34;columns.cmdline&#34;=&#34;*LaunchAgents*&#34; OR &#34;columns.cmdline&#34;=&#34;*RunAtLoad*&#34; OR &#34;columns.cmdline&#34;=&#34;*true*&#34; 
|  `suspicious_plistbuddy_usage_via_osquery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Silver_Sparrow|Silver Sparrow]]


====How To Implement====
OSQuery must be installed and configured to pick up process events (info at https://osquery.io) as well as using the Splunk OSQuery Add-on https://splunkbase.splunk.com/app/4402. Modify the macro and validate fields are correct.

====Required field====

* _time

* columns.cmdline



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1543.001
| Launch Agent
| Persistence, Privilege Escalation
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Some legitimate applications may use PlistBuddy to create or modify property lists and possibly generate false positives. Review the property list being modified or created to confirm.

====Reference====


* https://redcanary.com/blog/clipping-silver-sparrows-wings/

* https://marcosantadev.com/manage-plist-files-plistbuddy/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Suspicious process file path===
The following analytic will detect a suspicious process running in a file path where a process is not commonly seen and is most commonly used by malicious softtware. This behavior has been used by adversaries where they drop and run an exe in a path that is accessible without admin privileges.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1543/ T1543]
* '''Last Updated''': 2021-05-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process_name) as process_name values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_path = &#34;*\\windows\\fonts\\*&#34; OR Processes.process_path = &#34;*\\windows\\temp\\*&#34; OR Processes.process_path = &#34;*\\users\\public\\*&#34; OR Processes.process_path = &#34;*\\windows\\debug\\*&#34; OR Processes.process_path.file_path = &#34;*\\Users\\Administrator\\Music\\*&#34; OR Processes.process_path.file_path = &#34;*\\Windows\\servicing\\*&#34; OR Processes.process_path.file_path = &#34;*\\Users\\Default\\*&#34; OR Processes.process_path.file_path = &#34;*Recycle.bin*&#34; OR Processes.process_path = &#34;*\\Windows\\Media\\*&#34; OR Processes.process_path = &#34;\\Windows\\repair\\*&#34; OR Processes.process_path = &#34;*\\temp\\*&#34; by Processes.parent_process_name Processes.parent_process Processes.process_path Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_process_file_path_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.parent_process

* Processes.process_path

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Administrators may allow execution of specific binaries in non-standard paths. Filter as needed.

====Reference====


* https://www.trendmicro.com/vinfo/hk/threat-encyclopedia/malware/trojan.ps1.powtran.a/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Suspicious reg exe process===
This search looks for reg.exe being launched from a command prompt not started by the user. When a user launches cmd.exe, the parent process is usually explorer.exe. This search filters out those instances.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1112/ T1112]
* '''Last Updated''': 2020-07-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes where Processes.parent_process_name != explorer.exe Processes.process_name =cmd.exe by Processes.user Processes.process_name Processes.parent_process_name Processes.dest Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| search [
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.parent_process_name=cmd.exe Processes.process_name= reg.exe by Processes.parent_process_id Processes.dest Processes.process_name 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| rename parent_process_id as process_id 
|dedup process_id
| table process_id dest] 
| `suspicious_reg_exe_process_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]

* [[Documentation:ESSOC:stories:UseCase#Disabling_Security_Tools|Disabling Security Tools]]

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.parent_process_name

* Processes.process_name

* Processes.user

* Processes.parent_process_name

* Processes.dest

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1112
| Modify Registry
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
It&#39;s possible for system administrators to write scripts that exhibit this behavior. If this is the case, the search will need to be modified to filter them out.

====Reference====


* https://car.mitre.org/wiki/CAR-2013-03-001



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1112/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Suspicious regsvr32 register suspicious path===
Adversaries may abuse Regsvr32.exe to proxy execution of malicious code by using non-standard file extensions to load malciious DLLs. Upon investigating, look for network connections to remote destinations (internal or external). Review additional parrallel processes and child processes for additional activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/010/ T1218.010]
* '''Last Updated''': 2021-01-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_regsvr32` (Processes.process=*appdata* OR Processes.process=*programdata* OR Processes.process=*windows\temp*) (Processes.process!=*.dll Processes.process!=*.ax Processes.process!=*.ocx) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.original_file_name Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `suspicious_regsvr32_register_suspicious_path_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvr32_Activity|Suspicious Regsvr32 Activity]]

* [[Documentation:ESSOC:stories:UseCase#Iceid|Iceid]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints, to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model. Tune the query by filtering additional extensions found to be used by  legitimate processes. To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.010
| Regsvr32
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Limited false positives with the query restricted to specified paths. Add more world writeable paths as tuning continues.

====Reference====


* https://attack.mitre.org/techniques/T1218/010/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.010/T1218.010.md

* https://lolbas-project.github.io/lolbas/Binaries/Regsvr32/

* https://support.microsoft.com/en-us/topic/how-to-use-the-regsvr32-tool-and-troubleshoot-regsvr32-error-messages-a98d960a-7392-e6fe-d90a-3f4e0cb543e5

* https://any.run/report/f29a7d2ecd3585e1e4208e44bcc7156ab5388725f1d29d03e7699da0d4598e7c/0826458b-5367-45cf-b841-c95a33a01718



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.010/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious rundll32 plugininit===
This search is to detect a suspicious rundll32.exe process with plugininit parameter. This technique is commonly seen in IceID malware to execute its initial dll stager to download another payload to the compromised machine.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-07-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_rundll32` Processes.process=*PluginInit* by  Processes.process_name Processes.process Processes.parent_process_name Processes.original_file_name Processes.parent_process Processes.process_id Processes.parent_process_id Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_rundll32_plugininit_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
third party application may used this dll export name to execute function.

====Reference====


* https://threatpost.com/icedid-banking-trojan-surges-emotet/165314/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/icedid/inf_icedid/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious rundll32 rename===
The following analytic identifies renamed instances of rundll32.exe executing. rundll32.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64. During investigation, validate it is the legitimate rundll32.exe executing and what script content it is loading. This query relies on the original filename or internal name from the PE meta data. Expand the query as needed by looking for specific command line arguments outlined in other analytics.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1036/ T1036], [https://attack.mitre.org/techniques/T1218/011/ T1218.011], [https://attack.mitre.org/techniques/T1036/003/ T1036.003]
* '''Last Updated''': 2021-02-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_rundll32` by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_rundll32_rename_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]

* [[Documentation:ESSOC:stories:UseCase#Masquerading_-_Rename_System_Utilities|Masquerading - Rename System Utilities]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1036
| Masquerading
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|-
| T1036.003
| Rename System Utilities
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, some legitimate applications may use a moved copy of rundll32, triggering a false positive.

====Reference====


* https://attack.mitre.org/techniques/T1218/011/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.011/T1218.011.md

* https://lolbas-project.github.io/lolbas/Binaries/Rundll32



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.011/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Suspicious rundll32 startw===
The following analytic identifies rundll32.exe executing a DLL function name, Start and StartW, on the command line that is commonly observed with Cobalt Strike x86 and x64 DLL payloads. Rundll32.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64. Typically, the DLL will be written and loaded from a world writeable path or user location. In most instances it will not have a valid certificate (Unsigned). During investigation, review the parent process and other parallel application execution. Capture and triage the DLL in question. In the instance of Cobalt Strike, rundll32.exe is the default process it opens and injects shellcode into. This default process can be changed, but typically is not.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-02-04

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_rundll32` Processes.process=*start* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.original_file_name Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_rundll32_startw_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, some legitimate applications may use Start as a function and call it via the command line. Filter as needed.

====Reference====


* https://attack.mitre.org/techniques/T1218/011/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.011/T1218.011.md

* https://www.cobaltstrike.com/help-windows-executable

* https://lolbas-project.github.io/lolbas/Binaries/Rundll32

* https://bohops.com/2018/02/26/leveraging-inf-sct-fetch-execute-techniques-for-bypass-evasion-persistence/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.011/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Suspicious rundll32 dllregisterserver===
The following analytic identifies rundll32.exe using dllregisterserver on the command line to load a DLL. When a DLL is registered, the DllRegisterServer method entry point in the DLL is invoked. This is typically seen when a DLL is being registered on the system. Not every instance is considered malicious, but it will capture malicious use of it. During investigation, review the parent process and parrellel processes executing. Capture the DLL being loaded and inspect further. Rundll32.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-02-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_rundll32` Processes.process=*dllregisterserver* by Processes.dest Processes.user Processes.parent_process Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_rundll32_dllregisterserver_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
This is likely to produce false positives and will require some filtering. Tune the query by adding command line paths to known good DLLs, or filtering based on parent process names.

====Reference====


* https://attack.mitre.org/techniques/T1218/011/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.011/T1218.011.md

* https://lolbas-project.github.io/lolbas/Binaries/Rundll32

* https://symantec-enterprise-blogs.security.com/blogs/threat-intelligence/seedworm-apt-iran-middle-east

* https://github.com/pan-unit42/tweets/blob/master/2020-12-10-IOCs-from-Ursnif-infection-with-Delf-variant.txt

* https://www.crowdstrike.com/blog/duck-hunting-with-falcon-complete-qakbot-zip-based-campaign/

* https://msdn.microsoft.com/en-us/library/windows/desktop/ms682162(v=vs.85).aspx



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.011/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious rundll32 no command line arguments===
The following analytic identifies rundll32.exe with no command line arguments. It is unusual for rundll32.exe to execute with no command line arguments present. This particular behavior is common with malicious software, including Cobalt Strike. During investigation, identify any network connections and parallel processes. Identify any suspicious module loads related to credential dumping or file writes. Rundll32.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/011/ T1218.011]
* '''Last Updated''': 2021-09-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where `process_rundll32` by _time span=1h  Processes.process_id Processes.process_name Processes.dest Processes.process_path Processes.process Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| regex process=&#34;(rundll32\.exe.{0,4}$)&#34; 
| `suspicious_rundll32_no_command_line_arguments_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]

* [[Documentation:ESSOC:stories:UseCase#PrintNightmare_CVE-2021-34527|PrintNightmare CVE-2021-34527]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.011
| Rundll32
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, some legitimate applications may use a moved copy of rundll32, triggering a false positive.

====Reference====


* https://attack.mitre.org/techniques/T1218/011/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218.011/T1218.011.md

* https://lolbas-project.github.io/lolbas/Binaries/Rundll32

* https://bohops.com/2018/02/26/leveraging-inf-sct-fetch-execute-techniques-for-bypass-evasion-persistence/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.011/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious sqlite3 lsquarantine behavior===
The following analytic identifies the use of a SQLite3 querying the MacOS preferences to identify the original URL the pkg was downloaded from. This particular behavior is common with MacOS adware-malicious software. Upon triage, review other processes in parallel for suspicious activity. Identify any recent package installations.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1074/ T1074]
* '''Last Updated''': 2021-02-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=sqlite3 Processes.process=*LSQuarantine* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `suspicious_sqlite3_lsquarantine_behavior_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Silver_Sparrow|Silver Sparrow]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1074
| Data Staged
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Unknown.

====Reference====


* https://redcanary.com/blog/clipping-silver-sparrows-wings/

* https://marcosantadev.com/manage-plist-files-plistbuddy/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Suspicious scheduled task from public directory===
The following detection identifies Scheduled Tasks registering (creating a new task) a binary or script to run from a public directory which includes users\public, \programdata\ and \windows\temp. Upon triage, review the binary or script in the command line for legitimacy, whether an approved binary/script or not. In addition, capture the binary or script in question and analyze for further behaviors. Identify the source and contain the endpoint.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1053/005/ T1053.005], [https://attack.mitre.org/techniques/T1053/ T1053]
* '''Last Updated''': 2021-03-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=schtasks.exe (Processes.process=*\\users\\public\\* OR Processes.process=*\\programdata\\* OR Processes.process=*windows\\temp*)  Processes.process=*/create* by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_scheduled_task_from_public_directory_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1053.005
| Scheduled Task
| Execution, Persistence, Privilege Escalation
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation

* Privilege Escalation


====Known False Positives====
Limited false positives may be present. Filter as needed by parent process or command line argument.

====Reference====


* https://attack.mitre.org/techniques/T1053/005/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.005/schtasks/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Suspicious searchprotocolhost no command line arguments===
The following analytic identifies searchprotocolhost.exe with no command line arguments. It is unusual for searchprotocolhost.exe to execute with no command line arguments present. This particular behavior is common with malicious software, including Cobalt Strike. During investigation, identify any network connections and parallel processes. Identify any suspicious module loads related to credential dumping or file writes. searchprotocolhost.exe is natively found in C:\Windows\system32 and C:\Windows\syswow64.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-09-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name=searchprotocolhost.exe by _time span=1h  Processes.process_id Processes.process_name Processes.dest Processes.process_path Processes.process Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| regex process=&#34;(searchprotocolhost\.exe.{0,4}$)&#34;  
| `suspicious_searchprotocolhost_no_command_line_arguments_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Limited false positives may be present in small environments. Tuning may be required based on parent process.

====Reference====


* https://github.com/fireeye/red_team_tool_countermeasures/blob/master/rules/PGF/supplemental/hxioc/SUSPICIOUS%20EXECUTION%20OF%20SEARCHPROTOCOLHOST%20(METHODOLOGY).ioc



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious wav file in appdata folder===
This analytic is to detect a suspicious creation of .wav file in appdata folder. This behavior was seen in Remcos RAT malware where it put the audio recording in the appdata\audio folde as part of data collection. this recording can be send to its C2 server as part of its exfiltration to the compromised machine. creation of wav files in this folder path is not a ussual disk place used by user to save audio format file.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1113/ T1113]
* '''Last Updated''': 2021-09-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name=*.exe Processes.process_path=&#34;*\\appdata\\Roaming\\*&#34; by _time span=1h Processes.process_id Processes.process_name Processes.process Processes.dest 
| `drop_dm_object_name(Processes)` 
| join process_guid, _time [
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_name IN (&#34;*.wav&#34;) Filesystem.file_path = &#34;*\\appdata\\Roaming\\*&#34; by _time span=1h Filesystem.dest Filesystem.file_create_time Filesystem.file_name Filesystem.file_path 
| `drop_dm_object_name(Filesystem)` 
| fields file_name file_path process_name process_path process dest file_create_time _time ] 
| `suspicious_wav_file_in_appdata_folder_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, file_name, file_path and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* dest

* file_create_time

* file_name

* file_path

* process_name

* process_path

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1113
| Screen Capture
| Collection
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://success.trendmicro.com/solution/1123281-remcos-malware-information

* https://blog.malwarebytes.com/threat-intelligence/2021/07/remcos-rat-delivered-via-visual-basic/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/remcos/remcos_agent/sysmon_wav.log


''version'': 1
</div>
</div>

----

===Suspicious microsoft workflow compiler rename===
The following analytic identifies a renamed instance of microsoft.workflow.compiler.exe. Microsoft.workflow.compiler.exe is natively found in C:\Windows\Microsoft.NET\Framework64\v4.0.30319 and is rarely utilized. When investigating, identify the executed code on disk and review. A spawned child process from microsoft.workflow.compiler.exe is uncommon. In any instance, microsoft.workflow.compiler.exe spawning from an Office product or any living off the land binary is highly suspect.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036/ T1036], [https://attack.mitre.org/techniques/T1127/ T1127], [https://attack.mitre.org/techniques/T1036/003/ T1036.003]
* '''Last Updated''': 2021-09-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_microsoftworkflowcompiler` by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.original_file_name 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_microsoft_workflow_compiler_rename_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trusted_Developer_Utilities_Proxy_Execution|Trusted Developer Utilities Proxy Execution]]

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]

* [[Documentation:ESSOC:stories:UseCase#Masquerading_-_Rename_System_Utilities|Masquerading - Rename System Utilities]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1036
| Masquerading
| Defense Evasion
|-
| T1127
| Trusted Developer Utilities Proxy Execution
| Defense Evasion
|-
| T1036.003
| Rename System Utilities
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Although unlikely, some legitimate applications may use a moved copy of microsoft.workflow.compiler.exe, triggering a false positive.

====Reference====


* https://lolbas-project.github.io/lolbas/Binaries/Microsoft.Workflow.Compiler/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/T1218.md#atomic-test-6---microsoftworkflowcompilerexe-payload-execution



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1127/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Suspicious microsoft workflow compiler usage===
The following analytic identifies microsoft.workflow.compiler.exe usage. microsoft.workflow.compiler.exe is natively found in C:\Windows\Microsoft.NET\Framework64\v4.0.30319 and is rarely utilized. When investigating, identify the executed code on disk and review. It is not a commonly used process by many applications.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1127/ T1127]
* '''Last Updated''': 2021-01-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_microsoftworkflowcompiler` by Processes.dest Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_microsoft_workflow_compiler_usage_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trusted_Developer_Utilities_Proxy_Execution|Trusted Developer Utilities Proxy Execution]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1127
| Trusted Developer Utilities Proxy Execution
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Although unlikely, limited instances have been identified coming from native Microsoft utilities similar to SCCM.

====Reference====


* https://lolbas-project.github.io/lolbas/Binaries/Msbuild/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1218/T1218.md#atomic-test-6---microsoftworkflowcompilerexe-payload-execution



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1127/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious msbuild path===
The following analytic identifies msbuild.exe executing from a non-standard path. Msbuild.exe is natively found in C:\Windows\Microsoft.NET\Framework\v4.0.30319 and C:\Windows\Microsoft.NET\Framework64\v4.0.30319. Instances of Visual Studio will run a copy of msbuild.exe. A moved instance of MSBuild is suspicious, however there are instances of build applications that will move or use a copy of MSBuild.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036/ T1036], [https://attack.mitre.org/techniques/T1127/ T1127], [https://attack.mitre.org/techniques/T1036/003/ T1036.003], [https://attack.mitre.org/techniques/T1127/001/ T1127.001]
* '''Last Updated''': 2021-01-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process_name) as process_name values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_msbuild` AND (Processes.process_path!=c:\\windows\\microsoft.net\\framework*\\v*\\*) by Processes.dest Processes.original_file_name Processes.parent_process Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `suspicious_msbuild_path_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trusted_Developer_Utilities_Proxy_Execution_MSBuild|Trusted Developer Utilities Proxy Execution MSBuild]]

* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]

* [[Documentation:ESSOC:stories:UseCase#Masquerading_-_Rename_System_Utilities|Masquerading - Rename System Utilities]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1036
| Masquerading
| Defense Evasion
|-
| T1127
| Trusted Developer Utilities Proxy Execution
| Defense Evasion
|-
| T1036.003
| Rename System Utilities
| Defense Evasion
|-
| T1127.001
| MSBuild
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Some legitimate applications may use a moved copy of msbuild.exe, triggering a false positive. Baselining of MSBuild.exe usage is recommended to better understand it&#39;s path usage. Visual Studio runs an instance out of a path that will need to be filtered on.

====Reference====


* https://lolbas-project.github.io/lolbas/Binaries/Msbuild/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1127.001/T1127.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1127.001/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious mshta child process===
The following analytic identifies child processes spawning from  &#34;mshta.exe&#34;. The search will return the first time and last time these command-line arguments were used for these executions, as well as the target system, the user, parent process &#34;mshta.exe&#34; and its child process.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/005/ T1218.005]
* '''Last Updated''': 2021-01-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process_name) as process_name values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=mshta.exe AND (Processes.process_name=powershell.exe OR Processes.process_name=colorcpl.exe OR Processes.process_name=msbuild.exe OR Processes.process_name=microsoft.workflow.compiler.exe OR Processes.process_name=searchprotocolhost.exe OR Processes.process_name=scrcons.exe OR Processes.process_name=cscript.exe OR Processes.process_name=wscript.exe OR Processes.process_name=powershell.exe OR Processes.process_name=cmd.exe) by Processes.dest Processes.parent_process Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_mshta_child_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_MSHTA_Activity|Suspicious MSHTA Activity]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.dest

* Processes.parent_process

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.005
| Mshta
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Although unlikely, some legitimate applications may exhibit this behavior, triggering a false positive.

====Reference====


* https://github.com/redcanaryco/AtomicTestHarnesses

* https://redcanary.com/blog/introducing-atomictestharnesses/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.005/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Suspicious mshta spawn===
The following analytic identifies wmiprvse.exe spawning mshta.exe. This behavior is indicative of a DCOM object being utilized to spawn mshta from wmiprvse.exe or svchost.exe. In this instance, adversaries may use LethalHTA that will spawn mshta.exe from svchost.exe.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/005/ T1218.005]
* '''Last Updated''': 2021-01-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process_name) as process_name values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.parent_process_name=svchost.exe OR Processes.parent_process_name=wmiprvse.exe) AND `process_mshta` by Processes.dest Processes.parent_process Processes.user Processes.original_file_name
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `suspicious_mshta_spawn_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_MSHTA_Activity|Suspicious MSHTA Activity]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.005
| Mshta
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Although unlikely, some legitimate applications may exhibit this behavior, triggering a false positive.

====Reference====


* https://codewhitesec.blogspot.com/2018/07/lethalhta.html

* https://github.com/redcanaryco/AtomicTestHarnesses

* https://redcanary.com/blog/introducing-atomictestharnesses/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.005/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Suspicious wevtutil usage===
The wevtutil.exe application is the windows event log utility. This searches for wevtutil.exe with parameters for clearing the application, security, setup, trace or system event logs.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/001/ T1070.001], [https://attack.mitre.org/techniques/T1070/ T1070]
* '''Last Updated''': 2021-10-11

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=wevtutil.exe Processes.process IN (&#34;* cl *&#34;, &#34;*clear-log*&#34;) (Processes.process=&#34;*System*&#34; OR Processes.process=&#34;*Security*&#34; OR Processes.process=&#34;*Setup*&#34; OR Processes.process=&#34;*Application*&#34; OR Processes.process=&#34;*trace*&#34;) by Processes.process_name Processes.parent_process_name Processes.dest Processes.user
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `suspicious_wevtutil_usage_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Log_Manipulation|Windows Log Manipulation]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.process

* Processes.process_name

* Processes.parent_process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070.001
| Clear Windows Event Logs
| Defense Evasion
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
The wevtutil.exe application is a legitimate Windows event log utility. Administrators may use it to manage Windows event logs.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1070.001/T1070.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1070.001/atomic_red_team/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Suspicious writes to windows recycle bin===
This search detects writes to the recycle bin by a process other than explorer.exe.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036/ T1036]
* '''Last Updated''': 2020-07-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Filesystem.file_path) as file_path values(Filesystem.file_name) as file_name FROM datamodel=Endpoint.Filesystem where Filesystem.file_path = &#34;*$Recycle.Bin*&#34; by Filesystem.process_id Filesystem.dest 
| `drop_dm_object_name(&#34;Filesystem&#34;)`
| search [
| tstats `security_content_summariesonly` values(Processes.user) as user values(Processes.process_name) as process_name values(Processes.parent_process_name) as parent_process_name FROM datamodel=Endpoint.Processes where Processes.process_name != &#34;explorer.exe&#34; by Processes.process_id Processes.dest
| `drop_dm_object_name(&#34;Processes&#34;)` 
| table process_id dest] 
| `suspicious_writes_to_windows_recycle_bin_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Collection_and_Staging|Collection and Staging]]


====How To Implement====
To successfully implement this search you need to be ingesting information on filesystem and process logs responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` and `Filesystem` nodes.

====Required field====

* _time

* Filesystem.file_path

* Filesystem.file_name

* Filesystem.process_id

* Filesystem.dest

* Processes.user

* Processes.process_name

* Processes.parent_process_name

* Processes.process_id

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1036
| Masquerading
| Defense Evasion
|}


====Kill Chain Phase====


====Known False Positives====
Because the Recycle Bin is a hidden folder in modern versions of Windows, it would be unusual for a process other than explorer.exe to write to it. Incidents should be investigated as appropriate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1036/write_to_recycle_bin/windows-sysmon.log


''version'': 4
</div>
</div>

----

===System information discovery detection===
Detect system information discovery techniques used by attackers to understand configurations of the system to further exploit it.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1082/ T1082]
* '''Last Updated''': 2021-09-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process=&#34;*wmic* qfe*&#34; OR Processes.process=*systeminfo* OR Processes.process=*hostname*) by Processes.user Processes.process_name Processes.process Processes.dest Processes.parent_process_name 
| `drop_dm_object_name(Processes)` 
| eventstats dc(process) as dc_processes_by_dest by dest 
| where dc_processes_by_dest &gt; 2 
| stats values(process) as processes min(firstTime) as firstTime max(lastTime) as lastTime by user, dest parent_process_name 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `system_information_discovery_detection_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Discovery_Techniques|Discovery Techniques]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process

* Processes.user

* Processes.process_name

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1082
| System Information Discovery
| Discovery
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators debugging servers

====Reference====


* https://oscp.infosecsanyam.in/priv-escalation/windows-priv-escalation



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1082/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===System process running from unexpected location===
An attacker tries might try to use different version of a system command without overriding original, or they might try to avoid some detection running the process from a different folder. This detection checks that a list of system processes run inside C:\\Windows\System32 or C:\\Windows\SysWOW64 The list of system processes has been extracted from https://github.com/splunk/security_content/blob/develop/lookups/is_windows_system_file.csv and the original detection https://github.com/splunk/security_content/blob/develop/detections/system_processes_run_from_unexpected_locations.yml

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036/ T1036]
* '''Last Updated''': 2020-08-25

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> $ssa_input = 
| from read_ssa_enriched_events() 
| eval device=ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null), user=ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), process_name=lower(ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null)), process_path=lower(ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null)), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null);
$cond_1 = 
| from $ssa_input 
| where process_name=&#34;arp.exe&#34; OR process_name=&#34;adaptertroubleshooter.exe&#34; OR process_name=&#34;applicationframehost.exe&#34; OR process_name=&#34;atbroker.exe&#34; OR process_name=&#34;authhost.exe&#34; OR process_name=&#34;autoworkplace.exe&#34; OR process_name=&#34;axinstui.exe&#34; OR process_name=&#34;backgroundtransferhost.exe&#34; OR process_name=&#34;bdehdcfg.exe&#34; OR process_name=&#34;bdeuisrv.exe&#34; OR process_name=&#34;bdeunlockwizard.exe&#34; OR process_name=&#34;bitlockerdeviceencryption.exe&#34; OR process_name=&#34;bitlockerwizard.exe&#34; OR process_name=&#34;bitlockerwizardelev.exe&#34; OR process_name=&#34;bytecodegenerator.exe&#34; OR process_name=&#34;camerasettingsuihost.exe&#34; OR process_name=&#34;castsrv.exe&#34; OR process_name=&#34;certenrollctrl.exe&#34; OR process_name=&#34;checknetisolation.exe&#34; OR process_name=&#34;clipup.exe&#34; OR process_name=&#34;cloudexperiencehostbroker.exe&#34; OR process_name=&#34;cloudnotifications.exe&#34; OR process_name=&#34;cloudstoragewizard.exe&#34; OR process_name=&#34;compmgmtlauncher.exe&#34; OR process_name=&#34;compattelrunner.exe&#34; OR process_name=&#34;computerdefaults.exe&#34; OR process_name=&#34;credentialuibroker.exe&#34; OR process_name=&#34;dfdwiz.exe&#34; OR process_name=&#34;dwwin.exe&#34; OR process_name=&#34;dataexchangehost.exe&#34; OR process_name=&#34;defrag.exe&#34; OR process_name=&#34;devicedisplayobjectprovider.exe&#34; OR process_name=&#34;deviceeject.exe&#34; OR process_name=&#34;deviceenroller.exe&#34; OR process_name=&#34;devicepairingwizard.exe&#34; OR process_name=&#34;deviceproperties.exe&#34; OR process_name=&#34;disksnapshot.exe&#34; OR process_name=&#34;dism.exe&#34; OR process_name=&#34;displayswitch.exe&#34; OR process_name=&#34;dmnotificationbroker.exe&#34; OR process_name=&#34;dmomacpmo.exe&#34; OR process_name=&#34;dpiscaling.exe&#34; OR process_name=&#34;dsmusertask.exe&#34; OR process_name=&#34;dxpserver.exe&#34; OR process_name=&#34;edpcleanup.exe&#34; OR process_name=&#34;eosnotify.exe&#34; OR process_name=&#34;eap3host.exe&#34; OR process_name=&#34;easpoliciesbrokerhost.exe&#34; OR process_name=&#34;easeofaccessdialog.exe&#34; OR process_name=&#34;ehstorauthn.exe&#34; OR process_name=&#34;fxscover.exe&#34; OR process_name=&#34;fxssvc.exe&#34; OR process_name=&#34;fxsunatd.exe&#34; OR process_name=&#34;filehistory.exe&#34; OR process_name=&#34;fondue.exe&#34; OR process_name=&#34;gamepanel.exe&#34; OR process_name=&#34;genvalobj.exe&#34; OR process_name=&#34;gettingstarted.exe&#34; OR process_name=&#34;hostname.exe&#34; OR process_name=&#34;icsentitlementhost.exe&#34; OR process_name=&#34;infdefaultinstall.exe&#34; OR process_name=&#34;installagent.exe&#34; OR process_name=&#34;languagecomponentsinstallercomhandler.exe&#34; OR process_name=&#34;launchtm.exe&#34; OR process_name=&#34;launchwinapp.exe&#34; OR process_name=&#34;legacynetuxhost.exe&#34; OR process_name=&#34;licensemanagershellext.exe&#34; OR process_name=&#34;licensingui.exe&#34; OR process_name=&#34;locationnotificationwindows.exe&#34; OR process_name=&#34;locationnotifications.exe&#34; OR process_name=&#34;locator.exe&#34; OR process_name=&#34;lockapphost.exe&#34; OR process_name=&#34;lockscreencontentserver.exe&#34; OR process_name=&#34;logonui.exe&#34; OR process_name=&#34;lsaiso.exe&#34; OR process_name=&#34;mdeserver.exe&#34; OR process_name=&#34;mdmagent.exe&#34; OR process_name=&#34;mdmappinstaller.exe&#34; OR process_name=&#34;mrinfo.exe&#34; OR process_name=&#34;mrt.exe&#34; OR process_name=&#34;mschedexe.exe&#34; OR process_name=&#34;magnify.exe&#34; OR process_name=&#34;mbaeparsertask.exe&#34; OR process_name=&#34;mdres.exe&#34; OR process_name=&#34;mdsched.exe&#34; OR process_name=&#34;migautoplay.exe&#34; OR process_name=&#34;mpsigstub.exe&#34; OR process_name=&#34;msspellcheckinghost.exe&#34; OR process_name=&#34;muiunattend.exe&#34; OR process_name=&#34;multidigimon.exe&#34; OR process_name=&#34;musnotification.exe&#34; OR process_name=&#34;musnotificationux.exe&#34; OR process_name=&#34;napstat.exe&#34; OR process_name=&#34;netstat.exe&#34; OR process_name=&#34;narrator.exe&#34; OR process_name=&#34;netcfgnotifyobjecthost.exe&#34; OR process_name=&#34;netevtfwdr.exe&#34; OR process_name=&#34;netproj.exe&#34; OR process_name=&#34;netplwiz.exe&#34; OR process_name=&#34;networkuxbroker.exe&#34;;
$cond_2 = 
| from $ssa_input 
| where process_name=&#34;openwith.exe&#34; OR process_name=&#34;optionalfeatures.exe&#34; OR process_name=&#34;pathping.exe&#34; OR process_name=&#34;ping.exe&#34; OR process_name=&#34;passwordonwakesettingflyout.exe&#34; OR process_name=&#34;pickerhost.exe&#34; OR process_name=&#34;pkgmgr.exe&#34; OR process_name=&#34;pnpunattend.exe&#34; OR process_name=&#34;pnputil.exe&#34; OR process_name=&#34;presentationhost.exe&#34; OR process_name=&#34;presentationsettings.exe&#34; OR process_name=&#34;printbrmui.exe&#34; OR process_name=&#34;printdialoghost.exe&#34; OR process_name=&#34;printdialoghost3d.exe&#34; OR process_name=&#34;printisolationhost.exe&#34; OR process_name=&#34;proximityuxhost.exe&#34; OR process_name=&#34;rdspnf.exe&#34; OR process_name=&#34;rmactivate.exe&#34; OR process_name=&#34;rmactivate_isv.exe&#34; OR process_name=&#34;rmactivate_ssp.exe&#34; OR process_name=&#34;rmactivate_ssp_isv.exe&#34; OR process_name=&#34;route.exe&#34; OR process_name=&#34;rdpsa.exe&#34; OR process_name=&#34;rdpsaproxy.exe&#34; OR process_name=&#34;rdpsauachelper.exe&#34; OR process_name=&#34;reagentc.exe&#34; OR process_name=&#34;recoverydrive.exe&#34; OR process_name=&#34;register-cimprovider.exe&#34; OR process_name=&#34;registeriepkeys.exe&#34; OR process_name=&#34;relpost.exe&#34; OR process_name=&#34;remoteposworker.exe&#34; OR process_name=&#34;rmclient.exe&#34; OR process_name=&#34;robocopy.exe&#34; OR process_name=&#34;rpcping.exe&#34; OR process_name=&#34;runlegacycplelevated.exe&#34; OR process_name=&#34;runtimebroker.exe&#34; OR process_name=&#34;sihclient.exe&#34; OR process_name=&#34;searchfilterhost.exe&#34; OR process_name=&#34;searchindexer.exe&#34; OR process_name=&#34;searchprotocolhost.exe&#34; OR process_name=&#34;secedit.exe&#34; OR process_name=&#34;sensordataservice.exe&#34; OR process_name=&#34;setieinstalleddate.exe&#34; OR process_name=&#34;settingsynchost.exe&#34; OR process_name=&#34;slidetoshutdown.exe&#34; OR process_name=&#34;smartscreensettings.exe&#34; OR process_name=&#34;sndvol.exe&#34; OR process_name=&#34;snippingtool.exe&#34; OR process_name=&#34;soundrecorder.exe&#34; OR process_name=&#34;spaceagent.exe&#34; OR process_name=&#34;sppextcomobj.exe&#34; OR process_name=&#34;srtasks.exe&#34; OR process_name=&#34;stikynot.exe&#34; OR process_name=&#34;synchost.exe&#34; OR process_name=&#34;sysreseterr.exe&#34; OR process_name=&#34;systempropertiesadvanced.exe&#34; OR process_name=&#34;systempropertiescomputername.exe&#34; OR process_name=&#34;systempropertiesdataexecutionprevention.exe&#34; OR process_name=&#34;systempropertieshardware.exe&#34; OR process_name=&#34;systempropertiesperformance.exe&#34; OR process_name=&#34;systempropertiesprotection.exe&#34; OR process_name=&#34;systempropertiesremote.exe&#34; OR process_name=&#34;systemsettingsadminflows.exe&#34; OR process_name=&#34;systemsettingsbroker.exe&#34; OR process_name=&#34;systemsettingsremovedevice.exe&#34; OR process_name=&#34;tcpsvcs.exe&#34; OR process_name=&#34;tracert.exe&#34; OR process_name=&#34;tstheme.exe&#34; OR process_name=&#34;tswbprxy.exe&#34; OR process_name=&#34;tapiunattend.exe&#34; OR process_name=&#34;taskmgr.exe&#34; OR process_name=&#34;thumbnailextractionhost.exe&#34; OR process_name=&#34;tokenbrokercookies.exe&#34; OR process_name=&#34;tpminit.exe&#34; OR process_name=&#34;tswpfwrp.exe&#34; OR process_name=&#34;ui0detect.exe&#34; OR process_name=&#34;upgraderesultsui.exe&#34; OR process_name=&#34;useraccountbroker.exe&#34; OR process_name=&#34;useraccountcontrolsettings.exe&#34; OR process_name=&#34;usoclient.exe&#34; OR process_name=&#34;utilman.exe&#34; OR process_name=&#34;vssvc.exe&#34; OR process_name=&#34;vaultcmd.exe&#34; OR process_name=&#34;vaultsysui.exe&#34; OR process_name=&#34;wfs.exe&#34; OR process_name=&#34;wmpdmc.exe&#34; OR process_name=&#34;wpdshextautoplay.exe&#34; OR process_name=&#34;wscollect.exe&#34; OR process_name=&#34;wsmanhttpconfig.exe&#34; OR process_name=&#34;wsreset.exe&#34; OR process_name=&#34;wudfhost.exe&#34; OR process_name=&#34;wwahost.exe&#34; OR process_name=&#34;wallpaperhost.exe&#34; OR process_name=&#34;webcache.exe&#34; OR process_name=&#34;werfault.exe&#34; OR process_name=&#34;werfaultsecure.exe&#34; OR process_name=&#34;winsat.exe&#34; OR process_name=&#34;windows.media.backgroundplayback.exe&#34; OR process_name=&#34;windowsactiondialog.exe&#34; OR process_name=&#34;windowsanytimeupgrade.exe&#34; OR process_name=&#34;windowsanytimeupgraderesults.exe&#34;;
$cond_3 = 
| from $ssa_input 
| where process_name=&#34;windowsanytimeupgradeui.exe&#34; OR process_name=&#34;windowsupdateelevatedinstaller.exe&#34; OR process_name=&#34;workfolders.exe&#34; OR process_name=&#34;wpcmon.exe&#34; OR process_name=&#34;acu.exe&#34; OR process_name=&#34;aitagent.exe&#34; OR process_name=&#34;aitstatic.exe&#34; OR process_name=&#34;alg.exe&#34; OR process_name=&#34;appidcertstorecheck.exe&#34; OR process_name=&#34;appidpolicyconverter.exe&#34; OR process_name=&#34;at.exe&#34; OR process_name=&#34;attrib.exe&#34; OR process_name=&#34;audiodg.exe&#34; OR process_name=&#34;auditpol.exe&#34; OR process_name=&#34;autochk.exe&#34; OR process_name=&#34;autoconv.exe&#34; OR process_name=&#34;autofmt.exe&#34; OR process_name=&#34;baaupdate.exe&#34; OR process_name=&#34;backgroundtaskhost.exe&#34; OR process_name=&#34;bcastdvr.exe&#34; OR process_name=&#34;bcdboot.exe&#34; OR process_name=&#34;bcdedit.exe&#34; OR process_name=&#34;bdechangepin.exe&#34; OR process_name=&#34;bdeunlock.exe&#34; OR process_name=&#34;bitsadmin.exe&#34; OR process_name=&#34;bootcfg.exe&#34; OR process_name=&#34;bootim.exe&#34; OR process_name=&#34;bootsect.exe&#34; OR process_name=&#34;bridgeunattend.exe&#34; OR process_name=&#34;browser_broker.exe&#34; OR process_name=&#34;bthudtask.exe&#34; OR process_name=&#34;cacls.exe&#34; OR process_name=&#34;calc.exe&#34; OR process_name=&#34;cdpreference.exe&#34; OR process_name=&#34;certreq.exe&#34; OR process_name=&#34;certutil.exe&#34; OR process_name=&#34;change.exe&#34; OR process_name=&#34;changepk.exe&#34; OR process_name=&#34;charmap.exe&#34; OR process_name=&#34;chglogon.exe&#34; OR process_name=&#34;chgport.exe&#34; OR process_name=&#34;chgusr.exe&#34; OR process_name=&#34;chkdsk.exe&#34; OR process_name=&#34;chkntfs.exe&#34; OR process_name=&#34;choice.exe&#34; OR process_name=&#34;cipher.exe&#34; OR process_name=&#34;cleanmgr.exe&#34; OR process_name=&#34;cliconfg.exe&#34; OR process_name=&#34;clip.exe&#34; OR process_name=&#34;cmd.exe&#34; OR process_name=&#34;cmdkey.exe&#34; OR process_name=&#34;cmdl32.exe&#34; OR process_name=&#34;cmmon32.exe&#34; OR process_name=&#34;cmstp.exe&#34; OR process_name=&#34;cofire.exe&#34; OR process_name=&#34;colorcpl.exe&#34; OR process_name=&#34;comp.exe&#34; OR process_name=&#34;compact.exe&#34; OR process_name=&#34;conhost.exe&#34; OR process_name=&#34;consent.exe&#34; OR process_name=&#34;control.exe&#34; OR process_name=&#34;convert.exe&#34; OR process_name=&#34;credwiz.exe&#34; OR process_name=&#34;cscript.exe&#34; OR process_name=&#34;csrss.exe&#34; OR process_name=&#34;ctfmon.exe&#34; OR process_name=&#34;cttune.exe&#34; OR process_name=&#34;cttunesvr.exe&#34; OR process_name=&#34;dashost.exe&#34; OR process_name=&#34;dccw.exe&#34; OR process_name=&#34;dcomcnfg.exe&#34; OR process_name=&#34;ddodiag.exe&#34; OR process_name=&#34;dfrgui.exe&#34; OR process_name=&#34;dialer.exe&#34; OR process_name=&#34;diantz.exe&#34; OR process_name=&#34;dinotify.exe&#34; OR process_name=&#34;diskpart.exe&#34; OR process_name=&#34;diskperf.exe&#34; OR process_name=&#34;diskraid.exe&#34; OR process_name=&#34;dispdiag.exe&#34; OR process_name=&#34;djoin.exe&#34; OR process_name=&#34;dllhost.exe&#34; OR process_name=&#34;dllhst3g.exe&#34; OR process_name=&#34;dmcertinst.exe&#34; OR process_name=&#34;dmcfghost.exe&#34; OR process_name=&#34;dmclient.exe&#34; OR process_name=&#34;dnscacheugc.exe&#34; OR process_name=&#34;doskey.exe&#34; OR process_name=&#34;dpapimig.exe&#34; OR process_name=&#34;dpnsvr.exe&#34; OR process_name=&#34;driverquery.exe&#34; OR process_name=&#34;drvcfg.exe&#34; OR process_name=&#34;drvinst.exe&#34; OR process_name=&#34;dsregcmd.exe&#34; OR process_name=&#34;dstokenclean.exe&#34; OR process_name=&#34;dvdplay.exe&#34; OR process_name=&#34;dvdupgrd.exe&#34; OR process_name=&#34;dwm.exe&#34; OR process_name=&#34;dxdiag.exe&#34; OR process_name=&#34;easinvoker.exe&#34; OR process_name=&#34;efsui.exe&#34;;
$cond_4 = 
| from $ssa_input 
| where process_name=&#34;embeddedapplauncher.exe&#34; OR process_name=&#34;esentutl.exe&#34; OR process_name=&#34;eudcedit.exe&#34; OR process_name=&#34;eventcreate.exe&#34; OR process_name=&#34;eventvwr.exe&#34; OR process_name=&#34;expand.exe&#34; OR process_name=&#34;extrac32.exe&#34; OR process_name=&#34;fc.exe&#34; OR process_name=&#34;fhmanagew.exe&#34; OR process_name=&#34;find.exe&#34; OR process_name=&#34;findstr.exe&#34; OR process_name=&#34;finger.exe&#34; OR process_name=&#34;fixmapi.exe&#34; OR process_name=&#34;fltmc.exe&#34; OR process_name=&#34;fodhelper.exe&#34; OR process_name=&#34;fontdrvhost.exe&#34; OR process_name=&#34;fontview.exe&#34; OR process_name=&#34;forfiles.exe&#34; OR process_name=&#34;fsavailux.exe&#34; OR process_name=&#34;fsquirt.exe&#34; OR process_name=&#34;fsutil.exe&#34; OR process_name=&#34;ftp.exe&#34; OR process_name=&#34;fvenotify.exe&#34; OR process_name=&#34;fveprompt.exe&#34; OR process_name=&#34;getmac.exe&#34; OR process_name=&#34;gpresult.exe&#34; OR process_name=&#34;gpscript.exe&#34; OR process_name=&#34;gpupdate.exe&#34; OR process_name=&#34;grpconv.exe&#34; OR process_name=&#34;hdwwiz.exe&#34; OR process_name=&#34;help.exe&#34; OR process_name=&#34;hwrcomp.exe&#34; OR process_name=&#34;hwrreg.exe&#34; OR process_name=&#34;icacls.exe&#34; OR process_name=&#34;icardagt.exe&#34; OR process_name=&#34;icsunattend.exe&#34; OR process_name=&#34;ie4uinit.exe&#34; OR process_name=&#34;ieunatt.exe&#34; OR process_name=&#34;ieetwcollector.exe&#34; OR process_name=&#34;iexpress.exe&#34; OR process_name=&#34;immersivetpmvscmgrsvr.exe&#34; OR process_name=&#34;ipconfig.exe&#34; OR process_name=&#34;irftp.exe&#34; OR process_name=&#34;iscsicli.exe&#34; OR process_name=&#34;iscsicpl.exe&#34; OR process_name=&#34;isoburn.exe&#34; OR process_name=&#34;klist.exe&#34; OR process_name=&#34;ksetup.exe&#34; OR process_name=&#34;ktmutil.exe&#34; OR process_name=&#34;label.exe&#34; OR process_name=&#34;licensingdiag.exe&#34; OR process_name=&#34;lodctr.exe&#34; OR process_name=&#34;logagent.exe&#34; OR process_name=&#34;logman.exe&#34; OR process_name=&#34;logoff.exe&#34; OR process_name=&#34;lpkinstall.exe&#34; OR process_name=&#34;lpksetup.exe&#34; OR process_name=&#34;lpremove.exe&#34; OR process_name=&#34;lsass.exe&#34; OR process_name=&#34;lsm.exe&#34; OR process_name=&#34;makecab.exe&#34; OR process_name=&#34;manage-bde.exe&#34; OR process_name=&#34;mblctr.exe&#34; OR process_name=&#34;mcbuilder.exe&#34; OR process_name=&#34;mctadmin.exe&#34; OR process_name=&#34;mfpmp.exe&#34; OR process_name=&#34;mmc.exe&#34; OR process_name=&#34;mobsync.exe&#34; OR process_name=&#34;mountvol.exe&#34; OR process_name=&#34;mpnotify.exe&#34; OR process_name=&#34;msconfig.exe&#34; OR process_name=&#34;msdt.exe&#34; OR process_name=&#34;msdtc.exe&#34; OR process_name=&#34;msfeedssync.exe&#34; OR process_name=&#34;msg.exe&#34; OR process_name=&#34;mshta.exe&#34; OR process_name=&#34;msiexec.exe&#34; OR process_name=&#34;msinfo32.exe&#34; OR process_name=&#34;mspaint.exe&#34; OR process_name=&#34;msra.exe&#34; OR process_name=&#34;mstsc.exe&#34; OR process_name=&#34;mtstocom.exe&#34; OR process_name=&#34;nbtstat.exe&#34; OR process_name=&#34;ndadmin.exe&#34; OR process_name=&#34;net.exe&#34; OR process_name=&#34;net1.exe&#34; OR process_name=&#34;netbtugc.exe&#34; OR process_name=&#34;netcfg.exe&#34; OR process_name=&#34;netiougc.exe&#34; OR process_name=&#34;netsh.exe&#34; OR process_name=&#34;newdev.exe&#34; OR process_name=&#34;nltest.exe&#34; OR process_name=&#34;notepad.exe&#34; OR process_name=&#34;nslookup.exe&#34; OR process_name=&#34;ntoskrnl.exe&#34; OR process_name=&#34;ntprint.exe&#34; OR process_name=&#34;ocsetup.exe&#34; OR process_name=&#34;odbcad32.exe&#34; OR process_name=&#34;odbcconf.exe&#34; OR process_name=&#34;omadmclient.exe&#34; OR process_name=&#34;omadmprc.exe&#34;;
$cond_5 = 
| from $ssa_input 
| where process_name=&#34;openfiles.exe&#34; OR process_name=&#34;osk.exe&#34; OR process_name=&#34;p2phost.exe&#34; OR process_name=&#34;pcalua.exe&#34; OR process_name=&#34;pcaui.exe&#34; OR process_name=&#34;pcawrk.exe&#34; OR process_name=&#34;pcwrun.exe&#34; OR process_name=&#34;perfmon.exe&#34; OR process_name=&#34;phoneactivate.exe&#34; OR process_name=&#34;plasrv.exe&#34; OR process_name=&#34;poqexec.exe&#34; OR process_name=&#34;powercfg.exe&#34; OR process_name=&#34;prevhost.exe&#34; OR process_name=&#34;print.exe&#34; OR process_name=&#34;printfilterpipelinesvc.exe&#34; OR process_name=&#34;printui.exe&#34; OR process_name=&#34;proquota.exe&#34; OR process_name=&#34;provtool.exe&#34; OR process_name=&#34;psr.exe&#34; OR process_name=&#34;pwlauncher.exe&#34; OR process_name=&#34;qappsrv.exe&#34; OR process_name=&#34;qprocess.exe&#34; OR process_name=&#34;query.exe&#34; OR process_name=&#34;quser.exe&#34; OR process_name=&#34;qwinsta.exe&#34; OR process_name=&#34;rasautou.exe&#34; OR process_name=&#34;rasdial.exe&#34; OR process_name=&#34;raserver.exe&#34; OR process_name=&#34;rasphone.exe&#34; OR process_name=&#34;rdpclip.exe&#34; OR process_name=&#34;rdpinput.exe&#34; OR process_name=&#34;rdrleakdiag.exe&#34; OR process_name=&#34;recdisc.exe&#34; OR process_name=&#34;recover.exe&#34; OR process_name=&#34;reg.exe&#34; OR process_name=&#34;regedt32.exe&#34; OR process_name=&#34;regini.exe&#34; OR process_name=&#34;regsvr32.exe&#34; OR process_name=&#34;rekeywiz.exe&#34; OR process_name=&#34;relog.exe&#34; OR process_name=&#34;repair-bde.exe&#34; OR process_name=&#34;replace.exe&#34; OR process_name=&#34;reset.exe&#34; OR process_name=&#34;resmon.exe&#34; OR process_name=&#34;rmttpmvscmgrsvr.exe&#34; OR process_name=&#34;rrinstaller.exe&#34; OR process_name=&#34;rstrui.exe&#34; OR process_name=&#34;runas.exe&#34; OR process_name=&#34;rundll32.exe&#34; OR process_name=&#34;runonce.exe&#34; OR process_name=&#34;rwinsta.exe&#34; OR process_name=&#34;sbunattend.exe&#34; OR process_name=&#34;sc.exe&#34; OR process_name=&#34;schtasks.exe&#34; OR process_name=&#34;sdbinst.exe&#34; OR process_name=&#34;sdchange.exe&#34; OR process_name=&#34;sdclt.exe&#34; OR process_name=&#34;sdiagnhost.exe&#34; OR process_name=&#34;secinit.exe&#34; OR process_name=&#34;services.exe&#34; OR process_name=&#34;sessionmsg.exe&#34; OR process_name=&#34;sethc.exe&#34; OR process_name=&#34;setspn.exe&#34; OR process_name=&#34;setupcl.exe&#34; OR process_name=&#34;setupugc.exe&#34; OR process_name=&#34;setx.exe&#34; OR process_name=&#34;sfc.exe&#34; OR process_name=&#34;shadow.exe&#34; OR process_name=&#34;shrpubw.exe&#34; OR process_name=&#34;shutdown.exe&#34; OR process_name=&#34;sigverif.exe&#34; OR process_name=&#34;sihost.exe&#34; OR process_name=&#34;slui.exe&#34; OR process_name=&#34;smss.exe&#34; OR process_name=&#34;snmptrap.exe&#34; OR process_name=&#34;sort.exe&#34; OR process_name=&#34;spinstall.exe&#34; OR process_name=&#34;spoolsv.exe&#34; OR process_name=&#34;sppsvc.exe&#34; OR process_name=&#34;spreview.exe&#34; OR process_name=&#34;srdelayed.exe&#34; OR process_name=&#34;subst.exe&#34; OR process_name=&#34;svchost.exe&#34; OR process_name=&#34;sxstrace.exe&#34; OR process_name=&#34;syskey.exe&#34; OR process_name=&#34;systeminfo.exe&#34; OR process_name=&#34;systemreset.exe&#34; OR process_name=&#34;systray.exe&#34; OR process_name=&#34;tabcal.exe&#34; OR process_name=&#34;takeown.exe&#34; OR process_name=&#34;taskeng.exe&#34; OR process_name=&#34;taskhost.exe&#34; OR process_name=&#34;taskhostw.exe&#34; OR process_name=&#34;taskkill.exe&#34; OR process_name=&#34;tasklist.exe&#34; OR process_name=&#34;taskmgr.exe&#34; OR process_name=&#34;tcmsetup.exe&#34; OR process_name=&#34;timeout.exe&#34; OR process_name=&#34;tpmvscmgr.exe&#34; OR process_name=&#34;tpmvscmgrsvr.exe&#34;;
$cond_6 = 
| from $ssa_input 
| where process_name=&#34;tracerpt.exe&#34; OR process_name=&#34;tscon.exe&#34; OR process_name=&#34;tsdiscon.exe&#34; OR process_name=&#34;tskill.exe&#34; OR process_name=&#34;typeperf.exe&#34; OR process_name=&#34;tzsync.exe&#34; OR process_name=&#34;tzutil.exe&#34; OR process_name=&#34;ucsvc.exe&#34; OR process_name=&#34;unlodctr.exe&#34; OR process_name=&#34;unregmp2.exe&#34; OR process_name=&#34;upnpcont.exe&#34; OR process_name=&#34;userinit.exe&#34; OR process_name=&#34;vds.exe&#34; OR process_name=&#34;vdsldr.exe&#34; OR process_name=&#34;verclsid.exe&#34; OR process_name=&#34;verifier.exe&#34; OR process_name=&#34;verifiergui.exe&#34; OR process_name=&#34;vmicsvc.exe&#34; OR process_name=&#34;vssadmin.exe&#34; OR process_name=&#34;w32tm.exe&#34; OR process_name=&#34;waitfor.exe&#34; OR process_name=&#34;wbadmin.exe&#34; OR process_name=&#34;wbengine.exe&#34; OR process_name=&#34;wecutil.exe&#34; OR process_name=&#34;wermgr.exe&#34; OR process_name=&#34;wevtutil.exe&#34; OR process_name=&#34;wextract.exe&#34; OR process_name=&#34;where.exe&#34; OR process_name=&#34;whoami.exe&#34; OR process_name=&#34;wiaacmgr.exe&#34; OR process_name=&#34;wiawow64.exe&#34; OR process_name=&#34;wifitask.exe&#34; OR process_name=&#34;wimserv.exe&#34; OR process_name=&#34;wininit.exe&#34; OR process_name=&#34;winload.exe&#34; OR process_name=&#34;winlogon.exe&#34; OR process_name=&#34;winresume.exe&#34; OR process_name=&#34;winrs.exe&#34; OR process_name=&#34;winrshost.exe&#34; OR process_name=&#34;winver.exe&#34; OR process_name=&#34;wisptis.exe&#34; OR process_name=&#34;wkspbroker.exe&#34; OR process_name=&#34;wksprt.exe&#34; OR process_name=&#34;wlanext.exe&#34; OR process_name=&#34;wlrmdr.exe&#34; OR process_name=&#34;wowreg32.exe&#34; OR process_name=&#34;wpnpinst.exe&#34; OR process_name=&#34;wpr.exe&#34; OR process_name=&#34;write.exe&#34; OR process_name=&#34;wscript.exe&#34; OR process_name=&#34;wsmprovhost.exe&#34; OR process_name=&#34;wsqmcons.exe&#34; OR process_name=&#34;wuapihost.exe&#34; OR process_name=&#34;wuapp.exe&#34; OR process_name=&#34;wuauclt.exe&#34; OR process_name=&#34;wusa.exe&#34; OR process_name=&#34;xcopy.exe&#34; OR process_name=&#34;xpsrchvw.exe&#34; OR process_name=&#34;xwizard.exe&#34;;

| from $cond_1 
| union $cond_2 
| union $cond_3 
| union $cond_4 
| union $cond_5 
| union $cond_6 
| where match_regex(process_path, /(?i)\\windows\\system32/)=false AND match_regex(process_path, /(?i)\\windows\\syswow64/)=false 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(device, user), body=create_map([&#34;event_id&#34;, event_id, &#34;process_path&#34;, process_path, &#34;process_name&#34;, process_name]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]

* [[Documentation:ESSOC:stories:UseCase#Masquerading_-_Rename_System_Utilities|Masquerading - Rename System Utilities]]


====How To Implement====
Collect endpoint data such as sysmon or 4688 events.

====Required field====

* dest_device_id

* process_name

* _time

* dest_user_id

* process_path



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1036
| Masquerading
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1036/system_process_running_unexpected_location/windows-security.log


''version'': 3
</div>
</div>

----

===System processes run from unexpected locations===
This search looks for system processes that typically execute from `C:\Windows\System32\` or `C:\Windows\SysWOW64`.  This may indicate a malicious process that is trying to hide as a legitimate process.\
This detection utilizes a lookup that is deduped `system32` and `syswow64` directories from Server 2016 and Windows 10.\
During triage, review the parallel processes - what process moved the native Windows binary? identify any artifacts on disk and review. If a remote destination is contacted, what is the reputation?

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036/ T1036], [https://attack.mitre.org/techniques/T1036/003/ T1036.003]
* '''Last Updated''': 2020-12-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes where Processes.process_path !=&#34;C:\\Windows\\System32*&#34; Processes.process_path !=&#34;C:\\Windows\\SysWOW64*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id Processes.process_hash 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `is_windows_system_file` 
| `system_processes_run_from_unexpected_locations_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Command-Line_Executions|Suspicious Command-Line Executions]]

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Masquerading_-_Rename_System_Utilities|Masquerading - Rename System Utilities]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.process_path

* Processes.user

* Processes.dest

* Processes.process_name

* Processes.process_id

* Processes.parent_process_name

* Processes.process_hash



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1036
| Masquerading
| Defense Evasion
|-
| T1036.003
| Rename System Utilities
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
This detection may require tuning based on third party applications utilizing native Windows binaries in non-standard paths.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1036.003/T1036.003.yaml

* https://attack.mitre.org/techniques/T1036/003/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1036.003/atomic_red_team/windows-sysmon.log


''version'': 6
</div>
</div>

----

===System user discovery with query===
This analytic looks for the execution of `query.exe` with command-line arguments utilized to discover the logged user. Red Teams and adversaries alike may leverage `query.exe` to identify system users on a compromised endpoint for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1033/ T1033]
* '''Last Updated''': 2021-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;query.exe&#34;) (Processes.process=*user*) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `system_user_discovery_with_query_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1033
| System Owner/User Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1033/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1033/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===System user discovery with whoami===
This analytic looks for the execution of `whoami.exe` without any arguments. This windows native binary prints out the current logged user. Red Teams and adversaries alike may leverage `whoami.exe` to identify system users on a compromised endpoint for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1033/ T1033]
* '''Last Updated''': 2021-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;whoami.exe&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `system_user_discovery_with_whoami_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1033
| System Owner/User Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1033/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1033/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Time provider persistence registry===
This analytic is to detect a suspiciouos modification of time provider registry for persistence and autostart. This technique can allow the attacker to persist on the compromised host and autostart as soon as the machine boot up. This TTP can be a good indicator of suspicious behavior since this registry is not commonly modified by normal user or even an admin.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547/003/ T1547.003], [https://attack.mitre.org/techniques/T1547/ T1547]
* '''Last Updated''': 2021-09-29

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count  min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path =&#34;*\\CurrentControlSet\\Services\\W32Time\\TimeProviders*&#34; by Registry.dest  Registry.user Registry.registry_path Registry.registry_key_name Registry.registry_value_name 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `drop_dm_object_name(Registry)` 
| `time_provider_persistence_registry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Privilege_Escalation|Windows Privilege Escalation]]


====How To Implement====
To successfully implement this search, you must be ingesting data that records registry activity from your hosts to populate the endpoint data model in the registry node. This is typically populated via endpoint detection-and-response product, such as Carbon Black or endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry.

====Required field====

* _time

* Registry.dest

* Registry.user

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1547.003
| Time Providers
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://pentestlab.blog/2019/10/22/persistence-time-providers/

* https://attack.mitre.org/techniques/T1547/003/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1547.003/timeprovider_reg/sysmon.log


''version'': 1
</div>
</div>

----

===Trickbot named pipe===
this search is to detect potential trickbot infection through the create/connected named pipe to the system. This technique is used by trickbot to communicate to its c2 to post or get command during infection.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-04-26

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode IN (17,18) PipeName=&#34;\\pipe\\*lacesomepipe&#34; 
| stats  min(_time) as firstTime max(_time) as lastTime count by Computer user_id EventCode PipeName signature Image process_id 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `trickbot_named_pipe_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name and pipename from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. .

====Required field====

* _time

* Computer

* user_id

* EventCode

* PipeName

* signature

* Image

* process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://labs.vipre.com/trickbot-and-its-modules/

* https://blog.whitehat.eu/2019/05/incident-trickbot-ryuk-2.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/trickbot/namedpipe/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Uac bypass mmc load unsigned dll===
This search is to detect a suspicious loaded unsigned dll by MMC.exe application. This technique is commonly seen in attacker that tries to bypassed UAC feature or gain privilege escalation. This is done by modifying some CLSID registry that will trigger the mmc.exe to load the dll path

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/002/ T1548.002], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-07-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=7  ImageLoaded = &#34;*.dll&#34; Image = &#34;*\\mmc.exe&#34; Signed=false Company != &#34;Microsoft Corporation&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by Image ImageLoaded Signed ProcessId OriginalFileName Computer EventCode Company 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `uac_bypass_mmc_load_unsigned_dll_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name and imageloaded executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Image

* ImageLoaded

* Signed

* ProcessId

* OriginalFileName

* Computer

* EventCode

* Company



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548.002
| Bypass User Account Control
| Privilege Escalation, Defense Evasion
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown. all of the dll loaded by mmc.exe is microsoft signed dll.

====Reference====


* https://offsec.almond.consulting/UAC-bypass-dotnet.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548/uac_bypass/windows-sysmon2.log


''version'': 1
</div>
</div>

----

===Uac bypass with colorui com object===
This search is to detect a possible uac bypass using the colorui.dll COM Object. this technique was seen in so many malware and ransomware like lockbit where it make use of the colorui.dll COM CLSID to bypass UAC.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/003/ T1218.003]
* '''Last Updated''': 2021-08-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=7 ImageLoaded=&#34;*\\colorui.dll&#34; process_name != &#34;colorcpl.exe&#34; NOT(Image IN(&#34;*\\windows\\*&#34;, &#34;*\\program files*&#34;)) 
| stats count min(_time) as firstTime max(_time) as lastTime by Image ImageLoaded process_name Computer EventCode Signed ProcessId 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `uac_bypass_with_colorui_com_object_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Image

* ImageLoaded

* process_name

* Computer

* EventCode

* Signed

* ProcessId



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.003
| CMSTP
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
not so common. but 3rd part app may load this dll.

====Reference====


* https://news.sophos.com/en-us/2020/04/24/lockbit-ransomware-borrows-tricks-to-keep-up-with-revil-and-maze/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.015/uac_colorui/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Usn journal deletion===
The fsutil.exe application is a legitimate Windows utility used to perform tasks related to the file allocation table (FAT) and NTFS file systems. The update sequence number (USN) change journal provides a log of all changes made to the files on the disk. This search looks for fsutil.exe deleting the USN journal.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/ T1070]
* '''Last Updated''': 2018-12-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process) as process values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=fsutil.exe by Processes.user Processes.process_name Processes.parent_process_name Processes.dest  
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| search process=&#34;*deletejournal*&#34; AND process=&#34;*usn*&#34; 
| `usn_journal_deletion_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Log_Manipulation|Windows Log Manipulation]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* Processes.process

* Processes.parent_process

* Processes.process_name

* Processes.user

* Processes.parent_process_name

* Processes.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
None identified

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1070/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Unified messaging service spawning a process===
This detection identifies Microsoft Exchange Server&#39;s Unified Messaging services, umworkerprocess.exe and umservice.exe, spawning a child process, indicating possible exploitation of CVE-2021-26857 vulnerability. The query filters out werfault.exe and wermgr.exe mostly due to potential false positives, however, if there is an excessive amount of &#34;wermgr.exe&#34; or &#34;WerFault.exe&#34; failures, it may be due to the active exploitation. During triage, identify any additional suspicious parallel processes. Identify any recent out of place file modifications. Review Exchange logs following Microsofts guide. To contain, perform egress filtering or restrict public access to Exchange. In final, patch the vulnerablity and monitor.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1190/ T1190]
* '''Last Updated''': 2021-03-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=&#34;umworkerprocess.exe&#34; OR Processes.parent_process_name=&#34;UMService.exe&#34; (Processes.process_name!=&#34;wermgr.exe&#34; OR Processes.process_name!=&#34;werfault.exe&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `unified_messaging_service_spawning_a_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1190
| Exploit Public-Facing Application
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Unknown. Tune out child processes as needed to limit volume of false positives.

====Reference====


* https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities/

* https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/

* https://blog.rapid7.com/2021/03/03/rapid7s-insightidr-enables-detection-and-response-to-microsoft-exchange-0-day/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1505.003/windows-sysmon_umservices.log


''version'': 1
</div>
</div>

----

===Uninstall app using msiexec===
This search is to detect a suspicious un-installation of application using msiexec. This technique was seen in conti leak tool and script where it tries to uninstall AV product using this commandline. This commandline to uninstall product is not a common practice in enterprise network.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/007/ T1218.007], [https://attack.mitre.org/techniques/T1218/ T1218]
* '''Last Updated''': 2021-08-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=msiexec.exe Processes.process= &#34;* /qn *&#34; Processes.process= &#34;*/X*&#34; Processes.process= &#34;*REBOOT=*&#34; by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `uninstall_app_using_msiexec_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.parent_process_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218.007
| Msiexec
| Defense Evasion
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown.

====Reference====


* https://threadreaderapp.com/thread/1423361119926816776.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/conti/conti_leak/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Unload sysmon filter driver===
Attackers often disable security tools to avoid detection. This search looks for the usage of process `fltMC.exe` to unload a Sysmon Driver that will stop sysmon from collecting the data.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2020-07-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime values(Processes.process) as process max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=fltMC.exe AND Processes.process=*unload* AND Processes.process=*SysmonDrv*  by Processes.process_name Processes.process_id Processes.parent_process_name Processes.process Processes.dest Processes.user 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)` 
|`unload_sysmon_filter_driver_filter`
| table firstTime lastTime dest user count process_name process_id parent_process_name process</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Disabling_Security_Tools|Disabling Security Tools]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model. This search is also shipped with `unload_sysmon_filter_driver_filter` macro, update this macro to filter out false positives.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====


====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Unloading amsi via reflection===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify suspicious PowerShell execution. Script Block Logging captures the command sent to PowerShell, the full command to be executed. Upon enabling, logs will output to Windows event logs. Dependent upon volume, enable on critical endpoints or all. \
This analytic identifies the behavior of AMSI being tampered with. Implemented natively in many frameworks, the command will look similar to `SEtValuE($Null,(New-OBJEct COLlECtionS.GenerIC.HAshSEt{[StrINg]))}$ReF=[ReF].AsSeMbLY.GeTTyPe(&#34;System.Management.Automation.Amsi&#34;+&#34;Utils&#34;)` taken from Powershell-Empire. \
During triage, review parallel processes using an EDR product or 4688 events. It will be important to understand the timeline of events around this activity. Review the entire logged PowerShell script block.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-06-09

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message=*system.management.automation.amsi* 
| stats count min(_time) as firstTime max(_time) as lastTime by OpCode ComputerName User EventCode Message 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `unloading_amsi_via_reflection_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Message

* OpCode

* ComputerName

* User

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Potential for some third party applications to disable AMSI upon invocation. Filter as needed.

====Reference====


* https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

* https://blog.palantir.com/tampering-with-windows-event-tracing-background-offense-and-defense-4be7ac62ac63

* https://static1.squarespace.com/static/552092d5e4b0661088167e5c/t/59c1814829f18782e24f1fe2/1505853768977/Windows+PowerShell+Logging+Cheat+Sheet+ver+Sept+2017+v2.1.pdf

* https://www.crowdstrike.com/blog/investigating-powershell-command-and-script-logging/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/powershell_script_block_logging/windows-powershell.log


''version'': 1
</div>
</div>

----

===Unusually long command line===
Command lines that are extremely long may be indicative of malicious activity on your hosts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': 
* '''Last Updated''': 2020-12-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes by Processes.user Processes.dest Processes.process_name Processes.process 
| `drop_dm_object_name(&#34;Processes&#34;)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
|  eval processlen=len(process) 
| eventstats stdev(processlen) as stdev, avg(processlen) as avg by dest 
| stats max(processlen) as maxlen, values(stdev) as stdevperhost, values(avg) as avgperhost by dest, user, process_name, process 
| `unusually_long_command_line_filter` 
|eval threshold = 3 
| where maxlen &gt; ((threshold*stdevperhost) + avgperhost)</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Command-Line_Executions|Suspicious Command-Line Executions]]

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]

* [[Documentation:ESSOC:stories:UseCase#Possible_Backdoor_Activity_Associated_With_MUDCARP_Espionage_Campaigns|Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships, from your endpoints to populate the Endpoint data model in the Processes node. The command-line arguments are mapped to the process field in the Endpoint data model.

====Required field====

* _time

* Processes.user

* Processes.dest

* Processes.process_name

* Processes.process




====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Some legitimate applications start with long command lines.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1036.003/atomic_red_team/windows-sysmon.log


''version'': 5
</div>
</div>

----

===Unusually long command line===
Command lines that are extremely long may be indicative of malicious activity on your hosts. This search leverages the Splunk Streaming ML DSP plugin to help identify command lines with lengths that are unusual for a given user. This detection is inspired on Unusually Long Command Line authored by Rico Valdez.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': 
* '''ATT&CK''': 
* '''Last Updated''': 2020-10-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)) 
| eval cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), dest_user_id=ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), dest_device_id=ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line!=null and dest_user_id!=null 
| eval cmd_line_norm=replace(cast(cmd_line, &#34;string&#34;), /\s(--?\w+)
|(\/\w+)/, &#34; ARG&#34;), cmd_line_norm=replace(cmd_line_norm, /\w:\\[^\s]+/, &#34;PATH&#34;), cmd_line_norm=replace(cmd_line_norm, /\d+/, &#34;N&#34;), input=parse_double(len(coalesce(cmd_line_norm, &#34;&#34;))) 
| select timestamp, process_name, dest_device_id, dest_user_id, cmd_line, input 
| adaptive_threshold algorithm=&#34;quantile&#34; entity=&#34;process_name&#34; window=60480000 
| where label AND quantile&gt;0.99 
| first_time_event input_columns=[&#34;dest_device_id&#34;, &#34;cmd_line&#34;] 
| where first_time_dest_device_id_cmd_line 
| eval start_time = timestamp, end_time = timestamp, entities = mvappend(dest_device_id, dest_user_id), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
You must be ingesting sysmon endpoint data that monitors command lines.

====Required field====

* process_name

* _time

* dest_device_id

* dest_user_id

* process




====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
This detection may flag suspiciously long command lines when there is not sufficient evidence (samples) for a given process that this detection is tracking; or when there is high variability in the length of the command line for the tracked process. Also, some legitimate applications may use long command lines. Such is the case of Ansible, that encodes Powershell scripts using long base64. Attackers may use this technique to obfuscate their payloads.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Unusually long command line - mltk===
Command lines that are extremely long may be indicative of malicious activity on your hosts. This search leverages the Machine Learning Toolkit (MLTK) to help identify command lines with lengths that are unusual for a given user.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': 
* '''Last Updated''': 2019-05-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes by Processes.user Processes.dest Processes.process_name Processes.process 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| eval processlen=len(process) 
| search user!=unknown 
| apply cmdline_pdfmodel threshold=0.01 
| rename &#34;IsOutlier(processlen)&#34; as isOutlier 
| search isOutlier &gt; 0 
| table firstTime lastTime user dest process_name process processlen count 
| `unusually_long_command_line___mltk_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_Command-Line_Executions|Suspicious Command-Line Executions]]

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]

* [[Documentation:ESSOC:stories:UseCase#Possible_Backdoor_Activity_Associated_With_MUDCARP_Espionage_Campaigns|Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
You must be ingesting endpoint data that monitors command lines and populates the Endpoint data model in the Processes node. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model. In addition, MLTK version &gt;= 4.2 must be installed on your search heads, along with any required dependencies. Finally, the support search &#34;Baseline of Command Line Length - MLTK&#34; must be executed before this detection search, as it builds an ML model over the historical data used by this search. It is important that this search is run in the same app context as the associated support search, so that the model created by the support search is available for use. You should periodically re-run the support search to rebuild the model with the latest data available in your environment.

====Required field====

* _time

* Processes.user

* Processes.dest

* Processes.process_name

* Processes.process




====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Some legitimate applications use long command lines for installs or updates. You should review identified command lines for legitimacy. You may modify the first part of the search to omit legitimate command lines from consideration. If you are seeing more results than desired, you may consider changing the value of threshold in the search to a smaller value. You should also periodically re-run the support search to re-build the ML model on the latest data. You may get unexpected results if the user identified in the results is not present in the data used to build the associated model.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===User discovery with env vars powershell===
This analytic looks for the execution of `powershell.exe` with command-line arguments that leverage PowerShell environment variables to identify the current logged user. Red Teams and adversaries may leverage this method to identify the logged user on a compromised endpoint for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1033/ T1033]
* '''Last Updated''': 2021-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=&#34;powershell.exe&#34;) (Processes.process=&#34;*$env:UserName*&#34; OR Processes.process=&#34;*[System.Environment]::UserName*&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `user_discovery_with_env_vars_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1033
| System Owner/User Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1033/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1033/AD_discovery/windows-sysmon.log


''version'': 1
</div>
</div>

----

===User discovery with env vars powershell script block===
The following analytic utilizes PowerShell Script Block Logging (EventCode=4104) to identify the use of PowerShell environment variables to identify the current logged user. Red Teams and adversaries may leverage this method to identify the logged user on a compromised endpoint for situational awareness and Active Directory Discovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1033/ T1033]
* '''Last Updated''': 2021-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 (Message = &#34;*$env:UserName*&#34; OR Message = &#34;*[System.Environment]::UserName*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `user_discovery_with_env_vars_powershell_script_block_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* Path

* Message

* OpCode

* ComputerName

* User

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1033
| System Owner/User Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this PowerShell commandlet for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1033/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1033/AD_discovery/windows-powershell.log


''version'': 1
</div>
</div>

----

===Vbscript execution using wscript app===
This analytic is to detect a suspicious wscript commandline to execute vbscript. This technique was seen in several malware to execute malicious vbs file using wscript application. commonly vbs script is associated to cscript process and this can be a technique to evade process parent child detections or even some av script emulation system.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/005/ T1059.005], [https://attack.mitre.org/techniques/T1059/ T1059]
* '''Last Updated''': 2021-10-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.parent_process_name = &#34;wscript.exe&#34; AND Processes.parent_process = &#34;*//e:vbscript*&#34;) OR (Processes.process_name = &#34;wscript.exe&#34; AND Processes.process = &#34;*//e:vbscript*&#34;) by Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process_id Processes.process Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `vbscript_execution_using_wscript_app_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059.005
| Visual Basic
| Execution
|-
| T1059
| Command and Scripting Interpreter
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.joesandbox.com/analysis/369332/0/html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.005/vbs_wscript/sysmon.log


''version'': 1
</div>
</div>

----

===Verclsid clsid execution===
This analytic is to detect a possible abuse of verclsid to execute malicious file through generate CLSID. This process is a normal application of windows to verify the CLSID COM object before it is instantiated by Windows Explorer. This hunting query can be a good pivot point to analyze what is he CLSID or COM object pointing too to check if it is a valid application or not.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/012/ T1218.012], [https://attack.mitre.org/techniques/T1218/ T1218]
* '''Last Updated''': 2021-09-29

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as process values(Processes.parent_process) as parent_process values(Processes.process_id) as process_id count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where `process_verclsid` AND Processes.process=&#34;*/S*&#34; Processes.process=&#34;*/C*&#34; AND  Processes.process=&#34;*{*&#34; AND Processes.process=&#34;*}*&#34; by  Processes.process_name Processes.original_file_name Processes.dest Processes.user Processes.parent_process_name Processes.parent_process 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `verclsid_clsid_execution_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218.012
| Verclsid
| Defense Evasion
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
windows can used this application for its normal COM object validation.

====Reference====


* https://gist.github.com/NickTyrer/0598b60112eaafe6d07789f7964290d5

* https://bohops.com/2018/08/18/abusing-the-com-registry-structure-part-2-loading-techniques-for-evasion-and-persistence/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1218.012/verclsid_exec/sysmon.log


''version'': 1
</div>
</div>

----

===W3wp spawning shell===
This query identifies a shell, PowerShell.exe or Cmd.exe, spawning from W3WP.exe, or IIS. In addition to IIS logs, this behavior with an EDR product will capture potential webshell activity, similar to the HAFNIUM Group abusing CVEs, on publicly available Exchange mail servers. During triage, review the parent process and child process of the shell being spawned. Review the command-line arguments and any file modifications that may occur. Identify additional parallel process, child processes, that may highlight further commands executed. After triaging, work to contain the threat and patch the system that is vulnerable.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1505/ T1505], [https://attack.mitre.org/techniques/T1505/003/ T1505.003]
* '''Last Updated''': 2021-03-03

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(Processes.process_name) as process_name values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=w3wp.exe AND `process_cmd` OR `process_powershell` by Processes.dest Processes.parent_process Processes.original_file_name Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `w3wp_spawning_shell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#HAFNIUM_Group|HAFNIUM Group]]

* [[Documentation:ESSOC:stories:UseCase#ProxyShell|ProxyShell]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1505
| Server Software Component
| Persistence
|-
| T1505.003
| Web Shell
| Persistence
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
Baseline your environment before production. It is possible build systems using IIS will spawn cmd.exe to perform a software build. Filter as needed.

====Reference====


* https://www.microsoft.com/security/blog/2020/02/04/ghost-in-the-shell-investigating-web-shell-attacks/

* https://www.zerodayinitiative.com/blog/2021/8/17/from-pwn2own-2021-a-new-attack-surface-on-microsoft-exchange-proxyshell

* https://www.youtube.com/watch?v=FC6iHw258RI

* https://www.huntress.com/blog/rapid-response-microsoft-exchange-servers-still-vulnerable-to-proxyshell-exploit#what-should-you-do



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1505.003/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Wbadmin delete system backups===
This search looks for flags passed to wbadmin.exe (Windows Backup Administrator Tool) that delete backup files. This is typically used by ransomware to prevent recovery.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1490/ T1490]
* '''Last Updated''': 2021-01-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=wbadmin.exe Processes.process=&#34;*delete*&#34; AND (Processes.process=&#34;*catalog*&#34; OR Processes.process=&#34;*systemstatebackup*&#34;) by Processes.process_name Processes.process Processes.parent_process_name Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)`
| `wbadmin_delete_system_backups_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
You must be ingesting endpoint data that tracks process activity, including parent-child relationships from your endpoints to populate the Endpoint data model in the Processes node. Tune based on parent process names.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.parent_process_name

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1490
| Inhibit System Recovery
| Impact
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Administrators may modify the boot configuration.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1490/T1490.md

* https://thedfirreport.com/2020/10/08/ryuks-return/

* https://attack.mitre.org/techniques/T1490/

* https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/wbadmin



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1490/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Wmi permanent event subscription===
This search looks for the creation of WMI permanent event subscriptions.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1047/ T1047]
* '''Last Updated''': 2018-10-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wmi` EventCode=5861 Binding 
| rex field=Message &#34;Consumer =\s+(?&lt;consumer&gt;[^;
|^$]+)&#34; 
| search consumer!=&#34;NTEventLogEventConsumer=\&#34;SCM Event Log Consumer\&#34;&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by ComputerName, consumer, Message 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| rename ComputerName as dest 
| `wmi_permanent_event_subscription_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_WMI_Use|Suspicious WMI Use]]


====How To Implement====
To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational].

====Required field====

* _time

* EventCode

* Message

* consumer

* ComputerName



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1047
| Windows Management Instrumentation
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, administrators may use event subscriptions for legitimate purposes.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Wmi permanent event subscription - sysmon===
This analytic looks for the creation of WMI permanent event subscriptions. The following analytic identifies the use of WMI Event Subscription to establish persistence or perform privilege escalation.  WMI can be used to install event filters, providers, consumers, and bindings that execute code when a defined event occurs. WMI subscription execution is proxied by the WMI Provider Host process (WmiPrvSe.exe) and thus may result in elevated SYSTEM privileges. This analytic is restricted by commonly added process execution and a path. If the volume is low enough, remove the values and flag on any new subscriptions.\
All event subscriptions have three components \
1. Filter - WQL Query for the events we want. EventID = 19 \
1. Consumer - An action to take upon triggering the filter. EventID = 20 \
1. Binding - Registers a filter to a consumer. EventID = 21 \
Monitor for the creation of new WMI EventFilter, EventConsumer, and FilterToConsumerBinding. It may be pertinent to review all 3 to identify the flow of execution. In addition, EventCode 4104 may assist with any other PowerShell script usage that registered the subscription.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1546/003/ T1546.003], [https://attack.mitre.org/techniques/T1546/ T1546]
* '''Last Updated''': 2020-12-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=21 
| rename host as dest 
| table _time, dest, user, Operation, EventType, Query, Consumer, Filter 
| `wmi_permanent_event_subscription___sysmon_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_WMI_Use|Suspicious WMI Use]]


====How To Implement====
To successfully implement this search, you must be collecting Sysmon data using Sysmon version 6.1 or greater and have Sysmon configured to generate alerts for WMI activity (eventID= 19, 20, 21). In addition, you must have at least version 6.0.4 of the Sysmon TA installed to properly parse the fields.

====Required field====

* _time

* EventCode

* host

* user

* Operation

* EventType

* Query

* Consumer

* Filter



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1546.003
| Windows Management Instrumentation Event Subscription
| Privilege Escalation, Persistence
|-
| T1546
| Event Triggered Execution
| Privilege Escalation, Persistence
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Although unlikely, administrators may use event subscriptions for legitimate purposes.

====Reference====


* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.003/T1546.003.md

* https://www.eideon.com/2018-03-02-THL03-WMIBackdoors/

* https://github.com/trustedsec/SysmonCommunityGuide/blob/master/WMI-events.md

* https://in.security/an-intro-into-abusing-and-identifying-wmi-event-subscriptions-for-persistence/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.003/atomic_red_team/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Wmi recon running process or services===
The following analytic identifies suspicious PowerShell script execution via EventCode 4104, where WMI is performing an event query looking for running processes or running services. This technique is commonly found in malware and APT events where the adversary will map all running security applications or services on the compromised machine. During triage, review parallel processes within the same timeframe. Review the full script block to identify other related artifacts.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1592/ T1592]
* '''Last Updated''': 2021-06-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`powershell` EventCode=4104 Message= &#34;*SELECT*&#34; AND (Message=&#34;*Win32_Process*&#34; OR Message=&#34;*Win32_Service*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode Message ComputerName User 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `wmi_recon_running_process_or_services_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]


====How To Implement====
To successfully implement this analytic, you will need to enable PowerShell Script Block Logging on some or all endpoints. Additional setup here https://docs.splunk.com/Documentation/UBA/5.0.4.1/GetDataIn/AddPowerShell#Configure_module_logging_for_PowerShell.

====Required field====

* _time

* EventCode

* Message

* ComputerName

* User



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1592
| Gather Victim Host Information
| Reconnaissance
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
network administrator may used this command for checking purposes

====Reference====


* https://news.sophos.com/en-us/2020/05/12/maze-ransomware-1-year-counting/

* https://www.eideon.com/2018-03-02-THL03-WMIBackdoors/

* https://github.com/trustedsec/SysmonCommunityGuide/blob/master/WMI-events.md

* https://in.security/an-intro-into-abusing-and-identifying-wmi-event-subscriptions-for-persistence/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/honeypots/pwsh/windows-powershell.log


''version'': 1
</div>
</div>

----

===Wmi temporary event subscription===
This search looks for the creation of WMI temporary event subscriptions.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1047/ T1047]
* '''Last Updated''': 2018-10-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wmi` EventCode=5860 Temporary 
| rex field=Message &#34;NotificationQuery =\s+(?&lt;query&gt;[^;
|^$]+)&#34; 
| search query!=&#34;SELECT * FROM Win32_ProcessStartTrace WHERE ProcessName = &#39;wsmprovhost.exe&#39;&#34; AND query!=&#34;SELECT * FROM __InstanceOperationEvent WHERE TargetInstance ISA &#39;AntiVirusProduct&#39; OR TargetInstance ISA &#39;FirewallProduct&#39; OR TargetInstance ISA &#39;AntiSpywareProduct&#39;&#34; 
| stats count min(_time) as firstTime max(_time) as lastTime by ComputerName, query  
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `wmi_temporary_event_subscription_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_WMI_Use|Suspicious WMI Use]]


====How To Implement====
To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational].

====Required field====

* _time

* EventCode

* Message

* query



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1047
| Windows Management Instrumentation
| Execution
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Some software may create WMI temporary event subscriptions for various purposes. The included search contains an exception for two of these that occur by default on Windows 10 systems. You may need to modify the search to create exceptions for other legitimate events.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Wsreset uac bypass===
This search is to detect a suspicious modification of registry related to UAC bypass. This technique is to modify the registry in this detection, create a registry value with the path of the payload and run WSreset.exe to bypass User account Control.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1548/002/ T1548.002], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2021-07-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_path= &#34;*\\AppX82a6gwre4fdg3bt635tn5ctqjf8msdd2\\Shell\\open\\command*&#34; (Registry.registry_key_name = &#34;(Default)&#34; OR Registry.registry_key_name = &#34;DelegateExecute&#34;) by Registry.registry_path Registry.registry_key_name Registry.registry_value_name Registry.dest 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `wsreset_uac_bypass_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node. Also make sure that this registry was included in your config files ex. sysmon config to be monitored.

====Required field====

* _time

* Registry.registry_path

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1548.002
| Bypass User Account Control
| Privilege Escalation, Defense Evasion
|-
| T1548
| Abuse Elevation Control Mechanism
| Privilege Escalation, Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://github.com/hfiref0x/UACME

* https://blog.morphisec.com/trickbot-uses-a-new-windows-10-uac-bypass



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1548/uac_bypass/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Wbemprox com object execution===
this search is designed to detect potential malicious process loading COM object to wbemprox.dll,

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218/ T1218], [https://attack.mitre.org/techniques/T1218/003/ T1218.003]
* '''Last Updated''': 2021-06-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=7  ImageLoaded IN (&#34;*\\fastprox.dll&#34;, &#34;*\\wbemprox.dll&#34;, &#34;*\\wbemcomn.dll&#34;) NOT (process_name IN (&#34;wmiprvse.exe&#34;, &#34;WmiApSrv.exe&#34;, &#34;unsecapp.exe&#34;)) NOT(Image IN(&#34;*\\windows\\*&#34;,&#34;*\\program files*&#34;, &#34;*\\wbem\\*&#34;)) 
| stats count min(_time) as firstTime max(_time) as lastTime by Image ImageLoaded process_name Computer EventCode Signed ProcessId Hashes IMPHASH 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `wbemprox_com_object_execution_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Revil_Ransomware|Revil Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name and imageloaded executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Image

* ImageLoaded

* process_name

* Computer

* EventCode

* Signed

* ProcessId

* Hashes

* IMPHASH



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1218
| Signed Binary Proxy Execution
| Defense Evasion
|-
| T1218.003
| CMSTP
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
legitimate process that are not in the exception list may trigger this event.

====Reference====


* https://krebsonsecurity.com/2021/05/a-closer-look-at-the-darkside-ransomware-gang/

* https://www.mcafee.com/blogs/other-blogs/mcafee-labs/mcafee-atr-analyzes-sodinokibi-aka-revil-ransomware-as-a-service-what-the-code-tells-us/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/revil/inf2/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Wermgr process connecting to ip check web services===
this search is designed to detect suspicious wermgr.exe process that tries to connect to known IP web services. This technique is know for trickbot and other trojan spy malware to recon the infected machine and look for its ip address without so much finger print on the commandline process. Since wermgr.exe is designed for error handling process of windows it is really suspicious that this process is trying to connect to this IP web services cause that maybe cause of some malicious code injection.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1590/ T1590], [https://attack.mitre.org/techniques/T1590/005/ T1590.005]
* '''Last Updated''': 2021-04-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode =22 process_name = wermgr.exe QueryName IN (&#34;*wtfismyip.com&#34;, &#34;*checkip.amazonaws.com&#34;, &#34;*ipecho.net&#34;, &#34;*ipinfo.io&#34;, &#34;*api.ipify.org&#34;, &#34;*icanhazip.com&#34;, &#34;*ip.anysrc.com&#34;,&#34;*api.ip.sb&#34;, &#34;ident.me&#34;, &#34;www.myexternalip.com&#34;, &#34;*zen.spamhaus.org&#34;, &#34;*cbl.abuseat.org&#34;, &#34;*b.barracudacentral.org&#34;,&#34;*dnsbl-1.uceprotect.net&#34;, &#34;*spam.dnsbl.sorbs.net&#34;) 
|  stats  min(_time) as firstTime max(_time) as lastTime count by  process_path process_name process_id QueryName QueryStatus QueryResults Computer EventCode 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `wermgr_process_connecting_to_ip_check_web_services_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, dns query name process path , and query ststus from your endpoints like EventCode 22. If you are using Sysmon, you must have at least version 12 of the Sysmon TA.

====Required field====

* _time

* process_path

* process_name

* process_id

* QueryName

* QueryStatus

* QueryResults

* Computer

* EventCode



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1590
| Gather Victim Network Information
| Reconnaissance
|-
| T1590.005
| IP Addresses
| Reconnaissance
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://labs.vipre.com/trickbot-and-its-modules/

* https://blog.whitehat.eu/2019/05/incident-trickbot-ryuk-2.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/trickbot/infection/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Wermgr process create executable file===
this search is designed to detect potential malicious wermgr.exe process that drops or create executable file. Since wermgr.exe is an application trigger when error encountered in a process, it is really un ussual to this process to drop executable file. This technique is commonly seen in trickbot malware where it injects it code to this process to execute it malicious behavior like downloading other payload

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1027/ T1027]
* '''Last Updated''': 2021-04-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=11 process_name = &#34;wermgr.exe&#34; TargetFilename = &#34;*.exe&#34; 
| stats  min(_time) as firstTime max(_time) as lastTime count by  Image TargetFilename process_name dest EventCode ProcessId 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `wermgr_process_create_executable_file_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. Tune and filter known instances of wermgr.exe may be used.

====Required field====

* _time

* Image

* TargetFilename

* process_name

* dest

* EventCode

* ProcessId



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1027
| Obfuscated Files or Information
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://labs.vipre.com/trickbot-and-its-modules/

* https://blog.whitehat.eu/2019/05/incident-trickbot-ryuk-2.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/trickbot/infection/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Wermgr process spawned cmd or powershell process===
This search is designed to detect suspicious cmd and powershell process spawned by wermgr.exe process. This suspicious behavior are commonly seen in code injection technique technique like trickbot to execute a shellcode, dll modules to run malicious behavior.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059]
* '''Last Updated''': 2021-04-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Processes.process) as cmdline min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name = &#34;wermgr.exe&#34; `process_cmd` OR `process_powershell` by Processes.parent_process_name  Processes.original_file_name Processes.parent_process_id  Processes.process_name Processes.process Processes.process_id Processes.process_guid Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `wermgr_process_spawned_cmd_or_powershell_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1059
| Command and Scripting Interpreter
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://labs.vipre.com/trickbot-and-its-modules/

* https://blog.whitehat.eu/2019/05/incident-trickbot-ryuk-2.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/trickbot/infection/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Wevtutil usage to clear logs===
The wevtutil.exe application is the windows event log utility. This searches for wevtutil.exe with parameters for clearing the application, security, setup, powershell, sysmon, or system event logs.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/ T1070], [https://attack.mitre.org/techniques/T1070/001/ T1070.001]
* '''Last Updated''': 2021-06-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line IS NOT NULL AND like(cmd_line, &#34;% cl %&#34;) AND (match_regex(cmd_line, /(?i)security/)=true OR match_regex(cmd_line, /(?i)system/)=true OR match_regex(cmd_line, /(?i)sysmon/)=true OR match_regex(cmd_line, /(?i)application/)=true OR match_regex(cmd_line, /(?i)setup/)=true OR match_regex(cmd_line, /(?i)powershell/)=true) AND process_name=&#34;wevtutil.exe&#34; 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name, &#34;process_path&#34;, process_path]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Log_Manipulation|Windows Log Manipulation]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* dest_device_id

* process_name

* parent_process_name

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|-
| T1070.001
| Clear Windows Event Logs
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
The wevtutil.exe application is a legitimate Windows event log utility. Administrators may use it to manage Windows event logs.

====Reference====


* https://www.splunk.com/en_us/blog/security/detecting-clop-ransomware.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1070.001/ssa_wevtutil/clear_evt.log


''version'': 2
</div>
</div>

----

===Wevtutil usage to disable logs===
This search is to detect execution of wevtutil.exe to disable logs. This technique was seen in several ransomware to disable the event logs to evade alerts and detections in compromised host.

* '''Product''': Splunk Behavioral Analytics
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/ T1070], [https://attack.mitre.org/techniques/T1070/001/ T1070.001]
* '''Last Updated''': 2021-06-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| from read_ssa_enriched_events() 
| eval timestamp=parse_long(ucast(map_get(input_event, &#34;_time&#34;), &#34;string&#34;, null)), cmd_line=ucast(map_get(input_event, &#34;process&#34;), &#34;string&#34;, null), process_name=ucast(map_get(input_event, &#34;process_name&#34;), &#34;string&#34;, null), process_path=ucast(map_get(input_event, &#34;process_path&#34;), &#34;string&#34;, null), parent_process_name=ucast(map_get(input_event, &#34;parent_process_name&#34;), &#34;string&#34;, null), event_id=ucast(map_get(input_event, &#34;event_id&#34;), &#34;string&#34;, null) 
| where cmd_line IS NOT NULL AND like(cmd_line, &#34;% sl %&#34;) AND like(cmd_line, &#34;%/e:false%&#34;) AND process_name=&#34;wevtutil.exe&#34; 
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(ucast(map_get(input_event, &#34;dest_user_id&#34;), &#34;string&#34;, null), ucast(map_get(input_event, &#34;dest_device_id&#34;), &#34;string&#34;, null)), body=create_map([&#34;event_id&#34;, event_id, &#34;cmd_line&#34;, cmd_line, &#34;process_name&#34;, process_name, &#34;parent_process_name&#34;, parent_process_name, &#34;process_path&#34;, process_path]) 
| into write_ssa_detected_events();</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Log_Manipulation|Windows Log Manipulation]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]


====How To Implement====
You must be ingesting data that records process activity from your hosts to populate the Endpoint data model in the Processes node. You must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the &#34;process&#34; field in the Endpoint data model.

====Required field====

* _time

* dest_device_id

* process_name

* parent_process_name

* process_path

* dest_user_id

* process



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|-
| T1070.001
| Clear Windows Event Logs
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
network operator may disable audit event logs for debugging purposes.

====Reference====


* https://www.bleepingcomputer.com/news/security/new-ransom-x-ransomware-used-in-texas-txdot-cyberattack/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1070.001/ssa_wevtutil/disable_evt.log


''version'': 2
</div>
</div>

----

===Winevent scheduled task created within public path===
The following query utilizes Windows Security EventCode 4698, `A scheduled task was created`, to identify suspicious tasks registered on Windows either via schtasks.exe OR TaskService with a command to be executed from a user writeable file path.\
The search will return the first time and last time the task was registered, as well as the `Command` to be executed, `Task Name`, `Author`, `Enabled`, and whether it is `Hidden` or not.\
schtasks.exe is natively found in `C:\Windows\system32` and `C:\Windows\syswow64`.\
The following DLL(s) are loaded when schtasks.exe or TaskService is launched -`taskschd.dll`. If found loaded by another process, it is possible a scheduled task is being registered within that process context in memory.\
Upon triage, identify the task scheduled source. Was it schtasks.exe or was it via TaskService. Review the job created and the Command to be executed. Capture any artifacts on disk and review. Identify any parallel processes within the same timeframe to identify source.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1053/005/ T1053.005], [https://attack.mitre.org/techniques/T1053/ T1053]
* '''Last Updated''': 2021-04-08

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4698 
| xmlkv Message 
| search Command IN (&#34;*\\users\\public\\*&#34;, &#34;*\\programdata\\*&#34;, &#34;*\\temp\\*&#34;, &#34;*\\Windows\\Tasks\\*&#34;, &#34;*\\appdata\\*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, Task_Name, Command, Author, Enabled, Hidden 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `winevent_scheduled_task_created_within_public_path_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#IcedID|IcedID]]


====How To Implement====
To successfully implement this search, you need to be ingesting Windows Security Event Logs with 4698 EventCode enabled. The Windows TA is also required.

====Required field====

* _time

* dest

* Task_Name

* Description

* Command



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1053.005
| Scheduled Task
| Execution, Persistence, Privilege Escalation
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Privilege Escalation


====Known False Positives====
False positives are possible if legitimate applications are allowed to register tasks in public paths. Filter as needed based on paths that are used legitimately.

====Reference====


* https://research.checkpoint.com/2021/irans-apt34-returns-with-an-updated-arsenal/

* https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4698

* https://redcanary.com/threat-detection-report/techniques/scheduled-task-job/

* https://docs.microsoft.com/en-us/windows/win32/taskschd/time-trigger-example--scripting-?redirectedfrom=MSDN

* https://app.any.run/tasks/e26f1b2e-befa-483b-91d2-e18636e2faf3/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.005/taskschedule/windows-security.log


''version'': 1
</div>
</div>

----

===Winevent scheduled task created to spawn shell===
The following query utilizes Windows Security EventCode 4698, `A scheduled task was created`, to identify suspicious tasks registered on Windows either via schtasks.exe OR TaskService with a command to be executed with a native Windows shell (PowerShell, Cmd, Wscript, Cscript).\
The search will return the first time and last time the task was registered, as well as the `Command` to be executed, `Task Name`, `Author`, `Enabled`, and whether it is `Hidden` or not.\
schtasks.exe is natively found in `C:\Windows\system32` and `C:\Windows\syswow64`.\
The following DLL(s) are loaded when schtasks.exe or TaskService is launched -`taskschd.dll`. If found loaded by another process, it is possible a scheduled task is being registered within that process context in memory.\
Upon triage, identify the task scheduled source. Was it schtasks.exe or via TaskService? Review the job created and the Command to be executed. Capture any artifacts on disk and review. Identify any parallel processes within the same timeframe to identify source.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1053/005/ T1053.005], [https://attack.mitre.org/techniques/T1053/ T1053]
* '''Last Updated''': 2021-04-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=4698 
| xmlkv Message 
| search Command IN (&#34;*powershell.exe*&#34;, &#34;*wscript.exe*&#34;, &#34;*cscript.exe*&#34;, &#34;*cmd.exe*&#34;, &#34;*sh.exe*&#34;, &#34;*ksh.exe*&#34;, &#34;*zsh.exe*&#34;, &#34;*bash.exe*&#34;, &#34;*scrcons.exe*&#34;, &#34;*pwsh.exe*&#34;) 
| stats count min(_time) as firstTime max(_time) as lastTime by dest, Task_Name, Command, Author, Enabled, Hidden 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `winevent_scheduled_task_created_to_spawn_shell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Persistence_Techniques|Windows Persistence Techniques]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting Windows Security Event Logs with 4698 EventCode enabled. The Windows TA is also required.

====Required field====

* _time

* dest

* Task_Name

* Description

* Command



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1053.005
| Scheduled Task
| Execution, Persistence, Privilege Escalation
|-
| T1053
| Scheduled Task/Job
| Execution, Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Privilege Escalation


====Known False Positives====
False positives are possible if legitimate applications are allowed to register tasks that call a shell to be spawned. Filter as needed based on command-line or processes that are used legitimately.

====Reference====


* https://research.checkpoint.com/2021/irans-apt34-returns-with-an-updated-arsenal/

* https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4698

* https://redcanary.com/threat-detection-report/techniques/scheduled-task-job/

* https://docs.microsoft.com/en-us/windows/win32/taskschd/time-trigger-example--scripting-?redirectedfrom=MSDN



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1053.005/atomic_red_team/windows-security.log


''version'': 1
</div>
</div>

----

===Winrm spawning a process===
The following analytic identifies suspicious processes spawning from WinRM (wsmprovhost.exe). This analytic is related to potential exploitation of CVE-2021-31166. which is a kernel-mode device driver http.sys vulnerability. Current proof of concept code will blue-screen the operating system. However, http.sys used by many different Windows processes, including WinRM. In this case, identifying suspicious process create (child processes) from `wsmprovhost.exe` is what this analytic is identifying.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1190/ T1190]
* '''Last Updated''': 2021-05-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=wsmprovhost.exe Processes.process_name IN (&#34;cmd.exe&#34;,&#34;sh.exe&#34;,&#34;bash.exe&#34;,&#34;powershell.exe&#34;,&#34;pwsh.exe&#34;,&#34;schtasks.exe&#34;,&#34;certutil.exe&#34;,&#34;whoami.exe&#34;,&#34;bitsadmin.exe&#34;,&#34;scp.exe&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `winrm_spawning_a_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1190
| Exploit Public-Facing Application
| Initial Access
|}


====Kill Chain Phase====

* Exploitation

* Privilege Escalation

* Denial of Service


====Known False Positives====
Unknown. Add new processes or filter as needed. It is possible system management software may spawn processes from `wsmprovhost.exe`.

====Reference====


* https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_access/win_susp_shell_spawn_from_winrm.yml

* https://www.zerodayinitiative.com/blog/2021/5/17/cve-2021-31166-a-wormable-code-execution-bug-in-httpsys

* https://github.com/0vercl0k/CVE-2021-31166/blob/main/cve-2021-31166.py



====Test Dataset====


''version'': 1
</div>
</div>

----

===Windows adfind exe===
This search looks for the execution of `adfind.exe` with command-line arguments that it uses by default. Specifically the filter or search functions. It also considers the arguments necessary like objectcategory, see readme for more details: https://www.joeware.net/freetools/tools/adfind/usage.htm. This has been seen used before by Wizard Spider, FIN6 and actors whom also launched SUNBURST. AdFind.exe is usually used a recon tool to enumare a domain controller.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1018/ T1018]
* '''Last Updated''': 2020-12-16

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search> 
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process=*-f* OR Processes.process=*-b*) AND (Processes.process=*objectcategory* OR Processes.process=*-gcb* OR Processes.process=*-sc*) by Processes.dest Processes.user Processes.process_name Processes.process  Processes.parent_process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `windows_adfind_exe_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]

* [[Documentation:ESSOC:stories:UseCase#Domain_Trust_Discovery|Domain Trust Discovery]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.process

* Processes.dest

* Processes.user

* Processes.process_name

* Processes.parent_process

* Processes.process_id

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1018
| Remote System Discovery
| Discovery
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
administrators rarely use adfind, usually not used for legitimate reasons

====Reference====


* https://www.volexity.com/blog/2020/12/14/dark-halo-leverages-solarwinds-compromise-to-breach-organizations/

* https://www.fireeye.com/blog/threat-research/2019/01/a-nasty-trick-from-credential-theft-malware-to-business-disruption.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1018/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Windows disableantispyware registry===
The search looks for the Registry Key DisableAntiSpyware set to disable. This is consistent with Ryuk infections across a fleet of endpoints. This particular behavior is typically executed when an ransomware actor gains access to an endpoint and beings to perform execution. Usually, a batch (.bat) will be executed and multiple registry and scheduled task modifications will occur. During triage, review parallel processes and identify any further file modifications. Endpoint should be isolated.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1562/001/ T1562.001], [https://attack.mitre.org/techniques/T1562/ T1562]
* '''Last Updated''': 2021-03-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_key_name=&#34;DisableAntiSpyware&#34; AND Registry.registry_value_name=&#34;DWORD (0x00000001)&#34; by Registry.dest Registry.user Registry.registry_path Registry.registry_value_name 
| `drop_dm_object_name(Registry)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `windows_disableantispyware_registry_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Registry` node.

====Required field====

* _time

* Registry.registry_key_name

* Registry.registry_value_name

* Registry.dest

* Registry.user

* Registry.registry_path



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1562.001
| Disable or Modify Tools
| Defense Evasion
|-
| T1562
| Impair Defenses
| Defense Evasion
|}


====Kill Chain Phase====

* Delivery


====Known False Positives====
It is unusual to turn this feature off a Windows system since it is a default security control, although it is not rare for some policies to disable it. Although no false positives have been identified, use the provided filter macro to tune the search.

====Reference====


* https://blog.malwarebytes.com/malwarebytes-news/2021/02/lazyscripter-from-empire-to-double-rat/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1562.001/atomic_red_team/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Windows event log cleared===
The following analytic utilizes Windows Security Event ID 1102 or System log event 104 to identify when a Windows event log is cleared. Note that this analytic will require tuning or restricted to specific endpoints based on criticality. During triage, based on time of day and user, determine if this was planned. If not planned, follow through with reviewing parallel alerts and other data sources to determine what else may have occurred.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/ T1070], [https://attack.mitre.org/techniques/T1070/001/ T1070.001]
* '''Last Updated''': 2020-07-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>(`wineventlog_security` EventCode=1102) OR (`wineventlog_system` EventCode=104) 
| stats count min(_time) as firstTime max(_time) as lastTime by dest Message EventCode 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `windows_event_log_cleared_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_Log_Manipulation|Windows Log Manipulation]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Clop_Ransomware|Clop Ransomware]]


====How To Implement====
To successfully implement this search, you need to be ingesting Windows event logs from your hosts. In addition, the Splunk Windows TA is needed.

====Required field====

* _time

* EventCode

* dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1070
| Indicator Removal on Host
| Defense Evasion
|-
| T1070.001
| Clear Windows Event Logs
| Defense Evasion
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
It is possible that these logs may be legitimately cleared by Administrators. Filter as needed.

====Reference====


* https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-1102

* https://www.ired.team/offensive-security/defense-evasion/disabling-windows-event-logs-by-suspending-eventlog-service-threads

* https://attack.mitre.org/techniques/T1070/001/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1070.001/T1070.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1070.001/atomic_red_team/windows-security.log

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1070.001/atomic_red_team/windows-system.log


''version'': 6
</div>
</div>

----

===Windows security account manager stopped===
The search looks for a Windows Security Account Manager (SAM) was stopped via command-line. This is consistent with Ryuk infections across a fleet of endpoints.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1489/ T1489]
* '''Last Updated''': 2020-11-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes WHERE (&#34;Processes.process_name&#34;=&#34;net*.exe&#34; &#34;Processes.process&#34;=&#34;*stop \&#34;samss\&#34;*&#34;) BY &#34;Processes.dest&#34;, &#34;Processes.user&#34;, &#34;Processes.process&#34; 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(lastTime)` 
| `security_content_ctime(firstTime)` 
| `windows_security_account_manager_stopped_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]


====How To Implement====
You must be ingesting data that records the process-system activity from your hosts to populate the Endpoint Processes data-model object. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data.

====Required field====

* _time

* Processes.process_name

* Processes.process

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1489
| Service Stop
| Impact
|}


====Kill Chain Phase====

* Delivery


====Known False Positives====
SAM is a critical windows service, stopping it would cause major issues on an endpoint this makes false positive rare. AlthoughNo false positives have been identified.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/ryuk/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Winhlp32 spawning a process===
The following analytic identifies winhlp32.exe, found natively in `c:\windows\`, spawning a child process that loads a file out of appdata, programdata, or temp. Winhlp32.exe has a rocky past in that multiple vulnerabilities were found and added to MetaSploit. WinHlp32.exe is required to display 32-bit Help files that have the &#34;.hlp&#34; file name extension. This particular instance is related to a Remcos sample where dynwrapx.dll is added to the registry under inprocserver32, and later module loaded by winhlp32.exe to spawn wscript.exe and load a vbs or file from disk. During triage, review parallel processes to identify further suspicious behavior. Review module loads for unsuspecting unsigned modules. Capture any file modifications and analyze.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-10-05

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=winhlp32.exe Processes.process IN (&#34;*\\appdata\\*&#34;,&#34;*\\programdata\\*&#34;, &#34;*\\temp\\*&#34;) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `winhlp32_spawning_a_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited as winhlp32.exe is typically not used with the latest flavors of Windows OS. However, filter as needed.

====Reference====


* https://www.exploit-db.com/exploits/16541

* https://tria.ge/210929-ap75vsddan

* https://www.virustotal.com/gui/file/cb77b93150cb0f7fe65ce8a7e2a5781e727419451355a7736db84109fa215a89



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/remcos/remcos/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Winword spawning cmd===
The following detection identifies Microsoft Word spawning `cmd.exe`. Typically, this is not common behavior and not default with winword.exe. Winword.exe will generally be found in the following path `C:\Program Files\Microsoft Office\root\Office16` (version will vary). Cmd.exe spawning from winword.exe is common for a spearphishing attachment and is actively used. Albeit, the command-line will indicate what is being executed. During triage, review parallel processes and identify any files that may have been written. It is possible that COM is utilized to trampoline the child process to `explorer.exe` or `wmiprvse.exe`.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-04-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=winword.exe `process_cmd` by Processes.dest Processes.user Processes.parent_process Processes.original_file_name Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `winword_spawning_cmd_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited, but if any are present, filter as needed.

====Reference====


* https://app.any.run/tasks/73af0064-a785-4c0a-ab0d-cde593fe16ef/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Winword spawning powershell===
The following detection identifies Microsoft Word spawning PowerShell. Typically, this is not common behavior and not default with winword.exe. Winword.exe will generally be found in the following path `C:\Program Files\Microsoft Office\root\Office16` (version will vary). PowerShell spawning from winword.exe is common for a spearphishing attachment and is actively used. Albeit, the command executed will most likely be encoded and captured via another detection. During triage, review parallel processes and identify any files that may have been written.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-04-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=&#34;winword.exe&#34; `process_powershell` by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.original_file_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `winword_spawning_powershell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachments|Spearphishing Attachments]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited, but if any are present, filter as needed.

====Reference====


* https://redcanary.com/threat-detection-report/techniques/powershell/

* https://attack.mitre.org/techniques/T1566/001/

* https://app.any.run/tasks/b79fa381-f35c-4b3e-8d02-507e7ee7342f/

* https://app.any.run/tasks/181ac90b-0898-4631-8701-b778a30610ad/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon.log


''version'': 2
</div>
</div>

----

===Winword spawning windows script host===
The following detection identifies Microsoft Winword.exe spawning Windows Script Host - `cscript.exe` or `wscript.exe`. Typically, this is not common behavior and not default with Winword.exe. Winword.exe will generally be found in the following path `C:\Program Files\Microsoft Office\root\Office16` (version will vary). `cscript.exe` or `wscript.exe` default location is `c:\windows\system32\` or c:windows\syswow64\`. `cscript.exe` or `wscript.exe` spawning from Winword.exe is common for a spearphishing attachment and is actively used. Albeit, the command-line executed will most likely be obfuscated and captured via another detection. During triage, review parallel processes and identify any files that may have been written. Review the reputation of the remote destination and block accordingly.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566/ T1566], [https://attack.mitre.org/techniques/T1566/001/ T1566.001]
* '''Last Updated''': 2021-04-12

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name=&#34;winword.exe&#34; Processes.process_name IN (&#34;cscript.exe&#34;, &#34;wscript.exe&#34;) by Processes.dest Processes.user Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `winword_spawning_windows_script_host_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Spearphishing_Attachment|Spearphishing Attachment]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node.

====Required field====

* _time

* process_name

* process_id

* parent_process_name

* dest

* user

* parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1566
| Phishing
| Initial Access
|-
| T1566.001
| Spearphishing Attachment
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
There will be limited false positives and it will be different for every environment. Tune by child process or command-line as needed.

====Reference====


* https://attack.mitre.org/techniques/T1566/001/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1566.001/macro/windows-sysmon_wsh.log


''version'': 1
</div>
</div>

----

===Wmic group discovery===
The following hunting analytic identifies the use of `wmic.exe` enumerating local groups on the endpoint. \
Typically, by itself, is not malicious but may raise suspicion based on time of day, endpoint and username. \
During triage, review parallel processes and identify any further suspicious behavior.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1069/ T1069], [https://attack.mitre.org/techniques/T1069/001/ T1069.001]
* '''Last Updated''': 2021-09-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=wmic.exe (Processes.process=&#34;*group get name*&#34;) by Processes.dest Processes.user Processes.parent_process_name Processes.process_name Processes.process Processes.original_file_name Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `wmic_group_discovery_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Active_Directory_Discovery|Active Directory Discovery]]


====How To Implement====
To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1069
| Permission Groups Discovery
| Discovery
|-
| T1069.001
| Local Groups
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
Administrators or power users may use this command for troubleshooting.

====Reference====


* https://attack.mitre.org/techniques/T1069/001/

* https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1069.001/T1069.001.md



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.001/atomic_red_team/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Write executable in smb share===
This search is to detect suspicious dropping or creating an executable file in known sensitive SMB share. This technique is commonly used for lateral movement like how trickbot try to infect other machine in the infected network. This detection catch the access event (FILE WRITE) access to a share.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/ T1021], [https://attack.mitre.org/techniques/T1021/002/ T1021.002]
* '''Last Updated''': 2021-04-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`wineventlog_security` EventCode=5145 Relative_Target_Name IN (&#34;*.exe&#34;,&#34;*.dll&#34;) Object_Type=File Share_Name IN (&#34;\\\\*\\C$&#34;,&#34;\\\\*\\IPC$&#34;,&#34;\\\\*\\admin$&#34;) Access_Mask= &#34;0x2&#34; 
| stats min(_time) as firstTime max(_time) as lastTime count by EventCode Share_Name Relative_Target_Name Object_Type Access_Mask user src_port Source_Address 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `write_executable_in_smb_share_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Trickbot|Trickbot]]


====How To Implement====
To successfully implement this search, you need to be ingesting Windows Security Event Logs with 5145 EventCode enabled. The Windows TA is also required. Also enable the object Audit access success/failure in your group policy.

====Required field====

* _time

* EventCode

* Share_Name

* Relative_Target_Name

* Object_Type

* Access_Mask

* user

* src_port

* Source_Address



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021
| Remote Services
| Lateral Movement
|-
| T1021.002
| SMB/Windows Admin Shares
| Lateral Movement
|}


====Kill Chain Phase====

* Lateral Movement


====Known False Positives====
unknown

====Reference====


* https://labs.vipre.com/trickbot-and-its-modules/

* https://blog.whitehat.eu/2019/05/incident-trickbot-ryuk-2.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/trickbot/exe_smbshare/windows-security.log


''version'': 1
</div>
</div>

----

===Wscript or cscript suspicious child process===
This analytic is to detect a suspicious spawned process by wscript or cscript process. This technique was a common technique used by adversaries and malware to execute different LOLBIN, other script like powershell or create a suspended process to inject its code as a defense evasion. This TTP may detect some normal script that using several application tool that are in the list of the child process it detects but a good pivot and indicator that a script is may execute suspicious code.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055], [https://attack.mitre.org/techniques/T1543/ T1543], [https://attack.mitre.org/techniques/T1134/004/ T1134.004], [https://attack.mitre.org/techniques/T1134/ T1134]
* '''Last Updated''': 2021-10-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name IN (&#34;cscript.exe&#34;, &#34;wscript.exe&#34;) Processes.process_name IN (&#34;regsvr32.exe&#34;, &#34;rundll32.exe&#34;,&#34;winhlp32.exe&#34;,&#34;certutil.exe&#34;,&#34;msbuild.exe&#34;,&#34;cmd.exe&#34;,&#34;powershell*&#34;,&#34;wmic.exe&#34;,&#34;mshta.exe&#34;) by Processes.dest Processes.user Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process Processes.process_id Processes.parent_process_id 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `wscript_or_cscript_suspicious_child_process_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]

* [[Documentation:ESSOC:stories:UseCase#Remcos|Remcos]]

* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual Processes]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.dest

* Processes.user

* Processes.parent_process_name

* Processes.parent_process

* Processes.original_file_name

* Processes.process_name

* Processes.process

* Processes.process_id

* Processes.parent_process_path

* Processes.process_path

* Processes.parent_process_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1055
| Process Injection
| Defense Evasion, Privilege Escalation
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|-
| T1134.004
| Parent PID Spoofing
| Defense Evasion, Privilege Escalation
|-
| T1134
| Access Token Manipulation
| Defense Evasion, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
user may create vbs or js script that use several tool as part of its execution.

====Reference====


* https://www.hybrid-analysis.com/sample/8da5b75b6380a41eee3a399c43dfe0d99eeefaa1fd21027a07b1ecaa4cd96fdd?environmentId=120



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.005/vbs_wscript/sysmon.log


''version'': 1
</div>
</div>

----

===Xmrig driver loaded===
This analytic identifies XMRIG coinminer driver installation on the system. The XMRIG driver name by default is `WinRing0x64.sys`. This cpu miner is an open source project that is commonly abused by adversaries to infect and mine bitcoin.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1543/003/ T1543.003], [https://attack.mitre.org/techniques/T1543/ T1543]
* '''Last Updated''': 2021-04-29

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`sysmon` EventCode=6 Signature=&#34;Noriyuki MIYAZAKI&#34; OR ImageLoaded= &#34;*\\WinRing0x64.sys&#34; 
|  stats  min(_time) as firstTime max(_time) as lastTime count by  Computer ImageLoaded Hashes IMPHASH Signature Signed 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `xmrig_driver_loaded_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#XMRig|XMRig]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the driver loaded and Signature from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Computer

* ImageLoaded

* Hashes

* IMPHASH

* Signature

* Signed



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1543.003
| Windows Service
| Persistence, Privilege Escalation
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
False positives should be limited.

====Reference====


* https://www.trendmicro.com/vinfo/hk/threat-encyclopedia/malware/trojan.ps1.powtran.a/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/xmrig_miner/windows-sysmon.log


''version'': 1
</div>
</div>

----

===Xsl script execution with wmic===
This search is to detect a suspicious wmic.exe process or renamed wmic process to execute malicious xsl file. This technique was seen in FIN7 to execute its malicous jscript using the .xsl as the loader with the help of wmic.exe process. This TTP is really a good indicator for you to hunt further for FIN7 or other attacker that known to used this technique.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1220/ T1220]
* '''Last Updated''': 2021-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process = &#34;*os get*&#34; Processes.process=&#34;*/format:*&#34; Processes.process = &#34;*.xsl*&#34; by Processes.parent_process_name Processes.parent_process Processes.process_name Processes.process_id Processes.process Processes.dest Processes.user 
| `drop_dm_object_name(Processes)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `xsl_script_execution_with_wmic_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#FIN7|FIN7]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the process name, parent process, and command-line executions from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA.

====Required field====

* _time

* Processes.parent_process_name

* Processes.parent_process

* Processes.process_name

* Processes.process_id

* Processes.process

* Processes.dest

* Processes.user



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1220
| XSL Script Processing
| Defense Evasion
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.fireeye.com/blog/threat-research/2018/08/fin7-pursuing-an-enigmatic-and-evasive-global-criminal-operation.html

* https://attack.mitre.org/groups/G0046/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/malware/fin7/fin7_macro_js_1/sysmon.log


''version'': 1
</div>
</div>

----



==Network==


===Dns query length outliers - mltk===
This search allows you to identify DNS requests that are unusually large for the record type being requested in your environment.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Resolution
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1071/004/ T1071.004], [https://attack.mitre.org/techniques/T1071/ T1071]
* '''Last Updated''': 2020-01-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as start_time max(_time) as end_time values(DNS.src) as src values(DNS.dest) as dest from datamodel=Network_Resolution by DNS.query DNS.record_type 
| search DNS.record_type=* 
|  `drop_dm_object_name(DNS)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| eval query_length = len(query) 
| apply dns_query_pdfmodel threshold=0.01 
| rename &#34;IsOutlier(query_length)&#34; as isOutlier 
| search isOutlier &gt; 0 
| sort -query_length 
| table start_time end_time query record_type count src dest query_length 
| `dns_query_length_outliers___mltk_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Hidden_Cobra_Malware|Hidden Cobra Malware]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_DNS_Traffic|Suspicious DNS Traffic]]

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]


====How To Implement====
To successfully implement this search, you will need to ensure that DNS data is populating the Network_Resolution data model. In addition, the Machine Learning Toolkit (MLTK) version 4.2 or greater must be installed on your search heads, along with any required dependencies. Finally, the support search &#34;Baseline of DNS Query Length - MLTK&#34; must be executed before this detection search, because it builds a machine-learning (ML) model over the historical data used by this search. It is important that this search is run in the same app context as the associated support search, so that the model created by the support search is available for use. You should periodically re-run the support search to rebuild the model with the latest data available in your environment.\
This search produces fields (`query`,`query_length`,`count`) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable. To see the additional metadata, add the following fields, if not already present, to Incident Review - Event Attributes (Configure &gt; Incident Management &gt; Incident Review Settings &gt; Add New Entry):\\n1. **Label:** DNS Query, **Field:** query\
1. \
1. **Label:** DNS Query Length, **Field:** query_length\
1. \
1. **Label:** Number of events, **Field:** count\
Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details`

====Required field====

* _time

* DNS.src

* DNS.dest

* DNS.query

* DNS.record_type



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1071.004
| DNS
| Command And Control
|-
| T1071
| Application Layer Protocol
| Command And Control
|}


====Kill Chain Phase====

* Command and Control


====Known False Positives====
If you are seeing more results than desired, you may consider reducing the value for threshold in the search. You should also periodically re-run the support search to re-build the ML model on the latest data.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Dns query length with high standard deviation===
This search allows you to identify DNS requests and compute the standard deviation on the length of the names being resolved, then filter on two times the standard deviation to show you those queries that are unusually large for your environment.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Resolution
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1048/003/ T1048.003], [https://attack.mitre.org/techniques/T1048/ T1048]
* '''Last Updated''': 2021-10-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count from datamodel=Network_Resolution where NOT DNS.message_type IN(&#34;Pointer&#34;,&#34;PTR&#34;) by DNS.query 
| `drop_dm_object_name(&#34;DNS&#34;)` 
| eval tlds=split(query,&#34;.&#34;) 
| eval tld=mvindex(tlds,-1) 
| eval tld_len=len(tld) 
| search tld_len&lt;=24 
| eval query_length = len(query) 
| table query query_length record_type count 
| eventstats stdev(query_length) AS stdev avg(query_length) AS avg p50(query_length) AS p50
| where query_length&gt;(avg+stdev*2) 
| eval z_score=(query_length-avg)/stdev 
| `dns_query_length_with_high_standard_deviation_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Hidden_Cobra_Malware|Hidden Cobra Malware]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_DNS_Traffic|Suspicious DNS Traffic]]

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]


====How To Implement====
To successfully implement this search, you will need to ensure that DNS data is populating the Network_Resolution data model.

====Required field====

* _time

* DNS.query



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1048.003
| Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol
| Exfiltration
|-
| T1048
| Exfiltration Over Alternative Protocol
| Exfiltration
|}


====Kill Chain Phase====

* Command and Control


====Known False Positives====
It&#39;s possible there can be long domain names that are legitimate.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1048.003/long_dns_queries/windows-sysmon.log


''version'': 4
</div>
</div>

----

===Detect arp poisoning===
By enabling Dynamic ARP Inspection as a Layer 2 Security measure on the organization&#39;s network devices, we will be able to detect ARP Poisoning attacks in the Infrastructure.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1200/ T1200], [https://attack.mitre.org/techniques/T1498/ T1498], [https://attack.mitre.org/techniques/T1557/ T1557], [https://attack.mitre.org/techniques/T1557/002/ T1557.002]
* '''Last Updated''': 2020-08-11

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cisco_networks` facility=&#34;PM&#34; mnemonic=&#34;ERR_DISABLE&#34; disable_cause=&#34;arp-inspection&#34; 
| eval src_interface=src_int_prefix_long+src_int_suffix 
| stats min(_time) AS firstTime max(_time) AS lastTime count BY host src_interface 
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)`
| `detect_arp_poisoning_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Router_and_Infrastructure_Security|Router and Infrastructure Security]]


====How To Implement====
This search uses a standard SPL query on logs from Cisco Network devices. The network devices must be configured with DHCP Snooping (see https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960x/software/15-0_2_EX/security/configuration_guide/b_sec_152ex_2960-x_cg/b_sec_152ex_2960-x_cg_chapter_01101.html) and Dynamic ARP Inspection (see https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960x/software/15-2_2_e/security/configuration_guide/b_sec_1522e_2960x_cg/b_sec_1522e_2960x_cg_chapter_01111.html) and log with a severity level of minimum &#34;5 - notification&#34;. The search also requires that the Cisco Networks Add-on for Splunk (https://splunkbase.splunk.com/app/1467) is used to parse the logs from the Cisco network devices.

====Required field====

* _time

* facility

* mnemonic

* disable_cause

* src_int_prefix_long

* src_int_suffix

* host

* src_interface



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1200
| Hardware Additions
| Initial Access
|-
| T1498
| Network Denial of Service
| Impact
|-
| T1557
| Adversary-in-the-Middle
| Credential Access, Collection
|-
| T1557.002
| ARP Cache Poisoning
| Credential Access, Collection
|}


====Kill Chain Phase====

* Reconnaissance

* Delivery

* Actions on Objectives


====Known False Positives====
This search might be prone to high false positives if DHCP Snooping or ARP inspection has been incorrectly configured, or if a device normally sends many ARP packets (unlikely).

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect ipv6 network infrastructure threats===
By enabling IPv6 First Hop Security as a Layer 2 Security measure on the organization&#39;s network devices, we will be able to detect various attacks such as packet forging in the Infrastructure.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1200/ T1200], [https://attack.mitre.org/techniques/T1498/ T1498], [https://attack.mitre.org/techniques/T1557/ T1557], [https://attack.mitre.org/techniques/T1557/002/ T1557.002]
* '''Last Updated''': 2020-10-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cisco_networks` facility=&#34;SISF&#34; mnemonic IN (&#34;IP_THEFT&#34;,&#34;MAC_THEFT&#34;,&#34;MAC_AND_IP_THEFT&#34;,&#34;PAK_DROP&#34;) 
| eval src_interface=src_int_prefix_long+src_int_suffix 
| eval dest_interface=dest_int_prefix_long+dest_int_suffix 
| stats min(_time) AS firstTime max(_time) AS lastTime values(src_mac) AS src_mac values(src_vlan) AS src_vlan values(mnemonic) AS mnemonic values(vendor_explanation) AS vendor_explanation values(src_ip) AS src_ip values(dest_ip) AS dest_ip values(dest_interface) AS dest_interface values(action) AS action count BY host src_interface 
| table host src_interface dest_interface src_mac src_ip dest_ip src_vlan mnemonic vendor_explanation action count 
| `security_content_ctime(firstTime)` 
|`security_content_ctime(lastTime)` 
| `detect_ipv6_network_infrastructure_threats_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Router_and_Infrastructure_Security|Router and Infrastructure Security]]


====How To Implement====
This search uses a standard SPL query on logs from Cisco Network devices. The network devices must be configured with one or more First Hop Security measures such as RA Guard, DHCP Guard and/or device tracking. See References for more information. The search also requires that the Cisco Networks Add-on for Splunk (https://splunkbase.splunk.com/app/1467) is used to parse the logs from the Cisco network devices.

====Required field====

* _time

* facility

* mnemonic

* src_int_prefix_long

* src_int_suffix

* dest_int_prefix_long

* dest_int_suffix

* src_mac

* src_vlan

* vendor_explanation

* action



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1200
| Hardware Additions
| Initial Access
|-
| T1498
| Network Denial of Service
| Impact
|-
| T1557
| Adversary-in-the-Middle
| Credential Access, Collection
|-
| T1557.002
| ARP Cache Poisoning
| Credential Access, Collection
|}


====Kill Chain Phase====

* Reconnaissance

* Delivery

* Actions on Objectives


====Known False Positives====
None currently known

====Reference====


* https://www.ciscolive.com/c/dam/r/ciscolive/emea/docs/2019/pdf/BRKSEC-3200.pdf

* https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipv6_fhsec/configuration/xe-16-12/ip6f-xe-16-12-book/ip6-ra-guard.html

* https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipv6_fhsec/configuration/xe-16-12/ip6f-xe-16-12-book/ip6-snooping.html

* https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipv6_fhsec/configuration/xe-16-12/ip6f-xe-16-12-book/ip6-dad-proxy.html

* https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipv6_fhsec/configuration/xe-16-12/ip6f-xe-16-12-book/ip6-nd-mcast-supp.html

* https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipv6_fhsec/configuration/xe-16-12/ip6f-xe-16-12-book/ip6-dhcpv6-guard.html

* https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipv6_fhsec/configuration/xe-16-12/ip6f-xe-16-12-book/ip6-src-guard.html

* https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipv6_fhsec/configuration/xe-16-12/ip6f-xe-16-12-book/ipv6-dest-guard.html



====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect large outbound icmp packets===
This search looks for outbound ICMP packets with a packet size larger than 1,000 bytes. Various threat actors have been known to use ICMP as a command and control channel for their attack infrastructure. Large ICMP packets from an endpoint to a remote host may be indicative of this activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1095/ T1095]
* '''Last Updated''': 2018-06-01

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count earliest(_time) as firstTime latest(_time) as lastTime values(All_Traffic.action) values(All_Traffic.bytes) from datamodel=Network_Traffic where All_Traffic.action !=blocked All_Traffic.dest_category !=internal (All_Traffic.protocol=icmp OR All_Traffic.transport=icmp) All_Traffic.bytes &gt; 1000 by All_Traffic.src_ip All_Traffic.dest_ip 
| `drop_dm_object_name(&#34;All_Traffic&#34;)` 
| search ( dest_ip!=10.0.0.0/8 AND dest_ip!=172.16.0.0/12 AND dest_ip!=192.168.0.0/16) 
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)` 
| `detect_large_outbound_icmp_packets_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]


====How To Implement====
In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have a good understanding of how your network segments are designed and that you are able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the company&#39;s assets in the `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model

====Required field====

* _time

* All_Traffic.action

* All_Traffic.bytes

* All_Traffic.dest_category

* All_Traffic.protocol

* All_Traffic.transport

* All_Traffic.src_ip

* All_Traffic.dest_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1095
| Non-Application Layer Protocol
| Command And Control
|}


====Kill Chain Phase====

* Command and Control


====Known False Positives====
ICMP packets are used in a variety of ways to help troubleshoot networking issues and ensure the proper flow of traffic. As such, it is possible that a large ICMP packet could be perfectly legitimate. If large ICMP packets are associated with command and control traffic, there will typically be a large number of these packets observed over time. If the search is providing a large number of false positives, you can modify the macro `detect_large_outbound_icmp_packets_filter` to adjust the byte threshold or add specific IP addresses to an allow list.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Detect outbound smb traffic===
This search looks for outbound SMB connections made by hosts within your network to the Internet. SMB traffic is used for Windows file-sharing activity. One of the techniques often used by attackers involves retrieving the credential hash using an SMB request made to a compromised server controlled by the threat actor.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1071/002/ T1071.002], [https://attack.mitre.org/techniques/T1071/ T1071]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` earliest(_time) as start_time latest(_time) as end_time values(All_Traffic.action) as action values(All_Traffic.app) as app values(All_Traffic.dest_ip) as dest_ip values(All_Traffic.dest_port) as dest_port values(sourcetype) as sourcetype count from datamodel=Network_Traffic where ((All_Traffic.dest_port=139 OR All_Traffic.dest_port=445 OR All_Traffic.app=&#34;smb&#34;) AND NOT (All_Traffic.action=&#34;blocked&#34; OR All_Traffic.dest_category=&#34;internal&#34; OR All_Traffic.dest_ip=10.0.0.0/8 OR All_Traffic.dest_ip=172.16.0.0/12 OR All_Traffic.dest_ip=192.168.0.0/16 OR All_Traffic.dest_ip=100.64.0.0/10)) by All_Traffic.src_ip 
| `drop_dm_object_name(&#34;All_Traffic&#34;)` 
| `security_content_ctime(start_time)` 
| `security_content_ctime(end_time)` 
| `detect_outbound_smb_traffic_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Hidden_Cobra_Malware|Hidden Cobra Malware]]

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have good understanding of how your network segments are designed, and be able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the companys assets in `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model

====Required field====

* _time

* All_Traffic.action

* All_Traffic.app

* All_Traffic.dest_ip

* All_Traffic.dest_port

* sourcetype

* All_Traffic.dest_category

* All_Traffic.src_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1071.002
| File Transfer Protocols
| Command And Control
|-
| T1071
| Application Layer Protocol
| Command And Control
|}


====Kill Chain Phase====

* Actions on Objectives

* Command and Control


====Known False Positives====
It is likely that the outbound Server Message Block (SMB) traffic is legitimate, if the company&#39;s internal networks are not well-defined in the Assets and Identity Framework. Categorize the internal CIDR blocks as `internal` in the lookup file to avoid creating notable events for traffic destined to those CIDR blocks. Any other network connection that is going out to the Internet should be investigated and blocked. Best practices suggest preventing external communications of all SMB versions and related protocols at the network boundary.

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Detect port security violation===
By enabling Port Security on a Cisco switch you can restrict input to an interface by limiting and identifying MAC addresses of the workstations that are allowed to access the port. When you assign secure MAC addresses to a secure port, the port does not forward packets with source addresses outside the group of defined addresses. If you limit the number of secure MAC addresses to one and assign a single secure MAC address, the workstation attached to that port is assured the full bandwidth of the port. If a port is configured as a secure port and the maximum number of secure MAC addresses is reached, when the MAC address of a workstation attempting to access the port is different from any of the identified secure MAC addresses, a security violation occurs.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1200/ T1200], [https://attack.mitre.org/techniques/T1498/ T1498], [https://attack.mitre.org/techniques/T1557/ T1557], [https://attack.mitre.org/techniques/T1557/002/ T1557.002]
* '''Last Updated''': 2020-10-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cisco_networks` (facility=&#34;PM&#34; mnemonic=&#34;ERR_DISABLE&#34; disable_cause=&#34;psecure-violation&#34;) OR (facility=&#34;PORT_SECURITY&#34; mnemonic=&#34;PSECURE_VIOLATION&#34; OR mnemonic=&#34;PSECURE_VIOLATION_VLAN&#34;) 
| eval src_interface=src_int_prefix_long+src_int_suffix 
| stats min(_time) AS firstTime max(_time) AS lastTime values(disable_cause) AS disable_cause values(src_mac) AS src_mac values(src_vlan) AS src_vlan values(action) AS action count by host src_interface 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_port_security_violation_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Router_and_Infrastructure_Security|Router and Infrastructure Security]]


====How To Implement====
This search uses a standard SPL query on logs from Cisco Network devices. The network devices must be configured with Port Security and Error Disable for this to work (see https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst4500/12-2/25ew/configuration/guide/conf/port_sec.html) and log with a severity level of minimum &#34;5 - notification&#34;. The search also requires that the Cisco Networks Add-on for Splunk (https://splunkbase.splunk.com/app/1467) is used to parse the logs from the Cisco network devices.

====Required field====

* _time

* facility

* mnemonic

* disable_cause

* src_int_prefix_long

* src_int_suffix

* src_mac

* src_vlan

* action

* host

* src_interface



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1200
| Hardware Additions
| Initial Access
|-
| T1498
| Network Denial of Service
| Impact
|-
| T1557
| Adversary-in-the-Middle
| Credential Access, Collection
|-
| T1557.002
| ARP Cache Poisoning
| Credential Access, Collection
|}


====Kill Chain Phase====

* Reconnaissance

* Delivery

* Exploitation

* Actions on Objectives


====Known False Positives====
This search might be prone to high false positives if you have malfunctioning devices connected to your ethernet ports or if end users periodically connect physical devices to the network.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect rogue dhcp server===
By enabling DHCP Snooping as a Layer 2 Security measure on the organization&#39;s network devices, we will be able to detect unauthorized DHCP servers handing out DHCP leases to devices on the network (Man in the Middle attack).

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1200/ T1200], [https://attack.mitre.org/techniques/T1498/ T1498], [https://attack.mitre.org/techniques/T1557/ T1557]
* '''Last Updated''': 2020-08-11

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cisco_networks` facility=&#34;DHCP_SNOOPING&#34; mnemonic=&#34;DHCP_SNOOPING_UNTRUSTED_PORT&#34; 
| stats min(_time) AS firstTime max(_time) AS lastTime count values(message_type) AS message_type values(src_mac) AS src_mac BY host 
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)`
| `detect_rogue_dhcp_server_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Router_and_Infrastructure_Security|Router and Infrastructure Security]]


====How To Implement====
This search uses a standard SPL query on logs from Cisco Network devices. The network devices must be configured with DHCP Snooping enabled (see https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960x/software/15-0_2_EX/security/configuration_guide/b_sec_152ex_2960-x_cg/b_sec_152ex_2960-x_cg_chapter_01101.html) and log with a severity level of minimum &#34;5 - notification&#34;. The search also requires that the Cisco Networks Add-on for Splunk (https://splunkbase.splunk.com/app/1467) is used to parse the logs from the Cisco network devices.

====Required field====

* _time

* facility

* mnemonic

* message_type

* src_mac

* host



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1200
| Hardware Additions
| Initial Access
|-
| T1498
| Network Denial of Service
| Impact
|-
| T1557
| Adversary-in-the-Middle
| Credential Access, Collection
|}


====Kill Chain Phase====

* Reconnaissance

* Delivery

* Actions on Objectives


====Known False Positives====
This search might be prone to high false positives if DHCP Snooping has been incorrectly configured or in the unlikely event that the DHCP server has been moved to another network interface.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect snicat sni exfiltration===
This search looks for commands that the SNICat tool uses in the TLS SNI field.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1041/ T1041]
* '''Last Updated''': 2020-10-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`zeek_ssl` 
| rex field=server_name &#34;(?&lt;snicat&gt;(LIST
|LS
|SIZE
|LD
|CB
|CD
|EX
|ALIVE
|EXIT
|WHERE
|finito)-[A-Za-z0-9]{16}\.)&#34; 
| stats count by src_ip dest_ip server_name snicat 
| where count&gt;0 
| table src_ip dest_ip server_name snicat 
| `detect_snicat_sni_exfiltration_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Data_Exfiltration|Data Exfiltration]]


====How To Implement====
You must be ingesting Zeek SSL data into Splunk. Zeek data should also be getting ingested in JSON format.  We are detecting when any of the predefined SNICat commands are found within the server_name (SNI) field. These commands are LIST, LS, SIZE, LD, CB, EX, ALIVE, EXIT, WHERE, and finito.  You can go further once this has been detected, and run other searches to decode the SNI data to prove or disprove if any data exfiltration has taken place.

====Required field====

* _time

* server_name

* src_ip

* dest_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1041
| Exfiltration Over C2 Channel
| Exfiltration
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Unknown

====Reference====


* https://www.mnemonic.no/blog/introducing-snicat/

* https://github.com/mnemonic-no/SNIcat

* https://attack.mitre.org/techniques/T1041/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect software download to network device===
Adversaries may abuse netbooting to load an unauthorized network device operating system from a Trivial File Transfer Protocol (TFTP) server. TFTP boot (netbooting) is commonly used by network administrators to load configuration-controlled network device images from a centralized management server. Netbooting is one option in the boot sequence and can be used to centralize, manage, and control device images.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1542/005/ T1542.005], [https://attack.mitre.org/techniques/T1542/ T1542]
* '''Last Updated''': 2020-10-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where (All_Traffic.transport=udp AND All_Traffic.dest_port=69) OR (All_Traffic.transport=tcp AND All_Traffic.dest_port=21) OR (All_Traffic.transport=tcp AND All_Traffic.dest_port=22) AND All_Traffic.dest_category!=common_software_repo_destination AND All_Traffic.src_category=network OR All_Traffic.src_category=router OR All_Traffic.src_category=switch by All_Traffic.src All_Traffic.dest All_Traffic.dest_port 
| `drop_dm_object_name(&#34;All_Traffic&#34;)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `detect_software_download_to_network_device_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Router_and_Infrastructure_Security|Router and Infrastructure Security]]


====How To Implement====
This search looks for Network Traffic events to TFTP, FTP or SSH/SCP ports from network devices. Make sure to tag any network devices as network, router or switch in order for this detection to work. If the TFTP traffic doesn&#39;t traverse a firewall nor packet inspection, these events will not be logged. This is typically an issue if the TFTP server is on the same subnet as the network device. There is also a chance of the network device loading software using a DHCP assigned IP address (netboot) which is not in the Asset inventory.

====Required field====

* _time

* All_Traffic.transport

* All_Traffic.dest_port

* All_Traffic.dest_category

* All_Traffic.src_category

* All_Traffic.src

* All_Traffic.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1542.005
| TFTP Boot
| Defense Evasion, Persistence
|-
| T1542
| Pre-OS Boot
| Defense Evasion, Persistence
|}


====Kill Chain Phase====

* Delivery


====Known False Positives====
This search will also report any legitimate attempts of software downloads to network devices as well as outbound SSH sessions from network devices.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect traffic mirroring===
Adversaries may leverage traffic mirroring in order to automate data exfiltration over compromised network infrastructure. Traffic mirroring is a native feature for some network devices and used for network analysis and may be configured to duplicate traffic and forward to one or more destinations for analysis by a network analyzer or other monitoring device.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1200/ T1200], [https://attack.mitre.org/techniques/T1020/ T1020], [https://attack.mitre.org/techniques/T1498/ T1498], [https://attack.mitre.org/techniques/T1020/001/ T1020.001]
* '''Last Updated''': 2020-10-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`cisco_networks` (facility=&#34;MIRROR&#34; mnemonic=&#34;ETH_SPAN_SESSION_UP&#34;) OR (facility=&#34;SPAN&#34; mnemonic=&#34;SESSION_UP&#34;) OR (facility=&#34;SPAN&#34; mnemonic=&#34;PKTCAP_START&#34;) OR (mnemonic=&#34;CFGLOG_LOGGEDCMD&#34; command=&#34;monitor session*&#34;) 
| stats min(_time) AS firstTime max(_time) AS lastTime count BY host facility mnemonic 
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)` 
| `detect_traffic_mirroring_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Router_and_Infrastructure_Security|Router and Infrastructure Security]]


====How To Implement====
This search uses a standard SPL query on logs from Cisco Network devices. The network devices must log with a severity level of minimum &#34;5 - notification&#34;. The search also requires that the Cisco Networks Add-on for Splunk (https://splunkbase.splunk.com/app/1467) is used to parse the logs from the Cisco network devices and that the devices have been configured according to the documentation of the Cisco Networks Add-on. Also note that an attacker may disable logging from the device prior to enabling traffic mirroring.

====Required field====

* _time

* facility

* mnemonic

* host



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1200
| Hardware Additions
| Initial Access
|-
| T1020
| Automated Exfiltration
| Exfiltration
|-
| T1498
| Network Denial of Service
| Impact
|-
| T1020.001
| Traffic Duplication
| Exfiltration
|}


====Kill Chain Phase====

* Delivery

* Actions on Objectives


====Known False Positives====
This search will return false positives for any legitimate traffic captures by network administrators.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect unauthorized assets by mac address===
By populating the organization&#39;s assets within the assets_by_str.csv, we will be able to detect unauthorized devices that are trying to connect with the organization&#39;s network by inspecting DHCP request packets, which are issued by devices when they attempt to obtain an IP address from the DHCP server. The MAC address associated with the source of the DHCP request is checked against the list of known devices, and reports on those that are not found.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Sessions
* '''ATT&CK''': 
* '''Last Updated''': 2017-09-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count from datamodel=Network_Sessions where nodename=All_Sessions.DHCP All_Sessions.signature=DHCPREQUEST by All_Sessions.src_ip All_Sessions.dest_mac 
| dedup All_Sessions.dest_mac
| `drop_dm_object_name(&#34;Network_Sessions&#34;)`
|`drop_dm_object_name(&#34;All_Sessions&#34;)` 
| search NOT [
| inputlookup asset_lookup_by_str 
|rename mac as dest_mac 
| fields + dest_mac] 
| `detect_unauthorized_assets_by_mac_address_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Asset_Tracking|Asset Tracking]]


====How To Implement====
This search uses the Network_Sessions data model shipped with Enterprise Security. It leverages the Assets and Identity framework to populate the assets_by_str.csv file located in SA-IdentityManagement, which will contain a list of known authorized organizational assets including their MAC addresses. Ensure that all inventoried systems have their MAC address populated.

====Required field====

* _time

* All_Sessions.signature

* All_Sessions.src_ip

* All_Sessions.dest_mac




====Kill Chain Phase====

* Reconnaissance

* Delivery

* Actions on Objectives


====Known False Positives====
This search might be prone to high false positives. Please consider this when conducting analysis or investigations. Authorized devices may be detected as unauthorized. If this is the case, verify the MAC address of the system responsible for the false positive and add it to the Assets and Identity framework with the proper information.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect windows dns sigred via splunk stream===
This search detects SIGRed via Splunk Stream.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1203/ T1203]
* '''Last Updated''': 2020-07-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`stream_dns` 
| spath &#34;query_type{}&#34; 
| search &#34;query_type{}&#34; IN (SIG,KEY) 
| spath protocol_stack 
| search protocol_stack=&#34;ip:tcp:dns&#34; 
| append [search `stream_tcp` bytes_out&gt;65000] 
| `detect_windows_dns_sigred_via_splunk_stream_filter` 
| stats count by flow_id 
| where count&gt;1 
| fields - count</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_DNS_SIGRed_CVE-2020-1350|Windows DNS SIGRed CVE-2020-1350]]


====How To Implement====
You must be ingesting Splunk Stream DNS and Splunk Stream TCP. We are detecting SIG and KEY records via stream:dns and TCP payload over 65KB in size via stream:tcp.  Replace the macro definitions (&#39;stream:dns&#39; and &#39;stream:tcp&#39;) with configurations for your Splunk environment.

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1203
| Exploitation for Client Execution
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect windows dns sigred via zeek===
This search detects SIGRed via Zeek DNS and Zeek Conn data.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Resolution
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1203/ T1203]
* '''Last Updated''': 2020-07-28

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count from datamodel=Network_Resolution where DNS.query_type IN (SIG,KEY) by DNS.flow_id 
| rename DNS.flow_id as flow_id 
| append [
| tstats  `security_content_summariesonly` count from datamodel=Network_Traffic where All_Traffic.bytes_in&gt;65000 by All_Traffic.flow_id 
| rename All_Traffic.flow_id as flow_id] 
| `detect_windows_dns_sigred_via_zeek_filter` 
| stats count by flow_id 
| where count&gt;1 
| fields - count </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Windows_DNS_SIGRed_CVE-2020-1350|Windows DNS SIGRed CVE-2020-1350]]


====How To Implement====
You must be ingesting Zeek DNS and Zeek Conn data into Splunk. Zeek data should also be getting ingested in JSON format.  We are detecting SIG and KEY records via bro:dns:json and TCP payload over 65KB in size via bro:conn:json.  The Network Resolution and Network Traffic datamodels are in use for this search.

====Required field====

* _time

* DNS.query_type

* DNS.flow_id

* All_Traffic.bytes_in

* All_Traffic.flow_id



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1203
| Exploitation for Client Execution
| Execution
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://research.checkpoint.com/2020/resolving-your-way-into-domain-admin-exploiting-a-17-year-old-bug-in-windows-dns-servers/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect zerologon via zeek===
This search detects attempts to run exploits for the Zerologon CVE-2020-1472 vulnerability via Zeek RPC

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1190/ T1190]
* '''Last Updated''': 2020-09-15

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`zeek_rpc` operation IN (NetrServerPasswordSet2,NetrServerReqChallenge,NetrServerAuthenticate3) 
| bin span=5m _time 
| stats values(operation) dc(operation) as opscount count(eval(operation==&#34;NetrServerReqChallenge&#34;)) as challenge count(eval(operation==&#34;NetrServerAuthenticate3&#34;)) as authcount count(eval(operation==&#34;NetrServerPasswordSet2&#34;)) as passcount count as totalcount by _time,src_ip,dest_ip 
| search opscount=3 authcount&gt;4 passcount&gt;0 
| search `detect_zerologon_via_zeek_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Detect_Zerologon_Attack|Detect Zerologon Attack]]


====How To Implement====
You must be ingesting Zeek DCE-RPC data into Splunk. Zeek data should also be getting ingested in JSON format.  We are detecting when all three RPC operations (NetrServerReqChallenge, NetrServerAuthenticate3, NetrServerPasswordSet2) are splunk_security_essentials_app via bro:rpc:json.  These three operations are then correlated on the Zeek UID field.

====Required field====

* _time

* operation



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1190
| Exploit Public-Facing Application
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.secura.com/blog/zero-logon

* https://github.com/SecuraBV/CVE-2020-1472

* https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-1472



====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect hosts connecting to dynamic domain providers===
Malicious actors often abuse legitimate Dynamic DNS services to host malicious payloads or interactive command and control nodes. Attackers will automate domain resolution changes by routing dynamic domains to countless IP addresses to circumvent firewall blocks, block lists as well as frustrate a network defenders analytic and investigative processes. This search will look for DNS queries made from within your infrastructure to suspicious dynamic domains.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Resolution
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1189/ T1189]
* '''Last Updated''': 2021-01-14

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(DNS.answer) as answer min(_time) as firstTime from datamodel=Network_Resolution by DNS.query host 
| `drop_dm_object_name(&#34;DNS&#34;)` 
| `security_content_ctime(firstTime)` 
| `dynamic_dns_providers` 
| `detect_hosts_connecting_to_dynamic_domain_providers_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Data_Protection|Data Protection]]

* [[Documentation:ESSOC:stories:UseCase#Prohibited_Traffic_Allowed_or_Protocol_Mismatch|Prohibited Traffic Allowed or Protocol Mismatch]]

* [[Documentation:ESSOC:stories:UseCase#DNS_Hijacking|DNS Hijacking]]

* [[Documentation:ESSOC:stories:UseCase#Suspicious_DNS_Traffic|Suspicious DNS Traffic]]

* [[Documentation:ESSOC:stories:UseCase#Dynamic_DNS|Dynamic DNS]]

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]


====How To Implement====
First, you&#39;ll need to ingest data from your DNS operations. This can be done by ingesting logs from your server or data, collected passively by Splunk Stream or a similar solution. Specifically, data that contains the domain that is being queried and the IP of the host originating the request must be populating the `Network_Resolution` data model. This search also leverages a lookup file, `dynamic_dns_providers_default.csv`, which contains a non-exhaustive list of Dynamic DNS providers. Please consider updating the local lookup periodically by adding new domains to the list of `dynamic_dns_providers_local.csv`.\
This search produces fields (query, answer, isDynDNS) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. These fields contribute additional context to the notable event. To see the additional metadata, add the following fields, if not already present, to Incident Review. Event Attributes (Configure &gt; Incident Management &gt; Incident Review Settings &gt; Add New Entry):\\n1. **Label:** DNS Query, **Field:** query\
1. \
1. **Label:** DNS Answer, **Field:** answer\
1. \
1. **Label:** IsDynamicDNS, **Field:** isDynDNS\
Detailed documentation on how to create a new field within Incident Review may be found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details`

====Required field====

* _time

* DNS.answer

* DNS.query

* host



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1189
| Drive-by Compromise
| Initial Access
|}


====Kill Chain Phase====

* Command and Control

* Actions on Objectives


====Known False Positives====
Some users and applications may leverage Dynamic DNS to reach out to some domains on the Internet since dynamic DNS by itself is not malicious, however this activity must be verified.

====Reference====


====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1189/dyn_dns_site/windows-sysmon.log


''version'': 3
</div>
</div>

----

===Excessive dns failures===
This search identifies DNS query failures by counting the number of DNS responses that do not indicate success, and trigger on more than 50 occurrences.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Resolution
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1071/004/ T1071.004], [https://attack.mitre.org/techniques/T1071/ T1071]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(&#34;DNS.query&#34;) as queries from datamodel=Network_Resolution where nodename=DNS &#34;DNS.reply_code&#34;!=&#34;No Error&#34; &#34;DNS.reply_code&#34;!=&#34;NoError&#34; DNS.reply_code!=&#34;unknown&#34; NOT &#34;DNS.query&#34;=&#34;*.arpa&#34; &#34;DNS.query&#34;=&#34;*.*&#34; by &#34;DNS.src&#34;,&#34;DNS.query&#34;
| `drop_dm_object_name(&#34;DNS&#34;)`
| lookup cim_corporate_web_domain_lookup domain as query OUTPUT domain
| where isnull(domain)
| lookup update=true alexa_lookup_by_str domain as query OUTPUT rank
| where isnull(rank)
| stats sum(count) as count mode(queries) as queries by src
| `get_asset(src)`
| where count&gt;50 
| `excessive_dns_failures_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Suspicious_DNS_Traffic|Suspicious DNS Traffic]]

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]


====How To Implement====
To successfully implement this search you must ensure that DNS data is populating the Network_Resolution data model.

====Required field====

* _time

* DNS.query

* DNS.reply_code

* DNS.src



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1071.004
| DNS
| Command And Control
|-
| T1071
| Application Layer Protocol
| Command And Control
|}


====Kill Chain Phase====

* Command and Control


====Known False Positives====
It is possible legitimate traffic can trigger this rule. Please investigate as appropriate. The threshold for generating an event can also be customized to better suit your environment.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Hosts receiving high volume of network traffic from email server===
This search looks for an increase of data transfers from your email server to your clients. This could be indicative of a malicious actor collecting data using your email server.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1114/002/ T1114.002], [https://attack.mitre.org/techniques/T1114/ T1114]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` sum(All_Traffic.bytes_in) as bytes_in from datamodel=Network_Traffic where All_Traffic.dest_category=email_server by All_Traffic.src_ip _time span=1d 
| `drop_dm_object_name(&#34;All_Traffic&#34;)` 
| eventstats avg(bytes_in) as avg_bytes_in stdev(bytes_in) as stdev_bytes_in 
| eventstats count as num_data_samples avg(eval(if(_time &lt; relative_time(now(), &#34;@d&#34;), bytes_in, null))) as per_source_avg_bytes_in stdev(eval(if(_time &lt; relative_time(now(), &#34;@d&#34;), bytes_in, null))) as per_source_stdev_bytes_in by src_ip 
| eval minimum_data_samples = 4, deviation_threshold = 3 
| where num_data_samples &gt;= minimum_data_samples AND bytes_in &gt; (avg_bytes_in + (deviation_threshold * stdev_bytes_in)) AND bytes_in &gt; (per_source_avg_bytes_in + (deviation_threshold * per_source_stdev_bytes_in)) AND _time &gt;= relative_time(now(), &#34;@d&#34;) 
| eval num_standard_deviations_away_from_server_average = round(abs(bytes_in - avg_bytes_in) / stdev_bytes_in, 2), num_standard_deviations_away_from_client_average = round(abs(bytes_in - per_source_avg_bytes_in) / per_source_stdev_bytes_in, 2) 
| table src_ip, _time, bytes_in, avg_bytes_in, per_source_avg_bytes_in, num_standard_deviations_away_from_server_average, num_standard_deviations_away_from_client_average 
| `hosts_receiving_high_volume_of_network_traffic_from_email_server_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Collection_and_Staging|Collection and Staging]]


====How To Implement====
This search requires you to be ingesting your network traffic and populating the Network_Traffic data model.  Your email servers must be categorized as &#34;email_server&#34; for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The &#34;deviation_threshold&#34; field is a multiplying factor to control how much variation you&#39;re willing to tolerate. The &#34;minimum_data_samples&#34; field is the minimum number of connections of data samples required for the statistic to be valid.

====Required field====

* _time

* All_Traffic.bytes_in

* All_Traffic.dest_category

* All_Traffic.src_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1114.002
| Remote Email Collection
| Collection
|-
| T1114
| Email Collection
| Collection
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Large volume of dns any queries===
The search is used to identify attempts to use your DNS Infrastructure for DDoS purposes via a DNS amplification attack leveraging ANY queries.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Resolution
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1498/ T1498], [https://attack.mitre.org/techniques/T1498/002/ T1498.002]
* '''Last Updated''': 2017-09-20

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count from datamodel=Network_Resolution where nodename=DNS &#34;DNS.message_type&#34;=&#34;QUERY&#34; &#34;DNS.record_type&#34;=&#34;ANY&#34; by &#34;DNS.dest&#34; 
| `drop_dm_object_name(&#34;DNS&#34;)` 
| where count&gt;200 
| `large_volume_of_dns_any_queries_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#DNS_Amplification_Attacks|DNS Amplification Attacks]]


====How To Implement====
To successfully implement this search you must ensure that DNS data is populating the Network_Resolution data model.

====Required field====

* _time

* DNS.message_type

* DNS.record_type

* DNS.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1498
| Network Denial of Service
| Impact
|-
| T1498.002
| Reflection Amplification
| Impact
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Legitimate ANY requests may trigger this search, however it is unusual to see a large volume of them under typical circumstances. You may modify the threshold in the search to better suit your environment.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Multiple archive files http post traffic===
This search is designed to detect high frequency of archive files data exfiltration through HTTP POST method protocol. This are one of the common techniques used by APT or trojan spy after doing the data collection like screenshot, recording, sensitive data to the infected machines. The attacker may execute archiving command to the collected data, save it a temp folder with a hidden attribute then send it to its C2 through HTTP POST. Sometimes adversaries will rename the archive files or encode/encrypt to cover their tracks. This detection can detect a renamed archive files transfer to HTTP POST since it checks the request body header. Unfortunately this detection cannot support archive that was encrypted or encoded before doing the exfiltration.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1048/003/ T1048.003], [https://attack.mitre.org/techniques/T1048/ T1048]
* '''Last Updated''': 2021-04-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`stream_http` http_method=POST 
|eval archive_hdr1=substr(form_data,1,2) 
| eval archive_hdr2 = substr(form_data,1,4) 
|stats values(form_data) as http_request_body min(_time) as firstTime max(_time) as lastTime count by http_method http_user_agent uri_path url bytes_in bytes_out archive_hdr1 archive_hdr2 
|where count &gt;20 AND (archive_hdr1 = &#34;7z&#34; OR archive_hdr1 = &#34;PK&#34; OR archive_hdr2=&#34;Rar!&#34;) 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `multiple_archive_files_http_post_traffic_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]

* [[Documentation:ESSOC:stories:UseCase#Data_Exfiltration|Data Exfiltration]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the stream HTTP logs or network logs that catch network traffic. Make sure that the http-request-body, payload, or request field is enabled in stream http configuration.

====Required field====

* _time

* http_method

* http_user_agent

* uri_path

* url

* bytes_in

* bytes_out

* archive_hdr1

* archive_hdr2

* form_data



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1048.003
| Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol
| Exfiltration
|-
| T1048
| Exfiltration Over Alternative Protocol
| Exfiltration
|}


====Kill Chain Phase====

* Exfiltration


====Known False Positives====
Normal archive transfer via HTTP protocol may trip this detection.

====Reference====


* https://attack.mitre.org/techniques/T1560/001/

* https://www.fireeye.com/blog/threat-research/2019/01/apt39-iranian-cyber-espionage-group-focused-on-personal-information.html

* https://www.microsoft.com/security/blog/2021/01/20/deep-dive-into-the-solorigate-second-stage-activation-from-sunburst-to-teardrop-and-raindrop/



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1048.003/archive_http_post/stream_http_events.log


''version'': 1
</div>
</div>

----

===Plain http post exfiltrated data===
This search is to detect potential plain HTTP POST method data exfiltration. This network traffic is commonly used by trickbot, trojanspy, keylogger or APT adversary where arguments or commands are sent in plain text to the remote C2 server using HTTP POST method as part of data exfiltration.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1048/003/ T1048.003], [https://attack.mitre.org/techniques/T1048/ T1048]
* '''Last Updated''': 2021-04-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`stream_http` http_method=POST form_data IN (&#34;*wermgr.exe*&#34;,&#34;*svchost.exe*&#34;, &#34;*name=\&#34;proclist\&#34;*&#34;,&#34;*ipconfig*&#34;, &#34;*name=\&#34;sysinfo\&#34;*&#34;, &#34;*net view*&#34;) 
|stats values(form_data) as http_request_body min(_time) as firstTime max(_time) as lastTime count by http_method http_user_agent uri_path url bytes_in bytes_out 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `plain_http_post_exfiltrated_data_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]

* [[Documentation:ESSOC:stories:UseCase#Data_Exfiltration|Data Exfiltration]]


====How To Implement====
To successfully implement this search, you need to be ingesting logs with the stream HTTP logs or network logs that catch network traffic. Make sure that the http-request-body, payload, or request field is enabled.

====Required field====

* _time

* http_method

* http_user_agent

* uri_path

* url

* bytes_in

* bytes_out



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1048.003
| Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol
| Exfiltration
|-
| T1048
| Exfiltration Over Alternative Protocol
| Exfiltration
|}


====Kill Chain Phase====

* Exfiltration


====Known False Positives====
unknown

====Reference====


* https://blog.talosintelligence.com/2020/03/trickbot-primer.html



====Test Dataset====

* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1048.003/plain_exfil_data/stream_http_events.log


''version'': 1
</div>
</div>

----

===Prohibited network traffic allowed===
This search looks for network traffic defined by port and transport layer protocol in the Enterprise Security lookup table &#34;lookup_interesting_ports&#34;, that is marked as prohibited, and has an associated &#39;allow&#39; action in the Network_Traffic data model. This could be indicative of a misconfigured network device.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1048/ T1048]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where All_Traffic.action = allowed by All_Traffic.src_ip All_Traffic.dest_ip All_Traffic.dest_port All_Traffic.action 
| lookup update=true interesting_ports_lookup dest_port as All_Traffic.dest_port OUTPUT app is_prohibited note transport 
| search is_prohibited=true 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `drop_dm_object_name(&#34;All_Traffic&#34;)` 
| `prohibited_network_traffic_allowed_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Prohibited_Traffic_Allowed_or_Protocol_Mismatch|Prohibited Traffic Allowed or Protocol Mismatch]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]


====How To Implement====
In order to properly run this search, Splunk needs to ingest data from firewalls or other network control devices that mediate the traffic allowed into an environment. This is necessary so that the search can identify an &#39;action&#39; taken on the traffic of interest. The search requires the Network_Traffic data model be populated.

====Required field====

* _time

* All_Traffic.action

* All_Traffic.src_ip

* All_Traffic.dest_ip

* All_Traffic.dest_port



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1048
| Exfiltration Over Alternative Protocol
| Exfiltration
|}


====Kill Chain Phase====

* Delivery

* Command and Control


====Known False Positives====
None identified

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Protocol or port mismatch===
This search looks for network traffic on common ports where a higher layer protocol does not match the port that is being used. For example, this search should identify cases where protocols other than HTTP are running on TCP port 80. This can be used by attackers to circumvent firewall restrictions, or as an attempt to hide malicious communications over ports and protocols that are typically allowed and not well inspected.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1048/003/ T1048.003], [https://attack.mitre.org/techniques/T1048/ T1048]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where (All_Traffic.app=dns NOT All_Traffic.dest_port=53) OR ((All_Traffic.app=web-browsing OR All_Traffic.app=http) NOT (All_Traffic.dest_port=80 OR All_Traffic.dest_port=8080 OR All_Traffic.dest_port=8000)) OR (All_Traffic.app=ssl NOT (All_Traffic.dest_port=443 OR All_Traffic.dest_port=8443)) OR (All_Traffic.app=smtp NOT All_Traffic.dest_port=25) by All_Traffic.src_ip, All_Traffic.dest_ip, All_Traffic.app, All_Traffic.dest_port 
|`security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `drop_dm_object_name(&#34;All_Traffic&#34;)` 
| `protocol_or_port_mismatch_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Prohibited_Traffic_Allowed_or_Protocol_Mismatch|Prohibited Traffic Allowed or Protocol Mismatch]]

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]


====How To Implement====
Running this search properly requires a technology that can inspect network traffic and identify common protocols. Technologies such as Bro and Palo Alto Networks firewalls are two examples that will identify protocols via inspection, and not just assume a specific protocol based on the transport protocol and ports.

====Required field====

* _time

* All_Traffic.app

* All_Traffic.dest_port

* All_Traffic.src_ip

* All_Traffic.dest_ip



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1048.003
| Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol
| Exfiltration
|-
| T1048
| Exfiltration Over Alternative Protocol
| Exfiltration
|}


====Kill Chain Phase====

* Command and Control


====Known False Positives====
None identified

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Protocols passing authentication in cleartext===
The following analytic identifies cleartext protocols at risk of leaking sensitive information. Currently, this consists of legacy protocols such as telnet (port 23), POP3 (port 110), IMAP (port 143), and non-anonymous FTP (port 21) sessions. While some of these protocols may be used over SSL, they typically are found on different assigned ports in those instances.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': 
* '''Last Updated''': 2021-08-19

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where All_Traffic.action!=blocked AND All_Traffic.transport=&#34;tcp&#34; AND (All_Traffic.dest_port=&#34;23&#34; OR All_Traffic.dest_port=&#34;143&#34; OR All_Traffic.dest_port=&#34;110&#34; OR (All_Traffic.dest_port=&#34;21&#34; AND All_Traffic.user != &#34;anonymous&#34;)) by All_Traffic.user All_Traffic.src All_Traffic.dest All_Traffic.dest_port 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `drop_dm_object_name(&#34;All_Traffic&#34;)` 
| `protocols_passing_authentication_in_cleartext_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Use_of_Cleartext_Protocols|Use of Cleartext Protocols]]


====How To Implement====
This search requires you to be ingesting your network traffic, and populating the Network_Traffic data model. For more accurate result it&#39;s better to limit destination to organization private and public IP range, like All_Traffic.dest IN(192.168.0.0/16,172.16.0.0/12,10.0.0.0/8, x.x.x.x/22)

====Required field====

* _time

* All_Traffic.transport

* All_Traffic.dest_port

* All_Traffic.user

* All_Traffic.src

* All_Traffic.dest

* All_Traffic.action




====Kill Chain Phase====

* Reconnaissance

* Actions on Objectives


====Known False Positives====
Some networks may use kerberized FTP or telnet servers, however, this is rare.

====Reference====


* https://www.rackaid.com/blog/secure-your-email-and-file-transfers/

* https://www.infosecmatter.com/capture-passwords-using-wireshark/



====Test Dataset====


''version'': 3
</div>
</div>

----

===Remote desktop network bruteforce===
This search looks for RDP application network traffic and filters any source/destination pair generating more than twice the standard deviation of the average traffic.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/001/ T1021.001], [https://attack.mitre.org/techniques/T1021/ T1021]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where All_Traffic.app=rdp by All_Traffic.src All_Traffic.dest All_Traffic.dest_port 
| eventstats stdev(count) AS stdev avg(count) AS avg p50(count) AS p50 
| where count&gt;(avg + stdev*2) 
| rename All_Traffic.src AS src All_Traffic.dest AS dest 
| table firstTime lastTime src dest count avg p50 stdev 
| `remote_desktop_network_bruteforce_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]


====How To Implement====
You must ensure that your network traffic data is populating the Network_Traffic data model.

====Required field====

* _time

* All_Traffic.app

* All_Traffic.src

* All_Traffic.dest

* All_Traffic.dest_port



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021.001
| Remote Desktop Protocol
| Lateral Movement
|-
| T1021
| Remote Services
| Lateral Movement
|}


====Kill Chain Phase====

* Reconnaissance

* Delivery


====Known False Positives====
RDP gateways may have unusually high amounts of traffic from all other hosts&#39; RDP applications in the network.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Remote desktop network traffic===
This search looks for network traffic on TCP/3389, the default port used by remote desktop. While remote desktop traffic is not uncommon on a network, it is usually associated with known hosts. This search will ignore common RDP sources and common RDP destinations so you can focus on the uncommon uses of remote desktop on your network.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/001/ T1021.001], [https://attack.mitre.org/techniques/T1021/ T1021]
* '''Last Updated''': 2020-07-07

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where All_Traffic.dest_port=3389 AND All_Traffic.dest_category!=common_rdp_destination AND All_Traffic.src_category!=common_rdp_source by All_Traffic.src All_Traffic.dest All_Traffic.dest_port 
| `drop_dm_object_name(&#34;All_Traffic&#34;)` 
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` 
| `remote_desktop_network_traffic_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Ryuk_Ransomware|Ryuk Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Hidden_Cobra_Malware|Hidden Cobra Malware]]

* [[Documentation:ESSOC:stories:UseCase#Lateral_Movement|Lateral Movement]]


====How To Implement====
To successfully implement this search you need to identify systems that commonly originate remote desktop traffic and that commonly receive remote desktop traffic. You can use the included support search &#34;Identify Systems Creating Remote Desktop Traffic&#34; to identify systems that originate the traffic and the search &#34;Identify Systems Receiving Remote Desktop Traffic&#34; to identify systems that receive a lot of remote desktop traffic. After identifying these systems, you will need to add the &#34;common_rdp_source&#34; or &#34;common_rdp_destination&#34; category to that system depending on the usage, using the Enterprise Security Assets and Identities framework.  This can be done by adding an entry in the assets.csv file located in SA-IdentityManagement/lookups.

====Required field====

* _time

* All_Traffic.dest_port

* All_Traffic.dest_category

* All_Traffic.src_category

* All_Traffic.src

* All_Traffic.dest

* All_Traffic.dest_port



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021.001
| Remote Desktop Protocol
| Lateral Movement
|-
| T1021
| Remote Services
| Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
Remote Desktop may be used legitimately by users on the network.

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Smb traffic spike===
This search looks for spikes in the number of Server Message Block (SMB) traffic connections.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/002/ T1021.002], [https://attack.mitre.org/techniques/T1021/ T1021]
* '''Last Updated''': 2020-07-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count from datamodel=Network_Traffic where All_Traffic.dest_port=139 OR All_Traffic.dest_port=445 OR All_Traffic.app=smb by _time span=1h, All_Traffic.src 
| `drop_dm_object_name(&#34;All_Traffic&#34;)` 
| eventstats max(_time) as maxtime 
| stats count as num_data_samples max(eval(if(_time &gt;= relative_time(maxtime, &#34;-70m@m&#34;), count, null))) as count avg(eval(if(_time&lt;relative_time(maxtime, &#34;-70m@m&#34;), count, null))) as avg stdev(eval(if(_time&lt;relative_time(maxtime, &#34;-70m@m&#34;), count, null))) as stdev by src 
| eval upperBound=(avg+stdev*2), isOutlier=if(count &gt; upperBound AND num_data_samples &gt;=50, 1, 0) 
| where isOutlier=1 
| table src count 
| `smb_traffic_spike_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Emotet_Malware__DHS_Report_TA18-201A_|Emotet Malware  DHS Report TA18-201A ]]

* [[Documentation:ESSOC:stories:UseCase#Hidden_Cobra_Malware|Hidden Cobra Malware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]


====How To Implement====
This search requires you to be ingesting your network traffic logs and populating the `Network_Traffic` data model.

====Required field====

* _time

* All_Traffic.dest_port

* All_Traffic.app

* All_Traffic.src



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021.002
| SMB/Windows Admin Shares
| Lateral Movement
|-
| T1021
| Remote Services
| Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
A file server may experience high-demand loads that could cause this analytic to trigger.

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Smb traffic spike - mltk===
This search uses the Machine Learning Toolkit (MLTK) to identify spikes in the number of Server Message Block (SMB) connections.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021/002/ T1021.002], [https://attack.mitre.org/techniques/T1021/ T1021]
* '''Last Updated''': 2020-07-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count values(All_Traffic.dest_ip) as dest values(All_Traffic.dest_port) as port from datamodel=Network_Traffic where All_Traffic.dest_port=139 OR All_Traffic.dest_port=445 OR All_Traffic.app=smb by _time span=1h, All_Traffic.src 
| eval HourOfDay=strftime(_time, &#34;%H&#34;) 
| eval DayOfWeek=strftime(_time, &#34;%A&#34;) 
| `drop_dm_object_name(All_Traffic)` 
| apply smb_pdfmodel threshold=0.001 
| rename &#34;IsOutlier(count)&#34; as isOutlier 
| search isOutlier &gt; 0 
| sort -count 
| table _time src dest port count 
| `smb_traffic_spike___mltk_filter` </search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Emotet_Malware__DHS_Report_TA18-201A_|Emotet Malware  DHS Report TA18-201A ]]

* [[Documentation:ESSOC:stories:UseCase#Hidden_Cobra_Malware|Hidden Cobra Malware]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#DHS_Report_TA18-074A|DHS Report TA18-074A]]


====How To Implement====
To successfully implement this search, you will need to ensure that DNS data is populating the Network_Resolution data model. In addition, the Machine Learning Toolkit (MLTK) version 4.2 or greater must be installed on your search heads, along with any required dependencies. Finally, the support search &#34;Baseline of SMB Traffic - MLTK&#34; must be executed before this detection search, because it builds a machine-learning (ML) model over the historical data used by this search. It is important that this search is run in the same app context as the associated support search, so that the model created by the support search is available for use. You should periodically re-run the support search to rebuild the model with the latest data available in your environment.\
This search produces a field (Number of events,count) that are not yet supported by ES Incident Review and therefore cannot be viewed when a notable event is raised. This field contributes additional context to the notable. To see the additional metadata, add the following field, if not already present, to Incident Review - Event Attributes (Configure &gt; Incident Management &gt; Incident Review Settings &gt; Add New Entry): \
1. **Label:** Number of events, **Field:** count\
Detailed documentation on how to create a new field within Incident Review is found here: `https://docs.splunk.com/Documentation/ES/5.3.0/Admin/Customizenotables#Add_a_field_to_the_notable_event_details`

====Required field====

* _time

* All_Traffic.dest_ip

* All_Traffic.dest_port

* All_Traffic.app

* All_Traffic.src



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1021.002
| SMB/Windows Admin Shares
| Lateral Movement
|-
| T1021
| Remote Services
| Lateral Movement
|}


====Kill Chain Phase====

* Actions on Objectives


====Known False Positives====
If you are seeing more results than desired, you may consider reducing the value of the threshold in the search. You should also periodically re-run the support search to re-build the ML model on the latest data. Please update the `smb_traffic_spike_mltk_filter` macro to filter out false positive results

====Reference====


====Test Dataset====


''version'': 3
</div>
</div>

----

===Tor traffic===
This search looks for network traffic identified as The Onion Router (TOR), a benign anonymity network which can be abused for a variety of nefarious purposes.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1071/ T1071], [https://attack.mitre.org/techniques/T1071/001/ T1071.001]
* '''Last Updated''': 2020-07-22

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where All_Traffic.app=tor AND All_Traffic.action=allowed by All_Traffic.src_ip All_Traffic.dest_ip All_Traffic.dest_port All_Traffic.action 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `drop_dm_object_name(&#34;All_Traffic&#34;)` 
| `tor_traffic_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Prohibited_Traffic_Allowed_or_Protocol_Mismatch|Prohibited Traffic Allowed or Protocol Mismatch]]

* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]

* [[Documentation:ESSOC:stories:UseCase#Command_and_Control|Command and Control]]

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
In order to properly run this search, Splunk needs to ingest data from firewalls or other network control devices that mediate the traffic allowed into an environment. This is necessary so that the search can identify an &#39;action&#39; taken on the traffic of interest. The search requires the Network_Traffic data model be populated.

====Required field====

* _time

* All_Traffic.app

* All_Traffic.action

* All_Traffic.src_ip

* All_Traffic.dest_ip

* All_Traffic.dest_port



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1071
| Application Layer Protocol
| Command And Control
|-
| T1071.001
| Web Protocols
| Command And Control
|}


====Kill Chain Phase====

* Command and Control


====Known False Positives====
None at this time

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Unusually long content-type length===
This search looks for unusually long strings in the Content-Type http header that the client sends the server.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': 
* '''Last Updated''': 2017-10-13

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`stream_http` 
| eval cs_content_type_length = len(cs_content_type) 
| where cs_content_type_length &gt; 100 
| table endtime src_ip dest_ip cs_content_type_length cs_content_type url 
| `unusually_long_content_type_length_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Apache_Struts_Vulnerability|Apache Struts Vulnerability]]


====How To Implement====
This particular search leverages data extracted from Stream:HTTP. You must configure the http stream using the Splunk Stream App on your Splunk Stream deployment server to extract the cs_content_type field.

====Required field====

* _time

* cs_content_type

* endtime

* src_ip

* dest_ip

* url




====Kill Chain Phase====

* Delivery


====Known False Positives====
Very few legitimate Content-Type fields will have a length greater than 100 characters.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----



==Web==


===Detect f5 tmui rce cve-2020-5902===
This search detects remote code exploit attempts on F5 BIG-IP, BIG-IQ, and Traffix SDC devices

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': 
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1190/ T1190]
* '''Last Updated''': 2020-08-02

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>`f5_bigip_rogue` 
| regex _raw=&#34;(hsqldb;
|.*\\.\\.;.*)&#34; 
| search `detect_f5_tmui_rce_cve_2020_5902_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#F5_TMUI_RCE_CVE-2020-5902|F5 TMUI RCE CVE-2020-5902]]


====How To Implement====
To consistently detect exploit attempts on F5 devices using the vulnerabilities contained within CVE-2020-5902 it is recommended to ingest logs via syslog.  As many BIG-IP devices will have SSL enabled on their management interfaces, detections via wire data may not pick anything up unless you are decrypting SSL traffic in order to inspect it.  I am using a regex string from a Cloudflare mitigation technique to try and always catch the offending string (..;), along with the other exploit of using (hsqldb;).

====Required field====

* _time



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1190
| Exploit Public-Facing Application
| Initial Access
|}


====Kill Chain Phase====

* Exploitation


====Known False Positives====
unknown

====Reference====


* https://www.ptsecurity.com/ww-en/about/news/f5-fixes-critical-vulnerability-discovered-by-positive-technologies-in-big-ip-application-delivery-controller/

* https://support.f5.com/csp/article/K52145254

* https://blog.cloudflare.com/cve-2020-5902-helping-to-protect-against-the-f5-tmui-rce-vulnerability/



====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect attackers scanning for vulnerable jboss servers===
This search looks for specific GET or HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. JexBoss is described as the exploit tool of choice for this malicious activity.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Web
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1082/ T1082]
* '''Last Updated''': 2017-09-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Web where (Web.http_method=&#34;GET&#34; OR Web.http_method=&#34;HEAD&#34;) AND (Web.url=&#34;*/web-console/ServerInfo.jsp*&#34; OR Web.url=&#34;*web-console*&#34; OR Web.url=&#34;*jmx-console*&#34; OR Web.url = &#34;*invoker*&#34;) by Web.http_method, Web.url, Web.src, Web.dest 
| `drop_dm_object_name(&#34;Web&#34;)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `detect_attackers_scanning_for_vulnerable_jboss_servers_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#JBoss_Vulnerability|JBoss Vulnerability]]

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]


====How To Implement====
You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model.

====Required field====

* _time

* Web.http_method

* Web.url

* Web.src

* Web.dest



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1082
| System Information Discovery
| Discovery
|}


====Kill Chain Phase====

* Reconnaissance


====Known False Positives====
It&#39;s possible for legitimate HTTP requests to be made to URLs containing the suspicious paths.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Detect malicious requests to exploit jboss servers===
This search is used to detect malicious HTTP requests crafted to exploit jmx-console in JBoss servers. The malicious requests have a long URL length, as the payload is embedded in the URL.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Web
* '''ATT&CK''': 
* '''Last Updated''': 2017-09-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Web where (Web.http_method=&#34;GET&#34; OR Web.http_method=&#34;HEAD&#34;) by Web.http_method, Web.url,Web.url_length Web.src, Web.dest 
| search Web.url=&#34;*jmx-console/HtmlAdaptor?action=invokeOpByName&amp;name=jboss.admin*import*&#34; AND Web.url_length &gt; 200 
| `drop_dm_object_name(&#34;Web&#34;)` 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| table src, dest_ip, http_method, url, firstTime, lastTime 
| `detect_malicious_requests_to_exploit_jboss_servers_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#JBoss_Vulnerability|JBoss Vulnerability]]

* [[Documentation:ESSOC:stories:UseCase#SamSam_Ransomware|SamSam Ransomware]]


====How To Implement====
You must ingest data from the web server or capture network data that contains web specific information with solutions such as Bro or Splunk Stream, and populating the Web data model

====Required field====

* _time

* Web.http_method

* Web.url

* Web.url_length

* Web.src

* Web.dest




====Kill Chain Phase====

* Delivery


====Known False Positives====
No known false positives for this detection.

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Monitor web traffic for brand abuse===
This search looks for Web requests to faux domains similar to the one that you want to have monitored for abuse.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Web
* '''ATT&CK''': 
* '''Last Updated''': 2017-09-23

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` values(Web.url) as urls min(_time) as firstTime from datamodel=Web by Web.src 
| `drop_dm_object_name(&#34;Web&#34;)` 
| `security_content_ctime(firstTime)` 
| `brand_abuse_web` 
| `monitor_web_traffic_for_brand_abuse_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#Brand_Monitoring|Brand Monitoring]]


====How To Implement====
You need to ingest data from your web traffic. This can be accomplished by indexing data from a web proxy, or using a network traffic analysis tool, such as Bro or Splunk Stream. You also need to have run the search &#34;ESCU - DNSTwist Domain Names&#34;, which creates the permutations of the domain that will be checked for.

====Required field====

* _time

* Web.url

* Web.src




====Kill Chain Phase====

* Delivery


====Known False Positives====
None at this time

====Reference====


====Test Dataset====


''version'': 1
</div>
</div>

----

===Sql injection with long urls===
This search looks for long URLs that have several SQL commands visible within them.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Web
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1190/ T1190]
* '''Last Updated''': 2020-07-21

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count from datamodel=Web where Web.dest_category=web_server AND (Web.url_length &gt; 1024 OR Web.http_user_agent_length &gt; 200) by Web.src Web.dest Web.url Web.url_length Web.http_user_agent 
| `drop_dm_object_name(&#34;Web&#34;)` 
| eval num_sql_cmds=mvcount(split(url, &#34;alter%20table&#34;)) + mvcount(split(url, &#34;between&#34;)) + mvcount(split(url, &#34;create%20table&#34;)) + mvcount(split(url, &#34;create%20database&#34;)) + mvcount(split(url, &#34;create%20index&#34;)) + mvcount(split(url, &#34;create%20view&#34;)) + mvcount(split(url, &#34;delete&#34;)) + mvcount(split(url, &#34;drop%20database&#34;)) + mvcount(split(url, &#34;drop%20index&#34;)) + mvcount(split(url, &#34;drop%20table&#34;)) + mvcount(split(url, &#34;exists&#34;)) + mvcount(split(url, &#34;exec&#34;)) + mvcount(split(url, &#34;group%20by&#34;)) + mvcount(split(url, &#34;having&#34;)) + mvcount(split(url, &#34;insert%20into&#34;)) + mvcount(split(url, &#34;inner%20join&#34;)) + mvcount(split(url, &#34;left%20join&#34;)) + mvcount(split(url, &#34;right%20join&#34;)) + mvcount(split(url, &#34;full%20join&#34;)) + mvcount(split(url, &#34;select&#34;)) + mvcount(split(url, &#34;distinct&#34;)) + mvcount(split(url, &#34;select%20top&#34;)) + mvcount(split(url, &#34;union&#34;)) + mvcount(split(url, &#34;xp_cmdshell&#34;)) - 24 
| where num_sql_cmds &gt; 3 
| `sql_injection_with_long_urls_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#SQL_Injection|SQL Injection]]


====How To Implement====
To successfully implement this search, you need to be monitoring network communications to your web servers or ingesting your HTTP logs and populating the Web data model. You must also identify your web servers in the Enterprise Security assets table.

====Required field====

* _time

* Web.dest_category

* Web.url_length

* Web.http_user_agent_length

* Web.src

* Web.dest

* Web.url

* Web.http_user_agent



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1190
| Exploit Public-Facing Application
| Initial Access
|}


====Kill Chain Phase====

* Delivery


====Known False Positives====
It&#39;s possible that legitimate traffic will have long URLs or long user agent strings and that common SQL commands may be found within the URL. Please investigate as appropriate.

====Reference====


====Test Dataset====


''version'': 2
</div>
</div>

----

===Supernova webshell===
This search aims to detect the Supernova webshell used in the SUNBURST attack.

* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Web
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1505/003/ T1505.003]
* '''Last Updated''': 2021-01-06

<div class="toccolours mw-collapsible mw-collapsed">
<div class="mw-collapsible-content">

====Search====
<search>
| tstats `security_content_summariesonly` count from datamodel=Web.Web where web.url=*logoimagehandler.ashx*codes* OR Web.url=*logoimagehandler.ashx*clazz* OR Web.url=*logoimagehandler.ashx*method* OR Web.url=*logoimagehandler.ashx*args* by Web.src Web.dest Web.url Web.vendor_product Web.user Web.http_user_agent _time span=1s 
| `supernova_webshell_filter`</search>

====Associated Analytic Story====

* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]


====How To Implement====
To successfully implement this search, you need to be monitoring web traffic to your Solarwinds Orion. The logs should be ingested into splunk and populating/mapped to the Web data model.

====Required field====

* _time

* Web.url

* Web.src

* Web.dest

* Web.vendor_product

* Web.user

* Web.http_user_agent



====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1505.003
| Web Shell
| Persistence
|}


====Kill Chain Phase====

* Exfiltration


====Known False Positives====
There might be false positives associted with this detection since items like args as a web argument is pretty generic.

====Reference====


* https://www.splunk.com/en_us/blog/security/detecting-supernova-malware-solarwinds-continued.html

* https://www.guidepointsecurity.com/supernova-solarwinds-net-webshell-analysis/



====Test Dataset====


''version'': 1
</div>
</div>

----




<pre>
#############
# Automatically generated by doc_gen.py in https://github.com/splunk/security_content''
# On Date: 2021-10-28 22:45:59.991457 UTC''
# Author: Splunk Security Research''
# Contact: research@splunk.com''
#############
</pre>
