=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
`.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1105/ T1105]
* '''Last Updated''': 2021-03-23
====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=*verifyctl* Processes.process=*split* 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_download_with_verifyctl_and_split_arguments_filter`
====Associated Analytic Story====
* [[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
* Processes.parent_process
* Processes.process_name
* Processes.user
* Processes.dest
====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'': 1
----
===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
====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=*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`
====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.
====Required field====
* _time
* Processes.process
* Processes.parent_process
* Processes.process_name
* Processes.user
* Processes.dest
====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'': 1
----
===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
====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=certutil.exe Processes.process = "* -exportPFX *" by Processes.parent_process Processes.process_name Processes.process Processes.user
| `drop_dm_object_name("Processes")`
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)`
| `certutil_exe_certificate_extraction_filter`
====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====
====Required field====
* _time
* Processes.process
* Processes.process_name
* Processes.parent_process
* Processes.user
====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
----
===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
====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`
====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 "process" 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
----
===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 "runrun", CLOP ransomware will try to encrypt files in network shares and if it is "temp.dat", 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
====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 != "*temp.dat*" Processes.process = "*runrun*" OR Processes.process = "*temp.dat*" by Processes.parent_process_name 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)`
| `clop_common_exec_parameter_filter`
====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
* Processes.parent_process_name
* _time
* Processes.process_name
* Processes.dest
* Processes.user
* Processes.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
----
===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
====Search====
`wineventlog_system` EventCode=7045 Service_Name IN ("SecurityCenterIBM", "WinCheckDRVs")
| 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`
====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
----
===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
====Search====
`sysmon` EventID=17 OR EventID=18 PipeName IN (\\msagent_*, \\wkssvc*, \\DserNamePipe*, \\srvsvc_*, \\mojo.*, \\postex_*, \\status_*, \\MSSE-*, \\spoolss_*, \\win_svc*, \\ntsvcs*, \\winsock*)
| 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`
====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
* 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
====Test Dataset====
* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon.log
''version'': 1
----
===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
====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 "(?\.[^\.]+)$"
| `ransomware_extensions`
| `common_ransomware_extensions_filter`
====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 > Incident Management > Incident Review Settings > 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
----
===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
====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`
====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'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
----
===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]
* '''Last Updated''': 2019-12-06
====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`
====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
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.001
| LSASS Memory
| 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
----
===Create service in suspicious file path===
This detection is to identify a creation of "user mode service" 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.001/ T1569.001], [https://attack.mitre.org/techniques/T1569.002/ T1569.002]
* '''Last Updated''': 2021-03-12
====Search====
`wineventlog_system` EventCode=7045 Service_File_Name = "*\.exe" NOT (Service_File_Name IN ("C:\\Windows\\*", "C:\\Program File*", "C:\\Programdata\\*", "%systemroot%\\*")) Service_Type = "user mode service"
| 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`
====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.001
| Launchctl
| 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
----
===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]
* '''Last Updated''': 2020-07-21
====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=*localgroup* OR Processes.process=*/add* OR Processes.process=*user*) 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`
====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 "process" field in the Endpoint data model.
====Required field====
* _time
* Processes.user
* Processes.parent_process
* Processes.process_name
* Processes.process
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1136.001
| Local 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'': 4
----
===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.005/ T1070.005]
* '''Last Updated''': 2020-07-21
====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 (Processs.process_name=net.exe OR Processes.process_name=net1.exe) by Processes.process Processes.process_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`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Hidden_Cobra_Malware|Hidden Cobra Malware]]
====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 "process" field in the Endpoint data model.
====Required field====
* _time
* Processes.user
* Processes.parent_process
* Processs.process_name
* Processes.process
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 5
----
===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]
* '''Last Updated''': 2019-12-10
====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`
====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 "process" 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
|}
====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
----
===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]
* '''Last Updated''': 2019-12-10
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=wmic* OR Processes.process_name=powershell* Processes.process=*shadowcopy* Processes.process=*create* by Processes.user Processes.process_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`
====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.
====Required field====
* _time
* Processes.process_name
* Processes.process
* Processes.user
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.003
| NTDS
| 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'': 1
----
===Creation of lsass dump with taskmgr===
Detect the hands on keyboard behavior of Windows Task Manager creating a prcoess 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]
* '''Last Updated''': 2020-02-03
====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`
====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
|}
====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
----
===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]
* '''Last Updated''': 2019-12-10
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=cmd.exe (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.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`
====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 "process" 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
|}
====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'': 1
----
===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]
* '''Last Updated''': 2019-12-10
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=cmd.exe Processes.process=*mklink* Processes.process=*HarddiskVolumeShadowCopy* 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)`
| `credential_dumping_via_symlink_to_shadow_copy_filter`
====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 "process" 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
|}
====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'': 1
----
===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's registry.
* '''Product''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-18
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", null), process_name=ucast(map_get(input_event, "process_name"), "string", null), process_path=ucast(map_get(input_event, "process_path"), "string", null), parent_process_name=ucast(map_get(input_event, "parent_process_name"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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's registry.
* '''Product''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-18
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", null), process_name=ucast(map_get(input_event, "process_name"), "string", null), process_path=ucast(map_get(input_event, "process_path"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003], [https://attack.mitre.org/techniques/T1555/ T1555]
* '''Last Updated''': 2020-10-18
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-21
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), process_name=ucast(map_get(input_event, "process_name"), "string", null), process_path=ucast(map_get(input_event, "process_path"), "string", null), cmd_line=ucast(map_get(input_event, "process"), "string", null), parent_process_name=ucast(map_get(input_event, "parent_process_name"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-21
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), process_name=ucast(map_get(input_event, "process_name"), "string", null), process_path=ucast(map_get(input_event, "process_path"), "string", null), cmd_line=ucast(map_get(input_event, "process"), "string", null), parent_process_name=ucast(map_get(input_event, "parent_process_name"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-21
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-21
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-18
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", null), process_name=ucast(map_get(input_event, "process_name"), "string", null), parent_process_name=ucast(map_get(input_event, "parent_process_name"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-18
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", null), process_name=ucast(map_get(input_event, "process_name"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003/ T1003]
* '''Last Updated''': 2020-10-18
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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
====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`
====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 "process" 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
|-
| 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
----
===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.002/ T1550.002]
* '''Last Updated''': 2020-10-15
====Search====
`wineventlog_security` EventCode=4624 (Logon_Type=3 Logon_Process=NtLmSsp WorkstationName=WORKSTATION NOT AccountName="ANONYMOUS LOGON") 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`
====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.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
----
===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
====Search====
`linux_hosts`
| search "sudoedit -s \\"
| `detect_baron_samedit_cve_2021_3156_filter`
====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
----
===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
====Search====
`linux_hosts`
| search sudoedit segfault
| stats count min(_time) as firstTime max(_time) as lastTime by host
| search count > 5
| `detect_baron_samedit_cve_2021_3156_segfault_filter`
====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
----
===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
====Search====
`osquery_process`
| search "columns.cmdline"="sudoedit -s \\*"
| `detect_baron_samedit_cve_2021_3156_via_osquery_filter`
====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
----
===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
====Search====
`wineventlog_security` EventCode=4624 OR EventCode=4742 TargetUserName="ANONYMOUS LOGON" LogonType=3
| stats count values(host) as host, values(TargetDomainName) as Domain, values(user) as user
| `detect_computer_changed_with_anonymous_account_filter`
====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
----
===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]
* '''Last Updated''': 2019-12-03
====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`
====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
|}
====Kill Chain Phase====
* Actions on Objectives
====Known False Positives====
The activity may be legitimate. Other tools can access lsass for legitimate reasons, and it'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
----
===Detect dump lsass memory using comsvcs===
This search detects the memory of lsass.exe being dumped for offline credential theft attack.
* '''Product''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003.003/ T1003.003]
* '''Last Updated''': 2020-09-15
====Search====
| from read_ssa_enriched_events()
| eval tenant=ucast(map_get(input_event, "_tenant"), "string", null), machine=ucast(map_get(input_event, "dest_device_id"), "string", null), process_name=lower(ucast(map_get(input_event, "process_name"), "string", null)), timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), process=lower(ucast(map_get(input_event, "process"), "string", null))
| where process_name LIKE "%rundll32.exe%" AND match_regex(process, /(?i)comsvcs.dll[,\s]+MiniDump/)=true
| eval start_time = timestamp, end_time = timestamp, entities = mvappend(machine), body = "TBD"
| into write_ssa_detected_events();
====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
|}
====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====
''version'': 1
----
===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.002/ T1078.002]
* '''Last Updated''': 2020-11-09
====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="lockout" by All_Changes.dest All_Changes.result
|`drop_dm_object_name("All_Changes")`
|`drop_dm_object_name("Account_Management")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| search count > 5
| `detect_excessive_account_lockouts_from_endpoint_filter`
====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>Phantom Playbook Integration**\
If Splunk>Phantom is also configured in your environment, a Playbook called "Excessive Account Lockouts Enrichment and Response" 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 "Phantom Instance" 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.002
| Domain Accounts
| Defense Evasion, Initial Access, Persistence, Privilege Escalation
|}
====Kill Chain Phase====
====Known False Positives====
It'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
----
===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.003/ T1078.003]
* '''Last Updated''': 2020-07-21
====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="lockout" by All_Changes.user All_Changes.result
|`drop_dm_object_name("All_Changes")`
|`drop_dm_object_name("Account_Management")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| search count > 5
| `detect_excessive_user_account_lockouts_filter`
====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.003
| Local Accounts
| Defense Evasion, Initial Access, Persistence, Privilege Escalation
|}
====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
----
===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. 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.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1505.003/ T1505.003]
* '''Last Updated''': 2021-03-09
====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 ("*\\HttpProxy\\owa\\auth\\*", "*\\inetpub\\wwwroot\\aspnet_client\\*", "*\\HttpProxy\\OAB\\*") Filesystem.file_name="*.aspx" 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`
====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 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.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
====Test Dataset====
* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1505.003/windows-sysmon_proxylogon.log
''version'': 2
----
===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 "htm" and "html" 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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218.001/ T1218.001]
* '''Last Updated''': 2021-02-11
====Search====
`sysmon` EventID=1 OriginalFileName=HH.exe NOT process_name=hh.exe
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, User, parent_process_name, process_name, OriginalFileName, process_path, CommandLine
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_html_help_renamed_filter`
====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 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 hh.exe may be used.
====Required field====
* _time
* EventID
* OriginalFileName
* process_name
* Computer
* User
* parent_process_name
* process_path
* CommandLine
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 1
----
===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 "htm" and "html" 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.001/ T1218.001]
* '''Last Updated''': 2021-02-11
====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`
====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.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.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
----
===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 "htm" and "html" 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.001/ T1218.001]
* '''Last Updated''': 2021-02-11
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=hh.exe Processes.process=*http* 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_url_in_command_line_filter`
====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.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
|-
| 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'': 1
----
===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 "htm" and "html" 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.001/ T1218.001]
* '''Last Updated''': 2021-02-11
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=hh.exe Processes.process IN ("*its:*", "*mk:@MSITStore:*") 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`
====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.process_name
* Processes.process
* Processes.dest
* Processes.user
* Processes.parent_process
* Processes.process_id
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 1
----
===Detect kerberoasting===
This search detects a potential kerberoasting attack via service principal name requests
* '''Product''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1558.003/ T1558.003]
* '''Last Updated''': 2020-10-21
====Search====
| from read_ssa_enriched_events()
| eval _time=map_get(input_event, "_time"), EventCode=map_get(input_event, "event_code"), TicketOptions=map_get(input_event, "ticket_options"), TicketEncryptionType=map_get(input_event, "ticket_encryption_type"), ServiceName=map_get(input_event, "service_name"), ServiceID=map_get(input_event, "service_id")
| where EventCode="4769" AND TicketOptions="0x40810000" AND TicketEncryptionType="0x17"
| first_time_event input_columns=["EventCode","TicketOptions","TicketEncryptionType","ServiceName","ServiceID"]
| where first_time_EventCode_TicketOptions_TicketEncryptionType_ServiceName_ServiceID
| eval start_time=_time, end_time=_time, body="TBD", entities="TBD"
| select start_time, end_time, entities, body
| into write_null();
====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
|}
====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'': 1
----
===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 "rundll32.exe" and its parent process.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218.005/ T1218.005]
* '''Last Updated''': 2021-01-20
====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=mshta.exe (Processes.process="*http://*" OR Processes.process="*https://*") 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)`
| `detect_mshta_url_in_command_line_filter`
====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.
====Required field====
* _time
* Processes.process
* Processes.parent_process
* Processes.process_name
* Processes.user
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 1
----
===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]
* '''Last Updated''': 2019-12-03
====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`
====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]]
====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
|}
====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
----
===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]
* '''Last Updated''': 2020-07-08
====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`
====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
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1136.001
| Local Account
| Persistence
|}
====Kill Chain Phase====
* Actions on Objectives
* Command and Control
====Known False Positives====
The activity may be legitimate. For this reason, it'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 "Administrators", 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
----
===Detect oulook 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.001/ T1566.001]
* '''Last Updated''': 2020-07-21
====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 != ""
| `detect_oulook_exe_writing_a__zip_file_filter`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Phishing_Payloads|Phishing Payloads]]
====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.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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1550.002/ T1550.002]
* '''Last Updated''': 2020-10-21
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null))
| eval signature_id=map_get(input_event, "signature_id"), authentication_type=map_get(input_event, "authentication_type"), authentication_method=map_get(input_event, "authentication_method"), origin_device_domain=map_get(input_event, "origin_device_domain"), dest_user_id=ucast(map_get(input_event, "dest_user_id"), "string", null), dest_device_id=ucast(map_get(input_event, "dest_device_id"), "string", null)
| where (authentication_type="3" AND authentication_method="NtLmSsp") OR (authentication_type="9" AND authentication_method="seclogo")
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(dest_device_id, dest_user_id), body="TBD"
| into write_ssa_detected_events();
====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====
* logon_process
* dest_user_primary_artifact
* _time
* event_code
* dest_ip_primary_artifact
* logon_type
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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
----
===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]
* '''Last Updated''': 2020-07-03
====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 "^.*?\\\\(?[^\\\\]*\.(?:exe
|bat
|com
|ps1))"
| 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`
====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 "process" field in the Endpoint data model.
====Required field====
* _time
* Processes.parent_process_name
* Processes.user
* Processes.process_name
* Processes.process
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1574.009
| Path Interception by Unquoted Path
| Defense Evasion, Persistence, Privilege Escalation
|}
====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
----
===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.003/ T1059.003]
* '''Last Updated''': 2020-11-10
====Search====
| tstats `security_content_summariesonly` count values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=cmd.exe 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)`
|search [`prohibited_apps_launching_cmd`]
| `detect_prohibited_applications_spawning_cmd_exe_filter`
====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.
====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
|-
| 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'': 5
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059]
* '''Last Updated''': 2020-7-13
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null))
| eval process_name=ucast(map_get(input_event, "process_name"), "string", null), parent_process=lower(ucast(map_get(input_event, "parent_process_name"), "string", null)), dest_user_id=ucast(map_get(input_event, "dest_user_id"), "string", null), dest_device_id=ucast(map_get(input_event, "dest_device_id"), "string", null)
| where process_name="cmd.exe"
| rex field=parent_process "(?[^\\\\]+)$"
| where field0="winword.exe" OR field0="excel.exe" OR field0="outlook.exe" OR field0="powerpnt.exe" OR field0="visio.exe" OR field0="mspub.exe" OR field0="acrobat.exe" OR field0="acrord32.exe" OR field0="chrome.exe" OR field0="iexplore.exe" OR field0="opera.exe" OR field0="firefox.exe" OR field0="java.exe" OR field0="powershell.exe"
| eval start_time=timestamp, end_time=timestamp, entities=mvappend(dest_device_id, dest_user_id), body="TBD"
| into write_ssa_detected_events();
====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'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
----
===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.002/ T1021.002]
* '''Last Updated''': 2020-11-10
====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=*psexec* Processes.process=*accepteula* by Processes.process_name Processes.dest Processes.parent_process_name
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_psexec_with_accepteula_flag_filter`
====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]]
====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 "process" field in the Endpoint data model.
====Required field====
* _time
* Processes.process
* Processes.process_name
* Processes.dest
* Processes.parent_process_name
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'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'': 3
----
===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
====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 "(?.*)\\\\(?.*)"
| `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`
====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
----
===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.009/ T1218.009]
* '''Last Updated''': 2021-02-12
====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`
====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.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
----
===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.009/ T1218.009]
* '''Last Updated''': 2021-02-16
====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`
====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.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
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218.009/ T1218.009]
* '''Last Updated''': 2021-02-12
====Search====
`sysmon` EventID=1 (process_name=regasm.exe OR OriginalFileName=RegAsm.exe)
| regex CommandLine="(regasm\.exe.{0,4}$)"
| stats count min(_time) as firstTime max(_time) as lastTime by dest, User, ParentImage,ParentCommandLine, process_name, OriginalFileName, process_path, CommandLine
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_regasm_with_no_command_line_arguments_filter`
====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
* process_name
* OriginalFileName
* CommandLine
* dest
* User
* ParentImage
* ParentCommandLine
* process_path
* Computer
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 1
----
===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.009/ T1218.009]
* '''Last Updated''': 2021-02-12
====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`
====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.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
----
===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.009/ T1218.009]
* '''Last Updated''': 2021-02-16
====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`
====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.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
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218.009/ T1218.009]
* '''Last Updated''': 2021-02-12
====Search====
`sysmon` EventID=1 (process_name=regsvcs.exe OR OriginalFileName=RegSvcs.exe)
| regex CommandLine="(regsvcs\.exe.{0,4}$)"
| stats count min(_time) as firstTime max(_time) as lastTime by dest, User, ParentImage,ParentCommandLine, process_name, OriginalFileName, process_path, CommandLine
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_regsvcs_with_no_command_line_arguments_filter`
====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
* process_name
* OriginalFileName
* CommandLine
* dest
* User
* ParentImage
* ParentCommandLine
* OriginalFileName
* process_path
* Computer
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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
----
===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 "Squiblydoo" attack. \
Upon investigating, look for network connections to remote destinations (internal or external). Be cautious to modify the query to look for "scrobj.dll", the ".dll" is not required to load scrobj. "scrobj.dll" will be loaded by "regsvr32.exe" upon execution.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218.010/ T1218.010]
* '''Last Updated''': 2021-01-28
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process_name=regsvr32.exe OR Processes.process_name!=regsvr32.exe) Processes.process=*scrobj* 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_regsvr32_application_control_bypass_filter`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvr32_Activity|Suspicious Regsvr32 Activity]]
* [[Documentation:ESSOC:stories:UseCase#Cobalt_Strike|Cobalt Strike]]
====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. Tune the query by modifying/removing the !=regsv32.exe.
====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
|-
| T1218.010
| Regsvr32
| Defense Evasion
|}
====Kill Chain Phase====
* Actions on Objectives
====Known False Positives====
Limited false positives related to third party software registering .DLL'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'': 1
----
===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'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.011/ T1218.011]
* '''Last Updated''': 2021-02-04
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=rundll32.exe Processes.process=*advpack* by Processes.user Processes.process_name Processes.process Processes.dest
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_rundll32_application_control_bypass___advpack_filter`
====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.process_name
* Processes.process
* Processes.user
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 1
----
===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'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.011/ T1218.011]
* '''Last Updated''': 2021-02-04
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=rundll32.exe Processes.process=*setupapi* by Processes.user Processes.process_name Processes.process Processes.dest
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_rundll32_application_control_bypass___setupapi_filter`
====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.process
* Processes.process_name
* Processes.user
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 1
----
===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'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.011/ T1218.011]
* '''Last Updated''': 2021-02-04
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=rundll32.exe Processes.process=*syssetup* by Processes.user Processes.process_name Processes.process Processes.dest
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_rundll32_application_control_bypass___syssetup_filter`
====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.process
* Processes.process_name
* Processes.user
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 1
----
===Detect rundll32 inline hta execution===
The following analytic identifies "rundll32.exe" execution with inline protocol handlers. "JavaScript", "VBScript", and "About" 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 "rundll32.exe" and its parent process.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218.005/ T1218.005]
* '''Last Updated''': 2021-01-20
====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=rundll32.exe (Processes.process=*vbscript* OR Processes.process=*javascript* OR Processes.process=*about*) 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)`
| `detect_rundll32_inline_hta_execution_filter`
====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.
====Required field====
* _time
* Processes.process
* Processes.process_name
* Processes.user
* Processes.dest
* Processes.parent_process_name
* Processes.parent_process
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 1
----
===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.003/ T1059.003]
* '''Last Updated''': 2020-07-21
====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="cmd.exe" (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("Processes")`
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)`
| `detect_use_of_cmd_exe_to_launch_script_interpreters_filter`
====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.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
----
===Detect mshta inline hta execution===
The following analytic identifies "mshta.exe" execution with inline protocol handlers. "JavaScript", "VBScript", and "About" 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 "mshta.exe" and its parent process.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218.005/ T1218.005]
* '''Last Updated''': 2021-01-20
====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=mshta.exe (Processes.process=*vbscript* OR Processes.process=*javascript* OR Processes.process=*about*) 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)`
| `detect_mshta_inline_hta_execution_filter`
====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.
====Required field====
* _time
* Processes.process
* Processes.parent_process
* Processes.user
* Processes.process_name
* Processes.parent_process_name
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 5
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218.005/ T1218.005]
* '''Last Updated''': 2021-01-20
====Search====
`sysmon` EventID=1 (OriginalFileName=mshta.exe AND process_name!=mshta.exe)
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, User, parent_process_name, process_name, OriginalFileName, process_path, CommandLine
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_mshta_renamed_filter`
====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
* EventID
* OriginalFileName
* process_name
* Computer
* User
* parent_process_name
* process_path
* CommandLine
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 1
----
===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
====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 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>=5
| table firstTime lastTime dest user process_name process parent_process eventcount
| `detect_processes_used_for_system_network_configuration_discovery_filter`
====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.process
* Processes.parent_process
* Processes.dest
* Processes.process_name
* Processes.user
====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
----
===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
====Search====
| tstats `security_content_summariesonly` count min(_time) values(Processes.process) as process max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process="* /stext *" OR Processes.process="* /scomma *" ) 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`
====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 "process" 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
----
===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]
* '''Last Updated''': 2020-11-18
====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="DWORD (0x00000000)" 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`
====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 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
| Defense Evasion, Privilege Escalation
|}
====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
----
===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]
* '''Last Updated''': 2020-02-21
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=rundll32.exe Processes.process=*comsvcs.dll* Processes.process=*MiniDump* by Processes.user Processes.process_name Processes.process Processes.dest
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `dump_lsass_via_comsvcs_dll_filter`
====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====
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.process_name
* Processes.process
* Processes.user
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.001
| LSASS Memory
| 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'': 1
----
===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 (OriginalFileName=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]
* '''Last Updated''': 2021-02-01
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=procdump.exe OR Processes.process_name=procdump64.exe (Processes.process=*-ma* OR Processes.process=*-mm*) Processes.process=*lsass* by Processes.user Processes.process_name Processes.process Processes.dest
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `dump_lsass_via_procdump_filter`
====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.
====Required field====
* _time
* Processes.process_name
* Processes.process
* Processes.user
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.001
| LSASS Memory
| 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'': 1
----
===Dump lsass via procdump rename===
Detect a renamed instance of 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. 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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1003.001/ T1003.001]
* '''Last Updated''': 2021-02-01
====Search====
`sysmon` OriginalFileName=procdump process_name!=procdump*.exe EventID=1 (CommandLine=*-ma* OR CommandLine=*-mm*) CommandLine=*lsass*
| rename Computer as dest
| stats count min(_time) as firstTime max(_time) as lastTime by dest, parent_process_name, process_name, OriginalFileName, CommandLine
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `dump_lsass_via_procdump_rename_filter`
====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.
====Required field====
* _time
* OriginalFileName
* process_name
* EventID
* CommandLine
* Computer
* parent_process_name
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1003.001
| LSASS Memory
| 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'': 1
----
===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]
* '''Last Updated''': 2021-03-01
====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="*mscfile\\shell\\open\\command\\*" 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`
====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.
====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
| Defense Evasion, Privilege Escalation
|}
====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
----
===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 "real" 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.003/ T1036.003]
* '''Last Updated''': 2020-11-18
====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`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Windows_File_Extension_and_Association_Abuse|Windows File Extension and Association Abuse]]
====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.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
----
===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
====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 "(?\.[^\.]+)$"
| 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`
====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
----
===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
====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 > relative_time(now(), "`previously_seen_zoom_child_processes_window`")
| `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`
====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'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
----
===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.002/ T1569.002]
* '''Last Updated''': 2020-07-21
====Search====
`wineventlog_system` EventCode=7036
| rex field=Message "The (?[-\(\)\s\w]+) service entered the (?\w+) state"
| where state="running"
| lookup previously_seen_running_windows_services service as service OUTPUT firstTimeSeen
| where isnull(firstTimeSeen) OR firstTimeSeen > relative_time(now(), `previously_seen_windows_services_window`)
| table _time dest service
| `first_time_seen_running_windows_service_filter`
====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.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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques// ], [https://attack.mitre.org/techniques/T1202/ T1202]
* '''Last Updated''': 2021-2-1
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null))
| eval dest_user_id=ucast(map_get(input_event, "dest_user_id"), "string", null), dest_device_id=ucast(map_get(input_event, "dest_device_id"), "string", null), process_name=ucast(map_get(input_event, "process_name"), "string", null), cmd_line=ucast(map_get(input_event, "process"), "string", 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}/, "GUID"), cmd_line_norm=replace(cmd_line_norm, /(?<=\s)+\\[^:]*(?=\\.*\.\w{3}(\s
|$)+)/, "\\PATH"), /* replaces " \\Something\\Something\\command.ext" => "PATH\\command.ext" */ cmd_line_norm=replace(cmd_line_norm, /\w:\\[^:]*(?=\\.*\.\w{3}(\s
|$)+)/, "\\PATH"), /* replaces "C:\\Something\\Something\\command.ext" => "PATH\\command.ext" */ cmd_line_norm=replace(cmd_line_norm, /\d+/, "N")
| where process_name="cmd.exe" AND match_regex(ucast(cmd_line, "string", ""), /.* \/[cC] .*/)=true
| select cmd_line, cmd_line_norm, timestamp, dest_device_id, dest_user_id
| first_time_event input_columns=["cmd_line_norm"]
| where first_time_cmd_line_norm
| eval start_time = timestamp, end_time = timestamp, entities = mvappend(dest_device_id, dest_user_id), body = "TBD"
| into write_ssa_detected_events();
====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
|-
|
|
|
|-
| 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'': 2
----
===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]
* '''Last Updated''': 2021-03-01
====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`
====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
* 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
| Defense Evasion, Privilege Escalation
|}
====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
----
===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.001/ T1222.001]
* '''Last Updated''': 2020-07-21
====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("Processes")`
| `security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)`
| `hiding_files_and_directories_with_attrib_exe_filter`
====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 "process" 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.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
----
===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
====Search====
`sysmon` EventCode=23 TargetFilename IN ("*\.cmd", "*\.ini","*\.gif", "*\.jpg", "*\.jpeg", "*\.db", "*\.ps1", "*\.doc*", "*\.xls*", "*\.ppt*", "*\.bmp","*\.zip", "*\.rar", "*\.7z", "*\.chm", "*\.png", "*\.log", "*\.vbs", "*\.js")
| stats values(TargetFilename) as deleted_files min(_time) as firstTime max(_time) as lastTime count by Computer user EventCode Image ProcessID
|where count >=100
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `high_file_deletion_frequency_filter`
====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
----
===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
====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 >= 15
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `high_process_termination_frequency_filter`
====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
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===Illegal account creation via powersploit modules===
This detection identifies access to PowerSploit modules that create accounts illegaly.
* '''Product''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1585/ T1585]
* '''Last Updated''': 2020-11-09
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===Illegal deletion of logs via mimikatz modules===
This detection identifies access to PowerSploit modules that delete event logs.
* '''Product''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070/ T1070]
* '''Last Updated''': 2020-11-09
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===Illegal enabling or disabling of accounts via dsinternals modules===
This detection identifies use of DSInternals modules that enable or disable accounts illegaly.
* '''Product''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1098/ T1098]
* '''Last Updated''': 2020-11-09
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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, Initial Access, Persistence, Privilege Escalation
|-
| 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/logAllDSInternalsModules.log
''version'': 1
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
| 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/T1548/logAllPowerSploitModulesWithOldNames.log
''version'': 1
----
===Illegal privilege elevation via mimikatz modules===
This detection identifies use of Mimikatz modules for illegal privilege elevation.
* '''Product''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1134/ T1134], [https://attack.mitre.org/techniques/T1548/ T1548]
* '''Last Updated''': 2020-11-09
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
| Defense Evasion, Privilege Escalation
|}
====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
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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]
* '''Last Updated''': 2020-10-16
====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`
====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
|}
====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
----
===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
====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="*com.apple.loginwindow*" 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`
====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
----
===Malicious powershell process - connect to internet with hidden window===
This search looks for PowerShell processes started with parameters to modify the execution policy of the run, run in a hidden window, and connect to the Internet. This combination of command-line options is suspicious because it's overriding the default PowerShell execution policy, attempts to hide its activity from the user, and connects to the Internet. Deprecated becaue hidden is not needed when download file with System.Net.WebClient.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059.001/ T1059.001]
* '''Last Updated''': 2020-11-20
====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=powershell.exe Processes.process=*-WindowStyle* Processes.process=*hidden* Processes.process="*New-Object*" by Processes.user Processes.process_name Processes.parent_process_name Processes.process Processes.dest
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `malicious_powershell_process___connect_to_internet_with_hidden_window_filter`
====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 "process" 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
|}
====Kill Chain Phase====
* Command and Control
* Actions on Objectives
====Known False Positives====
Legitimate process can have this combination of command-line options, but it's not common.
====Reference====
====Test Dataset====
* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/hidden_powershell/windows-sysmon.log
''version'': 5
----
===Malicious powershell process - encoded command===
This search looks for PowerShell processes that have encoded the script within the command-line. Malware has been seen using this parameter, as it obfuscates the code and makes it relatively easy to pass a script on the command-line.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1027/ T1027]
* '''Last Updated''': 2020-07-21
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name = powershell.exe (Processes.process=*-EncodedCommand* OR Processes.process=*-enc*) by Processes.user Processes.process_name Processes.process Processes.parent_process_name Processes.dest Processes.process_id
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `malicious_powershell_process___encoded_command_filter`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]
* [[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 "process" field in the Endpoint data model.
====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's not common.
====Reference====
====Test Dataset====
* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1027/atomic_red_team/windows-sysmon.log
''version'': 4
----
===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.001/ T1059.001]
* '''Last Updated''': 2020-07-21
====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 Processes.process_name=powershell.exe (Processes.process="* -ex*" OR Processes.process="* bypass *") 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`
====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 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 "process" field in the Endpoint data model.
====Required field====
* _time
* Processes.process_id
* Processes.parent_process_id
* Processes.process
* Processes.process_name
* Processes.user
* Processes.dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 4
----
===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.001/ T1059.001]
* '''Last Updated''': 2021-01-19
====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=powershell.exe by Processes.user Processes.process_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,"`"))-1) + (mvcount(split(process, "^"))-1) + (mvcount(split(process, "'"))-1)
| `malicious_powershell_process_with_obfuscation_techniques_filter`
| search num_obfuscation > 10
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Malicious_PowerShell|Malicious PowerShell]]
====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 "process" 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
|-
| 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'': 4
----
===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]
* '''Last Updated''': 2020-11-23
====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="*CurrentControlSet\\Control\\Print\\Monitors*" 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`
====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
|}
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1059/ T1059], [https://attack.mitre.org/techniques/T1053/ T1053]
* '''Last Updated''': 2020-08-25
====Search====
| from read_ssa_enriched_events()
| eval device=ucast(map_get(input_event, "dest_device_id"), "string", null), process_name=lower(ucast(map_get(input_event, "process_name"), "string", null)), timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null))
| where process_name=="regsvcs.exe" OR process_name=="ftp.exe" OR process_name=="dfsvc.exe" OR process_name=="rasautou.exe" OR process_name=="schtasks.exe" OR process_name=="xwizard.exe" OR process_name=="findstr.exe" OR process_name=="esentutl.exe" OR process_name=="cscript.exe" OR process_name=="reg.exe" OR process_name=="csc.exe" OR process_name=="atbroker.exe" OR process_name=="print.exe" OR process_name=="pcwrun.exe" OR process_name=="vbc.exe" OR process_name=="rpcping.exe" OR process_name=="wsreset.exe" OR process_name=="ilasm.exe" OR process_name=="certutil.exe" OR process_name=="replace.exe" OR process_name=="mshta.exe" OR process_name=="bitsadmin.exe" OR process_name=="wscript.exe" OR process_name=="ieexec.exe" OR process_name=="cmd.exe" OR process_name=="microsoft.workflow.compiler.exe" OR process_name=="runscripthelper.exe" OR process_name=="makecab.exe" OR process_name=="forfiles.exe" OR process_name=="desktopimgdownldr.exe" OR process_name=="control.exe" OR process_name=="msbuild.exe" OR process_name=="register-cimprovider.exe" OR process_name=="tttracer.exe" OR process_name=="ie4uinit.exe" OR process_name=="sc.exe" OR process_name=="bash.exe" OR process_name=="hh.exe" OR process_name=="cmstp.exe" OR process_name=="mmc.exe" OR process_name=="jsc.exe" OR process_name=="scriptrunner.exe" OR process_name=="odbcconf.exe" OR process_name=="extexport.exe" OR process_name=="msdt.exe" OR process_name=="diskshadow.exe" OR process_name=="extrac32.exe" OR process_name=="eventvwr.exe" OR process_name=="mavinject.exe" OR process_name=="regasm.exe" OR process_name=="gpscript.exe" OR process_name=="rundll32.exe" OR process_name=="regsvr32.exe" OR process_name=="regedit.exe" OR process_name=="msiexec.exe" OR process_name=="gfxdownloadwrapper.exe" OR process_name=="presentationhost.exe" OR process_name=="regini.exe" OR process_name=="wmic.exe" OR process_name=="runonce.exe" OR process_name=="syncappvpublishingserver.exe" OR process_name=="verclsid.exe" OR process_name=="psr.exe" OR process_name=="infdefaultinstall.exe" OR process_name=="explorer.exe" OR process_name=="expand.exe" OR process_name=="installutil.exe" OR process_name=="netsh.exe" OR process_name=="wab.exe" OR process_name=="dnscmd.exe" OR process_name=="at.exe" OR process_name=="pcalua.exe" OR process_name=="cmdkey.exe" OR process_name=="msconfig.exe"
| 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="quantile" value="lolbas_counter" entity="device" window=2419200000L
| where label AND quantile>0.99
| eval start_time = window_start, end_time = timestamp, entities = mvappend(device), body = "TBD"
| into write_null();
====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't collected yet enough data to construct the baseline.
====Reference====
* https://github.com/LOLBAS-Project/LOLBAS/tree/master/yml/OSBinaries
====Test Dataset====
''version'': 1
----
===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
====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`
====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_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
----
===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.001/ T1059.001]
* '''Last Updated''': 2021-03-03
====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=pwsh.exe OR Processes.process_name=PowerShell_ISE.exe (Processes.process=*Net.Sockets.TCPClient* AND Processes.process=*System.Text.ASCIIEncoding*) 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)`
| `nishang_powershelltcponeline_filter`
====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.
====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
|-
| 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'': 1
----
===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 "ac i ntds" "ifm" "create full C:\Temp" q q \
This technique uses "Install from Media" (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]
* '''Last Updated''': 2021-01-28
====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`
====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 "process" 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
|}
====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
----
===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.008/ T1546.008]
* '''Last Updated''': 2020-07-21
====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`
====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.008
| Accessibility Features
| Persistence, Privilege Escalation
|}
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1078/ T1078], [https://attack.mitre.org/techniques/T1098/ T1098]
* '''Last Updated''': 2020-11-04
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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, Initial Access, Persistence, Privilege Escalation
|-
| 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
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1566.002/ T1566.002]
* '''Last Updated''': 2021-01-28
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem where Filesystem.file_name="*.lnk" AND Filesystem.file_path="C:\\Temp*" by _time span=1h Filesystem.process_id Filesystem.file_name Filesystem.file_path Filesystem.file_hash Filesystem.user
| `drop_dm_object_name(Filesystem)`
| rename process_id as lnk_pid
| join lnk_pid, _time [
| tstats `security_content_summariesonly` count FROM datamodel=Endpoint.Processes where Processes.process_name=* by _time span=1h Processes.parent_process_id Processes.process_id Processes.process_name Processes.dest Processes.process_path Processes.process
| `drop_dm_object_name(Processes)`
| rename parent_process_id as lnk_pid
| fields _time lnk_pid process_id dest process_name process_path process]
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| table firstTime, lastTime, lnk_pid, process_id, user, dest, file_name, file_path, process_name, process, process_path, file_hash
| `process_creating_lnk_file_in_suspicious_location_filter`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Phishing_Payloads|Phishing Payloads]]
====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.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'': 4
----
===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/T1003.002/ T1003.002]
* '''Last Updated''': 2021-03-17
====Search====
`sysmon` EventCode=1 cmdline = "*/c del*" Image = "*\\cmd.exe"
|eval result = if(like(process,"%".parent_process."%"), "Found", "Not Found")
| stats min(_time) as firstTime max(_time) as lastTime count by Computer user ParentImage ParentCommandLine Image cmdline EventCode ProcessID result
| where result = "Found"
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `process_deleting_its_process_file_path_filter`
====Associated Analytic Story====
* [[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 "process" 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
|-
| T1003.002
| Security Account Manager
| Credential Access
|}
====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
----
===Process execution via wmi===
This search looks for processes launched via WMI.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1047/ T1047]
* '''Last Updated''': 2020-03-16
====Search====
| tstats `security_content_summariesonly` count values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes where Processes.parent_process_name = *WmiPrvSE.exe by Processes.user Processes.dest Processes.process_name
| `drop_dm_object_name("Processes")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `process_execution_via_wmi_filter`
====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 "process" 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'': 3
----
===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
====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`
====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
----
===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]
* '''Last Updated''': 2020-07-10
====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 Processes.process=*netsh* by Processes.parent_process_name Processes.parent_process Processes.process_name Processes.user Processes.dest
|`drop_dm_object_name("Processes")`
|`security_content_ctime(firstTime)`
|`security_content_ctime(lastTime)`
|`processes_launching_netsh_filter`
====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 must be ingesting data that records process activity from your hosts to populate the endpoint data model
====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
|}
====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'': 3
----
===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 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
====Search====
`sysmon` EventCode=11 file_name IN ("*\.txt","*\.html","*\.hta")
| 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 >= 50
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `ransomware_notes_bulk_creation_filter`
====Associated Analytic Story====
* [[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.
====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
----
===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''': UEBA for Security Cloud
* '''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''': 2020-08-13
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null))
| eval parent_process=lower(ucast(map_get(input_event, "parent_process_name"), "string", null)), parent_process_name=mvindex(split(parent_process, "\\"), -1), process_name=lower(ucast(map_get(input_event, "process_name"), "string", null)), dest_user_id=ucast(map_get(input_event, "dest_user_id"), "string", null), dest_device_id=ucast(map_get(input_event, "dest_device_id"), "string", null)
| where parent_process_name!=null
| select parent_process_name, process_name, timestamp, dest_device_id, dest_user_id
| conditional_anomaly conditional="parent_process_name" target="process_name"
| rename output as input
| where input < 1
| adaptive_threshold algorithm="quantile" entity="parent_process_name" window=604800000L
| where label AND quantile<0.1 AND (process_name="powershell.exe" OR process_name="regsvcs.exe" OR process_name="ftp.exe" OR process_name="dfsvc.exe" OR process_name="rasautou.exe" OR process_name="schtasks.exe" OR process_name="xwizard.exe" OR process_name="findstr.exe" OR process_name="esentutl.exe" OR process_name="cscript.exe" OR process_name="reg.exe" OR process_name="csc.exe" OR process_name="atbroker.exe" OR process_name="print.exe" OR process_name="pcwrun.exe" OR process_name="vbc.exe" OR process_name="rpcping.exe" OR process_name="wsreset.exe" OR process_name="ilasm.exe" OR process_name="certutil.exe" OR process_name="replace.exe" OR process_name="mshta.exe" OR process_name="bitsadmin.exe" OR process_name="wscript.exe" OR process_name="ieexec.exe" OR process_name="cmd.exe" OR process_name="microsoft.workflow.compiler.exe" OR process_name="runscripthelper.exe" OR process_name="makecab.exe" OR process_name="forfiles.exe" OR process_name="desktopimgdownldr.exe" OR process_name="control.exe" OR process_name="msbuild.exe" OR process_name="register-cimprovider.exe" OR process_name="tttracer.exe" OR process_name="ie4uinit.exe" OR process_name="sc.exe" OR process_name="bash.exe" OR process_name="hh.exe" OR process_name="cmstp.exe" OR process_name="mmc.exe" OR process_name="jsc.exe" OR process_name="scriptrunner.exe" OR process_name="odbcconf.exe" OR process_name="extexport.exe" OR process_name="msdt.exe" OR process_name="diskshadow.exe" OR process_name="extrac32.exe" OR process_name="eventvwr.exe" OR process_name="mavinject.exe" OR process_name="regasm.exe" OR process_name="gpscript.exe" OR process_name="rundll32.exe" OR process_name="regsvr32.exe" OR process_name="regedit.exe" OR process_name="msiexec.exe" OR process_name="gfxdownloadwrapper.exe" OR process_name="presentationhost.exe" OR process_name="regini.exe" OR process_name="wmic.exe" OR process_name="runonce.exe" OR process_name="syncappvpublishingserver.exe" OR process_name="verclsid.exe" OR process_name="psr.exe" OR process_name="infdefaultinstall.exe" OR process_name="explorer.exe" OR process_name="expand.exe" OR process_name="installutil.exe" OR process_name="netsh.exe" OR process_name="wab.exe" OR process_name="dnscmd.exe" OR process_name="at.exe" OR process_name="pcalua.exe" OR process_name="cmdkey.exe" OR process_name="msconfig.exe")
| eval start_time = timestamp, end_time = timestamp, entities = mvappend(dest_device_id, dest_user_id), body = "TBD"
| into write_null();
====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_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't collected yet enough data to construct the baseline.
====Reference====
====Test Dataset====
''version'': 1
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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, Initial Access, Persistence, Privilege Escalation
|-
| 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
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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, Initial Access, Persistence, Privilege Escalation
|-
| 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
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1592/ T1592]
* '''Last Updated''': 2020-11-06
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1007/ T1007], [https://attack.mitre.org/techniques/T1012/ T1012], [https://attack.mitre.org/techniques/T1046/ T1046], [https://attack.mitre.org/techniques/T1047/ T1047], [https://attack.mitre.org/techniques/T1057/ T1057], [https://attack.mitre.org/techniques/T1083/ T1083], [https://attack.mitre.org/techniques/T1518/ T1518], [https://attack.mitre.org/techniques/T1592.002/ T1592.002]
* '''Last Updated''': 2020-11-06
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
|-
| T1012
| Query Registry
| Discovery
|-
| T1046
| Network Service Scanning
| Discovery
|-
| T1047
| Windows Management Instrumentation
| Execution
|-
| T1057
| Process Discovery
| Discovery
|-
| T1083
| File and Directory Discovery
| Discovery
|-
| T1518
| Software Discovery
| Discovery
|-
| T1592.002
| Software
| Reconnaissance
|}
====Kill Chain Phase====
* Actions on Objectives
====Known False Positives====
None identified.
====Reference====
* https://github.com/PowerShellMafia/PowerSploit
====Test Dataset====
''version'': 1
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
----
===Reconnaissance and access to shared resources via mimikatz modules===
This detection identifies use of Mimikatz modules for discovery and access to network shares.
* '''Product''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021.002/ T1021.002], [https://attack.mitre.org/techniques/T1135/ T1135], [https://attack.mitre.org/techniques/T1039/ T1039]
* '''Last Updated''': 2020-11-06
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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.002
| SMB/Windows Admin Shares
| Lateral Movement
|-
| T1135
| Network Share Discovery
| Discovery
|-
| T1039
| Data from Network Shared Drive
| Collection
|}
====Kill Chain Phase====
* Actions on Objectives
====Known False Positives====
None identified.
====Reference====
* https://github.com/gentilkiwi/mimikatz
====Test Dataset====
''version'': 1
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021.002/ T1021.002], [https://attack.mitre.org/techniques/T1135/ T1135], [https://attack.mitre.org/techniques/T1039/ T1039]
* '''Last Updated''': 2020-11-06
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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.002
| SMB/Windows Admin Shares
| Lateral Movement
|-
| T1135
| Network Share Discovery
| Discovery
|-
| T1039
| Data from Network Shared Drive
| Collection
|}
====Kill Chain Phase====
* Actions on Objectives
====Known False Positives====
None identified.
====Reference====
* https://github.com/PowerShellMafia/PowerSploit
====Test Dataset====
''version'': 1
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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, Initial Access, Persistence, Privilege Escalation
|-
| T1543
| Create or Modify System Process
| Persistence, Privilege Escalation
|-
| T1547
| Boot or Logon Autostart Execution
| Persistence, Privilege Escalation
|-
| T1574
| Hijack Execution Flow
| Defense Evasion, Persistence, Privilege Escalation
|}
====Kill Chain Phase====
* Actions on Objectives
====Known False Positives====
None identified.
====Reference====
* https://github.com/PowerShellMafia/PowerSploit
====Test Dataset====
''version'': 1
----
===Reconnaissance of connectivity via powersploit modules===
This detection identifies access to PowerSploit modules for reconnaissance of connectivity.
* '''Product''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1021.002/ T1021.002], [https://attack.mitre.org/techniques/T1135/ T1135], [https://attack.mitre.org/techniques/T1039/ T1039]
* '''Last Updated''': 2020-11-06
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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.002
| SMB/Windows Admin Shares
| Lateral Movement
|-
| T1135
| Network Share Discovery
| Discovery
|-
| T1039
| Data from Network Shared Drive
| Collection
|}
====Kill Chain Phase====
* Actions on Objectives
====Known False Positives====
None identified.
====Reference====
* https://github.com/PowerShellMafia/PowerSploit
====Test Dataset====
''version'': 1
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1589.001/ T1589.001], [https://attack.mitre.org/techniques/T1590.001/ T1590.001], [https://attack.mitre.org/techniques/T1590.003/ T1590.003], [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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
|-
| T1589.001
| Credentials
| Reconnaissance
|-
| T1590.001
| Domain Properties
| Reconnaissance
|-
| T1590.003
| Network Trust Dependencies
| Reconnaissance
|-
| T1068
| Exploitation for Privilege Escalation
| Privilege Escalation
|-
| T1078
| Valid Accounts
| Defense Evasion, Initial Access, Persistence, Privilege Escalation
|-
| T1098
| Account Manipulation
| Persistence
|}
====Kill Chain Phase====
* Actions on Objectives
====Known False Positives====
None identified.
====Reference====
* https://github.com/gentilkiwi/mimikatz
====Test Dataset====
''version'': 1
----
===Reconnaissance of defensive tools via powersploit modules===
This detection identifies use of PowerSploit modules for assessment of presence of defensive tools.
* '''Product''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1595.002/ T1595.002], [https://attack.mitre.org/techniques/T1592.002/ T1592.002]
* '''Last Updated''': 2020-11-05
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
|-
| T1595.002
| Vulnerability Scanning
| Reconnaissance
|-
| T1592.002
| Software
| Reconnaissance
|}
====Kill Chain Phase====
* Actions on Objectives
====Known False Positives====
None identified.
====Reference====
* https://github.com/PowerShellMafia/PowerSploit
====Test Dataset====
''version'': 1
----
===Reconnaissance of privilege escalation opportunities via powersploit modules===
This detection identifies use of PowerSploit modules for assessment of privilege escalation opportunities.
* '''Product''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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, Initial Access, Persistence, Privilege Escalation
|-
| 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
----
===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''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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
| Defense Evasion, Persistence, Privilege Escalation
|}
====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
----
===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]
* '''Last Updated''': 2020-11-26
====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("Processes")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `reg_exe_manipulating_windows_services_registry_keys_filter`
====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
| Defense Evasion, Persistence, Privilege Escalation
|}
====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
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1547.001/ T1547.001]
* '''Last Updated''': 2020-11-27
====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\\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=*\\CurrentControlSet\\Control\\Lsa\\* OR Registry.registry_path="*Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options*" OR Registry.registry_path=HKLM\\SOFTWARE\\Microsoft\\Netsh\\*) by Registry.dest Registry.user
| `security_content_ctime(lastTime)`
| `security_content_ctime(firstTime)`
| `drop_dm_object_name(Registry)`
| `registry_keys_used_for_persistence_filter`
====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 ]]
====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
|}
====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'': 5
----
===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 "Image File Execution Options" 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]
* '''Last Updated''': 2020-11-27
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where (Registry.registry_path="*Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options*") 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`
====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
| Persistence, Privilege Escalation
|}
====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
----
===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]
* '''Last Updated''': 2020-11-26
====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`
====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
| Persistence, Privilege Escalation
|}
====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
----
===Remote desktop process running on system===
This search looks for the remote desktop process mstsc.exe running on systems upon which it doesn'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]
* '''Last Updated''': 2020-07-21
====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`
====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 "Identify Systems Using Remote Desktop" to identify these systems. After identifying them, you will need to add the "common_rdp_source" 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
|}
====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
----
===Remote process instantiation via wmi===
This search looks for 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
====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 = wmic.exe Processes.process="*/node*" Processes.process="*process*" Processes.process="*call*" Processes.process="*create*" 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)`
| `remote_process_instantiation_via_wmi_filter`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Ransomware|Ransomware]]
* [[Documentation:ESSOC:stories:UseCase#Suspicious_WMI_Use|Suspicious WMI Use]]
====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 "process" 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
|-
| 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'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'': 5
----
===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
====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 = "cmd.exe" OR Processes.parent_process_name = "powershell.exe" OR Processes.parent_process_name = "powershell_ise.exe" OR Processes.parent_process_name = "wmic.exe" Processes.process_name = "vssadmin.exe" Processes.process="*resize*" Processes.process="*shadowstorage*" Processes.process="*/maxsize*" 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`
====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
----
===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.011/ T1218.011]
* '''Last Updated''': 2020-11-30
====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 = rundll32.exe by Processes.process_name Processes.parent_process_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`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Unusual_Processes|Unusual 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 must also be ingesting logs with both the process name and command line from your endpoints. The command-line arguments are mapped to the "process" field in the Endpoint data model.
====Required field====
* _time
* Processes.process_name
* Processes.parent_process_name
* Processes.process
* Processes.dest
* Processes.user
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 4
----
===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
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem WHERE "Filesystem.file_path"=C:\\*Ryuk* BY "Filesystem.dest", "Filesystem.user", "Filesystem.file_path"
| `drop_dm_object_name(Filesystem)`
| `security_content_ctime(lastTime)`
| `security_content_ctime(firstTime)`
| `ryuk_test_files_detected_filter`
====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
----
===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.003/ T1059.003]
* '''Last Updated''': 2021-03-01
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process="*8 LAN*" OR Processes.process="*9 REP*") 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`
====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.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
----
===Samsam test file write===
The search looks for a file named "test.txt" 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
====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`
====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
----
===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]
* '''Last Updated''': 2020-07-21
====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="* create *" OR Processes.process="* config *") 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`
====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
|}
====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
----
===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]
* '''Last Updated''': 2020-12-17
====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`
====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 "process" 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
|}
====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
----
===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]
* '''Last Updated''': 2020-07-21
====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="*/create*" (Processes.process="* /s *" OR Processes.process="* /S *") 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`
====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 "process" 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
|}
====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
----
===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]
* '''Last Updated''': 2020-12-07
====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="*shutdown*" Processes.process="*/create *" 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`
====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 logs with both the process name and command-line 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.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
|}
====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
----
===Script execution via wmi===
This search looks for scripts launched via WMI.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1047/ T1047]
* '''Last Updated''': 2020-03-16
====Search====
| tstats `security_content_summariesonly` count values(Processes.process) as process min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes where Processes.process_name = "scrcons.exe" by Processes.user Processes.dest Processes.process_name
| `drop_dm_object_name("Processes")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `script_execution_via_wmi_filter`
====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 "process" 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.
====Reference====
====Test Dataset====
* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1047/execution_scrcons/windows-sysmon.log
''version'': 3
----
===Setting credentials via dsinternals modules===
This detection identifies illegal setting of credentials via DSInternals modules.
* '''Product''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), process_name=ucast(map_get(input_event, "process_name"), "string", null), process_path=ucast(map_get(input_event, "process_path"), "string", null), cmd_line=ucast(map_get(input_event, "process"), "string", null), parent_process_name=ucast(map_get(input_event, "parent_process_name"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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, Initial Access, Persistence, Privilege Escalation
|-
| 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/logAllDSInternalsModules.log
''version'': 1
----
===Setting credentials via mimikatz modules===
This detection identifies illegal setting of credentials via Mimikatz modules.
* '''Product''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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, Initial Access, Persistence, Privilege Escalation
|-
| 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/logAllMimikatzModules.log
''version'': 1
----
===Setting credentials via powersploit modules===
This detection identifies illegal setting of credentials via PowerSploit modules.
* '''Product''': UEBA for Security Cloud
* '''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
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), cmd_line=ucast(map_get(input_event, "process"), "string", 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, "dest_user_id"), "string", null), ucast(map_get(input_event, "dest_device_id"), "string", null)), body = "TBD"
| into write_ssa_detected_events();
====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, Initial Access, Persistence, Privilege Escalation
|-
| 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/logAllPowerSploitModulesWithOldNames.log
''version'': 1
----
===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]
* '''Last Updated''': 2020-12-08
====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`
====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
| Persistence, Privilege Escalation
|}
====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
----
===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]
* '''Last Updated''': 2020-11-23
====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`
====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 "process" 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
| Persistence, Privilege Escalation
|}
====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
----
===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]
* '''Last Updated''': 2020-07-06
====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("All_Changes")`
| 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`
====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
|}
====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
----
===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.002/ T1204.002]
* '''Last Updated''': 2020-12-08
====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) == ".exe", 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`
====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 "process" 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.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
----
===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
====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 >= relative_time(maxtime, "-1d@d"), count, null))) as "count" avg(eval(if(_time upperBound) AND num_data_samples >=20, 1, 0)
| search isOutlier=1
| `spike_in_file_writes_filter`
====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
----
===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
====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`
====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
----
===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
====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`
====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
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-02-23
====Search====
`sysmon` EventID=1 (process_name=dllhost.exe OR OriginalFileName=dllhost.exe)
| regex CommandLine="(dllhost\.exe.{0,4}$)"
| stats count min(_time) as firstTime max(_time) as lastTime by dest, User, ParentImage,ParentCommandLine, process_name, OriginalFileName, process_path, CommandLine
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_dllhost_no_command_line_arguments_filter`
====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
* EventID
* process_name
* OriginalFileName
* CommandLine
* dest
* User
* ParentImage
* ParentCommandLine
* 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/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'': 1
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-02-23
====Search====
`sysmon` EventID=1 (process_name=gpupdate.exe OR OriginalFileName=GPUpdate.exe)
| regex CommandLine="(gpupdate\.exe.{0,4}$)"
| stats count min(_time) as firstTime max(_time) as lastTime by dest, User, ParentImage,ParentCommandLine, process_name, OriginalFileName, process_path, CommandLine
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_gpupdate_no_command_line_arguments_filter`
====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
* EventID
* process_name
* OriginalFileName
* CommandLine
* dest
* User
* ParentImage
* ParentCommandLine
* 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
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1127.001/ T1127.001], [https://attack.mitre.org/techniques/T1036.003/ T1036.003]
* '''Last Updated''': 2021-01-12
====Search====
`sysmon` EventID=1 (OriginalFileName=msbuild.exe OR process_name=msbuild.exe)
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, User, parent_process_name, process_name, OriginalFileName, process_path, CommandLine
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_msbuild_rename_filter`
====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]]
====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
* OriginalFileName
* process_name
* Computer
* User
* parent_process_name
* process_path
* CommandLine
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1127.001
| MSBuild
| 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 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'': 1
----
===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.001/ T1127.001]
* '''Last Updated''': 2021-01-12
====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 Processes.process_name=msbuild.exe by Processes.dest Processes.parent_process Processes.user
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_msbuild_spawn_filter`
====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.
====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
|-
| 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'': 1
----
===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 "Add :Label string init_verx" ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c "Add :RunAtLoad bool true" ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c "Add :StartInterval integer 3600" ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c "Add :ProgramArguments array" ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c "Add :ProgramArguments:0 string /bin/sh" ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c "Add :ProgramArguments:1 string -c" ~/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]
* '''Last Updated''': 2021-02-22
====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`
====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
|}
====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
----
===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 "Add :Label string init_verx" ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c "Add :RunAtLoad bool true" ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c "Add :StartInterval integer 3600" ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c "Add :ProgramArguments array" ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c "Add :ProgramArguments:0 string /bin/sh" ~/Library/Launchagents/init_verx.plist \
- PlistBuddy -c "Add :ProgramArguments:1 string -c" ~/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]
* '''Last Updated''': 2021-02-22
====Search====
`osquery_process` "columns.cmdline"="*LaunchAgents*" OR "columns.cmdline"="*RunAtLoad*" OR "columns.cmdline"="*true*"
| `suspicious_plistbuddy_usage_via_osquery_filter`
====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
|}
====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
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1112/ T1112]
* '''Last Updated''': 2020-07-22
====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("Processes")`
| `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("Processes")`
| `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`
====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 "process" 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'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
----
===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.010/ T1218.010]
* '''Last Updated''': 2021-01-28
====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=*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.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`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Suspicious_Regsvr32_Activity|Suspicious Regsvr32 Activity]]
====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. Tune the query by filtering additional extensions found to be used by legitimate processes.
====Required field====
* _time
* Processes.process_name
* Processes.process
* 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.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'': 1
----
===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 OriginalFileName from Sysmon, 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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218.011/ T1218.011], [https://attack.mitre.org/techniques/T1036.003/ T1036.003]
* '''Last Updated''': 2021-02-04
====Search====
`sysmon` EventID=1 OriginalFileName=RUNDLL32.EXE NOT process_name=rundll32.exe
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, User, parent_process_name, process_name, OriginalFileName, process_path, CommandLine
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_rundll32_rename_filter`
====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 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
* EventID
* OriginalFileName
* process_name
* Computer
* User
* parent_process_name
* process_path
* CommandLine
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 1
----
===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.011/ T1218.011]
* '''Last Updated''': 2021-02-04
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=rundll32.exe Processes.process=*start* 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_rundll32_startw_filter`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 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.
====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
|-
| 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'': 1
----
===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.011/ T1218.011]
* '''Last Updated''': 2021-02-09
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=rundll32.exe Processes.process=*dllregisterserver* 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_rundll32_dllregisterserver_filter`
====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.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
|-
| 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'': 1
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218.011/ T1218.011]
* '''Last Updated''': 2021-02-09
====Search====
`sysmon` EventID=1 (process_name=rundll32.exe OR OriginalFileName=RUNDLL32.EXE)
| regex CommandLine="(rundll32\.exe.{0,4}$)"
| stats count min(_time) as firstTime max(_time) as lastTime by dest, User, ParentImage,ParentCommandLine, process_name, OriginalFileName, process_path, CommandLine
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_rundll32_no_command_line_arguments_filter`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Suspicious_Rundll32_Activity|Suspicious Rundll32 Activity]]
* [[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
* EventID
* process_name
* OriginalFileName
* CommandLine
* dest
* User
* ParentImage
* ParentCommandLine
* process_path
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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'': 1
----
===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
====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`
====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
----
===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]
* '''Last Updated''': 2021-03-01
====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`
====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
|}
====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
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1055/ T1055]
* '''Last Updated''': 2021-02-23
====Search====
`sysmon` EventID=1 (process_name=searchprotocolhost.exe OR OriginalFileName=SearchProtocolHost.exe)
| regex CommandLine="(searchprotocolhost\.exe.{0,4}$)"
| stats count min(_time) as firstTime max(_time) as lastTime by dest, User, ParentImage,ParentCommandLine, process_name, OriginalFileName, process_path, CommandLine
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_searchprotocolhost_no_command_line_arguments_filter`
====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
* EventID
* process_name
* OriginalFileName
* CommandLine
* dest
* User
* ParentImage
* ParentCommandLine
* 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.log
''version'': 1
----
===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''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1127/ T1127], [https://attack.mitre.org/techniques/T1036.003/ T1036.003]
* '''Last Updated''': 2021-01-12
====Search====
`sysmon` EventID=1 (OriginalFileName=microsoft.workflow.compiler.exe OR process_name=microsoft.workflow.compiler.exe)
| stats count min(_time) as firstTime max(_time) as lastTime by Computer, User, parent_process_name, process_name, OriginalFileName, process_path, CommandLine
| rename Computer as dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_microsoft_workflow_compiler_rename_filter`
====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]]
====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
* OriginalFileName
* process_name
* Computer
* User
* parent_process_name
* process_path
* CommandLine
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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/windows-sysmon.log
''version'': 1
----
===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
====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_name=microsoft.workflow.compiler.exe by Processes.dest Processes.parent_process Processes.user
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_microsoft_workflow_compiler_usage_filter`
====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.
====Required field====
* _time
* Processes.process_name
* Processes.process
* Processes.dest
* Processes.parent_process
* Processes.user
====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/windows-sysmon.log
''version'': 1
----
===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/T1127.001/ T1127.001], [https://attack.mitre.org/techniques/T1036.003/ T1036.003]
* '''Last Updated''': 2021-01-12
====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_name=msbuild.exe AND (Processes.process_path!=c:\\windows\\microsoft.net\\framework*\\v*\\*) by Processes.dest Processes.parent_process Processes.user
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_msbuild_path_filter`
====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]]
====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.process_path
* Processes.dest
* Processes.parent_process
* Processes.user
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| T1127.001
| MSBuild
| Defense Evasion
|-
| T1036.003
| Rename System Utilities
| 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'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'': 1
----
===Suspicious mshta child process===
The following analytic identifies child processes spawning from "mshta.exe". 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 "mshta.exe" and its child process.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Endpoint
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1218.005/ T1218.005]
* '''Last Updated''': 2021-01-12
====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`
====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.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
----
===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.005/ T1218.005]
* '''Last Updated''': 2021-01-20
====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 Processes.process_name=mshta.exe by Processes.dest Processes.parent_process Processes.user
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `suspicious_mshta_spawn_filter`
====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.
====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.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'': 1
----
===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, 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]
* '''Last Updated''': 2020-07-22
====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="*cl*" (Processes.process="*System*" OR Processes.process="*Security*" OR Processes.process="*Setup*" OR Processes.process="*Application*") 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`
====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 "process" 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
|}
====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====
====Test Dataset====
* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1070.001/atomic_red_team/windows-sysmon.log
''version'': 3
----
===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
====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 = "*$Recycle.Bin*" by Filesystem.process_id Filesystem.dest
| `drop_dm_object_name("Filesystem")`
| 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 != "explorer.exe" by Processes.process_id Processes.dest
| `drop_dm_object_name("Processes")`
| table process_id dest]
| `suspicious_writes_to_windows_recycle_bin_filter`
====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
----
===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''': 2020-10-12
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processes.process="*wmic* qfe*" OR Processes.process=*systeminfo* OR Processes.process=*hostname*) by Processes.user Processes.process_name Processes.process Processes.dest
| `drop_dm_object_name(Processes)`
| eventstats dc(process) as dc_processes_by_dest by dest
| where dc_processes_by_dest > 2
| stats values(process) min(firstTime) as firstTime max(lastTime) as lastTime by user, dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `system_information_discovery_detection_filter`
====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'': 1
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036/ T1036]
* '''Last Updated''': 2020-08-25
====Search====
$ssa_input =
| from read_ssa_enriched_events()
| eval device=ucast(map_get(input_event, "dest_device_id"), "string", null), user=ucast(map_get(input_event, "dest_user_id"), "string", null), timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null)), process_name=lower(ucast(map_get(input_event, "process_name"), "string", null)), process_path=lower(ucast(map_get(input_event, "process_path"), "string", null));
$cond_1 =
| from $ssa_input
| where process_name="arp.exe" OR process_name="adaptertroubleshooter.exe" OR process_name="applicationframehost.exe" OR process_name="atbroker.exe" OR process_name="authhost.exe" OR process_name="autoworkplace.exe" OR process_name="axinstui.exe" OR process_name="backgroundtransferhost.exe" OR process_name="bdehdcfg.exe" OR process_name="bdeuisrv.exe" OR process_name="bdeunlockwizard.exe" OR process_name="bitlockerdeviceencryption.exe" OR process_name="bitlockerwizard.exe" OR process_name="bitlockerwizardelev.exe" OR process_name="bytecodegenerator.exe" OR process_name="camerasettingsuihost.exe" OR process_name="castsrv.exe" OR process_name="certenrollctrl.exe" OR process_name="checknetisolation.exe" OR process_name="clipup.exe" OR process_name="cloudexperiencehostbroker.exe" OR process_name="cloudnotifications.exe" OR process_name="cloudstoragewizard.exe" OR process_name="compmgmtlauncher.exe" OR process_name="compattelrunner.exe" OR process_name="computerdefaults.exe" OR process_name="credentialuibroker.exe" OR process_name="dfdwiz.exe" OR process_name="dwwin.exe" OR process_name="dataexchangehost.exe" OR process_name="defrag.exe" OR process_name="devicedisplayobjectprovider.exe" OR process_name="deviceeject.exe" OR process_name="deviceenroller.exe" OR process_name="devicepairingwizard.exe" OR process_name="deviceproperties.exe" OR process_name="disksnapshot.exe" OR process_name="dism.exe" OR process_name="displayswitch.exe" OR process_name="dmnotificationbroker.exe" OR process_name="dmomacpmo.exe" OR process_name="dpiscaling.exe" OR process_name="dsmusertask.exe" OR process_name="dxpserver.exe" OR process_name="edpcleanup.exe" OR process_name="eosnotify.exe" OR process_name="eap3host.exe" OR process_name="easpoliciesbrokerhost.exe" OR process_name="easeofaccessdialog.exe" OR process_name="ehstorauthn.exe" OR process_name="fxscover.exe" OR process_name="fxssvc.exe" OR process_name="fxsunatd.exe" OR process_name="filehistory.exe" OR process_name="fondue.exe" OR process_name="gamepanel.exe" OR process_name="genvalobj.exe" OR process_name="gettingstarted.exe" OR process_name="hostname.exe" OR process_name="icsentitlementhost.exe" OR process_name="infdefaultinstall.exe" OR process_name="installagent.exe" OR process_name="languagecomponentsinstallercomhandler.exe" OR process_name="launchtm.exe" OR process_name="launchwinapp.exe" OR process_name="legacynetuxhost.exe" OR process_name="licensemanagershellext.exe" OR process_name="licensingui.exe" OR process_name="locationnotificationwindows.exe" OR process_name="locationnotifications.exe" OR process_name="locator.exe" OR process_name="lockapphost.exe" OR process_name="lockscreencontentserver.exe" OR process_name="logonui.exe" OR process_name="lsaiso.exe" OR process_name="mdeserver.exe" OR process_name="mdmagent.exe" OR process_name="mdmappinstaller.exe" OR process_name="mrinfo.exe" OR process_name="mrt.exe" OR process_name="mschedexe.exe" OR process_name="magnify.exe" OR process_name="mbaeparsertask.exe" OR process_name="mdres.exe" OR process_name="mdsched.exe" OR process_name="migautoplay.exe" OR process_name="mpsigstub.exe" OR process_name="msspellcheckinghost.exe" OR process_name="muiunattend.exe" OR process_name="multidigimon.exe" OR process_name="musnotification.exe" OR process_name="musnotificationux.exe" OR process_name="napstat.exe" OR process_name="netstat.exe" OR process_name="narrator.exe" OR process_name="netcfgnotifyobjecthost.exe" OR process_name="netevtfwdr.exe" OR process_name="netproj.exe" OR process_name="netplwiz.exe" OR process_name="networkuxbroker.exe";
$cond_2 =
| from $ssa_input
| where process_name="openwith.exe" OR process_name="optionalfeatures.exe" OR process_name="pathping.exe" OR process_name="ping.exe" OR process_name="passwordonwakesettingflyout.exe" OR process_name="pickerhost.exe" OR process_name="pkgmgr.exe" OR process_name="pnpunattend.exe" OR process_name="pnputil.exe" OR process_name="presentationhost.exe" OR process_name="presentationsettings.exe" OR process_name="printbrmui.exe" OR process_name="printdialoghost.exe" OR process_name="printdialoghost3d.exe" OR process_name="printisolationhost.exe" OR process_name="proximityuxhost.exe" OR process_name="rdspnf.exe" OR process_name="rmactivate.exe" OR process_name="rmactivate_isv.exe" OR process_name="rmactivate_ssp.exe" OR process_name="rmactivate_ssp_isv.exe" OR process_name="route.exe" OR process_name="rdpsa.exe" OR process_name="rdpsaproxy.exe" OR process_name="rdpsauachelper.exe" OR process_name="reagentc.exe" OR process_name="recoverydrive.exe" OR process_name="register-cimprovider.exe" OR process_name="registeriepkeys.exe" OR process_name="relpost.exe" OR process_name="remoteposworker.exe" OR process_name="rmclient.exe" OR process_name="robocopy.exe" OR process_name="rpcping.exe" OR process_name="runlegacycplelevated.exe" OR process_name="runtimebroker.exe" OR process_name="sihclient.exe" OR process_name="searchfilterhost.exe" OR process_name="searchindexer.exe" OR process_name="searchprotocolhost.exe" OR process_name="secedit.exe" OR process_name="sensordataservice.exe" OR process_name="setieinstalleddate.exe" OR process_name="settingsynchost.exe" OR process_name="slidetoshutdown.exe" OR process_name="smartscreensettings.exe" OR process_name="sndvol.exe" OR process_name="snippingtool.exe" OR process_name="soundrecorder.exe" OR process_name="spaceagent.exe" OR process_name="sppextcomobj.exe" OR process_name="srtasks.exe" OR process_name="stikynot.exe" OR process_name="synchost.exe" OR process_name="sysreseterr.exe" OR process_name="systempropertiesadvanced.exe" OR process_name="systempropertiescomputername.exe" OR process_name="systempropertiesdataexecutionprevention.exe" OR process_name="systempropertieshardware.exe" OR process_name="systempropertiesperformance.exe" OR process_name="systempropertiesprotection.exe" OR process_name="systempropertiesremote.exe" OR process_name="systemsettingsadminflows.exe" OR process_name="systemsettingsbroker.exe" OR process_name="systemsettingsremovedevice.exe" OR process_name="tcpsvcs.exe" OR process_name="tracert.exe" OR process_name="tstheme.exe" OR process_name="tswbprxy.exe" OR process_name="tapiunattend.exe" OR process_name="taskmgr.exe" OR process_name="thumbnailextractionhost.exe" OR process_name="tokenbrokercookies.exe" OR process_name="tpminit.exe" OR process_name="tswpfwrp.exe" OR process_name="ui0detect.exe" OR process_name="upgraderesultsui.exe" OR process_name="useraccountbroker.exe" OR process_name="useraccountcontrolsettings.exe" OR process_name="usoclient.exe" OR process_name="utilman.exe" OR process_name="vssvc.exe" OR process_name="vaultcmd.exe" OR process_name="vaultsysui.exe" OR process_name="wfs.exe" OR process_name="wmpdmc.exe" OR process_name="wpdshextautoplay.exe" OR process_name="wscollect.exe" OR process_name="wsmanhttpconfig.exe" OR process_name="wsreset.exe" OR process_name="wudfhost.exe" OR process_name="wwahost.exe" OR process_name="wallpaperhost.exe" OR process_name="webcache.exe" OR process_name="werfault.exe" OR process_name="werfaultsecure.exe" OR process_name="winsat.exe" OR process_name="windows.media.backgroundplayback.exe" OR process_name="windowsactiondialog.exe" OR process_name="windowsanytimeupgrade.exe" OR process_name="windowsanytimeupgraderesults.exe";
$cond_3 =
| from $ssa_input
| where process_name="windowsanytimeupgradeui.exe" OR process_name="windowsupdateelevatedinstaller.exe" OR process_name="workfolders.exe" OR process_name="wpcmon.exe" OR process_name="acu.exe" OR process_name="aitagent.exe" OR process_name="aitstatic.exe" OR process_name="alg.exe" OR process_name="appidcertstorecheck.exe" OR process_name="appidpolicyconverter.exe" OR process_name="at.exe" OR process_name="attrib.exe" OR process_name="audiodg.exe" OR process_name="auditpol.exe" OR process_name="autochk.exe" OR process_name="autoconv.exe" OR process_name="autofmt.exe" OR process_name="baaupdate.exe" OR process_name="backgroundtaskhost.exe" OR process_name="bcastdvr.exe" OR process_name="bcdboot.exe" OR process_name="bcdedit.exe" OR process_name="bdechangepin.exe" OR process_name="bdeunlock.exe" OR process_name="bitsadmin.exe" OR process_name="bootcfg.exe" OR process_name="bootim.exe" OR process_name="bootsect.exe" OR process_name="bridgeunattend.exe" OR process_name="browser_broker.exe" OR process_name="bthudtask.exe" OR process_name="cacls.exe" OR process_name="calc.exe" OR process_name="cdpreference.exe" OR process_name="certreq.exe" OR process_name="certutil.exe" OR process_name="change.exe" OR process_name="changepk.exe" OR process_name="charmap.exe" OR process_name="chglogon.exe" OR process_name="chgport.exe" OR process_name="chgusr.exe" OR process_name="chkdsk.exe" OR process_name="chkntfs.exe" OR process_name="choice.exe" OR process_name="cipher.exe" OR process_name="cleanmgr.exe" OR process_name="cliconfg.exe" OR process_name="clip.exe" OR process_name="cmd.exe" OR process_name="cmdkey.exe" OR process_name="cmdl32.exe" OR process_name="cmmon32.exe" OR process_name="cmstp.exe" OR process_name="cofire.exe" OR process_name="colorcpl.exe" OR process_name="comp.exe" OR process_name="compact.exe" OR process_name="conhost.exe" OR process_name="consent.exe" OR process_name="control.exe" OR process_name="convert.exe" OR process_name="credwiz.exe" OR process_name="cscript.exe" OR process_name="csrss.exe" OR process_name="ctfmon.exe" OR process_name="cttune.exe" OR process_name="cttunesvr.exe" OR process_name="dashost.exe" OR process_name="dccw.exe" OR process_name="dcomcnfg.exe" OR process_name="ddodiag.exe" OR process_name="dfrgui.exe" OR process_name="dialer.exe" OR process_name="diantz.exe" OR process_name="dinotify.exe" OR process_name="diskpart.exe" OR process_name="diskperf.exe" OR process_name="diskraid.exe" OR process_name="dispdiag.exe" OR process_name="djoin.exe" OR process_name="dllhost.exe" OR process_name="dllhst3g.exe" OR process_name="dmcertinst.exe" OR process_name="dmcfghost.exe" OR process_name="dmclient.exe" OR process_name="dnscacheugc.exe" OR process_name="doskey.exe" OR process_name="dpapimig.exe" OR process_name="dpnsvr.exe" OR process_name="driverquery.exe" OR process_name="drvcfg.exe" OR process_name="drvinst.exe" OR process_name="dsregcmd.exe" OR process_name="dstokenclean.exe" OR process_name="dvdplay.exe" OR process_name="dvdupgrd.exe" OR process_name="dwm.exe" OR process_name="dxdiag.exe" OR process_name="easinvoker.exe" OR process_name="efsui.exe";
$cond_4 =
| from $ssa_input
| where process_name="embeddedapplauncher.exe" OR process_name="esentutl.exe" OR process_name="eudcedit.exe" OR process_name="eventcreate.exe" OR process_name="eventvwr.exe" OR process_name="expand.exe" OR process_name="extrac32.exe" OR process_name="fc.exe" OR process_name="fhmanagew.exe" OR process_name="find.exe" OR process_name="findstr.exe" OR process_name="finger.exe" OR process_name="fixmapi.exe" OR process_name="fltmc.exe" OR process_name="fodhelper.exe" OR process_name="fontdrvhost.exe" OR process_name="fontview.exe" OR process_name="forfiles.exe" OR process_name="fsavailux.exe" OR process_name="fsquirt.exe" OR process_name="fsutil.exe" OR process_name="ftp.exe" OR process_name="fvenotify.exe" OR process_name="fveprompt.exe" OR process_name="getmac.exe" OR process_name="gpresult.exe" OR process_name="gpscript.exe" OR process_name="gpupdate.exe" OR process_name="grpconv.exe" OR process_name="hdwwiz.exe" OR process_name="help.exe" OR process_name="hwrcomp.exe" OR process_name="hwrreg.exe" OR process_name="icacls.exe" OR process_name="icardagt.exe" OR process_name="icsunattend.exe" OR process_name="ie4uinit.exe" OR process_name="ieunatt.exe" OR process_name="ieetwcollector.exe" OR process_name="iexpress.exe" OR process_name="immersivetpmvscmgrsvr.exe" OR process_name="ipconfig.exe" OR process_name="irftp.exe" OR process_name="iscsicli.exe" OR process_name="iscsicpl.exe" OR process_name="isoburn.exe" OR process_name="klist.exe" OR process_name="ksetup.exe" OR process_name="ktmutil.exe" OR process_name="label.exe" OR process_name="licensingdiag.exe" OR process_name="lodctr.exe" OR process_name="logagent.exe" OR process_name="logman.exe" OR process_name="logoff.exe" OR process_name="lpkinstall.exe" OR process_name="lpksetup.exe" OR process_name="lpremove.exe" OR process_name="lsass.exe" OR process_name="lsm.exe" OR process_name="makecab.exe" OR process_name="manage-bde.exe" OR process_name="mblctr.exe" OR process_name="mcbuilder.exe" OR process_name="mctadmin.exe" OR process_name="mfpmp.exe" OR process_name="mmc.exe" OR process_name="mobsync.exe" OR process_name="mountvol.exe" OR process_name="mpnotify.exe" OR process_name="msconfig.exe" OR process_name="msdt.exe" OR process_name="msdtc.exe" OR process_name="msfeedssync.exe" OR process_name="msg.exe" OR process_name="mshta.exe" OR process_name="msiexec.exe" OR process_name="msinfo32.exe" OR process_name="mspaint.exe" OR process_name="msra.exe" OR process_name="mstsc.exe" OR process_name="mtstocom.exe" OR process_name="nbtstat.exe" OR process_name="ndadmin.exe" OR process_name="net.exe" OR process_name="net1.exe" OR process_name="netbtugc.exe" OR process_name="netcfg.exe" OR process_name="netiougc.exe" OR process_name="netsh.exe" OR process_name="newdev.exe" OR process_name="nltest.exe" OR process_name="notepad.exe" OR process_name="nslookup.exe" OR process_name="ntoskrnl.exe" OR process_name="ntprint.exe" OR process_name="ocsetup.exe" OR process_name="odbcad32.exe" OR process_name="odbcconf.exe" OR process_name="omadmclient.exe" OR process_name="omadmprc.exe";
$cond_5 =
| from $ssa_input
| where process_name="openfiles.exe" OR process_name="osk.exe" OR process_name="p2phost.exe" OR process_name="pcalua.exe" OR process_name="pcaui.exe" OR process_name="pcawrk.exe" OR process_name="pcwrun.exe" OR process_name="perfmon.exe" OR process_name="phoneactivate.exe" OR process_name="plasrv.exe" OR process_name="poqexec.exe" OR process_name="powercfg.exe" OR process_name="prevhost.exe" OR process_name="print.exe" OR process_name="printfilterpipelinesvc.exe" OR process_name="printui.exe" OR process_name="proquota.exe" OR process_name="provtool.exe" OR process_name="psr.exe" OR process_name="pwlauncher.exe" OR process_name="qappsrv.exe" OR process_name="qprocess.exe" OR process_name="query.exe" OR process_name="quser.exe" OR process_name="qwinsta.exe" OR process_name="rasautou.exe" OR process_name="rasdial.exe" OR process_name="raserver.exe" OR process_name="rasphone.exe" OR process_name="rdpclip.exe" OR process_name="rdpinput.exe" OR process_name="rdrleakdiag.exe" OR process_name="recdisc.exe" OR process_name="recover.exe" OR process_name="reg.exe" OR process_name="regedt32.exe" OR process_name="regini.exe" OR process_name="regsvr32.exe" OR process_name="rekeywiz.exe" OR process_name="relog.exe" OR process_name="repair-bde.exe" OR process_name="replace.exe" OR process_name="reset.exe" OR process_name="resmon.exe" OR process_name="rmttpmvscmgrsvr.exe" OR process_name="rrinstaller.exe" OR process_name="rstrui.exe" OR process_name="runas.exe" OR process_name="rundll32.exe" OR process_name="runonce.exe" OR process_name="rwinsta.exe" OR process_name="sbunattend.exe" OR process_name="sc.exe" OR process_name="schtasks.exe" OR process_name="sdbinst.exe" OR process_name="sdchange.exe" OR process_name="sdclt.exe" OR process_name="sdiagnhost.exe" OR process_name="secinit.exe" OR process_name="services.exe" OR process_name="sessionmsg.exe" OR process_name="sethc.exe" OR process_name="setspn.exe" OR process_name="setupcl.exe" OR process_name="setupugc.exe" OR process_name="setx.exe" OR process_name="sfc.exe" OR process_name="shadow.exe" OR process_name="shrpubw.exe" OR process_name="shutdown.exe" OR process_name="sigverif.exe" OR process_name="sihost.exe" OR process_name="slui.exe" OR process_name="smss.exe" OR process_name="snmptrap.exe" OR process_name="sort.exe" OR process_name="spinstall.exe" OR process_name="spoolsv.exe" OR process_name="sppsvc.exe" OR process_name="spreview.exe" OR process_name="srdelayed.exe" OR process_name="subst.exe" OR process_name="svchost.exe" OR process_name="sxstrace.exe" OR process_name="syskey.exe" OR process_name="systeminfo.exe" OR process_name="systemreset.exe" OR process_name="systray.exe" OR process_name="tabcal.exe" OR process_name="takeown.exe" OR process_name="taskeng.exe" OR process_name="taskhost.exe" OR process_name="taskhostw.exe" OR process_name="taskkill.exe" OR process_name="tasklist.exe" OR process_name="taskmgr.exe" OR process_name="tcmsetup.exe" OR process_name="timeout.exe" OR process_name="tpmvscmgr.exe" OR process_name="tpmvscmgrsvr.exe";
$cond_6 =
| from $ssa_input
| where process_name="tracerpt.exe" OR process_name="tscon.exe" OR process_name="tsdiscon.exe" OR process_name="tskill.exe" OR process_name="typeperf.exe" OR process_name="tzsync.exe" OR process_name="tzutil.exe" OR process_name="ucsvc.exe" OR process_name="unlodctr.exe" OR process_name="unregmp2.exe" OR process_name="upnpcont.exe" OR process_name="userinit.exe" OR process_name="vds.exe" OR process_name="vdsldr.exe" OR process_name="verclsid.exe" OR process_name="verifier.exe" OR process_name="verifiergui.exe" OR process_name="vmicsvc.exe" OR process_name="vssadmin.exe" OR process_name="w32tm.exe" OR process_name="waitfor.exe" OR process_name="wbadmin.exe" OR process_name="wbengine.exe" OR process_name="wecutil.exe" OR process_name="wermgr.exe" OR process_name="wevtutil.exe" OR process_name="wextract.exe" OR process_name="where.exe" OR process_name="whoami.exe" OR process_name="wiaacmgr.exe" OR process_name="wiawow64.exe" OR process_name="wifitask.exe" OR process_name="wimserv.exe" OR process_name="wininit.exe" OR process_name="winload.exe" OR process_name="winlogon.exe" OR process_name="winresume.exe" OR process_name="winrs.exe" OR process_name="winrshost.exe" OR process_name="winver.exe" OR process_name="wisptis.exe" OR process_name="wkspbroker.exe" OR process_name="wksprt.exe" OR process_name="wlanext.exe" OR process_name="wlrmdr.exe" OR process_name="wowreg32.exe" OR process_name="wpnpinst.exe" OR process_name="wpr.exe" OR process_name="write.exe" OR process_name="wscript.exe" OR process_name="wsmprovhost.exe" OR process_name="wsqmcons.exe" OR process_name="wuapihost.exe" OR process_name="wuapp.exe" OR process_name="wuauclt.exe" OR process_name="wusa.exe" OR process_name="xcopy.exe" OR process_name="xpsrchvw.exe" OR process_name="xwizard.exe";
| from $cond_1
| union $cond_2
| union $cond_3
| union $cond_4
| union $cond_5
| union $cond_6
| where process_path!="c:\\windows\\system32" AND process_path!="c:\\windows\\syswow64"
| eval start_time = timestamp, end_time = timestamp, entities = mvappend(device, user), body = "TBD"
| into write_ssa_detected_events();
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#Windows_Defense_Evasion_Tactics|Windows Defense Evasion Tactics]]
====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====
''version'': 1
----
===System processes run from unexpected locations===
This search looks for system processes that normally run out of C:\Windows\System32\ or C:\Windows\SysWOW64 that are not run from that location. This can indicate a malicious process that is trying to hide as a legitimate process.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1036.003/ T1036.003]
* '''Last Updated''': 2020-12-08
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes where Processes.process_path !="C:\\Windows\\System32*" Processes.process_path !="C:\\Windows\\SysWOW64*" by Processes.user Processes.dest Processes.process_name Processes.process_id Processes.process_path Processes.parent_process_name Processes.process_hash
| `drop_dm_object_name("Processes")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `is_windows_system_file`
| `system_processes_run_from_unexpected_locations_filter`
====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]]
====How To Implement====
To successfully implement this search you need to ingest details about process execution from your hosts. Specifically, this search requires the process name and the full path to the process executable.
====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.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'': 5
----
===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
====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="*deletejournal*" AND process="*usn*"
| `usn_journal_deletion_filter`
====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 "process" 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
----
===Unified messaging service spawning a process===
This detection identifies Microsoft Exchange Server'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 "wermgr.exe" or "WerFault.exe" 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
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process_name="umworkerprocess.exe" OR Processes.parent_process_name="UMService.exe" (Processes.process_name!="wermgr.exe" OR Processes.process_name!="werfault.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)`
| `unified_messaging_service_spawning_a_process_filter`
====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
----
===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]
* '''Last Updated''': 2020-07-22
====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("Processes")`
| `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
====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 "process" 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
|}
====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
----
===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''': UEBA for Security Cloud
* '''Datamodel''':
* '''ATT&CK''':
* '''Last Updated''': 2020-10-06
====Search====
| from read_ssa_enriched_events()
| eval timestamp=parse_long(ucast(map_get(input_event, "_time"), "string", null))
| eval cmd_line=ucast(map_get(input_event, "process"), "string", null), dest_user_id=ucast(map_get(input_event, "dest_user_id"), "string", null), dest_device_id=ucast(map_get(input_event, "dest_device_id"), "string", null), process_name=ucast(map_get(input_event, "process_name"), "string", null)
| where cmd_line!=null and dest_user_id!=null
| eval cmd_line_norm=replace(cast(cmd_line, "string"), /\s(--?\w+)
|(\/\w+)/, " ARG"), cmd_line_norm=replace(cmd_line_norm, /\w:\\[^\s]+/, "PATH"), cmd_line_norm=replace(cmd_line_norm, /\d+/, "N"), input=parse_double(len(coalesce(cmd_line_norm, "")))
| select timestamp, process_name, dest_device_id, dest_user_id, cmd_line, input
| adaptive_threshold algorithm="quantile" entity="process_name" window=60480000
| where label AND quantile>0.99
| first_time_event input_columns=["dest_device_id", "cmd_line"]
| where first_time_dest_device_id_cmd_line
| eval start_time = timestamp, end_time = timestamp, entities = mvappend(dest_device_id, dest_user_id), body = "TBD"
| into write_ssa_detected_events();
====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
----
===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
====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)
| 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 > ((threshold*stdevperhost) + avgperhost)
====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
----
===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
====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 "IsOutlier(processlen)" as isOutlier
| search isOutlier > 0
| table firstTime lastTime user dest process_name process processlen count
| `unusually_long_command_line___mltk_filter`
====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 "process" field in the Endpoint data model. In addition, MLTK version >= 4.2 must be installed on your search heads, along with any required dependencies. Finally, the support search "Baseline of Command Line Length - MLTK" 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
----
===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.003/ T1505.003]
* '''Last Updated''': 2021-03-03
====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 Processes.process_name=cmd.exe OR Processes.process_name=powershell.exe by Processes.dest Processes.parent_process Processes.user
| `drop_dm_object_name(Processes)`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `w3wp_spawning_shell_filter`
====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.
====Required field====
* _time
* Processes.process_name
* Processes.process
* Processes.dest
* Processes.user
* Processes.parent_process
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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/
====Test Dataset====
* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1505.003/windows-sysmon.log
''version'': 1
----
===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
====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="*delete*" AND (Processes.process="*catalog*" OR Processes.process="*systemstatebackup*") 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`
====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
----
===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
====Search====
`wmi` EventCode=5861 Binding
| rex field=Message "Consumer =\s+(?[^;
|^$]+)"
| search consumer!="NTEventLogEventConsumer=\"SCM Event Log Consumer\""
| 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`
====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
----
===Wmi permanent event subscription - sysmon===
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/T1546.003/ T1546.003]
* '''Last Updated''': 2020-12-08
====Search====
`sysmon` EventCode=21
| rename host as dest
| table _time, dest, user, Operation, EventType, Query, Consumer, Filter
| `wmi_permanent_event_subscription___sysmon_filter`
====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. 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
| Persistence, Privilege Escalation
|}
====Kill Chain Phase====
* Actions on Objectives
====Known False Positives====
Although unlikely, administrators may use event subscriptions for legitimate purposes.
====Reference====
====Test Dataset====
* https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.003/atomic_red_team/windows-sysmon.log
''version'': 2
----
===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
====Search====
`wmi` EventCode=5860 Temporary
| rex field=Message "NotificationQuery =\s+(?[^;
|^$]+)"
| search query!="SELECT * FROM Win32_ProcessStartTrace WHERE ProcessName = 'wsmprovhost.exe'" AND query!="SELECT * FROM __InstanceOperationEvent WHERE TargetInstance ISA 'AntiVirusProduct' OR TargetInstance ISA 'FirewallProduct' OR TargetInstance ISA 'AntiSpywareProduct'"
| 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`
====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
----
===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
====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`
====Associated Analytic Story====
* [[Documentation:ESSOC:stories:UseCase#NOBELIUM_Group|NOBELIUM Group]]
====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
----
===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]
* '''Last Updated''': 2021-03-02
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Registry where Registry.registry_key_name="DisableAntiSpyware" AND Registry.registry_value_name="DWORD (0x00000001)" 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`
====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
|}
====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
----
===Windows event log cleared===
This search looks for Windows events that indicate one of the Windows event logs has been purged.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''':
* '''ATT&CK''': [https://attack.mitre.org/techniques/T1070.001/ T1070.001]
* '''Last Updated''': 2020-07-06
====Search====
(`wineventlog_security` (EventCode=1102 OR EventCode=1100)) OR (`wineventlog_system` EventCode=104)
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode dest
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `windows_event_log_cleared_filter`
====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.
====Required field====
* _time
* EventCode
* dest
====ATT&CK====
{|
! style="text-align:left;"| ID
! Technique
! Tactic
|-
| 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.
====Reference====
====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'': 4
----
===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
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Processes WHERE ("Processes.process_name"="net*.exe" "Processes.process"="*stop \"samss\"*") BY "Processes.dest", "Processes.user", "Processes.process"
| `drop_dm_object_name(Processes)`
| `security_content_ctime(lastTime)`
| `security_content_ctime(firstTime)`
| `windows_security_account_manager_stopped_filter`
====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
----
==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]
* '''Last Updated''': 2020-01-22
====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 "IsOutlier(query_length)" as isOutlier
| search isOutlier > 0
| sort -query_length
| table start_time end_time query record_type count src dest query_length
| `dns_query_length_outliers___mltk_filter`
====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 "Baseline of DNS Query Length - MLTK" 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 > Incident Management > Incident Review Settings > 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
|}
====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
----
===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]
* '''Last Updated''': 2021-01-18
====Search====
| tstats `security_content_summariesonly` count from datamodel=Network_Resolution by DNS.query
| `drop_dm_object_name("DNS")`
| 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>(avg+stdev*2)
| eval z_score=(query_length-avg)/stdev
| `dns_query_length_with_high_standard_deviation_filter`
====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
|}
====Kill Chain Phase====
* Command and Control
====Known False Positives====
It'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'': 3
----
===Detect arp poisoning===
By enabling Dynamic ARP Inspection as a Layer 2 Security measure on the organization'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.002/ T1557.002]
* '''Last Updated''': 2020-08-11
====Search====
`cisco_networks` facility="PM" mnemonic="ERR_DISABLE" disable_cause="arp-inspection"
| 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`
====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 "5 - notification". 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.002
| ARP Cache Poisoning
| Collection, Credential Access
|}
====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
----
===Detect ipv6 network infrastructure threats===
By enabling IPv6 First Hop Security as a Layer 2 Security measure on the organization'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.002/ T1557.002]
* '''Last Updated''': 2020-10-28
====Search====
`cisco_networks` facility="SISF" mnemonic IN ("IP_THEFT","MAC_THEFT","MAC_AND_IP_THEFT","PAK_DROP")
| 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`
====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.002
| ARP Cache Poisoning
| Collection, Credential Access
|}
====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
----
===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
====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 > 1000 by All_Traffic.src_ip All_Traffic.dest_ip
| `drop_dm_object_name("All_Traffic")`
| 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`
====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'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
----
===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]
* '''Last Updated''': 2020-07-21
====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="smb") AND NOT (All_Traffic.action="blocked" OR All_Traffic.dest_category="internal" 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("All_Traffic")`
| `security_content_ctime(start_time)`
| `security_content_ctime(end_time)`
| `detect_outbound_smb_traffic_filter`
====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
|}
====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'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
----
===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.002/ T1557.002]
* '''Last Updated''': 2020-10-28
====Search====
`cisco_networks` (facility="PM" mnemonic="ERR_DISABLE" disable_cause="psecure-violation") OR (facility="PORT_SECURITY" mnemonic="PSECURE_VIOLATION" OR mnemonic="PSECURE_VIOLATION_VLAN")
| 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`
====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 "5 - notification". 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.002
| ARP Cache Poisoning
| Collection, Credential Access
|}
====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
----
===Detect rogue dhcp server===
By enabling DHCP Snooping as a Layer 2 Security measure on the organization'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
====Search====
`cisco_networks` facility="DHCP_SNOOPING" mnemonic="DHCP_SNOOPING_UNTRUSTED_PORT"
| 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`
====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 "5 - notification". 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
| Man-in-the-Middle
| Collection, Credential Access
|}
====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
----
===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
====Search====
`zeek_ssl`
| rex field=server_name "(?(LIST
|LS
|SIZE
|LD
|CB
|CD
|EX
|ALIVE
|EXIT
|WHERE
|finito)-[A-Za-z0-9]{16}\.)"
| stats count by src_ip dest_ip server_name snicat
| where count>0
| table src_ip dest_ip server_name snicat
| `detect_snicat_sni_exfiltration_filter`
====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
----
===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]
* '''Last Updated''': 2020-10-28
====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("All_Traffic")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_software_download_to_network_device_filter`
====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'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
|}
====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
----
===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/T1498/ T1498], [https://attack.mitre.org/techniques/T1020.001/ T1020.001]
* '''Last Updated''': 2020-10-28
====Search====
`cisco_networks` (facility="MIRROR" mnemonic="ETH_SPAN_SESSION_UP") OR (facility="SPAN" mnemonic="SESSION_UP") OR (facility="SPAN" mnemonic="PKTCAP_START") OR (mnemonic="CFGLOG_LOGGEDCMD" command="monitor session*")
| 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`
====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 "5 - notification". 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
|-
| 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
----
===Detect unauthorized assets by mac address===
By populating the organization's assets within the assets_by_str.csv, we will be able to detect unauthorized devices that are trying to connect with the organization'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
====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("Network_Sessions")`
|`drop_dm_object_name("All_Sessions")`
| search NOT [
| inputlookup asset_lookup_by_str
|rename mac as dest_mac
| fields + dest_mac]
| `detect_unauthorized_assets_by_mac_address_filter`
====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
----
===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
====Search====
`stream_dns`
| spath "query_type{}"
| search "query_type{}" IN (SIG,KEY)
| spath protocol_stack
| search protocol_stack="ip:tcp:dns"
| append [search `stream_tcp` bytes_out>65000]
| `detect_windows_dns_sigred_via_splunk_stream_filter`
| stats count by flow_id
| where count>1
| fields - count
====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 ('stream:dns' and 'stream:tcp') 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
----
===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
====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>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>1
| fields - count
====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
----
===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
====Search====
`zeek_rpc` operation IN (NetrServerPasswordSet2,NetrServerReqChallenge,NetrServerAuthenticate3)
| bin span=5m _time
| stats values(operation) dc(operation) as opscount count(eval(operation=="NetrServerReqChallenge")) as challenge count(eval(operation=="NetrServerAuthenticate3")) as authcount count(eval(operation=="NetrServerPasswordSet2")) as passcount count as totalcount by _time,src_ip,dest_ip
| search opscount=3 authcount>4 passcount>0
| search `detect_zerologon_via_zeek_filter`
====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
----
===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
====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("DNS")`
| `security_content_ctime(firstTime)`
| `dynamic_dns_providers`
| `detect_hosts_connecting_to_dynamic_domain_providers_filter`
====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'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 > Incident Management > Incident Review Settings > 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
----
===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]
* '''Last Updated''': 2020-07-21
====Search====
| tstats `security_content_summariesonly` count values("DNS.query") as queries from datamodel=Network_Resolution where nodename=DNS "DNS.reply_code"!="No Error" "DNS.reply_code"!="NoError" DNS.reply_code!="unknown" NOT "DNS.query"="*.arpa" "DNS.query"="*.*" by "DNS.src","DNS.query"
| `drop_dm_object_name("DNS")`
| 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>50
| `excessive_dns_failures_filter`
====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
|}
====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
----
===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]
* '''Last Updated''': 2020-07-21
====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("All_Traffic")`
| 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 < relative_time(now(), "@d"), bytes_in, null))) as per_source_avg_bytes_in stdev(eval(if(_time < relative_time(now(), "@d"), bytes_in, null))) as per_source_stdev_bytes_in by src_ip
| eval minimum_data_samples = 4, deviation_threshold = 3
| where num_data_samples >= minimum_data_samples AND bytes_in > (avg_bytes_in + (deviation_threshold * stdev_bytes_in)) AND bytes_in > (per_source_avg_bytes_in + (deviation_threshold * per_source_stdev_bytes_in)) AND _time >= relative_time(now(), "@d")
| 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`
====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 "email_server" 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 "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" 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
|}
====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
----
===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.002/ T1498.002]
* '''Last Updated''': 2017-09-20
====Search====
| tstats `security_content_summariesonly` count from datamodel=Network_Resolution where nodename=DNS "DNS.message_type"="QUERY" "DNS.record_type"="ANY" by "DNS.dest"
| `drop_dm_object_name("DNS")`
| where count>200
| `large_volume_of_dns_any_queries_filter`
====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.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
----
===Prohibited network traffic allowed===
This search looks for network traffic defined by port and transport layer protocol in the Enterprise Security lookup table "lookup_interesting_ports", that is marked as prohibited, and has an associated 'allow' 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
====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("All_Traffic")`
| `prohibited_network_traffic_allowed_filter`
====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 'action' 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
----
===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]
* '''Last Updated''': 2020-07-21
====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("All_Traffic")`
| `protocol_or_port_mismatch_filter`
====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
|}
====Kill Chain Phase====
* Command and Control
====Known False Positives====
None identified
====Reference====
====Test Dataset====
''version'': 2
----
===Protocols passing authentication in cleartext===
This search looks for cleartext protocols at risk of leaking credentials. Currently, this consists of legacy protocols such as telnet, POP3, IMAP, and non-anonymous FTP sessions. While some of these protocols can be used over SSL, they typically run on different assigned ports in those cases.
* '''Product''': Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
* '''Datamodel''': Network_Traffic
* '''ATT&CK''':
* '''Last Updated''': 2020-11-04
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where All_Traffic.transport="tcp" AND (All_Traffic.dest_port="23" OR All_Traffic.dest_port="143" OR All_Traffic.dest_port="110" OR (All_Traffic.dest_port="21" AND All_Traffic.user != "anonymous")) 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("All_Traffic")`
| `protocols_passing_authentication_in_cleartext_filter`
====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.
====Required field====
* _time
* All_Traffic.transport
* All_Traffic.dest_port
* All_Traffic.user
* All_Traffic.src
* All_Traffic.dest
====Kill Chain Phase====
* Reconnaissance
* Actions on Objectives
====Known False Positives====
Some networks may use kerberized FTP or telnet servers, however, this is rare.
====Reference====
====Test Dataset====
''version'': 2
----
===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]
* '''Last Updated''': 2020-07-21
====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>(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`
====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
|}
====Kill Chain Phase====
* Reconnaissance
* Delivery
====Known False Positives====
RDP gateways may have unusually high amounts of traffic from all other hosts' RDP applications in the network.
====Reference====
====Test Dataset====
''version'': 2
----
===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]
* '''Last Updated''': 2020-07-07
====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("All_Traffic")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `remote_desktop_network_traffic_filter`
====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 "Identify Systems Creating Remote Desktop Traffic" to identify systems that originate the traffic and the search "Identify Systems Receiving Remote Desktop Traffic" to identify systems that receive a lot of remote desktop traffic. After identifying these systems, you will need to add the "common_rdp_source" or "common_rdp_destination" 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
|}
====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
----
===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]
* '''Last Updated''': 2020-07-22
====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("All_Traffic")`
| eventstats max(_time) as maxtime
| stats count as num_data_samples max(eval(if(_time >= relative_time(maxtime, "-70m@m"), count, null))) as count avg(eval(if(_time upperBound AND num_data_samples >=50, 1, 0)
| where isOutlier=1
| table src count
| `smb_traffic_spike_filter`
====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
|}
====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
----
===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]
* '''Last Updated''': 2020-07-22
====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, "%H")
| eval DayOfWeek=strftime(_time, "%A")
| `drop_dm_object_name(All_Traffic)`
| apply smb_pdfmodel threshold=0.001
| rename "IsOutlier(count)" as isOutlier
| search isOutlier > 0
| sort -count
| table _time src dest port count
| `smb_traffic_spike___mltk_filter`
====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 "Baseline of SMB Traffic - MLTK" 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 > Incident Management > Incident Review Settings > 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
|}
====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
----
===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.001/ T1071.001]
* '''Last Updated''': 2020-07-22
====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("All_Traffic")`
| `tor_traffic_filter`
====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 'action' 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.001
| Web Protocols
| Command and Control
|}
====Kill Chain Phase====
* Command and Control
====Known False Positives====
None at this time
====Reference====
====Test Dataset====
''version'': 2
----
===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
====Search====
`stream_http`
| eval cs_content_type_length = len(cs_content_type)
| where cs_content_type_length > 100
| table endtime src_ip dest_ip cs_content_type_length cs_content_type url
| `unusually_long_content_type_length_filter`
====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
----
==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
====Search====
`f5_bigip_rogue`
| regex _raw="(hsqldb;
|.*\\.\\.;.*)"
| search `detect_f5_tmui_rce_cve_2020_5902_filter`
====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
----
===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
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Web where (Web.http_method="GET" OR Web.http_method="HEAD") AND (Web.url="*/web-console/ServerInfo.jsp*" OR Web.url="*web-console*" OR Web.url="*jmx-console*" OR Web.url = "*invoker*") by Web.http_method, Web.url, Web.src, Web.dest
| `drop_dm_object_name("Web")`
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `detect_attackers_scanning_for_vulnerable_jboss_servers_filter`
====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's possible for legitimate HTTP requests to be made to URLs containing the suspicious paths.
====Reference====
====Test Dataset====
''version'': 1
----
===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
====Search====
| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Web where (Web.http_method="GET" OR Web.http_method="HEAD") by Web.http_method, Web.url,Web.url_length Web.src, Web.dest
| search Web.url="*jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.admin*import*" AND Web.url_length > 200
| `drop_dm_object_name("Web")`
| `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`
====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
----
===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
====Search====
| tstats `security_content_summariesonly` values(Web.url) as urls min(_time) as firstTime from datamodel=Web by Web.src
| `drop_dm_object_name("Web")`
| `security_content_ctime(firstTime)`
| `brand_abuse_web`
| `monitor_web_traffic_for_brand_abuse_filter`
====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 "ESCU - DNSTwist Domain Names", 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
----
===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
====Search====
| tstats `security_content_summariesonly` count from datamodel=Web where Web.dest_category=web_server AND (Web.url_length > 1024 OR Web.http_user_agent_length > 200) by Web.src Web.dest Web.url Web.url_length Web.http_user_agent
| `drop_dm_object_name("Web")`
| eval num_sql_cmds=mvcount(split(url, "alter%20table")) + mvcount(split(url, "between")) + mvcount(split(url, "create%20table")) + mvcount(split(url, "create%20database")) + mvcount(split(url, "create%20index")) + mvcount(split(url, "create%20view")) + mvcount(split(url, "delete")) + mvcount(split(url, "drop%20database")) + mvcount(split(url, "drop%20index")) + mvcount(split(url, "drop%20table")) + mvcount(split(url, "exists")) + mvcount(split(url, "exec")) + mvcount(split(url, "group%20by")) + mvcount(split(url, "having")) + mvcount(split(url, "insert%20into")) + mvcount(split(url, "inner%20join")) + mvcount(split(url, "left%20join")) + mvcount(split(url, "right%20join")) + mvcount(split(url, "full%20join")) + mvcount(split(url, "select")) + mvcount(split(url, "distinct")) + mvcount(split(url, "select%20top")) + mvcount(split(url, "union")) + mvcount(split(url, "xp_cmdshell")) - 24
| where num_sql_cmds > 3
| `sql_injection_with_long_urls_filter`
====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'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
----
===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
====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`
====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
----
''#############''
''# Automatically generated by doc_gen.py in https://github.com/splunk/security_content''
''# On Date: 2021-04-02 17:10:21.330169 UTC''
''# Author: Splunk Security Research''
''# Contact: research@splunk.com''
''#############''