diff --git a/src/default/analytic_stories.conf b/src/default/analytic_stories.conf index 5dcfbbc958..50fab051fb 100644 --- a/src/default/analytic_stories.conf +++ b/src/default/analytic_stories.conf @@ -199,7 +199,7 @@ category = Malware creation_date = 2019-01-29 data_models = ["Alerts", "Authentication", "Network_Traffic", "Risk", "Vulnerabilities", "Web"] description = Leverage searches that allow you to detect and investigate unusual activities that relate to the ColdRoot Remote Access Trojan that affects MacOS. An example of some of these activities are changing sensative binaries in the MacOS sub-system, detecting process names and executables associated with the RAT, detecting when a keyboard tab is installed on a MacOS machine and more. -id = bd91a2bc-d20b-4f44-a982-1bea98e86390 +id = ad7eb6e0-f06c-4781-b145-a42bd59c56e9 version = 1.0 mappings = {"mitre_attack": ["Command and Control", "Execution", "Collection", "Persistence"], "cis20": ["CIS 4", "CIS 8"], "kill_chain_phases": ["Command and Control", "Installation"], "nist": ["DE.CM", "DE.DP", "PR.PT"]} modification_date = 2019-01-29 @@ -368,7 +368,7 @@ data_models = ["Application_State", "Authentication", "Email", "Endpoint", "Netw description = Detect rarely used executables, specific registry paths that may confer malware survivability and persistence, instances where cmd.exe is used to launch script interpreters, and other indicators that the Emotet financial malware has compromised your environment. id = bb9f5ed2-916e-4364-bb6d-91c310efcf52 version = 1.0 -mappings = {"mitre_attack": ["Third-party Software", "AppInit DLLs", "Commonly Used Port", "Command-Line Interface", "Registry Run Keys / Start Folder", "Persistence", "Defense Evasion", "Execution", "Authentication Package", "Account Discovery"], "cis20": ["CIS 7", "CIS 12", "CIS 2", "CIS 3", "CIS 8"], "kill_chain_phases": ["Exploitation", "Delivery", "Installation", "Command and Control", "Actions on Objectives"], "nist": ["ID.AM", "PR.DS", "PR.IP", "PR.PT", "DE.AE", "DE.CM"]} +mappings = {"mitre_attack": ["Third-party Software", "AppInit DLLs", "Commonly Used Port", "Command-Line Interface", "Registry Run Keys / Start Folder", "Persistence", "Defense Evasion", "Execution", "Authentication Package", "Account Discovery"], "cis20": ["CIS 7", "CIS 12", "CIS 2", "CIS 3", "CIS 8"], "kill_chain_phases": ["Exploitation", "Actions on Objectives", "Delivery", "Installation", "Command and Control"], "nist": ["ID.AM", "PR.DS", "PR.IP", "PR.PT", "DE.AE", "DE.CM"]} modification_date = 2018-12-03 reference = ["https://www.us-cert.gov/ncas/alerts/TA18-201A", "https://www.first.org/resources/papers/conf2017/Advanced-Incident-Detection-and-Threat-Hunting-using-Sysmon-and-Splunk.pdf", "https://www.vkremez.com/2017/05/emotet-banking-trojan-malware-analysis.html"] providing_technologies = ["Bluecoat", "Bro", "Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Exchange", "Microsoft Windows", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -627,7 +627,7 @@ data_models = ["Application_State", "Authentication", "Endpoint", "Risk"] description = Monitor your environment for suspicious behaviors that resemble the techniques employed by the MUDCARP threat group. id = 988C59C5-0A1C-45B6-A555-0C62276E327E version = 1.0 -mappings = {"mitre_attack": ["AppInit DLLs", "Command-Line Interface", "Registry Run Keys / Start Folder", "Scripting", "Authentication Package", "Execution", "PowerShell", "Persistence"], "cis20": ["CIS 7", "CIS 3", "CIS 8"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["PR.PT", "DE.AE", "DE.CM", "PR.IP"]} +mappings = {"mitre_attack": ["AppInit DLLs", "Command-Line Interface", "Registry Run Keys / Start Folder", "Persistence", "Authentication Package", "Execution", "PowerShell", "Scripting"], "cis20": ["CIS 7", "CIS 3", "CIS 8"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["PR.PT", "DE.AE", "DE.CM", "PR.IP"]} modification_date = 2018-12-03 reference = ["https://intelgraph.idefense.com/#/node/threat_group/view/29fbec10-8cc8-4662-8362-2c24c1eeb74c", "https://intelgraph.idefense.com/#/node/intelligence_alert/view/62bb3669-9386-4264-b51a-59876cf50ffe", "http://blog.amossys.fr/badflick-is-not-so-bad.html"] providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Splunk Enterprise Security", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -698,7 +698,7 @@ data_models = ["Application_State", "Authentication", "Network_Resolution", "Net description = Detect instances of prohibited network traffic allowed in the environment, as well as protocols running on non-standard ports. Both of these types of behaviors typically violate policy and can be leveraged by attackers. id = 6d13121c-90f3-446d-8ac3-27efbbc65218 version = 1.0 -mappings = {"mitre_attack": ["Command and Control", "Exfiltration Over Command and Control Channel", "Commonly Used Port", "Exfiltration Over Alternative Protocol", "Exfiltration", "Defense Evasion"], "cis20": ["CIS 12", "CIS 13", "CIS 8", "CIS 9"], "kill_chain_phases": ["Command and Control", "Delivery", "Actions on Objectives"], "nist": ["PR.PT", "DE.AE", "DE.CM", "PR.AC", "PR.DS"]} +mappings = {"mitre_attack": ["Command and Control", "Exfiltration Over Command and Control Channel", "Commonly Used Port", "Exfiltration Over Alternative Protocol", "Exfiltration", "Defense Evasion"], "cis20": ["CIS 12", "CIS 13", "CIS 8", "CIS 9"], "kill_chain_phases": ["Command and Control", "Actions on Objectives", "Delivery"], "nist": ["PR.PT", "DE.AE", "DE.CM", "PR.AC", "PR.DS"]} modification_date = 2018-07-24 reference = ["http://www.novetta.com/2015/02/advanced-methods-to-detect-advanced-cyber-attacks-protocol-abuse/"] providing_technologies = ["Bluecoat", "Bro", "Linux", "Microsoft Windows", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream", "macOS"] diff --git a/src/default/analyticstories.conf b/src/default/analyticstories.conf index c3b38dc0f8..a5c551371b 100644 --- a/src/default/analyticstories.conf +++ b/src/default/analyticstories.conf @@ -1085,14 +1085,15 @@ known_false_positives = None at this time providing_technologies = ["Netbackup"] -[savedsearch://ESCU - Get Logon Rights Modifications For Endpoint] -type = investigative -explanation = none -how_to_implement = To successfully implement this search you must be ingesting your Windows event logs -known_false_positives = None at this time -providing_technologies = ["Microsoft Windows"] -earliest_time_offset = 86400 -latest_time_offset = 86400 +[savedsearch://ESCU - Detect API activity from users without MFA - Rule] +type = detection +asset_type = AWS Instance +confidence = medium +explanation = In this search, we query CloudTrail logs and specifically look for events where the multi factor authentication context of the user's session is false which basically means, that the user does not have MFA enabled on AWS. We then filter out all the known AWS service accounts since service accounts typically do not have MFA enabled. The search then creates a table of the first and last time a user without MFA was detected, the values and count of the API calls made, the type of user identity, ARN and the name of the user. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Leverage the support search `Create a list of approved AWS service accounts`: run it once every 30 days to create a list of service accounts and validate them. +annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 16"], "nist": ["DE.DP", "PR.AC"]} +known_false_positives = Many service accounts configured within an AWS infrastructure do not have multi factor authentication enabled. Please ignore the service accounts, if triggered and instead add them to the aws_service_accounts.csv file to fine tune the detection. It is also possible that the search detects users in your environment using Single Sign-On systems, since the MFA is not handled by AWS. +providing_technologies = ["AWS"] [savedsearch://ESCU - Baseline of Security Group Activity by ARN] @@ -1208,15 +1209,15 @@ known_false_positives = The false-positive rate may vary based on the values of` providing_technologies = ["AWS"] -[savedsearch://ESCU - Batch File Write to System32 - Rule] +[savedsearch://ESCU - Malicious PowerShell Process - Connect To Internet With Hidden Window - Rule] type = detection asset_type = Endpoint -confidence = high -explanation = This search looks at file modifications across your hosts, as well as for evidence of batch files being written to paths that include "system32." This activity is consistent with some SamSam attacks and is, in general, suspicious. -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. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -known_false_positives = It is possible for this search to generate a notable event for a batch file write to a path that includes the string "system32", but is not the actual Windows system directory. As such, you should confirm the path of the batch file identified by the search. In addition, a false positive may be generated by an administrator copying a legitimate batch file in this directory tree. You should confirm that the activity is legitimate and modify the search to add exclusions, as necessary. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +confidence = medium +explanation = This search looks for PowerShell processes running with specific command-line arguments that indicate that the process will download a file from the Internet without display anything to the user. The search for "*-Exec*" is to check and see if the default execution policy for PowerShell is being overridden on the command-line. The search for "*-WindowStyle*" and "*hidden*" are to see if the window that would normally be displayed will be hidden from the user instead. Finally, the search for "*New-Object*" and "*System.Net.WebClient*" are there to check to see if a PowerShell object that can be used to download files will be created. This search will return the host, the user the process ran under, the process and it's command-line arguments, the number of times it's seen this process, and the first and last times it saw this process. +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. +annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +known_false_positives = Legitimate process can have this combination of command-line options, but it's not common. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] [savedsearch://ESCU - Protocol or Port Mismatch - Rule] @@ -1273,17 +1274,6 @@ known_false_positives = Remote Desktop may be used legitimately by users on the providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Email files written outside of the Outlook directory - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = In this search, we are looking for activities consistent with an adversary collecting email data from local machines. The search will detect email files (files with .pst or .ost extensions) created in directories other than the standard Outlook directory (c:\users\username\My Documents\Outlook Files\. -how_to_implement = To successfully implement this search, you must be ingesting data that records the file-system activity from your hosts to populate the Endpoint.Filesystem data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or by other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes. -annotations = {"mitre_attack": ["Collection", "Email Collection"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"]} -known_false_positives = Administrators and users sometimes prefer backing up their email data by moving the email files into a different folder. These attempts will be detected by the search. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] - - [savedsearch://ESCU - Detect New Local Admin account - Rule] type = detection asset_type = Windows @@ -1350,6 +1340,17 @@ known_false_positives = It's possible for legitimate HTTP requests to be made to providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] +[savedsearch://ESCU - SMB Traffic Spike - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = Server Message Block (SMB) traffic, a protocol used for Windows file sharing-activity, is often leveraged by attackers. One example of SMB abuse was the WannaCry ransomware, which leveraged a vulnerability in the SMB protocol to propagate to other systems. Attackers have also used SMB for lateral movement with a target environment and to test credentials against target systems. While SMB is highly prevalent in Windows environments, a spike in SMB traffic may still be indicative of this type of malicious activity. This search looks for a traffic spike in SMB traffic from a particular system. If such a spike is detected, you may want to investigate the source and analyze the cause of the abnormal traffic. +how_to_implement = This search requires you to be ingesting your network traffic logs and populating the `Network_Traffic` data model. +annotations = {"mitre_attack": ["Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +known_false_positives = A file server may experience high-demand loads that could cause this analytic to trigger. +providing_technologies = ["Bro", "Splunk Stream"] + + [savedsearch://ESCU - Samsam Test File Write - Rule] type = detection asset_type = Endpoint @@ -1404,15 +1405,15 @@ known_false_positives = The activity may be legitimate. PowerShell is often used providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - Prohibited Network Traffic Allowed - Rule] +[savedsearch://ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] type = detection asset_type = Endpoint confidence = medium -explanation = The search looks for traffic marked 'is_prohibited' in the Enterprise Security lookup table 'interesting_ports_lookup', and then determines if any network devices have an associated 'allow' action on that traffic by checking the Network_Traffic data model. -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. -annotations = {"mitre_attack": ["Command and Control", "Commonly Used Port", "Exfiltration", "Exfiltration Over Alternative Protocol"], "kill_chain_phases": ["Delivery", "Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE", "PR.AC"]} -known_false_positives = None identified -providing_technologies = ["Palo Alto Firewall", "Bro", "Splunk Stream"] +explanation = Obtaining access to the Command-Line Interface (CLI) is typically a primary attacker goal. Once an attacker has obtained the ability to execute code on a target system, they will often further manipulate the system via commands passed to the CLI. It is also unusual for many applications to spawn a command shell during normal operation, while it is often observed if an application has been compromised in some way. As such, it is often beneficial to look for cmd.exe being executed by processes that are often targeted for exploitation, or that would not spawn cmd.exe in any other circumstances. A lookup file is provided to easily modify the processes that are being watched for execution of cmd.exe. +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. +annotations = {"mitre_attack": ["Execution", "Command-Line Interface"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +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. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] [savedsearch://ESCU - Detect Unauthorized Assets by MAC address - Rule] @@ -1437,26 +1438,24 @@ known_false_positives = It is possible that your vulnerability scanner is not de providing_technologies = ["Nessus", "Qualys"] -[savedsearch://ESCU - Malicious PowerShell Process With Obfuscation Techniques - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = This search looks for PowerShell processes that are passing command-line arguments with unusual characters (backticks and carets) that are PowerShell specific escape characters. Attackers use this obfuscation technique since it does not affect the functionality of PowerShell and it will bypass standard security controls that look for straight up malicious strings and commands. The search counts the occurrence of these obfuscation characters and lists out destination IPs running these PowerShell commands. -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. -annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} -known_false_positives = These characters might be legitimately on the command-line, but it is not common. +[savedsearch://ESCU - Get Notable History] +type = contextual +explanation = none +how_to_implement = If you are using Enterprise Security you are likely already creating notable events with your correlation rules. No additional configuration is necessary. +known_false_positives = None at this time +providing_technologies = ["Splunk Enterprise Security"] +earliest_time_offset = 864000 +latest_time_offset = 86400 + + +[savedsearch://ESCU - Get Parent Process Info] +type = investigative +explanation = none +how_to_implement = To successfully implement this search you must be ingesting endpoint data via Microsoft-Windows-Sysmon and extract the Image and Parent Image field. +known_false_positives = None at this time providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] - - -[savedsearch://ESCU - EC2 Instance Started With Previously Unseen AMI - Rule] -type = detection -asset_type = AWS Instance -confidence = medium -explanation = The subsearch returns the AMI image ID of all successful EC2 instance launches within the last hour and then appends the historical data from the lookup file to those results. It then recalculates the earliest and latest seen time field for each AMI image ID and returns only those AMI image IDs that have first been seen in the past hour. This is combined with the main search to return the time, user, and instance id of those systems. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen EC2 AMIs" support search once to create a history of previously seen AMIs. -annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -known_false_positives = After a new AMI is created, the first systems created with that AMI will cause this alert to fire. Verify that the AMI being used was created by a legitimate user. -providing_technologies = ["AWS"] +earliest_time_offset = 0 +latest_time_offset = 86400 [savedsearch://ESCU - Processes launching netsh - Rule] @@ -1481,15 +1480,15 @@ known_false_positives = Some of these processes may be used legitimately on web providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Large Volume of DNS ANY Queries - Rule] +[savedsearch://ESCU - Shim Database File Creation - Rule] type = detection -asset_type = DNS Servers +asset_type = Endpoint confidence = high -explanation = This search counts the number of DNS ANY queries received in 5 minutes, and generates a Notable Event if the count exceeds a predefined threshold. The search returns the count, the first time, and the last time a DNS packet was observed with the ANY flag set. -how_to_implement = To successfully implement this search you must ensure that DNS data is populating the Network_Resolution data model. -annotations = {"kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11", "CIS 12"], "nist": ["PR.PT", "DE.AE", "PR.IP"]} -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. -providing_technologies = ["Splunk Stream", "Bro"] +explanation = This search looks for files being created in `Windows\AppPatch\Custom and Windows\AppPatch\Custom64`, the location where shim databases are installed. It will return all the files created, as well as the time of creation for the first and last file for each endpoint. +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. +annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +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. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] [savedsearch://ESCU - Previously Seen EC2 Launches By User] @@ -1541,15 +1540,12 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Suspicious writes to windows Recycle Bin - Rule] -type = detection -asset_type = Windows -confidence = medium -explanation = This search uses data on file writes captured via Sysmon to watch for writes to the Recycle Bin by processes other than explorer.exe. The search looks for event code 11 in the Sysmon events, which indicates a file-creation event. Next, it looks for files created with a path that includes the string "$Recycle.Bin" by processes other than explorer.exe, which is the process responsible for copying files to the Recycle Bin on delete. It will report the system where the activity occurred, the path to which the file was written, the process responsible for the write, and the times it first and last saw this activity. -how_to_implement = 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. -annotations = {"mitre_attack": ["Collection", "Data Staged"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} -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. -providing_technologies = ["Sysmon"] +[savedsearch://ESCU - Count of assets by category] +type = support +explanation = This search gives you the number and the names of the hosts of each host in your environment by category. It will then sort them by the count. +how_to_implement = To successfully implement this search you must first leverage the Assets and Identity framework in Enterprise Security to populate your assets_by_str.csv file which should then be mapped to the Identity_Management data model. The Identity_Management data model will contain a list of known authorized company assets. Ensure that all inventoried systems are constantly vetted and updated. +known_false_positives = None at this time +providing_technologies = ["Splunk Enterprise Security"] [savedsearch://ESCU - Suspicious File Write - Rule] @@ -1563,23 +1559,24 @@ known_false_positives = It's possible for a legitimate file to be created with t providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[savedsearch://ESCU - Detect API activity from users without MFA - Rule] -type = detection -asset_type = AWS Instance -confidence = medium -explanation = In this search, we query CloudTrail logs and specifically look for events where the multi factor authentication context of the user's session is false which basically means, that the user does not have MFA enabled on AWS. We then filter out all the known AWS service accounts since service accounts typically do not have MFA enabled. The search then creates a table of the first and last time a user without MFA was detected, the values and count of the API calls made, the type of user identity, ARN and the name of the user. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Leverage the support search `Create a list of approved AWS service accounts`: run it once every 30 days to create a list of service accounts and validate them. -annotations = {"mitre_attack": ["Execution"], "cis20": ["CIS 16"], "nist": ["DE.DP", "PR.AC"]} -known_false_positives = Many service accounts configured within an AWS infrastructure do not have multi factor authentication enabled. Please ignore the service accounts, if triggered and instead add them to the aws_service_accounts.csv file to fine tune the detection. It is also possible that the search detects users in your environment using Single Sign-On systems, since the MFA is not handled by AWS. -providing_technologies = ["AWS"] - - -[savedsearch://ESCU - Previously Seen Running Windows Services] -type = support -explanation = In this support search, we look for Windows system-event code that indicates a status change of a Windows service. It extracts both the name of the service and the action taken by the service from the logs. It keeps only services that have entered the running state. Finally, it finds the first time the service has been seen running across the enterprise and writes that file to a lookup table. -how_to_implement = While this search does not require you to adhere to Splunk CIM, you must be ingesting your Windows security-event logs for it to execute successfully. +[savedsearch://ESCU - Get Logon Rights Modifications For Endpoint] +type = investigative +explanation = none +how_to_implement = To successfully implement this search you must be ingesting your Windows event logs known_false_positives = None at this time providing_technologies = ["Microsoft Windows"] +earliest_time_offset = 86400 +latest_time_offset = 86400 + + +[savedsearch://ESCU - All backup logs for host] +type = investigative +explanation = none +how_to_implement = The successfully implement this search you must first send your backup logs to Splunk. +known_false_positives = None at this time +providing_technologies = ["Netbackup"] +earliest_time_offset = 1209600 +latest_time_offset = 0 [savedsearch://ESCU - Clients Connecting to Multiple DNS Servers - Rule] @@ -1593,6 +1590,16 @@ known_false_positives = It's possible that an enterprise has more than five DNS providing_technologies = ["Splunk Stream", "Bro"] +[savedsearch://ESCU - Get Sysmon WMI Activity for Host] +type = investigative +explanation = none +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 events for WMI activity. In addition, you must have at least version 6.0.4 of the Sysmon TA installed to properly parse the fields. +known_false_positives = None at this time +providing_technologies = ["Sysmon"] +earliest_time_offset = 7200 +latest_time_offset = 7200 + + [savedsearch://ESCU - Monitor Registry Keys for Print Monitors - Rule] type = detection asset_type = Endpoint @@ -1604,16 +1611,6 @@ known_false_positives = You will encounter noise from legitimate print-monitor r providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[savedsearch://ESCU - Get Sysmon WMI Activity for Host] -type = investigative -explanation = none -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 events for WMI activity. In addition, you must have at least version 6.0.4 of the Sysmon TA installed to properly parse the fields. -known_false_positives = None at this time -providing_technologies = ["Sysmon"] -earliest_time_offset = 7200 -latest_time_offset = 7200 - - [savedsearch://ESCU - Previously Seen AWS Regions] type = support explanation = In this support search, we create a table of the first time (earliest) and most recent time (latest) that this region has been seen in our dataset, grouped by the value `awsRegion`. We only look for those events where an instance has been started. All of these entries will be added to the `previously_seen_aws_regions.csv` lookup file, which will act like a baseline for detections. Please validate the entries of region names in the lookup file. @@ -1622,14 +1619,14 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Get User Information from Identity Table] +[savedsearch://ESCU - Get Backup Logs For Endpoint] type = contextual explanation = none -how_to_implement = To successfully implement this search you must have populated the identity table with information about your users. +how_to_implement = You must be ingesting your backup logs. known_false_positives = None at this time -providing_technologies = ["Splunk Enterprise Security"] -earliest_time_offset = 864000 -latest_time_offset = 86400 +providing_technologies = ["Netbackup"] +earliest_time_offset = 604800 +latest_time_offset = 0 [savedsearch://ESCU - Get DNS Server History for a host] @@ -1672,15 +1669,23 @@ known_false_positives = This technique may be legitimately used by administrator providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[savedsearch://ESCU - Detect malicious requests to exploit JBoss servers - Rule] +[savedsearch://ESCU - Previously Seen AWS Provisioning Activity Sources] +type = support +explanation = This search includes any event name that begins with "run" or "create," and then determines the first and last time these events were seen for each IP address that initiated the action. The search then consults a **GeoIP** database to determine the physical location of this IP address. This table outputs to a file. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. +known_false_positives = None at this time +providing_technologies = ["AWS"] + + +[savedsearch://ESCU - Abnormally High AWS Instances Launched by User - Rule] type = detection -asset_type = Web Server -confidence = high -explanation = This search looks for HTTP requests for a URL that has been used to exploit JBoss servers. -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 -annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 12", "CIS 4", "CIS 18"], "nist": ["ID.RA", "PR.PT", "PR.IP", "DE.AE", "PR.MA", "DE.CM"]} -known_false_positives = No known false positives for this detection. -providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] +asset_type = AWS Instance +confidence = medium +explanation = In this search, we query CloudTrail logs to look for events where an instance is successfully launched by a particular user. Since we want to detect a high number of instances launched within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances launched by a particular user, as well as the average and standard deviation values. Assign a `threshold_value` in the search. Start with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier 1 if the number of instances is greater than the average number of instances terminated, added to the multiplied value of threshold and standard deviation. For your reference, we then keep only the outliers and calculate the number of standard deviations away the value is from the average. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. The threshold value should be tuned to your environment. +annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["DE.DP", "DE.AE"]} +known_false_positives = Many service accounts configured within an AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify if this search alerted on a human user. +providing_technologies = ["AWS"] [savedsearch://ESCU - Email servers sending high volume traffic to hosts - Rule] @@ -1705,6 +1710,17 @@ known_false_positives = It is possible legitimate traffic can trigger this rule. providing_technologies = ["Splunk Stream", "Bro"] +[savedsearch://ESCU - Attempt To Add Certificate To Untrusted Store - Rule] +type = detection +asset_type = Endpoint +confidence = high +explanation = Attackers will often attempt to disable security tools in order to evade detection. It is also possible for end users to attempt to disable anti-virus or other security tools to circumvent restrictions they encounter while trying to execute other programs. One way malware may accomplish this is by adding the legitimate certificate used to sign the security software to the untrusted certificate store. This will cause the system to no longer trust the software signed with this certificate and disallow it from executing. This search simply looks for the execution of **certutil.exe** with the parameters `-addcert` and `disallowed`, which add a certification to the "untrusted" certificate store. +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. +annotations = {"mitre_attack": ["Defense Evasion", "Disabling Security Tools"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +known_false_positives = There may be legitimate reasons for administrators to add a certificate to the untrusted certificate store. In such cases, this will typically be done on a large number of systems. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] + + [savedsearch://ESCU - DNS Query Length With High Standard Deviation - Rule] type = detection asset_type = Endpoint @@ -1781,15 +1797,14 @@ known_false_positives = This is a strictly behavioral search, so we define "fals providing_technologies = ["AWS"] -[savedsearch://ESCU - WMI Permanent Event Subscription - Sysmon - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = Attackers are increasingly abusing Windows Management Infrastructure (WMI) for stealth, persistence, lateral movement, or just to leverage its functionality. This search looks for the creation of a WMI event subscription by watching for Sysmon event ID 21. -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. -annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation", "Persistence", "Windows Management Instrumentation Event Subscription"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} -known_false_positives = Although unlikely, administrators may use event subscriptions for legitimate purposes. -providing_technologies = ["Microsoft Windows"] +[savedsearch://ESCU - AWS Network ACL Details from ID] +type = contextual +explanation = none +how_to_implement = In order to implement this search, you must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS(version 4.4.0 or later) and configure your AWS description inputs. +known_false_positives = None at this time +providing_technologies = ["AWS"] +earliest_time_offset = 3600 +latest_time_offset = 0 [savedsearch://ESCU - System Processes Run From Unexpected Locations - Rule] @@ -1803,32 +1818,14 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - AWS Cross Account Activity From Previously Unseen Account - Rule] +[savedsearch://ESCU - Detect new user AWS Console Login - Rule] type = detection asset_type = AWS Instance confidence = medium -explanation = This search\ -\ -1. Retrieves the **AssumeRole** event\ -\ -1. Verifies that the log entry contains a value for the account ID of the requesting account\ -\ -1. Ensures that the requesting account ID does not match the account ID of the requested account\ -\ -1. Pulls in the previously seen requesting and requested account IDs\ -\ -1. Splits up and executes multiple search paths at the same.\ -\ -1. The first path determines the **firstTime** and **lastTime** entries for the cache file\ -\ -1. Outputs the data to the cache file.\ -\ -1. Creates a conditional statement that is always false (both because we don't want these values to exit the search pipeline and because we think we're clever).The second pipeline adds the **firstTime** and **lastTime** entries to search results. Next, it filters out any account pairs that haven't been seen for the first time within the last hour. The `isnotnull(_time)` will remove the entries from the cache file.\ -\ -The search finishes by gathering the data that it will display to the user. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the `Previously Seen AWS Cross Account Activity` support search only once to create the baseline of previously seen cross account activity. Thanks to Pablo Vega at Recurly for suggesting improvements to the search. -annotations = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["PR.AC", "PR.DS", "DE.AE"]} -known_false_positives = Using multiple AWS accounts and roles is perfectly valid behavior. It's suspicious when an account requests privileges of an account it hasn't before. You should validate with the account owner that this is a legitimate request. +explanation = In this search, we query CloudTrail logs to look for events that indicate that a user has attempted to log in to the AWS console and group the events using ARN value. Using the `previously_seen_users_console_logins.csv` lookup file created using the support search, we compare the ARN to all the previously seen users logging into the AWS console. The `eval` and `if` functions determine whether the earliest time we see this user ARN was seen within the last hour. The alert will be fired only when a user is seen for first time in the last hour. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the "Previously seen users in CloudTrail" support search only once to create a baseline of previously seen IAM users within the last 30 days +annotations = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.AE"]} +known_false_positives = When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate. providing_technologies = ["AWS"] @@ -1862,15 +1859,14 @@ known_false_positives = It's possible that a legitimate file could be created wi providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[savedsearch://ESCU - Detect PsExec With accepteula Flag - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = In this search, we are looking for the PsExec process with `accepteula` on the command line. -how_to_implement = To successfully implement this search, you need to be ingesting logs with the process name, command-line arguments, and parent process from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon Technology Add-on (TA). -annotations = {"mitre_attack": ["Execution", "Command-Line Interface"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -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 -providing_technologies = ["Sysmon"] +[savedsearch://ESCU - Get EC2 Instance Details by instanceId] +type = contextual +explanation = none +how_to_implement = In order to implement this search, you must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS(version 4.4.0 or later) and configure your AWS description inputs. +known_false_positives = None at this time +providing_technologies = ["AWS"] +earliest_time_offset = 86400 +latest_time_offset = 0 [savedsearch://ESCU - Malicious PowerShell Process - Execution Policy Bypass - Rule] @@ -1958,14 +1954,15 @@ known_false_positives = None identified providing_technologies = ["Microsoft Exchange"] -[savedsearch://ESCU - Get Notable History] -type = contextual -explanation = none -how_to_implement = If you are using Enterprise Security you are likely already creating notable events with your correlation rules. No additional configuration is necessary. -known_false_positives = None at this time -providing_technologies = ["Splunk Enterprise Security"] -earliest_time_offset = 864000 -latest_time_offset = 86400 +[savedsearch://ESCU - Malicious PowerShell Process With Obfuscation Techniques - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = This search looks for PowerShell processes that are passing command-line arguments with unusual characters (backticks and carets) that are PowerShell specific escape characters. Attackers use this obfuscation technique since it does not affect the functionality of PowerShell and it will bypass standard security controls that look for straight up malicious strings and commands. The search counts the occurrence of these obfuscation characters and lists out destination IPs running these PowerShell commands. +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. +annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +known_false_positives = These characters might be legitimately on the command-line, but it is not common. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] [savedsearch://ESCU - Create a list of approved AWS service accounts] @@ -1986,23 +1983,21 @@ earliest_time_offset = 14400 latest_time_offset = 0 -[savedsearch://ESCU - All backup logs for host] +[savedsearch://ESCU - Previously Seen Running Windows Services] +type = support +explanation = In this support search, we look for Windows system-event code that indicates a status change of a Windows service. It extracts both the name of the service and the action taken by the service from the logs. It keeps only services that have entered the running state. Finally, it finds the first time the service has been seen running across the enterprise and writes that file to a lookup table. +how_to_implement = While this search does not require you to adhere to Splunk CIM, you must be ingesting your Windows security-event logs for it to execute successfully. +known_false_positives = None at this time +providing_technologies = ["Microsoft Windows"] + + +[savedsearch://ESCU - Get All AWS Activity From Region] type = investigative explanation = none -how_to_implement = The successfully implement this search you must first send your backup logs to Splunk. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. known_false_positives = None at this time -providing_technologies = ["Netbackup"] -earliest_time_offset = 1209600 -latest_time_offset = 0 - - -[savedsearch://ESCU - Get Backup Logs For Endpoint] -type = contextual -explanation = none -how_to_implement = You must be ingesting your backup logs. -known_false_positives = None at this time -providing_technologies = ["Netbackup"] -earliest_time_offset = 604800 +providing_technologies = ["AWS"] +earliest_time_offset = 14400 latest_time_offset = 0 @@ -2017,17 +2012,6 @@ known_false_positives = Some legitimate printer-related processes may show up as providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Malicious PowerShell Process - Connect To Internet With Hidden Window - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = This search looks for PowerShell processes running with specific command-line arguments that indicate that the process will download a file from the Internet without display anything to the user. The search for "*-Exec*" is to check and see if the default execution policy for PowerShell is being overridden on the command-line. The search for "*-WindowStyle*" and "*hidden*" are to see if the window that would normally be displayed will be hidden from the user instead. Finally, the search for "*New-Object*" and "*System.Net.WebClient*" are there to check to see if a PowerShell object that can be used to download files will be created. This search will return the host, the user the process ran under, the process and it's command-line arguments, the number of times it's seen this process, and the first and last times it saw this process. -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. -annotations = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} -known_false_positives = Legitimate process can have this combination of command-line options, but it's not common. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] - - [savedsearch://ESCU - Get Process responsible for the DNS traffic] type = investigative explanation = none @@ -2079,37 +2063,14 @@ known_false_positives = None identified providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - Detect Spike in AWS API Activity - Rule] -type = detection -asset_type = AWS Instance -confidence = medium -explanation = This search and its corresponding subsearch run through a series of steps, as per the following: \ -\ -1. Retrieves all the AWS CloudTrail log entries that have recorded AWS API calls.\ -\ -1. Kicks off a subsearch that retrieves the same data and pulls out the ARN into a more friendly format.\ -\ -1. Counts the number of API calls per ARN.\ -\ -1. Loads the cache file that contains the number of data points, the count from the latest hour, the API call average, and the standard deviation for each ARN.\ -\ -1. Drops the count from the latest hour, since it is not necessary, and merges the rest of the data with the results of the stats command. \ -\ -1. Renames `apiCalls` as `latestCount`.\ -\ -1. Calculates the new average value for each ARN with the latest count, weighting the past much more heavily than the current hour. It does the same for the standard deviation--weighting the past more heavily than the current.\ -\ -1. Updates the cache file with the latest results.\ -\ -1. Sets the minimum threshold for the number of data points and sets the number of standard deviations away from the mean it must be to be considered a spike.\ -\ -1. Makes a determination regarding whether or not the current count is a spike by checking to see if the minimum data-point threshold has been met and the count is a sufficient number of standard deviations away from the average.\ -\ -1. Filters out anything that it determines is not a spike and returns the list of ARNs to the main search. The main search subsequently gets the names of all the API calls, the number of unique API calls, and the total number of API calls for each of these ARNs. Finally, it looks up the average and standard deviation and returns both the average and the number of standard deviations the spike is from the average. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the minimum number of data points required to have a statistically significant amount of data to determine. The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. -annotations = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} -known_false_positives = -providing_technologies = ["AWS"] +[savedsearch://ESCU - Get Vulnerability Logs For Endpoint] +type = contextual +explanation = none +how_to_implement = You need to be ingesting the logs from your vulnerability scanner. +known_false_positives = None at this time +providing_technologies = ["Nessus"] +earliest_time_offset = 604800 +latest_time_offset = 0 [savedsearch://ESCU - Detect USB device insertion - Rule] @@ -2134,15 +2095,15 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Abnormally High AWS Instances Launched by User - Rule] +[savedsearch://ESCU - Detect malicious requests to exploit JBoss servers - Rule] type = detection -asset_type = AWS Instance -confidence = medium -explanation = In this search, we query CloudTrail logs to look for events where an instance is successfully launched by a particular user. Since we want to detect a high number of instances launched within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances launched by a particular user, as well as the average and standard deviation values. Assign a `threshold_value` in the search. Start with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier 1 if the number of instances is greater than the average number of instances terminated, added to the multiplied value of threshold and standard deviation. For your reference, we then keep only the outliers and calculate the number of standard deviations away the value is from the average. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. The threshold value should be tuned to your environment. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["DE.DP", "DE.AE"]} -known_false_positives = Many service accounts configured within an AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify if this search alerted on a human user. -providing_technologies = ["AWS"] +asset_type = Web Server +confidence = high +explanation = This search looks for HTTP requests for a URL that has been used to exploit JBoss servers. +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 +annotations = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 12", "CIS 4", "CIS 18"], "nist": ["ID.RA", "PR.PT", "PR.IP", "DE.AE", "PR.MA", "DE.CM"]} +known_false_positives = No known false positives for this detection. +providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] [savedsearch://ESCU - Detect Excessive User Account Lockouts - Rule] @@ -2156,13 +2117,13 @@ known_false_positives = It is possible that a legitimate user is experiencing an providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - Get Vulnerability Logs For Endpoint] -type = contextual +[savedsearch://ESCU - Get All AWS Activity From City] +type = investigative explanation = none -how_to_implement = You need to be ingesting the logs from your vulnerability scanner. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. known_false_positives = None at this time -providing_technologies = ["Nessus"] -earliest_time_offset = 604800 +providing_technologies = ["AWS"] +earliest_time_offset = 14400 latest_time_offset = 0 @@ -2187,15 +2148,15 @@ earliest_time_offset = 3600 latest_time_offset = 3600 -[savedsearch://ESCU - Windows hosts file modification - Rule] +[savedsearch://ESCU - Identify New User Accounts - Rule] type = detection -asset_type = Endpoint -confidence = high -explanation = The hosts file is present on both Windows and Linux endpoints. The purpose of the hosts file is to provide a mapping between hostnames and IP addresses, the same way DNS is used to provide such a mapping. However, the information in the hosts file takes precedence over information received via DNS and a DNS query will not be issued if the hostname of interest is found in the hosts file. As such, attackers have been observed adding entries to the host file to override any DNS resolution. For this reason, it is useful to monitor for changes to this file, which typically do not occur very often in legitimate cases. -how_to_implement = To successfully implement this search, you must be ingesting data that records the file-system activity from your hosts to populate the Endpoint.Filesystem data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or by other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes. -annotations = {"mitre_attack": ["Command and Control", "Exfiltration"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 3", "CIS 8", "CIS 12"], "nist": ["PR.IP", "PR.PT", "PR.AC", "DE.AE", "DE.CM"]} -known_false_positives = There may be legitimate reasons for system administrators to add entries to this file. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +asset_type = Domain Server +confidence = medium +explanation = Adversaries will often seek to create new user accounts as a means of maintaining access to a target environment. Using this search, we identify accounts created in the last week by comparing the start date in the Identity_Management data model against the current time. +how_to_implement = To successfully implement this search, you need to be populating the Enterprise Security Identity_Management data model in the assets and identity framework. +annotations = {"mitre_attack": ["Valid Accounts"], "cis20": ["CIS 16"], "nist": ["PR.IP"]} +known_false_positives = If the Identity_Management data model is not updated regularly, this search could give you false positive alerts. Please consider this and investigate appropriately. +providing_technologies = ["Active Directory"] [savedsearch://ESCU - Unsuccessful Netbackup backups - Rule] @@ -2272,22 +2233,25 @@ earliest_time_offset = 604800 latest_time_offset = 0 -[savedsearch://ESCU - Get Process Info] +[savedsearch://ESCU - Investigate Web Activity From Host] type = investigative explanation = none -how_to_implement = To successfully implement this search you must be ingesting endpoint data and populating the Application_State data model. +how_to_implement = To successfully implement this search you must be ingesting your web traffic and populating the Web data model. known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] +earliest_time_offset = 3600 +latest_time_offset = 3600 + + +[savedsearch://ESCU - Spike in File Writes - Rule] +type = detection +asset_type = Endpoint +confidence = low +explanation = This search calculates counts the number of file modification events per hour per host in your environment. It then takes the average and standard deviations of those numbers and displays any hosts with more than 20 events that have over four times the standard deviation more than the average number of file modifications. +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 products, 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. +annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +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. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -earliest_time_offset = 7200 -latest_time_offset = 7200 - - -[savedsearch://ESCU - Previously seen API call per user roles in CloudTrail] -type = support -explanation = In this support search, we are looking for successful API calls made by user roles within your AWS infrastructure. The intent is to create an initial baseline cache of names of the API calls per security role for the previous 30 days--including the earliest and latest times seen in our dataset--grouped by the value of user role and the name of the API call. It is also worth noting that the role of a particular user is parsed as "userName" in the CloudTrail logs. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Please validate the user role entries in `previously_seen_api_calls_from_user_roles.csv`, which is a lookup file created as a result of running this support search. -known_false_positives = None at this time -providing_technologies = ["AWS"] [savedsearch://ESCU - Detect New Open S3 buckets - Rule] @@ -2322,25 +2286,28 @@ known_false_positives = It's possible that legitimate traffic will have long URL providing_technologies = ["Splunk Stream", "Bro"] -[savedsearch://ESCU - Get Web Session Information via session_id] -type = investigative -explanation = none -how_to_implement = This search leverages data extracted from Stream:HTTP. You must configure the HTTP stream using the Splunk Stream App on your Splunk Stream deployment server. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream"] -earliest_time_offset = 3600 -latest_time_offset = 3600 +[savedsearch://ESCU - AWS Cloud Provisioning From Previously Unseen IP Address - Rule] +type = detection +asset_type = AWS Instance +confidence = medium +explanation = The subsearch returns all events with event names that start with "Run" or "Create," and then does a `GeoIP` lookup on the IP address that initiated the action within the last hour. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for each country, region, city, and IP address and outputs this data to the lookup file to update the local cache. It then calculates the `firstTime` and `lastTime` for each city. It returns only those events from IP addresses that have first been seen in the past hour. This is combined with the main search to return the time, user, IP address, city, event name, and error code from the action. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen AWS Provisioning Activity Sources" support search once to create a history of previously seen locations that have provisioned AWS resources. +annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +known_false_positives = This is a strictly behavioral search, so we define "false positive" slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you're searching within, plus what is stored in the cache feature. But while there are really no "false positives" in a traditional sense, there is definitely lots of noise.\ +\ + This search will fire any time a new IP address is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your country, there should be few false positives. If you are located in countries where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you. +providing_technologies = ["AWS"] -[savedsearch://ESCU - Execution of File With Spaces Before Extension - Rule] +[savedsearch://ESCU - Remote Desktop Network Traffic - Rule] type = detection asset_type = Endpoint confidence = medium -explanation = This search uses the endpoint data model to look for process names with at least five spaces between the file name and its extension. -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. -annotations = {"mitre_attack": ["Execution", "Persistence", "Change Default File Association"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["DE.CM", "PR.PT", "PR.IP"]} -known_false_positives = None identified. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +explanation = This search finds systems that do not commonly communicate use remote desktop. It does this by filtering out all systems that have the "common_rdp_source" or "common_rdp_destination" category applied to that system. Categories are applied to systems using the Assets and Identity framework. +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. +annotations = {"mitre_attack": ["Lateral Movement", "Remote Desktop Protocol", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 9", "CIS 16"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} +known_false_positives = Remote Desktop may be used legitimately by users on the network. +providing_technologies = ["Bro", "Splunk Stream"] [savedsearch://ESCU - Investigate Network Traffic From src_ip] @@ -2364,14 +2331,11 @@ known_false_positives = There are many legitimate applications that must execute providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[savedsearch://ESCU - EC2 Instance Modified With Previously Unseen User - Rule] -type = detection -asset_type = AWS Instance -confidence = medium -explanation = The subsearch returns the ARNs of all successful EC2 instance modifications within the last hour and then appends the historical data in the lookup file to those results. EC2 modification APIs are defined by the macro `ec2ModificationAPIs`. The search then recalculates the `firstTime` and `lastTime` field for each ARN and returns only those ARNs that have first been seen in the past hour. This is combined with the main search to return the time, user, and instance ID of those systems. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen EC2 Launches By User" support search once to create a history of previously seen ARNs. To add or remove APIs that modify an EC2 instance, edit the macro `ec2ModificationAPIs`. -annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -known_false_positives = It's possible that a new user will start to modify EC2 instances when they haven't before for any number of reasons. Verify with the user that is modifying instances that this is the intended behavior. +[savedsearch://ESCU - Baseline of Network ACL Activity by ARN] +type = support +explanation = Use this search to create a baseline for API calls related to network ACLs for the users who initiated this activity. It returns all logged API calls for network activity, pulls out the ARN that initiated each call, and collects the `eventNames` in one-hour groupings. Next, it calculates the number of API calls made per ARN per-hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points for each ARN. This table is stored in a lookup file. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. To add or remove API event names for network ACLs, edit the macro `NetworkACLEvents`. +known_false_positives = None at this time providing_technologies = ["AWS"] @@ -2420,6 +2384,17 @@ known_false_positives = Legitimate router connections may appear as new connecti providing_technologies = ["Active Directory", "Palo Alto Firewall"] +[savedsearch://ESCU - WMI Permanent Event Subscription - Sysmon - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = Attackers are increasingly abusing Windows Management Infrastructure (WMI) for stealth, persistence, lateral movement, or just to leverage its functionality. This search looks for the creation of a WMI event subscription by watching for Sysmon event ID 21. +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. +annotations = {"mitre_attack": ["Execution", "Windows Management Instrumentation", "Persistence", "Windows Management Instrumentation Event Subscription"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +known_false_positives = Although unlikely, administrators may use event subscriptions for legitimate purposes. +providing_technologies = ["Microsoft Windows"] + + [savedsearch://ESCU - File with Samsam Extension - Rule] type = detection asset_type = Endpoint @@ -2441,15 +2416,15 @@ earliest_time_offset = 86400 latest_time_offset = 0 -[savedsearch://ESCU - Detect new user AWS Console Login - Rule] +[savedsearch://ESCU - Common Ransomware Extensions - Rule] type = detection -asset_type = AWS Instance -confidence = medium -explanation = In this search, we query CloudTrail logs to look for events that indicate that a user has attempted to log in to the AWS console and group the events using ARN value. Using the `previously_seen_users_console_logins.csv` lookup file created using the support search, we compare the ARN to all the previously seen users logging into the AWS console. The `eval` and `if` functions determine whether the earliest time we see this user ARN was seen within the last hour. The alert will be fired only when a user is seen for first time in the last hour. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the "Previously seen users in CloudTrail" support search only once to create a baseline of previously seen IAM users within the last 30 days -annotations = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.AE"]} -known_false_positives = When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate. -providing_technologies = ["AWS"] +asset_type = Endpoint +confidence = high +explanation = This search looks at file modifications across your hosts and identifies files with extensions that are commonly associated with the encrypted files generated by 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. +annotations = {"mitre_attack": [], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +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. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] [savedsearch://ESCU - EC2 Instance Started With Previously Unseen User - Rule] @@ -2463,14 +2438,6 @@ known_false_positives = It's possible that a user will start to create EC2 insta providing_technologies = ["AWS"] -[savedsearch://ESCU - Identify Systems Using Remote Desktop] -type = support -explanation = This search counts the numbers of times the remote desktop process, mstsc.exe, has run on each system. It does this by looking for the process in the Application_State data model. -how_to_implement = To successfully implement this search you must be ingesting endpoint data that records process activity. -known_false_positives = None at this time -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] - - [savedsearch://ESCU - Previously seen command line arguments] type = support explanation = In this support search, we look for command-line arguments using the parameter `/c` to execute processes and create an initial baseline cache for the previous 30 days. This will include the earliest and latest times a particular command-line argument is seen in our dataset, grouped by the command-line value. @@ -2501,6 +2468,16 @@ known_false_positives = There are many legitimate applications that leverage shi providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +[savedsearch://ESCU - Get User Information from Identity Table] +type = contextual +explanation = none +how_to_implement = To successfully implement this search you must have populated the identity table with information about your users. +known_false_positives = None at this time +providing_technologies = ["Splunk Enterprise Security"] +earliest_time_offset = 864000 +latest_time_offset = 86400 + + [savedsearch://ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule] type = detection asset_type = Endpoint @@ -2522,14 +2499,6 @@ earliest_time_offset = 14400 latest_time_offset = 0 -[savedsearch://ESCU - Windows Updates Install Failures] -type = support -explanation = This search gives you the count of the number of systems that attempted and failed to install a Windows update each day. -how_to_implement = You must be ingesting your Windows Update Logs -known_false_positives = None at this time -providing_technologies = ["Microsoft Windows"] - - [savedsearch://ESCU - Script Execution via WMI - Rule] type = detection asset_type = Endpoint @@ -2552,31 +2521,25 @@ known_false_positives = It's likely that you'll find activity detected by users/ providing_technologies = ["AWS"] -[savedsearch://ESCU - Baseline of S3 Bucket deletion activity by ARN] -type = support -explanation = Use this search to create a baseline for API calls related to deleting an S3 bucket, grouped by the users who initiated this activity. It returns all logged API calls for S3 bucket-deletion activity and then pulls out the ARN that initiated each call. Next, it calculates the number of API calls made per ARN per hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points for each ARN. This table is stored in a lookup file. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. -known_false_positives = None at this time -providing_technologies = ["AWS"] - - -[savedsearch://ESCU - Baseline of Network ACL Activity by ARN] -type = support -explanation = Use this search to create a baseline for API calls related to network ACLs for the users who initiated this activity. It returns all logged API calls for network activity, pulls out the ARN that initiated each call, and collects the `eventNames` in one-hour groupings. Next, it calculates the number of API calls made per ARN per-hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points for each ARN. This table is stored in a lookup file. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. To add or remove API event names for network ACLs, edit the macro `NetworkACLEvents`. -known_false_positives = None at this time -providing_technologies = ["AWS"] - - -[savedsearch://ESCU - Schtasks scheduling job on remote system - Rule] +[savedsearch://ESCU - Web Fraud - Account Harvesting - Rule] type = detection -asset_type = Endpoint +asset_type = Account confidence = medium -explanation = The search looks for execution of schtasks.exe with parameters that indicate a task is being scheduled on a remote host. Schtasks.exe is a native windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or malicious executables on remote systems. -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. -annotations = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task", "Remote Services"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} -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. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +explanation = When a fraudster is setting the stage for a campaign, they will often create many user accounts on the website. This is a simple example of how to detect a many-account creation hosted on a Magento2 e-commerce platform, where the fraudster is using email addresses from a single email domain. +how_to_implement = We start with a dataset that provides visibility into the email address used for the account creation. In this example, we are narrowing our search down to the single web page that hosts the Magento2 e-commerce platform (via URI) used for account creation, the single http content-type to grab only the user's clicks, and the http field that provides the username (form_data), for performance reasons. After we have the username and email domain, we look for numerous account creations per email domain. Common data sources used for this detection are customized Apache logs or Splunk Stream. +annotations = {"mitre_attack": ["Create Account"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.CM", "DE.DP"]} +known_false_positives = As is common with many fraud-related searches, we are usually looking to attribute risk or synthesize relevant context with loosely written detections that simply detect anamolous behavior. This search will need to be customized to fit your environment—improving its fidelity by counting based on something much more specific, such as a device ID that may be present in your dataset. Consideration for whether the large number of registrations are occuring from a first-time seen domain may also be important. Extending the search window to look further back in time, or even calculating the average per hour/day for each email domain to look for an anomalous spikes, will improve this search. You can also use Shannon entropy or Levenshtein Distance (both courtesy of URL Toolbox) to consider the randomness or similarity of the email name or email domain, as the names are often machine-generated. +providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] + + +[savedsearch://ESCU - Get Authentication Logs For Endpoint] +type = contextual +explanation = none +how_to_implement = To successfully implement this search you need to be ingesting authentication logs from your various systems and populating the Authentication data model. +known_false_positives = None at this time +providing_technologies = ["Microsoft Windows", "Linux", "macOS"] +earliest_time_offset = 43200 +latest_time_offset = 1 [savedsearch://ESCU - Detect web traffic to dynamic domain providers - Rule] @@ -2629,15 +2592,37 @@ earliest_time_offset = 86400 latest_time_offset = 0 -[savedsearch://ESCU - Monitor Web Traffic For Brand Abuse - Rule] +[savedsearch://ESCU - Detect Spike in AWS API Activity - Rule] type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks at all the URLs an endpoint is connecting to and then checks the URL against a list of faux domains that could be indicative of brand abuse. -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. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] +asset_type = AWS Instance +confidence = medium +explanation = This search and its corresponding subsearch run through a series of steps, as per the following: \ +\ +1. Retrieves all the AWS CloudTrail log entries that have recorded AWS API calls.\ +\ +1. Kicks off a subsearch that retrieves the same data and pulls out the ARN into a more friendly format.\ +\ +1. Counts the number of API calls per ARN.\ +\ +1. Loads the cache file that contains the number of data points, the count from the latest hour, the API call average, and the standard deviation for each ARN.\ +\ +1. Drops the count from the latest hour, since it is not necessary, and merges the rest of the data with the results of the stats command. \ +\ +1. Renames `apiCalls` as `latestCount`.\ +\ +1. Calculates the new average value for each ARN with the latest count, weighting the past much more heavily than the current hour. It does the same for the standard deviation--weighting the past more heavily than the current.\ +\ +1. Updates the cache file with the latest results.\ +\ +1. Sets the minimum threshold for the number of data points and sets the number of standard deviations away from the mean it must be to be considered a spike.\ +\ +1. Makes a determination regarding whether or not the current count is a spike by checking to see if the minimum data-point threshold has been met and the count is a sufficient number of standard deviations away from the average.\ +\ +1. Filters out anything that it determines is not a spike and returns the list of ARNs to the main search. The main search subsequently gets the names of all the API calls, the number of unique API calls, and the total number of API calls for each of these ARNs. Finally, it looks up the average and standard deviation and returns both the average and the number of standard deviations the spike is from the average. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the minimum number of data points required to have a statistically significant amount of data to determine. The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. +annotations = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} +known_false_positives = +providing_technologies = ["AWS"] [savedsearch://ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule] @@ -2651,14 +2636,6 @@ known_false_positives = It is possible that an admin will create a new system us providing_technologies = ["AWS"] -[savedsearch://ESCU - Baseline of API Calls per User ARN] -type = support -explanation = This search returns all log events that are API calls, pulls out the ARN that initiated each call, and collects them in one-hour groupings. Next, it calculates the number of API calls made per ARN per hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each ARN had. This table is then stored in a lookup file. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. -known_false_positives = None at this time -providing_technologies = ["AWS"] - - [savedsearch://ESCU - Sc.exe Manipulating Windows Services - Rule] type = detection asset_type = Endpoint @@ -2712,23 +2689,26 @@ earliest_time_offset = 14400 latest_time_offset = 0 -[savedsearch://ESCU - Shim Database File Creation - Rule] +[savedsearch://ESCU - Large Volume of DNS ANY Queries - Rule] type = detection -asset_type = Endpoint +asset_type = DNS Servers confidence = high -explanation = This search looks for files being created in `Windows\AppPatch\Custom and Windows\AppPatch\Custom64`, the location where shim databases are installed. It will return all the files created, as well as the time of creation for the first and last file for each endpoint. -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. -annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} -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. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +explanation = This search counts the number of DNS ANY queries received in 5 minutes, and generates a Notable Event if the count exceeds a predefined threshold. The search returns the count, the first time, and the last time a DNS packet was observed with the ANY flag set. +how_to_implement = To successfully implement this search you must ensure that DNS data is populating the Network_Resolution data model. +annotations = {"kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11", "CIS 12"], "nist": ["PR.PT", "DE.AE", "PR.IP"]} +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. +providing_technologies = ["Splunk Stream", "Bro"] -[savedsearch://ESCU - Count of assets by category] -type = support -explanation = This search gives you the number and the names of the hosts of each host in your environment by category. It will then sort them by the count. -how_to_implement = To successfully implement this search you must first leverage the Assets and Identity framework in Enterprise Security to populate your assets_by_str.csv file which should then be mapped to the Identity_Management data model. The Identity_Management data model will contain a list of known authorized company assets. Ensure that all inventoried systems are constantly vetted and updated. -known_false_positives = None at this time -providing_technologies = ["Splunk Enterprise Security"] +[savedsearch://ESCU - Suspicious writes to windows Recycle Bin - Rule] +type = detection +asset_type = Windows +confidence = medium +explanation = This search uses data on file writes captured via Sysmon to watch for writes to the Recycle Bin by processes other than explorer.exe. The search looks for event code 11 in the Sysmon events, which indicates a file-creation event. Next, it looks for files created with a path that includes the string "$Recycle.Bin" by processes other than explorer.exe, which is the process responsible for copying files to the Recycle Bin on delete. It will report the system where the activity occurred, the path to which the file was written, the process responsible for the write, and the times it first and last saw this activity. +how_to_implement = 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. +annotations = {"mitre_attack": ["Collection", "Data Staged"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +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. +providing_technologies = ["Sysmon"] [savedsearch://ESCU - Get Email Info] @@ -2749,23 +2729,15 @@ known_false_positives = None at this time providing_technologies = ["Netbackup"] -[savedsearch://ESCU - Previously Seen AWS Provisioning Activity Sources] -type = support -explanation = This search includes any event name that begins with "run" or "create," and then determines the first and last time these events were seen for each IP address that initiated the action. The search then consults a **GeoIP** database to determine the physical location of this IP address. This table outputs to a file. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. -known_false_positives = None at this time -providing_technologies = ["AWS"] - - -[savedsearch://ESCU - Common Ransomware Extensions - Rule] +[savedsearch://ESCU - Detect new API calls from user roles - Rule] type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks at file modifications across your hosts and identifies files with extensions that are commonly associated with the encrypted files generated by 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. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -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. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +asset_type = AWS Instance +confidence = medium +explanation = The subsearch will execute first and return the user roles and names of the API calls completed within the last hour, where the type of user identity is `AssumedRole`. It then appends the historical data to those results in the lookup file. Next, it recalculates the `earliest` and `latest` fields for each user role, as well as the name of the API call, and returns only those roles and API calls that have first been seen in the past hour. This is combined with the main search to return the values of API calls, name of the user role, and the earliest and latest time of this activity. It is worth noting that the name of the role of a particular user is parsed as "userName" in the CloudTrail logs. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously seen API call per user roles in CloudTrail" support search once to create a history of previously seen user roles. +annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +known_false_positives = It is possible that there are legitimate user roles making new or infrequently used API calls in your infrastructure, causing the search to trigger. +providing_technologies = ["AWS"] [savedsearch://ESCU - Extended Period Without Successful Netbackup Backups - Rule] @@ -2779,24 +2751,26 @@ known_false_positives = None identified providing_technologies = ["Netbackup"] -[savedsearch://ESCU - AWS Network ACL Details from ID] -type = contextual -explanation = none -how_to_implement = In order to implement this search, you must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS(version 4.4.0 or later) and configure your AWS description inputs. -known_false_positives = None at this time -providing_technologies = ["AWS"] -earliest_time_offset = 3600 -latest_time_offset = 0 +[savedsearch://ESCU - Email files written outside of the Outlook directory - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = In this search, we are looking for activities consistent with an adversary collecting email data from local machines. The search will detect email files (files with .pst or .ost extensions) created in directories other than the standard Outlook directory (c:\users\username\My Documents\Outlook Files\. +how_to_implement = To successfully implement this search, you must be ingesting data that records the file-system activity from your hosts to populate the Endpoint.Filesystem data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or by other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes. +annotations = {"mitre_attack": ["Collection", "Email Collection"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"]} +known_false_positives = Administrators and users sometimes prefer backing up their email data by moving the email files into a different folder. These attempts will be detected by the search. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Get EC2 Instance Details by instanceId] -type = contextual -explanation = none -how_to_implement = In order to implement this search, you must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS(version 4.4.0 or later) and configure your AWS description inputs. -known_false_positives = None at this time -providing_technologies = ["AWS"] -earliest_time_offset = 86400 -latest_time_offset = 0 +[savedsearch://ESCU - Detect PsExec With accepteula Flag - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = In this search, we are looking for the PsExec process with `accepteula` on the command line. +how_to_implement = To successfully implement this search, you need to be ingesting logs with the process name, command-line arguments, and parent process from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon Technology Add-on (TA). +annotations = {"mitre_attack": ["Execution", "Command-Line Interface"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +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 +providing_technologies = ["Sysmon"] [savedsearch://ESCU - Reg.exe Manipulating Windows Services Registry Keys - Rule] @@ -2845,35 +2819,23 @@ known_false_positives = It is unusual for netsh.exe to have any child processes providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Web Fraud - Account Harvesting - Rule] -type = detection -asset_type = Account -confidence = medium -explanation = When a fraudster is setting the stage for a campaign, they will often create many user accounts on the website. This is a simple example of how to detect a many-account creation hosted on a Magento2 e-commerce platform, where the fraudster is using email addresses from a single email domain. -how_to_implement = We start with a dataset that provides visibility into the email address used for the account creation. In this example, we are narrowing our search down to the single web page that hosts the Magento2 e-commerce platform (via URI) used for account creation, the single http content-type to grab only the user's clicks, and the http field that provides the username (form_data), for performance reasons. After we have the username and email domain, we look for numerous account creations per email domain. Common data sources used for this detection are customized Apache logs or Splunk Stream. -annotations = {"mitre_attack": ["Create Account"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.CM", "DE.DP"]} -known_false_positives = As is common with many fraud-related searches, we are usually looking to attribute risk or synthesize relevant context with loosely written detections that simply detect anamolous behavior. This search will need to be customized to fit your environment—improving its fidelity by counting based on something much more specific, such as a device ID that may be present in your dataset. Consideration for whether the large number of registrations are occuring from a first-time seen domain may also be important. Extending the search window to look further back in time, or even calculating the average per hour/day for each email domain to look for an anomalous spikes, will improve this search. You can also use Shannon entropy or Levenshtein Distance (both courtesy of URL Toolbox) to consider the randomness or similarity of the email name or email domain, as the names are often machine-generated. -providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] - - -[savedsearch://ESCU - Investigate Web Activity From Host] -type = investigative -explanation = none -how_to_implement = To successfully implement this search you must be ingesting your web traffic and populating the Web data model. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -earliest_time_offset = 3600 -latest_time_offset = 3600 - - -[savedsearch://ESCU - Get All AWS Activity From City] -type = investigative -explanation = none -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. +[savedsearch://ESCU - Baseline of S3 Bucket deletion activity by ARN] +type = support +explanation = Use this search to create a baseline for API calls related to deleting an S3 bucket, grouped by the users who initiated this activity. It returns all logged API calls for S3 bucket-deletion activity and then pulls out the ARN that initiated each call. Next, it calculates the number of API calls made per ARN per hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points for each ARN. This table is stored in a lookup file. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. known_false_positives = None at this time providing_technologies = ["AWS"] -earliest_time_offset = 14400 -latest_time_offset = 0 + + +[savedsearch://ESCU - Prohibited Network Traffic Allowed - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = The search looks for traffic marked 'is_prohibited' in the Enterprise Security lookup table 'interesting_ports_lookup', and then determines if any network devices have an associated 'allow' action on that traffic by checking the Network_Traffic data model. +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. +annotations = {"mitre_attack": ["Command and Control", "Commonly Used Port", "Exfiltration", "Exfiltration Over Alternative Protocol"], "kill_chain_phases": ["Delivery", "Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE", "PR.AC"]} +known_false_positives = None identified +providing_technologies = ["Palo Alto Firewall", "Bro", "Splunk Stream"] [savedsearch://ESCU - Malicious PowerShell Process - Encoded Command - Rule] @@ -2898,27 +2860,25 @@ known_false_positives = None at this time providing_technologies = ["Microsoft Exchange", "Bro", "Splunk Stream"] -[savedsearch://ESCU - Schtasks used for forcing a reboot - Rule] +[savedsearch://ESCU - Windows Updates Install Failures] +type = support +explanation = This search gives you the count of the number of systems that attempted and failed to install a Windows update each day. +how_to_implement = You must be ingesting your Windows Update Logs +known_false_positives = None at this time +providing_technologies = ["Microsoft Windows"] + + +[savedsearch://ESCU - Schtasks scheduling job on remote system - Rule] type = detection asset_type = Endpoint confidence = medium -explanation = The search looks for execution of schtasks.exe with parameters that indicate a task is being scheduled that would cause a forced reboot on the host. Schtasks.exe is a native windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or establish persistence. This tactic is leveraged by the Bad Rabbit Ransomware. +explanation = The search looks for execution of schtasks.exe with parameters that indicate a task is being scheduled on a remote host. Schtasks.exe is a native windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or malicious executables on remote systems. 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. -annotations = {"mitre_attack": ["Persistence", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} -known_false_positives = Administrators may create jobs on systems forcing reboots to perform updates, maintenance, etc. +annotations = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task", "Remote Services"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +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. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Get Authentication Logs For Endpoint] -type = contextual -explanation = none -how_to_implement = To successfully implement this search you need to be ingesting authentication logs from your various systems and populating the Authentication data model. -known_false_positives = None at this time -providing_technologies = ["Microsoft Windows", "Linux", "macOS"] -earliest_time_offset = 43200 -latest_time_offset = 1 - - [savedsearch://ESCU - Single Letter Process On Endpoint - Rule] type = detection asset_type = Endpoint @@ -2941,6 +2901,16 @@ known_false_positives = Some networks may use kerberized FTP or telnet servers, providing_technologies = ["Splunk Stream", "Bro"] +[savedsearch://ESCU - Get Web Session Information via session_id] +type = investigative +explanation = none +how_to_implement = This search leverages data extracted from Stream:HTTP. You must configure the HTTP stream using the Splunk Stream App on your Splunk Stream deployment server. +known_false_positives = None at this time +providing_technologies = ["Splunk Stream"] +earliest_time_offset = 3600 +latest_time_offset = 3600 + + [savedsearch://ESCU - Attempt To Stop Security Service - Rule] type = detection asset_type = Endpoint @@ -2982,15 +2952,14 @@ known_false_positives = None at this time providing_technologies = ["Splunk Stream", "Bro"] -[savedsearch://ESCU - Remote Desktop Network Traffic - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = This search finds systems that do not commonly communicate use remote desktop. It does this by filtering out all systems that have the "common_rdp_source" or "common_rdp_destination" category applied to that system. Categories are applied to systems using the Assets and Identity framework. -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. -annotations = {"mitre_attack": ["Lateral Movement", "Remote Desktop Protocol", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 9", "CIS 16"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} -known_false_positives = Remote Desktop may be used legitimately by users on the network. -providing_technologies = ["Bro", "Splunk Stream"] +[savedsearch://ESCU - Get First Occurrence and Last Occurrence of a MAC Address] +type = contextual +explanation = none +how_to_implement = To successfully implement this search, you must be ingesting the logs from your DHCP server. +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro", "Microsoft Windows"] +earliest_time_offset = 864000 +latest_time_offset = 86400 [savedsearch://ESCU - Create local admin accounts using net.exe - Rule] @@ -3012,17 +2981,6 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Detect new API calls from user roles - Rule] -type = detection -asset_type = AWS Instance -confidence = medium -explanation = The subsearch will execute first and return the user roles and names of the API calls completed within the last hour, where the type of user identity is `AssumedRole`. It then appends the historical data to those results in the lookup file. Next, it recalculates the `earliest` and `latest` fields for each user role, as well as the name of the API call, and returns only those roles and API calls that have first been seen in the past hour. This is combined with the main search to return the values of API calls, name of the user role, and the earliest and latest time of this activity. It is worth noting that the name of the role of a particular user is parsed as "userName" in the CloudTrail logs. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously seen API call per user roles in CloudTrail" support search once to create a history of previously seen user roles. -annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -known_false_positives = It is possible that there are legitimate user roles making new or infrequently used API calls in your infrastructure, causing the search to trigger. -providing_technologies = ["AWS"] - - [savedsearch://ESCU - Detection of tools built by NirSoft - Rule] type = detection asset_type = Endpoint @@ -3044,6 +3002,17 @@ earliest_time_offset = 14400 latest_time_offset = 0 +[savedsearch://ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule] +type = detection +asset_type = Endpoint +confidence = High +explanation = This search looks for the process reg.exe with the "save" parameter, which specifies a binary export from the registry. In addition, it looks for the keys that contain the hashed credentials, which attackers may retrieve and use for brute-force attacks in order to harvest legitimate credentials. +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. +annotations = {"mitre_attack": ["Credential Access", "Credential Dumping"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.IP", "PR.AC", "DE.CM"]} +known_false_positives = None identified. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] + + [savedsearch://ESCU - Systems Ready for Spectre-Meltdown Windows Patch] type = support explanation = This search looks to see if a registry key was created at `HKLM\Software\Microsoft\Windows\CurrentVersion\QualityCompat`. It will tell you when it was created and, if possible, what process created it. @@ -3062,15 +3031,33 @@ earliest_time_offset = 7200 latest_time_offset = 0 -[savedsearch://ESCU - Attempt To Add Certificate To Untrusted Store - Rule] +[savedsearch://ESCU - AWS Cross Account Activity From Previously Unseen Account - Rule] type = detection -asset_type = Endpoint -confidence = high -explanation = Attackers will often attempt to disable security tools in order to evade detection. It is also possible for end users to attempt to disable anti-virus or other security tools to circumvent restrictions they encounter while trying to execute other programs. One way malware may accomplish this is by adding the legitimate certificate used to sign the security software to the untrusted certificate store. This will cause the system to no longer trust the software signed with this certificate and disallow it from executing. This search simply looks for the execution of **certutil.exe** with the parameters `-addcert` and `disallowed`, which add a certification to the "untrusted" certificate store. -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. -annotations = {"mitre_attack": ["Defense Evasion", "Disabling Security Tools"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} -known_false_positives = There may be legitimate reasons for administrators to add a certificate to the untrusted certificate store. In such cases, this will typically be done on a large number of systems. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +asset_type = AWS Instance +confidence = medium +explanation = This search\ +\ +1. Retrieves the **AssumeRole** event\ +\ +1. Verifies that the log entry contains a value for the account ID of the requesting account\ +\ +1. Ensures that the requesting account ID does not match the account ID of the requested account\ +\ +1. Pulls in the previously seen requesting and requested account IDs\ +\ +1. Splits up and executes multiple search paths at the same.\ +\ +1. The first path determines the **firstTime** and **lastTime** entries for the cache file\ +\ +1. Outputs the data to the cache file.\ +\ +1. Creates a conditional statement that is always false (both because we don't want these values to exit the search pipeline and because we think we're clever).The second pipeline adds the **firstTime** and **lastTime** entries to search results. Next, it filters out any account pairs that haven't been seen for the first time within the last hour. The `isnotnull(_time)` will remove the entries from the cache file.\ +\ +The search finishes by gathering the data that it will display to the user. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the `Previously Seen AWS Cross Account Activity` support search only once to create the baseline of previously seen cross account activity. Thanks to Pablo Vega at Recurly for suggesting improvements to the search. +annotations = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["PR.AC", "PR.DS", "DE.AE"]} +known_false_positives = Using multiple AWS accounts and roles is perfectly valid behavior. It's suspicious when an account requests privileges of an account it hasn't before. You should validate with the account owner that this is a legitimate request. +providing_technologies = ["AWS"] [savedsearch://ESCU - Email Attachments With Lots Of Spaces - Rule] @@ -3134,12 +3121,14 @@ known_false_positives = It is likely that the outbound Server Message Block (SMB providing_technologies = ["Bro", "Splunk Stream"] -[savedsearch://ESCU - Count of Unique IPs Connecting to Ports] -type = support -explanation = For each port being accessed on the network, this search gives the total number of connections observed, and the number of unique IP addresses making those connections. -how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. +[savedsearch://ESCU - Get Process Info] +type = investigative +explanation = none +how_to_implement = To successfully implement this search you must be ingesting endpoint data and populating the Application_State data model. known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro"] +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +earliest_time_offset = 7200 +latest_time_offset = 7200 [savedsearch://ESCU - Detect Spike in Security Group Activity - Rule] @@ -3230,15 +3219,15 @@ known_false_positives = There are many legitimate applications that must execute providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[savedsearch://ESCU - SMB Traffic Spike - Rule] +[savedsearch://ESCU - Batch File Write to System32 - Rule] type = detection asset_type = Endpoint -confidence = medium -explanation = Server Message Block (SMB) traffic, a protocol used for Windows file sharing-activity, is often leveraged by attackers. One example of SMB abuse was the WannaCry ransomware, which leveraged a vulnerability in the SMB protocol to propagate to other systems. Attackers have also used SMB for lateral movement with a target environment and to test credentials against target systems. While SMB is highly prevalent in Windows environments, a spike in SMB traffic may still be indicative of this type of malicious activity. This search looks for a traffic spike in SMB traffic from a particular system. If such a spike is detected, you may want to investigate the source and analyze the cause of the abnormal traffic. -how_to_implement = This search requires you to be ingesting your network traffic logs and populating the `Network_Traffic` data model. -annotations = {"mitre_attack": ["Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} -known_false_positives = A file server may experience high-demand loads that could cause this analytic to trigger. -providing_technologies = ["Bro", "Splunk Stream"] +confidence = high +explanation = This search looks at file modifications across your hosts, as well as for evidence of batch files being written to paths that include "system32." This activity is consistent with some SamSam attacks and is, in general, suspicious. +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. +annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +known_false_positives = It is possible for this search to generate a notable event for a batch file write to a path that includes the string "system32", but is not the actual Windows system directory. As such, you should confirm the path of the batch file identified by the search. In addition, a false positive may be generated by an administrator copying a legitimate batch file in this directory tree. You should confirm that the activity is legitimate and modify the search to add exclusions, as necessary. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] [savedsearch://ESCU - AWS Investigate User Activities By AccessKeyId] @@ -3273,48 +3262,33 @@ known_false_positives = As is common with many fraud-related searches, we are us providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] -[savedsearch://ESCU - Identify New User Accounts - Rule] -type = detection -asset_type = Domain Server -confidence = medium -explanation = Adversaries will often seek to create new user accounts as a means of maintaining access to a target environment. Using this search, we identify accounts created in the last week by comparing the start date in the Identity_Management data model against the current time. -how_to_implement = To successfully implement this search, you need to be populating the Enterprise Security Identity_Management data model in the assets and identity framework. -annotations = {"mitre_attack": ["Valid Accounts"], "cis20": ["CIS 16"], "nist": ["PR.IP"]} -known_false_positives = If the Identity_Management data model is not updated regularly, this search could give you false positive alerts. Please consider this and investigate appropriately. -providing_technologies = ["Active Directory"] - - -[savedsearch://ESCU - Get First Occurrence and Last Occurrence of a MAC Address] -type = contextual -explanation = none -how_to_implement = To successfully implement this search, you must be ingesting the logs from your DHCP server. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro", "Microsoft Windows"] -earliest_time_offset = 864000 -latest_time_offset = 86400 - - -[savedsearch://ESCU - Get All AWS Activity From Region] -type = investigative -explanation = none -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. -known_false_positives = None at this time -providing_technologies = ["AWS"] -earliest_time_offset = 14400 -latest_time_offset = 0 - - -[savedsearch://ESCU - Spike in File Writes - Rule] +[savedsearch://ESCU - Windows hosts file modification - Rule] type = detection asset_type = Endpoint -confidence = low -explanation = This search calculates counts the number of file modification events per hour per host in your environment. It then takes the average and standard deviations of those numbers and displays any hosts with more than 20 events that have over four times the standard deviation more than the average number of file modifications. -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 products, 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. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} -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. +confidence = high +explanation = The hosts file is present on both Windows and Linux endpoints. The purpose of the hosts file is to provide a mapping between hostnames and IP addresses, the same way DNS is used to provide such a mapping. However, the information in the hosts file takes precedence over information received via DNS and a DNS query will not be issued if the hostname of interest is found in the hosts file. As such, attackers have been observed adding entries to the host file to override any DNS resolution. For this reason, it is useful to monitor for changes to this file, which typically do not occur very often in legitimate cases. +how_to_implement = To successfully implement this search, you must be ingesting data that records the file-system activity from your hosts to populate the Endpoint.Filesystem data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or by other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes. +annotations = {"mitre_attack": ["Command and Control", "Exfiltration"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 3", "CIS 8", "CIS 12"], "nist": ["PR.IP", "PR.PT", "PR.AC", "DE.AE", "DE.CM"]} +known_false_positives = There may be legitimate reasons for system administrators to add entries to this file. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] + + +[savedsearch://ESCU - Identify Systems Using Remote Desktop] +type = support +explanation = This search counts the numbers of times the remote desktop process, mstsc.exe, has run on each system. It does this by looking for the process in the Application_State data model. +how_to_implement = To successfully implement this search you must be ingesting endpoint data that records process activity. +known_false_positives = None at this time providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +[savedsearch://ESCU - Previously seen API call per user roles in CloudTrail] +type = support +explanation = In this support search, we are looking for successful API calls made by user roles within your AWS infrastructure. The intent is to create an initial baseline cache of names of the API calls per security role for the previous 30 days--including the earliest and latest times seen in our dataset--grouped by the value of user role and the name of the API call. It is also worth noting that the role of a particular user is parsed as "userName" in the CloudTrail logs. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Please validate the user role entries in `previously_seen_api_calls_from_user_roles.csv`, which is a lookup file created as a result of running this support search. +known_false_positives = None at this time +providing_technologies = ["AWS"] + + [savedsearch://ESCU - Uncommon Processes On Endpoint - Rule] type = detection asset_type = Endpoint @@ -3337,15 +3311,26 @@ known_false_positives = Although unlikely, administrators may use wmi to execute providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] +[savedsearch://ESCU - Monitor Web Traffic For Brand Abuse - Rule] type = detection asset_type = Endpoint +confidence = high +explanation = This search looks at all the URLs an endpoint is connecting to and then checks the URL against a list of faux domains that could be indicative of brand abuse. +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. +annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] + + +[savedsearch://ESCU - EC2 Instance Modified With Previously Unseen User - Rule] +type = detection +asset_type = AWS Instance confidence = medium -explanation = Obtaining access to the Command-Line Interface (CLI) is typically a primary attacker goal. Once an attacker has obtained the ability to execute code on a target system, they will often further manipulate the system via commands passed to the CLI. It is also unusual for many applications to spawn a command shell during normal operation, while it is often observed if an application has been compromised in some way. As such, it is often beneficial to look for cmd.exe being executed by processes that are often targeted for exploitation, or that would not spawn cmd.exe in any other circumstances. A lookup file is provided to easily modify the processes that are being watched for execution of cmd.exe. -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. -annotations = {"mitre_attack": ["Execution", "Command-Line Interface"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -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. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +explanation = The subsearch returns the ARNs of all successful EC2 instance modifications within the last hour and then appends the historical data in the lookup file to those results. EC2 modification APIs are defined by the macro `ec2ModificationAPIs`. The search then recalculates the `firstTime` and `lastTime` field for each ARN and returns only those ARNs that have first been seen in the past hour. This is combined with the main search to return the time, user, and instance ID of those systems. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen EC2 Launches By User" support search once to create a history of previously seen ARNs. To add or remove APIs that modify an EC2 instance, edit the macro `ec2ModificationAPIs`. +annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +known_false_positives = It's possible that a new user will start to modify EC2 instances when they haven't before for any number of reasons. Verify with the user that is modifying instances that this is the intended behavior. +providing_technologies = ["AWS"] [savedsearch://ESCU - Remote Process Instantiation via WMI - Rule] @@ -3359,6 +3344,17 @@ known_false_positives = The wmic.exe utility is a benign Windows application. It providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] +[savedsearch://ESCU - Schtasks used for forcing a reboot - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = The search looks for execution of schtasks.exe with parameters that indicate a task is being scheduled that would cause a forced reboot on the host. Schtasks.exe is a native windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or establish persistence. This tactic is leveraged by the Bad Rabbit 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. +annotations = {"mitre_attack": ["Persistence", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +known_false_positives = Administrators may create jobs on systems forcing reboots to perform updates, maintenance, etc. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] + + [savedsearch://ESCU - Windows Updates Install Successes] type = support explanation = This search gives you the count and name of all the systems that had a successful update applied each day @@ -3378,14 +3374,15 @@ known_false_positives = It's possible that a user has legitimately deleted a net providing_technologies = ["AWS"] -[savedsearch://ESCU - Get Parent Process Info] -type = investigative -explanation = none -how_to_implement = To successfully implement this search you must be ingesting endpoint data via Microsoft-Windows-Sysmon and extract the Image and Parent Image field. -known_false_positives = None at this time -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -earliest_time_offset = 0 -latest_time_offset = 86400 +[savedsearch://ESCU - EC2 Instance Started With Previously Unseen AMI - Rule] +type = detection +asset_type = AWS Instance +confidence = medium +explanation = The subsearch returns the AMI image ID of all successful EC2 instance launches within the last hour and then appends the historical data from the lookup file to those results. It then recalculates the earliest and latest seen time field for each AMI image ID and returns only those AMI image IDs that have first been seen in the past hour. This is combined with the main search to return the time, user, and instance id of those systems. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen EC2 AMIs" support search once to create a history of previously seen AMIs. +annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +known_false_positives = After a new AMI is created, the first systems created with that AMI will cause this alert to fire. Verify that the AMI being used was created by a legitimate user. +providing_technologies = ["AWS"] [savedsearch://ESCU - DNSTwist Domain Names] @@ -3407,15 +3404,12 @@ known_false_positives = It's possible that normal DNS traffic will exhibit this providing_technologies = ["Splunk Stream", "Bro"] -[savedsearch://ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule] -type = detection -asset_type = Endpoint -confidence = High -explanation = This search looks for the process reg.exe with the "save" parameter, which specifies a binary export from the registry. In addition, it looks for the keys that contain the hashed credentials, which attackers may retrieve and use for brute-force attacks in order to harvest legitimate credentials. -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. -annotations = {"mitre_attack": ["Credential Access", "Credential Dumping"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.IP", "PR.AC", "DE.CM"]} -known_false_positives = None identified. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +[savedsearch://ESCU - Baseline of API Calls per User ARN] +type = support +explanation = This search returns all log events that are API calls, pulls out the ARN that initiated each call, and collects them in one-hour groupings. Next, it calculates the number of API calls made per ARN per hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each ARN had. This table is then stored in a lookup file. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. +known_false_positives = None at this time +providing_technologies = ["AWS"] [savedsearch://ESCU - Unusually Long Command Line - Rule] @@ -3436,17 +3430,12 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - AWS Cloud Provisioning From Previously Unseen IP Address - Rule] -type = detection -asset_type = AWS Instance -confidence = medium -explanation = The subsearch returns all events with event names that start with "Run" or "Create," and then does a `GeoIP` lookup on the IP address that initiated the action within the last hour. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for each country, region, city, and IP address and outputs this data to the lookup file to update the local cache. It then calculates the `firstTime` and `lastTime` for each city. It returns only those events from IP addresses that have first been seen in the past hour. This is combined with the main search to return the time, user, IP address, city, event name, and error code from the action. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen AWS Provisioning Activity Sources" support search once to create a history of previously seen locations that have provisioned AWS resources. -annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -known_false_positives = This is a strictly behavioral search, so we define "false positive" slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you're searching within, plus what is stored in the cache feature. But while there are really no "false positives" in a traditional sense, there is definitely lots of noise.\ -\ - This search will fire any time a new IP address is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your country, there should be few false positives. If you are located in countries where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you. -providing_technologies = ["AWS"] +[savedsearch://ESCU - Count of Unique IPs Connecting to Ports] +type = support +explanation = For each port being accessed on the network, this search gives the total number of connections observed, and the number of unique IP addresses making those connections. +how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro"] [savedsearch://ESCU - Identify Systems Receiving Remote Desktop Traffic] @@ -3489,3 +3478,14 @@ known_false_positives = The false-positive rate will vary based on how you set t providing_technologies = ["Bro", "Splunk Stream"] +[savedsearch://ESCU - Execution of File With Spaces Before Extension - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = This search uses the endpoint data model to look for process names with at least five spaces between the file name and its extension. +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. +annotations = {"mitre_attack": ["Execution", "Persistence", "Change Default File Association"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["DE.CM", "PR.PT", "PR.IP"]} +known_false_positives = None identified. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] + + diff --git a/src/default/savedsearches.conf b/src/default/savedsearches.conf index 41fb53c8e7..405e7dc691 100644 --- a/src/default/savedsearches.conf +++ b/src/default/savedsearches.conf @@ -207,7 +207,7 @@ action.escu.full_search_name = ESCU - Get Process Information For Port Activity action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -action.escu.analytic_story = ["Ransomware", "SamSam Ransomware", "Use of Cleartext Protocols", "Prohibited Traffic Allowed or Protocol Mismatch", "Command and Control"] +action.escu.analytic_story = ["Ransomware", "Command and Control", "Use of Cleartext Protocols", "Prohibited Traffic Allowed or Protocol Mismatch", "SamSam Ransomware"] action.escu.fields_required = ["dest_port", "src"] action.escu.earliest_time_offset = 7200 action.escu.latest_time_offset = 7200 @@ -234,7 +234,7 @@ action.escu.mappings = {"mitre_attack": ["Command and Control", "Commonly Used P action.escu.known_false_positives = None at this time action.escu.search_type = detection action.escu.providing_technologies = ["Palo Alto Firewall", "Bro", "Splunk Stream"] -action.escu.analytic_story = ["Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch", "Command and Control"] +action.escu.analytic_story = ["Ransomware", "Command and Control", "Prohibited Traffic Allowed or Protocol Mismatch"] action.correlationsearch.enabled = 1 action.correlationsearch.label = TOR Traffic action.notable = 1 @@ -243,7 +243,7 @@ action.notable.param.rule_description = Network traffic accessing TOR detected f action.notable.param.rule_title = TOR Network Traffic Allowed from $src_ip$ action.notable.param.security_domain = network action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - AWS Network Interface details via resourceId\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get All AWS Activity From IP Address\n - ESCU - Get DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Get Process responsible for the DNS traffic\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Process Information For Port Activity\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src_ip @@ -284,7 +284,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "Command-Line Interface"], action.escu.known_false_positives = Some legitimate applications may exhibit this behavior. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Suspicious Command-Line Executions", "Emotet Malware (TA18-201A)"] +action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "Suspicious Command-Line Executions"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect Use of cmd.exe to Launch Script Interpreters action.notable = 1 @@ -293,7 +293,7 @@ action.notable.param.rule_description = Potentially malicious script execution d action.notable.param.rule_title = Command prompt is executing scripts on $dest$ using $process_name$ action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -354,7 +354,7 @@ action.escu.full_search_name = ESCU - Monitor Successful Backups action.escu.known_false_positives = None at this time action.escu.search_type = support action.escu.providing_technologies = ["Netbackup"] -action.escu.analytic_story = ["Ransomware", "SamSam Ransomware", "Monitor Backup Solution"] +action.escu.analytic_story = ["Ransomware", "Monitor Backup Solution", "SamSam Ransomware"] description = This search is intended to give you a feel for how often successful backups are conducted in your environment. Fluctuations in these numbers will allow you to determine when you should investigate. dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m @@ -364,28 +364,54 @@ schedule_window = auto is_visible = false search = sourcetype="netbackup_logs" "Disk/Partition backup completed successfully." | bucket _time span=1d | stats dc(COMPUTERNAME) as count values(COMPUTERNAME) as dest by _time, MESSAGE -[ESCU - Get Logon Rights Modifications For Endpoint] +[ESCU - Detect API activity from users without MFA - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-16 -action.escu.modification_date = 2017-09-12 +action.escu.creation_date = 2018-05-17 +action.escu.modification_date = 2018-05-17 +action.escu.asset_at_risk = AWS Instance action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = To successfully implement this search you must be ingesting your Windows event logs -action.escu.full_search_name = ESCU - Get Logon Rights Modifications For Endpoint -action.escu.known_false_positives = None at this time -action.escu.search_type = investigative -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Account Monitoring and Controls"] -action.escu.fields_required = ["dest"] -action.escu.earliest_time_offset = 86400 -action.escu.latest_time_offset = 86400 -description = This search allows you to retrieve any modifications to logon rights associated with a specific host. +action.escu.confidence = medium +action.escu.eli5 = In this search, we query CloudTrail logs and specifically look for events where the multi factor authentication context of the user's session is false which basically means, that the user does not have MFA enabled on AWS. We then filter out all the known AWS service accounts since service accounts typically do not have MFA enabled. The search then creates a table of the first and last time a user without MFA was detected, the values and count of the API calls made, the type of user identity, ARN and the name of the user. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Leverage the support search `Create a list of approved AWS service accounts`: run it once every 30 days to create a list of service accounts and validate them. +action.escu.full_search_name = ESCU - Detect API activity from users without MFA - Rule +action.escu.mappings = {"mitre_attack": ["Execution"], "cis20": ["CIS 16"], "nist": ["DE.DP", "PR.AC"]} +action.escu.known_false_positives = Many service accounts configured within an AWS infrastructure do not have multi factor authentication enabled. Please ignore the service accounts, if triggered and instead add them to the aws_service_accounts.csv file to fine tune the detection. It is also possible that the search detects users in your environment using Single Sign-On systems, since the MFA is not handled by AWS. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS User Monitoring"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect API activity from users without MFA +action.notable = 1 +action.notable.param.nes_fields = user +action.notable.param.rule_description = API Activity detected from $user$ without MFA enabled. +action.notable.param.rule_title = API Activity detected from $user$ without MFA enabled +action.notable.param.security_domain = network +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Investigate AWS User Activities by user field\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = user +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 30 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = user +alert.suppress.period = 84600s +cron_schedule = 0 8 * * * +description = This search looks for CloudTrail events where a user logged into the AWS account, is making API calls and has not enabled Multi Factor authentication. Multi factor authentication adds a layer of security by forcing the users to type a unique authentication code from an approved authentication device when they access AWS websites or services. AWS Best Practices recommend that you enable MFA for privileged IAM users. +dispatch.earliest_time = -1d@d +dispatch.latest_time = -10m@m disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | search sourcetype=WinEventLog:Security (EventCode=4718 OR EventCode=4717) dest=$dest$ | rename user as "Account Modified" | table _time, dest, "Account Modified", Access_Right, signature +search = sourcetype=aws:cloudtrail userIdentity.sessionContext.attributes.mfaAuthenticated=false | search NOT [| inputlookup aws_service_accounts | fields identity | rename identity as user]| stats count min(_time) as firstTime max(_time) as lastTime values(eventName) by userIdentity.arn userIdentity.type user | `ctime(firstTime)` | `ctime(lastTime)` [ESCU - Baseline of Security Group Activity by ARN] action.escu = 0 @@ -442,7 +468,7 @@ action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control"], action.escu.known_false_positives = The false-positive rate may vary based on the values of`dataPointThreshold` and `deviationThreshold`. Additionally, false positives may result when AWS administrators roll out policies enforcing network blocks, causing sudden increases in the number of blocked outbound connections. action.escu.search_type = detection action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS Traffic", "AWS Network ACL Activity", "Command and Control"] +action.escu.analytic_story = ["Command and Control", "AWS Network ACL Activity", "Suspicious AWS Traffic"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect Spike in blocked Outbound Traffic from your AWS action.notable = 1 @@ -451,7 +477,7 @@ action.notable.param.rule_description = A spike in the blocked outbound connecti action.notable.param.rule_title = Spike in blocked outbound network connections from $src_ip$ detected. action.notable.param.security_domain = network action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - AWS Network Interface details via resourceId\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get All AWS Activity From IP Address\n - ESCU - Get DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Get Process responsible for the DNS traffic\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - AWS Network Interface details via resourceId\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get All AWS Activity From IP Address\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src_ip @@ -719,44 +745,44 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail `NetworkACLEvents` [search sourcetype=aws:cloudtrail `NetworkACLEvents` | spath output=arn path=userIdentity.arn | stats count as apiCalls by arn | inputlookup network_acl_activity_baseline append=t | fields - latestCount | stats values(*) as * by arn | rename apiCalls as latestCount | eval newAvgApiCalls=avgApiCalls + (latestCount-avgApiCalls)/720 | eval newStdevApiCalls=sqrt(((pow(stdevApiCalls, 2)*719 + (latestCount-newAvgApiCalls)*(latestCount-avgApiCalls))/720)) | eval avgApiCalls=coalesce(newAvgApiCalls, avgApiCalls), stdevApiCalls=coalesce(newStdevApiCalls, stdevApiCalls), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) | table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls | outputlookup network_acl_activity_baseline | eval dataPointThreshold = 15, deviationThreshold = 3 | eval isSpike=if((latestCount > avgApiCalls+deviationThreshold*stdevApiCalls) AND numDataPoints > dataPointThreshold, 1, 0) | where isSpike=1 | rename arn as userIdentity.arn | table userIdentity.arn] | spath output=user userIdentity.arn | stats values(eventName) as eventNames, count as numberOfApiCalls, dc(eventName) as uniqueApisCalled by user -[ESCU - Batch File Write to System32 - Rule] +[ESCU - Malicious PowerShell Process - Connect To Internet With Hidden Window - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-12-14 -action.escu.modification_date = 2018-12-14 +action.escu.creation_date = 2016-09-18 +action.escu.modification_date = 2018-12-03 action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks at file modifications across your hosts, as well as for evidence of batch files being written to paths that include "system32." This activity is consistent with some SamSam attacks and is, in general, suspicious. -action.escu.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. +action.escu.confidence = medium +action.escu.eli5 = This search looks for PowerShell processes running with specific command-line arguments that indicate that the process will download a file from the Internet without display anything to the user. The search for "*-Exec*" is to check and see if the default execution policy for PowerShell is being overridden on the command-line. The search for "*-WindowStyle*" and "*hidden*" are to see if the window that would normally be displayed will be hidden from the user instead. Finally, the search for "*New-Object*" and "*System.Net.WebClient*" are there to check to see if a PowerShell object that can be used to download files will be created. This search will return the host, the user the process ran under, the process and it's command-line arguments, the number of times it's seen this process, and the first and last times it saw this process. +action.escu.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. action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Batch File Write to System32 - Rule -action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -action.escu.known_false_positives = It is possible for this search to generate a notable event for a batch file write to a path that includes the string "system32", but is not the actual Windows system directory. As such, you should confirm the path of the batch file identified by the search. In addition, a false positive may be generated by an administrator copying a legitimate batch file in this directory tree. You should confirm that the activity is legitimate and modify the search to add exclusions, as necessary. +action.escu.full_search_name = ESCU - Malicious PowerShell Process - Connect To Internet With Hidden Window - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +action.escu.known_false_positives = Legitimate process can have this combination of command-line options, but it's not common. action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["SamSam Ransomware"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Malicious PowerShell"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Batch File Write to System32 +action.correlationsearch.label = Malicious PowerShell Process - Connect To Internet With Hidden Window action.notable = 1 -action.notable.param.nes_fields = dest, file_name -action.notable.param.rule_description = A batch file was written to the system directory on $dest$. -action.notable.param.rule_title = Batch file write to system32 detected on $dest$ +action.notable.param.nes_fields = dest, user, process_name +action.notable.param.rule_description = The system $dest$ executed a PowerShell process that connects to the Internet with a hidden window. +action.notable.param.rule_title = Malicious PowerShell Process detected on $dest$ action.notable.param.security_domain = endpoint -action.notable.param.severity = high -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Process Info\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest action.risk.param._risk_object_type = system -action.risk.param._risk_score = 80 +action.risk.param._risk_score = 75 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest,file_name -alert.suppress.period = 14400s +alert.suppress.fields = process_name, dest +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = The search looks for a batch file (.bat) written to the Windows system directory tree. +description = 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. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -767,7 +793,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Filesystem.dest) as dest values(Filesystem.file_name) as file_name values(Filesystem.user) as user from datamodel=Endpoint.Filesystem by Filesystem.file_path | `drop_dm_object_name(Filesystem)` | `ctime(lastTime)` | `ctime(firstTime)`| rex field=file_name "(?\.[^\.]+)$" | search file_path=*system32* AND file_extension=.bat +search = | tstats `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 | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` | search process="*-Exec*" process="*-WindowStyle*" process="*hidden*" process="*New-Object*" process="*System.Net.WebClient*" [ESCU - Protocol or Port Mismatch - Rule] action.escu = 0 @@ -785,7 +811,7 @@ action.escu.mappings = {"mitre_attack": ["Command and Control", "Commonly Used P action.escu.known_false_positives = None identified action.escu.search_type = detection action.escu.providing_technologies = ["Palo Alto Firewall", "Bro", "Splunk Stream"] -action.escu.analytic_story = ["Prohibited Traffic Allowed or Protocol Mismatch", "Command and Control"] +action.escu.analytic_story = ["Command and Control", "Prohibited Traffic Allowed or Protocol Mismatch"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Protocol or Port Mismatch action.notable = 1 @@ -794,7 +820,7 @@ action.notable.param.rule_description = This search looks for network traffic on action.notable.param.rule_title = Protocol / Port Mismatch from $src_ip$ action.notable.param.security_domain = network action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - AWS Network Interface details via resourceId\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get All AWS Activity From IP Address\n - ESCU - Get DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Get Process responsible for the DNS traffic\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Process Information For Port Activity\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src_ip @@ -831,7 +857,7 @@ action.escu.full_search_name = ESCU - Get Registry Activities action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Suspicious MSHTA Activity"] +action.escu.analytic_story = ["Suspicious MSHTA Activity", "Suspicious Windows Registry Activities"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -857,7 +883,7 @@ action.escu.mappings = {"mitre_attack": ["Persistence", "Change Default File Ass action.escu.known_false_positives = There may be other processes in your environment that users may legitimately use to modify file associations. If this is the case and you are finding false positives, you can modify the search to add those processes as exceptions. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows File Extension and Association Abuse"] +action.escu.analytic_story = ["Windows File Extension and Association Abuse", "Suspicious Windows Registry Activities"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Suspicious Changes to File Associations action.notable = 1 @@ -866,7 +892,7 @@ action.notable.param.rule_description = The system $dest$ had an unusual change action.notable.param.rule_title = Suspicious File Association Change on $dest$ action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Registry Activities\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -990,56 +1016,6 @@ schedule_window = auto is_visible = false search = | tstats `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 | `ctime(firstTime)`| `ctime(lastTime)` | `drop_dm_object_name(Processes)` -[ESCU - Email files written outside of the Outlook directory - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-12-13 -action.escu.modification_date = 2018-11-02 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = In this search, we are looking for activities consistent with an adversary collecting email data from local machines. The search will detect email files (files with .pst or .ost extensions) created in directories other than the standard Outlook directory (c:\users\username\My Documents\Outlook Files\. -action.escu.how_to_implement = To successfully implement this search, you must be ingesting data that records the file-system activity from your hosts to populate the Endpoint.Filesystem data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or by other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Email files written outside of the Outlook directory - Rule -action.escu.mappings = {"mitre_attack": ["Collection", "Email Collection"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"]} -action.escu.known_false_positives = Administrators and users sometimes prefer backing up their email data by moving the email files into a different folder. These attempts will be detected by the search. -action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Collection and Staging"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Email files written outside of the Outlook directory -action.notable = 1 -action.notable.param.nes_fields = dest, file_path, action, file_name -action.notable.param.rule_description = The system $dest$ has email files outside of the normal Outlook directory -action.notable.param.rule_title = Email files created or modified on $dest$ that are not in the normal Outlook directory -action.notable.param.security_domain = endpoint -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 50 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest, file_path -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = The search looks at the change-analysis data model and detects email files created outside the normal Outlook directory. -dispatch.earliest_time = -70m@m -dispatch.latest_time = -10m@m -disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | tstats `summariesonly` count values(Filesystem.file_path) as file_path min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Filesystem where (Filesystem.file_name=*.dll OR Filesystem.file_name=*.ost) Filesystem.file_path != "C:\\Users\\*\\My Documents\\Outlook Files\\*" by Filesystem.action Filesystem.process_id Filesystem.file_name Filesystem.dest | `drop_dm_object_name("Filesystem")` | `ctime(firstTime)` | `ctime(lastTime)` - [ESCU - Detect New Local Admin account - Rule] action.escu = 0 action.escu.enabled = 1 @@ -1225,7 +1201,7 @@ action.escu.mappings = {"mitre_attack": ["Discovery", "System Information Discov action.escu.known_false_positives = It's possible for legitimate HTTP requests to be made to URLs containing the suspicious paths. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] -action.escu.analytic_story = ["SamSam Ransomware", "JBoss Vulnerability"] +action.escu.analytic_story = ["JBoss Vulnerability", "SamSam Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect attackers scanning for vulnerable JBoss servers action.notable = 1 @@ -1234,7 +1210,7 @@ action.notable.param.rule_description = This search looks for specific GET/HEAD action.notable.param.rule_title = Detect attackers scanning for vulnerable JBoss servers action.notable.param.security_domain = network action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -1259,6 +1235,56 @@ schedule_window = auto is_visible = false search = | tstats `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")` | `ctime(firstTime)` | `ctime(lastTime)` +[ESCU - SMB Traffic Spike - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-08-20 +action.escu.modification_date = 2017-09-10 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = Server Message Block (SMB) traffic, a protocol used for Windows file sharing-activity, is often leveraged by attackers. One example of SMB abuse was the WannaCry ransomware, which leveraged a vulnerability in the SMB protocol to propagate to other systems. Attackers have also used SMB for lateral movement with a target environment and to test credentials against target systems. While SMB is highly prevalent in Windows environments, a spike in SMB traffic may still be indicative of this type of malicious activity. This search looks for a traffic spike in SMB traffic from a particular system. If such a spike is detected, you may want to investigate the source and analyze the cause of the abnormal traffic. +action.escu.how_to_implement = This search requires you to be ingesting your network traffic logs and populating the `Network_Traffic` data model. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - SMB Traffic Spike - Rule +action.escu.mappings = {"mitre_attack": ["Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +action.escu.known_false_positives = A file server may experience high-demand loads that could cause this analytic to trigger. +action.escu.search_type = detection +action.escu.providing_technologies = ["Bro", "Splunk Stream"] +action.escu.analytic_story = ["Hidden Cobra Malware", "Ransomware", "Emotet Malware (TA18-201A)", "DHS Report TA18-074A"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = SMB Traffic Spike +action.notable = 1 +action.notable.param.nes_fields = src +action.notable.param.rule_description = There was a spike in SMB traffic from $src$. +action.notable.param.rule_title = SMB Traffic Spike from $src$ +action.notable.param.security_domain = network +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = src +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 50 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = src +alert.suppress.period = 28800s +cron_schedule = 0 * * * * +description = This search looks for spikes in the number of Server Message Block (SMB) traffic connections. +dispatch.earliest_time = -7d@d +dispatch.latest_time = -10m@m +disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | tstats `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 + [ESCU - Samsam Test File Write - Rule] action.escu = 0 action.escu.enabled = 1 @@ -1321,7 +1347,7 @@ action.escu.full_search_name = ESCU - Investigate AWS activities via region name action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "Suspicious AWS S3 Activities"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities", "Suspicious AWS EC2 Activities"] action.escu.fields_required = ["awsRegion"] action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 @@ -1480,44 +1506,44 @@ schedule_window = auto is_visible = false search = sourcetype=wineventlog:security EventCode=4703 Process_Name=*powershell.exe | rex field=Message "Enabled Privileges:\s+(?\w+)\s+Disabled Privileges:" | where privs="SeDebugPrivilege" | stats count min(_time) as firstTime max(_time) as lastTime by dest, Process_Name, privs, Process_ID, Message | rename privs as "Enabled Privilege" | rename Process_Name as process | `ctime(firstTime)`| `ctime(lastTime)` -[ESCU - Prohibited Network Traffic Allowed - Rule] +[ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-18 -action.escu.modification_date = 2017-09-11 +action.escu.creation_date = 2017-10-07 +action.escu.modification_date = 2018-11-15 action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = The search looks for traffic marked 'is_prohibited' in the Enterprise Security lookup table 'interesting_ports_lookup', and then determines if any network devices have an associated 'allow' action on that traffic by checking the Network_Traffic data model. -action.escu.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. -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Prohibited Network Traffic Allowed - Rule -action.escu.mappings = {"mitre_attack": ["Command and Control", "Commonly Used Port", "Exfiltration", "Exfiltration Over Alternative Protocol"], "kill_chain_phases": ["Delivery", "Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE", "PR.AC"]} -action.escu.known_false_positives = None identified +action.escu.eli5 = Obtaining access to the Command-Line Interface (CLI) is typically a primary attacker goal. Once an attacker has obtained the ability to execute code on a target system, they will often further manipulate the system via commands passed to the CLI. It is also unusual for many applications to spawn a command shell during normal operation, while it is often observed if an application has been compromised in some way. As such, it is often beneficial to look for cmd.exe being executed by processes that are often targeted for exploitation, or that would not spawn cmd.exe in any other circumstances. A lookup file is provided to easily modify the processes that are being watched for execution of cmd.exe. +action.escu.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. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Command-Line Interface"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +action.escu.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. action.escu.search_type = detection -action.escu.providing_technologies = ["Palo Alto Firewall", "Bro", "Splunk Stream"] -action.escu.analytic_story = ["Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch", "Command and Control"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Suspicious MSHTA Activity", "Suspicious Command-Line Executions"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Prohibited Network Traffic Allowed +action.correlationsearch.label = Detect Prohibited Applications Spawning cmd.exe action.notable = 1 -action.notable.param.nes_fields = src_ip, dest_ip -action.notable.param.rule_description = This search looks for network traffic defined by port and transport in the ES lookup table "lookup_interesting_ports", that is marked as prohibited, and yet has an 'allow' action in the Network_Traffic data model. This should help to identify areas where a network device is not properly configured. -action.notable.param.rule_title = Prohibited Network Traffic Allowed from $src_ip$ -action.notable.param.security_domain = network +action.notable.param.nes_fields = dest, process, parent_process +action.notable.param.rule_description = A prohibited application from prohibited_apps_launching_cmd.csv was leveraged to launch cmd.exe +action.notable.param.rule_title = Prohibited application($parent_process$) used to launch cmd.exe on $dest$ +action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - AWS Network Interface details via resourceId\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get All AWS Activity From IP Address\n - ESCU - Get DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Get Process responsible for the DNS traffic\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = src_ip +action.risk.param._risk_object = dest action.risk.param._risk_object_type = system -action.risk.param._risk_score = 40 +action.risk.param._risk_score = 80 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest_ip,src_ip -alert.suppress.period = 14400s +alert.suppress.fields = dest, parent_process +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = 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. +description = 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. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -1528,7 +1554,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `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 | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name("All_Traffic")` +search = | tstats `summariesonly` count values(Processes.user) as user 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 Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] [ESCU - Detect Unauthorized Assets by MAC address - Rule] action.escu = 0 @@ -1630,104 +1656,51 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` min(_time) as firstTime max(_time) as lastTime from datamodel=Vulnerabilities where Vulnerabilities.cve ="CVE-2017-5753" OR Vulnerabilities.cve ="CVE-2017-5715" OR Vulnerabilities.cve ="CVE-2017-5754" by Vulnerabilities.dest -[ESCU - Malicious PowerShell Process With Obfuscation Techniques - Rule] +[ESCU - Get Notable History] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-25 -action.escu.modification_date = 2018-12-03 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2017-03-15 +action.escu.modification_date = 2017-09-20 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search looks for PowerShell processes that are passing command-line arguments with unusual characters (backticks and carets) that are PowerShell specific escape characters. Attackers use this obfuscation technique since it does not affect the functionality of PowerShell and it will bypass standard security controls that look for straight up malicious strings and commands. The search counts the occurrence of these obfuscation characters and lists out destination IPs running these PowerShell commands. -action.escu.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. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Malicious PowerShell Process With Obfuscation Techniques - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} -action.escu.known_false_positives = These characters might be legitimately on the command-line, but it is not common. -action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Malicious PowerShell"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Malicious PowerShell Process With Obfuscation Techniques -action.notable = 1 -action.notable.param.nes_fields = dest, user, process_name, process -action.notable.param.rule_description = The system $dest$ executed a PowerShell process that has evidence of obfuscation on the command-line -action.notable.param.rule_title = PowerShell process with an obfuscation techniques detected on $dest$ -action.notable.param.security_domain = endpoint -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Process Info\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 60 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest,process_name,process -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = This search looks for PowerShell processes launched with arguments that have characters indicative of obfuscation on the command-line. -dispatch.earliest_time = -70m@m -dispatch.latest_time = -10m@m +action.escu.eli5 = none +action.escu.how_to_implement = If you are using Enterprise Security you are likely already creating notable events with your correlation rules. No additional configuration is necessary. +action.escu.full_search_name = ESCU - Get Notable History +action.escu.known_false_positives = None at this time +action.escu.search_type = contextual +action.escu.providing_technologies = ["Splunk Enterprise Security"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Collection and Staging", "Unusual Processes", "Hidden Cobra Malware", "Credential Dumping", "Data Protection", "Ransomware", "Windows Persistence Techniques", "Suspicious DNS Traffic", "Suspicious AWS S3 Activities", "ColdRoot MacOS RAT", "Windows Log Manipulation", "Splunk Enterprise Vulnerability", "Asset Tracking", "SQL Injection", "Emotet Malware (TA18-201A)", "Spectre And Meltdown Vulnerabilities", "Command and Control", "Orangeworm Attack Group", "Suspicious Emails", "DHS Report TA18-074A", "Suspicious AWS EC2 Activities", "Host Redirection", "Malicious PowerShell", "Router & Infrastructure Security", "Suspicious WMI Use", "JBoss Vulnerability", "AWS Cross Account Activity", "Windows Service Abuse", "Monitor Backup Solution", "Account Monitoring and Controls", "Use of Cleartext Protocols", "Brand Monitoring", "Disabling Security Tools", "AWS User Monitoring", "Apache Struts Vulnerability", "Lateral Movement", "Suspicious MSHTA Activity", "ColdRoot MacOS RAT", "AWS Network ACL Activity", "Monitor for Updates", "Windows Defense Evasion Tactics", "Windows File Extension and Association Abuse", "Splunk Enterprise Vulnerability CVE-2018-11409", "Prohibited Traffic Allowed or Protocol Mismatch", "Netsh Abuse", "Web Fraud Detection", "DNS Amplification Attacks", "Monitor for Unauthorized Software", "SamSam Ransomware", "Dynamic DNS", "Suspicious Command-Line Executions", "Unusual AWS EC2 Modifications", "Suspicious AWS Traffic", "Suspicious AWS Login Activities", "Suspicious Windows Registry Activities", "Windows Privilege Escalation"] +action.escu.fields_required = ["dest"] +action.escu.earliest_time_offset = 864000 +action.escu.latest_time_offset = 86400 +description = This search queries the notable index and returns all the Notable Events for the particular destination host, giving the analyst an overview of the incidents that may have occurred with the host under investigation. disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `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 | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)`| eval num_obfuscation = (mvcount(split(process, "`"))-1) + (mvcount(split(process, "^"))-1) | search num_obfuscation > 0 +search = | search `notable` | search dest=$dest$ | table _time, rule_name, owner, priority, severity, status_description -[ESCU - EC2 Instance Started With Previously Unseen AMI - Rule] +[ESCU - Get Parent Process Info] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-12 -action.escu.modification_date = 2018-03-12 -action.escu.asset_at_risk = AWS Instance +action.escu.creation_date = 2017-08-22 +action.escu.modification_date = 2017-09-10 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = The subsearch returns the AMI image ID of all successful EC2 instance launches within the last hour and then appends the historical data from the lookup file to those results. It then recalculates the earliest and latest seen time field for each AMI image ID and returns only those AMI image IDs that have first been seen in the past hour. This is combined with the main search to return the time, user, and instance id of those systems. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen EC2 AMIs" support search once to create a history of previously seen AMIs. -action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen AMI - Rule -action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.known_false_positives = After a new AMI is created, the first systems created with that AMI will cause this alert to fire. Verify that the AMI being used was created by a legitimate user. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = EC2 Instance Started With Previously Unseen AMI -action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = The EC2 instance $dest$ was created with previously unused AMI $amiID$ -action.notable.param.rule_title = EC2 Instance Type $dest$ Created With New AMI -action.notable.param.security_domain = endpoint -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get EC2 Launch Details\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 30 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = This search looks for EC2 instances being created with previously unseen AMIs. -dispatch.earliest_time = -70m@m -dispatch.latest_time = -10m@m +action.escu.eli5 = none +action.escu.how_to_implement = To successfully implement this search you must be ingesting endpoint data via Microsoft-Windows-Sysmon and extract the Image and Parent Image field. +action.escu.full_search_name = ESCU - Get Parent Process Info +action.escu.known_false_positives = None at this time +action.escu.search_type = investigative +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Collection and Staging", "Hidden Cobra Malware", "Credential Dumping", "Ransomware", "Windows Persistence Techniques", "Emotet Malware (TA18-201A)", "Orangeworm Attack Group", "DHS Report TA18-074A", "Windows Service Abuse", "Disabling Security Tools", "Suspicious MSHTA Activity", "Windows Defense Evasion Tactics", "Windows File Extension and Association Abuse", "Netsh Abuse", "SamSam Ransomware", "Suspicious Command-Line Executions", "Suspicious Windows Registry Activities", "Windows Privilege Escalation"] +action.escu.fields_required = ["process", "dest"] +action.escu.earliest_time_offset = 0 +action.escu.latest_time_offset = 86400 +description = This search queries the Application State data model to give you details about the parent process of a process running on a host which is under investigation. Enter the values of the process name in question and the dest_ip disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail eventName=RunInstances [search sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | stats earliest(_time) as earliest latest(_time) as latest by requestParameters.instancesSet.items{}.imageId | rename requestParameters.instancesSet.items{}.imageId as amiID | inputlookup append=t previously_seen_ec2_amis.csv | stats min(earliest) as earliest max(latest) as latest by amiID | outputlookup previously_seen_ec2_amis.csv | eval newAMI=if(earliest >= relative_time(now(), "-70m@m"), 1, 0) | convert ctime(earliest) ctime(latest) | where newAMI=1 | rename amiID as requestParameters.instancesSet.items{}.imageId | table requestParameters.instancesSet.items{}.imageId] | rename requestParameters.instanceType as instanceType, responseElements.instancesSet.items{}.instanceId as dest, userIdentity.arn as arn, requestParameters.instancesSet.items{}.imageId as amiID | table _time, arn, amiID, dest, instanceType +search = | search sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational process=$process$ dest=$dest$ | table parent_process parent_process_id [ESCU - Processes launching netsh - Rule] action.escu = 0 @@ -1745,7 +1718,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "Command-Line Interface", action.escu.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. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Netsh Abuse", "DHS Report TA18-074A", "Disabling Security Tools"] +action.escu.analytic_story = ["DHS Report TA18-074A", "Disabling Security Tools", "Netsh Abuse"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Processes launching netsh action.notable = 1 @@ -1754,7 +1727,7 @@ action.notable.param.rule_description = A process detected on $dest$ is launchin action.notable.param.rule_title = Process launching netsh.exe detected on $dest$ action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -1829,45 +1802,45 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Application_State where All_Application_State.dest_category="web_server" AND (All_Application_State.process="*whoami*" OR All_Application_State.process="*ping*" OR All_Application_State.process="*iptables*" OR All_Application_State.process="*wget*" OR All_Application_State.process="*service*" OR All_Application_State.process="*curl*") by All_Application_State.process, All_Application_State.dest | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name("All_Application_State")` -[ESCU - Large Volume of DNS ANY Queries - Rule] +[ESCU - Shim Database File Creation - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2016-08-24 -action.escu.modification_date = 2017-09-20 -action.escu.asset_at_risk = DNS Servers +action.escu.creation_date = 2017-10-03 +action.escu.modification_date = 2018-11-02 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU action.escu.confidence = high -action.escu.eli5 = This search counts the number of DNS ANY queries received in 5 minutes, and generates a Notable Event if the count exceeds a predefined threshold. The search returns the count, the first time, and the last time a DNS packet was observed with the ANY flag set. -action.escu.how_to_implement = To successfully implement this search you must ensure that DNS data is populating the Network_Resolution data model. -action.escu.data_models = ["Network_Resolution"] -action.escu.full_search_name = ESCU - Large Volume of DNS ANY Queries - Rule -action.escu.mappings = {"kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11", "CIS 12"], "nist": ["PR.PT", "DE.AE", "PR.IP"]} -action.escu.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. +action.escu.eli5 = This search looks for files being created in `Windows\AppPatch\Custom and Windows\AppPatch\Custom64`, the location where shim databases are installed. It will return all the files created, as well as the time of creation for the first and last file for each endpoint. +action.escu.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. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Shim Database File Creation - Rule +action.escu.mappings = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +action.escu.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. action.escu.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["DNS Amplification Attacks"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Windows Persistence Techniques"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Large Volume of DNS ANY Queries +action.correlationsearch.label = Shim Database File Creation action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = The search is used to identify attempts to use your DNS Infrastructure for DDoS purposes via a DNS amplification attack leveraging ANY queries. -action.notable.param.rule_title = Large Volume of DNS ANY Queries -action.notable.param.security_domain = network +action.notable.param.nes_fields = dest, file_name +action.notable.param.rule_description = A file, $file_name$, was created in the default shim database directory on $dest. +action.notable.param.rule_title = Shim database file created on $dest$ +action.notable.param.security_domain = endpoint action.notable.param.severity = high -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest action.risk.param._risk_object_type = system -action.risk.param._risk_score = 60 +action.risk.param._risk_score = 20 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 alert.suppress.fields = dest -alert.suppress.period = 7200s -cron_schedule = */5 * * * * -description = The search is used to identify attempts to use your DNS Infrastructure for DDoS purposes via a DNS amplification attack leveraging ANY queries. -dispatch.earliest_time = -15m@m +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = 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. +dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -1877,7 +1850,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `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 +search = | tstats `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 | `ctime(lastTime)` | `ctime(firstTime)` |`drop_dm_object_name(Filesystem)` [ESCU - Previously Seen EC2 Launches By User] action.escu = 0 @@ -1966,7 +1939,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Modify Registry", " action.escu.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. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Defense Evasion Tactics", "DHS Report TA18-074A", "Disabling Security Tools"] +action.escu.analytic_story = ["DHS Report TA18-074A", "Disabling Security Tools", "Windows Defense Evasion Tactics"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Suspicious Reg.exe Process action.notable = 1 @@ -1975,7 +1948,7 @@ action.notable.param.rule_description = The system $dest$ had reg.exe process ru action.notable.param.rule_title = Suspicious reg.exe process detected on $dest$ action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -2072,54 +2045,28 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail eventName=AssumeRole | spath output=requestingAccountId path=userIdentity.accountId | spath output=requestedAccountId path=resources{}.accountId | search requestingAccountId=* | where requestingAccountId!=requestedAccountId | stats earliest(_time) as firstTime latest(_time) as lastTime by requestingAccountId, requestedAccountId | outputlookup previously_seen_aws_cross_account_activity | stats count -[ESCU - Suspicious writes to windows Recycle Bin - Rule] +[ESCU - Count of assets by category] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-01-08 -action.escu.modification_date = 2018-01-08 -action.escu.asset_at_risk = Windows +action.escu.creation_date = 2017-06-11 +action.escu.modification_date = 2017-09-13 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search uses data on file writes captured via Sysmon to watch for writes to the Recycle Bin by processes other than explorer.exe. The search looks for event code 11 in the Sysmon events, which indicates a file-creation event. Next, it looks for files created with a path that includes the string "$Recycle.Bin" by processes other than explorer.exe, which is the process responsible for copying files to the Recycle Bin on delete. It will report the system where the activity occurred, the path to which the file was written, the process responsible for the write, and the times it first and last saw this activity. -action.escu.how_to_implement = 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. -action.escu.full_search_name = ESCU - Suspicious writes to windows Recycle Bin - Rule -action.escu.mappings = {"mitre_attack": ["Collection", "Data Staged"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} -action.escu.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. -action.escu.search_type = detection -action.escu.providing_technologies = ["Sysmon"] -action.escu.analytic_story = ["Collection and Staging"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Suspicious writes to windows Recycle Bin -action.notable = 1 -action.notable.param.nes_fields = dest, file_name, process -action.notable.param.rule_description = The process $process$ on $dest$ wrote $file_name$ to the Recycle Bin. -action.notable.param.rule_title = Suspicious process $process$ wrote to the Recycle Bin on $dest$ -action.notable.param.security_domain = endpoint -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 70 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search detects writes to the recycle bin by a process other than explorer.exe. -dispatch.earliest_time = -70m@m +action.escu.eli5 = This search gives you the number and the names of the hosts of each host in your environment by category. It will then sort them by the count. +action.escu.how_to_implement = To successfully implement this search you must first leverage the Assets and Identity framework in Enterprise Security to populate your assets_by_str.csv file which should then be mapped to the Identity_Management data model. The Identity_Management data model will contain a list of known authorized company assets. Ensure that all inventoried systems are constantly vetted and updated. +action.escu.data_models = ["Identity_Management"] +action.escu.full_search_name = ESCU - Count of assets by category +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["Splunk Enterprise Security"] +action.escu.analytic_story = ["Asset Tracking"] +description = This search shows you every asset category you have and the assets that belong to those categories. +dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) EventCode=11 file_path=*$Recycle.Bin* process!=explorer.exe | stats count min(_time) as firstTime max(_time) as lastTime by dest, Image, file_path | `ctime(firstTime)`| `ctime(lastTime)` +search = | from datamodel Identity_Management.All_Assets | stats count values(nt_host) by category | sort -count [ESCU - Suspicious File Write - Rule] action.escu = 0 @@ -2171,76 +2118,51 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count values(Filesystem.action) as action values(Filesystem.file_path) as file_path min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem by Filesystem.file_name Filesystem.dest | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name(Filesystem)` -[ESCU - Detect API activity from users without MFA - Rule] +[ESCU - Get Logon Rights Modifications For Endpoint] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-05-17 -action.escu.modification_date = 2018-05-17 -action.escu.asset_at_risk = AWS Instance +action.escu.creation_date = 2017-08-16 +action.escu.modification_date = 2017-09-12 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = In this search, we query CloudTrail logs and specifically look for events where the multi factor authentication context of the user's session is false which basically means, that the user does not have MFA enabled on AWS. We then filter out all the known AWS service accounts since service accounts typically do not have MFA enabled. The search then creates a table of the first and last time a user without MFA was detected, the values and count of the API calls made, the type of user identity, ARN and the name of the user. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Leverage the support search `Create a list of approved AWS service accounts`: run it once every 30 days to create a list of service accounts and validate them. -action.escu.full_search_name = ESCU - Detect API activity from users without MFA - Rule -action.escu.mappings = {"mitre_attack": ["Execution"], "cis20": ["CIS 16"], "nist": ["DE.DP", "PR.AC"]} -action.escu.known_false_positives = Many service accounts configured within an AWS infrastructure do not have multi factor authentication enabled. Please ignore the service accounts, if triggered and instead add them to the aws_service_accounts.csv file to fine tune the detection. It is also possible that the search detects users in your environment using Single Sign-On systems, since the MFA is not handled by AWS. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS User Monitoring"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect API activity from users without MFA -action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = API Activity detected from $user$ without MFA enabled. -action.notable.param.rule_title = API Activity detected from $user$ without MFA enabled -action.notable.param.security_domain = network -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Investigate AWS User Activities by user field\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = user -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 30 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = user -alert.suppress.period = 84600s -cron_schedule = 0 8 * * * -description = This search looks for CloudTrail events where a user logged into the AWS account, is making API calls and has not enabled Multi Factor authentication. Multi factor authentication adds a layer of security by forcing the users to type a unique authentication code from an approved authentication device when they access AWS websites or services. AWS Best Practices recommend that you enable MFA for privileged IAM users. -dispatch.earliest_time = -1d@d -dispatch.latest_time = -10m@m -disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = sourcetype=aws:cloudtrail userIdentity.sessionContext.attributes.mfaAuthenticated=false | search NOT [| inputlookup aws_service_accounts | fields identity | rename identity as user]| stats count min(_time) as firstTime max(_time) as lastTime values(eventName) by userIdentity.arn userIdentity.type user | `ctime(firstTime)` | `ctime(lastTime)` - -[ESCU - Previously Seen Running Windows Services] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-07-20 -action.escu.modification_date = 2018-07-20 -action.escu.channel = ESCU -action.escu.eli5 = In this support search, we look for Windows system-event code that indicates a status change of a Windows service. It extracts both the name of the service and the action taken by the service from the logs. It keeps only services that have entered the running state. Finally, it finds the first time the service has been seen running across the enterprise and writes that file to a lookup table. -action.escu.how_to_implement = While this search does not require you to adhere to Splunk CIM, you must be ingesting your Windows security-event logs for it to execute successfully. -action.escu.full_search_name = ESCU - Previously Seen Running Windows Services +action.escu.eli5 = none +action.escu.how_to_implement = To successfully implement this search you must be ingesting your Windows event logs +action.escu.full_search_name = ESCU - Get Logon Rights Modifications For Endpoint action.escu.known_false_positives = None at this time -action.escu.search_type = support +action.escu.search_type = investigative action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Orangeworm Attack Group", "Windows Service Abuse"] -description = This collects the services that have been started across your entire enterprise. -dispatch.earliest_time = -30d@d -dispatch.latest_time = -10m@m +action.escu.analytic_story = ["Account Monitoring and Controls"] +action.escu.fields_required = ["dest"] +action.escu.earliest_time_offset = 86400 +action.escu.latest_time_offset = 86400 +description = This search allows you to retrieve any modifications to logon rights associated with a specific host. disabled=true realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=WinEventLog:System EventCode=7036 | rex field=Message "The (?[\w\s-]*) service entered the (?\w*) state" | where action="running" | stats earliest(_time) as firstTime, latest(_time) as lastTime by serviceName | outputlookup previously_seen_running_windows_services | stats count +search = | search sourcetype=WinEventLog:Security (EventCode=4718 OR EventCode=4717) dest=$dest$ | rename user as "Account Modified" | table _time, dest, "Account Modified", Access_Right, signature + +[ESCU - All backup logs for host] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-06-19 +action.escu.modification_date = 2017-09-12 +action.escu.channel = ESCU +action.escu.eli5 = none +action.escu.how_to_implement = The successfully implement this search you must first send your backup logs to Splunk. +action.escu.full_search_name = ESCU - All backup logs for host +action.escu.known_false_positives = None at this time +action.escu.search_type = investigative +action.escu.providing_technologies = ["Netbackup"] +action.escu.analytic_story = ["Monitor Backup Solution"] +action.escu.fields_required = ["dest"] +action.escu.earliest_time_offset = 1209600 +action.escu.latest_time_offset = 0 +description = Retrieve the backup logs for the last 2 weeks for a specific host in order to investigate why backups are not completing successfully. +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | search sourcetype="netbackup_logs" dest=$dest$ [ESCU - Clients Connecting to Multiple DNS Servers - Rule] action.escu = 0 @@ -2292,6 +2214,29 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count, values(DNS.dest) AS dest dc(DNS.dest) as dest_count from datamodel=Network_Resolution where DNS.message_type=QUERY by DNS.src | `drop_dm_object_name("Network_Resolution")` |where dest_count > 5 +[ESCU - Get Sysmon WMI Activity for Host] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-10-23 +action.escu.modification_date = 2018-10-23 +action.escu.channel = ESCU +action.escu.eli5 = none +action.escu.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 events for WMI activity. In addition, you must have at least version 6.0.4 of the Sysmon TA installed to properly parse the fields. +action.escu.full_search_name = ESCU - Get Sysmon WMI Activity for Host +action.escu.known_false_positives = None at this time +action.escu.search_type = investigative +action.escu.providing_technologies = ["Sysmon"] +action.escu.analytic_story = ["Suspicious WMI Use"] +action.escu.fields_required = ["process", "dest"] +action.escu.earliest_time_offset = 7200 +action.escu.latest_time_offset = 7200 +description = This search queries Sysmon WMI events for the host of interest. +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode>18 EventCode<22 host=$dest$ | rename host as dest | table _time, dest, user, Name, Operation, EventType, Type, Query, Consumer, Filter + [ESCU - Monitor Registry Keys for Print Monitors - Rule] action.escu = 0 action.escu.enabled = 1 @@ -2342,29 +2287,6 @@ schedule_window = auto is_visible = false search = | tstats `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.status Registry.user Registry.registry_path Registry.action | `drop_dm_object_name(Registry)` -[ESCU - Get Sysmon WMI Activity for Host] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-10-23 -action.escu.modification_date = 2018-10-23 -action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.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 events for WMI activity. In addition, you must have at least version 6.0.4 of the Sysmon TA installed to properly parse the fields. -action.escu.full_search_name = ESCU - Get Sysmon WMI Activity for Host -action.escu.known_false_positives = None at this time -action.escu.search_type = investigative -action.escu.providing_technologies = ["Sysmon"] -action.escu.analytic_story = ["Suspicious WMI Use"] -action.escu.fields_required = ["process", "dest"] -action.escu.earliest_time_offset = 7200 -action.escu.latest_time_offset = 7200 -description = This search queries Sysmon WMI events for the host of interest. -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode>18 EventCode<22 host=$dest$ | rename host as dest | table _time, dest, user, Name, Operation, EventType, Type, Query, Consumer, Filter - [ESCU - Previously Seen AWS Regions] action.escu = 0 action.escu.enabled = 1 @@ -2387,28 +2309,28 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail StartInstances | stats earliest(_time) as earliest latest(_time) as latest by awsRegion | outputlookup previously_seen_aws_regions.csv | stats count -[ESCU - Get User Information from Identity Table] +[ESCU - Get Backup Logs For Endpoint] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-10 -action.escu.modification_date = 2017-09-20 +action.escu.creation_date = 2017-08-24 +action.escu.modification_date = 2017-09-14 action.escu.channel = ESCU action.escu.eli5 = none -action.escu.how_to_implement = To successfully implement this search you must have populated the identity table with information about your users. -action.escu.full_search_name = ESCU - Get User Information from Identity Table +action.escu.how_to_implement = You must be ingesting your backup logs. +action.escu.full_search_name = ESCU - Get Backup Logs For Endpoint action.escu.known_false_positives = None at this time action.escu.search_type = contextual -action.escu.providing_technologies = ["Splunk Enterprise Security"] -action.escu.analytic_story = ["Suspicious AWS Login Activities", "Windows Persistence Techniques", "ColdRoot MacOS RAT", "Hidden Cobra Malware", "Ransomware", "Credential Dumping", "Windows Defense Evasion Tactics", "Malicious PowerShell", "Suspicious WMI Use", "Lateral Movement", "SamSam Ransomware", "Use of Cleartext Protocols", "Netsh Abuse", "Splunk Enterprise Vulnerability", "JBoss Vulnerability", "Asset Tracking", "DHS Report TA18-074A", "Disabling Security Tools", "Suspicious Windows Registry Activities", "Suspicious Emails", "Unusual Processes", "ColdRoot MacOS RAT", "Monitor for Unauthorized Software", "Suspicious DNS Traffic", "Orangeworm Attack Group", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "Suspicious MSHTA Activity", "Router & Infrastructure Security", "Host Redirection", "Monitor for Updates", "Data Protection", "Collection and Staging", "Windows Log Manipulation", "Brand Monitoring", "Windows Privilege Escalation", "AWS Network ACL Activity", "Windows Service Abuse", "Dynamic DNS", "Emotet Malware (TA18-201A)", "Spectre And Meltdown Vulnerabilities", "Suspicious AWS S3 Activities", "Apache Struts Vulnerability", "Windows File Extension and Association Abuse", "Account Monitoring and Controls", "SQL Injection", "Command and Control", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] -action.escu.fields_required = ["user"] -action.escu.earliest_time_offset = 864000 -action.escu.latest_time_offset = 86400 -description = Gather more information about the user identified in the Notable Event. +action.escu.providing_technologies = ["Netbackup"] +action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] +action.escu.fields_required = ["dest"] +action.escu.earliest_time_offset = 604800 +action.escu.latest_time_offset = 0 +description = This search will tell you the backup status from your netbackup_logs of a specific endpoint for the last week. disabled=true realtime_schedule = 0 schedule_window = auto is_visible = false -search = | `identities` | search identity=$user$ | table _time, identity, first, last, email, category, watchlist +search = | search sourcetype="netbackup_logs" COMPUTERNAME=$dest$ | rename COMPUTERNAME as dest, MESSAGE as signature | table _time, dest, signature [ESCU - Get DNS Server History for a host] action.escu = 0 @@ -2422,7 +2344,7 @@ action.escu.full_search_name = ESCU - Get DNS Server History for a host action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Host Redirection", "Data Protection", "Brand Monitoring", "Dynamic DNS", "Command and Control"] +action.escu.analytic_story = ["Data Protection", "Suspicious DNS Traffic", "Command and Control", "Host Redirection", "Brand Monitoring", "Dynamic DNS"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -2521,7 +2443,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Persistence", "Late action.escu.known_false_positives = This technique may be legitimately used by administrators to modify remote registries, so it's important to filter these events out. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Windows Defense Evasion Tactics", "Lateral Movement", "Suspicious Windows Registry Activities"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Lateral Movement", "Windows Defense Evasion Tactics", "Suspicious Windows Registry Activities"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Remote Registry Key modifications action.notable = 1 @@ -2555,45 +2477,66 @@ schedule_window = auto is_visible = false search = | tstats `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="\\\\*" by Registry.dest , Registry.status, Registry.user | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name(Registry)` -[ESCU - Detect malicious requests to exploit JBoss servers - Rule] +[ESCU - Previously Seen AWS Provisioning Activity Sources] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2016-10-04 -action.escu.modification_date = 2017-09-23 -action.escu.asset_at_risk = Web Server +action.escu.creation_date = 2018-03-16 +action.escu.modification_date = 2018-03-16 action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks for HTTP requests for a URL that has been used to exploit JBoss servers. -action.escu.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 -action.escu.data_models = ["Web"] -action.escu.full_search_name = ESCU - Detect malicious requests to exploit JBoss servers - Rule -action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 12", "CIS 4", "CIS 18"], "nist": ["ID.RA", "PR.PT", "PR.IP", "DE.AE", "PR.MA", "DE.CM"]} -action.escu.known_false_positives = No known false positives for this detection. +action.escu.eli5 = This search includes any event name that begins with "run" or "create," and then determines the first and last time these events were seen for each IP address that initiated the action. The search then consults a **GeoIP** database to determine the physical location of this IP address. This table outputs to a file. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. +action.escu.full_search_name = ESCU - Previously Seen AWS Provisioning Activity Sources +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Suspicious Provisioning Activities"] +description = This search builds a table of the first and last times seen for every IP address (along with its physical location) previously associated with cloud-provisioning activity. This is broadly defined as any event that runs or creates something. +dispatch.earliest_time = -90d@d +dispatch.latest_time = -10m@m +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = sourcetype=aws:cloudtrail (eventName=Run* OR eventName=Create*) | iplocation sourceIPAddress | stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country | outputlookup previously_seen_provisioning_activity_src.csv | stats count + +[ESCU - Abnormally High AWS Instances Launched by User - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-02-26 +action.escu.modification_date = 2018-02-26 +action.escu.asset_at_risk = AWS Instance +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = In this search, we query CloudTrail logs to look for events where an instance is successfully launched by a particular user. Since we want to detect a high number of instances launched within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances launched by a particular user, as well as the average and standard deviation values. Assign a `threshold_value` in the search. Start with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier 1 if the number of instances is greater than the average number of instances terminated, added to the multiplied value of threshold and standard deviation. For your reference, we then keep only the outliers and calculate the number of standard deviations away the value is from the average. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. The threshold value should be tuned to your environment. +action.escu.full_search_name = ESCU - Abnormally High AWS Instances Launched by User - Rule +action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["DE.DP", "DE.AE"]} +action.escu.known_false_positives = Many service accounts configured within an AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify if this search alerted on a human user. action.escu.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] -action.escu.analytic_story = ["SamSam Ransomware", "JBoss Vulnerability"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect malicious requests to exploit JBoss servers +action.correlationsearch.label = Abnormally High AWS Instances Launched by User action.notable = 1 -action.notable.param.nes_fields = src, dest_ip -action.notable.param.rule_description = A search for detecting malicious requests made to exploit jmx-console in JBoss servers. The bad requests have a long url length since it serves the payload via the url -action.notable.param.rule_title = Detected malicious requests to exploit JBoss servers +action.notable.param.nes_fields = userName +action.notable.param.rule_description = An abnormally high number of instances were launched by a user within in a 10-minute window +action.notable.param.rule_title = High Number of instances launched by $userName$ action.notable.param.security_domain = network -action.notable.param.severity = high -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n"} +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get EC2 Launch Details\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 80 +action.risk.param._risk_object = userName +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 30 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest,url,src -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = 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. -dispatch.earliest_time = -70m@m +alert.suppress.fields = userName +alert.suppress.period = 3600s +cron_schedule = */10 * * * * +description = This search looks for CloudTrail events where a user successfully launches an abnormally high number of instances. +dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -2603,7 +2546,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `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")` | `ctime(firstTime)` | `ctime(lastTime)` | table src, dest_ip, http_method, url, firstTime, lastTime +search = sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | bucket span=10m _time | stats count AS instances_launched by _time userName | eventstats avg(instances_launched) as total_launched_avg, stdev(instances_launched) as total_launched_stdev | eval threshold_value = 4 | eval isOutlier=if(instances_launched > total_launched_avg+(total_launched_stdev * threshold_value), 1, 0) | search isOutlier=1 AND _time >= relative_time(now(), "-10m@m") | eval num_standard_deviations_away = round(abs(instances_launched - total_launched_avg) / total_launched_stdev, 2) | table _time, userName, instances_launched, num_standard_deviations_away, total_launched_avg, total_launched_stdev [ESCU - Email servers sending high volume traffic to hosts - Rule] action.escu = 0 @@ -2705,6 +2648,56 @@ schedule_window = auto is_visible = false search = | tstats `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 +[ESCU - Attempt To Add Certificate To Untrusted Store - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-04-09 +action.escu.modification_date = 2018-11-15 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = high +action.escu.eli5 = Attackers will often attempt to disable security tools in order to evade detection. It is also possible for end users to attempt to disable anti-virus or other security tools to circumvent restrictions they encounter while trying to execute other programs. One way malware may accomplish this is by adding the legitimate certificate used to sign the security software to the untrusted certificate store. This will cause the system to no longer trust the software signed with this certificate and disallow it from executing. This search simply looks for the execution of **certutil.exe** with the parameters `-addcert` and `disallowed`, which add a certification to the "untrusted" certificate store. +action.escu.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. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Attempt To Add Certificate To Untrusted Store - Rule +action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Disabling Security Tools"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +action.escu.known_false_positives = There may be legitimate reasons for administrators to add a certificate to the untrusted certificate store. In such cases, this will typically be done on a large number of systems. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Disabling Security Tools"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Attempt To Add Certificate To Untrusted Store +action.notable = 1 +action.notable.param.nes_fields = dest, user, process_name +action.notable.param.rule_description = Attempt to add a certificate to the untrusted certificate store +action.notable.param.rule_title = Attempt To Add Certificate to Untrusted Store +action.notable.param.security_domain = endpoint +action.notable.param.severity = high +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 50 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = process, dest +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = Attempt to add a certificate to the untrusted certificate store +dispatch.earliest_time = -70m@m +dispatch.latest_time = -10m@m +disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | tstats `summariesonly` count min(_time) values(Processes.process) as process max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=certutil.exe (Processes.process=*-addstore* AND Processes.process=*disallowed* ) by Processes.parent_process Processes.process_name Processes.user | `drop_dm_object_name("Processes")` | `ctime(firstTime)`|`ctime(lastTime)` + [ESCU - DNS Query Length With High Standard Deviation - Rule] action.escu = 0 action.escu.enabled = 1 @@ -3027,54 +3020,28 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail (eventName=Run* OR eventName=Create*) | iplocation sourceIPAddress | search City=* [search sourcetype=aws:cloudtrail (eventName=Run* OR eventName=Create*) | iplocation sourceIPAddress | search City=* | stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country | inputlookup append=t previously_seen_provisioning_activity_src.csv | stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country | outputlookup previously_seen_provisioning_activity_src.csv | stats min(firstTime) as firstTime max(lastTime) as lastTime by City | eval newCity=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newCity=1 | table City] | spath output=user userIdentity.arn | rename sourceIPAddress as src_ip | table _time, user, src_ip, City, eventName, errorCode -[ESCU - WMI Permanent Event Subscription - Sysmon - Rule] +[ESCU - AWS Network ACL Details from ID] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-10-23 -action.escu.modification_date = 2018-10-23 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-01-18 +action.escu.modification_date = 2017-01-22 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = Attackers are increasingly abusing Windows Management Infrastructure (WMI) for stealth, persistence, lateral movement, or just to leverage its functionality. This search looks for the creation of a WMI event subscription by watching for Sysmon event ID 21. -action.escu.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. -action.escu.full_search_name = ESCU - WMI Permanent Event Subscription - Sysmon - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Windows Management Instrumentation", "Persistence", "Windows Management Instrumentation Event Subscription"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} -action.escu.known_false_positives = Although unlikely, administrators may use event subscriptions for legitimate purposes. -action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Suspicious WMI Use"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = WMI Permanent Event Subscription - Sysmon -action.notable = 1 -action.notable.param.nes_fields = dest, user -action.notable.param.rule_description = This search looks for the creation of a permanent WMI event subscription via Sysmon logs. -action.notable.param.rule_title = WMI Event Subscription Detected on $dest$ -action.notable.param.security_domain = endpoint -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Process Info\n - ESCU - Get Sysmon WMI Activity for Host\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 70 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest,user -alert.suppress.period = 28800s -cron_schedule = 0 * * * * -description = This search looks for the creation of WMI permanent event subscriptions. -dispatch.earliest_time = -70m@m -dispatch.latest_time = -10m@m +action.escu.eli5 = none +action.escu.how_to_implement = In order to implement this search, you must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS(version 4.4.0 or later) and configure your AWS description inputs. +action.escu.full_search_name = ESCU - AWS Network ACL Details from ID +action.escu.known_false_positives = None at this time +action.escu.search_type = contextual +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Network ACL Activity"] +action.escu.fields_required = ["networkAclId"] +action.escu.earliest_time_offset = 3600 +action.escu.latest_time_offset = 0 +description = This search queries AWS description logs and returns all the information about a specific network ACL via network ACL ID disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=21 | rename host as dest | table _time, dest, user, Operation, EventType, Query, Consumer, Filter +search = | search sourcetype=aws:description id=$networkAclId$ | table id account_id vpc_id network_acl_entries{}.* [ESCU - System Processes Run From Unexpected Locations - Rule] action.escu = 0 @@ -3091,7 +3058,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Masquerading"], "ki action.escu.known_false_positives = None identified action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Ransomware", "Unusual Processes", "Suspicious Command-Line Executions"] +action.escu.analytic_story = ["Unusual Processes", "Ransomware", "Suspicious Command-Line Executions"] action.correlationsearch.enabled = 1 action.correlationsearch.label = System Processes Run From Unexpected Locations action.notable = 1 @@ -3125,61 +3092,43 @@ schedule_window = auto is_visible = false search = sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational EventCode=1 NOT Image="C:\\Windows\\System32*" NOT Image="C:\\Windows\\SysWOW64*" | rex field=Image .*\\\(?\S+)\s?$ | `isWindowsSystemFile` | rename Image as process | table _time, dest, user, process, process_id, parent_process -[ESCU - AWS Cross Account Activity From Previously Unseen Account - Rule] +[ESCU - Detect new user AWS Console Login - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-02-01 -action.escu.modification_date = 2018-11-02 +action.escu.creation_date = 2018-02-26 +action.escu.modification_date = 2018-02-26 action.escu.asset_at_risk = AWS Instance action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = This search\ -\ -1. Retrieves the **AssumeRole** event\ -\ -1. Verifies that the log entry contains a value for the account ID of the requesting account\ -\ -1. Ensures that the requesting account ID does not match the account ID of the requested account\ -\ -1. Pulls in the previously seen requesting and requested account IDs\ -\ -1. Splits up and executes multiple search paths at the same.\ -\ -1. The first path determines the **firstTime** and **lastTime** entries for the cache file\ -\ -1. Outputs the data to the cache file.\ -\ -1. Creates a conditional statement that is always false (both because we don't want these values to exit the search pipeline and because we think we're clever).The second pipeline adds the **firstTime** and **lastTime** entries to search results. Next, it filters out any account pairs that haven't been seen for the first time within the last hour. The `isnotnull(_time)` will remove the entries from the cache file.\ -\ -The search finishes by gathering the data that it will display to the user. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the `Previously Seen AWS Cross Account Activity` support search only once to create the baseline of previously seen cross account activity. Thanks to Pablo Vega at Recurly for suggesting improvements to the search. -action.escu.full_search_name = ESCU - AWS Cross Account Activity From Previously Unseen Account - Rule -action.escu.mappings = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["PR.AC", "PR.DS", "DE.AE"]} -action.escu.known_false_positives = Using multiple AWS accounts and roles is perfectly valid behavior. It's suspicious when an account requests privileges of an account it hasn't before. You should validate with the account owner that this is a legitimate request. +action.escu.eli5 = In this search, we query CloudTrail logs to look for events that indicate that a user has attempted to log in to the AWS console and group the events using ARN value. Using the `previously_seen_users_console_logins.csv` lookup file created using the support search, we compare the ARN to all the previously seen users logging into the AWS console. The `eval` and `if` functions determine whether the earliest time we see this user ARN was seen within the last hour. The alert will be fired only when a user is seen for first time in the last hour. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the "Previously seen users in CloudTrail" support search only once to create a baseline of previously seen IAM users within the last 30 days +action.escu.full_search_name = ESCU - Detect new user AWS Console Login - Rule +action.escu.mappings = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.AE"]} +action.escu.known_false_positives = When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate. action.escu.search_type = detection action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cross Account Activity"] +action.escu.analytic_story = ["Suspicious AWS Login Activities"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = AWS Cross Account Activity From Previously Unseen Account +action.correlationsearch.label = Detect new user AWS Console Login action.notable = 1 -action.notable.param.nes_fields = requestingAccountId, requestedAccountId, src_user, dest_user -action.notable.param.rule_description = Access to $dest_user$ was requested for the first time by $src_user$ -action.notable.param.rule_title = AWS Account $dest_user$ access by $src_user$ +action.notable.param.nes_fields = arn +action.notable.param.rule_description = A new user has logged into the AWS console +action.notable.param.rule_title = AWS Console Login by New User action.notable.param.security_domain = network action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - AWS Investigate User Activities By AccessKeyId\n - ESCU - AWS Investigate User Activities By Source User\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - AWS Investigate User Activities By ARN\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = dest_user +action.risk.param._risk_object = arn action.risk.param._risk_object_type = user -action.risk.param._risk_score = 20 +action.risk.param._risk_score = 30 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = requestingAccountId, requestedAccountId -alert.suppress.period = 14400s +alert.suppress.fields = arn +alert.suppress.period = 86400s cron_schedule = 5 * * * * -description = This search looks for AssumeRole events where an IAM role in a different account is requested for the first time. +description = This search looks for CloudTrail events wherein a console login event by a user was recorded within the last hour, then compares the event to a lookup file of previously seen users (by ARN values) who have logged into the console. The alert is fired if the user has logged into the console for the first time within the last hour dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -3190,7 +3139,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail eventName=AssumeRole | spath output=requestingAccountId path=userIdentity.accountId | spath output=requestedAccountId path=resources{}.accountId | search requestingAccountId=* | where requestingAccountId != requestedAccountId | inputlookup append=t previously_seen_aws_cross_account_activity | multireport [| stats min(eval(coalesce(firstTime, strptime(_time,"%Y-%m-%d %H:%M:%S")))) as firstTime max(eval(coalesce(strptime(_time,"%Y-%m-%d %H:%M:%S"), lastTime))) as lastTime by requestingAccountId, requestedAccountId | outputlookup previously_seen_aws_cross_account_activity | where fact=fiction] [| eventstats min(eval(coalesce(firstTime, strptime(_time,"%Y-%m-%d %H:%M:%S")))) as firstTime, max(eval(coalesce(strptime(_time,"%Y-%m-%d %H:%M:%S"), lastTime))) as lastTime by requestingAccountId, requestedAccountId | where firstTime >= relative_time(now(), "-70m@m") AND isnotnull(_time) | spath output=accessKeyId path=responseElements.credentials.accessKeyId | spath output=requestingARN path=resources{}.ARN | stats values(awsRegion) as awsRegion values(firstTime) as firstTime values(lastTime) as lastTime values(sharedEventID) as sharedEventID, values(requestingARN) as src_user, values(responseElements.assumedRoleUser.arn) as dest_user by _time, requestingAccountId, requestedAccountId, accessKeyId] | table _time, firstTime, lastTime, src_user, requestingAccountId, dest_user, requestedAccountId, awsRegion, accessKeyId, sharedEventID +search = sourcetype=aws:cloudtrail eventName=ConsoleLogin | rename userIdentity.arn as arn |stats earliest(_time) as earliest latest(_time) as latest by arn | inputlookup append=t previously_seen_users_console_logins.csv | stats min(earliest) as earliest max(latest) as latest by arn | outputlookup previously_seen_users_console_logins.csv | eval userStatus=if(earliest >= relative_time(now(), "-70m@m"), "First Time Logging into AWS Console","Previously Seen User") | convert ctime(earliest) ctime(latest) | where userStatus ="First Time Logging into AWS Console" [ESCU - Previously seen S3 bucket access by remote IP] action.escu = 0 @@ -3314,54 +3263,28 @@ schedule_window = auto is_visible = false search = | tstats `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)` | `ctime(lastTime)` | `ctime(firstTime)`|`ransomware_notes` -[ESCU - Detect PsExec With accepteula Flag - Rule] +[ESCU - Get EC2 Instance Details by instanceId] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-28 -action.escu.modification_date = 2018-03-28 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-02-12 +action.escu.modification_date = 2018-02-12 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = In this search, we are looking for the PsExec process with `accepteula` on the command line. -action.escu.how_to_implement = To successfully implement this search, you need to be ingesting logs with the process name, command-line arguments, and parent process from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon Technology Add-on (TA). -action.escu.full_search_name = ESCU - Detect PsExec With accepteula Flag - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Command-Line Interface"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -action.escu.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 -action.escu.search_type = detection -action.escu.providing_technologies = ["Sysmon"] -action.escu.analytic_story = ["SamSam Ransomware", "DHS Report TA18-074A"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect PsExec With accepteula Flag -action.notable = 1 -action.notable.param.nes_fields = dest,parent_process -action.notable.param.rule_description = The process pssxec.exe was run with the -accepteula flag on $dest$ by $user$. -action.notable.param.rule_title = PsExec executed with accepteula flag on $dest$. -action.notable.param.security_domain = endpoint -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 75 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest, parent_process -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = 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. -dispatch.earliest_time = -70m@m -dispatch.latest_time = -10m@m +action.escu.eli5 = none +action.escu.how_to_implement = In order to implement this search, you must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS(version 4.4.0 or later) and configure your AWS description inputs. +action.escu.full_search_name = ESCU - Get EC2 Instance Details by instanceId +action.escu.known_false_positives = None at this time +action.escu.search_type = contextual +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "Unusual AWS EC2 Modifications"] +action.escu.fields_required = ["instanceId"] +action.escu.earliest_time_offset = 86400 +action.escu.latest_time_offset = 0 +description = This search queries AWS description logs and returns all the information about a specific instance via the instanceId field disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=xmlwineventlog:microsoft-windows-sysmon/operational process=PsExec.exe accepteula | search cmdline=*accepteula* | stats count values(cmdline) as cmdlines, min(_time) as firstTime, max(_time) as lastTime by dest, user, parent_process | `ctime(firstTime)`| `ctime(lastTime)` | table firstTime, lastTime, count, dest, user, parent_process, cmdlines +search = | search sourcetype="aws:description" source="*:ec2_instances"| dedup id sortby -_time | search id=$instanceId$ | spath output=tags path=tags | eval tags=mvzip(key,value," = "), ip_address=if((ip_address == "null"),private_ip_address,ip_address) | table id, tags.Name, aws_account_id, placement, instance_type, key_name, ip_address, launch_time, state, vpc_id, subnet_id, tags | rename aws_account_id as "Account ID", id as ID, instance_type as Type, ip_address as "IP Address", key_name as "Key Pair", launch_time as "Launch Time", placement as "Availability Zone", state as State, subnet_id as Subnet, "tags.Name" as Name, vpc_id as VPC [ESCU - Malicious PowerShell Process - Execution Policy Bypass - Rule] action.escu = 0 @@ -3475,7 +3398,7 @@ action.escu.full_search_name = ESCU - Get Emails From Specific Sender action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["Microsoft Exchange"] -action.escu.analytic_story = ["Suspicious Emails", "Web Fraud Detection", "Brand Monitoring"] +action.escu.analytic_story = ["Suspicious Emails", "Brand Monitoring", "Web Fraud Detection"] action.escu.fields_required = ["src_user"] action.escu.earliest_time_offset = 86400 action.escu.latest_time_offset = 86400 @@ -3624,7 +3547,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "Scripting", "Persistence" action.escu.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. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Hidden Cobra Malware", "DHS Report TA18-074A", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Hidden Cobra Malware", "Orangeworm Attack Group", "DHS Report TA18-074A", "Suspicious Command-Line Executions"] action.correlationsearch.enabled = 1 action.correlationsearch.label = First time seen command line argument action.notable = 1 @@ -3633,7 +3556,7 @@ action.notable.param.rule_description = The system $dest$ executed a command-lin action.notable.param.rule_title = First-time seen command-line argument was detected on $dest$. action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -3674,7 +3597,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "Defense Evasion"], "kill_ action.escu.known_false_positives = None identified action.escu.search_type = detection action.escu.providing_technologies = ["Microsoft Exchange"] -action.escu.analytic_story = ["Suspicious Emails", "Emotet Malware (TA18-201A)"] +action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "Suspicious Emails"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Suspicious Email Attachment Extensions action.notable = 1 @@ -3683,7 +3606,7 @@ action.notable.param.rule_description = The sender $src_user$ has sent an email action.notable.param.rule_title = Suspicious Email Attachment from $src_user$ action.notable.param.security_domain = network action.notable.param.severity = high -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Email Info\n - ESCU - Get Emails From Specific Sender\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src_user @@ -3708,28 +3631,55 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Email where All_Email.file_name="*" by All_Email.src_user, All_Email.file_name All_Email.message_id | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name("All_Email")` | `suspicious_email_attachments` -[ESCU - Get Notable History] +[ESCU - Malicious PowerShell Process With Obfuscation Techniques - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-03-15 -action.escu.modification_date = 2017-09-20 +action.escu.creation_date = 2017-04-25 +action.escu.modification_date = 2018-12-03 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = If you are using Enterprise Security you are likely already creating notable events with your correlation rules. No additional configuration is necessary. -action.escu.full_search_name = ESCU - Get Notable History -action.escu.known_false_positives = None at this time -action.escu.search_type = contextual -action.escu.providing_technologies = ["Splunk Enterprise Security"] -action.escu.analytic_story = ["Suspicious AWS Login Activities", "Windows Persistence Techniques", "ColdRoot MacOS RAT", "Hidden Cobra Malware", "Ransomware", "Credential Dumping", "Windows Defense Evasion Tactics", "Malicious PowerShell", "Suspicious WMI Use", "Lateral Movement", "SamSam Ransomware", "Use of Cleartext Protocols", "Netsh Abuse", "Splunk Enterprise Vulnerability", "JBoss Vulnerability", "Asset Tracking", "DHS Report TA18-074A", "Disabling Security Tools", "Unusual AWS EC2 Modifications", "Suspicious Windows Registry Activities", "Suspicious Emails", "Unusual Processes", "ColdRoot MacOS RAT", "Monitor for Unauthorized Software", "Suspicious DNS Traffic", "Orangeworm Attack Group", "Splunk Enterprise Vulnerability CVE-2018-11409", "Prohibited Traffic Allowed or Protocol Mismatch", "AWS Cross Account Activity", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "Suspicious MSHTA Activity", "Router & Infrastructure Security", "Host Redirection", "Monitor for Updates", "Suspicious AWS Traffic", "Web Fraud Detection", "Data Protection", "Collection and Staging", "Windows Log Manipulation", "Brand Monitoring", "Windows Privilege Escalation", "AWS Network ACL Activity", "Windows Service Abuse", "Dynamic DNS", "Monitor Backup Solution", "Emotet Malware (TA18-201A)", "AWS User Monitoring", "Spectre And Meltdown Vulnerabilities", "Suspicious AWS S3 Activities", "Apache Struts Vulnerability", "Windows File Extension and Association Abuse", "DNS Amplification Attacks", "Account Monitoring and Controls", "SQL Injection", "Command and Control", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] -action.escu.fields_required = ["dest"] -action.escu.earliest_time_offset = 864000 -action.escu.latest_time_offset = 86400 -description = This search queries the notable index and returns all the Notable Events for the particular destination host, giving the analyst an overview of the incidents that may have occurred with the host under investigation. +action.escu.confidence = medium +action.escu.eli5 = This search looks for PowerShell processes that are passing command-line arguments with unusual characters (backticks and carets) that are PowerShell specific escape characters. Attackers use this obfuscation technique since it does not affect the functionality of PowerShell and it will bypass standard security controls that look for straight up malicious strings and commands. The search counts the occurrence of these obfuscation characters and lists out destination IPs running these PowerShell commands. +action.escu.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. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Malicious PowerShell Process With Obfuscation Techniques - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +action.escu.known_false_positives = These characters might be legitimately on the command-line, but it is not common. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Malicious PowerShell"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Malicious PowerShell Process With Obfuscation Techniques +action.notable = 1 +action.notable.param.nes_fields = dest, user, process_name, process +action.notable.param.rule_description = The system $dest$ executed a PowerShell process that has evidence of obfuscation on the command-line +action.notable.param.rule_title = PowerShell process with an obfuscation techniques detected on $dest$ +action.notable.param.security_domain = endpoint +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Process Info\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 60 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest,process_name,process +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = This search looks for PowerShell processes launched with arguments that have characters indicative of obfuscation on the command-line. +dispatch.earliest_time = -70m@m +dispatch.latest_time = -10m@m disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | search `notable` | search dest=$dest$ | table _time, rule_name, owner, priority, severity, status_description +search = | tstats `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 | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)`| eval num_obfuscation = (mvcount(split(process, "`"))-1) + (mvcount(split(process, "^"))-1) | search num_obfuscation > 0 [ESCU - Create a list of approved AWS service accounts] action.escu = 0 @@ -3765,7 +3715,7 @@ action.escu.full_search_name = ESCU - Get All AWS Activity From IP Address action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Suspicious Provisioning Activities", "Suspicious AWS Traffic", "Suspicious AWS S3 Activities", "Command and Control"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities", "Command and Control", "AWS Suspicious Provisioning Activities", "Suspicious AWS Traffic"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 @@ -3776,51 +3726,50 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:cloudtrail | iplocation sourceIPAddress | search sourceIPAddress=$src_ip$ | spath output=user path=userIdentity.arn | spath output=awsUserName path=userIdentity.userName | spath output=userType path=userIdentity.type | rename sourceIPAddress as src_ip | table _time, user, userName, userType, src_ip, awsRegion, eventName, errorCode -[ESCU - All backup logs for host] +[ESCU - Previously Seen Running Windows Services] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-19 -action.escu.modification_date = 2017-09-12 +action.escu.creation_date = 2018-07-20 +action.escu.modification_date = 2018-07-20 +action.escu.channel = ESCU +action.escu.eli5 = In this support search, we look for Windows system-event code that indicates a status change of a Windows service. It extracts both the name of the service and the action taken by the service from the logs. It keeps only services that have entered the running state. Finally, it finds the first time the service has been seen running across the enterprise and writes that file to a lookup table. +action.escu.how_to_implement = While this search does not require you to adhere to Splunk CIM, you must be ingesting your Windows security-event logs for it to execute successfully. +action.escu.full_search_name = ESCU - Previously Seen Running Windows Services +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Orangeworm Attack Group", "Windows Service Abuse"] +description = This collects the services that have been started across your entire enterprise. +dispatch.earliest_time = -30d@d +dispatch.latest_time = -10m@m +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = sourcetype=WinEventLog:System EventCode=7036 | rex field=Message "The (?[\w\s-]*) service entered the (?\w*) state" | where action="running" | stats earliest(_time) as firstTime, latest(_time) as lastTime by serviceName | outputlookup previously_seen_running_windows_services | stats count + +[ESCU - Get All AWS Activity From Region] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-03-19 +action.escu.modification_date = 2018-03-19 action.escu.channel = ESCU action.escu.eli5 = none -action.escu.how_to_implement = The successfully implement this search you must first send your backup logs to Splunk. -action.escu.full_search_name = ESCU - All backup logs for host +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. +action.escu.full_search_name = ESCU - Get All AWS Activity From Region action.escu.known_false_positives = None at this time action.escu.search_type = investigative -action.escu.providing_technologies = ["Netbackup"] -action.escu.analytic_story = ["Monitor Backup Solution"] -action.escu.fields_required = ["dest"] -action.escu.earliest_time_offset = 1209600 +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Suspicious Provisioning Activities"] +action.escu.fields_required = ["Region"] +action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 -description = Retrieve the backup logs for the last 2 weeks for a specific host in order to investigate why backups are not completing successfully. +description = This search retrieves all the activity from a specific geographic region and will create a table containing the time, geographic region, ARN, username, the type of user, the source IP address, the AWS region the activity was in, the API called, and whether or not the API call was successful. disabled=true realtime_schedule = 0 schedule_window = auto is_visible = false -search = | search sourcetype="netbackup_logs" dest=$dest$ - -[ESCU - Get Backup Logs For Endpoint] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-08-24 -action.escu.modification_date = 2017-09-14 -action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = You must be ingesting your backup logs. -action.escu.full_search_name = ESCU - Get Backup Logs For Endpoint -action.escu.known_false_positives = None at this time -action.escu.search_type = contextual -action.escu.providing_technologies = ["Netbackup"] -action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] -action.escu.fields_required = ["dest"] -action.escu.earliest_time_offset = 604800 -action.escu.latest_time_offset = 0 -description = This search will tell you the backup status from your netbackup_logs of a specific endpoint for the last week. -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | search sourcetype="netbackup_logs" COMPUTERNAME=$dest$ | rename COMPUTERNAME as dest, MESSAGE as signature | table _time, dest, signature +search = | search sourcetype=aws:cloudtrail | iplocation sourceIPAddress | search Region=$Region$ | spath output=user path=userIdentity.arn | spath output=awsUserName path=userIdentity.userName | spath output=userType path=userIdentity.type | rename sourceIPAddress as src_ip | table _time, Region, user, userName, userType, src_ip, awsRegion, eventName, errorCode [ESCU - Child Processes of Spoolsv.exe - Rule] action.escu = 0 @@ -3872,56 +3821,6 @@ schedule_window = auto is_visible = false search = | tstats `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)` | `ctime(firstTime)` | `ctime(lastTime)` -[ESCU - Malicious PowerShell Process - Connect To Internet With Hidden Window - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2016-09-18 -action.escu.modification_date = 2018-12-03 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search looks for PowerShell processes running with specific command-line arguments that indicate that the process will download a file from the Internet without display anything to the user. The search for "*-Exec*" is to check and see if the default execution policy for PowerShell is being overridden on the command-line. The search for "*-WindowStyle*" and "*hidden*" are to see if the window that would normally be displayed will be hidden from the user instead. Finally, the search for "*New-Object*" and "*System.Net.WebClient*" are there to check to see if a PowerShell object that can be used to download files will be created. This search will return the host, the user the process ran under, the process and it's command-line arguments, the number of times it's seen this process, and the first and last times it saw this process. -action.escu.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. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Malicious PowerShell Process - Connect To Internet With Hidden Window - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "PowerShell", "Scripting"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} -action.escu.known_false_positives = Legitimate process can have this combination of command-line options, but it's not common. -action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Malicious PowerShell", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Malicious PowerShell Process - Connect To Internet With Hidden Window -action.notable = 1 -action.notable.param.nes_fields = dest, user, process_name -action.notable.param.rule_description = The system $dest$ executed a PowerShell process that connects to the Internet with a hidden window. -action.notable.param.rule_title = Malicious PowerShell Process detected on $dest$ -action.notable.param.security_domain = endpoint -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 75 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = process_name, dest -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = 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. -dispatch.earliest_time = -70m@m -dispatch.latest_time = -10m@m -disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | tstats `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 | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` | search process="*-Exec*" process="*-WindowStyle*" process="*hidden*" process="*New-Object*" process="*System.Net.WebClient*" - [ESCU - Get Process responsible for the DNS traffic] action.escu = 0 action.escu.enabled = 1 @@ -3935,7 +3834,7 @@ action.escu.full_search_name = ESCU - Get Process responsible for the DNS traffi action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Host Redirection", "Data Protection", "Brand Monitoring", "Dynamic DNS", "Command and Control"] +action.escu.analytic_story = ["Data Protection", "Suspicious DNS Traffic", "Command and Control", "Host Redirection", "Brand Monitoring", "Dynamic DNS"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 86400 @@ -3962,7 +3861,7 @@ action.escu.mappings = {"mitre_attack": ["Exfiltration", "Exfiltration Over Comm action.escu.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. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Prohibited Traffic Allowed or Protocol Mismatch", "Data Protection", "Dynamic DNS", "Command and Control"] +action.escu.analytic_story = ["Data Protection", "Suspicious DNS Traffic", "Command and Control", "Prohibited Traffic Allowed or Protocol Mismatch", "Dynamic DNS"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect hosts connecting to dynamic domain providers action.notable = 1 @@ -3971,7 +3870,7 @@ action.notable.param.rule_description = The search has detected a host making ou action.notable.param.rule_title = Host $src$ detected to make a query to a Dynamic DNS provider action.notable.param.security_domain = network action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - AWS Network Interface details via resourceId\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get All AWS Activity From IP Address\n - ESCU - Get DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Get Process responsible for the DNS traffic\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get Process responsible for the DNS traffic\n - ESCU - Investigate Web Activity From src_ip\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -4110,76 +4009,29 @@ schedule_window = auto is_visible = false search = | tstats summariesonly=true allow_old_summaries=true latest(_time) as latestTime from datamodel=Updates where Updates.status=Installed Updates.vendor_product="Microsoft Windows" by Updates.dest Updates.status Updates.vendor_product | rename Updates.dest as Host | rename Updates.status as "Update Status" | rename Updates.vendor_product as Product | eval isOutlier=if(latestTime <= relative_time(now(), "-60d@d"), 1, 0) | `ctime(latestTime)` | search isOutlier=1 | rename latestTime as "Last Update Time", | table Host, "Update Status", Product, "Last Update Time" -[ESCU - Detect Spike in AWS API Activity - Rule] +[ESCU - Get Vulnerability Logs For Endpoint] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-12 -action.escu.modification_date = 2018-04-09 -action.escu.asset_at_risk = AWS Instance +action.escu.creation_date = 2017-08-24 +action.escu.modification_date = 2017-09-10 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search and its corresponding subsearch run through a series of steps, as per the following: \ -\ -1. Retrieves all the AWS CloudTrail log entries that have recorded AWS API calls.\ -\ -1. Kicks off a subsearch that retrieves the same data and pulls out the ARN into a more friendly format.\ -\ -1. Counts the number of API calls per ARN.\ -\ -1. Loads the cache file that contains the number of data points, the count from the latest hour, the API call average, and the standard deviation for each ARN.\ -\ -1. Drops the count from the latest hour, since it is not necessary, and merges the rest of the data with the results of the stats command. \ -\ -1. Renames `apiCalls` as `latestCount`.\ -\ -1. Calculates the new average value for each ARN with the latest count, weighting the past much more heavily than the current hour. It does the same for the standard deviation--weighting the past more heavily than the current.\ -\ -1. Updates the cache file with the latest results.\ -\ -1. Sets the minimum threshold for the number of data points and sets the number of standard deviations away from the mean it must be to be considered a spike.\ -\ -1. Makes a determination regarding whether or not the current count is a spike by checking to see if the minimum data-point threshold has been met and the count is a sufficient number of standard deviations away from the average.\ -\ -1. Filters out anything that it determines is not a spike and returns the list of ARNs to the main search. The main search subsequently gets the names of all the API calls, the number of unique API calls, and the total number of API calls for each of these ARNs. Finally, it looks up the average and standard deviation and returns both the average and the number of standard deviations the spike is from the average. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the minimum number of data points required to have a statistically significant amount of data to determine. The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. -action.escu.full_search_name = ESCU - Detect Spike in AWS API Activity - Rule -action.escu.mappings = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} -action.escu.known_false_positives = -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS User Monitoring"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Spike in AWS API Activity -action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = A spike in the number of AWS API calls by $user$ was detected. -action.notable.param.rule_title = Spike in AWS API activity detected by $user$ -action.notable.param.security_domain = network -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Investigate AWS User Activities by user field\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = user -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 30 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = user -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = This search will detect users creating spikes of API activity in your AWS environment. It will also update the cache file that factors in the latest data. -dispatch.earliest_time = -70m@m -dispatch.latest_time = -10m@m +action.escu.eli5 = none +action.escu.how_to_implement = You need to be ingesting the logs from your vulnerability scanner. +action.escu.data_models = ["Vulnerabilities"] +action.escu.full_search_name = ESCU - Get Vulnerability Logs For Endpoint +action.escu.known_false_positives = None at this time +action.escu.search_type = contextual +action.escu.providing_technologies = ["Nessus"] +action.escu.analytic_story = ["Ransomware", "ColdRoot MacOS RAT", "ColdRoot MacOS RAT", "SamSam Ransomware"] +action.escu.fields_required = ["dest"] +action.escu.earliest_time_offset = 604800 +action.escu.latest_time_offset = 0 +description = This search will show you any vulnerabilities noted for a specific endpoint for the last week. disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail eventType=AwsApiCall [search sourcetype=aws:cloudtrail eventType=AwsApiCall | spath output=arn path=userIdentity.arn | stats count as apiCalls by arn | inputlookup api_call_by_user_baseline append=t | fields - latestCount | stats values(*) as * by arn | rename apiCalls as latestCount | eval newAvgApiCalls=avgApiCalls + (latestCount-avgApiCalls)/720 | eval newStdevApiCalls=sqrt(((pow(stdevApiCalls, 2)*719 + (latestCount-newAvgApiCalls)*(latestCount-avgApiCalls))/720)) | eval avgApiCalls=coalesce(newAvgApiCalls, avgApiCalls), stdevApiCalls=coalesce(newStdevApiCalls, stdevApiCalls), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) | table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls | outputlookup api_call_by_user_baseline | eval dataPointThreshold = 15, deviationThreshold = 3 | eval isSpike=if((latestCount > avgApiCalls+deviationThreshold*stdevApiCalls) AND numDataPoints > dataPointThreshold, 1, 0) | where isSpike=1 | rename arn as userIdentity.arn | table userIdentity.arn] | spath output=user userIdentity.arn | stats values(eventName) as eventNames, count as numberOfApiCalls, dc(eventName) as uniqueApisCalled by user +search = | from datamodel Vulnerabilities.Vulnerabilities | search dest=$dest$ [ESCU - Detect USB device insertion - Rule] action.escu = 0 @@ -4280,44 +4132,45 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*sdbinst* cmdline="*-p*" cmdline="*-q*" | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` -[ESCU - Abnormally High AWS Instances Launched by User - Rule] +[ESCU - Detect malicious requests to exploit JBoss servers - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-02-26 -action.escu.modification_date = 2018-02-26 -action.escu.asset_at_risk = AWS Instance +action.escu.creation_date = 2016-10-04 +action.escu.modification_date = 2017-09-23 +action.escu.asset_at_risk = Web Server action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = In this search, we query CloudTrail logs to look for events where an instance is successfully launched by a particular user. Since we want to detect a high number of instances launched within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances launched by a particular user, as well as the average and standard deviation values. Assign a `threshold_value` in the search. Start with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier 1 if the number of instances is greater than the average number of instances terminated, added to the multiplied value of threshold and standard deviation. For your reference, we then keep only the outliers and calculate the number of standard deviations away the value is from the average. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. The threshold value should be tuned to your environment. -action.escu.full_search_name = ESCU - Abnormally High AWS Instances Launched by User - Rule -action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["DE.DP", "DE.AE"]} -action.escu.known_false_positives = Many service accounts configured within an AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify if this search alerted on a human user. +action.escu.confidence = high +action.escu.eli5 = This search looks for HTTP requests for a URL that has been used to exploit JBoss servers. +action.escu.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 +action.escu.data_models = ["Web"] +action.escu.full_search_name = ESCU - Detect malicious requests to exploit JBoss servers - Rule +action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Exploitation of Vulnerability"], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 12", "CIS 4", "CIS 18"], "nist": ["ID.RA", "PR.PT", "PR.IP", "DE.AE", "PR.MA", "DE.CM"]} +action.escu.known_false_positives = No known false positives for this detection. action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] +action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] +action.escu.analytic_story = ["JBoss Vulnerability", "SamSam Ransomware"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Abnormally High AWS Instances Launched by User +action.correlationsearch.label = Detect malicious requests to exploit JBoss servers action.notable = 1 -action.notable.param.nes_fields = userName -action.notable.param.rule_description = An abnormally high number of instances were launched by a user within in a 10-minute window -action.notable.param.rule_title = High Number of instances launched by $userName$ +action.notable.param.nes_fields = src, dest_ip +action.notable.param.rule_description = A search for detecting malicious requests made to exploit jmx-console in JBoss servers. The bad requests have a long url length since it serves the payload via the url +action.notable.param.rule_title = Detected malicious requests to exploit JBoss servers action.notable.param.security_domain = network -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get EC2 Launch Details\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n"} +action.notable.param.severity = high +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = userName -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 30 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 80 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = userName -alert.suppress.period = 3600s -cron_schedule = */10 * * * * -description = This search looks for CloudTrail events where a user successfully launches an abnormally high number of instances. -dispatch.earliest_time = -30d@d +alert.suppress.fields = dest,url,src +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = 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. +dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -4327,7 +4180,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | bucket span=10m _time | stats count AS instances_launched by _time userName | eventstats avg(instances_launched) as total_launched_avg, stdev(instances_launched) as total_launched_stdev | eval threshold_value = 4 | eval isOutlier=if(instances_launched > total_launched_avg+(total_launched_stdev * threshold_value), 1, 0) | search isOutlier=1 AND _time >= relative_time(now(), "-10m@m") | eval num_standard_deviations_away = round(abs(instances_launched - total_launched_avg) / total_launched_stdev, 2) | table _time, userName, instances_launched, num_standard_deviations_away, total_launched_avg, total_launched_stdev +search = | tstats `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")` | `ctime(firstTime)` | `ctime(lastTime)` | table src, dest_ip, http_method, url, firstTime, lastTime [ESCU - Detect Excessive User Account Lockouts - Rule] action.escu = 0 @@ -4378,29 +4231,28 @@ schedule_window = auto is_visible = false search = sourcetype=WinEventLog:Security EventCode=4740 | stats count min(_time) as firstTime max(_time) as lastTime by user, signature | `ctime(firstTime)` | `ctime(lastTime)` | search count > 5 -[ESCU - Get Vulnerability Logs For Endpoint] +[ESCU - Get All AWS Activity From City] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-24 -action.escu.modification_date = 2017-09-10 +action.escu.creation_date = 2018-03-19 +action.escu.modification_date = 2018-03-19 action.escu.channel = ESCU action.escu.eli5 = none -action.escu.how_to_implement = You need to be ingesting the logs from your vulnerability scanner. -action.escu.data_models = ["Vulnerabilities"] -action.escu.full_search_name = ESCU - Get Vulnerability Logs For Endpoint +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. +action.escu.full_search_name = ESCU - Get All AWS Activity From City action.escu.known_false_positives = None at this time -action.escu.search_type = contextual -action.escu.providing_technologies = ["Nessus"] -action.escu.analytic_story = ["ColdRoot MacOS RAT", "Ransomware", "SamSam Ransomware", "ColdRoot MacOS RAT"] -action.escu.fields_required = ["dest"] -action.escu.earliest_time_offset = 604800 +action.escu.search_type = investigative +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Suspicious Provisioning Activities"] +action.escu.fields_required = ["City"] +action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 -description = This search will show you any vulnerabilities noted for a specific endpoint for the last week. +description = This search retrieves all the activity from a specific city and will create a table containing the time, city, ARN, username, the type of user, the source IP address, the AWS region the activity was in, the API called, and whether or not the API call was successful. disabled=true realtime_schedule = 0 schedule_window = auto is_visible = false -search = | from datamodel Vulnerabilities.Vulnerabilities | search dest=$dest$ +search = | search sourcetype=aws:cloudtrail | iplocation sourceIPAddress | search City=$City$ | spath output=user path=userIdentity.arn | spath output=awsUserName path=userIdentity.userName | spath output=userType path=userIdentity.type | rename sourceIPAddress as src_ip | table _time, City, user, userName, userType, src_ip, awsRegion, eventName, errorCode [ESCU - RunDLL Loading DLL By Ordinal - Rule] action.escu = 0 @@ -4463,7 +4315,7 @@ action.escu.full_search_name = ESCU - Get Notable Info action.escu.known_false_positives = None at this time action.escu.search_type = contextual action.escu.providing_technologies = ["Splunk Enterprise Security"] -action.escu.analytic_story = ["Suspicious AWS Login Activities", "Windows Persistence Techniques", "Hidden Cobra Malware", "Credential Dumping", "Windows Defense Evasion Tactics", "Malicious PowerShell", "Suspicious WMI Use", "Lateral Movement", "Use of Cleartext Protocols", "Splunk Enterprise Vulnerability", "JBoss Vulnerability", "Asset Tracking", "DHS Report TA18-074A", "Disabling Security Tools", "Suspicious DNS Traffic", "Orangeworm Attack Group", "Splunk Enterprise Vulnerability CVE-2018-11409", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "Router & Infrastructure Security", "Host Redirection", "Monitor for Updates", "Suspicious AWS Traffic", "Web Fraud Detection", "Data Protection", "Collection and Staging", "Windows Log Manipulation", "Brand Monitoring", "Windows Privilege Escalation", "AWS Network ACL Activity", "Windows Service Abuse", "Dynamic DNS", "Emotet Malware (TA18-201A)", "AWS User Monitoring", "Spectre And Meltdown Vulnerabilities", "Suspicious AWS S3 Activities", "Apache Struts Vulnerability", "Windows File Extension and Association Abuse", "DNS Amplification Attacks", "Account Monitoring and Controls", "SQL Injection", "Command and Control", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Collection and Staging", "Hidden Cobra Malware", "Credential Dumping", "Data Protection", "Windows Persistence Techniques", "Suspicious DNS Traffic", "Suspicious AWS S3 Activities", "Windows Log Manipulation", "Splunk Enterprise Vulnerability", "Asset Tracking", "SQL Injection", "Emotet Malware (TA18-201A)", "Spectre And Meltdown Vulnerabilities", "Command and Control", "Orangeworm Attack Group", "DHS Report TA18-074A", "Suspicious AWS EC2 Activities", "Host Redirection", "Malicious PowerShell", "Router & Infrastructure Security", "Suspicious WMI Use", "JBoss Vulnerability", "Windows Service Abuse", "Account Monitoring and Controls", "Use of Cleartext Protocols", "Brand Monitoring", "Disabling Security Tools", "AWS User Monitoring", "Apache Struts Vulnerability", "Lateral Movement", "AWS Network ACL Activity", "Monitor for Updates", "Windows Defense Evasion Tactics", "Windows File Extension and Association Abuse", "Splunk Enterprise Vulnerability CVE-2018-11409", "Web Fraud Detection", "DNS Amplification Attacks", "Dynamic DNS", "Suspicious Command-Line Executions", "Suspicious AWS Traffic", "Suspicious AWS Login Activities", "Windows Privilege Escalation"] action.escu.fields_required = ["event_id"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -4474,45 +4326,45 @@ schedule_window = auto is_visible = false search = | search `notable_by_id($event_id$)` | table time, rule_name, dest, dest_asset_id, dest_owner, priority, severity, owner, status_description -[ESCU - Windows hosts file modification - Rule] +[ESCU - Identify New User Accounts - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-07 -action.escu.modification_date = 2018-11-02 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2017-08-05 +action.escu.modification_date = 2017-09-12 +action.escu.asset_at_risk = Domain Server action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = The hosts file is present on both Windows and Linux endpoints. The purpose of the hosts file is to provide a mapping between hostnames and IP addresses, the same way DNS is used to provide such a mapping. However, the information in the hosts file takes precedence over information received via DNS and a DNS query will not be issued if the hostname of interest is found in the hosts file. As such, attackers have been observed adding entries to the host file to override any DNS resolution. For this reason, it is useful to monitor for changes to this file, which typically do not occur very often in legitimate cases. -action.escu.how_to_implement = To successfully implement this search, you must be ingesting data that records the file-system activity from your hosts to populate the Endpoint.Filesystem data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or by other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Windows hosts file modification - Rule -action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 3", "CIS 8", "CIS 12"], "nist": ["PR.IP", "PR.PT", "PR.AC", "DE.AE", "DE.CM"]} -action.escu.known_false_positives = There may be legitimate reasons for system administrators to add entries to this file. +action.escu.confidence = medium +action.escu.eli5 = Adversaries will often seek to create new user accounts as a means of maintaining access to a target environment. Using this search, we identify accounts created in the last week by comparing the start date in the Identity_Management data model against the current time. +action.escu.how_to_implement = To successfully implement this search, you need to be populating the Enterprise Security Identity_Management data model in the assets and identity framework. +action.escu.data_models = ["Identity_Management"] +action.escu.full_search_name = ESCU - Identify New User Accounts - Rule +action.escu.mappings = {"mitre_attack": ["Valid Accounts"], "cis20": ["CIS 16"], "nist": ["PR.IP"]} +action.escu.known_false_positives = If the Identity_Management data model is not updated regularly, this search could give you false positive alerts. Please consider this and investigate appropriately. action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Host Redirection"] +action.escu.providing_technologies = ["Active Directory"] +action.escu.analytic_story = ["Account Monitoring and Controls"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Windows hosts file modification +action.correlationsearch.label = Identify New User Accounts action.notable = 1 -action.notable.param.nes_fields = dest, file_name -action.notable.param.rule_description = A file modification was noted for the hosts file on $dest$. -action.notable.param.rule_title = Modification of hosts file detected on $dest$ -action.notable.param.security_domain = endpoint -action.notable.param.severity = high -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get DNS Server History for a host\n - ESCU - Get Process responsible for the DNS traffic\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.nes_fields = user +action.notable.param.rule_description = Using the identities lookup and macro from Enterprise Security to identify (report) new users (6 month period) and temp users (3 months until account expiration) +action.notable.param.rule_title = Identify Temporary Users +action.notable.param.security_domain = access +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Logon Rights Modifications For Endpoint\n - ESCU - Get Logon Rights Modifications For User\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = dest +action.risk.param._risk_object = user action.risk.param._risk_object_type = system -action.risk.param._risk_score = 80 +action.risk.param._risk_score = 40 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest,user +alert.suppress.fields = identity alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = The search looks for modifications to the hosts file on all Windows endpoints across your environment. -dispatch.earliest_time = -70m@m +cron_schedule = 0 0 * * * +description = This detection search will help profile user accounts in your environment by identifying newly created accounts that have been added to your network in the past week. +dispatch.earliest_time = -24h@h dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -4522,7 +4374,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem by Filesystem.file_name Filesystem.file_path Filesystem.dest | `ctime(lastTime)` | `ctime(firstTime)` | search Filesystem.file_name=hosts AND Filesystem.file_path=*Windows\\System32\\* | `drop_dm_object_name(Filesystem)` +search = | from datamodel Identity_Management.All_Identities | eval empStatus=case((now()-startDate)<604800, "Accounts created in last week") | search empStatus="Accounts created in last week"| `ctime(endDate)` | `ctime(startDate)`| table identity empStatus endDate startDate [ESCU - Unsuccessful Netbackup backups - Rule] action.escu = 0 @@ -4781,7 +4633,7 @@ action.escu.full_search_name = ESCU - Get Risk Modifiers For User action.escu.known_false_positives = None at this time action.escu.search_type = contextual action.escu.providing_technologies = ["Splunk Enterprise Security"] -action.escu.analytic_story = ["Windows Persistence Techniques", "ColdRoot MacOS RAT", "Hidden Cobra Malware", "Ransomware", "Credential Dumping", "Malicious PowerShell", "Suspicious WMI Use", "Lateral Movement", "SamSam Ransomware", "Use of Cleartext Protocols", "Netsh Abuse", "Splunk Enterprise Vulnerability", "JBoss Vulnerability", "Asset Tracking", "DHS Report TA18-074A", "Disabling Security Tools", "Suspicious Windows Registry Activities", "Suspicious Emails", "Unusual Processes", "ColdRoot MacOS RAT", "Monitor for Unauthorized Software", "Suspicious DNS Traffic", "Orangeworm Attack Group", "Prohibited Traffic Allowed or Protocol Mismatch", "Suspicious MSHTA Activity", "Router & Infrastructure Security", "Host Redirection", "Monitor for Updates", "Data Protection", "Collection and Staging", "Windows Log Manipulation", "Brand Monitoring", "Windows Privilege Escalation", "Windows Service Abuse", "Dynamic DNS", "Monitor Backup Solution", "Emotet Malware (TA18-201A)", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Windows File Extension and Association Abuse", "DNS Amplification Attacks", "Account Monitoring and Controls", "SQL Injection", "Command and Control", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Collection and Staging", "Unusual Processes", "Hidden Cobra Malware", "Credential Dumping", "Data Protection", "Ransomware", "Windows Persistence Techniques", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Windows Log Manipulation", "Splunk Enterprise Vulnerability", "Asset Tracking", "SQL Injection", "Emotet Malware (TA18-201A)", "Spectre And Meltdown Vulnerabilities", "Command and Control", "Orangeworm Attack Group", "Suspicious Emails", "DHS Report TA18-074A", "Host Redirection", "Malicious PowerShell", "Router & Infrastructure Security", "Suspicious WMI Use", "JBoss Vulnerability", "Windows Service Abuse", "Monitor Backup Solution", "Account Monitoring and Controls", "Use of Cleartext Protocols", "Brand Monitoring", "Disabling Security Tools", "Apache Struts Vulnerability", "Lateral Movement", "Suspicious MSHTA Activity", "ColdRoot MacOS RAT", "Monitor for Updates", "Windows File Extension and Association Abuse", "Prohibited Traffic Allowed or Protocol Mismatch", "Netsh Abuse", "DNS Amplification Attacks", "Monitor for Unauthorized Software", "SamSam Ransomware", "Dynamic DNS", "Suspicious Windows Registry Activities", "Windows Privilege Escalation"] action.escu.fields_required = ["user"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 @@ -4792,51 +4644,79 @@ schedule_window = auto is_visible = false search = | from datamodel:Risk.All_Risk | search risk_object_type=user risk_object=$user$ | stats count sum(risk_score) as risk_score values(search_name) min(_time) as firstTime max(_time) as lastTime by risk_object |`ctime(firstTime)` |`ctime(lastTime)` -[ESCU - Get Process Info] +[ESCU - Investigate Web Activity From Host] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-03-15 +action.escu.creation_date = 2017-04-21 action.escu.modification_date = 2017-11-09 action.escu.channel = ESCU action.escu.eli5 = none -action.escu.how_to_implement = To successfully implement this search you must be ingesting endpoint data and populating the Application_State data model. -action.escu.data_models = ["Application_State"] -action.escu.full_search_name = ESCU - Get Process Info +action.escu.how_to_implement = To successfully implement this search you must be ingesting your web traffic and populating the Web data model. +action.escu.data_models = ["Web"] +action.escu.full_search_name = ESCU - Investigate Web Activity From Host action.escu.known_false_positives = None at this time action.escu.search_type = investigative -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Hidden Cobra Malware", "Ransomware", "Credential Dumping", "Windows Defense Evasion Tactics", "Malicious PowerShell", "Suspicious WMI Use", "Lateral Movement", "SamSam Ransomware", "Netsh Abuse", "DHS Report TA18-074A", "Disabling Security Tools", "Suspicious Windows Registry Activities", "Unusual Processes", "Monitor for Unauthorized Software", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Suspicious MSHTA Activity", "Collection and Staging", "Windows Log Manipulation", "Windows Privilege Escalation", "Windows Service Abuse", "Emotet Malware (TA18-201A)", "Windows File Extension and Association Abuse", "Command and Control", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] -action.escu.fields_required = ["process", "dest"] -action.escu.earliest_time_offset = 7200 -action.escu.latest_time_offset = 7200 -description = This search queries the Application State data model to give you details about the process running on a host which is under investigation. To gather the process info, enter the values for the process name in question and the destination IP address. +action.escu.providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] +action.escu.analytic_story = ["Unusual Processes", "Credential Dumping", "Ransomware", "Emotet Malware (TA18-201A)", "Orangeworm Attack Group", "Suspicious Emails", "Host Redirection", "Brand Monitoring", "Netsh Abuse", "Monitor for Unauthorized Software", "SamSam Ransomware", "Suspicious Command-Line Executions"] +action.escu.fields_required = ["dest"] +action.escu.earliest_time_offset = 3600 +action.escu.latest_time_offset = 3600 +description = This search allows you to find all the web activity from a specific host. During an investigation, it is important to profile web activity to characterize user or host activity. disabled=true realtime_schedule = 0 schedule_window = auto is_visible = false -search = | from datamodel Application_State.Processes | search process=*$process$* dest=$dest$ +search = | from datamodel Web.Web | search src=$dest$ -[ESCU - Previously seen API call per user roles in CloudTrail] +[ESCU - Spike in File Writes - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-01 -action.escu.modification_date = 2018-04-16 +action.escu.creation_date = 2017-08-20 +action.escu.modification_date = 2018-12-03 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = In this support search, we are looking for successful API calls made by user roles within your AWS infrastructure. The intent is to create an initial baseline cache of names of the API calls per security role for the previous 30 days--including the earliest and latest times seen in our dataset--grouped by the value of user role and the name of the API call. It is also worth noting that the role of a particular user is parsed as "userName" in the CloudTrail logs. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Please validate the user role entries in `previously_seen_api_calls_from_user_roles.csv`, which is a lookup file created as a result of running this support search. -action.escu.full_search_name = ESCU - Previously seen API call per user roles in CloudTrail -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS User Monitoring"] -description = This search looks for successful API calls made by different user roles, then creates a baseline of the earliest and latest times we have encountered this user role. It also returns the name of the API call in our dataset--grouped by user role and name of the API call--that occurred within the last 30 days. In this support search, we are only looking for events where the user identity is Assumed Role. -dispatch.earliest_time = -30d@d +action.escu.confidence = low +action.escu.eli5 = This search calculates counts the number of file modification events per hour per host in your environment. It then takes the average and standard deviations of those numbers and displays any hosts with more than 20 events that have over four times the standard deviation more than the average number of file modifications. +action.escu.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 products, 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. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Spike in File Writes - Rule +action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +action.escu.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. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Spike in File Writes +action.notable = 1 +action.notable.param.nes_fields = dest +action.notable.param.rule_description = A sharp increase in file writes was detected on $dest +action.notable.param.rule_title = Spike in file writes on $dest$ +action.notable.param.security_domain = endpoint +action.notable.param.severity = low +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 30 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest +alert.suppress.period = 7200s +cron_schedule = 0 * * * * +description = The search looks for a sharp increase in the number of files written to a particular host +dispatch.earliest_time = -7d@d dispatch.latest_time = -10m@m disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail eventType=AwsApiCall errorCode=success userIdentity.type=AssumedRole | stats earliest(_time) as earliest latest(_time) as latest by userName eventName | outputlookup previously_seen_api_calls_from_user_roles | stats count +search = | tstats `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 [ESCU - Detect New Open S3 buckets - Rule] action.escu = 0 @@ -4986,67 +4866,45 @@ schedule_window = auto is_visible = false search = | tstats `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 -[ESCU - Get Web Session Information via session_id] +[ESCU - AWS Cloud Provisioning From Previously Unseen IP Address - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-10-08 -action.escu.modification_date = 2018-10-08 -action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = This search leverages data extracted from Stream:HTTP. You must configure the HTTP stream using the Splunk Stream App on your Splunk Stream deployment server. -action.escu.full_search_name = ESCU - Get Web Session Information via session_id -action.escu.known_false_positives = None at this time -action.escu.search_type = investigative -action.escu.providing_technologies = ["Splunk Stream"] -action.escu.analytic_story = ["Web Fraud Detection"] -action.escu.fields_required = ["session_id"] -action.escu.earliest_time_offset = 3600 -action.escu.latest_time_offset = 3600 -description = This search helps an analyst investigate a notable event to find out more about a specific web session. The search looks for a specific web session ID in the HTTP web traffic and outputs the URL and user agents, grouped by source IP address and HTTP status code. -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | search sourcetype=stream:http $session_id$ | stats values(url) values(http_user_agent) by src_ip status - -[ESCU - Execution of File With Spaces Before Extension - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-01-26 -action.escu.modification_date = 2018-01-26 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-03-16 +action.escu.modification_date = 2018-03-16 +action.escu.asset_at_risk = AWS Instance action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = This search uses the endpoint data model to look for process names with at least five spaces between the file name and its extension. -action.escu.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. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Execution of File With Spaces Before Extension - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Persistence", "Change Default File Association"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["DE.CM", "PR.PT", "PR.IP"]} -action.escu.known_false_positives = None identified. +action.escu.eli5 = The subsearch returns all events with event names that start with "Run" or "Create," and then does a `GeoIP` lookup on the IP address that initiated the action within the last hour. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for each country, region, city, and IP address and outputs this data to the lookup file to update the local cache. It then calculates the `firstTime` and `lastTime` for each city. It returns only those events from IP addresses that have first been seen in the past hour. This is combined with the main search to return the time, user, IP address, city, event name, and error code from the action. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen AWS Provisioning Activity Sources" support search once to create a history of previously seen locations that have provisioned AWS resources. +action.escu.full_search_name = ESCU - AWS Cloud Provisioning From Previously Unseen IP Address - Rule +action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +action.escu.known_false_positives = This is a strictly behavioral search, so we define "false positive" slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you're searching within, plus what is stored in the cache feature. But while there are really no "false positives" in a traditional sense, there is definitely lots of noise.\ +\ + This search will fire any time a new IP address is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your country, there should be few false positives. If you are located in countries where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you. action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows File Extension and Association Abuse"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Suspicious Provisioning Activities"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Execution of File With Spaces Before Extension +action.correlationsearch.label = AWS Cloud Provisioning From Previously Unseen IP Address action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = The system $dest$ executed a file with spaces before its extension. -action.notable.param.rule_title = Process $process$ with spaces before extension Launched on $dest$ +action.notable.param.nes_fields = src_ip +action.notable.param.rule_description = Your AWS infrastructure was provisioned from an IP, $src_ip$, which has never before been seen provisioning your infrastructure. +action.notable.param.rule_title = AWS Provision Activity From $src_ip$ action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get All AWS Activity From City\n - ESCU - Get All AWS Activity From Country\n - ESCU - Get All AWS Activity From IP Address\n - ESCU - Get All AWS Activity From Region\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = dest +action.risk.param._risk_object = src_ip action.risk.param._risk_object_type = system -action.risk.param._risk_score = 60 +action.risk.param._risk_score = 30 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest,process -alert.suppress.period = 28800s +alert.suppress.fields = src_ip +alert.suppress.period = 14400s cron_schedule = 0 * * * * -description = This search looks for processes launched from files with at least five spaces in the name before the extension. This is typically done to obfuscate the file extension by pushing it outside of the default view. +description = This search looks for AWS provisioning activities from previously unseen IP addresses. Provisioning activities are defined broadly as any event that begins with "Run" or "Create." dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -5057,7 +4915,57 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count values(Processes.process_path) as process_path min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process = "* .*" by Processes.dest Processes.user Processes.process Processes.process_name | `ctime(firstTime)`| `ctime(lastTime)` | `drop_dm_object_name(Processes)` +search = sourcetype=aws:cloudtrail (eventName=Run* OR eventName=Create*) | iplocation sourceIPAddress | search Country=* [search sourcetype=aws:cloudtrail (eventName=Run* OR eventName=Create*) | iplocation sourceIPAddress | search Country=* | stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country | inputlookup append=t previously_seen_provisioning_activity_src.csv | stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country | outputlookup previously_seen_provisioning_activity_src.csv | stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress | eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newIP=1 | table sourceIPAddress] | spath output=user userIdentity.arn | rename sourceIPAddress as src_ip | table _time, user, src_ip, eventName, errorCode + +[ESCU - Remote Desktop Network Traffic - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2016-09-13 +action.escu.modification_date = 2017-09-15 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = This search finds systems that do not commonly communicate use remote desktop. It does this by filtering out all systems that have the "common_rdp_source" or "common_rdp_destination" category applied to that system. Categories are applied to systems using the Assets and Identity framework. +action.escu.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. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Remote Desktop Network Traffic - Rule +action.escu.mappings = {"mitre_attack": ["Lateral Movement", "Remote Desktop Protocol", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 9", "CIS 16"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} +action.escu.known_false_positives = Remote Desktop may be used legitimately by users on the network. +action.escu.search_type = detection +action.escu.providing_technologies = ["Bro", "Splunk Stream"] +action.escu.analytic_story = ["Hidden Cobra Malware", "Lateral Movement", "SamSam Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Remote Desktop Network Traffic +action.notable = 1 +action.notable.param.nes_fields = dest, src +action.notable.param.rule_description = Remote Desktop Traffic detected between $src$ and $dest$. These two systems typically do not communicate with RDP +action.notable.param.rule_title = Uncommon Remote Desktop Network Traffic between $src$ and $dest$ +action.notable.param.security_domain = network +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = src +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 50 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest,src +alert.suppress.period = 28800s +cron_schedule = 0 * * * * +description = 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 allows for whitelisting both source and destination hosts to remove them from the output of the search so you can focus on the uncommon uses of remote desktop on your network. +dispatch.earliest_time = -70m@m +dispatch.latest_time = -10m@m +disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | tstats `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")` | `ctime(firstTime)`| `ctime(lastTime)` [ESCU - Investigate Network Traffic From src_ip] action.escu = 0 @@ -5133,54 +5041,27 @@ schedule_window = auto is_visible = false search = | tstats `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="*Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options*") by Registry.dest , Registry.status, Registry.user | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name(Registry)` -[ESCU - EC2 Instance Modified With Previously Unseen User - Rule] +[ESCU - Baseline of Network ACL Activity by ARN] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-09 -action.escu.modification_date = 2018-04-09 -action.escu.asset_at_risk = AWS Instance +action.escu.creation_date = 2018-05-21 +action.escu.modification_date = 2018-05-21 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = The subsearch returns the ARNs of all successful EC2 instance modifications within the last hour and then appends the historical data in the lookup file to those results. EC2 modification APIs are defined by the macro `ec2ModificationAPIs`. The search then recalculates the `firstTime` and `lastTime` field for each ARN and returns only those ARNs that have first been seen in the past hour. This is combined with the main search to return the time, user, and instance ID of those systems. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen EC2 Launches By User" support search once to create a history of previously seen ARNs. To add or remove APIs that modify an EC2 instance, edit the macro `ec2ModificationAPIs`. -action.escu.full_search_name = ESCU - EC2 Instance Modified With Previously Unseen User - Rule -action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.known_false_positives = It's possible that a new user will start to modify EC2 instances when they haven't before for any number of reasons. Verify with the user that is modifying instances that this is the intended behavior. -action.escu.search_type = detection +action.escu.eli5 = Use this search to create a baseline for API calls related to network ACLs for the users who initiated this activity. It returns all logged API calls for network activity, pulls out the ARN that initiated each call, and collects the `eventNames` in one-hour groupings. Next, it calculates the number of API calls made per ARN per-hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points for each ARN. This table is stored in a lookup file. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. To add or remove API event names for network ACLs, edit the macro `NetworkACLEvents`. +action.escu.full_search_name = ESCU - Baseline of Network ACL Activity by ARN +action.escu.known_false_positives = None at this time +action.escu.search_type = support action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Unusual AWS EC2 Modifications"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = EC2 Instance Modified With Previously Unseen User -action.notable = 1 -action.notable.param.nes_fields = user, dest -action.notable.param.rule_description = The EC2 instance $dest$ was modified by $user$. This user has never modified an EC2 instance before. -action.notable.param.rule_title = EC2 Instance Modified By Previously Unseen User $user$ -action.notable.param.security_domain = endpoint -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get EC2 Instance Details by instanceId\n - ESCU - Get Notable History\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - AWS Investigate User Activities By ARN\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 30 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = user, dest -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = This search looks for EC2 instances being modified by users who have not previously modified them. -dispatch.earliest_time = -70m@m +action.escu.analytic_story = ["AWS Network ACL Activity"] +description = This search establishes, on a per-hour basis, the average and the standard deviation of the number of API calls that were related to network ACLs made by each user. Also recorded is the number of data points for each user. This table is then outputted to a lookup file to allow the detection search to operate quickly. +dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail `ec2ModificationAPIs` [search sourcetype=aws:cloudtrail `ec2ModificationAPIs` errorCode=success | stats earliest(_time) as firstTime latest(_time) as lastTime by userIdentity.arn | rename userIdentity.arn as arn | inputlookup append=t previously_seen_ec2_modifications_by_user | stats min(firstTime) as firstTime, max(lastTime) as lastTime by arn | outputlookup previously_seen_ec2_modifications_by_user | eval newUser=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newUser=1 | `ctime(firstTime)` | `ctime(lastTime)` | rename arn as userIdentity.arn | table userIdentity.arn] | spath output=dest responseElements.instancesSet.items{}.instanceId | spath output=user userIdentity.arn | table _time, user, dest +search = sourcetype=aws:cloudtrail `NetworkACLEvents` | spath output=arn path=userIdentity.arn | bucket _time span=1h | stats count as apiCalls by _time, arn | stats count(apiCalls) as numDataPoints, latest(apiCalls) as latestCount, avg(apiCalls) as avgApiCalls, stdev(apiCalls) as stdevApiCalls by arn | table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls | outputlookup network_acl_activity_baseline | stats count [ESCU - AWS S3 Bucket details via bucketName] action.escu = 0 @@ -5356,6 +5237,55 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count earliest(_time) as earliest latest(_time) as latest from datamodel=Authentication where Authentication.dest_category=router by Authentication.dest Authentication.user| eval isOutlier=if(earliest >= relative_time(now(), "-30d@d"), 1, 0) | where isOutlier=1| `ctime(earliest)`| `ctime(latest)` | `drop_dm_object_name("Authentication")` +[ESCU - WMI Permanent Event Subscription - Sysmon - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-10-23 +action.escu.modification_date = 2018-10-23 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = Attackers are increasingly abusing Windows Management Infrastructure (WMI) for stealth, persistence, lateral movement, or just to leverage its functionality. This search looks for the creation of a WMI event subscription by watching for Sysmon event ID 21. +action.escu.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. +action.escu.full_search_name = ESCU - WMI Permanent Event Subscription - Sysmon - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Windows Management Instrumentation", "Persistence", "Windows Management Instrumentation Event Subscription"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +action.escu.known_false_positives = Although unlikely, administrators may use event subscriptions for legitimate purposes. +action.escu.search_type = detection +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Suspicious WMI Use"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = WMI Permanent Event Subscription - Sysmon +action.notable = 1 +action.notable.param.nes_fields = dest, user +action.notable.param.rule_description = This search looks for the creation of a permanent WMI event subscription via Sysmon logs. +action.notable.param.rule_title = WMI Event Subscription Detected on $dest$ +action.notable.param.security_domain = endpoint +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Process Info\n - ESCU - Get Sysmon WMI Activity for Host\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 70 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest,user +alert.suppress.period = 28800s +cron_schedule = 0 * * * * +description = This search looks for the creation of WMI permanent event subscriptions. +dispatch.earliest_time = -70m@m +dispatch.latest_time = -10m@m +disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=21 | rename host as dest | table _time, dest, user, Operation, EventType, Query, Consumer, Filter + [ESCU - File with Samsam Extension - Rule] action.escu = 0 action.escu.enabled = 1 @@ -5430,43 +5360,44 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Authentication where Authentication.signature_id=4624 Authentication.app=win:remote by Authentication.src Authentication.dest Authentication.app Authentication.user Authentication.signature Authentication.src_nt_domain | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("Authentication")`| table firstTime lastTime src src_nt_domain dest user app count | sort count -[ESCU - Detect new user AWS Console Login - Rule] +[ESCU - Common Ransomware Extensions - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-02-26 -action.escu.modification_date = 2018-02-26 -action.escu.asset_at_risk = AWS Instance +action.escu.creation_date = 2017-08-21 +action.escu.modification_date = 2018-11-15 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = In this search, we query CloudTrail logs to look for events that indicate that a user has attempted to log in to the AWS console and group the events using ARN value. Using the `previously_seen_users_console_logins.csv` lookup file created using the support search, we compare the ARN to all the previously seen users logging into the AWS console. The `eval` and `if` functions determine whether the earliest time we see this user ARN was seen within the last hour. The alert will be fired only when a user is seen for first time in the last hour. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the "Previously seen users in CloudTrail" support search only once to create a baseline of previously seen IAM users within the last 30 days -action.escu.full_search_name = ESCU - Detect new user AWS Console Login - Rule -action.escu.mappings = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.AE"]} -action.escu.known_false_positives = When a legitimate new user logins for the first time, this activity will be detected. Check how old the account is and verify that the user activity is legitimate. +action.escu.confidence = high +action.escu.eli5 = This search looks at file modifications across your hosts and identifies files with extensions that are commonly associated with the encrypted files generated by ransomware. +action.escu.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. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Common Ransomware Extensions - Rule +action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +action.escu.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. action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS Login Activities"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect new user AWS Console Login +action.correlationsearch.label = Common Ransomware Extensions action.notable = 1 -action.notable.param.nes_fields = arn -action.notable.param.rule_description = A new user has logged into the AWS console -action.notable.param.rule_title = AWS Console Login by New User -action.notable.param.security_domain = network -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - AWS Investigate User Activities By ARN\n"} +action.notable.param.nes_fields = dest, file_name +action.notable.param.rule_description = A file modification was detected on $dest$ with an extension commonly used by ransomware. +action.notable.param.rule_title = Ransomware Extension detected on $dest$ +action.notable.param.security_domain = endpoint +action.notable.param.severity = high +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = arn -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 30 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 80 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = arn -alert.suppress.period = 86400s -cron_schedule = 5 * * * * -description = This search looks for CloudTrail events wherein a console login event by a user was recorded within the last hour, then compares the event to a lookup file of previously seen users (by ARN values) who have logged into the console. The alert is fired if the user has logged into the console for the first time within the last hour +alert.suppress.fields = dest,file_name +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = The search looks for file modifications with extensions commonly used by Ransomware dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -5477,7 +5408,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail eventName=ConsoleLogin | rename userIdentity.arn as arn |stats earliest(_time) as earliest latest(_time) as latest by arn | inputlookup append=t previously_seen_users_console_logins.csv | stats min(earliest) as earliest max(latest) as latest by arn | outputlookup previously_seen_users_console_logins.csv | eval userStatus=if(earliest >= relative_time(now(), "-70m@m"), "First Time Logging into AWS Console","Previously Seen User") | convert ctime(earliest) ctime(latest) | where userStatus ="First Time Logging into AWS Console" +search = | tstats `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)` | `ctime(lastTime)` | `ctime(firstTime)`| rex field=file_name "(?\.[^\.]+)$" | `ransomware_extensions` [ESCU - EC2 Instance Started With Previously Unseen User - Rule] action.escu = 0 @@ -5528,29 +5459,6 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail eventName=RunInstances [search sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | stats earliest(_time) as firstTime latest(_time) as lastTime by userIdentity.arn | rename userIdentity.arn as arn | inputlookup append=t previously_seen_ec2_launches_by_user.csv | stats min(firstTime) as firstTime, max(lastTime) as lastTime by arn | outputlookup previously_seen_ec2_launches_by_user.csv | eval newUser=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newUser=1 | `ctime(firstTime)` | `ctime(lastTime)` | rename arn as userIdentity.arn | table userIdentity.arn] | rename requestParameters.instanceType as instanceType, responseElements.instancesSet.items{}.instanceId as dest, userIdentity.arn as user | table _time, user, dest, instanceType -[ESCU - Identify Systems Using Remote Desktop] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-04-18 -action.escu.modification_date = 2017-09-15 -action.escu.channel = ESCU -action.escu.eli5 = This search counts the numbers of times the remote desktop process, mstsc.exe, has run on each system. It does this by looking for the process in the Application_State data model. -action.escu.how_to_implement = To successfully implement this search you must be ingesting endpoint data that records process activity. -action.escu.data_models = ["Application_State"] -action.escu.full_search_name = ESCU - Identify Systems Using Remote Desktop -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Lateral Movement"] -description = This search counts the numbers of times the remote desktop process, mstsc.exe, has run on each system. -dispatch.earliest_time = -30d@d -dispatch.latest_time = -10m@m -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | tstats `summariesonly` count from datamodel=Application_State where All_Application_State.process="*mstsc.exe*" by All_Application_State.dest All_Application_State.process | `drop_dm_object_name("All_Application_State")` | sort - count - [ESCU - Previously seen command line arguments] action.escu = 0 action.escu.enabled = 1 @@ -5563,7 +5471,7 @@ action.escu.full_search_name = ESCU - Previously seen command line arguments action.escu.known_false_positives = None at this time action.escu.search_type = support action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Hidden Cobra Malware", "DHS Report TA18-074A", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Hidden Cobra Malware", "Orangeworm Attack Group", "DHS Report TA18-074A", "Suspicious Command-Line Executions"] description = This search looks for command-line arguments where `cmd.exe /c` is used to execute a program, then creates a baseline of the earliest and latest times we have encountered this command-line argument in our dataset within the last 30 days. dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m @@ -5673,6 +5581,29 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Change_Analysis.All_Changes where All_Changes.object_category=registry AND (All_Changes.object_path="*CurrentVersion\\AppCompatFlags\\Custom*" OR All_Changes.object_path="*CurrentVersion\\AppCompatFlags\\InstalledSDB*") by All_Changes.dest, All_Changes.command, All_Changes.user, All_Changes.object, All_Changes.object_path | `drop_dm_object_name("All_Changes")` +[ESCU - Get User Information from Identity Table] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-04-10 +action.escu.modification_date = 2017-09-20 +action.escu.channel = ESCU +action.escu.eli5 = none +action.escu.how_to_implement = To successfully implement this search you must have populated the identity table with information about your users. +action.escu.full_search_name = ESCU - Get User Information from Identity Table +action.escu.known_false_positives = None at this time +action.escu.search_type = contextual +action.escu.providing_technologies = ["Splunk Enterprise Security"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Collection and Staging", "Unusual Processes", "Hidden Cobra Malware", "Credential Dumping", "Data Protection", "Ransomware", "Windows Persistence Techniques", "Suspicious DNS Traffic", "Suspicious AWS S3 Activities", "ColdRoot MacOS RAT", "Windows Log Manipulation", "Splunk Enterprise Vulnerability", "Asset Tracking", "SQL Injection", "Emotet Malware (TA18-201A)", "Spectre And Meltdown Vulnerabilities", "Command and Control", "Orangeworm Attack Group", "Suspicious Emails", "DHS Report TA18-074A", "Suspicious AWS EC2 Activities", "Host Redirection", "Malicious PowerShell", "Router & Infrastructure Security", "Suspicious WMI Use", "JBoss Vulnerability", "Windows Service Abuse", "Account Monitoring and Controls", "Use of Cleartext Protocols", "Brand Monitoring", "Disabling Security Tools", "Apache Struts Vulnerability", "Lateral Movement", "Suspicious MSHTA Activity", "ColdRoot MacOS RAT", "AWS Network ACL Activity", "Monitor for Updates", "Windows Defense Evasion Tactics", "Windows File Extension and Association Abuse", "Netsh Abuse", "Monitor for Unauthorized Software", "SamSam Ransomware", "Dynamic DNS", "Suspicious Command-Line Executions", "Suspicious AWS Login Activities", "Suspicious Windows Registry Activities", "Windows Privilege Escalation"] +action.escu.fields_required = ["user"] +action.escu.earliest_time_offset = 864000 +action.escu.latest_time_offset = 86400 +description = Gather more information about the user identified in the Notable Event. +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | `identities` | search identity=$user$ | table _time, identity, first, last, email, category, watchlist + [ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule] action.escu = 0 action.escu.enabled = 1 @@ -5746,29 +5677,6 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:cloudtrail | iplocation sourceIPAddress | search Country=$Country$ | spath output=user path=userIdentity.arn | spath output=awsUserName path=userIdentity.userName | spath output=userType path=userIdentity.type | rename sourceIPAddress as src_ip | table _time, Country, user, userName, userType, src_ip, awsRegion, eventName, errorCode -[ESCU - Windows Updates Install Failures] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-08-24 -action.escu.modification_date = 2017-09-14 -action.escu.channel = ESCU -action.escu.eli5 = This search gives you the count of the number of systems that attempted and failed to install a Windows update each day. -action.escu.how_to_implement = You must be ingesting your Windows Update Logs -action.escu.data_models = ["Updates"] -action.escu.full_search_name = ESCU - Windows Updates Install Failures -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] -description = This search is intended to give you a feel for how often Windows updates fail to install in your environment. Fluctuations in these numbers will allow you to determine when you should be concerned. -dispatch.earliest_time = -30d@d -dispatch.latest_time = -10m@m -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | tstats `summariesonly` dc(Updates.dest) as count FROM datamodel=Updates where Updates.vendor_product="Microsoft Windows" AND Updates.status=failure by _time span=1d - [ESCU - Script Execution via WMI - Rule] action.escu = 0 action.escu.enabled = 1 @@ -5867,88 +5775,44 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail errorCode=success | rename userName as identity | search NOT [| inputlookup identity_lookup_expanded | fields identity] | search NOT [| inputlookup aws_service_accounts | fields identity] | rename identity as user | stats count min(_time) as firstTime max(_time) as lastTime values(eventName) by user | `ctime(firstTime)` | `ctime(lastTime)` -[ESCU - Baseline of S3 Bucket deletion activity by ARN] +[ESCU - Web Fraud - Account Harvesting - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-07-17 -action.escu.modification_date = 2018-07-17 -action.escu.channel = ESCU -action.escu.eli5 = Use this search to create a baseline for API calls related to deleting an S3 bucket, grouped by the users who initiated this activity. It returns all logged API calls for S3 bucket-deletion activity and then pulls out the ARN that initiated each call. Next, it calculates the number of API calls made per ARN per hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points for each ARN. This table is stored in a lookup file. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. -action.escu.full_search_name = ESCU - Baseline of S3 Bucket deletion activity by ARN -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS S3 Activities"] -description = This search establishes, on a per-hour basis, the average and standard deviation for the number of API calls related to deleting an S3 bucket by each user. Also recorded is the number of data points for each user. This table is then outputted to a lookup file to allow the detection search to operate quickly. -dispatch.earliest_time = -90d@d -dispatch.latest_time = -10m@m -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = sourcetype=aws:cloudtrail eventName=DeleteBucket | spath output=arn path=userIdentity.arn | bucket _time span=1h | stats count as apiCalls by _time, arn | stats count(apiCalls) as numDataPoints, latest(apiCalls) as latestCount, avg(apiCalls) as avgApiCalls, stdev(apiCalls) as stdevApiCalls by arn | table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls | outputlookup s3_deletion_baseline | stats count - -[ESCU - Baseline of Network ACL Activity by ARN] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-05-21 -action.escu.modification_date = 2018-05-21 -action.escu.channel = ESCU -action.escu.eli5 = Use this search to create a baseline for API calls related to network ACLs for the users who initiated this activity. It returns all logged API calls for network activity, pulls out the ARN that initiated each call, and collects the `eventNames` in one-hour groupings. Next, it calculates the number of API calls made per ARN per-hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points for each ARN. This table is stored in a lookup file. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. To add or remove API event names for network ACLs, edit the macro `NetworkACLEvents`. -action.escu.full_search_name = ESCU - Baseline of Network ACL Activity by ARN -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Network ACL Activity"] -description = This search establishes, on a per-hour basis, the average and the standard deviation of the number of API calls that were related to network ACLs made by each user. Also recorded is the number of data points for each user. This table is then outputted to a lookup file to allow the detection search to operate quickly. -dispatch.earliest_time = -30d@d -dispatch.latest_time = -10m@m -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = sourcetype=aws:cloudtrail `NetworkACLEvents` | spath output=arn path=userIdentity.arn | bucket _time span=1h | stats count as apiCalls by _time, arn | stats count(apiCalls) as numDataPoints, latest(apiCalls) as latestCount, avg(apiCalls) as avgApiCalls, stdev(apiCalls) as stdevApiCalls by arn | table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls | outputlookup network_acl_activity_baseline | stats count - -[ESCU - Schtasks scheduling job on remote system - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2016-09-13 -action.escu.modification_date = 2017-09-15 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-07-12 +action.escu.modification_date = 2018-10-08 +action.escu.asset_at_risk = Account action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = The search looks for execution of schtasks.exe with parameters that indicate a task is being scheduled on a remote host. Schtasks.exe is a native windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or malicious executables on remote systems. -action.escu.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. -action.escu.full_search_name = ESCU - Schtasks scheduling job on remote system - Rule -action.escu.mappings = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task", "Remote Services"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} -action.escu.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. +action.escu.eli5 = When a fraudster is setting the stage for a campaign, they will often create many user accounts on the website. This is a simple example of how to detect a many-account creation hosted on a Magento2 e-commerce platform, where the fraudster is using email addresses from a single email domain. +action.escu.how_to_implement = We start with a dataset that provides visibility into the email address used for the account creation. In this example, we are narrowing our search down to the single web page that hosts the Magento2 e-commerce platform (via URI) used for account creation, the single http content-type to grab only the user's clicks, and the http field that provides the username (form_data), for performance reasons. After we have the username and email domain, we look for numerous account creations per email domain. Common data sources used for this detection are customized Apache logs or Splunk Stream. +action.escu.full_search_name = ESCU - Web Fraud - Account Harvesting - Rule +action.escu.mappings = {"mitre_attack": ["Create Account"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.CM", "DE.DP"]} +action.escu.known_false_positives = As is common with many fraud-related searches, we are usually looking to attribute risk or synthesize relevant context with loosely written detections that simply detect anamolous behavior. This search will need to be customized to fit your environment—improving its fidelity by counting based on something much more specific, such as a device ID that may be present in your dataset. Consideration for whether the large number of registrations are occuring from a first-time seen domain may also be important. Extending the search window to look further back in time, or even calculating the average per hour/day for each email domain to look for an anomalous spikes, will improve this search. You can also use Shannon entropy or Levenshtein Distance (both courtesy of URL Toolbox) to consider the randomness or similarity of the email name or email domain, as the names are often machine-generated. action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Lateral Movement"] +action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] +action.escu.analytic_story = ["Web Fraud Detection"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Schtasks scheduling job on remote system +action.correlationsearch.label = Web Fraud - Account Harvesting action.notable = 1 -action.notable.param.nes_fields = dest, user, process -action.notable.param.rule_description = This search looks for flags passed to schtasks.exe on the command-line that indicate a job is being scheduled on a remote system. -action.notable.param.rule_title = Schtasks scheduling job on remote system -action.notable.param.security_domain = endpoint +action.notable.param.nes_fields = src_user +action.notable.param.rule_description = This search is used to identify multiple created accounts tied to a specific email domain. Such activity is often indicative of account harvesting. A list of $src_user$ accounts were created. +action.notable.param.rule_title = Web Fraud Detection: Possible Account Harvesting +action.notable.param.security_domain = threat action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Process Info\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Emails From Specific Sender\n - ESCU - Get Web Session Information via session_id\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 50 +action.risk.param._risk_object = src_user +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 40 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest,cmdline -alert.suppress.period = 28800s -cron_schedule = 0 * * * * -description = This search looks for flags passed to schtasks.exe on the command-line that indicate a job is being scheduled on a remote system. -dispatch.earliest_time = -70m@m +alert.suppress.fields = user +alert.suppress.period = 3600s +cron_schedule = 0 1 * * * +description = This search is used to identify the creation of multiple user accounts using the same email domain name. +dispatch.earliest_time = -1445m@m dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -5958,7 +5822,31 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*schtasks.exe* cmdline="*/create*" cmdline="* /s *" | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` +search = sourcetype=stream:http http_content_type=text* uri="/magento2/customer/account/loginPost/" | rex field=cookie "form_key=(?\w+)" | rex field=form_data "login\[username\]=(?[^&|^$]+)" | search Username=* | rex field=Username "@(?.*)"|stats dc(Username) as UniqueUsernames list(Username) as src_user by email_domain|where UniqueUsernames> 25 + +[ESCU - Get Authentication Logs For Endpoint] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-04-10 +action.escu.modification_date = 2017-11-01 +action.escu.channel = ESCU +action.escu.eli5 = none +action.escu.how_to_implement = To successfully implement this search you need to be ingesting authentication logs from your various systems and populating the Authentication data model. +action.escu.data_models = ["Authentication"] +action.escu.full_search_name = ESCU - Get Authentication Logs For Endpoint +action.escu.known_false_positives = None at this time +action.escu.search_type = contextual +action.escu.providing_technologies = ["Microsoft Windows", "Linux", "macOS"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Collection and Staging", "Unusual Processes", "Hidden Cobra Malware", "Credential Dumping", "Data Protection", "Ransomware", "Windows Persistence Techniques", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Windows Log Manipulation", "Splunk Enterprise Vulnerability", "Asset Tracking", "SQL Injection", "Emotet Malware (TA18-201A)", "Spectre And Meltdown Vulnerabilities", "Command and Control", "Orangeworm Attack Group", "Suspicious Emails", "DHS Report TA18-074A", "Host Redirection", "Malicious PowerShell", "Router & Infrastructure Security", "Suspicious WMI Use", "JBoss Vulnerability", "Windows Service Abuse", "Account Monitoring and Controls", "Brand Monitoring", "Disabling Security Tools", "Apache Struts Vulnerability", "Lateral Movement", "Suspicious MSHTA Activity", "ColdRoot MacOS RAT", "Monitor for Updates", "Windows Defense Evasion Tactics", "Windows File Extension and Association Abuse", "Prohibited Traffic Allowed or Protocol Mismatch", "Netsh Abuse", "Monitor for Unauthorized Software", "SamSam Ransomware", "Dynamic DNS", "Suspicious Command-Line Executions", "Suspicious Windows Registry Activities", "Windows Privilege Escalation"] +action.escu.fields_required = ["dest"] +action.escu.earliest_time_offset = 43200 +action.escu.latest_time_offset = 1 +description = This search returns all users that have attempted to access a particular endpoint. +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | tstats count from datamodel=Authentication where Authentication.dest=$dest$ by _time, Authentication.dest, Authentication.user, Authentication.app, Authentication.action | `drop_dm_object_name("Authentication")` [ESCU - Detect web traffic to dynamic domain providers - Rule] action.escu = 0 @@ -6142,7 +6030,7 @@ action.escu.full_search_name = ESCU - AWS Network Interface details via resource action.escu.known_false_positives = None at this time action.escu.search_type = contextual action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS Traffic", "AWS Network ACL Activity", "Command and Control"] +action.escu.analytic_story = ["Command and Control", "AWS Network ACL Activity", "Suspicious AWS Traffic"] action.escu.fields_required = ["resourceId"] action.escu.earliest_time_offset = 86400 action.escu.latest_time_offset = 0 @@ -6153,44 +6041,65 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:config resourceId=$resourceId$ | table _time ARN relationships{}.resourceType relationships{}.name relationships{}.resourceId configuration.privateIpAddresses{}.privateIpAddress configuration.privateIpAddresses{}.association.publicIp -[ESCU - Monitor Web Traffic For Brand Abuse - Rule] +[ESCU - Detect Spike in AWS API Activity - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-01 -action.escu.modification_date = 2017-09-23 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-03-12 +action.escu.modification_date = 2018-04-09 +action.escu.asset_at_risk = AWS Instance action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks at all the URLs an endpoint is connecting to and then checks the URL against a list of faux domains that could be indicative of brand abuse. -action.escu.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. -action.escu.data_models = ["Web"] -action.escu.full_search_name = ESCU - Monitor Web Traffic For Brand Abuse - Rule -action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} -action.escu.known_false_positives = None at this time +action.escu.confidence = medium +action.escu.eli5 = This search and its corresponding subsearch run through a series of steps, as per the following: \ +\ +1. Retrieves all the AWS CloudTrail log entries that have recorded AWS API calls.\ +\ +1. Kicks off a subsearch that retrieves the same data and pulls out the ARN into a more friendly format.\ +\ +1. Counts the number of API calls per ARN.\ +\ +1. Loads the cache file that contains the number of data points, the count from the latest hour, the API call average, and the standard deviation for each ARN.\ +\ +1. Drops the count from the latest hour, since it is not necessary, and merges the rest of the data with the results of the stats command. \ +\ +1. Renames `apiCalls` as `latestCount`.\ +\ +1. Calculates the new average value for each ARN with the latest count, weighting the past much more heavily than the current hour. It does the same for the standard deviation--weighting the past more heavily than the current.\ +\ +1. Updates the cache file with the latest results.\ +\ +1. Sets the minimum threshold for the number of data points and sets the number of standard deviations away from the mean it must be to be considered a spike.\ +\ +1. Makes a determination regarding whether or not the current count is a spike by checking to see if the minimum data-point threshold has been met and the count is a sufficient number of standard deviations away from the average.\ +\ +1. Filters out anything that it determines is not a spike and returns the list of ARNs to the main search. The main search subsequently gets the names of all the API calls, the number of unique API calls, and the total number of API calls for each of these ARNs. Finally, it looks up the average and standard deviation and returns both the average and the number of standard deviations the spike is from the average. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the minimum number of data points required to have a statistically significant amount of data to determine. The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. +action.escu.full_search_name = ESCU - Detect Spike in AWS API Activity - Rule +action.escu.mappings = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} +action.escu.known_false_positives = action.escu.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -action.escu.analytic_story = ["Brand Monitoring"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS User Monitoring"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Monitor Web Traffic For Brand Abuse +action.correlationsearch.label = Detect Spike in AWS API Activity action.notable = 1 -action.notable.param.nes_fields = src, url -action.notable.param.rule_description = The host $src$ connected to a web site with a domain similar to that which you are monitoring for brand abuse. -action.notable.param.rule_title = Web URL Brand Abuse from $src$ +action.notable.param.nes_fields = user +action.notable.param.rule_description = A spike in the number of AWS API calls by $user$ was detected. +action.notable.param.rule_title = Spike in AWS API activity detected by $user$ action.notable.param.security_domain = network -action.notable.param.severity = high -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get DNS Server History for a host\n - ESCU - Get Email Info\n - ESCU - Get Emails From Specific Sender\n - ESCU - Get Process responsible for the DNS traffic\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Investigate AWS User Activities by user field\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = src -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 80 +action.risk.param._risk_object = user +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 30 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = src -alert.suppress.period = 86400s +alert.suppress.fields = user +alert.suppress.period = 14400s cron_schedule = 0 * * * * -description = This search looks for Web requests to faux domains similar to the one that you want to have monitored for abuse. +description = This search will detect users creating spikes of API activity in your AWS environment. It will also update the cache file that factors in the latest data. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -6201,7 +6110,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` values(Web.url) as urls min(_time) as firstTime from datamodel=Web by Web.src | `drop_dm_object_name("Web")` | `ctime(firstTime)` | `brand_abuse_web` +search = sourcetype=aws:cloudtrail eventType=AwsApiCall [search sourcetype=aws:cloudtrail eventType=AwsApiCall | spath output=arn path=userIdentity.arn | stats count as apiCalls by arn | inputlookup api_call_by_user_baseline append=t | fields - latestCount | stats values(*) as * by arn | rename apiCalls as latestCount | eval newAvgApiCalls=avgApiCalls + (latestCount-avgApiCalls)/720 | eval newStdevApiCalls=sqrt(((pow(stdevApiCalls, 2)*719 + (latestCount-newAvgApiCalls)*(latestCount-avgApiCalls))/720)) | eval avgApiCalls=coalesce(newAvgApiCalls, avgApiCalls), stdevApiCalls=coalesce(newStdevApiCalls, stdevApiCalls), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) | table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls | outputlookup api_call_by_user_baseline | eval dataPointThreshold = 15, deviationThreshold = 3 | eval isSpike=if((latestCount > avgApiCalls+deviationThreshold*stdevApiCalls) AND numDataPoints > dataPointThreshold, 1, 0) | where isSpike=1 | rename arn as userIdentity.arn | table userIdentity.arn] | spath output=user userIdentity.arn | stats values(eventName) as eventNames, count as numberOfApiCalls, dc(eventName) as uniqueApisCalled by user [ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule] action.escu = 0 @@ -6252,28 +6161,6 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail eventName=RunInstances [search sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | fillnull value="m1.small" requestParameters.instanceType | stats earliest(_time) as earliest latest(_time) as latest by requestParameters.instanceType | rename requestParameters.instanceType as instanceType | inputlookup append=t previously_seen_ec2_instance_types.csv | stats min(earliest) as earliest max(latest) as latest by instanceType | outputlookup previously_seen_ec2_instance_types.csv | eval newType=if(earliest >= relative_time(now(), "-70m@m"), 1, 0) | convert ctime(earliest) ctime(latest) | where newType=1 | rename instanceType as requestParameters.instanceType | table requestParameters.instanceType] | spath output=user userIdentity.arn | rename requestParameters.instanceType as instanceType, responseElements.instancesSet.items{}.instanceId as dest | table _time, user, dest, instanceType -[ESCU - Baseline of API Calls per User ARN] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-04-09 -action.escu.modification_date = 2018-04-09 -action.escu.channel = ESCU -action.escu.eli5 = This search returns all log events that are API calls, pulls out the ARN that initiated each call, and collects them in one-hour groupings. Next, it calculates the number of API calls made per ARN per hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each ARN had. This table is then stored in a lookup file. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. -action.escu.full_search_name = ESCU - Baseline of API Calls per User ARN -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS User Monitoring"] -description = This search establishes, on a per-hour basis, the average and the standard deviation of the number of API calls made by each user. Also recorded is the number of data points for each user. This table is then outputted to a lookup file to allow the detection search to operate quickly. -dispatch.earliest_time = -90d@d -dispatch.latest_time = -10m@m -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = sourcetype=aws:cloudtrail eventType=AwsApiCall | spath output=arn path=userIdentity.arn | bucket _time span=1h | stats count as apiCalls by _time, arn | stats count(apiCalls) as numDataPoints, latest(apiCalls) as latestCount, avg(apiCalls) as avgApiCalls, stdev(apiCalls) as stdevApiCalls by arn | table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls | outputlookup api_call_by_user_baseline | stats count - [ESCU - Sc.exe Manipulating Windows Services - Rule] action.escu = 0 action.escu.enabled = 1 @@ -6289,7 +6176,7 @@ action.escu.mappings = {"mitre_attack": ["Persistence", "Privilege Escalation", action.escu.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. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Persistence Techniques", "DHS Report TA18-074A", "Disabling Security Tools", "Orangeworm Attack Group", "Windows Service Abuse"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Orangeworm Attack Group", "DHS Report TA18-074A", "Windows Service Abuse", "Disabling Security Tools"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Sc.exe Manipulating Windows Services action.notable = 1 @@ -6389,7 +6276,7 @@ action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Ac action.escu.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. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Ransomware", "SamSam Ransomware", "Windows Log Manipulation"] +action.escu.analytic_story = ["Ransomware", "Windows Log Manipulation", "SamSam Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Deleting Shadow Copies action.notable = 1 @@ -6398,7 +6285,7 @@ action.notable.param.rule_description = Using $process_name$ to delete shadow co action.notable.param.rule_title = Deleting Shadow Copies on $dest$ with $process_name$ action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Process Info\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -6458,7 +6345,7 @@ action.escu.full_search_name = ESCU - AWS Investigate User Activities By ARN action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS Login Activities", "Unusual AWS EC2 Modifications", "Suspicious AWS EC2 Activities", "AWS Network ACL Activity", "Suspicious AWS S3 Activities"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities", "Suspicious AWS EC2 Activities", "AWS Network ACL Activity", "Unusual AWS EC2 Modifications", "Suspicious AWS Login Activities"] action.escu.fields_required = ["arn"] action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 @@ -6469,44 +6356,93 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:cloudtrail userIdentity.arn=$arn$ | table _time userIdentity.type userIdentity.userName userIdentity.arn aws_account_id src awsRegion eventName eventType -[ESCU - Shim Database File Creation - Rule] +[ESCU - Large Volume of DNS ANY Queries - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-10-03 -action.escu.modification_date = 2018-11-02 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2016-08-24 +action.escu.modification_date = 2017-09-20 +action.escu.asset_at_risk = DNS Servers action.escu.channel = ESCU action.escu.confidence = high -action.escu.eli5 = This search looks for files being created in `Windows\AppPatch\Custom and Windows\AppPatch\Custom64`, the location where shim databases are installed. It will return all the files created, as well as the time of creation for the first and last file for each endpoint. -action.escu.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. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Shim Database File Creation - Rule -action.escu.mappings = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} -action.escu.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. +action.escu.eli5 = This search counts the number of DNS ANY queries received in 5 minutes, and generates a Notable Event if the count exceeds a predefined threshold. The search returns the count, the first time, and the last time a DNS packet was observed with the ANY flag set. +action.escu.how_to_implement = To successfully implement this search you must ensure that DNS data is populating the Network_Resolution data model. +action.escu.data_models = ["Network_Resolution"] +action.escu.full_search_name = ESCU - Large Volume of DNS ANY Queries - Rule +action.escu.mappings = {"kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11", "CIS 12"], "nist": ["PR.PT", "DE.AE", "PR.IP"]} +action.escu.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. action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Windows Persistence Techniques"] +action.escu.providing_technologies = ["Splunk Stream", "Bro"] +action.escu.analytic_story = ["DNS Amplification Attacks"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Shim Database File Creation +action.correlationsearch.label = Large Volume of DNS ANY Queries action.notable = 1 -action.notable.param.nes_fields = dest, file_name -action.notable.param.rule_description = A file, $file_name$, was created in the default shim database directory on $dest. -action.notable.param.rule_title = Shim database file created on $dest$ -action.notable.param.security_domain = endpoint +action.notable.param.nes_fields = dest +action.notable.param.rule_description = The search is used to identify attempts to use your DNS Infrastructure for DDoS purposes via a DNS amplification attack leveraging ANY queries. +action.notable.param.rule_title = Large Volume of DNS ANY Queries +action.notable.param.security_domain = network action.notable.param.severity = high +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 60 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest +alert.suppress.period = 7200s +cron_schedule = */5 * * * * +description = The search is used to identify attempts to use your DNS Infrastructure for DDoS purposes via a DNS amplification attack leveraging ANY queries. +dispatch.earliest_time = -15m@m +dispatch.latest_time = -10m@m +disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | tstats `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 + +[ESCU - Suspicious writes to windows Recycle Bin - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-01-08 +action.escu.modification_date = 2018-01-08 +action.escu.asset_at_risk = Windows +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = This search uses data on file writes captured via Sysmon to watch for writes to the Recycle Bin by processes other than explorer.exe. The search looks for event code 11 in the Sysmon events, which indicates a file-creation event. Next, it looks for files created with a path that includes the string "$Recycle.Bin" by processes other than explorer.exe, which is the process responsible for copying files to the Recycle Bin on delete. It will report the system where the activity occurred, the path to which the file was written, the process responsible for the write, and the times it first and last saw this activity. +action.escu.how_to_implement = 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. +action.escu.full_search_name = ESCU - Suspicious writes to windows Recycle Bin - Rule +action.escu.mappings = {"mitre_attack": ["Collection", "Data Staged"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +action.escu.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. +action.escu.search_type = detection +action.escu.providing_technologies = ["Sysmon"] +action.escu.analytic_story = ["Collection and Staging"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Suspicious writes to windows Recycle Bin +action.notable = 1 +action.notable.param.nes_fields = dest, file_name, process +action.notable.param.rule_description = The process $process$ on $dest$ wrote $file_name$ to the Recycle Bin. +action.notable.param.rule_title = Suspicious process $process$ wrote to the Recycle Bin on $dest$ +action.notable.param.security_domain = endpoint +action.notable.param.severity = medium action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest action.risk.param._risk_object_type = system -action.risk.param._risk_score = 20 +action.risk.param._risk_score = 70 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 alert.suppress.fields = dest -alert.suppress.period = 14400s +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = 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. +description = This search detects writes to the recycle bin by a process other than explorer.exe. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -6517,30 +6453,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `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 | `ctime(lastTime)` | `ctime(firstTime)` |`drop_dm_object_name(Filesystem)` - -[ESCU - Count of assets by category] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-06-11 -action.escu.modification_date = 2017-09-13 -action.escu.channel = ESCU -action.escu.eli5 = This search gives you the number and the names of the hosts of each host in your environment by category. It will then sort them by the count. -action.escu.how_to_implement = To successfully implement this search you must first leverage the Assets and Identity framework in Enterprise Security to populate your assets_by_str.csv file which should then be mapped to the Identity_Management data model. The Identity_Management data model will contain a list of known authorized company assets. Ensure that all inventoried systems are constantly vetted and updated. -action.escu.data_models = ["Identity_Management"] -action.escu.full_search_name = ESCU - Count of assets by category -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["Splunk Enterprise Security"] -action.escu.analytic_story = ["Asset Tracking"] -description = This search shows you every asset category you have and the assets that belong to those categories. -dispatch.earliest_time = -30d@d -dispatch.latest_time = -10m@m -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | from datamodel Identity_Management.All_Assets | stats count values(nt_host) by category | sort -count +search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) EventCode=11 file_path=*$Recycle.Bin* process!=explorer.exe | stats count min(_time) as firstTime max(_time) as lastTime by dest, Image, file_path | `ctime(firstTime)`| `ctime(lastTime)` [ESCU - Get Email Info] action.escu = 0 @@ -6578,7 +6491,7 @@ action.escu.full_search_name = ESCU - Monitor Unsuccessful Backups action.escu.known_false_positives = None at this time action.escu.search_type = support action.escu.providing_technologies = ["Netbackup"] -action.escu.analytic_story = ["Ransomware", "SamSam Ransomware", "Monitor Backup Solution"] +action.escu.analytic_story = ["Ransomware", "Monitor Backup Solution", "SamSam Ransomware"] description = This search is intended to give you a feel for how often backup failures happen in your environments. Fluctuations in these numbers will allow you to determine when you should investigate. dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m @@ -6588,66 +6501,43 @@ schedule_window = auto is_visible = false search = sourcetype="netbackup_logs" "An error occurred, failed to backup." | bucket _time span=1d | stats dc(COMPUTERNAME) as count values(COMPUTERNAME) as dest by _time, MESSAGE -[ESCU - Previously Seen AWS Provisioning Activity Sources] +[ESCU - Detect new API calls from user roles - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-16 -action.escu.modification_date = 2018-03-16 +action.escu.creation_date = 2018-04-01 +action.escu.modification_date = 2018-04-16 +action.escu.asset_at_risk = AWS Instance action.escu.channel = ESCU -action.escu.eli5 = This search includes any event name that begins with "run" or "create," and then determines the first and last time these events were seen for each IP address that initiated the action. The search then consults a **GeoIP** database to determine the physical location of this IP address. This table outputs to a file. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. -action.escu.full_search_name = ESCU - Previously Seen AWS Provisioning Activity Sources -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Suspicious Provisioning Activities"] -description = This search builds a table of the first and last times seen for every IP address (along with its physical location) previously associated with cloud-provisioning activity. This is broadly defined as any event that runs or creates something. -dispatch.earliest_time = -90d@d -dispatch.latest_time = -10m@m -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = sourcetype=aws:cloudtrail (eventName=Run* OR eventName=Create*) | iplocation sourceIPAddress | stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country | outputlookup previously_seen_provisioning_activity_src.csv | stats count - -[ESCU - Common Ransomware Extensions - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-08-21 -action.escu.modification_date = 2018-11-15 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks at file modifications across your hosts and identifies files with extensions that are commonly associated with the encrypted files generated by ransomware. -action.escu.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. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Common Ransomware Extensions - Rule -action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -action.escu.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. +action.escu.confidence = medium +action.escu.eli5 = The subsearch will execute first and return the user roles and names of the API calls completed within the last hour, where the type of user identity is `AssumedRole`. It then appends the historical data to those results in the lookup file. Next, it recalculates the `earliest` and `latest` fields for each user role, as well as the name of the API call, and returns only those roles and API calls that have first been seen in the past hour. This is combined with the main search to return the values of API calls, name of the user role, and the earliest and latest time of this activity. It is worth noting that the name of the role of a particular user is parsed as "userName" in the CloudTrail logs. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously seen API call per user roles in CloudTrail" support search once to create a history of previously seen user roles. +action.escu.full_search_name = ESCU - Detect new API calls from user roles - Rule +action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +action.escu.known_false_positives = It is possible that there are legitimate user roles making new or infrequently used API calls in your infrastructure, causing the search to trigger. action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS User Monitoring"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Common Ransomware Extensions +action.correlationsearch.label = Detect new API calls from user roles action.notable = 1 -action.notable.param.nes_fields = dest, file_name -action.notable.param.rule_description = A file modification was detected on $dest$ with an extension commonly used by ransomware. -action.notable.param.rule_title = Ransomware Extension detected on $dest$ +action.notable.param.nes_fields = user +action.notable.param.rule_description = A new API call made by $user$ has been detected. This API activity has either never been seen before or has not been seen within the last hour. +action.notable.param.rule_title = New API call by $user$ detected action.notable.param.security_domain = endpoint -action.notable.param.severity = high -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Investigate AWS User Activities by user field\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 80 +action.risk.param._risk_object = user +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 10 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest,file_name -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = The search looks for file modifications with extensions commonly used by Ransomware +alert.suppress.fields = user +alert.suppress.period = 86400s +cron_schedule = 30 * * * * +description = This search detects new API calls that have either never been seen before or that have not been seen in the previous hour, where the identity type is `AssumedRole`. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -6658,7 +6548,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `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)` | `ctime(lastTime)` | `ctime(firstTime)`| rex field=file_name "(?\.[^\.]+)$" | `ransomware_extensions` +search = sourcetype=aws:cloudtrail eventType=AwsApiCall errorCode=success userIdentity.type=AssumedRole [search sourcetype=aws:cloudtrail eventType=AwsApiCall errorCode=success userIdentity.type=AssumedRole | stats earliest(_time) as earliest latest(_time) as latest by userName eventName | inputlookup append=t previously_seen_api_calls_from_user_roles | stats min(earliest) as earliest, max(latest) as latest by userName eventName | outputlookup previously_seen_api_calls_from_user_roles| eval newApiCallfromUserRole=if(earliest>=relative_time(now(), "-70m@m"), 1, 0) | where newApiCallfromUserRole=1 | `ctime(earliest)` | `ctime(latest)` | table eventName userName] |rename userName as user| stats values(eventName) earliest(_time) as earliest latest(_time) as latest by user | `ctime(earliest)` | `ctime(latest)` [ESCU - Extended Period Without Successful Netbackup Backups - Rule] action.escu = 0 @@ -6709,51 +6599,104 @@ schedule_window = auto is_visible = false search = sourcetype="netbackup_logs" MESSAGE="Disk/Partition backup completed successfully." | stats latest(_time) as latestTime by COMPUTERNAME | `ctime(latestTime)` | rename COMPUTERNAME as dest | eval isOutlier=if(latestTime <= relative_time(now(), "-7d@d"), 1, 0) | search isOutlier=1 | table latestTime, dest -[ESCU - AWS Network ACL Details from ID] +[ESCU - Email files written outside of the Outlook directory - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-01-18 -action.escu.modification_date = 2017-01-22 +action.escu.creation_date = 2017-12-13 +action.escu.modification_date = 2018-11-02 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = In order to implement this search, you must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS(version 4.4.0 or later) and configure your AWS description inputs. -action.escu.full_search_name = ESCU - AWS Network ACL Details from ID -action.escu.known_false_positives = None at this time -action.escu.search_type = contextual -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Network ACL Activity"] -action.escu.fields_required = ["networkAclId"] -action.escu.earliest_time_offset = 3600 -action.escu.latest_time_offset = 0 -description = This search queries AWS description logs and returns all the information about a specific network ACL via network ACL ID +action.escu.confidence = medium +action.escu.eli5 = In this search, we are looking for activities consistent with an adversary collecting email data from local machines. The search will detect email files (files with .pst or .ost extensions) created in directories other than the standard Outlook directory (c:\users\username\My Documents\Outlook Files\. +action.escu.how_to_implement = To successfully implement this search, you must be ingesting data that records the file-system activity from your hosts to populate the Endpoint.Filesystem data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or by other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Email files written outside of the Outlook directory - Rule +action.escu.mappings = {"mitre_attack": ["Collection", "Email Collection"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"]} +action.escu.known_false_positives = Administrators and users sometimes prefer backing up their email data by moving the email files into a different folder. These attempts will be detected by the search. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Collection and Staging"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Email files written outside of the Outlook directory +action.notable = 1 +action.notable.param.nes_fields = dest, file_path, action, file_name +action.notable.param.rule_description = The system $dest$ has email files outside of the normal Outlook directory +action.notable.param.rule_title = Email files created or modified on $dest$ that are not in the normal Outlook directory +action.notable.param.security_domain = endpoint +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 50 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest, file_path +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = The search looks at the change-analysis data model and detects email files created outside the normal Outlook directory. +dispatch.earliest_time = -70m@m +dispatch.latest_time = -10m@m disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | search sourcetype=aws:description id=$networkAclId$ | table id account_id vpc_id network_acl_entries{}.* +search = | tstats `summariesonly` count values(Filesystem.file_path) as file_path min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Filesystem where (Filesystem.file_name=*.dll OR Filesystem.file_name=*.ost) Filesystem.file_path != "C:\\Users\\*\\My Documents\\Outlook Files\\*" by Filesystem.action Filesystem.process_id Filesystem.file_name Filesystem.dest | `drop_dm_object_name("Filesystem")` | `ctime(firstTime)` | `ctime(lastTime)` -[ESCU - Get EC2 Instance Details by instanceId] +[ESCU - Detect PsExec With accepteula Flag - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-02-12 -action.escu.modification_date = 2018-02-12 +action.escu.creation_date = 2018-03-28 +action.escu.modification_date = 2018-03-28 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = In order to implement this search, you must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS(version 4.4.0 or later) and configure your AWS description inputs. -action.escu.full_search_name = ESCU - Get EC2 Instance Details by instanceId -action.escu.known_false_positives = None at this time -action.escu.search_type = contextual -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Unusual AWS EC2 Modifications", "Suspicious AWS EC2 Activities"] -action.escu.fields_required = ["instanceId"] -action.escu.earliest_time_offset = 86400 -action.escu.latest_time_offset = 0 -description = This search queries AWS description logs and returns all the information about a specific instance via the instanceId field +action.escu.confidence = medium +action.escu.eli5 = In this search, we are looking for the PsExec process with `accepteula` on the command line. +action.escu.how_to_implement = To successfully implement this search, you need to be ingesting logs with the process name, command-line arguments, and parent process from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon Technology Add-on (TA). +action.escu.full_search_name = ESCU - Detect PsExec With accepteula Flag - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Command-Line Interface"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +action.escu.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 +action.escu.search_type = detection +action.escu.providing_technologies = ["Sysmon"] +action.escu.analytic_story = ["DHS Report TA18-074A", "SamSam Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect PsExec With accepteula Flag +action.notable = 1 +action.notable.param.nes_fields = dest,parent_process +action.notable.param.rule_description = The process pssxec.exe was run with the -accepteula flag on $dest$ by $user$. +action.notable.param.rule_title = PsExec executed with accepteula flag on $dest$. +action.notable.param.security_domain = endpoint +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 75 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest, parent_process +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = 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. +dispatch.earliest_time = -70m@m +dispatch.latest_time = -10m@m disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | search sourcetype="aws:description" source="*:ec2_instances"| dedup id sortby -_time | search id=$instanceId$ | spath output=tags path=tags | eval tags=mvzip(key,value," = "), ip_address=if((ip_address == "null"),private_ip_address,ip_address) | table id, tags.Name, aws_account_id, placement, instance_type, key_name, ip_address, launch_time, state, vpc_id, subnet_id, tags | rename aws_account_id as "Account ID", id as ID, instance_type as Type, ip_address as "IP Address", key_name as "Key Pair", launch_time as "Launch Time", placement as "Availability Zone", state as State, subnet_id as Subnet, "tags.Name" as Name, vpc_id as VPC +search = sourcetype=xmlwineventlog:microsoft-windows-sysmon/operational process=PsExec.exe accepteula | search cmdline=*accepteula* | stats count values(cmdline) as cmdlines, min(_time) as firstTime, max(_time) as lastTime by dest, user, parent_process | `ctime(firstTime)`| `ctime(lastTime)` | table firstTime, lastTime, count, dest, user, parent_process, cmdlines [ESCU - Reg.exe Manipulating Windows Services Registry Keys - Rule] action.escu = 0 @@ -6955,44 +6898,67 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count values(Processes.process) min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.parent_process="C:\Windows\System32\netsh.exe" by Processes.parent_process Processes.process_name Processes.user Processes.dest | `drop_dm_object_name("Processes")` | `ctime(firstTime)`|`ctime(lastTime)` -[ESCU - Web Fraud - Account Harvesting - Rule] +[ESCU - Baseline of S3 Bucket deletion activity by ARN] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-07-12 -action.escu.modification_date = 2018-10-08 -action.escu.asset_at_risk = Account +action.escu.creation_date = 2018-07-17 +action.escu.modification_date = 2018-07-17 +action.escu.channel = ESCU +action.escu.eli5 = Use this search to create a baseline for API calls related to deleting an S3 bucket, grouped by the users who initiated this activity. It returns all logged API calls for S3 bucket-deletion activity and then pulls out the ARN that initiated each call. Next, it calculates the number of API calls made per ARN per hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points for each ARN. This table is stored in a lookup file. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. +action.escu.full_search_name = ESCU - Baseline of S3 Bucket deletion activity by ARN +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities"] +description = This search establishes, on a per-hour basis, the average and standard deviation for the number of API calls related to deleting an S3 bucket by each user. Also recorded is the number of data points for each user. This table is then outputted to a lookup file to allow the detection search to operate quickly. +dispatch.earliest_time = -90d@d +dispatch.latest_time = -10m@m +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = sourcetype=aws:cloudtrail eventName=DeleteBucket | spath output=arn path=userIdentity.arn | bucket _time span=1h | stats count as apiCalls by _time, arn | stats count(apiCalls) as numDataPoints, latest(apiCalls) as latestCount, avg(apiCalls) as avgApiCalls, stdev(apiCalls) as stdevApiCalls by arn | table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls | outputlookup s3_deletion_baseline | stats count + +[ESCU - Prohibited Network Traffic Allowed - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-04-18 +action.escu.modification_date = 2017-09-11 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = When a fraudster is setting the stage for a campaign, they will often create many user accounts on the website. This is a simple example of how to detect a many-account creation hosted on a Magento2 e-commerce platform, where the fraudster is using email addresses from a single email domain. -action.escu.how_to_implement = We start with a dataset that provides visibility into the email address used for the account creation. In this example, we are narrowing our search down to the single web page that hosts the Magento2 e-commerce platform (via URI) used for account creation, the single http content-type to grab only the user's clicks, and the http field that provides the username (form_data), for performance reasons. After we have the username and email domain, we look for numerous account creations per email domain. Common data sources used for this detection are customized Apache logs or Splunk Stream. -action.escu.full_search_name = ESCU - Web Fraud - Account Harvesting - Rule -action.escu.mappings = {"mitre_attack": ["Create Account"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["DE.CM", "DE.DP"]} -action.escu.known_false_positives = As is common with many fraud-related searches, we are usually looking to attribute risk or synthesize relevant context with loosely written detections that simply detect anamolous behavior. This search will need to be customized to fit your environment—improving its fidelity by counting based on something much more specific, such as a device ID that may be present in your dataset. Consideration for whether the large number of registrations are occuring from a first-time seen domain may also be important. Extending the search window to look further back in time, or even calculating the average per hour/day for each email domain to look for an anomalous spikes, will improve this search. You can also use Shannon entropy or Levenshtein Distance (both courtesy of URL Toolbox) to consider the randomness or similarity of the email name or email domain, as the names are often machine-generated. +action.escu.eli5 = The search looks for traffic marked 'is_prohibited' in the Enterprise Security lookup table 'interesting_ports_lookup', and then determines if any network devices have an associated 'allow' action on that traffic by checking the Network_Traffic data model. +action.escu.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. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Prohibited Network Traffic Allowed - Rule +action.escu.mappings = {"mitre_attack": ["Command and Control", "Commonly Used Port", "Exfiltration", "Exfiltration Over Alternative Protocol"], "kill_chain_phases": ["Delivery", "Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE", "PR.AC"]} +action.escu.known_false_positives = None identified action.escu.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] -action.escu.analytic_story = ["Web Fraud Detection"] +action.escu.providing_technologies = ["Palo Alto Firewall", "Bro", "Splunk Stream"] +action.escu.analytic_story = ["Ransomware", "Command and Control", "Prohibited Traffic Allowed or Protocol Mismatch"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Web Fraud - Account Harvesting +action.correlationsearch.label = Prohibited Network Traffic Allowed action.notable = 1 -action.notable.param.nes_fields = src_user -action.notable.param.rule_description = This search is used to identify multiple created accounts tied to a specific email domain. Such activity is often indicative of account harvesting. A list of $src_user$ accounts were created. -action.notable.param.rule_title = Web Fraud Detection: Possible Account Harvesting -action.notable.param.security_domain = threat +action.notable.param.nes_fields = src_ip, dest_ip +action.notable.param.rule_description = This search looks for network traffic defined by port and transport in the ES lookup table "lookup_interesting_ports", that is marked as prohibited, and yet has an 'allow' action in the Network_Traffic data model. This should help to identify areas where a network device is not properly configured. +action.notable.param.rule_title = Prohibited Network Traffic Allowed from $src_ip$ +action.notable.param.security_domain = network action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Emails From Specific Sender\n - ESCU - Get Web Session Information via session_id\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Process Information For Port Activity\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = src_user -action.risk.param._risk_object_type = user +action.risk.param._risk_object = src_ip +action.risk.param._risk_object_type = system action.risk.param._risk_score = 40 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = user -alert.suppress.period = 3600s -cron_schedule = 0 1 * * * -description = This search is used to identify the creation of multiple user accounts using the same email domain name. -dispatch.earliest_time = -1445m@m +alert.suppress.fields = dest_ip,src_ip +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = 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. +dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -7002,54 +6968,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=stream:http http_content_type=text* uri="/magento2/customer/account/loginPost/" | rex field=cookie "form_key=(?\w+)" | rex field=form_data "login\[username\]=(?[^&|^$]+)" | search Username=* | rex field=Username "@(?.*)"|stats dc(Username) as UniqueUsernames list(Username) as src_user by email_domain|where UniqueUsernames> 25 - -[ESCU - Investigate Web Activity From Host] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-04-21 -action.escu.modification_date = 2017-11-09 -action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = To successfully implement this search you must be ingesting your web traffic and populating the Web data model. -action.escu.data_models = ["Web"] -action.escu.full_search_name = ESCU - Investigate Web Activity From Host -action.escu.known_false_positives = None at this time -action.escu.search_type = investigative -action.escu.providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -action.escu.analytic_story = ["Ransomware", "Credential Dumping", "SamSam Ransomware", "Netsh Abuse", "Suspicious Emails", "Unusual Processes", "Monitor for Unauthorized Software", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Host Redirection", "Brand Monitoring", "Emotet Malware (TA18-201A)"] -action.escu.fields_required = ["dest"] -action.escu.earliest_time_offset = 3600 -action.escu.latest_time_offset = 3600 -description = This search allows you to find all the web activity from a specific host. During an investigation, it is important to profile web activity to characterize user or host activity. -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | from datamodel Web.Web | search src=$dest$ - -[ESCU - Get All AWS Activity From City] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-03-19 -action.escu.modification_date = 2018-03-19 -action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. -action.escu.full_search_name = ESCU - Get All AWS Activity From City -action.escu.known_false_positives = None at this time -action.escu.search_type = investigative -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Suspicious Provisioning Activities"] -action.escu.fields_required = ["City"] -action.escu.earliest_time_offset = 14400 -action.escu.latest_time_offset = 0 -description = This search retrieves all the activity from a specific city and will create a table containing the time, city, ARN, username, the type of user, the source IP address, the AWS region the activity was in, the API called, and whether or not the API call was successful. -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | search sourcetype=aws:cloudtrail | iplocation sourceIPAddress | search City=$City$ | spath output=user path=userIdentity.arn | spath output=awsUserName path=userIdentity.userName | spath output=userType path=userIdentity.type | rename sourceIPAddress as src_ip | table _time, City, user, userName, userType, src_ip, awsRegion, eventName, errorCode +search = | tstats `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 | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name("All_Traffic")` [ESCU - Malicious PowerShell Process - Encoded Command - Rule] action.escu = 0 @@ -7151,45 +7070,68 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` values(All_Email.recipient) as recipients, min(_time) as firstTime, max(_time) as lastTime from datamodel=Email by All_Email.src_user, All_Email.message_id | `drop_dm_object_name("All_Email")` | `ctime(firstTime)` | `ctime(lastTime)` | eval temp=split(src_user, "@") | eval email_domain=mvindex(temp, 1) | lookup update=true brandMonitoring_lookup domain as email_domain OUTPUT domain_abuse | search domain_abuse=true | table message_id, src_user, email_domain, recipients, firstTime, lastTime -[ESCU - Schtasks used for forcing a reboot - Rule] +[ESCU - Windows Updates Install Failures] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-11-03 -action.escu.modification_date = 2017-11-03 +action.escu.creation_date = 2017-08-24 +action.escu.modification_date = 2017-09-14 +action.escu.channel = ESCU +action.escu.eli5 = This search gives you the count of the number of systems that attempted and failed to install a Windows update each day. +action.escu.how_to_implement = You must be ingesting your Windows Update Logs +action.escu.data_models = ["Updates"] +action.escu.full_search_name = ESCU - Windows Updates Install Failures +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] +description = This search is intended to give you a feel for how often Windows updates fail to install in your environment. Fluctuations in these numbers will allow you to determine when you should be concerned. +dispatch.earliest_time = -30d@d +dispatch.latest_time = -10m@m +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | tstats `summariesonly` dc(Updates.dest) as count FROM datamodel=Updates where Updates.vendor_product="Microsoft Windows" AND Updates.status=failure by _time span=1d + +[ESCU - Schtasks scheduling job on remote system - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2016-09-13 +action.escu.modification_date = 2017-09-15 action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = The search looks for execution of schtasks.exe with parameters that indicate a task is being scheduled that would cause a forced reboot on the host. Schtasks.exe is a native windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or establish persistence. This tactic is leveraged by the Bad Rabbit Ransomware. +action.escu.eli5 = The search looks for execution of schtasks.exe with parameters that indicate a task is being scheduled on a remote host. Schtasks.exe is a native windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or malicious executables on remote systems. action.escu.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. -action.escu.full_search_name = ESCU - Schtasks used for forcing a reboot - Rule -action.escu.mappings = {"mitre_attack": ["Persistence", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} -action.escu.known_false_positives = Administrators may create jobs on systems forcing reboots to perform updates, maintenance, etc. +action.escu.full_search_name = ESCU - Schtasks scheduling job on remote system - Rule +action.escu.mappings = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task", "Remote Services"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +action.escu.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. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Ransomware"] +action.escu.analytic_story = ["Lateral Movement"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Schtasks used for forcing a reboot +action.correlationsearch.label = Schtasks scheduling job on remote system action.notable = 1 action.notable.param.nes_fields = dest, user, process -action.notable.param.rule_description = This search looks for flags passed to schtasks.exe on the command-line that indicate a job is scheduled to force a reboot -action.notable.param.rule_title = Schtasks used for scheduling a force reboot +action.notable.param.rule_description = This search looks for flags passed to schtasks.exe on the command-line that indicate a job is being scheduled on a remote system. +action.notable.param.rule_title = Schtasks scheduling job on remote system action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Process Info\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest action.risk.param._risk_object_type = system -action.risk.param._risk_score = 80 +action.risk.param._risk_score = 50 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest, cmdline +alert.suppress.fields = dest,cmdline alert.suppress.period = 28800s cron_schedule = 0 * * * * -description = This search looks for flags passed to schtasks.exe on the command-line that indicate that a forced reboot of system is scheduled. -dispatch.earliest_time = -5h@h -dispatch.latest_time = -1h@h +description = This search looks for flags passed to schtasks.exe on the command-line that indicate a job is being scheduled on a remote system. +dispatch.earliest_time = -70m@m +dispatch.latest_time = -10m@m disabled=true enableSched = 1 counttype = number of events @@ -7198,31 +7140,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*schtasks.exe shutdown.exe | search (cmdline=*/r* AND cmdline=*/f*) | stats count values(cmdline) min(_time) as firstTime max(_time) as lastTime by dest process | `ctime(firstTime)` | `ctime(lastTime)` - -[ESCU - Get Authentication Logs For Endpoint] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-04-10 -action.escu.modification_date = 2017-11-01 -action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = To successfully implement this search you need to be ingesting authentication logs from your various systems and populating the Authentication data model. -action.escu.data_models = ["Authentication"] -action.escu.full_search_name = ESCU - Get Authentication Logs For Endpoint -action.escu.known_false_positives = None at this time -action.escu.search_type = contextual -action.escu.providing_technologies = ["Microsoft Windows", "Linux", "macOS"] -action.escu.analytic_story = ["Windows Persistence Techniques", "ColdRoot MacOS RAT", "Hidden Cobra Malware", "Ransomware", "Credential Dumping", "Windows Defense Evasion Tactics", "Malicious PowerShell", "Suspicious WMI Use", "Lateral Movement", "SamSam Ransomware", "Netsh Abuse", "Splunk Enterprise Vulnerability", "JBoss Vulnerability", "Asset Tracking", "DHS Report TA18-074A", "Disabling Security Tools", "Suspicious Windows Registry Activities", "Suspicious Emails", "Unusual Processes", "ColdRoot MacOS RAT", "Monitor for Unauthorized Software", "Suspicious DNS Traffic", "Orangeworm Attack Group", "Prohibited Traffic Allowed or Protocol Mismatch", "Suspicious Command-Line Executions", "Suspicious MSHTA Activity", "Router & Infrastructure Security", "Host Redirection", "Monitor for Updates", "Data Protection", "Collection and Staging", "Windows Log Manipulation", "Brand Monitoring", "Windows Privilege Escalation", "Windows Service Abuse", "Dynamic DNS", "Emotet Malware (TA18-201A)", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Windows File Extension and Association Abuse", "Account Monitoring and Controls", "SQL Injection", "Command and Control", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] -action.escu.fields_required = ["dest"] -action.escu.earliest_time_offset = 43200 -action.escu.latest_time_offset = 1 -description = This search returns all users that have attempted to access a particular endpoint. -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | tstats count from datamodel=Authentication where Authentication.dest=$dest$ by _time, Authentication.dest, Authentication.user, Authentication.app, Authentication.action | `drop_dm_object_name("Authentication")` +search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*schtasks.exe* cmdline="*/create*" cmdline="* /s *" | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` [ESCU - Single Letter Process On Endpoint - Rule] action.escu = 0 @@ -7324,6 +7242,29 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where All_Traffic.protocol="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")) groupby All_Traffic.user All_Traffic.src All_Traffic.dest All_Traffic.dest_port | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name("All_Traffic")` +[ESCU - Get Web Session Information via session_id] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-10-08 +action.escu.modification_date = 2018-10-08 +action.escu.channel = ESCU +action.escu.eli5 = none +action.escu.how_to_implement = This search leverages data extracted from Stream:HTTP. You must configure the HTTP stream using the Splunk Stream App on your Splunk Stream deployment server. +action.escu.full_search_name = ESCU - Get Web Session Information via session_id +action.escu.known_false_positives = None at this time +action.escu.search_type = investigative +action.escu.providing_technologies = ["Splunk Stream"] +action.escu.analytic_story = ["Web Fraud Detection"] +action.escu.fields_required = ["session_id"] +action.escu.earliest_time_offset = 3600 +action.escu.latest_time_offset = 3600 +description = This search helps an analyst investigate a notable event to find out more about a specific web session. The search looks for a specific web session ID in the HTTP web traffic and outputs the URL and user agents, grouped by source IP address and HTTP status code. +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | search sourcetype=stream:http $session_id$ | stats values(url) values(http_user_agent) by src_ip status + [ESCU - Attempt To Stop Security Service - Rule] action.escu = 0 action.escu.enabled = 1 @@ -7435,7 +7376,7 @@ action.escu.full_search_name = ESCU - Add Prohibited Processes to Enterprise Sec action.escu.known_false_positives = None at this time action.escu.search_type = support action.escu.providing_technologies = ["Splunk Enterprise Security"] -action.escu.analytic_story = ["SamSam Ransomware", "Monitor for Unauthorized Software"] +action.escu.analytic_story = ["Monitor for Unauthorized Software", "SamSam Ransomware"] description = This search takes the existing interesting process table from ES, filters out any existing additions added by ESCU and then updates the table with processes identified by ESCU that should be prohibited on your endpoints. dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m @@ -7495,55 +7436,29 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` values(DNS.answer) as IPs min(_time) as firstTime from datamodel=Network_Resolution by DNS.src, DNS.query | `drop_dm_object_name("DNS")` | `ctime(firstTime)`| `brand_abuse_dns` -[ESCU - Remote Desktop Network Traffic - Rule] +[ESCU - Get First Occurrence and Last Occurrence of a MAC Address] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2016-09-13 -action.escu.modification_date = 2017-09-15 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2017-06-14 +action.escu.modification_date = 2017-09-13 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search finds systems that do not commonly communicate use remote desktop. It does this by filtering out all systems that have the "common_rdp_source" or "common_rdp_destination" category applied to that system. Categories are applied to systems using the Assets and Identity framework. -action.escu.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. -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Remote Desktop Network Traffic - Rule -action.escu.mappings = {"mitre_attack": ["Lateral Movement", "Remote Desktop Protocol", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 9", "CIS 16"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} -action.escu.known_false_positives = Remote Desktop may be used legitimately by users on the network. -action.escu.search_type = detection -action.escu.providing_technologies = ["Bro", "Splunk Stream"] -action.escu.analytic_story = ["Hidden Cobra Malware", "Lateral Movement", "SamSam Ransomware"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Remote Desktop Network Traffic -action.notable = 1 -action.notable.param.nes_fields = dest, src -action.notable.param.rule_description = Remote Desktop Traffic detected between $src$ and $dest$. These two systems typically do not communicate with RDP -action.notable.param.rule_title = Uncommon Remote Desktop Network Traffic between $src$ and $dest$ -action.notable.param.security_domain = network -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = src -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 50 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest,src -alert.suppress.period = 28800s -cron_schedule = 0 * * * * -description = 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 allows for whitelisting both source and destination hosts to remove them from the output of the search so you can focus on the uncommon uses of remote desktop on your network. -dispatch.earliest_time = -70m@m -dispatch.latest_time = -10m@m +action.escu.eli5 = none +action.escu.how_to_implement = To successfully implement this search, you must be ingesting the logs from your DHCP server. +action.escu.data_models = ["Network_Sessions"] +action.escu.full_search_name = ESCU - Get First Occurrence and Last Occurrence of a MAC Address +action.escu.known_false_positives = None at this time +action.escu.search_type = contextual +action.escu.providing_technologies = ["Splunk Stream", "Bro", "Microsoft Windows"] +action.escu.analytic_story = ["Asset Tracking"] +action.escu.fields_required = ["src_mac"] +action.escu.earliest_time_offset = 864000 +action.escu.latest_time_offset = 86400 +description = This search allows you to gather more context around a notable which has detected a new device connecting to your network. Use this search to determine the first and last occurrences of the suspicious device attempting to connect with your network. disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `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")` | `ctime(firstTime)`| `ctime(lastTime)` +search = | tstats allow_old_summaries=true count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Sessions where nodename=All_Sessions.DHCP All_Sessions.signature=DHCPREQUEST All_Sessions.All_Sessions.src_mac= $src_mac$ by All_Sessions.src_ip All_Sessions.user | `ctime(lastTime)` | `ctime(firstTime)` [ESCU - Create local admin accounts using net.exe - Rule] action.escu = 0 @@ -7617,55 +7532,6 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail `ec2ModificationAPIs` errorCode=success | spath output=arn userIdentity.arn | stats earliest(_time) as firstTime latest(_time) as lastTime by arn | outputlookup previously_seen_ec2_modifications_by_user | stats count -[ESCU - Detect new API calls from user roles - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-04-01 -action.escu.modification_date = 2018-04-16 -action.escu.asset_at_risk = AWS Instance -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = The subsearch will execute first and return the user roles and names of the API calls completed within the last hour, where the type of user identity is `AssumedRole`. It then appends the historical data to those results in the lookup file. Next, it recalculates the `earliest` and `latest` fields for each user role, as well as the name of the API call, and returns only those roles and API calls that have first been seen in the past hour. This is combined with the main search to return the values of API calls, name of the user role, and the earliest and latest time of this activity. It is worth noting that the name of the role of a particular user is parsed as "userName" in the CloudTrail logs. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously seen API call per user roles in CloudTrail" support search once to create a history of previously seen user roles. -action.escu.full_search_name = ESCU - Detect new API calls from user roles - Rule -action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.known_false_positives = It is possible that there are legitimate user roles making new or infrequently used API calls in your infrastructure, causing the search to trigger. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS User Monitoring"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect new API calls from user roles -action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = A new API call made by $user$ has been detected. This API activity has either never been seen before or has not been seen within the last hour. -action.notable.param.rule_title = New API call by $user$ detected -action.notable.param.security_domain = endpoint -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Investigate AWS User Activities by user field\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = user -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 10 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = user -alert.suppress.period = 86400s -cron_schedule = 30 * * * * -description = This search detects new API calls that have either never been seen before or that have not been seen in the previous hour, where the identity type is `AssumedRole`. -dispatch.earliest_time = -70m@m -dispatch.latest_time = -10m@m -disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = sourcetype=aws:cloudtrail eventType=AwsApiCall errorCode=success userIdentity.type=AssumedRole [search sourcetype=aws:cloudtrail eventType=AwsApiCall errorCode=success userIdentity.type=AssumedRole | stats earliest(_time) as earliest latest(_time) as latest by userName eventName | inputlookup append=t previously_seen_api_calls_from_user_roles | stats min(earliest) as earliest, max(latest) as latest by userName eventName | outputlookup previously_seen_api_calls_from_user_roles| eval newApiCallfromUserRole=if(earliest>=relative_time(now(), "-70m@m"), 1, 0) | where newApiCallfromUserRole=1 | `ctime(earliest)` | `ctime(latest)` | table eventName userName] |rename userName as user| stats values(eventName) earliest(_time) as earliest latest(_time) as latest by user | `ctime(earliest)` | `ctime(latest)` - [ESCU - Detection of tools built by NirSoft - Rule] action.escu = 0 action.escu.enabled = 1 @@ -7739,6 +7605,56 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:cloudtrail user=$user$ | table _time userIdentity.type userIdentity.userName userIdentity.arn aws_account_id src awsRegion eventName eventType +[ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-08-28 +action.escu.modification_date = 2018-12-02 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = High +action.escu.eli5 = This search looks for the process reg.exe with the "save" parameter, which specifies a binary export from the registry. In addition, it looks for the keys that contain the hashed credentials, which attackers may retrieve and use for brute-force attacks in order to harvest legitimate credentials. +action.escu.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. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule +action.escu.mappings = {"mitre_attack": ["Credential Access", "Credential Dumping"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.IP", "PR.AC", "DE.CM"]} +action.escu.known_false_positives = None identified. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Credential Dumping"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Attempted Credential Dump From Registry Via Reg.exe +action.notable = 1 +action.notable.param.nes_fields = dest, user, process_name +action.notable.param.rule_description = An attempt to save registry keys holding credentials was identified on $dest$. +action.notable.param.rule_title = Attempted Credential Dump From Registry on $dest$ +action.notable.param.security_domain = endpoint +action.notable.param.severity = High +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 80 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = process_name, dest +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = This search looks for execution of reg.exe with parameters specifying an export of keys that contain hashed credentials that attackers may try to crack offline, +dispatch.earliest_time = -70m@m +dispatch.latest_time = -10m@m +disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | tstats `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=reg.exe by Processes.user Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` | search process=*save* (process=*HKLM\\sam* OR process=*HKLM\\system*) + [ESCU - Systems Ready for Spectre-Meltdown Windows Patch] action.escu = 0 action.escu.enabled = 1 @@ -7785,44 +7701,61 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:cloudtrail responseElements.instancesSet.items{}.instanceId=$dest$ |rename userIdentity.arn as arn, responseElements.instancesSet.items{}.instanceId as instanceId, responseElements.instancesSet.items{}.privateIpAddress as privateIpAddress, responseElements.instancesSet.items{}.imageId as amiID, responseElements.instancesSet.items{}.architecture as architecture, responseElements.instancesSet.items{}.keyName as keyName | table arn, awsRegion, instanceId, architecture, privateIpAddress, amiID, keyName -[ESCU - Attempt To Add Certificate To Untrusted Store - Rule] +[ESCU - AWS Cross Account Activity From Previously Unseen Account - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-09 -action.escu.modification_date = 2018-11-15 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-02-01 +action.escu.modification_date = 2018-11-02 +action.escu.asset_at_risk = AWS Instance action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = Attackers will often attempt to disable security tools in order to evade detection. It is also possible for end users to attempt to disable anti-virus or other security tools to circumvent restrictions they encounter while trying to execute other programs. One way malware may accomplish this is by adding the legitimate certificate used to sign the security software to the untrusted certificate store. This will cause the system to no longer trust the software signed with this certificate and disallow it from executing. This search simply looks for the execution of **certutil.exe** with the parameters `-addcert` and `disallowed`, which add a certification to the "untrusted" certificate store. -action.escu.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. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Attempt To Add Certificate To Untrusted Store - Rule -action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Disabling Security Tools"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} -action.escu.known_false_positives = There may be legitimate reasons for administrators to add a certificate to the untrusted certificate store. In such cases, this will typically be done on a large number of systems. +action.escu.confidence = medium +action.escu.eli5 = This search\ +\ +1. Retrieves the **AssumeRole** event\ +\ +1. Verifies that the log entry contains a value for the account ID of the requesting account\ +\ +1. Ensures that the requesting account ID does not match the account ID of the requested account\ +\ +1. Pulls in the previously seen requesting and requested account IDs\ +\ +1. Splits up and executes multiple search paths at the same.\ +\ +1. The first path determines the **firstTime** and **lastTime** entries for the cache file\ +\ +1. Outputs the data to the cache file.\ +\ +1. Creates a conditional statement that is always false (both because we don't want these values to exit the search pipeline and because we think we're clever).The second pipeline adds the **firstTime** and **lastTime** entries to search results. Next, it filters out any account pairs that haven't been seen for the first time within the last hour. The `isnotnull(_time)` will remove the entries from the cache file.\ +\ +The search finishes by gathering the data that it will display to the user. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Run the `Previously Seen AWS Cross Account Activity` support search only once to create the baseline of previously seen cross account activity. Thanks to Pablo Vega at Recurly for suggesting improvements to the search. +action.escu.full_search_name = ESCU - AWS Cross Account Activity From Previously Unseen Account - Rule +action.escu.mappings = {"mitre_attack": ["Credential Access"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 16"], "nist": ["PR.AC", "PR.DS", "DE.AE"]} +action.escu.known_false_positives = Using multiple AWS accounts and roles is perfectly valid behavior. It's suspicious when an account requests privileges of an account it hasn't before. You should validate with the account owner that this is a legitimate request. action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Disabling Security Tools"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Cross Account Activity"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Attempt To Add Certificate To Untrusted Store +action.correlationsearch.label = AWS Cross Account Activity From Previously Unseen Account action.notable = 1 -action.notable.param.nes_fields = dest, user, process_name -action.notable.param.rule_description = Attempt to add a certificate to the untrusted certificate store -action.notable.param.rule_title = Attempt To Add Certificate to Untrusted Store -action.notable.param.security_domain = endpoint -action.notable.param.severity = high -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.nes_fields = requestingAccountId, requestedAccountId, src_user, dest_user +action.notable.param.rule_description = Access to $dest_user$ was requested for the first time by $src_user$ +action.notable.param.rule_title = AWS Account $dest_user$ access by $src_user$ +action.notable.param.security_domain = network +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Notable History\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - AWS Investigate User Activities By AccessKeyId\n - ESCU - AWS Investigate User Activities By Source User\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 50 +action.risk.param._risk_object = dest_user +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 20 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = process, dest -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = Attempt to add a certificate to the untrusted certificate store +alert.suppress.fields = requestingAccountId, requestedAccountId +alert.suppress.period = 14400s +cron_schedule = 5 * * * * +description = This search looks for AssumeRole events where an IAM role in a different account is requested for the first time. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -7833,7 +7766,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count min(_time) values(Processes.process) as process max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=certutil.exe (Processes.process=*-addstore* AND Processes.process=*disallowed* ) by Processes.parent_process Processes.process_name Processes.user | `drop_dm_object_name("Processes")` | `ctime(firstTime)`|`ctime(lastTime)` +search = sourcetype=aws:cloudtrail eventName=AssumeRole | spath output=requestingAccountId path=userIdentity.accountId | spath output=requestedAccountId path=resources{}.accountId | search requestingAccountId=* | where requestingAccountId != requestedAccountId | inputlookup append=t previously_seen_aws_cross_account_activity | multireport [| stats min(eval(coalesce(firstTime, strptime(_time,"%Y-%m-%d %H:%M:%S")))) as firstTime max(eval(coalesce(strptime(_time,"%Y-%m-%d %H:%M:%S"), lastTime))) as lastTime by requestingAccountId, requestedAccountId | outputlookup previously_seen_aws_cross_account_activity | where fact=fiction] [| eventstats min(eval(coalesce(firstTime, strptime(_time,"%Y-%m-%d %H:%M:%S")))) as firstTime, max(eval(coalesce(strptime(_time,"%Y-%m-%d %H:%M:%S"), lastTime))) as lastTime by requestingAccountId, requestedAccountId | where firstTime >= relative_time(now(), "-70m@m") AND isnotnull(_time) | spath output=accessKeyId path=responseElements.credentials.accessKeyId | spath output=requestingARN path=resources{}.ARN | stats values(awsRegion) as awsRegion values(firstTime) as firstTime values(lastTime) as lastTime values(sharedEventID) as sharedEventID, values(requestingARN) as src_user, values(responseElements.assumedRoleUser.arn) as dest_user by _time, requestingAccountId, requestedAccountId, accessKeyId] | table _time, firstTime, lastTime, src_user, requestingAccountId, dest_user, requestedAccountId, awsRegion, accessKeyId, sharedEventID [ESCU - Email Attachments With Lots Of Spaces - Rule] action.escu = 0 @@ -7851,7 +7784,7 @@ action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], " action.escu.known_false_positives = None at this time action.escu.search_type = detection action.escu.providing_technologies = ["Microsoft Exchange"] -action.escu.analytic_story = ["Suspicious Emails", "Emotet Malware (TA18-201A)"] +action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "Suspicious Emails"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Email Attachments With Lots Of Spaces action.notable = 1 @@ -7860,7 +7793,7 @@ action.notable.param.rule_description = The sender $src_user$ has sent an email action.notable.param.rule_title = Suspicious Email Attachment from $src_user$ action.notable.param.security_domain = network action.notable.param.severity = high -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Email Info\n - ESCU - Get Emails From Specific Sender\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src_user @@ -7943,7 +7876,7 @@ action.escu.full_search_name = ESCU - Get DNS traffic ratio action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Dynamic DNS", "Command and Control"] +action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control", "Dynamic DNS"] action.escu.fields_required = ["src_ip", "dest_ip"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -7970,7 +7903,7 @@ action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["In action.escu.known_false_positives = None identified action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["SamSam Ransomware", "Monitor for Unauthorized Software", "Emotet Malware (TA18-201A)"] +action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "Monitor for Unauthorized Software", "SamSam Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Prohibited Software On Endpoint action.notable = 1 @@ -7979,7 +7912,7 @@ action.notable.param.rule_description = Prohibited software $process_name$ has b action.notable.param.rule_title = Prohibited Software Detected On $dest$ action.notable.param.security_domain = endpoint action.notable.param.severity = high -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -8054,28 +7987,29 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count earliest(_time) as earliest latest(_time) as latest values(All_Traffic.action) from datamodel=Network_Traffic where All_Traffic.action !=blocked All_Traffic.dest_category !=internal (All_Traffic.dest_port=139 OR All_Traffic.dest_port=445 OR All_Traffic.app=smb) 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) | convert ctime(earliest) ctime(latest) -[ESCU - Count of Unique IPs Connecting to Ports] +[ESCU - Get Process Info] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-24 -action.escu.modification_date = 2017-09-13 +action.escu.creation_date = 2017-03-15 +action.escu.modification_date = 2017-11-09 action.escu.channel = ESCU -action.escu.eli5 = For each port being accessed on the network, this search gives the total number of connections observed, and the number of unique IP addresses making those connections. -action.escu.how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Count of Unique IPs Connecting to Ports +action.escu.eli5 = none +action.escu.how_to_implement = To successfully implement this search you must be ingesting endpoint data and populating the Application_State data model. +action.escu.data_models = ["Application_State"] +action.escu.full_search_name = ESCU - Get Process Info action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Prohibited Traffic Allowed or Protocol Mismatch"] -description = The search counts the number of times a connection was observed to each destination port, and the number of unique source IPs connecting to them. -dispatch.earliest_time = -30d@d -dispatch.latest_time = -10m@m +action.escu.search_type = investigative +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Collection and Staging", "Unusual Processes", "Hidden Cobra Malware", "Credential Dumping", "Ransomware", "Windows Persistence Techniques", "Windows Log Manipulation", "Emotet Malware (TA18-201A)", "Command and Control", "Orangeworm Attack Group", "DHS Report TA18-074A", "Malicious PowerShell", "Suspicious WMI Use", "Windows Service Abuse", "Disabling Security Tools", "Lateral Movement", "Suspicious MSHTA Activity", "Windows Defense Evasion Tactics", "Windows File Extension and Association Abuse", "Netsh Abuse", "Monitor for Unauthorized Software", "SamSam Ransomware", "Suspicious Command-Line Executions", "Suspicious Windows Registry Activities", "Windows Privilege Escalation"] +action.escu.fields_required = ["process", "dest"] +action.escu.earliest_time_offset = 7200 +action.escu.latest_time_offset = 7200 +description = This search queries the Application State data model to give you details about the process running on a host which is under investigation. To gather the process info, enter the values for the process name in question and the destination IP address. disabled=true realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count dc(All_Traffic.src) as numberOfUniqueHosts from datamodel=Network_Traffic by All_Traffic.dest_port | `drop_dm_object_name("All_Traffic")` | sort - count +search = | from datamodel Application_State.Processes | search process=*$process$* dest=$dest$ [ESCU - Detect Spike in Security Group Activity - Rule] action.escu = 0 @@ -8362,7 +8296,7 @@ action.escu.mappings = {"mitre_attack": ["Persistence", "Registry Run Keys / Sta action.escu.known_false_positives = There are many legitimate applications that must execute on system startup and will use these registry keys to accomplish that task. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Ransomware", "DHS Report TA18-074A", "Suspicious Windows Registry Activities", "Suspicious MSHTA Activity", "Emotet Malware (TA18-201A)", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Ransomware", "Windows Persistence Techniques", "Emotet Malware (TA18-201A)", "DHS Report TA18-074A", "Suspicious MSHTA Activity", "Suspicious Windows Registry Activities"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Registry Keys Used For Persistence action.notable = 1 @@ -8371,7 +8305,7 @@ action.notable.param.rule_description = A registry key that is used for persiste action.notable.param.rule_title = Registry Key Associated With Persistence Modified on $dest$ action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Registry Activities\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -8396,45 +8330,45 @@ schedule_window = auto is_visible = false search = | tstats `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.status, Registry.user | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name(Registry)` -[ESCU - SMB Traffic Spike - Rule] +[ESCU - Batch File Write to System32 - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-20 -action.escu.modification_date = 2017-09-10 +action.escu.creation_date = 2018-12-14 +action.escu.modification_date = 2018-12-14 action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = Server Message Block (SMB) traffic, a protocol used for Windows file sharing-activity, is often leveraged by attackers. One example of SMB abuse was the WannaCry ransomware, which leveraged a vulnerability in the SMB protocol to propagate to other systems. Attackers have also used SMB for lateral movement with a target environment and to test credentials against target systems. While SMB is highly prevalent in Windows environments, a spike in SMB traffic may still be indicative of this type of malicious activity. This search looks for a traffic spike in SMB traffic from a particular system. If such a spike is detected, you may want to investigate the source and analyze the cause of the abnormal traffic. -action.escu.how_to_implement = This search requires you to be ingesting your network traffic logs and populating the `Network_Traffic` data model. -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - SMB Traffic Spike - Rule -action.escu.mappings = {"mitre_attack": ["Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} -action.escu.known_false_positives = A file server may experience high-demand loads that could cause this analytic to trigger. +action.escu.confidence = high +action.escu.eli5 = This search looks at file modifications across your hosts, as well as for evidence of batch files being written to paths that include "system32." This activity is consistent with some SamSam attacks and is, in general, suspicious. +action.escu.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. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Batch File Write to System32 - Rule +action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +action.escu.known_false_positives = It is possible for this search to generate a notable event for a batch file write to a path that includes the string "system32", but is not the actual Windows system directory. As such, you should confirm the path of the batch file identified by the search. In addition, a false positive may be generated by an administrator copying a legitimate batch file in this directory tree. You should confirm that the activity is legitimate and modify the search to add exclusions, as necessary. action.escu.search_type = detection -action.escu.providing_technologies = ["Bro", "Splunk Stream"] -action.escu.analytic_story = ["Hidden Cobra Malware", "Ransomware", "DHS Report TA18-074A", "Emotet Malware (TA18-201A)"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["SamSam Ransomware"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = SMB Traffic Spike +action.correlationsearch.label = Batch File Write to System32 action.notable = 1 -action.notable.param.nes_fields = src -action.notable.param.rule_description = There was a spike in SMB traffic from $src$. -action.notable.param.rule_title = SMB Traffic Spike from $src$ -action.notable.param.security_domain = network -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.nes_fields = dest, file_name +action.notable.param.rule_description = A batch file was written to the system directory on $dest$. +action.notable.param.rule_title = Batch file write to system32 detected on $dest$ +action.notable.param.security_domain = endpoint +action.notable.param.severity = high +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = src +action.risk.param._risk_object = dest action.risk.param._risk_object_type = system -action.risk.param._risk_score = 50 +action.risk.param._risk_score = 80 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = src -alert.suppress.period = 28800s +alert.suppress.fields = dest,file_name +alert.suppress.period = 14400s cron_schedule = 0 * * * * -description = This search looks for spikes in the number of Server Message Block (SMB) traffic connections. -dispatch.earliest_time = -7d@d +description = The search looks for a batch file (.bat) written to the Windows system directory tree. +dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -8444,7 +8378,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `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 +search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime values(Filesystem.dest) as dest values(Filesystem.file_name) as file_name values(Filesystem.user) as user from datamodel=Endpoint.Filesystem by Filesystem.file_path | `drop_dm_object_name(Filesystem)` | `ctime(lastTime)` | `ctime(firstTime)`| rex field=file_name "(?\.[^\.]+)$" | search file_path=*system32* AND file_extension=.bat [ESCU - AWS Investigate User Activities By AccessKeyId] action.escu = 0 @@ -8568,142 +8502,45 @@ schedule_window = auto is_visible = false search = sourcetype=stream:http http_content_type=text* uri=/magento2/customer/account/loginPost* | rex field=form_data "login\[username\]=(?[^&|^$]+)" | rex field=form_data "login\[password\]=(?[^&|^$]+)" | stats dc(Username) as UniqueUsernames values(Username) as user list(src_ip) as src_ip by Password|where UniqueUsernames>5 -[ESCU - Identify New User Accounts - Rule] +[ESCU - Windows hosts file modification - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-05 -action.escu.modification_date = 2017-09-12 -action.escu.asset_at_risk = Domain Server -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = Adversaries will often seek to create new user accounts as a means of maintaining access to a target environment. Using this search, we identify accounts created in the last week by comparing the start date in the Identity_Management data model against the current time. -action.escu.how_to_implement = To successfully implement this search, you need to be populating the Enterprise Security Identity_Management data model in the assets and identity framework. -action.escu.data_models = ["Identity_Management"] -action.escu.full_search_name = ESCU - Identify New User Accounts - Rule -action.escu.mappings = {"mitre_attack": ["Valid Accounts"], "cis20": ["CIS 16"], "nist": ["PR.IP"]} -action.escu.known_false_positives = If the Identity_Management data model is not updated regularly, this search could give you false positive alerts. Please consider this and investigate appropriately. -action.escu.search_type = detection -action.escu.providing_technologies = ["Active Directory"] -action.escu.analytic_story = ["Account Monitoring and Controls"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Identify New User Accounts -action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = Using the identities lookup and macro from Enterprise Security to identify (report) new users (6 month period) and temp users (3 months until account expiration) -action.notable.param.rule_title = Identify Temporary Users -action.notable.param.security_domain = access -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Logon Rights Modifications For Endpoint\n - ESCU - Get Logon Rights Modifications For User\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = user -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 40 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = identity -alert.suppress.period = 86400s -cron_schedule = 0 0 * * * -description = This detection search will help profile user accounts in your environment by identifying newly created accounts that have been added to your network in the past week. -dispatch.earliest_time = -24h@h -dispatch.latest_time = -10m@m -disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | from datamodel Identity_Management.All_Identities | eval empStatus=case((now()-startDate)<604800, "Accounts created in last week") | search empStatus="Accounts created in last week"| `ctime(endDate)` | `ctime(startDate)`| table identity empStatus endDate startDate - -[ESCU - Get First Occurrence and Last Occurrence of a MAC Address] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-06-14 -action.escu.modification_date = 2017-09-13 -action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = To successfully implement this search, you must be ingesting the logs from your DHCP server. -action.escu.data_models = ["Network_Sessions"] -action.escu.full_search_name = ESCU - Get First Occurrence and Last Occurrence of a MAC Address -action.escu.known_false_positives = None at this time -action.escu.search_type = contextual -action.escu.providing_technologies = ["Splunk Stream", "Bro", "Microsoft Windows"] -action.escu.analytic_story = ["Asset Tracking"] -action.escu.fields_required = ["src_mac"] -action.escu.earliest_time_offset = 864000 -action.escu.latest_time_offset = 86400 -description = This search allows you to gather more context around a notable which has detected a new device connecting to your network. Use this search to determine the first and last occurrences of the suspicious device attempting to connect with your network. -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | tstats allow_old_summaries=true count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Sessions where nodename=All_Sessions.DHCP All_Sessions.signature=DHCPREQUEST All_Sessions.All_Sessions.src_mac= $src_mac$ by All_Sessions.src_ip All_Sessions.user | `ctime(lastTime)` | `ctime(firstTime)` - -[ESCU - Get All AWS Activity From Region] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-03-19 -action.escu.modification_date = 2018-03-19 -action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. -action.escu.full_search_name = ESCU - Get All AWS Activity From Region -action.escu.known_false_positives = None at this time -action.escu.search_type = investigative -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Suspicious Provisioning Activities"] -action.escu.fields_required = ["Region"] -action.escu.earliest_time_offset = 14400 -action.escu.latest_time_offset = 0 -description = This search retrieves all the activity from a specific geographic region and will create a table containing the time, geographic region, ARN, username, the type of user, the source IP address, the AWS region the activity was in, the API called, and whether or not the API call was successful. -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | search sourcetype=aws:cloudtrail | iplocation sourceIPAddress | search Region=$Region$ | spath output=user path=userIdentity.arn | spath output=awsUserName path=userIdentity.userName | spath output=userType path=userIdentity.type | rename sourceIPAddress as src_ip | table _time, Region, user, userName, userType, src_ip, awsRegion, eventName, errorCode - -[ESCU - Spike in File Writes - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-08-20 -action.escu.modification_date = 2018-12-03 +action.escu.creation_date = 2017-06-07 +action.escu.modification_date = 2018-11-02 action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.confidence = low -action.escu.eli5 = This search calculates counts the number of file modification events per hour per host in your environment. It then takes the average and standard deviations of those numbers and displays any hosts with more than 20 events that have over four times the standard deviation more than the average number of file modifications. -action.escu.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 products, 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. +action.escu.confidence = high +action.escu.eli5 = The hosts file is present on both Windows and Linux endpoints. The purpose of the hosts file is to provide a mapping between hostnames and IP addresses, the same way DNS is used to provide such a mapping. However, the information in the hosts file takes precedence over information received via DNS and a DNS query will not be issued if the hostname of interest is found in the hosts file. As such, attackers have been observed adding entries to the host file to override any DNS resolution. For this reason, it is useful to monitor for changes to this file, which typically do not occur very often in legitimate cases. +action.escu.how_to_implement = To successfully implement this search, you must be ingesting data that records the file-system activity from your hosts to populate the Endpoint.Filesystem data model node. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or by other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file-system reads and writes. action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Spike in File Writes - Rule -action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} -action.escu.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. +action.escu.full_search_name = ESCU - Windows hosts file modification - Rule +action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 3", "CIS 8", "CIS 12"], "nist": ["PR.IP", "PR.PT", "PR.AC", "DE.AE", "DE.CM"]} +action.escu.known_false_positives = There may be legitimate reasons for system administrators to add entries to this file. action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Host Redirection"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Spike in File Writes +action.correlationsearch.label = Windows hosts file modification action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = A sharp increase in file writes was detected on $dest -action.notable.param.rule_title = Spike in file writes on $dest$ +action.notable.param.nes_fields = dest, file_name +action.notable.param.rule_description = A file modification was noted for the hosts file on $dest$. +action.notable.param.rule_title = Modification of hosts file detected on $dest$ action.notable.param.security_domain = endpoint -action.notable.param.severity = low -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Backup Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get Update Logs For Endpoint\n - ESCU - Get User Information from Identity Table\n - ESCU - Get Vulnerability Logs For Endpoint\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Process Information For Port Activity\n - ESCU - Investigate Successful Remote Desktop Authentications\n - ESCU - Investigate Web Activity From Host\n"} +action.notable.param.severity = high +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get DNS Server History for a host\n - ESCU - Get Process responsible for the DNS traffic\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest action.risk.param._risk_object_type = system -action.risk.param._risk_score = 30 +action.risk.param._risk_score = 80 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest -alert.suppress.period = 7200s +alert.suppress.fields = dest,user +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = The search looks for a sharp increase in the number of files written to a particular host -dispatch.earliest_time = -7d@d +description = The search looks for modifications to the hosts file on all Windows endpoints across your environment. +dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -8713,7 +8550,52 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `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 +search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Filesystem by Filesystem.file_name Filesystem.file_path Filesystem.dest | `ctime(lastTime)` | `ctime(firstTime)` | search Filesystem.file_name=hosts AND Filesystem.file_path=*Windows\\System32\\* | `drop_dm_object_name(Filesystem)` + +[ESCU - Identify Systems Using Remote Desktop] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-04-18 +action.escu.modification_date = 2017-09-15 +action.escu.channel = ESCU +action.escu.eli5 = This search counts the numbers of times the remote desktop process, mstsc.exe, has run on each system. It does this by looking for the process in the Application_State data model. +action.escu.how_to_implement = To successfully implement this search you must be ingesting endpoint data that records process activity. +action.escu.data_models = ["Application_State"] +action.escu.full_search_name = ESCU - Identify Systems Using Remote Desktop +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Lateral Movement"] +description = This search counts the numbers of times the remote desktop process, mstsc.exe, has run on each system. +dispatch.earliest_time = -30d@d +dispatch.latest_time = -10m@m +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | tstats `summariesonly` count from datamodel=Application_State where All_Application_State.process="*mstsc.exe*" by All_Application_State.dest All_Application_State.process | `drop_dm_object_name("All_Application_State")` | sort - count + +[ESCU - Previously seen API call per user roles in CloudTrail] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-04-01 +action.escu.modification_date = 2018-04-16 +action.escu.channel = ESCU +action.escu.eli5 = In this support search, we are looking for successful API calls made by user roles within your AWS infrastructure. The intent is to create an initial baseline cache of names of the API calls per security role for the previous 30 days--including the earliest and latest times seen in our dataset--grouped by the value of user role and the name of the API call. It is also worth noting that the role of a particular user is parsed as "userName" in the CloudTrail logs. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. Please validate the user role entries in `previously_seen_api_calls_from_user_roles.csv`, which is a lookup file created as a result of running this support search. +action.escu.full_search_name = ESCU - Previously seen API call per user roles in CloudTrail +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS User Monitoring"] +description = This search looks for successful API calls made by different user roles, then creates a baseline of the earliest and latest times we have encountered this user role. It also returns the name of the API call in our dataset--grouped by user role and name of the API call--that occurred within the last 30 days. In this support search, we are only looking for events where the user identity is Assumed Role. +dispatch.earliest_time = -30d@d +dispatch.latest_time = -10m@m +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = sourcetype=aws:cloudtrail eventType=AwsApiCall errorCode=success userIdentity.type=AssumedRole | stats earliest(_time) as earliest latest(_time) as latest by userName eventName | outputlookup previously_seen_api_calls_from_user_roles | stats count [ESCU - Uncommon Processes On Endpoint - Rule] action.escu = 0 @@ -8814,44 +8696,44 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) parent_process=*WmiPrvSE.exe | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, parent_process, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` -[ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] +[ESCU - Monitor Web Traffic For Brand Abuse - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-10-07 -action.escu.modification_date = 2018-11-15 +action.escu.creation_date = 2017-06-01 +action.escu.modification_date = 2017-09-23 action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = Obtaining access to the Command-Line Interface (CLI) is typically a primary attacker goal. Once an attacker has obtained the ability to execute code on a target system, they will often further manipulate the system via commands passed to the CLI. It is also unusual for many applications to spawn a command shell during normal operation, while it is often observed if an application has been compromised in some way. As such, it is often beneficial to look for cmd.exe being executed by processes that are often targeted for exploitation, or that would not spawn cmd.exe in any other circumstances. A lookup file is provided to easily modify the processes that are being watched for execution of cmd.exe. -action.escu.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. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Command-Line Interface"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -action.escu.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. +action.escu.confidence = high +action.escu.eli5 = This search looks at all the URLs an endpoint is connecting to and then checks the URL against a list of faux domains that could be indicative of brand abuse. +action.escu.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. +action.escu.data_models = ["Web"] +action.escu.full_search_name = ESCU - Monitor Web Traffic For Brand Abuse - Rule +action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +action.escu.known_false_positives = None at this time action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Suspicious Command-Line Executions", "Suspicious MSHTA Activity"] +action.escu.providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] +action.escu.analytic_story = ["Brand Monitoring"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Prohibited Applications Spawning cmd.exe +action.correlationsearch.label = Monitor Web Traffic For Brand Abuse action.notable = 1 -action.notable.param.nes_fields = dest, process, parent_process -action.notable.param.rule_description = A prohibited application from prohibited_apps_launching_cmd.csv was leveraged to launch cmd.exe -action.notable.param.rule_title = Prohibited application($parent_process$) used to launch cmd.exe on $dest$ -action.notable.param.security_domain = endpoint -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Get Registry Activities\n"} +action.notable.param.nes_fields = src, url +action.notable.param.rule_description = The host $src$ connected to a web site with a domain similar to that which you are monitoring for brand abuse. +action.notable.param.rule_title = Web URL Brand Abuse from $src$ +action.notable.param.security_domain = network +action.notable.param.severity = high +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get DNS Server History for a host\n - ESCU - Get Email Info\n - ESCU - Get Emails From Specific Sender\n - ESCU - Get Process responsible for the DNS traffic\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = dest +action.risk.param._risk_object = src action.risk.param._risk_object_type = system action.risk.param._risk_score = 80 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest, parent_process +alert.suppress.fields = src alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = 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. +description = This search looks for Web requests to faux domains similar to the one that you want to have monitored for abuse. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -8862,7 +8744,56 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count values(Processes.user) as user 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 Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] +search = | tstats `summariesonly` values(Web.url) as urls min(_time) as firstTime from datamodel=Web by Web.src | `drop_dm_object_name("Web")` | `ctime(firstTime)` | `brand_abuse_web` + +[ESCU - EC2 Instance Modified With Previously Unseen User - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-04-09 +action.escu.modification_date = 2018-04-09 +action.escu.asset_at_risk = AWS Instance +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = The subsearch returns the ARNs of all successful EC2 instance modifications within the last hour and then appends the historical data in the lookup file to those results. EC2 modification APIs are defined by the macro `ec2ModificationAPIs`. The search then recalculates the `firstTime` and `lastTime` field for each ARN and returns only those ARNs that have first been seen in the past hour. This is combined with the main search to return the time, user, and instance ID of those systems. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen EC2 Launches By User" support search once to create a history of previously seen ARNs. To add or remove APIs that modify an EC2 instance, edit the macro `ec2ModificationAPIs`. +action.escu.full_search_name = ESCU - EC2 Instance Modified With Previously Unseen User - Rule +action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +action.escu.known_false_positives = It's possible that a new user will start to modify EC2 instances when they haven't before for any number of reasons. Verify with the user that is modifying instances that this is the intended behavior. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Unusual AWS EC2 Modifications"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = EC2 Instance Modified With Previously Unseen User +action.notable = 1 +action.notable.param.nes_fields = user, dest +action.notable.param.rule_description = The EC2 instance $dest$ was modified by $user$. This user has never modified an EC2 instance before. +action.notable.param.rule_title = EC2 Instance Modified By Previously Unseen User $user$ +action.notable.param.security_domain = endpoint +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get EC2 Instance Details by instanceId\n - ESCU - Get Notable History\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - AWS Investigate User Activities By ARN\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 30 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = user, dest +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = This search looks for EC2 instances being modified by users who have not previously modified them. +dispatch.earliest_time = -70m@m +dispatch.latest_time = -10m@m +disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = sourcetype=aws:cloudtrail `ec2ModificationAPIs` [search sourcetype=aws:cloudtrail `ec2ModificationAPIs` errorCode=success | stats earliest(_time) as firstTime latest(_time) as lastTime by userIdentity.arn | rename userIdentity.arn as arn | inputlookup append=t previously_seen_ec2_modifications_by_user | stats min(firstTime) as firstTime, max(lastTime) as lastTime by arn | outputlookup previously_seen_ec2_modifications_by_user | eval newUser=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newUser=1 | `ctime(firstTime)` | `ctime(lastTime)` | rename arn as userIdentity.arn | table userIdentity.arn] | spath output=dest responseElements.instancesSet.items{}.instanceId | spath output=user userIdentity.arn | table _time, user, dest [ESCU - Remote Process Instantiation via WMI - Rule] action.escu = 0 @@ -8913,6 +8844,55 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*wmic* cmdline="*/node*" cmdline="*process*" cmdline="*call*" cmdline="*create*" | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` +[ESCU - Schtasks used for forcing a reboot - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-11-03 +action.escu.modification_date = 2017-11-03 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = The search looks for execution of schtasks.exe with parameters that indicate a task is being scheduled that would cause a forced reboot on the host. Schtasks.exe is a native windows program that is used to schedule tasks on local or remote systems. Attackers often leverage this capability to schedule the execution of commands or establish persistence. This tactic is leveraged by the Bad Rabbit Ransomware. +action.escu.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. +action.escu.full_search_name = ESCU - Schtasks used for forcing a reboot - Rule +action.escu.mappings = {"mitre_attack": ["Persistence", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +action.escu.known_false_positives = Administrators may create jobs on systems forcing reboots to perform updates, maintenance, etc. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Ransomware", "Windows Persistence Techniques"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Schtasks used for forcing a reboot +action.notable = 1 +action.notable.param.nes_fields = dest, user, process +action.notable.param.rule_description = This search looks for flags passed to schtasks.exe on the command-line that indicate a job is scheduled to force a reboot +action.notable.param.rule_title = Schtasks used for scheduling a force reboot +action.notable.param.security_domain = endpoint +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 80 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest, cmdline +alert.suppress.period = 28800s +cron_schedule = 0 * * * * +description = This search looks for flags passed to schtasks.exe on the command-line that indicate that a forced reboot of system is scheduled. +dispatch.earliest_time = -5h@h +dispatch.latest_time = -1h@h +disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*schtasks.exe shutdown.exe | search (cmdline=*/r* AND cmdline=*/f*) | stats count values(cmdline) min(_time) as firstTime max(_time) as lastTime by dest process | `ctime(firstTime)` | `ctime(lastTime)` + [ESCU - Windows Updates Install Successes] action.escu = 0 action.escu.enabled = 1 @@ -8985,28 +8965,54 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail eventName=DeleteNetworkAcl|rename userIdentity.arn as arn | stats count min(_time) as firstTime max(_time) as lastTime values(errorMessage) values(errorCode) values(userAgent) values(userIdentity.*) by src userName arn eventName | `ctime(lastTime)` | `ctime(firstTime)` -[ESCU - Get Parent Process Info] +[ESCU - EC2 Instance Started With Previously Unseen AMI - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-22 -action.escu.modification_date = 2017-09-10 +action.escu.creation_date = 2018-03-12 +action.escu.modification_date = 2018-03-12 +action.escu.asset_at_risk = AWS Instance action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = To successfully implement this search you must be ingesting endpoint data via Microsoft-Windows-Sysmon and extract the Image and Parent Image field. -action.escu.full_search_name = ESCU - Get Parent Process Info -action.escu.known_false_positives = None at this time -action.escu.search_type = investigative -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Hidden Cobra Malware", "Ransomware", "Credential Dumping", "Windows Defense Evasion Tactics", "SamSam Ransomware", "Netsh Abuse", "DHS Report TA18-074A", "Disabling Security Tools", "Suspicious Windows Registry Activities", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Suspicious MSHTA Activity", "Collection and Staging", "Windows Privilege Escalation", "Windows Service Abuse", "Emotet Malware (TA18-201A)", "Windows File Extension and Association Abuse", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] -action.escu.fields_required = ["process", "dest"] -action.escu.earliest_time_offset = 0 -action.escu.latest_time_offset = 86400 -description = This search queries the Application State data model to give you details about the parent process of a process running on a host which is under investigation. Enter the values of the process name in question and the dest_ip +action.escu.confidence = medium +action.escu.eli5 = The subsearch returns the AMI image ID of all successful EC2 instance launches within the last hour and then appends the historical data from the lookup file to those results. It then recalculates the earliest and latest seen time field for each AMI image ID and returns only those AMI image IDs that have first been seen in the past hour. This is combined with the main search to return the time, user, and instance id of those systems. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen EC2 AMIs" support search once to create a history of previously seen AMIs. +action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen AMI - Rule +action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +action.escu.known_false_positives = After a new AMI is created, the first systems created with that AMI will cause this alert to fire. Verify that the AMI being used was created by a legitimate user. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Cryptomining"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = EC2 Instance Started With Previously Unseen AMI +action.notable = 1 +action.notable.param.nes_fields = dest +action.notable.param.rule_description = The EC2 instance $dest$ was created with previously unused AMI $amiID$ +action.notable.param.rule_title = EC2 Instance Type $dest$ Created With New AMI +action.notable.param.security_domain = endpoint +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get EC2 Launch Details\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 30 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = This search looks for EC2 instances being created with previously unseen AMIs. +dispatch.earliest_time = -70m@m +dispatch.latest_time = -10m@m disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | search sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational process=$process$ dest=$dest$ | table parent_process parent_process_id +search = sourcetype=aws:cloudtrail eventName=RunInstances [search sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | stats earliest(_time) as earliest latest(_time) as latest by requestParameters.instancesSet.items{}.imageId | rename requestParameters.instancesSet.items{}.imageId as amiID | inputlookup append=t previously_seen_ec2_amis.csv | stats min(earliest) as earliest max(latest) as latest by amiID | outputlookup previously_seen_ec2_amis.csv | eval newAMI=if(earliest >= relative_time(now(), "-70m@m"), 1, 0) | convert ctime(earliest) ctime(latest) | where newAMI=1 | rename amiID as requestParameters.instancesSet.items{}.imageId | table requestParameters.instancesSet.items{}.imageId] | rename requestParameters.instanceType as instanceType, responseElements.instancesSet.items{}.instanceId as dest, userIdentity.arn as arn, requestParameters.instancesSet.items{}.imageId as amiID | table _time, arn, amiID, dest, instanceType [ESCU - DNSTwist Domain Names] action.escu = 0 @@ -9046,7 +9052,7 @@ action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", action.escu.known_false_positives = It's possible that normal DNS traffic will exhibit this behavior. If an alert is generated, please investigate and validate as appropriate. The threshold can also be modified to better suit your environment. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Data Protection", "Command and Control"] +action.escu.analytic_story = ["Data Protection", "Suspicious DNS Traffic", "Command and Control"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detection of DNS Tunnels action.notable = 1 @@ -9080,55 +9086,27 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` dc("DNS.query") as count from datamodel=Network_Resolution where nodename=DNS "DNS.message_type"="QUERY" NOT (`cim_corporate_web_domain_search("DNS.query")`) NOT "DNS.query"="*.in-addr.arpa" NOT ("DNS.src_category"="svc_infra_dns" OR "DNS.src_category"="svc_infra_webproxy" OR "DNS.src_category"="svc_infra_email*" ) by "DNS.src","DNS.query" | rename "DNS.src" as src "DNS.query" as message | eval length=len(message) | stats sum(length) as length by src | append [ tstats `summariesonly` dc("DNS.answer") as count from datamodel=Network_Resolution where nodename=DNS "DNS.message_type"="QUERY" NOT (`cim_corporate_web_domain_search("DNS.query")`) NOT "DNS.query"="*.in-addr.arpa" NOT ("DNS.src_category"="svc_infra_dns" OR "DNS.src_category"="svc_infra_webproxy" OR "DNS.src_category"="svc_infra_email*" ) by "DNS.src","DNS.answer" | rename "DNS.src" as src "DNS.answer" as message | eval message=if(message=="unknown","", message) | eval length=len(message) | stats sum(length) as length by src ] | stats sum(length) as length by src | where length > 10000 -[ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule] +[ESCU - Baseline of API Calls per User ARN] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-08-28 -action.escu.modification_date = 2018-12-02 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-04-09 +action.escu.modification_date = 2018-04-09 action.escu.channel = ESCU -action.escu.confidence = High -action.escu.eli5 = This search looks for the process reg.exe with the "save" parameter, which specifies a binary export from the registry. In addition, it looks for the keys that contain the hashed credentials, which attackers may retrieve and use for brute-force attacks in order to harvest legitimate credentials. -action.escu.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. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule -action.escu.mappings = {"mitre_attack": ["Credential Access", "Credential Dumping"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.IP", "PR.AC", "DE.CM"]} -action.escu.known_false_positives = None identified. -action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Credential Dumping"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Attempted Credential Dump From Registry Via Reg.exe -action.notable = 1 -action.notable.param.nes_fields = dest, user, process_name -action.notable.param.rule_description = An attempt to save registry keys holding credentials was identified on $dest$. -action.notable.param.rule_title = Attempted Credential Dump From Registry on $dest$ -action.notable.param.security_domain = endpoint -action.notable.param.severity = High -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 80 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = process_name, dest -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search looks for execution of reg.exe with parameters specifying an export of keys that contain hashed credentials that attackers may try to crack offline, -dispatch.earliest_time = -70m@m +action.escu.eli5 = This search returns all log events that are API calls, pulls out the ARN that initiated each call, and collects them in one-hour groupings. Next, it calculates the number of API calls made per ARN per hour. For each ARN, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each ARN had. This table is then stored in a lookup file. +action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS version (4.4.0 or later), then configure your CloudTrail inputs. +action.escu.full_search_name = ESCU - Baseline of API Calls per User ARN +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS User Monitoring"] +description = This search establishes, on a per-hour basis, the average and the standard deviation of the number of API calls made by each user. Also recorded is the number of data points for each user. This table is then outputted to a lookup file to allow the detection search to operate quickly. +dispatch.earliest_time = -90d@d dispatch.latest_time = -10m@m disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `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=reg.exe by Processes.user Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` | search process=*save* (process=*HKLM\\sam* OR process=*HKLM\\system*) +search = sourcetype=aws:cloudtrail eventType=AwsApiCall | spath output=arn path=userIdentity.arn | bucket _time span=1h | stats count as apiCalls by _time, arn | stats count(apiCalls) as numDataPoints, latest(apiCalls) as latestCount, avg(apiCalls) as avgApiCalls, stdev(apiCalls) as stdevApiCalls by arn | table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls | outputlookup api_call_by_user_baseline | stats count [ESCU - Unusually Long Command Line - Rule] action.escu = 0 @@ -9144,7 +9122,7 @@ action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Ac action.escu.known_false_positives = Some legitimate applications start with long command-lines. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Ransomware", "Unusual Processes", "Suspicious Command-Line Executions", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Unusual Processes", "Ransomware", "Suspicious Command-Line Executions"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Unusually Long Command Line action.notable = 1 @@ -9153,7 +9131,7 @@ action.notable.param.rule_description = An unusually long command-line $cmdline$ action.notable.param.rule_title = Unusually Long Command-Line on $dest$ action.notable.param.security_domain = endpoint action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n - ESCU - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -9190,7 +9168,7 @@ action.escu.full_search_name = ESCU - Baseline of blocked outbound traffic from action.escu.known_false_positives = None at this time action.escu.search_type = support action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS Traffic", "AWS Network ACL Activity", "Command and Control"] +action.escu.analytic_story = ["Command and Control", "AWS Network ACL Activity", "Suspicious AWS Traffic"] description = This search establishes, on a per-hour basis, the average and the standard deviation of the number of outbound connections blocked in your VPC flow logs by each source IP address (IP address of your EC2 instances). Also recorded is the number of data points for each source IP. This table outputs to a lookup file to allow the detection search to operate quickly. dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m @@ -9200,56 +9178,28 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudwatchlogs:vpcflow action=blocked (src_ip=10.0.0.0/8 OR src_ip=172.16.0.0/12 OR src_ip=192.168.0.0/16) ( dest_ip!=10.0.0.0/8 AND dest_ip!=172.16.0.0/12 AND dest_ip!=192.168.0.0/16) | bucket _time span=1h | stats count as numberOfBlockedConnections by _time, src_ip | stats count(numberOfBlockedConnections) as numDataPoints, latest(numberOfBlockedConnections) as latestCount, avg(numberOfBlockedConnections) as avgBlockedConnections, stdev(numberOfBlockedConnections) as stdevBlockedConnections by src_ip | table src_ip, latestCount, numDataPoints, avgBlockedConnections, stdevBlockedConnections | outputlookup baseline_blocked_outbound_connections | stats count -[ESCU - AWS Cloud Provisioning From Previously Unseen IP Address - Rule] +[ESCU - Count of Unique IPs Connecting to Ports] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-16 -action.escu.modification_date = 2018-03-16 -action.escu.asset_at_risk = AWS Instance +action.escu.creation_date = 2017-06-24 +action.escu.modification_date = 2017-09-13 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = The subsearch returns all events with event names that start with "Run" or "Create," and then does a `GeoIP` lookup on the IP address that initiated the action within the last hour. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for each country, region, city, and IP address and outputs this data to the lookup file to update the local cache. It then calculates the `firstTime` and `lastTime` for each city. It returns only those events from IP addresses that have first been seen in the past hour. This is combined with the main search to return the time, user, IP address, city, event name, and error code from the action. -action.escu.how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your CloudTrail inputs. This search works best when you run the "Previously Seen AWS Provisioning Activity Sources" support search once to create a history of previously seen locations that have provisioned AWS resources. -action.escu.full_search_name = ESCU - AWS Cloud Provisioning From Previously Unseen IP Address - Rule -action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.known_false_positives = This is a strictly behavioral search, so we define "false positive" slightly differently. Every time this fires, it will accurately reflect the first occurrence in the time period you're searching within, plus what is stored in the cache feature. But while there are really no "false positives" in a traditional sense, there is definitely lots of noise.\ -\ - This search will fire any time a new IP address is seen in the **GeoIP** database for any kind of provisioning activity. If you typically do all provisioning from tools inside of your country, there should be few false positives. If you are located in countries where the free version of **MaxMind GeoIP** that ships by default with Splunk has weak resolution (particularly small countries in less economically powerful regions), this may be much less valuable to you. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Suspicious Provisioning Activities"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = AWS Cloud Provisioning From Previously Unseen IP Address -action.notable = 1 -action.notable.param.nes_fields = src_ip -action.notable.param.rule_description = Your AWS infrastructure was provisioned from an IP, $src_ip$, which has never before been seen provisioning your infrastructure. -action.notable.param.rule_title = AWS Provision Activity From $src_ip$ -action.notable.param.security_domain = endpoint -action.notable.param.severity = medium -action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get All AWS Activity From City\n - ESCU - Get All AWS Activity From Country\n - ESCU - Get All AWS Activity From IP Address\n - ESCU - Get All AWS Activity From Region\n"} -action.notable.param.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = src_ip -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 30 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = src_ip -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = This search looks for AWS provisioning activities from previously unseen IP addresses. Provisioning activities are defined broadly as any event that begins with "Run" or "Create." -dispatch.earliest_time = -70m@m +action.escu.eli5 = For each port being accessed on the network, this search gives the total number of connections observed, and the number of unique IP addresses making those connections. +action.escu.how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Count of Unique IPs Connecting to Ports +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["Splunk Stream", "Bro"] +action.escu.analytic_story = ["Prohibited Traffic Allowed or Protocol Mismatch"] +description = The search counts the number of times a connection was observed to each destination port, and the number of unique source IPs connecting to them. +dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail (eventName=Run* OR eventName=Create*) | iplocation sourceIPAddress | search Country=* [search sourcetype=aws:cloudtrail (eventName=Run* OR eventName=Create*) | iplocation sourceIPAddress | search Country=* | stats earliest(_time) as firstTime, latest(_time) as lastTime by sourceIPAddress, City, Region, Country | inputlookup append=t previously_seen_provisioning_activity_src.csv | stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress, City, Region, Country | outputlookup previously_seen_provisioning_activity_src.csv | stats min(firstTime) as firstTime max(lastTime) as lastTime by sourceIPAddress | eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newIP=1 | table sourceIPAddress] | spath output=user userIdentity.arn | rename sourceIPAddress as src_ip | table _time, user, src_ip, eventName, errorCode +search = | tstats `summariesonly` count dc(All_Traffic.src) as numberOfUniqueHosts from datamodel=Network_Traffic by All_Traffic.dest_port | `drop_dm_object_name("All_Traffic")` | sort - count [ESCU - Identify Systems Receiving Remote Desktop Traffic] action.escu = 0 @@ -9287,7 +9237,7 @@ action.escu.full_search_name = ESCU - Get Risk Modifiers For Endpoint action.escu.known_false_positives = None at this time action.escu.search_type = contextual action.escu.providing_technologies = ["Splunk Enterprise Security"] -action.escu.analytic_story = ["Windows Persistence Techniques", "ColdRoot MacOS RAT", "Hidden Cobra Malware", "Ransomware", "Credential Dumping", "Malicious PowerShell", "Suspicious WMI Use", "Lateral Movement", "SamSam Ransomware", "Use of Cleartext Protocols", "Netsh Abuse", "Splunk Enterprise Vulnerability", "JBoss Vulnerability", "Asset Tracking", "DHS Report TA18-074A", "Disabling Security Tools", "Suspicious Windows Registry Activities", "Suspicious Emails", "Unusual Processes", "ColdRoot MacOS RAT", "Monitor for Unauthorized Software", "Suspicious DNS Traffic", "Orangeworm Attack Group", "Splunk Enterprise Vulnerability CVE-2018-11409", "Prohibited Traffic Allowed or Protocol Mismatch", "Suspicious MSHTA Activity", "Router & Infrastructure Security", "Host Redirection", "Monitor for Updates", "Data Protection", "Collection and Staging", "Windows Log Manipulation", "Brand Monitoring", "Windows Privilege Escalation", "Windows Service Abuse", "Dynamic DNS", "Monitor Backup Solution", "Emotet Malware (TA18-201A)", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Windows File Extension and Association Abuse", "DNS Amplification Attacks", "Account Monitoring and Controls", "SQL Injection", "Command and Control", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Collection and Staging", "Unusual Processes", "Hidden Cobra Malware", "Credential Dumping", "Data Protection", "Ransomware", "Windows Persistence Techniques", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Windows Log Manipulation", "Splunk Enterprise Vulnerability", "Asset Tracking", "SQL Injection", "Emotet Malware (TA18-201A)", "Spectre And Meltdown Vulnerabilities", "Command and Control", "Orangeworm Attack Group", "Suspicious Emails", "DHS Report TA18-074A", "Host Redirection", "Malicious PowerShell", "Router & Infrastructure Security", "Suspicious WMI Use", "JBoss Vulnerability", "Windows Service Abuse", "Monitor Backup Solution", "Account Monitoring and Controls", "Use of Cleartext Protocols", "Brand Monitoring", "Disabling Security Tools", "Apache Struts Vulnerability", "Lateral Movement", "Suspicious MSHTA Activity", "ColdRoot MacOS RAT", "Monitor for Updates", "Windows File Extension and Association Abuse", "Splunk Enterprise Vulnerability CVE-2018-11409", "Prohibited Traffic Allowed or Protocol Mismatch", "Netsh Abuse", "DNS Amplification Attacks", "Monitor for Unauthorized Software", "SamSam Ransomware", "Dynamic DNS", "Suspicious Windows Registry Activities", "Windows Privilege Escalation"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 @@ -9398,6 +9348,56 @@ schedule_window = auto is_visible = false search = | tstats `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 +[ESCU - Execution of File With Spaces Before Extension - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-01-26 +action.escu.modification_date = 2018-01-26 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = This search uses the endpoint data model to look for process names with at least five spaces between the file name and its extension. +action.escu.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. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Execution of File With Spaces Before Extension - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Persistence", "Change Default File Association"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["DE.CM", "PR.PT", "PR.IP"]} +action.escu.known_false_positives = None identified. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Windows File Extension and Association Abuse"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Execution of File With Spaces Before Extension +action.notable = 1 +action.notable.param.nes_fields = dest +action.notable.param.rule_description = The system $dest$ executed a file with spaces before its extension. +action.notable.param.rule_title = Process $process$ with spaces before extension Launched on $dest$ +action.notable.param.security_domain = endpoint +action.notable.param.severity = medium +action.notable.param.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - Get Authentication Logs For Endpoint\n - ESCU - Get Notable History\n - ESCU - Get Notable Info\n - ESCU - Get Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n - ESCU - Get User Information from Identity Table\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - Get Parent Process Info\n - ESCU - Get Process Info\n"} +action.notable.param.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 60 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest,process +alert.suppress.period = 28800s +cron_schedule = 0 * * * * +description = This search looks for processes launched from files with at least five spaces in the name before the extension. This is typically done to obfuscate the file extension by pushing it outside of the default view. +dispatch.earliest_time = -70m@m +dispatch.latest_time = -10m@m +disabled=true +enableSched = 1 +counttype = number of events +relation = greater than +quantity = 0 +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | tstats `summariesonly` count values(Processes.process_path) as process_path min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process = "* .*" by Processes.dest Processes.user Processes.process Processes.process_name | `ctime(firstTime)`| `ctime(lastTime)` | `drop_dm_object_name(Processes)` + #################################################################### [escu-metrics-usage]