From a3cd035ef4a81cb685bdd07b293ebce4c65e8ea5 Mon Sep 17 00:00:00 2001 From: Rico Valdez Date: Fri, 22 Feb 2019 15:48:46 -0700 Subject: [PATCH 01/18] new search manifest and story update --- .../investigative_get_emails_from_source.json | 45 +++++++++++++++++++ escu/stories/dns_hijacking.json | 3 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 escu/searches/investigative_get_emails_from_source.json diff --git a/escu/searches/investigative_get_emails_from_source.json b/escu/searches/investigative_get_emails_from_source.json new file mode 100644 index 0000000000..9603a45507 --- /dev/null +++ b/escu/searches/investigative_get_emails_from_source.json @@ -0,0 +1,45 @@ +{ + "channel": "ESCU", + "creation_date": "2019-02-21", + "data_metadata": { + "data_models": [ + "Email" + ], + "data_source": [ + "Email" + ], + "providing_technologies": [ + "Microsoft Exchange" + ] + }, + "fields_required": [ + "src" + ], + "how_to_implement": "To successfully implement this search you must ingest your email logs or capture unencrypted email communications within network traffic, and populate the Email data model.", + "maintainers": [ + { + "company": "Splunk", + "email": "rvaldez@splunk.com", + "name": "Rico Valdez" + } + ], + "modification_date": "2019-02-21", + "original_authors": [ + { + "company": "Splunk", + "email": "rvaldez@splunk.com", + "name": "Rico Valdez" + } + ], + "search": "| tstats `summariesonly` min(_time) as firstTime max(_time) as lastTime count from datamodel=Email.All_Email by All_Email.src | `drop_dm_object_name(\"Email\")` | `ctime(firstTime)` | `ctime(lastTime)` | sort -count | rename All_Email.src as source firstTime as \"First Time\", lastTime as \"Last Time\"", + "search_description": "This search returns a list of all email sources seen in the 48 hours prior to the notable event to 24 hours after, and the number of emails from each source.", + "search_id": "ddc7af28-c34d-4392-af93-7f29a4e8806c", + "search_name": "Get History Of Email Sources", + "search_type": "investigative", + "search_window": { + "earliest_time_offset": 172800, + "latest_time_offset": 86400 + }, + "spec_version": 1, + "version": "1.0" +} diff --git a/escu/stories/dns_hijacking.json b/escu/stories/dns_hijacking.json index 013918a75b..c8a97d57f7 100644 --- a/escu/stories/dns_hijacking.json +++ b/escu/stories/dns_hijacking.json @@ -46,7 +46,8 @@ "Get DNS Server History for a host", "Get DNS traffic ratio", "Get Process responsible for the DNS traffic", - "Investigate Web Activity From src_ip" + "Investigate Web Activity From src_ip", + "Get History Of Email Sources" ], "support_searches": [] }, From 852b632742f4e63b6b19dda52cee8294e2f778ca Mon Sep 17 00:00:00 2001 From: divious1 Date: Mon, 25 Feb 2019 12:56:55 -0500 Subject: [PATCH 02/18] added phantom skeleton --- escu/searches/detection_dns_record_changed.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/escu/searches/detection_dns_record_changed.json b/escu/searches/detection_dns_record_changed.json index ee129e8dd4..f59ca3568a 100644 --- a/escu/searches/detection_dns_record_changed.json +++ b/escu/searches/detection_dns_record_changed.json @@ -75,6 +75,16 @@ "name": "Jose Hernandez" } ], + "phantom_playbooks": [ + { + "phantom_server": "automation (hostname)", + "playbook_display_name": "DNS record change investigation", + "playbook_name": "community/excessive_account_lockouts_enrichment_and_response", + "playbook_url": "https://my.phantom.us/4.1/playbook/excessive-account-lockouts-enrichment-and-response/", + "sensitivity": "green", + "severity": "medium" + } + ], "scheduling": { "cron_schedule": "0 * * * *", "earliest_time": "-70m@m", From dd3f20a9e2815d9bc36847306a766a0fd7a8f188 Mon Sep 17 00:00:00 2001 From: divious1 Date: Mon, 25 Feb 2019 18:07:05 -0500 Subject: [PATCH 03/18] updating search from a bug that rico found --- escu/searches/detection_dns_record_changed.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escu/searches/detection_dns_record_changed.json b/escu/searches/detection_dns_record_changed.json index f59ca3568a..530eb924e9 100644 --- a/escu/searches/detection_dns_record_changed.json +++ b/escu/searches/detection_dns_record_changed.json @@ -90,7 +90,7 @@ "earliest_time": "-70m@m", "latest_time": "-10m@m" }, - "search": "| inputlookup discovered_dns_records.csv | rename answer as discovered_answer | join domain[|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as current_answer values(DNS.src) as src from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!=\"unknown\" DNS.answer!=\"\" by DNS.query | rename DNS.query as query | where query!=\"unknown\" | rex field=query \"(?\\w+\\.\\w+?)(?:$|/)\"] | makemv delim=\" \" answer | makemv delim=\" \" type | sort -count | table count,src,domain,type,query,current_answer,discovered_answer | where current_answer!=discovered_answer", + "search": "| inputlookup discovered_dns_records.csv | rename answer as discovered_answer | join domain[|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as current_answer values(DNS.src) as src from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!=\"unknown\" DNS.answer!=\"\" by DNS.query | rename DNS.query as query | where query!=\"unknown\" | rex field=query \"(?\\w+\\.\\w+?)(?:$|/)\"] | makemv delim=\" \" answer | makemv delim=\" \" type | sort -count | table count,src,domain,type,query,current_answer,discovered_answer | makemv current_answer | mvexpand current_answer | makemv discovered_answer | eval n=mvfind(discovered_answer, current_answer) | where isnull(n)", "search_description": "The search takes the DNS records and their answers results of the discovered_dns_records lookup and finds if any records have changed by searching DNS response from the Network_Resolution datamodel across the last day.", "search_id": "44d3a43e-dcd5-49f7-8356-5209bb369065", "search_name": "DNS record changed", From 5264fa352a9eaffcf81d25e65b5800224c1bd87b Mon Sep 17 00:00:00 2001 From: divious1 Date: Tue, 26 Feb 2019 16:04:21 -0500 Subject: [PATCH 04/18] fixing ci error for wrong datamodel --- escu/searches/support_discover_dns_records.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escu/searches/support_discover_dns_records.json b/escu/searches/support_discover_dns_records.json index a474fb6325..0829cf8dca 100644 --- a/escu/searches/support_discover_dns_records.json +++ b/escu/searches/support_discover_dns_records.json @@ -3,7 +3,7 @@ "creation_date": "2019-02-14", "data_metadata": { "data_models": [ - "Network_Traffic" + "Network_Resolution" ], "data_source": [ "Network Communication" From 8b456720a9e77c1a880d0562c5d34e32deb3ee9c Mon Sep 17 00:00:00 2001 From: divious1 Date: Wed, 27 Feb 2019 15:34:09 -0500 Subject: [PATCH 05/18] updating the how to implement --- escu/searches/detection_dns_record_changed.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/escu/searches/detection_dns_record_changed.json b/escu/searches/detection_dns_record_changed.json index 530eb924e9..1cb5983e47 100644 --- a/escu/searches/detection_dns_record_changed.json +++ b/escu/searches/detection_dns_record_changed.json @@ -34,7 +34,7 @@ ] }, "eli5": "Using a lookup discover_dns_records generated by support search \"Discover DNS records\" we check previous network traffic and make sure the responses have not changed.", - "how_to_implement": "To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that the discover_dns_record lookup table be populated by the included support search \"Discover DNS record\".", + "how_to_implement": "To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that the discover_dns_record lookup table be populated by the included support search \"Discover DNS record\".

Splunk>Phantom Playbook Integration

If Splunk>Phantom is also configured in your environment, a Playbook called \"DNS Hijack Investigation\" can be configured to run when any results are found by this detection search. The playbook takes in the DNS record changed and uses Geoip, whois, Censys and PassiveTotal to detect if DNS issuers changed. To use this integration, install the Phantom App for Splunk https://splunkbase.splunk.com/app/3411/, add the correct hostname to the \"Phantom Instance\" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active.
(Playbook Link:https://my.phantom.us/4.1/playbook/dns-hijack-investigation/).

\"", "known_false_positives": "Legitimate DNS changes can be detected in this search. Investigate, verify and update the list of provided current answers for the domains in question as appropriate.", "maintainers": [ { @@ -79,8 +79,8 @@ { "phantom_server": "automation (hostname)", "playbook_display_name": "DNS record change investigation", - "playbook_name": "community/excessive_account_lockouts_enrichment_and_response", - "playbook_url": "https://my.phantom.us/4.1/playbook/excessive-account-lockouts-enrichment-and-response/", + "playbook_name": "community/dns_hijack_investigation", + "playbook_url": "https://my.phantom.us/4.1/playbook/dns-hijack-investigation/", "sensitivity": "green", "severity": "medium" } From f228adf7ad9cc8d49223b6a3aa951cb877924381 Mon Sep 17 00:00:00 2001 From: bpatel Date: Wed, 27 Feb 2019 12:46:51 -0800 Subject: [PATCH 06/18] updating the search --- escu/searches/investigative_get_emails_from_source.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escu/searches/investigative_get_emails_from_source.json b/escu/searches/investigative_get_emails_from_source.json index 9603a45507..9201703461 100644 --- a/escu/searches/investigative_get_emails_from_source.json +++ b/escu/searches/investigative_get_emails_from_source.json @@ -31,7 +31,7 @@ "name": "Rico Valdez" } ], - "search": "| tstats `summariesonly` min(_time) as firstTime max(_time) as lastTime count from datamodel=Email.All_Email by All_Email.src | `drop_dm_object_name(\"Email\")` | `ctime(firstTime)` | `ctime(lastTime)` | sort -count | rename All_Email.src as source firstTime as \"First Time\", lastTime as \"Last Time\"", + "search": "|tstats `summariesonly` values(All_Email.dest) as dest values(All_Email.recipient) as recepient min(_time) as firstTime max(_time) as lastTime count from datamodel=Email.All_Email by All_Email.src |`drop_dm_object_name(All_Email)` | `ctime(firstTime)` | `ctime(lastTime)`", "search_description": "This search returns a list of all email sources seen in the 48 hours prior to the notable event to 24 hours after, and the number of emails from each source.", "search_id": "ddc7af28-c34d-4392-af93-7f29a4e8806c", "search_name": "Get History Of Email Sources", From c6ed1ffcc95564538915156271704467bf234965 Mon Sep 17 00:00:00 2001 From: research bot Date: Thu, 28 Feb 2019 00:48:22 +0000 Subject: [PATCH 07/18] updating src files [ci skip] --- src/default/analytic_stories.conf | 19 +- src/default/analyticstories.conf | 1169 ++++----- src/default/savedsearches.conf | 3884 +++++++++++++++-------------- 3 files changed, 2611 insertions(+), 2461 deletions(-) diff --git a/src/default/analytic_stories.conf b/src/default/analytic_stories.conf index be20a5cae4..2e5657c627 100644 --- a/src/default/analytic_stories.conf +++ b/src/default/analytic_stories.conf @@ -316,17 +316,18 @@ The search in this story can help you to detect if attackers are abusing your co [DNS Hijacking] category = Adversary Tactics creation_date = 2019-02-09 -data_models = ["Application_State", "Authentication", "Network_Resolution", "Network_Traffic", "Risk", "Vulnerabilities", "Web"] +data_models = ["Application_State", "Authentication", "Email", "Network_Resolution", "Network_Traffic", "Risk", "Vulnerabilities", "Web"] description = Secure your environment against DNS hijacks with searches that help you detect and investigate unauthorized changes to DNS records. id = ad7eb6e0-f06c-4781-b145-a422d59c26e9 version = 1.0 mappings = {"mitre_attack": ["Command and Control", "Exfiltration Over Command and Control Channel", "Commonly Used Port", "Exfiltration Over Alternative Protocol", "Exfiltration", "Standard Application Layer Protocol", "Defense Evasion"], "cis20": ["CIS 8", "CIS 9", "CIS 12", "CIS 13", "CIS 3", "CIS 1"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["ID.AM", "PR.DS", "PR.IP", "PR.PT", "DE.AE", "DE.CM"]} -modification_date = 2019-02-09 +modification_date = 2019-02-21 reference = ["https://blog.malwarebytes.com/cybercrime/2015/09/dns-hijacks-what-to-look-for/", "https://www.darkreading.com/attacks-breaches/dns-hijacking-the-silent-threat-thats-putting-your-network-at-risk/a/d-id/1330922", "https://blog.talosintelligence.com/2018/11/dnspionage-campaign-targets-middle-east.html", "https://www.fireeye.com/blog/threat-research/2019/01/global-dns-hijacking-campaign-dns-record-manipulation-at-scale.html", "https://www.splunk.com/blog/2019/01/25/cisa-emergency-directive-19-01-doing-things-the-easy-way-in-splunk.html"] -providing_technologies = ["Bluecoat", "Bro", "Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Nessus", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream", "Sysmon", "Tanium", "Ziften", "macOS"] -detection_searches = ["ESCU - Clients Connecting to Multiple DNS Servers - Rule", "ESCU - Detect hosts connecting to dynamic domain providers - Rule", "ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule"] -investigative_searches = ["ESCU - Get DNS Server History for a host", "ESCU - Get DNS traffic ratio", "ESCU - Get Process responsible for the DNS traffic", "ESCU - Investigate Web Activity From src_ip"] +providing_technologies = ["Bluecoat", "Bro", "Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Exchange", "Microsoft Windows", "Nessus", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream", "Sysmon", "Tanium", "Ziften", "macOS"] +detection_searches = ["ESCU - Clients Connecting to Multiple DNS Servers - Rule", "ESCU - Detect hosts connecting to dynamic domain providers - Rule", "ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule", "ESCU - DNS record changed - Rule"] +investigative_searches = ["ESCU - Get DNS Server History for a host", "ESCU - Get DNS traffic ratio", "ESCU - Get Process responsible for the DNS traffic", "ESCU - Investigate Web Activity From src_ip", "ESCU - Get History Of Email Sources"] contextual_searches = ["ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get User Information from Identity Table", "ESCU - Get Risk Modifiers For User", "ESCU - Get Risk Modifiers For Endpoint"] +support_searches = ["ESCU - Discover DNS records"] narrative = Dubbed the Achilles heel of the Internet (see https://www.f5.com/labs/articles/threat-intelligence/dns-is-still-the-achilles-heel-of-the-internet-25613), DNS plays a critical role in routing web traffic but is notoriously vulnerable to attack. Its distributed nature is one reason, as it relies on unstructured connections between millions of clients and servers over inherently insecure protocols.\ \ The gravity and extent of the importance of securing DNS from attacks is undeniable. The fallout of compromised DNS can be disastrous. Not only can hackers bring down an entire business, they can intercept confidential information, emails, and login credentials, as well. \ @@ -730,7 +731,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", "Actions on Objectives", "Delivery"], "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", "Delivery", "Actions on Objectives"], "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"] @@ -798,7 +799,7 @@ data_models = ["Application_State", "Authentication", "Endpoint", "Network_Traff description = Leverage searches that allow you to detect and investigate unusual activities that might relate to the SamSam ransomware, including looking for file writes associated with SamSam, RDP brute force attacks, the presence of files with SamSam ransomware extensions, suspicious psexec use, and more. id = c4b89506-fbcf-4cb7-bfd6-527e54789604 version = 1.0 -mappings = {"mitre_attack": ["Exploitation of Vulnerability", "Execution", "Commonly Used Port", "Command-Line Interface", "Credential Access", "Lateral Movement", "Defense Evasion", "System Information Discovery", "Remote Desktop Protocol", "Discovery"], "cis20": ["CIS 3", "CIS 18", "CIS 8", "CIS 9", "CIS 10", "CIS 12", "CIS 2", "CIS 4", "CIS 16"], "kill_chain_phases": ["Delivery", "Actions on Objectives", "Reconnaissance", "Installation", "Command and Control"], "nist": ["ID.AM", "PR.DS", "ID.RA", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "PR.MA", "DE.CM"]} +mappings = {"mitre_attack": ["Exploitation of Vulnerability", "System Information Discovery", "Commonly Used Port", "Command-Line Interface", "Credential Access", "Lateral Movement", "Defense Evasion", "Execution", "Remote Desktop Protocol", "Discovery"], "cis20": ["CIS 3", "CIS 18", "CIS 8", "CIS 9", "CIS 10", "CIS 12", "CIS 2", "CIS 4", "CIS 16"], "kill_chain_phases": ["Delivery", "Actions on Objectives", "Reconnaissance", "Installation", "Command and Control"], "nist": ["ID.AM", "PR.DS", "ID.RA", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "PR.MA", "DE.CM"]} modification_date = 2018-12-14 reference = ["https://www.crowdstrike.com/blog/an-in-depth-analysis-of-samsam-ransomware-and-boss-spider/", "https://www.sophos.com/en-us/medialibrary/PDFs/technical-papers/SamSam-ransomware-chooses-Its-targets-carefully-wpna.pdf", "https://www.sophos.com/en-us/medialibrary/PDFs/technical-papers/SamSam-The-Almost-Six-Million-Dollar-Ransomware.pdf?cmp=26061"] providing_technologies = ["Apache", "Bluecoat", "Bro", "Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Nessus", "Netbackup", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -1071,7 +1072,7 @@ data_models = ["Application_State", "Authentication", "Change_Analysis", "Endpoi description = Monitor and detect registry changes initiated from remote locations, which can be a sign that an attacker has infiltrated your system. id = 2b1800dd-92f9-47dd-a981-fdf1351e5d55 version = 1.0 -mappings = {"mitre_attack": ["Modify Registry", "Local Port Monitor", "Authentication Package", "Lateral Movement", "Application Shimming", "Registry Run Keys / Start Folder", "AppInit DLLs", "Privilege Escalation", "Defense Evasion", "Accessibility Features", "Change Default File Association", "Persistence"], "cis20": ["CIS 5", "CIS 3", "CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.AE", "DE.CM", "PR.AC", "PR.IP"]} +mappings = {"mitre_attack": ["Modify Registry", "Local Port Monitor", "Application Shimming", "Lateral Movement", "Authentication Package", "Registry Run Keys / Start Folder", "AppInit DLLs", "Privilege Escalation", "Defense Evasion", "Accessibility Features", "Change Default File Association", "Persistence"], "cis20": ["CIS 5", "CIS 3", "CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.AE", "DE.CM", "PR.AC", "PR.IP"]} modification_date = 2018-12-03 reference = ["https://redcanary.com/blog/windows-registry-attacks-threat-detection/", "https://attack.mitre.org/wiki/Technique/T1112"] providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Splunk Enterprise Security", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -1146,7 +1147,7 @@ data_models = ["Email"] description = Monitor your environment for activity consistent with common attack techniques bad actors use when attempting to compromise web servers or other web-related assets. id = 31337aaa-bc22-4752-b599-ef112dq1dq7a version = 1.0 -mappings = {"mitre_attack": ["Valid Accounts", "Create Account"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 6", "CIS 16"], "nist": ["DE.CM", "DE.AE", "DE.DP"]} +mappings = {"mitre_attack": ["Valid Accounts", "Create Account"], "cis20": ["CIS 6", "CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE", "DE.CM"]} modification_date = 2018-10-08 reference = ["https://www.fbi.gov/scams-and-safety/common-fraud-schemes/internet-fraud", "https://www.fbi.gov/news/stories/2017-internet-crime-report-released-050718", "https://www.otalliance.org/news-events/press-releases/online-trust-alliance-reports-doubling-cyber-incidents-2017-0"] providing_technologies = ["Bro", "Microsoft Exchange", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream"] diff --git a/src/default/analyticstories.conf b/src/default/analyticstories.conf index bfaa28f35e..38549f5073 100644 --- a/src/default/analyticstories.conf +++ b/src/default/analyticstories.conf @@ -270,9 +270,9 @@ In DNS hijacking, the attacker assumes control over an account or makes use of a \ The searches in this Analytic Story help you detect and investigate activities that may indicate that DNS hijacking has taken place within your environment. references = ["https://blog.malwarebytes.com/cybercrime/2015/09/dns-hijacks-what-to-look-for/", "https://www.darkreading.com/attacks-breaches/dns-hijacking-the-silent-threat-thats-putting-your-network-at-risk/a/d-id/1330922", "https://blog.talosintelligence.com/2018/11/dnspionage-campaign-targets-middle-east.html", "https://www.fireeye.com/blog/threat-research/2019/01/global-dns-hijacking-campaign-dns-record-manipulation-at-scale.html", "https://www.splunk.com/blog/2019/01/25/cisa-emergency-directive-19-01-doing-things-the-easy-way-in-splunk.html"] -searches = ["ESCU - Clients Connecting to Multiple DNS Servers - Rule", "ESCU - Detect hosts connecting to dynamic domain providers - Rule", "ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule","ESCU - Get DNS Server History for a host", "ESCU - Get DNS traffic ratio", "ESCU - Get Process responsible for the DNS traffic", "ESCU - Investigate Web Activity From src_ip","ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get User Information from Identity Table", "ESCU - Get Risk Modifiers For User", "ESCU - Get Risk Modifiers For Endpoint"] +searches = ["ESCU - Clients Connecting to Multiple DNS Servers - Rule", "ESCU - Detect hosts connecting to dynamic domain providers - Rule", "ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule", "ESCU - DNS record changed - Rule","ESCU - Get DNS Server History for a host", "ESCU - Get DNS traffic ratio", "ESCU - Get Process responsible for the DNS traffic", "ESCU - Investigate Web Activity From src_ip", "ESCU - Get History Of Email Sources","ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get User Information from Identity Table", "ESCU - Get Risk Modifiers For User", "ESCU - Get Risk Modifiers For Endpoint","ESCU - Discover DNS records"] spec_version = 1 -last_updated = 2019-02-09 +last_updated = 2019-02-21 version = 1.0 @@ -1031,43 +1031,26 @@ known_false_positives = It is possible that these logs may be legitimately clear providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - Get Process Information For Port Activity] -type = investigative -explanation = none -how_to_implement = To successfully implement this search you must be ingesting endpoint data that associates processes with network events. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -earliest_time_offset = 7200 -latest_time_offset = 7200 - - -[savedsearch://ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] +[savedsearch://ESCU - Detect Activity Related to Pass the Hash Attacks - Rule] type = detection -asset_type = AWS Instance +asset_type = Endpoint +confidence = low +explanation = To detect pass the hash activity, we look at all events with event code 4624 or 4625 that specify a logon type 3 (network logons). We are looking for the NtLmSsP account, with a key length set to 0. These indicate lower level protocols that are typically used through Pass the Hash (WMI, SMB, etc.). The search also filters out events with an account name of 'Anonymous' to help reduce false positives. +how_to_implement = To successfully implement this search, you must ingest your Windows Security Event logs and leverage the TA for Windows to extract EventCode, Logon_Process, Logon_Type, Key_Length and Account_Name fields from these events. +annotations = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +known_false_positives = Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate. +providing_technologies = ["Microsoft Windows"] + + +[savedsearch://ESCU - Create or delete hidden shares using net.exe - Rule] +type = detection +asset_type = Endpoint confidence = medium -explanation = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ -\ -1. Counts the number of blocked outbound connections by each source IP\ -\ -1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ -\ -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 `numberOfBlockedConnections` as `latestCount`.\ -\ -1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. -annotations = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} -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. -providing_technologies = ["AWS"] +explanation = Net.exe is a built-in command-line tool on Windows that can be used to create, delete, and manage shared resources on the computer, both locally and remotely. Though this tool is used by Microsoft administrators to manage the network shares, attackers also leverage it to create and delete hidden file shares by appending "$" after the name of the share. To look for hidden shares, use a regular expression to look for a `(name_file_share)$`. In this search, we are looking for the command-line execution of net.exe with command-line parameters such as `net`, `share`, or `delete` that may correspond to the creation of hidden shares +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", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +known_false_positives = Administrators often leverage net.exe to create or delete network shares. You should verify that the activity was intentional and is legitimate. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] [savedsearch://ESCU - Reg.exe used to hide files/directories via registry keys - Rule] @@ -1080,37 +1063,14 @@ known_false_positives = None at the moment providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Detect Activity Related to Pass the Hash Attacks - Rule] -type = detection -asset_type = Endpoint -confidence = low -explanation = To detect pass the hash activity, we look at all events with event code 4624 or 4625 that specify a logon type 3 (network logons). We are looking for the NtLmSsP account, with a key length set to 0. These indicate lower level protocols that are typically used through Pass the Hash (WMI, SMB, etc.). The search also filters out events with an account name of 'Anonymous' to help reduce false positives. -how_to_implement = To successfully implement this search, you must ingest your Windows Security Event logs and leverage the TA for Windows to extract EventCode, Logon_Process, Logon_Type, Key_Length and Account_Name fields from these events. -annotations = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} -known_false_positives = Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate. -providing_technologies = ["Microsoft Windows"] - - -[savedsearch://ESCU - Detect Long DNS TXT Record Response - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. -how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. -annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} -known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. -providing_technologies = ["Splunk Stream", "Bro"] - - -[savedsearch://ESCU - Web Fraud - Password Sharing Across Accounts - Rule] -type = detection -asset_type = account -confidence = medium -explanation = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 -how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. -annotations = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. -providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] +[savedsearch://ESCU - Get Process Information For Port Activity] +type = investigative +explanation = none +how_to_implement = To successfully implement this search you must be ingesting endpoint data that associates processes with network events. +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] +earliest_time_offset = 7200 +latest_time_offset = 7200 [savedsearch://ESCU - TOR Traffic - Rule] @@ -1163,6 +1123,14 @@ earliest_time_offset = 86400 latest_time_offset = 86400 +[savedsearch://ESCU - Identify Systems Creating Remote Desktop Traffic] +type = support +explanation = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. +how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro"] + + [savedsearch://ESCU - Baseline of Security Group Activity by ARN] type = support explanation = Use this search to create a baseline for API calls related to security groups by the users who initiated this activity. It returns all logged API calls for all security-group-related 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. @@ -1171,15 +1139,33 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Create or delete hidden shares using net.exe - Rule] +[savedsearch://ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] type = detection -asset_type = Endpoint +asset_type = AWS Instance confidence = medium -explanation = Net.exe is a built-in command-line tool on Windows that can be used to create, delete, and manage shared resources on the computer, both locally and remotely. Though this tool is used by Microsoft administrators to manage the network shares, attackers also leverage it to create and delete hidden file shares by appending "$" after the name of the share. To look for hidden shares, use a regular expression to look for a `(name_file_share)$`. In this search, we are looking for the command-line execution of net.exe with command-line parameters such as `net`, `share`, or `delete` that may correspond to the creation of hidden shares -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", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -known_false_positives = Administrators often leverage net.exe to create or delete network shares. You should verify that the activity was intentional and is legitimate. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +explanation = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ +\ +1. Counts the number of blocked outbound connections by each source IP\ +\ +1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ +\ +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 `numberOfBlockedConnections` as `latestCount`.\ +\ +1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. +annotations = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} +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. +providing_technologies = ["AWS"] [savedsearch://ESCU - Detect processes used for System Network Configuration Discovery - Rule] @@ -1193,15 +1179,15 @@ known_false_positives = It is uncommon for normal users to execute a series of c providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - EC2 Instance Started In Previously Unseen Region - Rule] +[savedsearch://ESCU - WMI Permanent Event Subscription - Rule] type = detection -asset_type = AWS Instance +asset_type = Endpoint confidence = medium -explanation = In this search, we query CloudTrail logs to look for events that indicate that an instance was started in a particular region. Using the `previously_seen_aws_regions.csv` lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The `eval` and `if` functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with "Instance Started in a New Region". However, this region will be added to the list of `previously_seen_aws_regions.csv`. Please maintain `previously_seen_aws_regions.csv` -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 Regions" support search only once to create of baseline of previously seen regions. -annotations = {"mitre_attack": ["Defense Evasion"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 12"], "nist": ["DE.DP", "DE.AE"]} -known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. -providing_technologies = ["AWS"] +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 Windows event ID 5861. +how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. +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 - Get Outbound Emails to Hidden Cobra Threat Actors] @@ -1345,6 +1331,25 @@ known_false_positives = RDP gateways may have unusually high amounts of traffic providing_technologies = ["Bro", "Splunk Stream"] +[savedsearch://ESCU - DNS record changed - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = Using a lookup discover_dns_records generated by support search "Discover DNS records" we check previous network traffic and make sure the responses have not changed. +how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that the discover_dns_record lookup table be populated by the included support search "Discover DNS record". \ +\ + **Splunk>Phantom Playbook Integration**\ +\ +If Splunk>Phantom is also configured in your environment, a Playbook called "DNS Hijack Investigation" can be configured to run when any results are found by this detection search. The playbook takes in the DNS record changed and uses Geoip, whois, Censys and PassiveTotal to detect if DNS issuers changed. To use this integration, install the Phantom App for Splunk `https://splunkbase.splunk.com/app/3411/`, add the correct hostname to the "Phantom Instance" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active. \ +\ +(Playbook Link:`https://my.phantom.us/4.1/playbook/dns-hijack-investigation/`).\ +\ +" +annotations = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} +known_false_positives = Legitimate DNS changes can be detected in this search. Investigate, verify and update the list of provided current answers for the domains in question as appropriate. +providing_technologies = ["Splunk Stream", "Bro"] + + [savedsearch://ESCU - Web Fraud - Anomalous User Clickspeed - Rule] type = detection asset_type = account @@ -1356,15 +1361,12 @@ known_false_positives = As is common with many fraud-related searches, we are us providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] -[savedsearch://ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule] -type = detection -asset_type = Web Server -confidence = medium -explanation = This search returns the number of times a URL associated with this type of JexBoss probe is observed. -how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. -annotations = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} -known_false_positives = It's possible for legitimate HTTP requests to be made to URLs containing the suspicious paths. -providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] +[savedsearch://ESCU - Discover DNS records] +type = support +explanation = Discover the DNS records and their answers for domains owned by the company using network traffic events. The discovered events are exported as a lookup named `discovered_dns_records.csv` +how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. Also make sure that the cim_corporate_web_domains and cim_corporate_email_domains lookups are populated with the domains owned by your corporation +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro"] [savedsearch://ESCU - SMB Traffic Spike - Rule] @@ -1399,6 +1401,16 @@ earliest_time_offset = 14400 latest_time_offset = 0 +[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 - AWS Network Access Control List Created with All Open Ports - Rule] type = detection asset_type = AWS Instance @@ -1421,6 +1433,17 @@ known_false_positives = The activity may be legitimate. PowerShell is often used providing_technologies = ["Microsoft Windows"] +[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 - Detect Unauthorized Assets by MAC address - Rule] type = detection asset_type = Infrastructure @@ -1443,26 +1466,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] @@ -1506,15 +1527,15 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] +[savedsearch://ESCU - Detect Long DNS TXT Record Response - Rule] type = detection -asset_type = Windows +asset_type = Endpoint confidence = medium -explanation = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. -how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. -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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. -providing_technologies = ["Microsoft Windows"] +explanation = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. +how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. +annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} +known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. +providing_technologies = ["Splunk Stream", "Bro"] [savedsearch://ESCU - Suspicious Reg.exe Process - Rule] @@ -1558,17 +1579,6 @@ known_false_positives = Because the Recycle Bin is a hidden folder in modern ver providing_technologies = ["Sysmon"] -[savedsearch://ESCU - Suspicious File Write - Rule] -type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks at files being created or modified in the Endpoint file-system data model. The names of those files are checked against an included lookup file, which contains the names of files associated with malware or attack activity. The search returns any files with matching names, along with a note (also specified in the lookup file) that gives or points to more information about the files. -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. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file system reads and writes. In addition, this search leverages an included lookup file that contains the names of the files to watch for, as well as a note to communicate why that file name is being monitored. This lookup file can be edited to add or remove file the file names you want to monitor. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -known_false_positives = It's possible for a legitimate file to be created with the same name as one noted in the lookup file. Filenames listed in the lookup file should be unique enough that collisions are rare. Looking at the location of the file and the process responsible for the activity can help determine whether or not the activity is legitimate. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] - - [savedsearch://ESCU - Detect API activity from users without MFA - Rule] type = detection asset_type = AWS Instance @@ -1580,22 +1590,14 @@ known_false_positives = Many service accounts configured within an AWS infrastru providing_technologies = ["AWS"] -[savedsearch://ESCU - Investigate Web Activity From Host] +[savedsearch://ESCU - All backup logs for 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. +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 = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -earliest_time_offset = 3600 -latest_time_offset = 3600 - - -[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"] +providing_technologies = ["Netbackup"] +earliest_time_offset = 1209600 +latest_time_offset = 0 [savedsearch://ESCU - Clients Connecting to Multiple DNS Servers - Rule] @@ -1609,16 +1611,6 @@ 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 @@ -1630,21 +1622,45 @@ known_false_positives = You will encounter noise from legitimate print-monitor r providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[savedsearch://ESCU - Identify Systems Creating Remote Desktop Traffic] -type = support -explanation = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. -how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro"] - - -[savedsearch://ESCU - Get All AWS Activity From Region] +[savedsearch://ESCU - Get Sysmon WMI Activity for Host] 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. +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 = ["AWS"] -earliest_time_offset = 14400 +providing_technologies = ["Sysmon"] +earliest_time_offset = 7200 +latest_time_offset = 7200 + + +[savedsearch://ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] +type = detection +asset_type = Endpoint +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"] + + +[savedsearch://ESCU - Detect USB device insertion - Rule] +type = detection +asset_type = Endpoint +confidence = low +explanation = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device +how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. +annotations = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} +known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. +providing_technologies = ["Microsoft Windows"] + + +[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 latest_time_offset = 0 @@ -1669,12 +1685,15 @@ known_false_positives = There are no known false positives. providing_technologies = ["OSquery"] -[savedsearch://ESCU - Previously Seen EC2 Instance Types] -type = support -explanation = In this support search, we create a table of the earliest and latest time that a specific EC2 instance type has been seen. The instanceType request field is not required and defaults to m1.small, so any time this field is null, the search defaults the field to m1.small. This table is then outputted to a csv 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 - Unsuccessful Netbackup backups - Rule] +type = detection +asset_type = Endpoint +confidence = high +explanation = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. +how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. +annotations = {"cis20": ["CIS 10"], "nist": ["PR.IP"]} +known_false_positives = None identified +providing_technologies = ["Netbackup"] [savedsearch://ESCU - Remote Registry Key modifications - Rule] @@ -1688,34 +1707,25 @@ known_false_positives = This technique may be legitimately used by administrator providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[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 +[savedsearch://ESCU - Abnormally High AWS Instances Launched by User - 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"] -[savedsearch://ESCU - Detect malicious requests to exploit JBoss servers - 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"] - - -[savedsearch://ESCU - Email servers sending high volume traffic to hosts - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = This search may look complex, but it's a neat representation of how statistics can help you understand your dataset to bubble up events that are not normal compared to its behavior. The search consists of three parts. The first part of the SPL fetches the data you want to work on. In this search, we calculate the sum of bytes sent and bytes_out from systems categorized as email_server to each host. We then calculate the average and standard deviation for the bytes sent to all the hosts combined and on a per-host basis. Then we set threshold values to deviation_threshold and minimum_data_samples using eval statements. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. We then check for byte transfers that are statistically significantly higher than normal. The search then gives IP address of the host, the time of the increased byte transfer, how much data was transferred, and the average amount of data transfer the email server normally sends to all hosts and to this specific host. Finally, it includes the number of standard deviations away the byte count was from these averages. -how_to_implement = This search requires you to be ingesting your network traffic and populating the Network_Traffic data model. Your email servers must be categorized as "email_server" for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. -annotations = {"mitre_attack": ["Collection", "Email Collection", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} -known_false_positives = The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers. -providing_technologies = ["Bro", "Splunk Stream"] +[savedsearch://ESCU - Get Notable Info] +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 = 3600 +latest_time_offset = 3600 [savedsearch://ESCU - Excessive DNS Failures - Rule] @@ -1729,6 +1739,17 @@ known_false_positives = It is possible legitimate traffic can trigger this rule. providing_technologies = ["Splunk Stream", "Bro"] +[savedsearch://ESCU - File with Samsam Extension - Rule] +type = detection +asset_type = Endpoint +confidence = high +explanation = This search looks at file modifications across your hosts and creates notable events when it identifies files with extensions associated with the SamSam ransomware, including `.stubbin`, `.berkshire`, `.satoshi`, `.sophos`, or `.keyxml`. Files with these extensions have been observed in SamSam attacks consisting of payload data or keying material. +how_to_implement = You must be ingesting data that records file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. +annotations = {"mitre_attack": [], "kill_chain_phases": ["Installation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +known_false_positives = Because these extensions are not typically used in normal operations, you should investigate all results. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] + + [savedsearch://ESCU - DNS Query Length With High Standard Deviation - Rule] type = detection asset_type = Endpoint @@ -1751,47 +1772,11 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] -type = detection -asset_type = Endpoint -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"] - - -[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 = +[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. +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"] @@ -1817,6 +1802,17 @@ known_false_positives = This registry key may be modified via administrators to providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +[savedsearch://ESCU - EC2 Instance Started In Previously Unseen Region - Rule] +type = detection +asset_type = AWS Instance +confidence = medium +explanation = In this search, we query CloudTrail logs to look for events that indicate that an instance was started in a particular region. Using the `previously_seen_aws_regions.csv` lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The `eval` and `if` functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with "Instance Started in a New Region". However, this region will be added to the list of `previously_seen_aws_regions.csv`. Please maintain `previously_seen_aws_regions.csv` +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 Regions" support search only once to create of baseline of previously seen regions. +annotations = {"mitre_attack": ["Defense Evasion"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 12"], "nist": ["DE.DP", "DE.AE"]} +known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. +providing_technologies = ["AWS"] + + [savedsearch://ESCU - AWS Cloud Provisioning From Previously Unseen City - Rule] type = detection asset_type = AWS Instance @@ -1871,6 +1867,17 @@ known_false_positives = None at this time providing_technologies = ["AWS"] +[savedsearch://ESCU - Execution of File with Multiple Extensions - Rule] +type = detection +asset_type = Endpoint +confidence = high +explanation = This search uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. +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. +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"] + + [savedsearch://ESCU - Common Ransomware Notes - Rule] type = detection asset_type = Endpoint @@ -1956,15 +1963,12 @@ known_false_positives = It is unlikely that a normal user may create and place t providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Tanium", "Ziften"] -[savedsearch://ESCU - First time seen command line argument - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = The subsearch returns all events where `cmd.exe` was used with a `/c` parameter in the command-line arguments to execute other commands/programs. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for command-line execution and outputs this data to the lookup file to update the local cache. It returns only those events that have first been seen in the past four hours. This is combined with the main search to return the time, user, destination, process, parent process, and value of the command-line argument. -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 Technology Add-on (TA). Please make sure you run the support search "Previously seen command line arguments,"—which creates a lookup file called `previously_seen_cmd_line_arguments.csv`—a historical baseline of all command-line arguments. You must also validate this list. -annotations = {"mitre_attack": ["Execution", "Scripting", "Persistence", "Command-Line Interface"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} -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. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +[savedsearch://ESCU - Previously Seen EC2 Instance Types] +type = support +explanation = In this support search, we create a table of the earliest and latest time that a specific EC2 instance type has been seen. The instanceType request field is not required and defaults to m1.small, so any time this field is null, the search defaults the field to m1.small. This table is then outputted to a csv 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 - Suspicious Email Attachment Extensions - Rule] @@ -1978,14 +1982,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] @@ -2006,24 +2011,22 @@ earliest_time_offset = 14400 latest_time_offset = 0 -[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. +[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 = ["Netbackup"] -earliest_time_offset = 1209600 -latest_time_offset = 0 +providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - Get Backup Logs For Endpoint] +[savedsearch://ESCU - Get User Information from Identity Table] type = contextual explanation = none -how_to_implement = You must be ingesting your backup logs. +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 = ["Netbackup"] -earliest_time_offset = 604800 -latest_time_offset = 0 +providing_technologies = ["Splunk Enterprise Security"] +earliest_time_offset = 864000 +latest_time_offset = 86400 [savedsearch://ESCU - Child Processes of Spoolsv.exe - Rule] @@ -2047,6 +2050,14 @@ earliest_time_offset = 3600 latest_time_offset = 86400 +[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. +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. +known_false_positives = None at this time +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] + + [savedsearch://ESCU - Detect hosts connecting to dynamic domain providers - Rule] type = detection asset_type = Endpoint @@ -2088,25 +2099,48 @@ known_false_positives = None identified providing_technologies = ["Microsoft Windows"] -[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. -known_false_positives = None at this time -providing_technologies = ["AWS"] -earliest_time_offset = 14400 -latest_time_offset = 0 - - -[savedsearch://ESCU - Detect USB device insertion - Rule] +[savedsearch://ESCU - Detect Spike in AWS API Activity - Rule] type = detection -asset_type = Endpoint -confidence = low -explanation = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device -how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. -annotations = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} -known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. -providing_technologies = ["Microsoft Windows"] +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 - Web Fraud - Password Sharing Across Accounts - Rule] +type = detection +asset_type = account +confidence = medium +explanation = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 +how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. +annotations = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. +providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] [savedsearch://ESCU - Shim Database Installation With Suspicious Parameters - Rule] @@ -2120,15 +2154,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] @@ -2163,47 +2197,48 @@ known_false_positives = While not common, loading a DLL under %AppData% and call providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Get Notable Info] -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 = 3600 -latest_time_offset = 3600 - - -[savedsearch://ESCU - Windows hosts file modification - 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"] - - -[savedsearch://ESCU - Unsuccessful Netbackup backups - Rule] -type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. -how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. -annotations = {"cis20": ["CIS 10"], "nist": ["PR.IP"]} -known_false_positives = None identified -providing_technologies = ["Netbackup"] - - -[savedsearch://ESCU - WMI Permanent Event Subscription - Rule] +[savedsearch://ESCU - Email servers sending high volume traffic to hosts - 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 Windows event ID 5861. -how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. -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"] +explanation = This search may look complex, but it's a neat representation of how statistics can help you understand your dataset to bubble up events that are not normal compared to its behavior. The search consists of three parts. The first part of the SPL fetches the data you want to work on. In this search, we calculate the sum of bytes sent and bytes_out from systems categorized as email_server to each host. We then calculate the average and standard deviation for the bytes sent to all the hosts combined and on a per-host basis. Then we set threshold values to deviation_threshold and minimum_data_samples using eval statements. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. We then check for byte transfers that are statistically significantly higher than normal. The search then gives IP address of the host, the time of the increased byte transfer, how much data was transferred, and the average amount of data transfer the email server normally sends to all hosts and to this specific host. Finally, it includes the number of standard deviations away the byte count was from these averages. +how_to_implement = This search requires you to be ingesting your network traffic and populating the Network_Traffic data model. Your email servers must be categorized as "email_server" for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. +annotations = {"mitre_attack": ["Collection", "Email Collection", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} +known_false_positives = The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers. +providing_technologies = ["Bro", "Splunk Stream"] + + +[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 - Detect Large Outbound ICMP Packets - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = This search works by looking at fields in the Network_Traffic data model, which is populated by various firewalls and passive networking monitoring technologies. Specifically, the search looks for ICMP packets larger than 1,000 bytes with a destination that is external to your organization. +how_to_implement = In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have a good understanding of how your network segments are designed and that you are able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the company's assets in the `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model +annotations = {"mitre_attack": ["Command and Control", "Standard Non-Application Layer Protocol"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE"]} +known_false_positives = ICMP packets are used in a variety of ways to help troubleshoot networking issues and ensure the proper flow of traffic. As such, it is possible that a large ICMP packet could be perfectly legitimate. If large ICMP packets are associated with command and control traffic, there will typically be a large number of these packets observed over time. If the search is providing a large number of false positives, you can modify the search to adjust the byte threshold or whitelist specific IP addresses, as necessary. +providing_technologies = ["Bro", "Splunk Stream", "Palo Alto Firewall"] + + +[savedsearch://ESCU - First time seen command line argument - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = The subsearch returns all events where `cmd.exe` was used with a `/c` parameter in the command-line arguments to execute other commands/programs. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for command-line execution and outputs this data to the lookup file to update the local cache. It returns only those events that have first been seen in the past four hours. This is combined with the main search to return the time, user, destination, process, parent process, and value of the command-line argument. +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 Technology Add-on (TA). Please make sure you run the support search "Previously seen command line arguments,"—which creates a lookup file called `previously_seen_cmd_line_arguments.csv`—a historical baseline of all command-line arguments. You must also validate this list. +annotations = {"mitre_attack": ["Execution", "Scripting", "Persistence", "Command-Line Interface"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +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. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] [savedsearch://ESCU - Get Logon Rights Modifications For User] @@ -2311,17 +2346,14 @@ known_false_positives = It's possible that legitimate traffic will have long URL providing_technologies = ["Splunk Stream", "Bro"] -[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 - 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 - Execution of File With Spaces Before Extension - Rule] @@ -2356,12 +2388,25 @@ known_false_positives = There are many legitimate applications that must execute providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[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`. +[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 - 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. +providing_technologies = ["AWS"] [savedsearch://ESCU - AWS S3 Bucket details via bucketName] @@ -2409,15 +2454,15 @@ known_false_positives = Legitimate router connections may appear as new connecti providing_technologies = ["Active Directory", "Palo Alto Firewall"] -[savedsearch://ESCU - File with Samsam Extension - Rule] +[savedsearch://ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule] type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks at file modifications across your hosts and creates notable events when it identifies files with extensions associated with the SamSam ransomware, including `.stubbin`, `.berkshire`, `.satoshi`, `.sophos`, or `.keyxml`. Files with these extensions have been observed in SamSam attacks consisting of payload data or keying material. -how_to_implement = You must be ingesting data that records file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Installation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -known_false_positives = Because these extensions are not typically used in normal operations, you should investigate all results. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +asset_type = Web Server +confidence = medium +explanation = This search returns the number of times a URL associated with this type of JexBoss probe is observed. +how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. +annotations = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} +known_false_positives = It's possible for legitimate HTTP requests to be made to URLs containing the suspicious paths. +providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] [savedsearch://ESCU - Investigate Successful Remote Desktop Authentications] @@ -2501,25 +2546,15 @@ known_false_positives = Although unlikely, administrators may use wmi to execute providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] -[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 - AWS Network Access Control List Deleted - Rule] +[savedsearch://ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] type = detection -asset_type = AWS Instance +asset_type = Windows confidence = medium -explanation = The search looks for CloudTrail events to detect whether any network ACLs have been deleted and gives you values of error messages and error codes (if any), user details, user source IP, the user who initiated this request, and the name of the event. -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. -annotations = {"mitre_attack": ["Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11"], "nist": ["DE.DP", "DE.AE"]} -known_false_positives = It's possible that a user has legitimately deleted a network ACL. -providing_technologies = ["AWS"] +explanation = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. +how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. +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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. +providing_technologies = ["Microsoft Windows"] [savedsearch://ESCU - Get All AWS Activity From Country] @@ -2532,6 +2567,16 @@ earliest_time_offset = 14400 latest_time_offset = 0 +[savedsearch://ESCU - Get History Of Email Sources] +type = investigative +explanation = none +how_to_implement = To successfully implement this search you must ingest your email logs or capture unencrypted email communications within network traffic, and populate the Email data model. +known_false_positives = None at this time +providing_technologies = ["Microsoft Exchange"] +earliest_time_offset = 172800 +latest_time_offset = 86400 + + [savedsearch://ESCU - Shim Database File Creation - Rule] type = detection asset_type = Endpoint @@ -2565,26 +2610,30 @@ known_false_positives = It's likely that you'll find activity detected by users/ providing_technologies = ["AWS"] -[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 - 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 - 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 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"] +[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 - 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] @@ -2648,30 +2697,14 @@ known_false_positives = None at this time providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -[savedsearch://ESCU - Detect PsExec With accepteula Flag - Rule] +[savedsearch://ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule] type = detection -asset_type = Endpoint +asset_type = AWS Instance 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 - Identify Systems Receiving Remote Desktop Traffic] -type = support -explanation = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. -how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro"] - - -[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 +explanation = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. +annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. providing_technologies = ["AWS"] @@ -2798,15 +2831,12 @@ known_false_positives = None at this time providing_technologies = ["Netbackup"] -[savedsearch://ESCU - Detect Large Outbound ICMP Packets - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = This search works by looking at fields in the Network_Traffic data model, which is populated by various firewalls and passive networking monitoring technologies. Specifically, the search looks for ICMP packets larger than 1,000 bytes with a destination that is external to your organization. -how_to_implement = In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have a good understanding of how your network segments are designed and that you are able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the company's assets in the `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model -annotations = {"mitre_attack": ["Command and Control", "Standard Non-Application Layer Protocol"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE"]} -known_false_positives = ICMP packets are used in a variety of ways to help troubleshoot networking issues and ensure the proper flow of traffic. As such, it is possible that a large ICMP packet could be perfectly legitimate. If large ICMP packets are associated with command and control traffic, there will typically be a large number of these packets observed over time. If the search is providing a large number of false positives, you can modify the search to adjust the byte threshold or whitelist specific IP addresses, as necessary. -providing_technologies = ["Bro", "Splunk Stream", "Palo Alto Firewall"] +[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 - Extended Period Without Successful Netbackup Backups - Rule] @@ -2830,14 +2860,15 @@ earliest_time_offset = 3600 latest_time_offset = 0 -[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] @@ -2886,34 +2917,54 @@ 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 - Registry Keys for Creating SHIM Databases - Rule] +[savedsearch://ESCU - Web Fraud - Account Harvesting - Rule] type = detection -asset_type = Endpoint +asset_type = Account confidence = medium -explanation = In this search, we look for modifications to registry keys used for shim databases on Microsoft platforms via the object_category and object_path field in the Change_Analysis data model and give you the destination, command used to initiate the change, the user who conducted this activity, the resource affected(object), and the whole path of the object. An application compatibility shim is a small library that transparently intercepts an API (via hooking), changes the parameters passed, handles the operation itself, or redirects the operation elsewhere, such as additional code stored on a system. This capability can be also leveraged by attackers to create and store malicious files in a shim database as observed in CARBANAK backdoor. -how_to_implement = To successfully implement this search, you must populate the Change_Analysis data model. This is typically populated via endpoint detection and response products, such as Carbon Black or other endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. -annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -known_false_positives = There are many legitimate applications that leverage shim databases for compatibility purposes for legacy applications -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +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 - 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. +[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. 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] +[savedsearch://ESCU - Malicious PowerShell Process - Encoded Command - 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 = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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 = System administrators may use this option, but it's not common. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] + + +[savedsearch://ESCU - Add Prohibited Processes to Enterprise Security] +type = support +explanation = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. +how_to_implement = This search should be run on each new install of ESCU. +known_false_positives = None at this time +providing_technologies = ["Splunk Enterprise Security"] [savedsearch://ESCU - Monitor Email For Brand Abuse - Rule] @@ -2935,14 +2986,15 @@ known_false_positives = None at this time providing_technologies = ["Microsoft Windows"] -[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 - 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 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"] [savedsearch://ESCU - Single Letter Process On Endpoint - Rule] @@ -2978,12 +3030,14 @@ known_false_positives = There are no known false positives. providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Apache"] -[savedsearch://ESCU - Add Prohibited Processes to Enterprise Security] -type = support -explanation = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. -how_to_implement = This search should be run on each new install of ESCU. +[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 Enterprise Security"] +providing_technologies = ["Splunk Stream", "Bro", "Microsoft Windows"] +earliest_time_offset = 864000 +latest_time_offset = 86400 [savedsearch://ESCU - Monitor DNS For Brand Abuse - Rule] @@ -2997,15 +3051,15 @@ known_false_positives = None at this time providing_technologies = ["Splunk Stream", "Bro"] -[savedsearch://ESCU - Remote Desktop Network Traffic - Rule] +[savedsearch://ESCU - Suspicious File Write - 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"] +confidence = high +explanation = This search looks at files being created or modified in the Endpoint file-system data model. The names of those files are checked against an included lookup file, which contains the names of files associated with malware or attack activity. The search returns any files with matching names, along with a note (also specified in the lookup file) that gives or points to more information about the files. +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. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file system reads and writes. In addition, this search leverages an included lookup file that contains the names of the files to watch for, as well as a note to communicate why that file name is being monitored. This lookup file can be edited to add or remove file the file names you want to monitor. +annotations = {"mitre_attack": [], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +known_false_positives = It's possible for a legitimate file to be created with the same name as one noted in the lookup file. Filenames listed in the lookup file should be unique enough that collisions are rare. Looking at the location of the file and the process responsible for the activity can help determine whether or not the activity is legitimate. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] [savedsearch://ESCU - Create local admin accounts using net.exe - Rule] @@ -3048,23 +3102,12 @@ 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] +[savedsearch://ESCU - Baseline of API Calls per User ARN] 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. -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. +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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +providing_technologies = ["AWS"] [savedsearch://ESCU - Get EC2 Launch Details] @@ -3106,20 +3149,15 @@ known_false_positives = Using multiple AWS accounts and roles is perfectly valid providing_technologies = ["AWS"] -[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. -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 - Email Attachments With Lots Of Spaces - Rule] +type = detection +asset_type = Endpoint +confidence = high +explanation = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. +how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. +annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} known_false_positives = None at this time -providing_technologies = ["AWS"] - - -[savedsearch://ESCU - Baseline of blocked outbound traffic from AWS] -type = support -explanation = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. -known_false_positives = None at this time -providing_technologies = ["AWS"] +providing_technologies = ["Microsoft Exchange"] [savedsearch://ESCU - Previously seen users in CloudTrail] @@ -3140,6 +3178,17 @@ earliest_time_offset = 14400 latest_time_offset = 0 +[savedsearch://ESCU - Detect New Open S3 buckets - Rule] +type = detection +asset_type = S3 Bucket +confidence = medium +explanation = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. +annotations = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. +providing_technologies = ["AWS"] + + [savedsearch://ESCU - Get DNS traffic ratio] type = investigative explanation = none @@ -3300,25 +3349,15 @@ known_false_positives = Administrators and users sometimes prefer backing up the providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Identify New User Accounts - Rule] +[savedsearch://ESCU - Windows hosts file modification - 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 +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"] [savedsearch://ESCU - Attempt To Stop Security Service - Rule] @@ -3351,26 +3390,26 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Detect New Open S3 buckets - Rule] +[savedsearch://ESCU - Remote Desktop Network Traffic - Rule] type = detection -asset_type = S3 Bucket +asset_type = Endpoint confidence = medium -explanation = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. -annotations = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. -providing_technologies = ["AWS"] +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 - EC2 Instance Modified With Previously Unseen User - Rule] +[savedsearch://ESCU - Registry Keys for Creating SHIM Databases - Rule] type = detection -asset_type = AWS Instance +asset_type = Endpoint 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. -providing_technologies = ["AWS"] +explanation = In this search, we look for modifications to registry keys used for shim databases on Microsoft platforms via the object_category and object_path field in the Change_Analysis data model and give you the destination, command used to initiate the change, the user who conducted this activity, the resource affected(object), and the whole path of the object. An application compatibility shim is a small library that transparently intercepts an API (via hooking), changes the parameters passed, handles the operation itself, or redirects the operation elsewhere, such as additional code stored on a system. This capability can be also leveraged by attackers to create and store malicious files in a shim database as observed in CARBANAK backdoor. +how_to_implement = To successfully implement this search, you must populate the Change_Analysis data model. This is typically populated via endpoint detection and response products, such as Carbon Black or other endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. +annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +known_false_positives = There are many legitimate applications that leverage shim databases for compatibility purposes for legacy applications +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] [savedsearch://ESCU - Remote Process Instantiation via WMI - Rule] @@ -3392,25 +3431,26 @@ known_false_positives = None at this time providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - Execution of File with Multiple Extensions - Rule] +[savedsearch://ESCU - AWS Network Access Control List Deleted - Rule] type = detection -asset_type = Endpoint -confidence = high -explanation = This search uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. -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. -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"] +asset_type = AWS Instance +confidence = medium +explanation = The search looks for CloudTrail events to detect whether any network ACLs have been deleted and gives you values of error messages and error codes (if any), user details, user source IP, the user who initiated this request, and the name of the event. +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. +annotations = {"mitre_attack": ["Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11"], "nist": ["DE.DP", "DE.AE"]} +known_false_positives = It's possible that a user has legitimately deleted a network ACL. +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] @@ -3432,14 +3472,14 @@ known_false_positives = It's possible that normal DNS traffic will exhibit this providing_technologies = ["Splunk Stream", "Bro"] -[savedsearch://ESCU - Malicious PowerShell Process - Encoded Command - Rule] +[savedsearch://ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule] type = detection asset_type = Endpoint -confidence = medium -explanation = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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 = System administrators may use this option, but it's not common. +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"] @@ -3453,38 +3493,35 @@ known_false_positives = Some legitimate applications start with long command-lin providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Email Attachments With Lots Of Spaces - Rule] -type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. -how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +[savedsearch://ESCU - Baseline of blocked outbound traffic from AWS] +type = support +explanation = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. known_false_positives = None at this time -providing_technologies = ["Microsoft Exchange"] +providing_technologies = ["AWS"] -[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 - EC2 Instance Started With Previously Unseen Instance Type - Rule] +[savedsearch://ESCU - AWS Cloud Provisioning From Previously Unseen IP Address - Rule] type = detection asset_type = AWS Instance confidence = medium -explanation = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. +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 = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. +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 - Identify Systems Receiving Remote Desktop Traffic] +type = support +explanation = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. +how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro"] + + [savedsearch://ESCU - Get Risk Modifiers For Endpoint] type = contextual explanation = none diff --git a/src/default/savedsearches.conf b/src/default/savedsearches.conf index 03bb3cadc6..362074a3b2 100644 --- a/src/default/savedsearches.conf +++ b/src/default/savedsearches.conf @@ -13,7 +13,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Indicator Removal o action.escu.known_false_positives = It is possible that these logs may be legitimately cleared by Administrators. action.escu.search_type = detection action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Windows Log Manipulation", "Ransomware"] +action.escu.analytic_story = ["Ransomware", "Windows Log Manipulation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Windows Event Log Cleared action.notable = 1 @@ -22,7 +22,7 @@ action.notable.param.rule_description = The Event Logging System has been cleare action.notable.param.rule_title = Windows Event Log Cleared 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 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 @@ -47,145 +47,6 @@ schedule_window = auto is_visible = false search = ((sourcetype=*wineventlog:security) AND (EventCode=1102 OR EventCode=1100)) OR ((sourcetype=wineventlog:system OR sourcetype=XmlWinEventlog:System) AND EventCode=104) | stats count min(_time) as firstTime max(_time) as lastTime by EventCode sourcetype host | `ctime(firstTime)` | `ctime(lastTime)` | rename host as dest -[ESCU - Get Process Information For Port Activity] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-06-25 -action.escu.modification_date = 2017-09-10 -action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = To successfully implement this search you must be ingesting endpoint data that associates processes with network events. -action.escu.data_models = ["Application_State"] -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 = ["SamSam Ransomware", "Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch", "Use of Cleartext Protocols", "Command and Control"] -action.escu.fields_required = ["dest_port", "src"] -action.escu.earliest_time_offset = 7200 -action.escu.latest_time_offset = 7200 -description = This search will return information about the process associated with observed network traffic to a specific destination port from a specific host. -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | from datamodel Application_State.Ports | search dest_port={dest_port} dest={src} | table dest dest_port process process_name - -[ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-04-26 -action.escu.modification_date = 2018-05-07 -action.escu.asset_at_risk = AWS Instance -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ -\ -1. Counts the number of blocked outbound connections by each source IP\ -\ -1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ -\ -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 `numberOfBlockedConnections` as `latestCount`.\ -\ -1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. -action.escu.full_search_name = ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule -action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} -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 = ["AWS Network ACL Activity", "Suspicious AWS Traffic", "Command and Control"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Spike in blocked Outbound Traffic from your AWS -action.notable = 1 -action.notable.param.nes_fields = src_ip -action.notable.param.rule_description = A spike in the blocked outbound connection is detected from source $src_ip$. -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.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 will detect spike in blocked outbound network connections originating from within your AWS environment. It will also update the cache file that factors in the latest data. -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:cloudwatchlogs:vpcflow action=blocked (src_ip=10.0.0.0/8 OR src_ip=172.16.0.0/12 OR src_ip=192.168.0.0/16) ( dest_ip!=10.0.0.0/8 AND dest_ip!=172.16.0.0/12 AND dest_ip!=192.168.0.0/16) [search 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) | stats count as numberOfBlockedConnections by src_ip | inputlookup baseline_blocked_outbound_connections append=t | fields - latestCount | stats values(*) as * by src_ip | rename numberOfBlockedConnections as latestCount | eval newAvgBlockedConnections=avgBlockedConnections + (latestCount-avgBlockedConnections)/720 | eval newStdevBlockedConnections=sqrt(((pow(stdevBlockedConnections, 2)*719 + (latestCount-newAvgBlockedConnections)*(latestCount-avgBlockedConnections))/720)) | eval avgBlockedConnections=coalesce(newAvgBlockedConnections, avgBlockedConnections), stdevBlockedConnections=coalesce(newStdevBlockedConnections, stdevBlockedConnections), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) | table src_ip, latestCount, numDataPoints, avgBlockedConnections, stdevBlockedConnections | outputlookup baseline_blocked_outbound_connections | eval dataPointThreshold = 5, deviationThreshold = 3 | eval isSpike=if((latestCount > avgBlockedConnections+deviationThreshold*stdevBlockedConnections) AND numDataPoints > dataPointThreshold, 1, 0) | where isSpike=1 | table src_ip] | stats values(dest_ip) as "Blocked Destination IPs", values(interface_id) as "resourceId" count as numberOfBlockedConnections, dc(dest_ip) as uniqueDestConnections by src_ip - -[ESCU - Reg.exe used to hide files/directories via registry keys - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-10-27 -action.escu.modification_date = 2017-10-30 -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = Reg.exe is a binary native to Windows platform used to edit the registry hives of the system. Attackers can leverage this binary to hide files by passing in arguments that are used to hide the files. In the search, we first gather results with keywords, add, Hidden, and REG_DWORD, that will be in the raw event and filter by process and the command-line. We then leverage regular expressions on the command-line field to look for /d value as 2 which is responsible for hiding a file or directory. -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 - Reg.exe used to hide files/directories via registry keys - Rule -action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} -action.escu.known_false_positives = None at the moment -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", "Windows Persistence Techniques", "Suspicious Windows Registry Activities"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Reg.exe used to hide files/directories via registry keys -action.notable = 1 -action.notable.param.nes_fields = dest, process, cmdline -action.notable.param.rule_description = Regedit.exe is used by attackers to hide malware files/directories in windows environments via registry key settings. This rule detects command-line arguments used to hide a file/directory -action.notable.param.rule_title = Regedit.exe used to hide a file/directory 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.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,cmdline -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = The search looks for command-line arguments used to hide a file or directory using the reg add command. -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 add Hidden REG_DWORD | search process=*reg.exe cmdline=*add* cmdline=*Hidden* cmdline=*REG_DWORD* | regex cmdline= "(/d\s+2)" | stats count values(cmdline) min(_time) as firstTime max(_time) as lastTime by dest process | `ctime(firstTime)` |`ctime(lastTime)` - [ESCU - Detect Activity Related to Pass the Hash Attacks - Rule] action.escu = 0 action.escu.enabled = 1 @@ -235,44 +96,44 @@ schedule_window = auto is_visible = false search = sourcetype="WinEventLog:Security" (EventCode=4624 OR EventCode=4625) Logon_Process=NtLmSsp Logon_Type=3 Account_Name !="ANONYMOUS LOGON" Key_Length=0 | table _time Source_Network_Address Account_Name Account_Domain ComputerName Workstation_Name -[ESCU - Detect Long DNS TXT Record Response - Rule] +[ESCU - Create or delete hidden shares using net.exe - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-18 -action.escu.modification_date = 2017-09-18 +action.escu.creation_date = 2018-06-14 +action.escu.modification_date = 2018-11-15 action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. -action.escu.how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. -action.escu.data_models = ["Network_Resolution"] -action.escu.full_search_name = ESCU - Detect Long DNS TXT Record Response - Rule -action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} -action.escu.known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. +action.escu.eli5 = Net.exe is a built-in command-line tool on Windows that can be used to create, delete, and manage shared resources on the computer, both locally and remotely. Though this tool is used by Microsoft administrators to manage the network shares, attackers also leverage it to create and delete hidden file shares by appending "$" after the name of the share. To look for hidden shares, use a regular expression to look for a `(name_file_share)$`. In this search, we are looking for the command-line execution of net.exe with command-line parameters such as `net`, `share`, or `delete` that may correspond to the creation of hidden shares +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 - Create or delete hidden shares using net.exe - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +action.escu.known_false_positives = Administrators often leverage net.exe to create or delete network shares. You should verify that the activity was intentional and is legitimate. action.escu.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Hidden Cobra Malware"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Long DNS TXT Record Response +action.correlationsearch.label = Create or delete hidden shares using net.exe action.notable = 1 -action.notable.param.nes_fields = src, query -action.notable.param.rule_description = A DNS TXT record response of over 100 characters was detected. -action.notable.param.rule_title = Long DNS TXT Record Response -action.notable.param.security_domain = network +action.notable.param.nes_fields = dest,process_name +action.notable.param.rule_description = Net.exe was used to create or delete hidden network shares by $user$ on $dest$ +action.notable.param.rule_title = Hidden File shares created/deleted 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 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 Outbound Emails to Hidden Cobra Threat Actors\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 = dest action.risk.param._risk_object_type = system -action.risk.param._risk_score = 70 +action.risk.param._risk_score = 50 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = src +alert.suppress.fields = dest,process_name alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search is used to detect attempts to use DNS tunneling, by calculating the length of responses to DNS TXT queries. Endpoints using DNS as a method of transmission for data exfiltration, command and control, or evasion of security controls can often be detected by noting unusually large volumes of DNS traffic. +cron_schedule = 5 * * * * +description = This search looks for the creation or deletion of hidden shares using net.exe. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -283,45 +144,44 @@ 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_Resolution where DNS.message_type=response AND DNS.record_type=TXT by DNS.src DNS.dest DNS.answer DNS.record_type | `drop_dm_object_name("DNS")` | eval anslen=len(answer) | search anslen>100 | `ctime(firstTime)` | `ctime(lastTime)` | rename src as "Source IP", dest as "Destination IP", answer as "DNS Answer" anslen as "Answer Length" record_type as "DNS Record Type" firstTime as "First Time" lastTime as "Last Time" count as Count | table "Source IP" "Destination IP" "DNS Answer" "DNS Record Type" "Answer Length" Count "First Time" "Last Time" +search = | tstats `summariesonly` count values(Processes.user) as user values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processs.process_name=net.exe OR Processes.process_name=net1.exe) by Processes.process Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` | search (process=*share* OR process=*delete*)| regex process="\S+[$]" -[ESCU - Web Fraud - Password Sharing Across Accounts - Rule] +[ESCU - Reg.exe used to hide files/directories via registry keys - Rule] 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.channel = webfraud +action.escu.creation_date = 2017-10-27 +action.escu.modification_date = 2017-10-30 +action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 -action.escu.how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. -action.escu.full_search_name = ESCU - Web Fraud - Password Sharing Across Accounts - Rule -action.escu.mappings = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. +action.escu.eli5 = Reg.exe is a binary native to Windows platform used to edit the registry hives of the system. Attackers can leverage this binary to hide files by passing in arguments that are used to hide the files. In the search, we first gather results with keywords, add, Hidden, and REG_DWORD, that will be in the raw event and filter by process and the command-line. We then leverage regular expressions on the command-line field to look for /d value as 2 which is responsible for hiding a file or directory. +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 - Reg.exe used to hide files/directories via registry keys - Rule +action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +action.escu.known_false_positives = None at the moment 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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Suspicious Windows Registry Activities", "Windows Defense Evasion Tactics"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Web Fraud - Password Sharing Across Accounts +action.correlationsearch.label = Reg.exe used to hide files/directories via registry keys action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = This search is used to identify user accounts, $user$, that share common passwords -action.notable.param.rule_title = Web Fraud Detection: Password Sharing Across Accounts -action.notable.param.security_domain = threat +action.notable.param.nes_fields = dest, process, cmdline +action.notable.param.rule_description = Regedit.exe is used by attackers to hide malware files/directories in windows environments via registry key settings. This rule detects command-line arguments used to hide a file/directory +action.notable.param.rule_title = Regedit.exe used to hide a file/directory 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 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 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 = user -action.risk.param._risk_object_type = other -action.risk.param._risk_score = 10 +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 = user -alert.suppress.period = 3600s +alert.suppress.fields = dest,cmdline +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = This search is used to identify user accounts that share a common password. +description = The search looks for command-line arguments used to hide a file or directory using the reg add command. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -332,7 +192,31 @@ 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=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 +search = sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational add Hidden REG_DWORD | search process=*reg.exe cmdline=*add* cmdline=*Hidden* cmdline=*REG_DWORD* | regex cmdline= "(/d\s+2)" | stats count values(cmdline) min(_time) as firstTime max(_time) as lastTime by dest process | `ctime(firstTime)` |`ctime(lastTime)` + +[ESCU - Get Process Information For Port Activity] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-06-25 +action.escu.modification_date = 2017-09-10 +action.escu.channel = ESCU +action.escu.eli5 = none +action.escu.how_to_implement = To successfully implement this search you must be ingesting endpoint data that associates processes with network events. +action.escu.data_models = ["Application_State"] +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 = ["SamSam Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch", "Use of Cleartext Protocols", "Ransomware", "Command and Control"] +action.escu.fields_required = ["dest_port", "src"] +action.escu.earliest_time_offset = 7200 +action.escu.latest_time_offset = 7200 +description = This search will return information about the process associated with observed network traffic to a specific destination port from a specific host. +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | from datamodel Application_State.Ports | search dest_port={dest_port} dest={src} | table dest dest_port process process_name [ESCU - TOR Traffic - Rule] action.escu = 0 @@ -350,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 = ["Prohibited Traffic Allowed or Protocol Mismatch", "Ransomware", "Command and Control"] action.correlationsearch.enabled = 1 action.correlationsearch.label = TOR Traffic action.notable = 1 @@ -400,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 = ["Emotet Malware (TA18-201A)", "Suspicious Command-Line Executions"] +action.escu.analytic_story = ["Suspicious Command-Line Executions", "Emotet Malware (TA18-201A)"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect Use of cmd.exe to Launch Script Interpreters action.notable = 1 @@ -409,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 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 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 @@ -470,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 = ["SamSam Ransomware", "Monitor Backup Solution", "Ransomware"] +action.escu.analytic_story = ["SamSam Ransomware", "Ransomware", "Monitor Backup Solution"] 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 @@ -503,6 +387,29 @@ 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 +[ESCU - Identify Systems Creating Remote Desktop Traffic] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-04-24 +action.escu.modification_date = 2017-09-15 +action.escu.channel = ESCU +action.escu.eli5 = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. +action.escu.how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Identify Systems Creating Remote Desktop Traffic +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 = ["Lateral Movement"] +description = This search counts the numbers of times the system has generated remote desktop traffic. +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=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.src | `drop_dm_object_name("All_Traffic")` | sort - count + [ESCU - Baseline of Security Group Activity by ARN] action.escu = 0 action.escu.enabled = 1 @@ -525,44 +432,61 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail `securityGroupAPIs` | 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 security_group_activity_baseline | stats count -[ESCU - Create or delete hidden shares using net.exe - Rule] +[ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-06-14 -action.escu.modification_date = 2018-11-15 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-04-26 +action.escu.modification_date = 2018-05-07 +action.escu.asset_at_risk = AWS Instance action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = Net.exe is a built-in command-line tool on Windows that can be used to create, delete, and manage shared resources on the computer, both locally and remotely. Though this tool is used by Microsoft administrators to manage the network shares, attackers also leverage it to create and delete hidden file shares by appending "$" after the name of the share. To look for hidden shares, use a regular expression to look for a `(name_file_share)$`. In this search, we are looking for the command-line execution of net.exe with command-line parameters such as `net`, `share`, or `delete` that may correspond to the creation of hidden shares -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 - Create or delete hidden shares using net.exe - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -action.escu.known_false_positives = Administrators often leverage net.exe to create or delete network shares. You should verify that the activity was intentional and is legitimate. +action.escu.eli5 = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ +\ +1. Counts the number of blocked outbound connections by each source IP\ +\ +1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ +\ +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 `numberOfBlockedConnections` as `latestCount`.\ +\ +1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. +action.escu.full_search_name = ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule +action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} +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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Hidden Cobra Malware"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS Traffic", "Command and Control", "AWS Network ACL Activity"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Create or delete hidden shares using net.exe +action.correlationsearch.label = Detect Spike in blocked Outbound Traffic from your AWS action.notable = 1 -action.notable.param.nes_fields = dest,process_name -action.notable.param.rule_description = Net.exe was used to create or delete hidden network shares by $user$ on $dest$ -action.notable.param.rule_title = Hidden File shares created/deleted on $dest$ -action.notable.param.security_domain = endpoint +action.notable.param.nes_fields = src_ip +action.notable.param.rule_description = A spike in the blocked outbound connection is detected from source $src_ip$. +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 - 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 Outbound Emails to Hidden Cobra Threat Actors\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 - AWS Network ACL Details from ID\n - ESCU - AWS Network Interface details via resourceId\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 +action.risk.param._risk_object = src_ip action.risk.param._risk_object_type = system -action.risk.param._risk_score = 50 +action.risk.param._risk_score = 30 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest,process_name -alert.suppress.period = 86400s -cron_schedule = 5 * * * * -description = This search looks for the creation or deletion of hidden shares using net.exe. +alert.suppress.fields = src_ip +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = This search will detect spike in blocked outbound network connections originating from within your AWS environment. It will also update the cache file that factors in the latest data. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -573,7 +497,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count values(Processes.user) as user values(Processes.parent_process) as parent_process min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where (Processs.process_name=net.exe OR Processes.process_name=net1.exe) by Processes.process Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` | search (process=*share* OR process=*delete*)| regex process="\S+[$]" +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) [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) | stats count as numberOfBlockedConnections by src_ip | inputlookup baseline_blocked_outbound_connections append=t | fields - latestCount | stats values(*) as * by src_ip | rename numberOfBlockedConnections as latestCount | eval newAvgBlockedConnections=avgBlockedConnections + (latestCount-avgBlockedConnections)/720 | eval newStdevBlockedConnections=sqrt(((pow(stdevBlockedConnections, 2)*719 + (latestCount-newAvgBlockedConnections)*(latestCount-avgBlockedConnections))/720)) | eval avgBlockedConnections=coalesce(newAvgBlockedConnections, avgBlockedConnections), stdevBlockedConnections=coalesce(newStdevBlockedConnections, stdevBlockedConnections), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) | table src_ip, latestCount, numDataPoints, avgBlockedConnections, stdevBlockedConnections | outputlookup baseline_blocked_outbound_connections | eval dataPointThreshold = 5, deviationThreshold = 3 | eval isSpike=if((latestCount > avgBlockedConnections+deviationThreshold*stdevBlockedConnections) AND numDataPoints > dataPointThreshold, 1, 0) | where isSpike=1 | table src_ip] | stats values(dest_ip) as "Blocked Destination IPs", values(interface_id) as "resourceId" count as numberOfBlockedConnections, dc(dest_ip) as uniqueDestConnections by src_ip [ESCU - Detect processes used for System Network Configuration Discovery - Rule] action.escu = 0 @@ -625,43 +549,43 @@ 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 by Processes.dest Processes.process_name Processes.user _time | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name(Processes)` | search `system_network_configuration_discovery_tools` | transaction dest maxpause=5m |where eventcount>=5 | table firstTime lastTime dest user process_name process parent_process eventcount -[ESCU - EC2 Instance Started In Previously Unseen Region - Rule] +[ESCU - WMI Permanent Event Subscription - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-02-01 -action.escu.modification_date = 2018-02-23 -action.escu.asset_at_risk = AWS Instance +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 = In this search, we query CloudTrail logs to look for events that indicate that an instance was started in a particular region. Using the `previously_seen_aws_regions.csv` lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The `eval` and `if` functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with "Instance Started in a New Region". However, this region will be added to the list of `previously_seen_aws_regions.csv`. Please maintain `previously_seen_aws_regions.csv` -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 Regions" support search only once to create of baseline of previously seen regions. -action.escu.full_search_name = ESCU - EC2 Instance Started In Previously Unseen Region - Rule -action.escu.mappings = {"mitre_attack": ["Defense Evasion"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 12"], "nist": ["DE.DP", "DE.AE"]} -action.escu.known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. +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 Windows event ID 5861. +action.escu.how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. +action.escu.full_search_name = ESCU - WMI Permanent Event Subscription - 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 = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Suspicious WMI Use"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = EC2 Instance Started In Previously Unseen Region +action.correlationsearch.label = WMI Permanent Event Subscription action.notable = 1 -action.notable.param.nes_fields = awsRegion -action.notable.param.rule_description = An AWS instance is started in a new, previously unseen, region -action.notable.param.rule_title = AWS instance is started in a new region -action.notable.param.security_domain = network +action.notable.param.nes_fields = dest +action.notable.param.rule_description = This search looks for the creation of a permanent WMI event subscription via Windows event 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 EC2 Instance Details by instanceId\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 - ESCU - Investigate AWS activities via region name\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 - 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 = awsRegion -action.risk.param._risk_object_type = other -action.risk.param._risk_score = 30 +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 = awsRegion -alert.suppress.period = 14400s +alert.suppress.fields = dest +alert.suppress.period = 28800s cron_schedule = 0 * * * * -description = This search looks for CloudTrail events where an instance is started in a particular region in the last one hour and then compares it to a lookup file of previously seen regions where an instance was started +description = This search looks for the creation of WMI permanent event subscriptions. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -672,7 +596,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail earliest=-1h StartInstances | stats earliest(_time) as earliest latest(_time) as latest by awsRegion| inputlookup append=t previously_seen_aws_regions.csv | stats min(earliest) as earliest max(latest) as latest by awsRegion | outputlookup previously_seen_aws_regions.csv | eval regionStatus=if(earliest >= relative_time(now(), "-1d@d"), "Instance Started in a New Region","Previously Seen Region") | convert ctime(earliest) ctime(latest) | where regionStatus="Instance Started in a New Region" +search = sourcetype="wineventlog:microsoft-windows-wmi-activity/operational" EventCode=5861 Binding | rex field=Message "Consumer =\s+(?[^;|^$]+)" | search consumer!="NTEventLogEventConsumer=\"SCM Event Log Consumer\"" | stats count min(_time) as firstTime max(_time) as lastTime by ComputerName, consumer, Message | `ctime(firstTime)`| `ctime(lastTime)` | rename ComputerName as dest [ESCU - Get Outbound Emails to Hidden Cobra Threat Actors] action.escu = 0 @@ -834,7 +758,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "PowerShell", "Scripting"] 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.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Malicious PowerShell"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Malicious PowerShell Process - Connect To Internet With Hidden Window action.notable = 1 @@ -843,7 +767,7 @@ action.notable.param.rule_description = The system $dest$ executed a PowerShell 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.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 @@ -930,7 +854,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 @@ -956,7 +880,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 = ["Windows File Extension and Association Abuse", "Suspicious Windows Registry Activities"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows File Extension and Association Abuse"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Suspicious Changes to File Associations action.notable = 1 @@ -965,7 +889,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 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.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 @@ -1188,6 +1112,71 @@ 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.app=rdp by All_Traffic.src All_Traffic.dest All_Traffic.dest_port | eventstats stdev(count) AS stdev avg(count) AS avg p50(count) AS p50| where count>(stdev*2) | rename All_Traffic.src AS src All_Traffic.dest AS dest | table firstTime lastTime src dest count avg p50 stdev +[ESCU - DNS record changed - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2019-02-14 +action.escu.modification_date = 2019-02-14 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = Using a lookup discover_dns_records generated by support search "Discover DNS records" we check previous network traffic and make sure the responses have not changed. +action.escu.how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that the discover_dns_record lookup table be populated by the included support search "Discover DNS record". \ +\ + **Splunk>Phantom Playbook Integration**\ +\ +If Splunk>Phantom is also configured in your environment, a Playbook called "DNS Hijack Investigation" can be configured to run when any results are found by this detection search. The playbook takes in the DNS record changed and uses Geoip, whois, Censys and PassiveTotal to detect if DNS issuers changed. To use this integration, install the Phantom App for Splunk `https://splunkbase.splunk.com/app/3411/`, add the correct hostname to the "Phantom Instance" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active. \ +\ +(Playbook Link:`https://my.phantom.us/4.1/playbook/dns-hijack-investigation/`).\ +\ +" +action.escu.data_models = ["Network_Resolution"] +action.escu.full_search_name = ESCU - DNS record changed - Rule +action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} +action.escu.known_false_positives = Legitimate DNS changes can be detected in this search. Investigate, verify and update the list of provided current answers for the domains in question as appropriate. +action.escu.search_type = detection +action.escu.providing_technologies = ["Splunk Stream", "Bro"] +action.escu.analytic_story = ["DNS Hijacking"] +action.runphantomplaybook = 1 +action.runphantomplaybook.param.phantom_server = automation (hostname) +action.runphantomplaybook.param.playbook_name = community/dns_hijack_investigation +action.runphantomplaybook.param.playbook_display_name = DNS record change investigation +action.runphantomplaybook.param.playbook_url = https://my.phantom.us/4.1/playbook/dns-hijack-investigation/ +action.runphantomplaybook.param.sensitivity = green +action.runphantomplaybook.param.severity = medium +action.correlationsearch.enabled = 1 +action.correlationsearch.label = DNS record changed +action.notable = 1 +action.notable.param.nes_fields = src +action.notable.param.rule_description = The table represents a list of DNS records and their responses for corporate domains that have recently changed +action.notable.param.rule_title = DNS record changed +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|runphantomplaybook]]: Phantom playbook recommendations:\nSplunk>Phantom Response Playbook - Monitor enrichment of the Splunk>Phantom Playbook called DNS record change investigation and answer any analyst prompt in Mission Control with a response decision. Link to the playbook https://my.phantom.us/4.1/playbook/dns-hijack-investigation/\n2. [[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 - ESCU - Get Vulnerability Logs For Endpoint\n\n3. [[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 History Of Email Sources\n - ESCU - Get Process responsible for the DNS traffic\n - ESCU - Investigate Web Activity From src_ip\n"} +action.notable.param.recommended_actions = runphantomplaybook, 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 = 40 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = src +alert.suppress.period = 28800s +cron_schedule = 0 * * * * +description = The search takes the DNS records and their answers results of the discovered_dns_records lookup and finds if any records have changed by searching DNS response from the Network_Resolution datamodel across the last day. +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 = | inputlookup discovered_dns_records.csv | rename answer as discovered_answer | join domain[|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as current_answer values(DNS.src) as src from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!="unknown" DNS.answer!="" by DNS.query | rename DNS.query as query | where query!="unknown" | rex field=query "(?\w+\.\w+?)(?:$|/)"] | makemv delim=" " answer | makemv delim=" " type | sort -count | table count,src,domain,type,query,current_answer,discovered_answer | makemv current_answer | mvexpand current_answer | makemv discovered_answer | eval n=mvfind(discovered_answer, current_answer) | where isnull(n) + [ESCU - Web Fraud - Anomalous User Clickspeed - Rule] action.escu = 0 action.escu.enabled = 1 @@ -1237,55 +1226,28 @@ schedule_window = auto is_visible = false search = sourcetype=stream:http http_content_type=text* | rex field=cookie "form_key=(?\w+)" | streamstats window=2 current=1 range(_time) as TimeDelta by session_id | where TimeDelta>0 |stats count stdev(TimeDelta) as ClickSpeedStdDev avg(TimeDelta) as ClickSpeedAvg by session_id | where count>5 AND (ClickSpeedStdDev<.5 OR ClickSpeedAvg<.5) -[ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule] +[ESCU - Discover DNS records] 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 = 2019-02-14 +action.escu.modification_date = 2019-02-14 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search returns the number of times a URL associated with this type of JexBoss probe is observed. -action.escu.how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. -action.escu.data_models = ["Web"] -action.escu.full_search_name = ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule -action.escu.mappings = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} -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.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect attackers scanning for vulnerable JBoss servers -action.notable = 1 -action.notable.param.nes_fields = -action.notable.param.rule_description = This search looks for specific GET/HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. -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.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.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest,url -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search looks for specific GET or HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. JexBoss is described as the exploit tool of choice for this malicious activity. -dispatch.earliest_time = -70m@m +action.escu.eli5 = Discover the DNS records and their answers for domains owned by the company using network traffic events. The discovered events are exported as a lookup named `discovered_dns_records.csv` +action.escu.how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. Also make sure that the cim_corporate_web_domains and cim_corporate_email_domains lookups are populated with the domains owned by your corporation +action.escu.data_models = ["Network_Resolution"] +action.escu.full_search_name = ESCU - Discover DNS records +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 = ["DNS Hijacking"] +description = The search takes corporate and common cloud provider domains configured under cim_corporate_email_domains.csv, cim_corporate_web_domains.csv, and cloud_domains.csv and finds their responses across the last 30 days from data in the Network Traffic datamodel, then stores the output under the discovered_dns_records.csv lookup +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 = | 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)` +search = | inputlookup cim_corporate_email_domains.csv | inputlookup append=T cim_corporate_web_domains.csv | inputlookup append=T cim_cloud_domains.csv | eval domain = trim(replace(domain, "\*", "")) | join domain [|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as answer from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!="unknown" DNS.answer!="" by DNS.query | rename DNS.query as query | where query!="unknown" | rex field=query "(?\w+\.\w+?)(?:$|/)"] | makemv delim=" " answer | makemv delim=" " type | sort -count | table count,domain,type,query,answer | outputlookup createinapp=true discovered_dns_records.csv [ESCU - SMB Traffic Spike - Rule] action.escu = 0 @@ -1303,7 +1265,7 @@ action.escu.mappings = {"mitre_attack": ["Commonly Used Port"], "kill_chain_phas 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", "DHS Report TA18-074A", "Ransomware", "Emotet Malware (TA18-201A)"] +action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "Hidden Cobra Malware", "Ransomware", "DHS Report TA18-074A"] action.correlationsearch.enabled = 1 action.correlationsearch.label = SMB Traffic Spike action.notable = 1 @@ -1312,7 +1274,7 @@ action.notable.param.rule_description = There was a spike in SMB traffic from $s 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.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 @@ -1399,7 +1361,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 S3 Activities", "Suspicious AWS EC2 Activities"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "Suspicious AWS S3 Activities"] action.escu.fields_required = ["awsRegion"] action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 @@ -1410,6 +1372,29 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:cloudtrail awsRegion={awsRegion}| rename requestParameters.instancesSet.items{}.instanceId as instanceId| stats values(eventName) by userName instanceId +[ESCU - Get EC2 Instance Details by instanceId] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-02-12 +action.escu.modification_date = 2018-02-12 +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 = ["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 +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 + [ESCU - AWS Network Access Control List Created with All Open Ports - Rule] action.escu = 0 action.escu.enabled = 1 @@ -1508,6 +1493,56 @@ 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] +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 = 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 = ["Palo Alto Firewall", "Bro", "Splunk Stream"] +action.escu.analytic_story = ["Prohibited Traffic Allowed or Protocol Mismatch", "Ransomware", "Command and Control"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Prohibited Network Traffic Allowed +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.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.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 = 40 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +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 +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.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 - Detect Unauthorized Assets by MAC address - Rule] action.escu = 0 action.escu.enabled = 1 @@ -1608,104 +1643,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", "Suspicious AWS Traffic", "Suspicious Command-Line Executions", "Splunk Enterprise Vulnerability", "Credential Dumping", "Suspicious MSHTA Activity", "DNS Amplification Attacks", "Monitor for Updates", "SamSam Ransomware", "Malicious PowerShell", "Asset Tracking", "Prohibited Traffic Allowed or Protocol Mismatch", "Suspicious AWS EC2 Activities", "Splunk Enterprise Vulnerability CVE-2018-11409", "Unusual AWS EC2 Modifications", "Emotet Malware (TA18-201A)", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Suspicious AWS S3 Activities", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Suspicious Emails", "AWS Cross Account Activity", "DNS Hijacking", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Windows Defense Evasion Tactics", "Dynamic DNS", "Host Redirection", "Monitor Backup Solution", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Monitor for Unauthorized Software", "Brand Monitoring", "Suspicious WMI Use", "Suspicious AWS Login Activities", "AWS Network ACL Activity", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "AWS User Monitoring", "Web Fraud Detection", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "SQL Injection", "ColdRoot MacOS RAT", "Collection and Staging", "Disabling Security Tools", "Data Protection"] +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", "Suspicious Command-Line Executions", "Credential Dumping", "Suspicious MSHTA Activity", "SamSam Ransomware", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Windows Service Abuse", "Netsh Abuse", "Windows Defense Evasion Tactics", "Orangeworm Attack Group", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Collection and Staging", "Disabling Security Tools"] +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 @@ -1869,7 +1851,7 @@ action.escu.full_search_name = ESCU - Previously Seen EC2 Launches By User action.escu.known_false_positives = None at this time action.escu.search_type = support action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] description = This search builds a table of previously seen ARNs that have launched a EC2 instance. dispatch.earliest_time = -90d@d dispatch.latest_time = -10m@m @@ -1879,43 +1861,44 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | rename userIdentity.arn as arn | stats earliest(_time) as firstTime latest(_time) as lastTime by arn | outputlookup previously_seen_ec2_launches_by_user.csv | stats count -[ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] +[ESCU - Detect Long DNS TXT Record Response - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-08-28 -action.escu.modification_date = 2018-08-28 -action.escu.asset_at_risk = Windows +action.escu.creation_date = 2017-06-18 +action.escu.modification_date = 2017-09-18 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. -action.escu.how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. -action.escu.full_search_name = ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - 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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. +action.escu.eli5 = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. +action.escu.how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. +action.escu.data_models = ["Network_Resolution"] +action.escu.full_search_name = ESCU - Detect Long DNS TXT Record Response - Rule +action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} +action.escu.known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Credential Dumping"] +action.escu.providing_technologies = ["Splunk Stream", "Bro"] +action.escu.analytic_story = ["Command and Control", "Suspicious DNS Traffic"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Mimikatz Via PowerShell And EventCode 4663 +action.correlationsearch.label = Detect Long DNS TXT Record Response action.notable = 1 -action.notable.param.nes_fields = user, dest -action.notable.param.rule_description = Possible attempt at credential dumping via PowerShell was detected on $dest$ by $user$. -action.notable.param.rule_title = Event ID 4663 Specifying PowerShell Reading From LSASS.exe Identified on $dest$. -action.notable.param.security_domain = access +action.notable.param.nes_fields = src, query +action.notable.param.rule_description = A DNS TXT record response of over 100 characters was detected. +action.notable.param.rule_title = Long DNS TXT Record Response +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.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"} 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 = 40 +action.risk.param._risk_score = 70 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = user, dest, process +alert.suppress.fields = src alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = This search looks for PowerShell reading lsass memory consistent with credential dumping. +description = This search is used to detect attempts to use DNS tunneling, by calculating the length of responses to DNS TXT queries. Endpoints using DNS as a method of transmission for data exfiltration, command and control, or evasion of security controls can often be detected by noting unusually large volumes of DNS traffic. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -1926,7 +1909,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=wineventlog:security EventCode=4663 Process_Name=*powershell.exe Object_Name=*lsass.exe Access_Mask=0x10 | stats count min(_time) as firstTime max(_time) as lastTime by dest, Process_Name, Process_ID, Message | rename Process_Name as process | `ctime(firstTime)`| `ctime(lastTime)` +search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Resolution where DNS.message_type=response AND DNS.record_type=TXT by DNS.src DNS.dest DNS.answer DNS.record_type | `drop_dm_object_name("DNS")` | eval anslen=len(answer) | search anslen>100 | `ctime(firstTime)` | `ctime(lastTime)` | rename src as "Source IP", dest as "Destination IP", answer as "DNS Answer" anslen as "Answer Length" record_type as "DNS Record Type" firstTime as "First Time" lastTime as "Last Time" count as Count | table "Source IP" "Destination IP" "DNS Answer" "DNS Record Type" "Answer Length" Count "First Time" "Last Time" [ESCU - Suspicious Reg.exe Process - Rule] action.escu = 0 @@ -1943,7 +1926,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 = ["DHS Report TA18-074A", "Windows Defense Evasion Tactics", "Disabling Security Tools"] +action.escu.analytic_story = ["Windows Defense Evasion Tactics", "DHS Report TA18-074A", "Disabling Security Tools"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Suspicious Reg.exe Process action.notable = 1 @@ -2098,56 +2081,6 @@ 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)` -[ESCU - Suspicious File Write - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-06-14 -action.escu.modification_date = 2018-11-14 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks at files being created or modified in the Endpoint file-system data model. The names of those files are checked against an included lookup file, which contains the names of files associated with malware or attack activity. The search returns any files with matching names, along with a note (also specified in the lookup file) that gives or points to more information about the files. -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. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file system reads and writes. In addition, this search leverages an included lookup file that contains the names of the files to watch for, as well as a note to communicate why that file name is being monitored. This lookup file can be edited to add or remove file the file names you want to monitor. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Suspicious File Write - 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's possible for a legitimate file to be created with the same name as one noted in the lookup file. Filenames listed in the lookup file should be unique enough that collisions are rare. Looking at the location of the file and the process responsible for the activity can help determine whether or not the activity is legitimate. -action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Hidden Cobra Malware"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Suspicious File Write -action.notable = 1 -action.notable.param.nes_fields = dest, file_name -action.notable.param.rule_description = A write to a filename associated with malicious activity detected on $dest$. -action.notable.param.rule_title = Suspicious File Write 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 Outbound Emails to Hidden Cobra Threat Actors\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,file_name -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = The search looks for files created with names that have been linked to malicious activity. -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.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] action.escu = 0 action.escu.enabled = 1 @@ -2197,51 +2130,28 @@ 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 - Investigate Web Activity From Host] +[ESCU - All backup logs for host] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-21 -action.escu.modification_date = 2017-11-09 +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 = 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.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 = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -action.escu.analytic_story = ["Unusual Processes", "Netsh Abuse", "SamSam Ransomware", "Orangeworm Attack Group", "Ransomware", "Emotet Malware (TA18-201A)", "Host Redirection", "Suspicious Command-Line Executions", "Brand Monitoring", "Credential Dumping", "Suspicious Emails", "Monitor for Unauthorized Software"] +action.escu.providing_technologies = ["Netbackup"] +action.escu.analytic_story = ["Monitor Backup Solution"] 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. +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 = | from datamodel Web.Web | search src={dest} - -[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.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Windows Service Abuse", "Orangeworm Attack Group"] -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 +search = | search sourcetype="netbackup_logs" dest={dest} [ESCU - Clients Connecting to Multiple DNS Servers - Rule] action.escu = 0 @@ -2259,7 +2169,7 @@ action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", action.escu.known_false_positives = It's possible that an enterprise has more than five DNS servers that are configured in a round-robin rotation. Please customize the search, as appropriate. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "DNS Hijacking", "Command and Control"] +action.escu.analytic_story = ["DNS Hijacking", "Command and Control", "Suspicious DNS Traffic"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Clients Connecting to Multiple DNS Servers action.notable = 1 @@ -2268,7 +2178,7 @@ action.notable.param.rule_description = This search allows you to identify the e action.notable.param.rule_title = Client $src$ Connecting to Multiple DNS 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 - 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"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -2293,29 +2203,6 @@ 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 @@ -2366,51 +2253,151 @@ 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 - Identify Systems Creating Remote Desktop Traffic] +[ESCU - Get Sysmon WMI Activity for Host] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-24 -action.escu.modification_date = 2017-09-15 -action.escu.channel = ESCU -action.escu.eli5 = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. -action.escu.how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Identify Systems Creating Remote Desktop Traffic -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 = ["Lateral Movement"] -description = This search counts the numbers of times the system has generated remote desktop traffic. -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=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.src | `drop_dm_object_name("All_Traffic")` | sort - 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.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 = 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.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 = ["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. +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 = | 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 +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 - Detect Prohibited Applications Spawning cmd.exe - Rule] +action.escu = 0 +action.escu.enabled = 1 +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 = 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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Suspicious Command-Line Executions", "Suspicious MSHTA Activity"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect Prohibited Applications Spawning cmd.exe +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.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, parent_process +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. +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.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_name Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] + +[ESCU - Detect USB device insertion - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-08-03 +action.escu.modification_date = 2017-11-27 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = low +action.escu.eli5 = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device +action.escu.how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. +action.escu.data_models = ["Change_Analysis"] +action.escu.full_search_name = ESCU - Detect USB device insertion - Rule +action.escu.mappings = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} +action.escu.known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. +action.escu.search_type = detection +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Data Protection"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect USB device insertion +action.notable = 1 +action.notable.param.nes_fields = dest +action.notable.param.rule_description = Read/Write attempt to a USB was detected on this host +action.notable.param.rule_title = Read/Write attempt to a USB 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 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"} +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.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = The search is used to detect hosts that generate Windows Event ID 4663 for successful attempts to write to or read from a removable storage and Event ID 4656 for failures, which occurs when a USB drive is plugged in. In this scenario we are querying the Change_Analysis data model to look for Windows Event ID 4656 or 4663 where the priority of the affected host is marked as high in the ES Assets and Identity Framework. +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 earliest(_time) AS earliest latest(_time) AS latest from datamodel=Change_Analysis where (nodename = All_Changes) All_Changes.result="Removable Storage device" (All_Changes.result_id=4663 OR All_Changes.result_id=4656) (All_Changes.src_priority=high) by All_Changes.dest | `drop_dm_object_name("All_Changes")`| `ctime(earliest)`| `ctime(latest)` + +[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 = ["SamSam Ransomware", "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 [ESCU - Get DNS Server History for a host] action.escu = 0 @@ -2424,7 +2411,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 = ["Data Protection", "Dynamic DNS", "Suspicious DNS Traffic", "DNS Hijacking", "Host Redirection", "Brand Monitoring", "Command and Control"] +action.escu.analytic_story = ["DNS Hijacking", "Dynamic DNS", "Host Redirection", "Command and Control", "Brand Monitoring", "Suspicious DNS Traffic", "Data Protection"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -2485,27 +2472,54 @@ schedule_window = auto is_visible = false search = | from datamodel Alerts.Alerts | search app=osquery:results (name=pack_osx-attacks_OSX_ColdRoot_RAT_Launchd OR name=pack_osx-attacks_OSX_ColdRoot_RAT_Files) | rename columns.path as path | bucket _time span=30s | stats count(path) by _time, host, user, path -[ESCU - Previously Seen EC2 Instance Types] +[ESCU - Unsuccessful Netbackup backups - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-08 -action.escu.modification_date = 2018-03-08 +action.escu.creation_date = 2017-06-15 +action.escu.modification_date = 2017-09-12 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = In this support search, we create a table of the earliest and latest time that a specific EC2 instance type has been seen. The instanceType request field is not required and defaults to m1.small, so any time this field is null, the search defaults the field to m1.small. This table is then outputted to a csv 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 EC2 Instance Types -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining"] -description = This search builds a table of previously seen EC2 instance types -dispatch.earliest_time = -90d@d +action.escu.confidence = high +action.escu.eli5 = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. +action.escu.how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. +action.escu.full_search_name = ESCU - Unsuccessful Netbackup backups - Rule +action.escu.mappings = {"cis20": ["CIS 10"], "nist": ["PR.IP"]} +action.escu.known_false_positives = None identified +action.escu.search_type = detection +action.escu.providing_technologies = ["Netbackup"] +action.escu.analytic_story = ["Monitor Backup Solution"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Unsuccessful Netbackup backups +action.notable = 1 +action.notable.param.nes_fields = dest +action.notable.param.rule_description = The system $dest$ attempted a backup but encountered an error. +action.notable.param.rule_title = Failed backup attempt by $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 Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - All backup logs 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 = 10 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest +alert.suppress.period = 86400s +cron_schedule = 0 7 * * * +description = This search gives you the hosts where a backup was attempted and then failed. +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 = sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | rename requestParameters.instanceType as instanceType | fillnull value="m1.small" instanceType | stats earliest(_time) as earliest latest(_time) as latest by instanceType | outputlookup previously_seen_ec2_instance_types.csv | stats count +search = sourcetype="netbackup_logs" | stats latest(_time) as latestTime by COMPUTERNAME, MESSAGE | search MESSAGE="An error occurred, failed to backup." | `ctime(latestTime)` | rename COMPUTERNAME as dest, MESSAGE as signature | table latestTime, dest, signature [ESCU - Remote Registry Key modifications - Rule] action.escu = 0 @@ -2523,7 +2537,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 Defense Evasion Tactics", "Windows Persistence Techniques", "Suspicious Windows Registry Activities", "Lateral Movement"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Suspicious Windows Registry Activities", "Lateral Movement", "Windows Defense Evasion Tactics"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Remote Registry Key modifications action.notable = 1 @@ -2532,7 +2546,7 @@ action.notable.param.rule_description = A registry key was modified remotely usi action.notable.param.rule_title = Remote Registry Key Modification detection 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.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 @@ -2557,116 +2571,43 @@ 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 - Previously Seen AWS Provisioning Activity Sources] +[ESCU - Abnormally High AWS Instances Launched by User - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-16 -action.escu.modification_date = 2018-03-16 -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 - Detect malicious requests to exploit JBoss servers - Rule] -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.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.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] -action.escu.analytic_story = ["SamSam Ransomware", "JBoss Vulnerability"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect malicious requests to exploit JBoss servers -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.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.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,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 -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=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 - Email servers sending high volume traffic to hosts - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-12-20 -action.escu.modification_date = 2017-12-20 -action.escu.asset_at_risk = Endpoint +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 may look complex, but it's a neat representation of how statistics can help you understand your dataset to bubble up events that are not normal compared to its behavior. The search consists of three parts. The first part of the SPL fetches the data you want to work on. In this search, we calculate the sum of bytes sent and bytes_out from systems categorized as email_server to each host. We then calculate the average and standard deviation for the bytes sent to all the hosts combined and on a per-host basis. Then we set threshold values to deviation_threshold and minimum_data_samples using eval statements. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. We then check for byte transfers that are statistically significantly higher than normal. The search then gives IP address of the host, the time of the increased byte transfer, how much data was transferred, and the average amount of data transfer the email server normally sends to all hosts and to this specific host. Finally, it includes the number of standard deviations away the byte count was from these averages. -action.escu.how_to_implement = This search requires you to be ingesting your network traffic and populating the Network_Traffic data model. Your email servers must be categorized as "email_server" for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Email servers sending high volume traffic to hosts - Rule -action.escu.mappings = {"mitre_attack": ["Collection", "Email Collection", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} -action.escu.known_false_positives = The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers. +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 = ["Bro", "Splunk Stream"] -action.escu.analytic_story = ["Collection and Staging"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Email servers sending high volume traffic to hosts +action.correlationsearch.label = Abnormally High AWS Instances Launched by User action.notable = 1 -action.notable.param.nes_fields = dest_ip -action.notable.param.rule_description = High volume of traffic that originated from an email server is being sent to $dest_ip$ -action.notable.param.rule_title = High volume of traffic from an email server sent to $dest_ip$ +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 = 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 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_ip -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 50 +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_ip -alert.suppress.period = 86400s -cron_schedule = 0 0 * * * -description = This search looks for an increase of data transfers from your email server to your clients. This could be indicative of a malicious actor collecting data using your email server. +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 @@ -2677,7 +2618,30 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` sum(All_Traffic.bytes_out) as bytes_out from datamodel=Network_Traffic where All_Traffic.src_category=email_server by All_Traffic.dest_ip _time span=1d | `drop_dm_object_name("All_Traffic")` | eventstats avg(bytes_out) as avg_bytes_out stdev(bytes_out) as stdev_bytes_out | eventstats count as num_data_samples avg(eval(if(_time < relative_time(now(), "@d"), bytes_out, null))) as per_source_avg_bytes_out stdev(eval(if(_time < relative_time(now(), "@d"), bytes_out, null))) as per_source_stdev_bytes_out by dest_ip | eval minimum_data_samples = 4, deviation_threshold = 3 | where num_data_samples >= minimum_data_samples AND bytes_out > (avg_bytes_out + (deviation_threshold * stdev_bytes_out)) AND bytes_out > (per_source_avg_bytes_out + (deviation_threshold * per_source_stdev_bytes_out)) AND _time >= relative_time(now(), "@d") | eval num_standard_deviations_away_from_server_average = round(abs(bytes_out - avg_bytes_out) / stdev_bytes_out, 2), num_standard_deviations_away_from_client_average = round(abs(bytes_out - per_source_avg_bytes_out) / per_source_stdev_bytes_out, 2) | table dest_ip, _time, bytes_out, avg_bytes_out, per_source_avg_bytes_out, num_standard_deviations_away_from_server_average, num_standard_deviations_away_from_client_average +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 - Get Notable Info] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-03-15 +action.escu.modification_date = 2017-09-20 +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 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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious AWS Traffic", "Suspicious Command-Line Executions", "Splunk Enterprise Vulnerability", "Credential Dumping", "DNS Amplification Attacks", "Monitor for Updates", "Malicious PowerShell", "Asset Tracking", "Suspicious AWS EC2 Activities", "Splunk Enterprise Vulnerability CVE-2018-11409", "Emotet Malware (TA18-201A)", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Suspicious AWS S3 Activities", "Hidden Cobra Malware", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Windows Defense Evasion Tactics", "Dynamic DNS", "Host Redirection", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Brand Monitoring", "Suspicious WMI Use", "Suspicious AWS Login Activities", "AWS Network ACL Activity", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "AWS User Monitoring", "Web Fraud Detection", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "SQL Injection", "Collection and Staging", "Disabling Security Tools", "Data Protection"] +action.escu.fields_required = ["event_id"] +action.escu.earliest_time_offset = 3600 +action.escu.latest_time_offset = 3600 +description = This search queries the notable index to retrieve detailed information captured within the notable. Every notable has a unique ID associated with it, which is used to point us directly to the notable event under investigation. +disabled=true +realtime_schedule = 0 +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 - Excessive DNS Failures - Rule] action.escu = 0 @@ -2695,7 +2659,7 @@ action.escu.mappings = {"mitre_attack": ["Exfiltration", "Exfiltration Over Alte action.escu.known_false_positives = It is possible legitimate traffic can trigger this rule. Please investigate as appropriate. The threshold for generating an event can also be customized to better suit your environment. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control"] +action.escu.analytic_story = ["Command and Control", "Suspicious DNS Traffic"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Excessive DNS Failures action.notable = 1 @@ -2704,7 +2668,7 @@ action.notable.param.rule_description = This search identifies DNS query failure action.notable.param.rule_title = Excessive DNS Failures 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"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -2729,6 +2693,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 - File with Samsam Extension - Rule] +action.escu = 0 +action.escu.enabled = 1 +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 = high +action.escu.eli5 = This search looks at file modifications across your hosts and creates notable events when it identifies files with extensions associated with the SamSam ransomware, including `.stubbin`, `.berkshire`, `.satoshi`, `.sophos`, or `.keyxml`. Files with these extensions have been observed in SamSam attacks consisting of payload data or keying material. +action.escu.how_to_implement = You must be ingesting data that records file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - File with Samsam Extension - Rule +action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Installation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +action.escu.known_false_positives = Because these extensions are not typically used in normal operations, you should investigate all results. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["SamSam Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = File with Samsam Extension +action.notable = 1 +action.notable.param.nes_fields = dest, file_name +action.notable.param.rule_description = A file with an extension associated with SamSam ransomware was written on $dest$. +action.notable.param.rule_title = File with known SamSam 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 = 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,file_name +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = The search looks for file writes with extensions consistent with a SamSam ransomware attack. +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 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 "(?\.[^\.]+)$" | search file_extension=.stubbin OR file_extension=.berkshire OR file_extension=.satoshi OR file_extension=.sophos OR file_extension=.keyxml + [ESCU - DNS Query Length With High Standard Deviation - Rule] action.escu = 0 action.escu.enabled = 1 @@ -2745,7 +2759,7 @@ action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", action.escu.known_false_positives = It's possible there can be long domain names that are legitimate. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Hidden Cobra Malware", "Suspicious DNS Traffic", "Command and Control"] +action.escu.analytic_story = ["Hidden Cobra Malware", "Command and Control", "Suspicious DNS Traffic"] action.correlationsearch.enabled = 1 action.correlationsearch.label = DNS Query Length With High Standard Deviation action.notable = 1 @@ -2754,7 +2768,7 @@ action.notable.param.rule_description = Filter DNS requests and compute the stan action.notable.param.rule_title = DNS query length with high standard deviation 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"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -2795,7 +2809,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Indicator Removal o 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 Log Manipulation", "Ransomware"] +action.escu.analytic_story = ["Ransomware", "Windows Log Manipulation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = USN Journal Deletion action.notable = 1 @@ -2804,7 +2818,7 @@ action.notable.param.rule_description = The system $dest$ deleted its NTFS journ action.notable.param.rule_title = File System Journal Deleted 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 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 @@ -2829,126 +2843,27 @@ 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=fsutil.exe by Processes.user Processes.process_name Processes.parent_process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` | search process="*deletejournal*" AND process="*usn*" -[ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] +[ESCU - Previously Seen AWS Regions] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-10-07 -action.escu.modification_date = 2018-11-15 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-01-08 +action.escu.modification_date = 2018-01-08 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.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.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Prohibited Applications Spawning cmd.exe -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.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, parent_process -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. -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.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_name Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] - -[ESCU - Detect Spike in AWS API Activity - Rule] -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.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.eli5 = 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. +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 Regions +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"] -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 +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] +description = This search looks for CloudTrail events where an AWS instance is started and creates a baseline of most recent time (latest) and the first time (earliest) we've seen this region in our dataset grouped by the value awsRegion for the last 30 days +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 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 = sourcetype=aws:cloudtrail StartInstances | stats earliest(_time) as earliest latest(_time) as latest by awsRegion | outputlookup previously_seen_aws_regions.csv | stats count [ESCU - WMI Temporary Event Subscription - Rule] action.escu = 0 @@ -3015,7 +2930,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Modify Registry"], action.escu.known_false_positives = This registry key may be modified via administrators to implement a change in system policy. This type of change should be a very rare occurrence. 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", "Suspicious Windows Registry Activities"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows Defense Evasion Tactics"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Disabling Remote User Account Control action.notable = 1 @@ -3024,7 +2939,7 @@ action.notable.param.rule_description = The registry key SOFTWARE\Microsoft\Wind action.notable.param.rule_title = Registry Key Associated With Disabling Remote UAC 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 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.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 @@ -3049,6 +2964,55 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Endpoint.Registry where Registry.registry_path="*Windows\\CurrentVersion\\Policies\\System\\LocalAccountTokenFilterPolicy" by Registry.dest, Registry.registry_key_name Registry.status Registry.user Registry.registry_path Registry.action | `drop_dm_object_name(Registry)` +[ESCU - EC2 Instance Started In Previously Unseen Region - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-02-01 +action.escu.modification_date = 2018-02-23 +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 that indicate that an instance was started in a particular region. Using the `previously_seen_aws_regions.csv` lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The `eval` and `if` functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with "Instance Started in a New Region". However, this region will be added to the list of `previously_seen_aws_regions.csv`. Please maintain `previously_seen_aws_regions.csv` +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 Regions" support search only once to create of baseline of previously seen regions. +action.escu.full_search_name = ESCU - EC2 Instance Started In Previously Unseen Region - Rule +action.escu.mappings = {"mitre_attack": ["Defense Evasion"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 12"], "nist": ["DE.DP", "DE.AE"]} +action.escu.known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = EC2 Instance Started In Previously Unseen Region +action.notable = 1 +action.notable.param.nes_fields = awsRegion +action.notable.param.rule_description = An AWS instance is started in a new, previously unseen, region +action.notable.param.rule_title = AWS instance is started in a new region +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.recommended_actions = escu_contextualize, escu_investigate +action.risk = 1 +action.risk.param._risk_object = awsRegion +action.risk.param._risk_object_type = other +action.risk.param._risk_score = 30 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = awsRegion +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = This search looks for CloudTrail events where an instance is started in a particular region in the last one hour and then compares it to a lookup file of previously seen regions where an instance was started +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 earliest=-1h StartInstances | stats earliest(_time) as earliest latest(_time) as latest by awsRegion| inputlookup append=t previously_seen_aws_regions.csv | stats min(earliest) as earliest max(latest) as latest by awsRegion | outputlookup previously_seen_aws_regions.csv | eval regionStatus=if(earliest >= relative_time(now(), "-1d@d"), "Instance Started in a New Region","Previously Seen Region") | convert ctime(earliest) ctime(latest) | where regionStatus="Instance Started in a New Region" + [ESCU - AWS Cloud Provisioning From Previously Unseen City - Rule] action.escu = 0 action.escu.enabled = 1 @@ -3164,7 +3128,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 = ["Unusual Processes", "Ransomware", "Suspicious Command-Line Executions"] +action.escu.analytic_story = ["Suspicious Command-Line Executions", "Ransomware", "Unusual Processes"] action.correlationsearch.enabled = 1 action.correlationsearch.label = System Processes Run From Unexpected Locations action.notable = 1 @@ -3173,7 +3137,7 @@ action.notable.param.rule_description = The system $dest$ has a process that nor action.notable.param.rule_title = System Processes Run From Unexpected Location 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 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 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 @@ -3270,6 +3234,56 @@ schedule_window = auto is_visible = false search = sourcetype=aws:s3:accesslogs http_status=200 | stats earliest(_time) as earliest latest(_time) as latest by bucket_name remote_ip | outputlookup previously_seen_S3_access_from_remote_ip | stats count +[ESCU - Execution of File with Multiple Extensions - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-01-26 +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 uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. +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. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Execution of File with Multiple Extensions - 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 Multiple Extensions +action.notable = 1 +action.notable.param.nes_fields = dest, process +action.notable.param.rule_description = The system $dest$ executed a file with a double extension. +action.notable.param.rule_title = Process With Multiple Extensions Launched 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"} +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 that have double extensions in the file name. This is typically done to obscure the "real" file extension and make it appear as though the file being accessed is a data file, as opposed to executable content. +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=Endpoint.Processes where Processes.process = *.doc.exe OR Processes.process = *.htm.exe OR Processes.process = *.html.exe OR Processes.process = *.txt.exe OR Processes.process = *.pdf.exe OR Processes.process = *.doc.exe by Processes.dest Processes.user Processes.process Processes.parent_process | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name(Processes)` + [ESCU - Common Ransomware Notes - Rule] action.escu = 0 action.escu.enabled = 1 @@ -3482,7 +3496,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 = ["Web Fraud Detection", "Brand Monitoring", "Suspicious Emails"] +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 @@ -3616,54 +3630,27 @@ 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_hash) as file_hash values(Filesystem.file_path) as file_path from datamodel=Endpoint.Filesystem where Filesystem.file_path="C:\\program.exe" by Filesystem.file_name | `drop_dm_object_name(Filesystem)` | `ctime(lastTime)` | `ctime(firstTime)` -[ESCU - First time seen command line argument - Rule] +[ESCU - Previously Seen EC2 Instance Types] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-09 -action.escu.modification_date = 2018-04-16 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-03-08 +action.escu.modification_date = 2018-03-08 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = The subsearch returns all events where `cmd.exe` was used with a `/c` parameter in the command-line arguments to execute other commands/programs. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for command-line execution and outputs this data to the lookup file to update the local cache. It returns only those events that have first been seen in the past four hours. This is combined with the main search to return the time, user, destination, process, parent process, and value of the command-line argument. -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 Technology Add-on (TA). Please make sure you run the support search "Previously seen command line arguments,"—which creates a lookup file called `previously_seen_cmd_line_arguments.csv`—a historical baseline of all command-line arguments. You must also validate this list. -action.escu.full_search_name = ESCU - First time seen command line argument - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Scripting", "Persistence", "Command-Line Interface"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} -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.correlationsearch.enabled = 1 -action.correlationsearch.label = First time seen command line argument -action.notable = 1 -action.notable.param.nes_fields = dest, user, process, cmdline -action.notable.param.rule_description = The system $dest$ executed a command-line argument, $cmdline$, that has not previously been seen. -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.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, process, cmdline -alert.suppress.period = 86400s -cron_schedule = 30 * * * * -description = This search looks for command-line arguments that use a `/c` parameter to execute a command that has not previously been seen. -dispatch.earliest_time = -70m@m +action.escu.eli5 = In this support search, we create a table of the earliest and latest time that a specific EC2 instance type has been seen. The instanceType request field is not required and defaults to m1.small, so any time this field is null, the search defaults the field to m1.small. This table is then outputted to a csv 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 EC2 Instance Types +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Cryptomining"] +description = This search builds a table of previously seen EC2 instance types +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 = sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational process=cmd.exe cmdline="* /c *" [ search sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational process=cmd.exe cmdline="* /c *" | stats earliest(_time) as firstTime latest(_time) as lastTime by cmdline | inputlookup append=t previously_seen_cmd_line_arguments | stats min(firstTime) as firstTime, max(lastTime) as lastTime by cmdline | outputlookup previously_seen_cmd_line_arguments | eval newCmdLineArgument=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newCmdLineArgument=1 | `ctime(firstTime)` | `ctime(lastTime)` | table cmdline] | table _time, user,dest, process, parent_process, cmdline +search = sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | rename requestParameters.instanceType as instanceType | fillnull value="m1.small" instanceType | stats earliest(_time) as earliest latest(_time) as latest by instanceType | outputlookup previously_seen_ec2_instance_types.csv | stats count [ESCU - Suspicious Email Attachment Extensions - Rule] action.escu = 0 @@ -3715,28 +3702,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 = ["Windows Privilege Escalation", "Web Fraud Detection", "AWS Network ACL Activity", "Hidden Cobra Malware", "Suspicious AWS S3 Activities", "Windows File Extension and Association Abuse", "Monitor for Updates", "Unusual Processes", "ColdRoot MacOS RAT", "Account Monitoring and Controls", "Netsh Abuse", "DHS Report TA18-074A", "Data Protection", "Unusual AWS EC2 Modifications", "DNS Amplification Attacks", "SamSam Ransomware", "Windows Defense Evasion Tactics", "Dynamic DNS", "Apache Struts Vulnerability", "Monitor Backup Solution", "Windows Service Abuse", "Suspicious AWS Traffic", "Windows Log Manipulation", "Orangeworm Attack Group", "Disabling Security Tools", "JBoss Vulnerability", "Ransomware", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious DNS Traffic", "Emotet Malware (TA18-201A)", "DNS Hijacking", "Host Redirection", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "Brand Monitoring", "Splunk Enterprise Vulnerability", "Credential Dumping", "Prohibited Traffic Allowed or Protocol Mismatch", "Asset Tracking", "Use of Cleartext Protocols", "Windows Persistence Techniques", "Command and Control", "Suspicious Emails", "AWS Cross Account Activity", "Splunk Enterprise Vulnerability CVE-2018-11409", "Suspicious Windows Registry Activities", "Suspicious AWS Login Activities", "Router & Infrastructure Security", "Malicious PowerShell", "SQL Injection", "Lateral Movement", "Collection and Staging", "Monitor for Unauthorized Software", "AWS User Monitoring", "Suspicious MSHTA Activity", "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 @@ -3772,7 +3786,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 = ["Suspicious AWS S3 Activities", "AWS Suspicious Provisioning Activities", "Suspicious AWS Traffic", "Command and Control"] +action.escu.analytic_story = ["Suspicious AWS Traffic", "Suspicious AWS S3 Activities", "Command and Control", "AWS Suspicious Provisioning Activities"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 @@ -3783,51 +3797,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 = 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.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 = 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. +action.escu.search_type = support +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Windows Service Abuse", "Orangeworm Attack Group"] +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 = | search sourcetype="netbackup_logs" dest={dest} +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 Backup Logs For Endpoint] +[ESCU - Get User Information from Identity Table] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-24 -action.escu.modification_date = 2017-09-14 +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 = You must be ingesting your backup logs. -action.escu.full_search_name = ESCU - Get Backup Logs For Endpoint +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 = ["Netbackup"] -action.escu.analytic_story = ["SamSam Ransomware", "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. +action.escu.providing_technologies = ["Splunk Enterprise Security"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Splunk Enterprise Vulnerability", "Credential Dumping", "Suspicious MSHTA Activity", "Monitor for Updates", "SamSam Ransomware", "Malicious PowerShell", "Asset Tracking", "Suspicious AWS EC2 Activities", "Emotet Malware (TA18-201A)", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Suspicious AWS S3 Activities", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Suspicious Emails", "DNS Hijacking", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Windows Defense Evasion Tactics", "Dynamic DNS", "Host Redirection", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Monitor for Unauthorized Software", "Brand Monitoring", "Suspicious WMI Use", "Suspicious AWS Login Activities", "AWS Network ACL Activity", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "SQL Injection", "ColdRoot MacOS RAT", "Collection and Staging", "Disabling Security Tools", "Data Protection"] +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 = | search sourcetype="netbackup_logs" COMPUTERNAME={dest} | rename COMPUTERNAME as dest, MESSAGE as signature | table _time, dest, signature +search = | `identities` | search identity={user} | table _time, identity, first, last, email, category, watchlist [ESCU - Child Processes of Spoolsv.exe - Rule] action.escu = 0 @@ -3892,7 +3905,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 = ["Data Protection", "Dynamic DNS", "Suspicious DNS Traffic", "DNS Hijacking", "Host Redirection", "Brand Monitoring", "Command and Control"] +action.escu.analytic_story = ["DNS Hijacking", "Dynamic DNS", "Host Redirection", "Command and Control", "Brand Monitoring", "Suspicious DNS Traffic", "Data Protection"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 86400 @@ -3903,6 +3916,29 @@ schedule_window = auto is_visible = false search = | tstats allow_old_summaries=true values(All_Application_State.process) as "process" from datamodel=Application_State where nodename=All_Application_State.Ports All_Application_State.Ports.dest_port=53 All_Application_State.dest={dest} +[ESCU - Systems Ready for Spectre-Meltdown Windows Patch] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-01-08 +action.escu.modification_date = 2018-01-08 +action.escu.channel = ESCU +action.escu.eli5 = 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. +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.data_models = ["Change_Analysis"] +action.escu.full_search_name = ESCU - Systems Ready for Spectre-Meltdown Windows Patch +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 = ["Spectre And Meltdown Vulnerabilities"] +description = Some AV applications can cause the Spectre/Meltdown patch for Windows not to install successfully. This registry key is supposed to be created by the AV engine when it has been patched to be able to handle the Windows patch. If this key has been written, the system can then be patched for Spectre and Meltdown. +dispatch.earliest_time = -1d@d +dispatch.latest_time = -10m@m +disabled=true +realtime_schedule = 0 +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="HKLM\Software\Microsoft\Windows\CurrentVersion\QualityCompat*") by All_Changes.dest, All_Changes.command, All_Changes.user, All_Changes.object, All_Changes.object_path | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` + [ESCU - Detect hosts connecting to dynamic domain providers - Rule] action.escu = 0 action.escu.enabled = 1 @@ -3919,7 +3955,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 = ["Data Protection", "Dynamic DNS", "Suspicious DNS Traffic", "DNS Hijacking", "Prohibited Traffic Allowed or Protocol Mismatch", "Command and Control"] +action.escu.analytic_story = ["Prohibited Traffic Allowed or Protocol Mismatch", "DNS Hijacking", "Dynamic DNS", "Command and Control", "Suspicious DNS Traffic", "Data Protection"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect hosts connecting to dynamic domain providers action.notable = 1 @@ -3928,7 +3964,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 Process responsible for the DNS traffic\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -4067,67 +4103,65 @@ 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 - Get All AWS Activity From City] +[ESCU - Detect Spike in AWS API Activity - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-19 -action.escu.modification_date = 2018-03-19 +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.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 - -[ESCU - Detect USB device insertion - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-08-03 -action.escu.modification_date = 2017-11-27 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = low -action.escu.eli5 = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device -action.escu.how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. -action.escu.data_models = ["Change_Analysis"] -action.escu.full_search_name = ESCU - Detect USB device insertion - Rule -action.escu.mappings = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} -action.escu.known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. +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 = ["Microsoft Windows"] -action.escu.analytic_story = ["Data Protection"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS User Monitoring"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect USB device insertion +action.correlationsearch.label = Detect Spike in AWS API Activity action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = Read/Write attempt to a USB was detected on this host -action.notable.param.rule_title = Read/Write attempt to a USB 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 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"} +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 = dest -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 20 +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 = dest -alert.suppress.period = 86400s +alert.suppress.fields = user +alert.suppress.period = 14400s cron_schedule = 0 * * * * -description = The search is used to detect hosts that generate Windows Event ID 4663 for successful attempts to write to or read from a removable storage and Event ID 4656 for failures, which occurs when a USB drive is plugged in. In this scenario we are querying the Change_Analysis data model to look for Windows Event ID 4656 or 4663 where the priority of the affected host is marked as high in the ES Assets and Identity Framework. +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 @@ -4138,7 +4172,56 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count earliest(_time) AS earliest latest(_time) AS latest from datamodel=Change_Analysis where (nodename = All_Changes) All_Changes.result="Removable Storage device" (All_Changes.result_id=4663 OR All_Changes.result_id=4656) (All_Changes.src_priority=high) by All_Changes.dest | `drop_dm_object_name("All_Changes")`| `ctime(earliest)`| `ctime(latest)` +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 - Web Fraud - Password Sharing Across Accounts - Rule] +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.channel = webfraud +action.escu.confidence = medium +action.escu.eli5 = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 +action.escu.how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. +action.escu.full_search_name = ESCU - Web Fraud - Password Sharing Across Accounts - Rule +action.escu.mappings = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. +action.escu.search_type = detection +action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] +action.escu.analytic_story = ["Web Fraud Detection"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Web Fraud - Password Sharing Across Accounts +action.notable = 1 +action.notable.param.nes_fields = user +action.notable.param.rule_description = This search is used to identify user accounts, $user$, that share common passwords +action.notable.param.rule_title = Web Fraud Detection: Password Sharing Across Accounts +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 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 = user +action.risk.param._risk_object_type = other +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 = 3600s +cron_schedule = 0 * * * * +description = This search is used to identify user accounts that share a common password. +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=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 - Shim Database Installation With Suspicious Parameters - Rule] action.escu = 0 @@ -4189,44 +4272,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 = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] +action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] +action.escu.analytic_story = ["SamSam Ransomware", "JBoss Vulnerability"] 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 Instance Details by instanceId\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 - ESCU - Investigate AWS activities via region name\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"} 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 @@ -4236,7 +4320,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 @@ -4300,7 +4384,7 @@ 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 = ["ColdRoot MacOS RAT", "SamSam Ransomware", "Ransomware", "DNS Hijacking"] +action.escu.analytic_story = ["SamSam Ransomware", "Ransomware", "DNS Hijacking", "ColdRoot MacOS RAT"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 @@ -4360,68 +4444,45 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*rundll32.exe* cmdline="*AppData*" cmdline="*,#2" | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` -[ESCU - Get Notable Info] +[ESCU - Email servers sending high volume traffic to hosts - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-03-15 -action.escu.modification_date = 2017-09-20 -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 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 = ["Windows Privilege Escalation", "Web Fraud Detection", "AWS Network ACL Activity", "Hidden Cobra Malware", "Suspicious AWS S3 Activities", "Windows File Extension and Association Abuse", "Monitor for Updates", "Account Monitoring and Controls", "DHS Report TA18-074A", "Data Protection", "DNS Amplification Attacks", "Windows Defense Evasion Tactics", "Dynamic DNS", "Apache Struts Vulnerability", "Windows Service Abuse", "Suspicious AWS Traffic", "Windows Log Manipulation", "Orangeworm Attack Group", "Disabling Security Tools", "JBoss Vulnerability", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious DNS Traffic", "Emotet Malware (TA18-201A)", "Host Redirection", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "Brand Monitoring", "Splunk Enterprise Vulnerability", "Credential Dumping", "Asset Tracking", "Use of Cleartext Protocols", "Windows Persistence Techniques", "Command and Control", "Splunk Enterprise Vulnerability CVE-2018-11409", "Suspicious AWS Login Activities", "Router & Infrastructure Security", "Malicious PowerShell", "SQL Injection", "Lateral Movement", "Collection and Staging", "AWS User Monitoring", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] -action.escu.fields_required = ["event_id"] -action.escu.earliest_time_offset = 3600 -action.escu.latest_time_offset = 3600 -description = This search queries the notable index to retrieve detailed information captured within the notable. Every notable has a unique ID associated with it, which is used to point us directly to the notable event under investigation. -disabled=true -realtime_schedule = 0 -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] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-06-07 -action.escu.modification_date = 2018-11-02 +action.escu.creation_date = 2017-12-20 +action.escu.modification_date = 2017-12-20 action.escu.asset_at_risk = Endpoint 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 = This search may look complex, but it's a neat representation of how statistics can help you understand your dataset to bubble up events that are not normal compared to its behavior. The search consists of three parts. The first part of the SPL fetches the data you want to work on. In this search, we calculate the sum of bytes sent and bytes_out from systems categorized as email_server to each host. We then calculate the average and standard deviation for the bytes sent to all the hosts combined and on a per-host basis. Then we set threshold values to deviation_threshold and minimum_data_samples using eval statements. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. We then check for byte transfers that are statistically significantly higher than normal. The search then gives IP address of the host, the time of the increased byte transfer, how much data was transferred, and the average amount of data transfer the email server normally sends to all hosts and to this specific host. Finally, it includes the number of standard deviations away the byte count was from these averages. +action.escu.how_to_implement = This search requires you to be ingesting your network traffic and populating the Network_Traffic data model. Your email servers must be categorized as "email_server" for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Email servers sending high volume traffic to hosts - Rule +action.escu.mappings = {"mitre_attack": ["Collection", "Email Collection", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} +action.escu.known_false_positives = The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers. 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 = ["Bro", "Splunk Stream"] +action.escu.analytic_story = ["Collection and Staging"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Windows hosts file modification +action.correlationsearch.label = Email servers sending high volume traffic to hosts 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 = dest_ip +action.notable.param.rule_description = High volume of traffic that originated from an email server is being sent to $dest_ip$ +action.notable.param.rule_title = High volume of traffic from an email server sent to $dest_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 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 = dest_ip 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,user +alert.suppress.fields = dest_ip 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 search looks for an increase of data transfers from your email server to your clients. This could be indicative of a malicious actor collecting data using your email server. +dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -4431,45 +4492,46 @@ 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 = | tstats `summariesonly` sum(All_Traffic.bytes_out) as bytes_out from datamodel=Network_Traffic where All_Traffic.src_category=email_server by All_Traffic.dest_ip _time span=1d | `drop_dm_object_name("All_Traffic")` | eventstats avg(bytes_out) as avg_bytes_out stdev(bytes_out) as stdev_bytes_out | eventstats count as num_data_samples avg(eval(if(_time < relative_time(now(), "@d"), bytes_out, null))) as per_source_avg_bytes_out stdev(eval(if(_time < relative_time(now(), "@d"), bytes_out, null))) as per_source_stdev_bytes_out by dest_ip | eval minimum_data_samples = 4, deviation_threshold = 3 | where num_data_samples >= minimum_data_samples AND bytes_out > (avg_bytes_out + (deviation_threshold * stdev_bytes_out)) AND bytes_out > (per_source_avg_bytes_out + (deviation_threshold * per_source_stdev_bytes_out)) AND _time >= relative_time(now(), "@d") | eval num_standard_deviations_away_from_server_average = round(abs(bytes_out - avg_bytes_out) / stdev_bytes_out, 2), num_standard_deviations_away_from_client_average = round(abs(bytes_out - per_source_avg_bytes_out) / per_source_stdev_bytes_out, 2) | table dest_ip, _time, bytes_out, avg_bytes_out, per_source_avg_bytes_out, num_standard_deviations_away_from_server_average, num_standard_deviations_away_from_client_average -[ESCU - Unsuccessful Netbackup backups - Rule] +[ESCU - Identify New User Accounts - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-15 +action.escu.creation_date = 2017-08-05 action.escu.modification_date = 2017-09-12 -action.escu.asset_at_risk = Endpoint +action.escu.asset_at_risk = Domain Server action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. -action.escu.how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. -action.escu.full_search_name = ESCU - Unsuccessful Netbackup backups - Rule -action.escu.mappings = {"cis20": ["CIS 10"], "nist": ["PR.IP"]} -action.escu.known_false_positives = None identified +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 = ["Netbackup"] -action.escu.analytic_story = ["Monitor Backup Solution"] +action.escu.providing_technologies = ["Active Directory"] +action.escu.analytic_story = ["Account Monitoring and Controls"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Unsuccessful Netbackup backups +action.correlationsearch.label = Identify New User Accounts action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = The system $dest$ attempted a backup but encountered an error. -action.notable.param.rule_title = Failed backup attempt by $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 Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - All backup logs for 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 = 10 +action.risk.param._risk_score = 40 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest +alert.suppress.fields = identity alert.suppress.period = 86400s -cron_schedule = 0 7 * * * -description = This search gives you the hosts where a backup was attempted and then failed. +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 @@ -4480,45 +4542,46 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype="netbackup_logs" | stats latest(_time) as latestTime by COMPUTERNAME, MESSAGE | search MESSAGE="An error occurred, failed to backup." | `ctime(latestTime)` | rename COMPUTERNAME as dest, MESSAGE as signature | table latestTime, dest, signature +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 - WMI Permanent Event Subscription - Rule] +[ESCU - Detect Large Outbound ICMP Packets - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-10-23 -action.escu.modification_date = 2018-10-23 +action.escu.creation_date = 2018-06-01 +action.escu.modification_date = 2018-06-01 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 Windows event ID 5861. -action.escu.how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. -action.escu.full_search_name = ESCU - WMI Permanent Event Subscription - 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.eli5 = This search works by looking at fields in the Network_Traffic data model, which is populated by various firewalls and passive networking monitoring technologies. Specifically, the search looks for ICMP packets larger than 1,000 bytes with a destination that is external to your organization. +action.escu.how_to_implement = In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have a good understanding of how your network segments are designed and that you are able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the company's assets in the `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Detect Large Outbound ICMP Packets - Rule +action.escu.mappings = {"mitre_attack": ["Command and Control", "Standard Non-Application Layer Protocol"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE"]} +action.escu.known_false_positives = ICMP packets are used in a variety of ways to help troubleshoot networking issues and ensure the proper flow of traffic. As such, it is possible that a large ICMP packet could be perfectly legitimate. If large ICMP packets are associated with command and control traffic, there will typically be a large number of these packets observed over time. If the search is providing a large number of false positives, you can modify the search to adjust the byte threshold or whitelist specific IP addresses, as necessary. action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Suspicious WMI Use"] +action.escu.providing_technologies = ["Bro", "Splunk Stream", "Palo Alto Firewall"] +action.escu.analytic_story = ["Command and Control"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = WMI Permanent Event Subscription +action.correlationsearch.label = Detect Large Outbound ICMP Packets action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = This search looks for the creation of a permanent WMI event subscription via Windows event logs. -action.notable.param.rule_title = WMI Event Subscription Detected on $dest$ -action.notable.param.security_domain = endpoint +action.notable.param.nes_fields = src_ip, dest_ip +action.notable.param.rule_description = Large outbound ICMP packet detected. +action.notable.param.rule_title = Large ICMP packet from $src_ip$ to $dest_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 - 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.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.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 = 70 +action.risk.param._risk_score = 50 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest +alert.suppress.fields = src_ip alert.suppress.period = 28800s cron_schedule = 0 * * * * -description = This search looks for the creation of WMI permanent event subscriptions. +description = This search looks for outbound ICMP packets with a packet size larger than 1,000 bytes. Various threat actors have been known to use ICMP as a command and control channel for their attack infrastructure. Large ICMP packets from an endpoint to a remote host may be indicative of this activity. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -4529,7 +4592,56 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype="wineventlog:microsoft-windows-wmi-activity/operational" EventCode=5861 Binding | rex field=Message "Consumer =\s+(?[^;|^$]+)" | search consumer!="NTEventLogEventConsumer=\"SCM Event Log Consumer\"" | stats count min(_time) as firstTime max(_time) as lastTime by ComputerName, consumer, Message | `ctime(firstTime)`| `ctime(lastTime)` | rename ComputerName as dest +search = | tstats `summariesonly` count earliest(_time) as earliest latest(_time) as latest values(All_Traffic.action) values(All_Traffic.bytes) from datamodel=Network_Traffic where All_Traffic.action !=blocked All_Traffic.dest_category !=internal (All_Traffic.protocol=icmp OR All_Traffic.transport=icmp) All_Traffic.bytes > 1000 by All_Traffic.src_ip All_Traffic.dest_ip | `drop_dm_object_name("All_Traffic")` | search ( dest_ip!=10.0.0.0/8 AND dest_ip!=172.16.0.0/12 AND dest_ip!=192.168.0.0/16) | convert ctime(earliest) ctime(latest) + +[ESCU - First time seen command line argument - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-04-09 +action.escu.modification_date = 2018-04-16 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = The subsearch returns all events where `cmd.exe` was used with a `/c` parameter in the command-line arguments to execute other commands/programs. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for command-line execution and outputs this data to the lookup file to update the local cache. It returns only those events that have first been seen in the past four hours. This is combined with the main search to return the time, user, destination, process, parent process, and value of the command-line argument. +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 Technology Add-on (TA). Please make sure you run the support search "Previously seen command line arguments,"—which creates a lookup file called `previously_seen_cmd_line_arguments.csv`—a historical baseline of all command-line arguments. You must also validate this list. +action.escu.full_search_name = ESCU - First time seen command line argument - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Scripting", "Persistence", "Command-Line Interface"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Hidden Cobra Malware", "Orangeworm Attack Group", "DHS Report TA18-074A"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = First time seen command line argument +action.notable = 1 +action.notable.param.nes_fields = dest, user, process, cmdline +action.notable.param.rule_description = The system $dest$ executed a command-line argument, $cmdline$, that has not previously been seen. +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.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, process, cmdline +alert.suppress.period = 86400s +cron_schedule = 30 * * * * +description = This search looks for command-line arguments that use a `/c` parameter to execute a command that has not previously been seen. +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 process=cmd.exe cmdline="* /c *" [ search sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational process=cmd.exe cmdline="* /c *" | stats earliest(_time) as firstTime latest(_time) as lastTime by cmdline | inputlookup append=t previously_seen_cmd_line_arguments | stats min(firstTime) as firstTime, max(lastTime) as lastTime by cmdline | outputlookup previously_seen_cmd_line_arguments | eval newCmdLineArgument=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newCmdLineArgument=1 | `ctime(firstTime)` | `ctime(lastTime)` | table cmdline] | table _time, user,dest, process, parent_process, cmdline [ESCU - Get Logon Rights Modifications For User] action.escu = 0 @@ -4666,7 +4778,7 @@ action.escu.full_search_name = ESCU - Investigate Web Activity From src_ip 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 = ["ColdRoot MacOS RAT", "Dynamic DNS", "DNS Hijacking", "Splunk Enterprise Vulnerability CVE-2018-11409"] +action.escu.analytic_story = ["Splunk Enterprise Vulnerability CVE-2018-11409", "DNS Hijacking", "Dynamic DNS", "ColdRoot MacOS RAT"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -4690,7 +4802,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 Privilege Escalation", "Hidden Cobra Malware", "Windows File Extension and Association Abuse", "Monitor for Updates", "Unusual Processes", "ColdRoot MacOS RAT", "Account Monitoring and Controls", "Netsh Abuse", "DHS Report TA18-074A", "Data Protection", "DNS Amplification Attacks", "SamSam Ransomware", "Dynamic DNS", "Apache Struts Vulnerability", "Monitor Backup Solution", "Windows Service Abuse", "Windows Log Manipulation", "Orangeworm Attack Group", "Disabling Security Tools", "JBoss Vulnerability", "Ransomware", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious DNS Traffic", "Emotet Malware (TA18-201A)", "DNS Hijacking", "Host Redirection", "Brand Monitoring", "Splunk Enterprise Vulnerability", "Credential Dumping", "Prohibited Traffic Allowed or Protocol Mismatch", "Asset Tracking", "Use of Cleartext Protocols", "Windows Persistence Techniques", "Command and Control", "Suspicious Emails", "Suspicious Windows Registry Activities", "Router & Infrastructure Security", "Malicious PowerShell", "SQL Injection", "Lateral Movement", "Collection and Staging", "Monitor for Unauthorized Software", "Suspicious MSHTA Activity", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "Suspicious MSHTA Activity", "DNS Amplification Attacks", "Monitor for Updates", "SamSam Ransomware", "Malicious PowerShell", "Asset Tracking", "Prohibited Traffic Allowed or Protocol Mismatch", "Emotet Malware (TA18-201A)", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Suspicious Emails", "DNS Hijacking", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Dynamic DNS", "Host Redirection", "Monitor Backup Solution", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Monitor for Unauthorized Software", "Brand Monitoring", "Suspicious WMI Use", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "SQL Injection", "ColdRoot MacOS RAT", "Collection and Staging", "Disabling Security Tools", "Data Protection"] action.escu.fields_required = ["user"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 @@ -4714,7 +4826,7 @@ action.escu.full_search_name = ESCU - Get 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 Privilege Escalation", "Hidden Cobra Malware", "Windows File Extension and Association Abuse", "Unusual Processes", "Netsh Abuse", "DHS Report TA18-074A", "SamSam Ransomware", "Windows Defense Evasion Tactics", "Windows Service Abuse", "Windows Log Manipulation", "Orangeworm Attack Group", "Disabling Security Tools", "Ransomware", "Suspicious WMI Use", "Emotet Malware (TA18-201A)", "Suspicious Command-Line Executions", "Credential Dumping", "Windows Persistence Techniques", "Command and Control", "Suspicious Windows Registry Activities", "Malicious PowerShell", "Lateral Movement", "Collection and Staging", "Monitor for Unauthorized Software", "Suspicious MSHTA Activity", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Credential Dumping", "Suspicious MSHTA Activity", "SamSam Ransomware", "Malicious PowerShell", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Windows Defense Evasion Tactics", "Command and Control", "Monitor for Unauthorized Software", "Suspicious WMI Use", "Orangeworm Attack Group", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "Collection and Staging", "Disabling Security Tools"] action.escu.fields_required = ["process", "dest"] action.escu.earliest_time_offset = 7200 action.escu.latest_time_offset = 7200 @@ -4839,7 +4951,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Persistence"], "kil action.escu.known_false_positives = Some applications and users may legitimately use attrib.exe to interact with the files. 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", "Windows Persistence Techniques"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Windows Defense Evasion Tactics"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Hiding Files And Directories With Attrib.exe action.notable = 1 @@ -4848,7 +4960,7 @@ action.notable.param.rule_description = Attrib.exe is often used by attackers to action.notable.param.rule_title = Suspicious usage of attrib.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 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 @@ -4923,56 +5035,28 @@ 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 - AWS Cloud Provisioning From Previously Unseen IP Address - Rule] +[ESCU - Get Web Session Information via session_id] 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 = 2018-10-08 +action.escu.modification_date = 2018-10-08 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 -dispatch.latest_time = -10m@m +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 -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 = | 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 @@ -5037,7 +5121,7 @@ action.escu.full_search_name = ESCU - Investigate Network Traffic From src_ip action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["Splunk Stream", "Bro", "Palo Alto Firewall"] -action.escu.analytic_story = ["ColdRoot MacOS RAT", "Splunk Enterprise Vulnerability CVE-2018-11409"] +action.escu.analytic_story = ["Splunk Enterprise Vulnerability CVE-2018-11409", "ColdRoot MacOS RAT"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -5064,7 +5148,7 @@ action.escu.mappings = {"mitre_attack": ["Privilege Escalation", "Persistence", action.escu.known_false_positives = There are many legitimate applications that must execute upon 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 Privilege Escalation", "Suspicious Windows Registry Activities"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows Privilege Escalation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Registry Keys Used For Privilege Escalation action.notable = 1 @@ -5073,7 +5157,7 @@ action.notable.param.rule_description = A registry key used for privilege escala action.notable.param.rule_title = Registry Key Associated With Privilege Escalation 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 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.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 @@ -5098,27 +5182,77 @@ 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 - Baseline of Network ACL Activity by ARN] +[ESCU - Get All AWS Activity From Region] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-05-21 -action.escu.modification_date = 2018-05-21 +action.escu.creation_date = 2018-03-19 +action.escu.modification_date = 2018-03-19 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.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 = support +action.escu.search_type = investigative 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 +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 = 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 +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 - 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 - AWS S3 Bucket details via bucketName] action.escu = 0 @@ -5294,44 +5428,44 @@ 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 - File with Samsam Extension - Rule] +[ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-12-14 -action.escu.modification_date = 2018-12-14 -action.escu.asset_at_risk = Endpoint +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 = high -action.escu.eli5 = This search looks at file modifications across your hosts and creates notable events when it identifies files with extensions associated with the SamSam ransomware, including `.stubbin`, `.berkshire`, `.satoshi`, `.sophos`, or `.keyxml`. Files with these extensions have been observed in SamSam attacks consisting of payload data or keying material. -action.escu.how_to_implement = You must be ingesting data that records file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - File with Samsam Extension - Rule -action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Installation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -action.escu.known_false_positives = Because these extensions are not typically used in normal operations, you should investigate all results. +action.escu.confidence = medium +action.escu.eli5 = This search returns the number of times a URL associated with this type of JexBoss probe is observed. +action.escu.how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. +action.escu.data_models = ["Web"] +action.escu.full_search_name = ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule +action.escu.mappings = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} +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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["SamSam Ransomware"] +action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] +action.escu.analytic_story = ["SamSam Ransomware", "JBoss Vulnerability"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = File with Samsam Extension +action.correlationsearch.label = Detect attackers scanning for vulnerable JBoss servers action.notable = 1 -action.notable.param.nes_fields = dest, file_name -action.notable.param.rule_description = A file with an extension associated with SamSam ransomware was written on $dest$. -action.notable.param.rule_title = File with known SamSam 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.nes_fields = +action.notable.param.rule_description = This search looks for specific GET/HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. +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.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 = 20 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 = dest,url +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = The search looks for file writes with extensions consistent with a SamSam ransomware attack. +description = This search looks for specific GET or HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. JexBoss is described as the exploit tool of choice for this malicious activity. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -5342,7 +5476,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 "(?\.[^\.]+)$" | search file_extension=.stubbin OR file_extension=.berkshire OR file_extension=.satoshi OR file_extension=.sophos OR file_extension=.keyxml +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 - Investigate Successful Remote Desktop Authentications] action.escu = 0 @@ -5433,7 +5567,7 @@ action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} action.escu.known_false_positives = It's possible that a user will start to create EC2 instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior. action.escu.search_type = detection action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] action.correlationsearch.enabled = 1 action.correlationsearch.label = EC2 Instance Started With Previously Unseen User action.notable = 1 @@ -5442,7 +5576,7 @@ action.notable.param.rule_description = The EC2 instance $dest$ was created by $ action.notable.param.rule_title = EC2 Instance Created 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 - 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 - ESCU - Investigate AWS activities via region name\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 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 @@ -5551,7 +5685,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", "Suspicious Command-Line Executions", "Hidden Cobra Malware", "Orangeworm Attack Group", "DHS Report TA18-074A"] 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 @@ -5660,67 +5794,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 - Get User Information from Identity Table] +[ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] 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 = ["Windows Privilege Escalation", "AWS Network ACL Activity", "Hidden Cobra Malware", "Suspicious AWS S3 Activities", "Windows File Extension and Association Abuse", "Monitor for Updates", "Unusual Processes", "ColdRoot MacOS RAT", "Account Monitoring and Controls", "Netsh Abuse", "DHS Report TA18-074A", "Data Protection", "SamSam Ransomware", "Windows Defense Evasion Tactics", "Dynamic DNS", "Apache Struts Vulnerability", "Windows Service Abuse", "Windows Log Manipulation", "Orangeworm Attack Group", "Disabling Security Tools", "JBoss Vulnerability", "Ransomware", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious DNS Traffic", "Emotet Malware (TA18-201A)", "DNS Hijacking", "Host Redirection", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "Brand Monitoring", "Splunk Enterprise Vulnerability", "Credential Dumping", "Asset Tracking", "Use of Cleartext Protocols", "Windows Persistence Techniques", "Command and Control", "Suspicious Emails", "Suspicious Windows Registry Activities", "Suspicious AWS Login Activities", "Router & Infrastructure Security", "Malicious PowerShell", "SQL Injection", "Lateral Movement", "Collection and Staging", "Monitor for Unauthorized Software", "Suspicious MSHTA Activity", "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. -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 - AWS Network Access Control List Deleted - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-01-08 -action.escu.modification_date = 2017-01-10 -action.escu.asset_at_risk = AWS Instance +action.escu.creation_date = 2018-08-28 +action.escu.modification_date = 2018-08-28 +action.escu.asset_at_risk = Windows action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = The search looks for CloudTrail events to detect whether any network ACLs have been deleted and gives you values of error messages and error codes (if any), user details, user source IP, the user who initiated this request, and the name of the event. -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 - AWS Network Access Control List Deleted - Rule -action.escu.mappings = {"mitre_attack": ["Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11"], "nist": ["DE.DP", "DE.AE"]} -action.escu.known_false_positives = It's possible that a user has legitimately deleted a network ACL. +action.escu.eli5 = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. +action.escu.how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. +action.escu.full_search_name = ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - 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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Network ACL Activity"] +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Credential Dumping"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = AWS Network Access Control List Deleted +action.correlationsearch.label = Detect Mimikatz Via PowerShell And EventCode 4663 action.notable = 1 -action.notable.param.nes_fields = src, src_user, eventName -action.notable.param.rule_description = AWS network ACL has been deleted by $src_user. -action.notable.param.rule_title = AWS Network ACL deleted by $src_user$ -action.notable.param.security_domain = network +action.notable.param.nes_fields = user, dest +action.notable.param.rule_description = Possible attempt at credential dumping via PowerShell was detected on $dest$ by $user$. +action.notable.param.rule_title = Event ID 4663 Specifying PowerShell Reading From LSASS.exe Identified on $dest$. +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 - AWS Network ACL Details from ID\n - ESCU - AWS Network Interface details via resourceId\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.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 = src_user -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 80 +action.risk.param._risk_object = dest +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 = src_user -alert.suppress.period = 14400s +alert.suppress.fields = user, dest, process +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = Enforcing network-access controls is one of the defensive mechanisms used by cloud administrators to restrict access to a cloud instance. After the attacker has gained control of the AWS console by compromising an admin account, they can delete a network ACL and gain access to the instance from anywhere. This search will query the CloudTrail logs to detect users deleting network ACLs. -dispatch.earliest_time = -1d@d +description = This search looks for PowerShell reading lsass memory consistent with credential dumping. +dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -5730,7 +5841,7 @@ quantity = 0 realtime_schedule = 0 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)` +search = sourcetype=wineventlog:security EventCode=4663 Process_Name=*powershell.exe Object_Name=*lsass.exe Access_Mask=0x10 | stats count min(_time) as firstTime max(_time) as lastTime by dest, Process_Name, Process_ID, Message | rename Process_Name as process | `ctime(firstTime)`| `ctime(lastTime)` [ESCU - Get All AWS Activity From Country] action.escu = 0 @@ -5755,6 +5866,30 @@ 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 - Get History Of Email Sources] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2019-02-21 +action.escu.modification_date = 2019-02-21 +action.escu.channel = ESCU +action.escu.eli5 = none +action.escu.how_to_implement = To successfully implement this search you must ingest your email logs or capture unencrypted email communications within network traffic, and populate the Email data model. +action.escu.data_models = ["Email"] +action.escu.full_search_name = ESCU - Get History Of Email Sources +action.escu.known_false_positives = None at this time +action.escu.search_type = investigative +action.escu.providing_technologies = ["Microsoft Exchange"] +action.escu.analytic_story = ["DNS Hijacking"] +action.escu.fields_required = ["src"] +action.escu.earliest_time_offset = 172800 +action.escu.latest_time_offset = 86400 +description = This search returns a list of all email sources seen in the 48 hours prior to the notable event to 24 hours after, and the number of emails from each source. +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = |tstats `summariesonly` values(All_Email.dest) as dest values(All_Email.recipient) as recepient min(_time) as firstTime max(_time) as lastTime count from datamodel=Email.All_Email by All_Email.src |`drop_dm_object_name(All_Email)` | `ctime(firstTime)` | `ctime(lastTime)` + [ESCU - Shim Database File Creation - Rule] action.escu = 0 action.escu.enabled = 1 @@ -5903,103 +6038,73 @@ 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 - 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.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.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] -action.escu.analytic_story = ["Web Fraud Detection"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Web Fraud - Account Harvesting -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.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.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_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 +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 -enableSched = 1 -counttype = number of events -relation = greater than -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 +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 - Schtasks scheduling job on remote system - Rule] +[ESCU - Baseline of Network ACL Activity by ARN] 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-05-21 +action.escu.modification_date = 2018-05-21 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.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Lateral Movement"] -action.correlationsearch.enabled = 1 -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 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 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 = 50 -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 +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 -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* 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=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 - 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", "Suspicious Command-Line Executions", "Splunk Enterprise Vulnerability", "Credential Dumping", "Suspicious MSHTA Activity", "Monitor for Updates", "SamSam Ransomware", "Malicious PowerShell", "Asset Tracking", "Prohibited Traffic Allowed or Protocol Mismatch", "Emotet Malware (TA18-201A)", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Suspicious Emails", "DNS Hijacking", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Windows Defense Evasion Tactics", "Dynamic DNS", "Host Redirection", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Monitor for Unauthorized Software", "Brand Monitoring", "Suspicious WMI Use", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "SQL Injection", "ColdRoot MacOS RAT", "Collection and Staging", "Disabling Security Tools", "Data Protection"] +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 @@ -6065,7 +6170,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Indicator Removal o action.escu.known_false_positives = The wevtutil.exe application is a legitimate Windows event log utility. Administrators may use it to manage Windows event logs. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Log Manipulation", "Ransomware"] +action.escu.analytic_story = ["Ransomware", "Windows Log Manipulation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Suspicious wevtutil Usage action.notable = 1 @@ -6074,7 +6179,7 @@ action.notable.param.rule_description = wevtutil is the windows event log tool. action.notable.param.rule_title = Suspicious wevtutil Usage 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 @@ -6137,7 +6242,7 @@ action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["In action.escu.known_false_positives = Some legitimate processes may be only rarely executed in your environment. As these are identified, update `rare_process_whitelist_local.csv` to filter them out of your search results. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Unusual Processes", "Emotet Malware (TA18-201A)"] +action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "Unusual Processes"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect Rare Executables action.notable = 1 @@ -6146,7 +6251,7 @@ action.notable.param.rule_description = The process $process$ was detected runni action.notable.param.rule_title = Rare Process $process$ 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 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 - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -6183,7 +6288,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 = ["AWS Network ACL Activity", "Suspicious AWS Traffic", "Command and Control"] +action.escu.analytic_story = ["Suspicious AWS Traffic", "Command and Control", "AWS Network ACL Activity"] action.escu.fields_required = ["resourceId"] action.escu.earliest_time_offset = 86400 action.escu.latest_time_offset = 0 @@ -6244,43 +6349,43 @@ 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` -[ESCU - Detect PsExec With accepteula Flag - Rule] +[ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule] 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-03-12 +action.escu.modification_date = 2018-03-12 +action.escu.asset_at_risk = AWS Instance 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.eli5 = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. +action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule +action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +action.escu.known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. action.escu.search_type = detection -action.escu.providing_technologies = ["Sysmon"] -action.escu.analytic_story = ["DHS Report TA18-074A", "SamSam Ransomware"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Cryptomining"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect PsExec With accepteula Flag +action.correlationsearch.label = EC2 Instance Started With Previously Unseen Instance Type 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.nes_fields = instanceType +action.notable.param.rule_description = The EC2 instance type $instanceType$ was used for the first time to create $dest$. +action.notable.param.rule_title = New EC2 Instance Type $instanceType$ 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 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.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 = 75 +action.risk.param._risk_score = 30 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest, parent_process -alert.suppress.period = 86400s +alert.suppress.fields = dest +alert.suppress.period = 14400s 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. +description = This search looks for EC2 instances being created with previously unseen instance types. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -6291,52 +6396,7 @@ 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 - -[ESCU - Identify Systems Receiving Remote Desktop Traffic] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-04-24 -action.escu.modification_date = 2017-09-15 -action.escu.channel = ESCU -action.escu.eli5 = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. -action.escu.how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Identify Systems Receiving Remote Desktop Traffic -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 = ["Lateral Movement"] -description = This search counts the numbers of times the system has created remote desktop traffic -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=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.dest | `drop_dm_object_name("All_Traffic")` | sort - count - -[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 +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 - Sc.exe Manipulating Windows Services - Rule] action.escu = 0 @@ -6353,7 +6413,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 = ["DHS Report TA18-074A", "Windows Service Abuse", "Orangeworm Attack Group", "Disabling Security Tools", "Windows Persistence Techniques"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Windows Service Abuse", "Orangeworm Attack Group", "DHS Report TA18-074A", "Disabling Security Tools"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Sc.exe Manipulating Windows Services action.notable = 1 @@ -6403,7 +6463,7 @@ action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control", action.escu.known_false_positives = Legitimate DNS activity can be detected in this search. Investigate, verify and update the list of authorized DNS servers as appropriate. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "DNS Hijacking", "Command and Control"] +action.escu.analytic_story = ["DNS Hijacking", "Command and Control", "Suspicious DNS Traffic"] action.correlationsearch.enabled = 1 action.correlationsearch.label = DNS Query Requests Resolved by Unauthorized DNS Servers action.notable = 1 @@ -6412,7 +6472,7 @@ action.notable.param.rule_description = The table represents a list of unauthori action.notable.param.rule_title = DNS requests resolved by unauthorized DNS 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 - 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"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -6524,7 +6584,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 = ["SamSam Ransomware", "Windows Log Manipulation", "Ransomware"] +action.escu.analytic_story = ["SamSam Ransomware", "Ransomware", "Windows Log Manipulation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Deleting Shadow Copies action.notable = 1 @@ -6533,7 +6593,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 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 @@ -6593,7 +6653,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 = ["AWS Network ACL Activity", "Suspicious AWS S3 Activities", "Unusual AWS EC2 Modifications", "Suspicious AWS EC2 Activities", "Suspicious AWS Login Activities"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "Unusual AWS EC2 Modifications", "Suspicious AWS S3 Activities", "Suspicious AWS Login Activities", "AWS Network ACL Activity"] action.escu.fields_required = ["arn"] action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 @@ -6619,7 +6679,7 @@ action.escu.mappings = {"mitre_attack": ["Persistence", "Execution", "Scheduled 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.escu.analytic_story = ["Windows Persistence Techniques", "Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Schtasks used for forcing a reboot action.notable = 1 @@ -6628,7 +6688,7 @@ action.notable.param.rule_description = This search looks for flags passed to sc 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.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.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -6689,7 +6749,7 @@ action.escu.full_search_name = ESCU - Get Email Info action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["Microsoft Exchange"] -action.escu.analytic_story = ["Brand Monitoring", "Suspicious Emails"] +action.escu.analytic_story = ["Suspicious Emails", "Brand Monitoring"] action.escu.fields_required = ["message_id"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 7200 @@ -6712,7 +6772,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 = ["SamSam Ransomware", "Monitor Backup Solution", "Ransomware"] +action.escu.analytic_story = ["SamSam Ransomware", "Ransomware", "Monitor Backup Solution"] 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 @@ -6722,55 +6782,27 @@ 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 - Detect Large Outbound ICMP Packets - Rule] +[ESCU - Previously Seen AWS Provisioning Activity Sources] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-06-01 -action.escu.modification_date = 2018-06-01 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-03-16 +action.escu.modification_date = 2018-03-16 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search works by looking at fields in the Network_Traffic data model, which is populated by various firewalls and passive networking monitoring technologies. Specifically, the search looks for ICMP packets larger than 1,000 bytes with a destination that is external to your organization. -action.escu.how_to_implement = In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have a good understanding of how your network segments are designed and that you are able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the company's assets in the `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Detect Large Outbound ICMP Packets - Rule -action.escu.mappings = {"mitre_attack": ["Command and Control", "Standard Non-Application Layer Protocol"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE"]} -action.escu.known_false_positives = ICMP packets are used in a variety of ways to help troubleshoot networking issues and ensure the proper flow of traffic. As such, it is possible that a large ICMP packet could be perfectly legitimate. If large ICMP packets are associated with command and control traffic, there will typically be a large number of these packets observed over time. If the search is providing a large number of false positives, you can modify the search to adjust the byte threshold or whitelist specific IP addresses, as necessary. -action.escu.search_type = detection -action.escu.providing_technologies = ["Bro", "Splunk Stream", "Palo Alto Firewall"] -action.escu.analytic_story = ["Command and Control"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Large Outbound ICMP Packets -action.notable = 1 -action.notable.param.nes_fields = src_ip, dest_ip -action.notable.param.rule_description = Large outbound ICMP packet detected. -action.notable.param.rule_title = Large ICMP packet from $src_ip$ to $dest_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.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 = 50 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = src_ip -alert.suppress.period = 28800s -cron_schedule = 0 * * * * -description = This search looks for outbound ICMP packets with a packet size larger than 1,000 bytes. Various threat actors have been known to use ICMP as a command and control channel for their attack infrastructure. Large ICMP packets from an endpoint to a remote host may be indicative of this activity. -dispatch.earliest_time = -70m@m +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 -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count earliest(_time) as earliest latest(_time) as latest values(All_Traffic.action) values(All_Traffic.bytes) from datamodel=Network_Traffic where All_Traffic.action !=blocked All_Traffic.dest_category !=internal (All_Traffic.protocol=icmp OR All_Traffic.transport=icmp) All_Traffic.bytes > 1000 by All_Traffic.src_ip All_Traffic.dest_ip | `drop_dm_object_name("All_Traffic")` | search ( dest_ip!=10.0.0.0/8 AND dest_ip!=172.16.0.0/12 AND dest_ip!=192.168.0.0/16) | convert ctime(earliest) ctime(latest) +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 - Extended Period Without Successful Netbackup Backups - Rule] action.escu = 0 @@ -6844,28 +6876,54 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:description id={networkAclId} | table id account_id vpc_id network_acl_entries{}.* -[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 = ["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 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 @@ -6882,7 +6940,7 @@ action.escu.mappings = {"mitre_attack": ["Persistence", "Privilege Escalation", action.escu.known_false_positives = It is unusual for a service to be created or modified by directly manipulating the registry. However, there may be legitimate instances of this behavior. It is important to validate and investigate, as appropriate. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Service Abuse", "Windows Persistence Techniques"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Windows Service Abuse"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Reg.exe Manipulating Windows Services Registry Keys action.notable = 1 @@ -7067,116 +7125,140 @@ 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 - Registry Keys for Creating SHIM Databases - Rule] +[ESCU - Web Fraud - Account Harvesting - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-27 -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 = In this search, we look for modifications to registry keys used for shim databases on Microsoft platforms via the object_category and object_path field in the Change_Analysis data model and give you the destination, command used to initiate the change, the user who conducted this activity, the resource affected(object), and the whole path of the object. An application compatibility shim is a small library that transparently intercepts an API (via hooking), changes the parameters passed, handles the operation itself, or redirects the operation elsewhere, such as additional code stored on a system. This capability can be also leveraged by attackers to create and store malicious files in a shim database as observed in CARBANAK backdoor. -action.escu.how_to_implement = To successfully implement this search, you must populate the Change_Analysis data model. This is typically populated via endpoint detection and response products, such as Carbon Black or other endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. -action.escu.data_models = ["Change_Analysis"] -action.escu.full_search_name = ESCU - Registry Keys for Creating SHIM Databases - Rule -action.escu.mappings = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -action.escu.known_false_positives = There are many legitimate applications that leverage shim databases for compatibility purposes for legacy applications +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"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Suspicious Windows Registry Activities"] +action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] +action.escu.analytic_story = ["Web Fraud Detection"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Registry Keys for Creating SHIM Databases +action.correlationsearch.label = Web Fraud - Account Harvesting action.notable = 1 -action.notable.param.nes_fields = dest, user -action.notable.param.rule_description = A registry key that is used for persistence on Windows was modified on $dest$ by $user$ -action.notable.param.rule_title = Registry Key Associated With SHIM databases on $dest$ -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 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.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 = 30 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest,object_path -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search looks for registry activity associated with application compatibility shims, which can be leveraged by attackers for various nefarious purposes. -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=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 - Baseline of S3 Bucket deletion activity by ARN] -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 - 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 = 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 = ["Palo Alto Firewall", "Bro", "Splunk Stream"] -action.escu.analytic_story = ["Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch", "Command and Control"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Prohibited Network Traffic Allowed -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.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.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_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_ip,src_ip +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 +counttype = number of events +relation = greater than +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 = ["Suspicious Command-Line Executions", "Credential Dumping", "SamSam Ransomware", "Emotet Malware (TA18-201A)", "Ransomware", "Suspicious Emails", "Netsh Abuse", "Host Redirection", "Monitor for Unauthorized Software", "Brand Monitoring", "Orangeworm Attack Group", "Unusual Processes"] +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 + +[ESCU - Malicious PowerShell Process - Encoded Command - 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 that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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 - Encoded Command - 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 = System administrators may use this option, 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"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Malicious PowerShell Process - Encoded Command +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 has an encoded command on the command-line +action.notable.param.rule_title = PowerShell process with an encoded command 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 = 20 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest, user, process_name 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. +description = This search looks for PowerShell processes that have encoded the script within the command-line. Malware has been seen using this parameter, as it obfuscates the code and makes it relatively easy to pass a script on the command-line. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -7187,7 +7269,30 @@ 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.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=*-EncodedCommand* OR process=*-enc* + +[ESCU - Add Prohibited Processes to Enterprise Security] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-06-27 +action.escu.modification_date = 2017-09-15 +action.escu.channel = ESCU +action.escu.eli5 = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. +action.escu.how_to_implement = This search should be run on each new install of ESCU. +action.escu.data_models = [] +action.escu.full_search_name = ESCU - Add Prohibited Processes to Enterprise Security +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"] +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 +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | inputlookup interesting_processes_lookup | search note!=ESCU* | inputlookup append=T prohibitedProcesses_lookup | fillnull value=* dest dest_pci_domain | fillnull value=false is_required is_secure | fillnull value=true is_prohibited | outputlookup interesting_processes_lookup | stats count [ESCU - Monitor Email For Brand Abuse - Rule] action.escu = 0 @@ -7262,29 +7367,54 @@ 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 - Get Authentication Logs For Endpoint] +[ESCU - Schtasks scheduling job on remote system - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-10 -action.escu.modification_date = 2017-11-01 +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.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 Privilege Escalation", "Hidden Cobra Malware", "Windows File Extension and Association Abuse", "Monitor for Updates", "Unusual Processes", "ColdRoot MacOS RAT", "Account Monitoring and Controls", "Netsh Abuse", "DHS Report TA18-074A", "Data Protection", "SamSam Ransomware", "Windows Defense Evasion Tactics", "Dynamic DNS", "Apache Struts Vulnerability", "Windows Service Abuse", "Windows Log Manipulation", "Orangeworm Attack Group", "Disabling Security Tools", "JBoss Vulnerability", "Ransomware", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious DNS Traffic", "Emotet Malware (TA18-201A)", "DNS Hijacking", "Host Redirection", "Suspicious Command-Line Executions", "Brand Monitoring", "Splunk Enterprise Vulnerability", "Credential Dumping", "Prohibited Traffic Allowed or Protocol Mismatch", "Asset Tracking", "Windows Persistence Techniques", "Command and Control", "Suspicious Emails", "Suspicious Windows Registry Activities", "Router & Infrastructure Security", "Malicious PowerShell", "SQL Injection", "Lateral Movement", "Collection and Staging", "Monitor for Unauthorized Software", "Suspicious MSHTA Activity", "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. +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.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Lateral Movement"] +action.correlationsearch.enabled = 1 +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 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 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 = 50 +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 +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 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 @@ -7435,28 +7565,29 @@ schedule_window = auto is_visible = false search = sourcetype="stream:http" http_method=POST http_content_length>1 | regex form_data="(?i)java\.lang\.(?:runtime|processbuilder)" | rename src_ip as src | stats count earliest(_time) as firstTime, latest(_time) as lastTime, values(url) as uri, values(status) as status, values(http_user_agent) as http_user_agent by src, dest | convert ctime(firstTime) ctime(lastTime) -[ESCU - Add Prohibited Processes to Enterprise Security] +[ESCU - Get First Occurrence and Last Occurrence of a MAC Address] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-27 -action.escu.modification_date = 2017-09-15 +action.escu.creation_date = 2017-06-14 +action.escu.modification_date = 2017-09-13 action.escu.channel = ESCU -action.escu.eli5 = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. -action.escu.how_to_implement = This search should be run on each new install of ESCU. -action.escu.data_models = [] -action.escu.full_search_name = ESCU - Add Prohibited Processes to Enterprise Security +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 = support -action.escu.providing_technologies = ["Splunk Enterprise Security"] -action.escu.analytic_story = ["SamSam Ransomware", "Monitor for Unauthorized Software"] -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 +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 = | inputlookup interesting_processes_lookup | search note!=ESCU* | inputlookup append=T prohibitedProcesses_lookup | fillnull value=* dest dest_pci_domain | fillnull value=false is_required is_secure | fillnull value=true is_prohibited | outputlookup interesting_processes_lookup | stats count +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 - Monitor DNS For Brand Abuse - Rule] action.escu = 0 @@ -7508,44 +7639,44 @@ 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 - Suspicious File Write - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2016-09-13 -action.escu.modification_date = 2017-09-15 +action.escu.creation_date = 2018-06-14 +action.escu.modification_date = 2018-11-14 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.confidence = high +action.escu.eli5 = This search looks at files being created or modified in the Endpoint file-system data model. The names of those files are checked against an included lookup file, which contains the names of files associated with malware or attack activity. The search returns any files with matching names, along with a note (also specified in the lookup file) that gives or points to more information about the files. +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. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file system reads and writes. In addition, this search leverages an included lookup file that contains the names of the files to watch for, as well as a note to communicate why that file name is being monitored. This lookup file can be edited to add or remove file the file names you want to monitor. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Suspicious File Write - 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's possible for a legitimate file to be created with the same name as one noted in the lookup file. Filenames listed in the lookup file should be unique enough that collisions are rare. Looking at the location of the file and the process responsible for the activity can help determine whether or not the activity is legitimate. action.escu.search_type = detection -action.escu.providing_technologies = ["Bro", "Splunk Stream"] -action.escu.analytic_story = ["Hidden Cobra Malware", "SamSam Ransomware", "Lateral Movement"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Hidden Cobra Malware"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Remote Desktop Network Traffic +action.correlationsearch.label = Suspicious File Write 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 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.nes_fields = dest, file_name +action.notable.param.rule_description = A write to a filename associated with malicious activity detected on $dest$. +action.notable.param.rule_title = Suspicious File Write 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 Outbound Emails to Hidden Cobra Threat Actors\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 = 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 = dest,src -alert.suppress.period = 28800s +alert.suppress.fields = dest,file_name +alert.suppress.period = 14400s 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. +description = The search looks for files created with names that have been linked to malicious activity. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -7556,7 +7687,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.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 `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 - Create local admin accounts using net.exe - Rule] action.escu = 0 @@ -7703,78 +7834,27 @@ 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] +[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 -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 -action.escu.creation_date = 2018-01-08 -action.escu.modification_date = 2018-01-08 -action.escu.channel = ESCU -action.escu.eli5 = 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. -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.data_models = ["Change_Analysis"] -action.escu.full_search_name = ESCU - Systems Ready for Spectre-Meltdown Windows Patch +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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Spectre And Meltdown Vulnerabilities"] -description = Some AV applications can cause the Spectre/Meltdown patch for Windows not to install successfully. This registry key is supposed to be created by the AV engine when it has been patched to be able to handle the Windows patch. If this key has been written, the system can then be patched for Spectre and Meltdown. -dispatch.earliest_time = -1d@d +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 = | 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="HKLM\Software\Microsoft\Windows\CurrentVersion\QualityCompat*") by All_Changes.dest, All_Changes.command, All_Changes.user, All_Changes.object, All_Changes.object_path | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` +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 - Get EC2 Launch Details] action.escu = 0 @@ -7866,49 +7946,55 @@ 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 -[ESCU - Previously Seen AWS Regions] +[ESCU - Email Attachments With Lots Of Spaces - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-01-08 -action.escu.modification_date = 2018-01-08 +action.escu.creation_date = 2017-04-21 +action.escu.modification_date = 2017-09-19 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = 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. -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 Regions +action.escu.confidence = high +action.escu.eli5 = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. +action.escu.how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. +action.escu.data_models = ["Email"] +action.escu.full_search_name = ESCU - Email Attachments With Lots Of Spaces - 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 = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] -description = This search looks for CloudTrail events where an AWS instance is started and creates a baseline of most recent time (latest) and the first time (earliest) we've seen this region in our dataset grouped by the value awsRegion for the last 30 days -dispatch.earliest_time = -30d@d +action.escu.search_type = detection +action.escu.providing_technologies = ["Microsoft Exchange"] +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 +action.notable.param.nes_fields = src_user, file_name +action.notable.param.rule_description = The sender $src_user$ has sent an email with a suspicious amount of spaces in the file name: $file_name$ +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 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 +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 60 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = src_user +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = Attackers often use spaces as a means to obfuscate an attachment's file extension. This search looks for messages with email attachments that have many spaces within the filename. +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 StartInstances | stats earliest(_time) as earliest latest(_time) as latest by awsRegion | outputlookup previously_seen_aws_regions.csv | stats count - -[ESCU - Baseline of blocked outbound traffic from AWS] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-04-26 -action.escu.modification_date = 2018-05-07 -action.escu.channel = ESCU -action.escu.eli5 = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. -action.escu.full_search_name = ESCU - Baseline of blocked outbound traffic from AWS -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", "Suspicious AWS Traffic", "Command and Control"] -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 -disabled=true -realtime_schedule = 0 -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 +search = | tstats `summariesonly` count values(All_Email.recipient) as recipient_address min(_time) as firstTime max(_time) as lastTime from datamodel=Email where All_Email.file_name="*" by All_Email.src_user, All_Email.file_name All_Email.message_id | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name("All_Email")` | eval space_ratio = (mvcount(split(file_name," "))-1)/len(file_name) | search space_ratio >= 0.1 | rex field=recipient_address "(?.*)@" [ESCU - Previously seen users in CloudTrail] action.escu = 0 @@ -7955,6 +8041,55 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:cloudtrail userIdentity.arn={src_user} | spath output=user path=userIdentity.arn | rename sourceIPAddress as src_ip | table _time, user, src_ip, awsRegion, eventName, errorCode, errorMessage +[ESCU - Detect New Open S3 buckets - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-07-25 +action.escu.modification_date = 2018-07-25 +action.escu.asset_at_risk = S3 Bucket +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. +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), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. +action.escu.full_search_name = ESCU - Detect New Open S3 buckets - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +action.escu.known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect New Open S3 buckets +action.notable = 1 +action.notable.param.nes_fields = user +action.notable.param.rule_description = An open/public S3 bucket, $bucketName$, was created by $user$. +action.notable.param.rule_title = Public S3 bucket $bucketName$ created 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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 = 70 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = user,bucketName +alert.suppress.period = 86400s +cron_schedule = 5 * * * * +description = This search looks for CloudTrail events where a user has created an open/public S3 bucket. +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 AllUsers eventName=PutBucketAcl | spath output=userIdentityArn path=userIdentity.arn | spath output=bucketName path=requestParameters.bucketName | spath output=aclControlList path=requestParameters.AccessControlPolicy.AccessControlList | spath input=aclControlList output=grantee path=Grant{} | mvexpand grantee | spath input=grantee | search Grantee.URI=*AllUsers | rename userIdentityArn as user| table _time, src,awsRegion Permission, Grantee.URI, bucketName, user + [ESCU - Get DNS traffic ratio] action.escu = 0 action.escu.enabled = 1 @@ -7968,7 +8103,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 = ["Dynamic DNS", "Suspicious DNS Traffic", "DNS Hijacking", "Command and Control"] +action.escu.analytic_story = ["DNS Hijacking", "Dynamic DNS", "Command and Control", "Suspicious DNS Traffic"] action.escu.fields_required = ["src_ip", "dest_ip"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -8337,7 +8472,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 = ["DHS Report TA18-074A", "Ransomware", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Suspicious Windows Registry Activities", "Suspicious MSHTA Activity", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious MSHTA Activity", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Ransomware", "Suspicious Windows Registry Activities", "DHS Report TA18-074A"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Registry Keys Used For Persistence action.notable = 1 @@ -8544,45 +8679,45 @@ 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 - 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.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 = 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.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.search_type = detection -action.escu.providing_technologies = ["Active Directory"] -action.escu.analytic_story = ["Account Monitoring and Controls"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Host Redirection"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Identify New User Accounts +action.correlationsearch.label = Windows hosts file modification 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.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.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = user +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 = identity +alert.suppress.fields = dest,user 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 +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 dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -8592,31 +8727,7 @@ 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)` +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 - Attempt To Stop Security Service - Rule] action.escu = 0 @@ -8739,43 +8850,44 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Application_State by All_Application_State.dest All_Application_State.user All_Application_State.process | `ctime(firstTime)`| `ctime(lastTime)` | `drop_dm_object_name("All_Application_State")` | `uncommon_processes` -[ESCU - Detect New Open S3 buckets - Rule] +[ESCU - Remote Desktop Network Traffic - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-07-25 -action.escu.modification_date = 2018-07-25 -action.escu.asset_at_risk = S3 Bucket +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 queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. -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), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. -action.escu.full_search_name = ESCU - Detect New Open S3 buckets - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -action.escu.known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. +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 = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS S3 Activities"] +action.escu.providing_technologies = ["Bro", "Splunk Stream"] +action.escu.analytic_story = ["SamSam Ransomware", "Hidden Cobra Malware", "Lateral Movement"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect New Open S3 buckets +action.correlationsearch.label = Remote Desktop Network Traffic action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = An open/public S3 bucket, $bucketName$, was created by $user$. -action.notable.param.rule_title = Public S3 bucket $bucketName$ created by $user$ +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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 = user -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 70 +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 = user,bucketName -alert.suppress.period = 86400s -cron_schedule = 5 * * * * -description = This search looks for CloudTrail events where a user has created an open/public S3 bucket. +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 @@ -8786,33 +8898,34 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail AllUsers eventName=PutBucketAcl | spath output=userIdentityArn path=userIdentity.arn | spath output=bucketName path=requestParameters.bucketName | spath output=aclControlList path=requestParameters.AccessControlPolicy.AccessControlList | spath input=aclControlList output=grantee path=Grant{} | mvexpand grantee | spath input=grantee | search Grantee.URI=*AllUsers | rename userIdentityArn as user| table _time, src,awsRegion Permission, Grantee.URI, bucketName, user +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 - EC2 Instance Modified With Previously Unseen User - Rule] +[ESCU - Registry Keys for Creating SHIM Databases - 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.creation_date = 2017-08-27 +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 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.eli5 = In this search, we look for modifications to registry keys used for shim databases on Microsoft platforms via the object_category and object_path field in the Change_Analysis data model and give you the destination, command used to initiate the change, the user who conducted this activity, the resource affected(object), and the whole path of the object. An application compatibility shim is a small library that transparently intercepts an API (via hooking), changes the parameters passed, handles the operation itself, or redirects the operation elsewhere, such as additional code stored on a system. This capability can be also leveraged by attackers to create and store malicious files in a shim database as observed in CARBANAK backdoor. +action.escu.how_to_implement = To successfully implement this search, you must populate the Change_Analysis data model. This is typically populated via endpoint detection and response products, such as Carbon Black or other endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. +action.escu.data_models = ["Change_Analysis"] +action.escu.full_search_name = ESCU - Registry Keys for Creating SHIM Databases - Rule +action.escu.mappings = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +action.escu.known_false_positives = There are many legitimate applications that leverage shim databases for compatibility purposes for legacy applications action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Unusual AWS EC2 Modifications"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Suspicious Windows Registry Activities"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = EC2 Instance Modified With Previously Unseen User +action.correlationsearch.label = Registry Keys for Creating SHIM Databases 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.nes_fields = dest, user +action.notable.param.rule_description = A registry key that is used for persistence on Windows was modified on $dest$ by $user$ +action.notable.param.rule_title = Registry Key Associated With SHIM databases 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 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.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 @@ -8821,10 +8934,10 @@ 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 +alert.suppress.fields = dest,object_path +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = This search looks for EC2 instances being modified by users who have not previously modified them. +description = This search looks for registry activity associated with application compatibility shims, which can be leveraged by attackers for various nefarious purposes. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -8835,7 +8948,7 @@ 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 = | 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 - Remote Process Instantiation via WMI - Rule] action.escu = 0 @@ -8909,44 +9022,92 @@ 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=installed by _time span=1d -[ESCU - Execution of File with Multiple Extensions - Rule] +[ESCU - AWS Network Access Control List Deleted - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-01-26 -action.escu.modification_date = 2018-11-02 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2017-01-08 +action.escu.modification_date = 2017-01-10 +action.escu.asset_at_risk = AWS Instance action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. -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. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Execution of File with Multiple Extensions - 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.confidence = medium +action.escu.eli5 = The search looks for CloudTrail events to detect whether any network ACLs have been deleted and gives you values of error messages and error codes (if any), user details, user source IP, the user who initiated this request, and the name of the event. +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 - AWS Network Access Control List Deleted - Rule +action.escu.mappings = {"mitre_attack": ["Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11"], "nist": ["DE.DP", "DE.AE"]} +action.escu.known_false_positives = It's possible that a user has legitimately deleted a network ACL. 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 Network ACL Activity"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Execution of File with Multiple Extensions +action.correlationsearch.label = AWS Network Access Control List Deleted action.notable = 1 -action.notable.param.nes_fields = dest, process -action.notable.param.rule_description = The system $dest$ executed a file with a double extension. -action.notable.param.rule_title = Process With Multiple Extensions Launched on $dest$ +action.notable.param.nes_fields = src, src_user, eventName +action.notable.param.rule_description = AWS network ACL has been deleted by $src_user. +action.notable.param.rule_title = AWS Network ACL deleted 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 - AWS Network ACL Details from ID\n - ESCU - AWS Network Interface details via resourceId\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 = src_user +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 80 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = src_user +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = Enforcing network-access controls is one of the defensive mechanisms used by cloud administrators to restrict access to a cloud instance. After the attacker has gained control of the AWS console by compromising an admin account, they can delete a network ACL and gain access to the instance from anywhere. This search will query the CloudTrail logs to detect users deleting network ACLs. +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 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 - EC2 Instance Started With Previously Unseen AMI - Rule] +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.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 = 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.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 = 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 = dest +alert.suppress.period = 14400s cron_schedule = 0 * * * * -description = This search looks for processes launched from files that have double extensions in the file name. This is typically done to obscure the "real" file extension and make it appear as though the file being accessed is a data file, as opposed to executable content. +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 @@ -8957,30 +9118,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.Processes where Processes.process = *.doc.exe OR Processes.process = *.htm.exe OR Processes.process = *.html.exe OR Processes.process = *.txt.exe OR Processes.process = *.pdf.exe OR Processes.process = *.doc.exe by Processes.dest Processes.user Processes.process Processes.parent_process | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name(Processes)` - -[ESCU - Get Parent Process Info] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-08-22 -action.escu.modification_date = 2017-09-10 -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 Privilege Escalation", "Hidden Cobra Malware", "Windows File Extension and Association Abuse", "Netsh Abuse", "DHS Report TA18-074A", "SamSam Ransomware", "Windows Defense Evasion Tactics", "Windows Service Abuse", "Orangeworm Attack Group", "Disabling Security Tools", "Ransomware", "Emotet Malware (TA18-201A)", "Suspicious Command-Line Executions", "Credential Dumping", "Windows Persistence Techniques", "Suspicious Windows Registry Activities", "Collection and Staging", "Suspicious MSHTA Activity", "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 -disabled=true -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 @@ -9020,7 +9158,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 = ["Data Protection", "Suspicious DNS Traffic", "Command and Control"] +action.escu.analytic_story = ["Command and Control", "Suspicious DNS Traffic", "Data Protection"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detection of DNS Tunnels action.notable = 1 @@ -9029,7 +9167,7 @@ action.notable.param.rule_description = Potential DNS tunnel detected from $src$ action.notable.param.rule_title = DNS tunnel detected on $src$ action.notable.param.security_domain = network 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 - 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 Process responsible for the DNS traffic\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -9054,44 +9192,44 @@ 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 - Malicious PowerShell Process - Encoded Command - Rule] +[ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2016-09-18 -action.escu.modification_date = 2018-12-03 +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 = medium -action.escu.eli5 = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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.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 - Malicious PowerShell Process - Encoded Command - 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 = System administrators may use this option, but it's not common. +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 = ["Malicious PowerShell"] +action.escu.analytic_story = ["Credential Dumping"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Malicious PowerShell Process - Encoded Command +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 = The system $dest$ executed a PowerShell process that has an encoded command on the command-line -action.notable.param.rule_title = PowerShell process with an encoded command detected on $dest$ +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 = 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.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 = 20 +action.risk.param._risk_score = 80 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest, user, process_name -alert.suppress.period = 14400s +alert.suppress.fields = process_name, dest +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = This search looks for PowerShell processes that have encoded the script within the command-line. Malware has been seen using this parameter, as it obfuscates the code and makes it relatively easy to pass a script on the command-line. +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 @@ -9102,7 +9240,7 @@ 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=*-EncodedCommand* OR process=*-enc* +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 - Unusually Long Command Line - Rule] action.escu = 0 @@ -9118,7 +9256,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 = ["Unusual Processes", "Ransomware", "Suspicious Command-Line Executions", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Ransomware", "Unusual Processes"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Unusually Long Command Line action.notable = 1 @@ -9127,7 +9265,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 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 - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -9152,116 +9290,67 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` | eval cmdlen=len(cmdline) | eventstats stdev(cmdlen) as stdev, avg(cmdlen) as avg by dest | stats max(cmdlen) as maxlen, values(stdev) as stdevperhost, values(avg) as avgperhost by dest, process,cmdline| eval threshold = 10 | where maxlen > ((threshold*stdevperhost) + avgperhost) -[ESCU - Email Attachments With Lots Of Spaces - Rule] +[ESCU - Baseline of blocked outbound traffic from AWS] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-21 -action.escu.modification_date = 2017-09-19 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-04-26 +action.escu.modification_date = 2018-05-07 action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. -action.escu.how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. -action.escu.data_models = ["Email"] -action.escu.full_search_name = ESCU - Email Attachments With Lots Of Spaces - Rule -action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +action.escu.eli5 = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. +action.escu.full_search_name = ESCU - Baseline of blocked outbound traffic from AWS action.escu.known_false_positives = None at this time -action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Exchange"] -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 -action.notable.param.nes_fields = src_user, file_name -action.notable.param.rule_description = The sender $src_user$ has sent an email with a suspicious amount of spaces in the file name: $file_name$ -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 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 -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 60 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = src_user -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = Attackers often use spaces as a means to obfuscate an attachment's file extension. This search looks for messages with email attachments that have many spaces within the filename. -dispatch.earliest_time = -70m@m +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS Traffic", "Command and Control", "AWS Network ACL Activity"] +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 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(All_Email.recipient) as recipient_address 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")` | eval space_ratio = (mvcount(split(file_name," "))-1)/len(file_name) | search space_ratio >= 0.1 | rex field=recipient_address "(?.*)@" +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 - 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 - EC2 Instance Started With Previously Unseen Instance Type - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-03-12 -action.escu.modification_date = 2018-03-12 +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 = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. -action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule +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 = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. +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 Cryptomining"] +action.escu.analytic_story = ["AWS Suspicious Provisioning Activities"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = EC2 Instance Started With Previously Unseen Instance Type +action.correlationsearch.label = AWS Cloud Provisioning From Previously Unseen IP Address action.notable = 1 -action.notable.param.nes_fields = instanceType -action.notable.param.rule_description = The EC2 instance type $instanceType$ was used for the first time to create $dest$. -action.notable.param.rule_title = New EC2 Instance Type $instanceType$ detected +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 EC2 Launch Details\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\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 = 30 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest +alert.suppress.fields = src_ip alert.suppress.period = 14400s cron_schedule = 0 * * * * -description = This search looks for EC2 instances being created with previously unseen instance types. +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 @@ -9272,7 +9361,30 @@ 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 | 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 +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 - Identify Systems Receiving Remote Desktop Traffic] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-04-24 +action.escu.modification_date = 2017-09-15 +action.escu.channel = ESCU +action.escu.eli5 = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. +action.escu.how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Identify Systems Receiving Remote Desktop Traffic +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 = ["Lateral Movement"] +description = This search counts the numbers of times the system has created remote desktop traffic +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=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.dest | `drop_dm_object_name("All_Traffic")` | sort - count [ESCU - Get Risk Modifiers For Endpoint] action.escu = 0 @@ -9287,7 +9399,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 Privilege Escalation", "Hidden Cobra Malware", "Windows File Extension and Association Abuse", "Monitor for Updates", "Unusual Processes", "ColdRoot MacOS RAT", "Account Monitoring and Controls", "Netsh Abuse", "DHS Report TA18-074A", "Data Protection", "DNS Amplification Attacks", "SamSam Ransomware", "Dynamic DNS", "Apache Struts Vulnerability", "Monitor Backup Solution", "Windows Service Abuse", "Windows Log Manipulation", "Orangeworm Attack Group", "Disabling Security Tools", "JBoss Vulnerability", "Ransomware", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious DNS Traffic", "Emotet Malware (TA18-201A)", "DNS Hijacking", "Host Redirection", "Brand Monitoring", "Splunk Enterprise Vulnerability", "Credential Dumping", "Prohibited Traffic Allowed or Protocol Mismatch", "Asset Tracking", "Use of Cleartext Protocols", "Windows Persistence Techniques", "Command and Control", "Suspicious Emails", "Splunk Enterprise Vulnerability CVE-2018-11409", "Suspicious Windows Registry Activities", "Router & Infrastructure Security", "Malicious PowerShell", "SQL Injection", "Lateral Movement", "Collection and Staging", "Monitor for Unauthorized Software", "Suspicious MSHTA Activity", "Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "Suspicious MSHTA Activity", "DNS Amplification Attacks", "Monitor for Updates", "SamSam Ransomware", "Malicious PowerShell", "Asset Tracking", "Prohibited Traffic Allowed or Protocol Mismatch", "Splunk Enterprise Vulnerability CVE-2018-11409", "Emotet Malware (TA18-201A)", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Suspicious Emails", "DNS Hijacking", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Dynamic DNS", "Host Redirection", "Monitor Backup Solution", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Monitor for Unauthorized Software", "Brand Monitoring", "Suspicious WMI Use", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "SQL Injection", "ColdRoot MacOS RAT", "Collection and Staging", "Disabling Security Tools", "Data Protection"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 From 759034732a08147c6e75bef3c47d0a7500081e19 Mon Sep 17 00:00:00 2001 From: divious1 Date: Wed, 27 Feb 2019 20:07:01 -0500 Subject: [PATCH 08/18] minor rendering errors --- escu/searches/detection_dns_record_changed.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/escu/searches/detection_dns_record_changed.json b/escu/searches/detection_dns_record_changed.json index 1cb5983e47..432b00c83a 100644 --- a/escu/searches/detection_dns_record_changed.json +++ b/escu/searches/detection_dns_record_changed.json @@ -33,8 +33,8 @@ "Bro" ] }, - "eli5": "Using a lookup discover_dns_records generated by support search \"Discover DNS records\" we check previous network traffic and make sure the responses have not changed.", - "how_to_implement": "To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that the discover_dns_record lookup table be populated by the included support search \"Discover DNS record\".

Splunk>Phantom Playbook Integration

If Splunk>Phantom is also configured in your environment, a Playbook called \"DNS Hijack Investigation\" can be configured to run when any results are found by this detection search. The playbook takes in the DNS record changed and uses Geoip, whois, Censys and PassiveTotal to detect if DNS issuers changed. To use this integration, install the Phantom App for Splunk https://splunkbase.splunk.com/app/3411/, add the correct hostname to the \"Phantom Instance\" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active.
(Playbook Link:https://my.phantom.us/4.1/playbook/dns-hijack-investigation/).

\"", + "eli5": "Using a lookup `discover_dns_records` generated by support search \"Discover DNS records\" we check previous network traffic and make sure the responses have not changed.", + "how_to_implement": "To successfully implement this search you will need to ensure that DNS data is populating the `Network_Resolution` data model. It also requires that the `discover_dns_record` lookup table be populated by the included support search \"Discover DNS record\".

Splunk>Phantom Playbook Integration

If Splunk>Phantom is also configured in your environment, a Playbook called \"DNS Hijack Investigation\" can be configured to run when any results are found by this detection search. The playbook takes in the DNS record changed and uses Geoip, whois, Censys and PassiveTotal to detect if DNS issuers changed. To use this integration, install the Phantom App for Splunk https://splunkbase.splunk.com/app/3411/, add the correct hostname to the \"Phantom Instance\" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active.
(Playbook Link:https://my.phantom.us/4.1/playbook/dns-hijack-investigation/).

\"", "known_false_positives": "Legitimate DNS changes can be detected in this search. Investigate, verify and update the list of provided current answers for the domains in question as appropriate.", "maintainers": [ { From 286ff000fb2f7cbc0e1b1fbd9ed7bed0a065dbff Mon Sep 17 00:00:00 2001 From: research bot Date: Thu, 28 Feb 2019 01:10:48 +0000 Subject: [PATCH 09/18] updating src files [ci skip] --- src/default/analytic_stories.conf | 8 +- src/default/analyticstories.conf | 1132 ++++----- src/default/savedsearches.conf | 3860 ++++++++++++++--------------- 3 files changed, 2500 insertions(+), 2500 deletions(-) diff --git a/src/default/analytic_stories.conf b/src/default/analytic_stories.conf index 2e5657c627..bd448b1439 100644 --- a/src/default/analytic_stories.conf +++ b/src/default/analytic_stories.conf @@ -48,7 +48,7 @@ data_models = description = Monitor your AWS network infrastructure for bad configurations and malicious activity. Investigative searches help you probe deeper, when the facts warrant it. id = 2e8948a5-5239-406b-b56b-6c50ff268af4 version = 2.0 -mappings = {"mitre_attack": ["Command and Control", "Exfiltration", "Persistence"], "cis20": ["CIS 11", "CIS 12"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["DE.DP", "DE.AE", "DE.CM", "PR.AC"]} +mappings = {"mitre_attack": ["Command and Control", "Exfiltration", "Persistence"], "cis20": ["CIS 11", "CIS 12"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["DE.CM", "DE.AE", "DE.DP", "PR.AC"]} modification_date = 2018-05-21 reference = ["https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_NACLs.html", "https://aws.amazon.com/blogs/security/how-to-help-prepare-for-ddos-attacks-by-reducing-your-attack-surface/"] providing_technologies = ["AWS", "Splunk Enterprise Security"] @@ -241,7 +241,7 @@ data_models = ["Application_State", "Authentication", "Network_Resolution", "Net description = Detect and investigate tactics, techniques, and procedures leveraged by attackers to establish and operate command and control channels. Implants installed by attackers on compromised endpoints use these channels to receive instructions and send data back to the malicious operators. id = 943773c6-c4de-4f38-89a8-0b92f98804d8 version = 1.0 -mappings = {"mitre_attack": ["Command and Control", "Exfiltration Over Command and Control Channel", "Standard Non-Application Layer Protocol", "Commonly Used Port", "Exfiltration Over Alternative Protocol", "Exfiltration", "Standard Application Layer Protocol", "Defense Evasion"], "cis20": ["CIS 8", "CIS 9", "CIS 11", "CIS 12", "CIS 13", "CIS 3", "CIS 1"], "kill_chain_phases": ["Command and Control", "Actions on Objectives", "Delivery"], "nist": ["ID.AM", "PR.DS", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "DE.CM"]} +mappings = {"mitre_attack": ["Command and Control", "Exfiltration Over Command and Control Channel", "Standard Non-Application Layer Protocol", "Commonly Used Port", "Exfiltration Over Alternative Protocol", "Exfiltration", "Standard Application Layer Protocol", "Defense Evasion"], "cis20": ["CIS 8", "CIS 9", "CIS 11", "CIS 12", "CIS 13", "CIS 3", "CIS 1"], "kill_chain_phases": ["Command and Control", "Delivery", "Actions on Objectives"], "nist": ["ID.AM", "PR.DS", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "DE.CM"]} modification_date = 2018-07-24 reference = ["https://attack.mitre.org/wiki/Command_and_Control", "https://searchsecurity.techtarget.com/feature/Command-and-control-servers-The-puppet-masters-that-govern-malware"] providing_technologies = ["AWS", "Bluecoat", "Bro", "Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -799,7 +799,7 @@ data_models = ["Application_State", "Authentication", "Endpoint", "Network_Traff description = Leverage searches that allow you to detect and investigate unusual activities that might relate to the SamSam ransomware, including looking for file writes associated with SamSam, RDP brute force attacks, the presence of files with SamSam ransomware extensions, suspicious psexec use, and more. id = c4b89506-fbcf-4cb7-bfd6-527e54789604 version = 1.0 -mappings = {"mitre_attack": ["Exploitation of Vulnerability", "System Information Discovery", "Commonly Used Port", "Command-Line Interface", "Credential Access", "Lateral Movement", "Defense Evasion", "Execution", "Remote Desktop Protocol", "Discovery"], "cis20": ["CIS 3", "CIS 18", "CIS 8", "CIS 9", "CIS 10", "CIS 12", "CIS 2", "CIS 4", "CIS 16"], "kill_chain_phases": ["Delivery", "Actions on Objectives", "Reconnaissance", "Installation", "Command and Control"], "nist": ["ID.AM", "PR.DS", "ID.RA", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "PR.MA", "DE.CM"]} +mappings = {"mitre_attack": ["Exploitation of Vulnerability", "Execution", "Commonly Used Port", "Command-Line Interface", "Credential Access", "Lateral Movement", "Defense Evasion", "System Information Discovery", "Remote Desktop Protocol", "Discovery"], "cis20": ["CIS 3", "CIS 18", "CIS 8", "CIS 9", "CIS 10", "CIS 12", "CIS 2", "CIS 4", "CIS 16"], "kill_chain_phases": ["Delivery", "Actions on Objectives", "Reconnaissance", "Installation", "Command and Control"], "nist": ["ID.AM", "PR.DS", "ID.RA", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "PR.MA", "DE.CM"]} modification_date = 2018-12-14 reference = ["https://www.crowdstrike.com/blog/an-in-depth-analysis-of-samsam-ransomware-and-boss-spider/", "https://www.sophos.com/en-us/medialibrary/PDFs/technical-papers/SamSam-ransomware-chooses-Its-targets-carefully-wpna.pdf", "https://www.sophos.com/en-us/medialibrary/PDFs/technical-papers/SamSam-The-Almost-Six-Million-Dollar-Ransomware.pdf?cmp=26061"] providing_technologies = ["Apache", "Bluecoat", "Bro", "Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Nessus", "Netbackup", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -1147,7 +1147,7 @@ data_models = ["Email"] description = Monitor your environment for activity consistent with common attack techniques bad actors use when attempting to compromise web servers or other web-related assets. id = 31337aaa-bc22-4752-b599-ef112dq1dq7a version = 1.0 -mappings = {"mitre_attack": ["Valid Accounts", "Create Account"], "cis20": ["CIS 6", "CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE", "DE.CM"]} +mappings = {"mitre_attack": ["Valid Accounts", "Create Account"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 6", "CIS 16"], "nist": ["DE.CM", "DE.AE", "DE.DP"]} modification_date = 2018-10-08 reference = ["https://www.fbi.gov/scams-and-safety/common-fraud-schemes/internet-fraud", "https://www.fbi.gov/news/stories/2017-internet-crime-report-released-050718", "https://www.otalliance.org/news-events/press-releases/online-trust-alliance-reports-doubling-cyber-incidents-2017-0"] providing_technologies = ["Bro", "Microsoft Exchange", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream"] diff --git a/src/default/analyticstories.conf b/src/default/analyticstories.conf index 38549f5073..7b1935b6e0 100644 --- a/src/default/analyticstories.conf +++ b/src/default/analyticstories.conf @@ -1031,15 +1031,14 @@ known_false_positives = It is possible that these logs may be legitimately clear providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - Detect Activity Related to Pass the Hash Attacks - Rule] -type = detection -asset_type = Endpoint -confidence = low -explanation = To detect pass the hash activity, we look at all events with event code 4624 or 4625 that specify a logon type 3 (network logons). We are looking for the NtLmSsP account, with a key length set to 0. These indicate lower level protocols that are typically used through Pass the Hash (WMI, SMB, etc.). The search also filters out events with an account name of 'Anonymous' to help reduce false positives. -how_to_implement = To successfully implement this search, you must ingest your Windows Security Event logs and leverage the TA for Windows to extract EventCode, Logon_Process, Logon_Type, Key_Length and Account_Name fields from these events. -annotations = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} -known_false_positives = Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate. -providing_technologies = ["Microsoft Windows"] +[savedsearch://ESCU - Get Process Information For Port Activity] +type = investigative +explanation = none +how_to_implement = To successfully implement this search you must be ingesting endpoint data that associates processes with network events. +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] +earliest_time_offset = 7200 +latest_time_offset = 7200 [savedsearch://ESCU - Create or delete hidden shares using net.exe - Rule] @@ -1063,14 +1062,37 @@ known_false_positives = None at the moment providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Get Process Information For Port Activity] -type = investigative -explanation = none -how_to_implement = To successfully implement this search you must be ingesting endpoint data that associates processes with network events. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -earliest_time_offset = 7200 -latest_time_offset = 7200 +[savedsearch://ESCU - Detect Activity Related to Pass the Hash Attacks - Rule] +type = detection +asset_type = Endpoint +confidence = low +explanation = To detect pass the hash activity, we look at all events with event code 4624 or 4625 that specify a logon type 3 (network logons). We are looking for the NtLmSsP account, with a key length set to 0. These indicate lower level protocols that are typically used through Pass the Hash (WMI, SMB, etc.). The search also filters out events with an account name of 'Anonymous' to help reduce false positives. +how_to_implement = To successfully implement this search, you must ingest your Windows Security Event logs and leverage the TA for Windows to extract EventCode, Logon_Process, Logon_Type, Key_Length and Account_Name fields from these events. +annotations = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +known_false_positives = Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate. +providing_technologies = ["Microsoft Windows"] + + +[savedsearch://ESCU - Detect Long DNS TXT Record Response - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. +how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. +annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} +known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. +providing_technologies = ["Splunk Stream", "Bro"] + + +[savedsearch://ESCU - Web Fraud - Password Sharing Across Accounts - Rule] +type = detection +asset_type = account +confidence = medium +explanation = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 +how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. +annotations = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. +providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] [savedsearch://ESCU - TOR Traffic - Rule] @@ -1113,22 +1135,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 - Identify Systems Creating Remote Desktop Traffic] -type = support -explanation = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. -how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro"] +[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] @@ -1139,33 +1154,15 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] +[savedsearch://ESCU - Unsuccessful Netbackup backups - Rule] type = detection -asset_type = AWS Instance -confidence = medium -explanation = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ -\ -1. Counts the number of blocked outbound connections by each source IP\ -\ -1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ -\ -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 `numberOfBlockedConnections` as `latestCount`.\ -\ -1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. -annotations = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} -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. -providing_technologies = ["AWS"] +asset_type = Endpoint +confidence = high +explanation = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. +how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. +annotations = {"cis20": ["CIS 10"], "nist": ["PR.IP"]} +known_false_positives = None identified +providing_technologies = ["Netbackup"] [savedsearch://ESCU - Detect processes used for System Network Configuration Discovery - Rule] @@ -1179,15 +1176,15 @@ known_false_positives = It is uncommon for normal users to execute a series of c providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - WMI Permanent Event Subscription - Rule] +[savedsearch://ESCU - EC2 Instance Started In Previously Unseen Region - Rule] type = detection -asset_type = Endpoint +asset_type = AWS Instance 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 Windows event ID 5861. -how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. -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"] +explanation = In this search, we query CloudTrail logs to look for events that indicate that an instance was started in a particular region. Using the `previously_seen_aws_regions.csv` lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The `eval` and `if` functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with "Instance Started in a New Region". However, this region will be added to the list of `previously_seen_aws_regions.csv`. Please maintain `previously_seen_aws_regions.csv` +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 Regions" support search only once to create of baseline of previously seen regions. +annotations = {"mitre_attack": ["Defense Evasion"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 12"], "nist": ["DE.DP", "DE.AE"]} +known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. +providing_technologies = ["AWS"] [savedsearch://ESCU - Get Outbound Emails to Hidden Cobra Threat Actors] @@ -1287,14 +1284,14 @@ known_false_positives = There may be other processes in your environment that us providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Detect S3 access from a new IP - Rule] +[savedsearch://ESCU - EC2 Instance Modified With Previously Unseen User - Rule] type = detection -asset_type = S3 Bucket -confidence = low -explanation = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. -annotations = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour +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. providing_technologies = ["AWS"] @@ -1335,8 +1332,8 @@ providing_technologies = ["Bro", "Splunk Stream"] type = detection asset_type = Endpoint confidence = medium -explanation = Using a lookup discover_dns_records generated by support search "Discover DNS records" we check previous network traffic and make sure the responses have not changed. -how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that the discover_dns_record lookup table be populated by the included support search "Discover DNS record". \ +explanation = Using a lookup `discover_dns_records` generated by support search "Discover DNS records" we check previous network traffic and make sure the responses have not changed. +how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the `Network_Resolution` data model. It also requires that the `discover_dns_record` lookup table be populated by the included support search "Discover DNS record". \ \ **Splunk>Phantom Playbook Integration**\ \ @@ -1361,12 +1358,15 @@ known_false_positives = As is common with many fraud-related searches, we are us providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] -[savedsearch://ESCU - Discover DNS records] -type = support -explanation = Discover the DNS records and their answers for domains owned by the company using network traffic events. The discovered events are exported as a lookup named `discovered_dns_records.csv` -how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. Also make sure that the cim_corporate_web_domains and cim_corporate_email_domains lookups are populated with the domains owned by your corporation -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro"] +[savedsearch://ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule] +type = detection +asset_type = Web Server +confidence = medium +explanation = This search returns the number of times a URL associated with this type of JexBoss probe is observed. +how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. +annotations = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} +known_false_positives = It's possible for legitimate HTTP requests to be made to URLs containing the suspicious paths. +providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] [savedsearch://ESCU - SMB Traffic Spike - Rule] @@ -1380,6 +1380,19 @@ known_false_positives = A file server may experience high-demand loads that coul providing_technologies = ["Bro", "Splunk Stream"] +[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 - Samsam Test File Write - Rule] type = detection asset_type = Endpoint @@ -1391,6 +1404,14 @@ known_false_positives = No false positives have been identified. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +[savedsearch://ESCU - Previously Seen AWS Cross Account Activity] +type = support +explanation = In this support search, we look for **AssumeRole** events where the requesting account is different from the requested account. The first and last times these events are seen are written to 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. Validate the user name entries in `previously_seen_aws_cross_account_activity.csv`, a lookup file created by this support search. +known_false_positives = None at this time +providing_technologies = ["AWS"] + + [savedsearch://ESCU - Investigate AWS activities via region name] type = investigative explanation = none @@ -1401,16 +1422,6 @@ earliest_time_offset = 14400 latest_time_offset = 0 -[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 - AWS Network Access Control List Created with All Open Ports - Rule] type = detection asset_type = AWS Instance @@ -1433,17 +1444,6 @@ known_false_positives = The activity may be legitimate. PowerShell is often used providing_technologies = ["Microsoft Windows"] -[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 - Detect Unauthorized Assets by MAC address - Rule] type = detection asset_type = Infrastructure @@ -1508,15 +1508,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 - Schtasks used for forcing a reboot - Rule] type = detection -asset_type = DNS Servers -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"] +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 - Previously Seen EC2 Launches By User] @@ -1527,15 +1527,15 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Detect Long DNS TXT Record Response - Rule] +[savedsearch://ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] type = detection -asset_type = Endpoint +asset_type = Windows confidence = medium -explanation = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. -how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. -annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} -known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. -providing_technologies = ["Splunk Stream", "Bro"] +explanation = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. +how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. +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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. +providing_technologies = ["Microsoft Windows"] [savedsearch://ESCU - Suspicious Reg.exe Process - Rule] @@ -1560,12 +1560,15 @@ known_false_positives = Administrators may attempt to change the default executi providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Previously Seen AWS Cross Account Activity] -type = support -explanation = In this support search, we look for **AssumeRole** events where the requesting account is different from the requested account. The first and last times these events are seen are written to 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. Validate the user name entries in `previously_seen_aws_cross_account_activity.csv`, a lookup file created by this support search. -known_false_positives = None at this time -providing_technologies = ["AWS"] +[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 - Suspicious writes to windows Recycle Bin - Rule] @@ -1579,25 +1582,22 @@ known_false_positives = Because the Recycle Bin is a hidden folder in modern ver providing_technologies = ["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 - All backup logs for host] +[savedsearch://ESCU - Get Logon Rights Modifications For Endpoint] type = investigative explanation = none -how_to_implement = The successfully implement this search you must first send your backup logs to Splunk. +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 = ["Netbackup"] -earliest_time_offset = 1209600 -latest_time_offset = 0 +providing_technologies = ["Microsoft Windows"] +earliest_time_offset = 86400 +latest_time_offset = 86400 + + +[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 - Clients Connecting to Multiple DNS Servers - Rule] @@ -1611,6 +1611,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 @@ -1622,46 +1632,22 @@ 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. +[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. +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 = ["Sysmon"] -earliest_time_offset = 7200 -latest_time_offset = 7200 +providing_technologies = ["AWS"] -[savedsearch://ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] -type = detection -asset_type = Endpoint -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"] - - -[savedsearch://ESCU - Detect USB device insertion - Rule] -type = detection -asset_type = Endpoint -confidence = low -explanation = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device -how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. -annotations = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} -known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. -providing_technologies = ["Microsoft Windows"] - - -[savedsearch://ESCU - Get Backup Logs For Endpoint] +[savedsearch://ESCU - Get User Information from Identity Table] type = contextual explanation = none -how_to_implement = You must be ingesting your backup logs. +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 = ["Netbackup"] -earliest_time_offset = 604800 -latest_time_offset = 0 +providing_technologies = ["Splunk Enterprise Security"] +earliest_time_offset = 864000 +latest_time_offset = 86400 [savedsearch://ESCU - Get DNS Server History for a host] @@ -1685,15 +1671,12 @@ known_false_positives = There are no known false positives. providing_technologies = ["OSquery"] -[savedsearch://ESCU - Unsuccessful Netbackup backups - Rule] -type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. -how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. -annotations = {"cis20": ["CIS 10"], "nist": ["PR.IP"]} -known_false_positives = None identified -providing_technologies = ["Netbackup"] +[savedsearch://ESCU - Previously Seen EC2 Instance Types] +type = support +explanation = In this support search, we create a table of the earliest and latest time that a specific EC2 instance type has been seen. The instanceType request field is not required and defaults to m1.small, so any time this field is null, the search defaults the field to m1.small. This table is then outputted to a csv 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 - Remote Registry Key modifications - Rule] @@ -1707,15 +1690,15 @@ known_false_positives = This technique may be legitimately used by administrator providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[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 - Get Notable Info] @@ -1772,12 +1755,22 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Previously Seen AWS Regions] +[savedsearch://ESCU - Identify Systems Creating Remote Desktop Traffic] 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. -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. +explanation = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. +how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. known_false_positives = None at this time -providing_technologies = ["AWS"] +providing_technologies = ["Splunk Stream", "Bro"] + + +[savedsearch://ESCU - Get Process responsible for the DNS traffic] +type = investigative +explanation = none +how_to_implement = You must be ingesting endpoint data that associates processes with network events. This can come from endpoint protection products such as carbon black, or endpoint data sources such as Sysmon. +known_false_positives = None at this time +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +earliest_time_offset = 3600 +latest_time_offset = 86400 [savedsearch://ESCU - WMI Temporary Event Subscription - Rule] @@ -1802,17 +1795,6 @@ known_false_positives = This registry key may be modified via administrators to providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - EC2 Instance Started In Previously Unseen Region - Rule] -type = detection -asset_type = AWS Instance -confidence = medium -explanation = In this search, we query CloudTrail logs to look for events that indicate that an instance was started in a particular region. Using the `previously_seen_aws_regions.csv` lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The `eval` and `if` functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with "Instance Started in a New Region". However, this region will be added to the list of `previously_seen_aws_regions.csv`. Please maintain `previously_seen_aws_regions.csv` -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 Regions" support search only once to create of baseline of previously seen regions. -annotations = {"mitre_attack": ["Defense Evasion"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 12"], "nist": ["DE.DP", "DE.AE"]} -known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. -providing_technologies = ["AWS"] - - [savedsearch://ESCU - AWS Cloud Provisioning From Previously Unseen City - Rule] type = detection asset_type = AWS Instance @@ -1848,15 +1830,33 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[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 - Previously seen S3 bucket access by remote IP] @@ -1867,17 +1867,6 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Execution of File with Multiple Extensions - Rule] -type = detection -asset_type = Endpoint -confidence = high -explanation = This search uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. -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. -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"] - - [savedsearch://ESCU - Common Ransomware Notes - Rule] type = detection asset_type = Endpoint @@ -1963,12 +1952,15 @@ known_false_positives = It is unlikely that a normal user may create and place t providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Tanium", "Ziften"] -[savedsearch://ESCU - Previously Seen EC2 Instance Types] -type = support -explanation = In this support search, we create a table of the earliest and latest time that a specific EC2 instance type has been seen. The instanceType request field is not required and defaults to m1.small, so any time this field is null, the search defaults the field to m1.small. This table is then outputted to a csv 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 - First time seen command line argument - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = The subsearch returns all events where `cmd.exe` was used with a `/c` parameter in the command-line arguments to execute other commands/programs. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for command-line execution and outputs this data to the lookup file to update the local cache. It returns only those events that have first been seen in the past four hours. This is combined with the main search to return the time, user, destination, process, parent process, and value of the command-line argument. +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 Technology Add-on (TA). Please make sure you run the support search "Previously seen command line arguments,"—which creates a lookup file called `previously_seen_cmd_line_arguments.csv`—a historical baseline of all command-line arguments. You must also validate this list. +annotations = {"mitre_attack": ["Execution", "Scripting", "Persistence", "Command-Line Interface"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +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. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] [savedsearch://ESCU - Suspicious Email Attachment Extensions - Rule] @@ -2011,22 +2003,24 @@ earliest_time_offset = 14400 latest_time_offset = 0 -[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 User Information from Identity Table] -type = contextual +[savedsearch://ESCU - All backup logs for host] +type = investigative 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 = The successfully implement this search you must first send your backup logs to Splunk. 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 = 1209600 +latest_time_offset = 0 + + +[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 - Child Processes of Spoolsv.exe - Rule] @@ -2040,21 +2034,14 @@ known_false_positives = Some legitimate printer-related processes may show up as providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Get Process responsible for the DNS traffic] -type = investigative -explanation = none -how_to_implement = You must be ingesting endpoint data that associates processes with network events. This can come from endpoint protection products such as carbon black, or endpoint data sources such as Sysmon. -known_false_positives = None at this time -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -earliest_time_offset = 3600 -latest_time_offset = 86400 - - -[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. -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. -known_false_positives = None at this time +[savedsearch://ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] +type = detection +asset_type = Endpoint +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"] @@ -2099,48 +2086,25 @@ 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 - Web Fraud - Password Sharing Across Accounts - Rule] +[savedsearch://ESCU - Detect USB device insertion - Rule] type = detection -asset_type = account -confidence = medium -explanation = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 -how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. -annotations = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. -providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] +asset_type = Endpoint +confidence = low +explanation = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device +how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. +annotations = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} +known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. +providing_technologies = ["Microsoft Windows"] [savedsearch://ESCU - Shim Database Installation With Suspicious Parameters - Rule] @@ -2154,15 +2118,15 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Detect malicious requests to exploit JBoss servers - Rule] +[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 - Detect Excessive User Account Lockouts - Rule] @@ -2176,13 +2140,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 @@ -2208,6 +2172,35 @@ known_false_positives = The false-positive rate will vary based on how you set t providing_technologies = ["Bro", "Splunk Stream"] +[savedsearch://ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] +type = detection +asset_type = AWS Instance +confidence = medium +explanation = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ +\ +1. Counts the number of blocked outbound connections by each source IP\ +\ +1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ +\ +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 `numberOfBlockedConnections` as `latestCount`.\ +\ +1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. +annotations = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} +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. +providing_technologies = ["AWS"] + + [savedsearch://ESCU - Identify New User Accounts - Rule] type = detection asset_type = Domain Server @@ -2219,6 +2212,17 @@ known_false_positives = If the Identity_Management data model is not updated reg providing_technologies = ["Active Directory"] +[savedsearch://ESCU - Detect S3 access from a new IP - Rule] +type = detection +asset_type = S3 Bucket +confidence = low +explanation = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. +annotations = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour +providing_technologies = ["AWS"] + + [savedsearch://ESCU - Detect Large Outbound ICMP Packets - Rule] type = detection asset_type = Endpoint @@ -2230,17 +2234,6 @@ known_false_positives = ICMP packets are used in a variety of ways to help troub providing_technologies = ["Bro", "Splunk Stream", "Palo Alto Firewall"] -[savedsearch://ESCU - First time seen command line argument - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = The subsearch returns all events where `cmd.exe` was used with a `/c` parameter in the command-line arguments to execute other commands/programs. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for command-line execution and outputs this data to the lookup file to update the local cache. It returns only those events that have first been seen in the past four hours. This is combined with the main search to return the time, user, destination, process, parent process, and value of the command-line argument. -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 Technology Add-on (TA). Please make sure you run the support search "Previously seen command line arguments,"—which creates a lookup file called `previously_seen_cmd_line_arguments.csv`—a historical baseline of all command-line arguments. You must also validate this list. -annotations = {"mitre_attack": ["Execution", "Scripting", "Persistence", "Command-Line Interface"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} -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. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] - - [savedsearch://ESCU - Get Logon Rights Modifications For User] type = investigative explanation = none @@ -2251,15 +2244,12 @@ earliest_time_offset = 86400 latest_time_offset = 86400 -[savedsearch://ESCU - Abnormally High AWS Instances Terminated by User - 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 terminated by a particular user. Since we want to detect a high number of instances terminated within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances terminated by a particular user, as well as the average- and standard-deviation values. Assign a `threshold_value` in the search. Try starting with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier to 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. We then filter out outliers with a value of 1 and show only those instance-termination events that happened within the previous 10 minutes. -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. -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 with your AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify whether this search alerted on a human user. -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 - Scheduled Task Name Used by Dragonfly Threat Actors - Rule] @@ -2388,25 +2378,12 @@ known_false_positives = There are many legitimate applications that must execute providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[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. +[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"] -earliest_time_offset = 14400 -latest_time_offset = 0 - - -[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. -providing_technologies = ["AWS"] [savedsearch://ESCU - AWS S3 Bucket details via bucketName] @@ -2454,15 +2431,12 @@ known_false_positives = Legitimate router connections may appear as new connecti providing_technologies = ["Active Directory", "Palo Alto Firewall"] -[savedsearch://ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule] -type = detection -asset_type = Web Server -confidence = medium -explanation = This search returns the number of times a URL associated with this type of JexBoss probe is observed. -how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. -annotations = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} -known_false_positives = It's possible for legitimate HTTP requests to be made to URLs containing the suspicious paths. -providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] +[savedsearch://ESCU - Discover DNS records] +type = support +explanation = Discover the DNS records and their answers for domains owned by the company using network traffic events. The discovered events are exported as a lookup named `discovered_dns_records.csv` +how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. Also make sure that the cim_corporate_web_domains and cim_corporate_email_domains lookups are populated with the domains owned by your corporation +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro"] [savedsearch://ESCU - Investigate Successful Remote Desktop Authentications] @@ -2475,15 +2449,15 @@ earliest_time_offset = 86400 latest_time_offset = 0 -[savedsearch://ESCU - Common Ransomware Extensions - Rule] +[savedsearch://ESCU - Detect new user AWS Console Login - 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 = 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"] [savedsearch://ESCU - EC2 Instance Started With Previously Unseen User - Rule] @@ -2497,25 +2471,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 - Detect new user AWS Console Login - 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"] - - [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. @@ -2546,15 +2501,15 @@ known_false_positives = Although unlikely, administrators may use wmi to execute providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] +[savedsearch://ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule] type = detection -asset_type = Windows +asset_type = Endpoint confidence = medium -explanation = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. -how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. -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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. -providing_technologies = ["Microsoft Windows"] +explanation = Clients should be resolving their DNS requests via a trusted DNS server. This search will identify DNS queries being sent to unauthorized DNS servers by comparing the destination and source of the traffic with assets marked as DNS servers. +how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that your DNS servers are identified correctly in the Assets and Identity table of Enterprise Security. +annotations = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} +known_false_positives = Legitimate DNS activity can be detected in this search. Investigate, verify and update the list of authorized DNS servers as appropriate. +providing_technologies = ["Splunk Stream", "Bro"] [savedsearch://ESCU - Get All AWS Activity From Country] @@ -2618,14 +2573,6 @@ 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 - Get Authentication Logs For Endpoint] type = contextual explanation = none @@ -2686,25 +2633,63 @@ earliest_time_offset = 86400 latest_time_offset = 0 -[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 Started With Previously Unseen Instance Type - Rule] +[savedsearch://ESCU - Detect Spike in AWS API Activity - Rule] type = detection asset_type = AWS Instance confidence = medium -explanation = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. -annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. +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 - 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 - Identify Systems Receiving Remote Desktop Traffic] +type = support +explanation = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. +how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro"] + + +[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"] @@ -2719,17 +2704,6 @@ known_false_positives = Using sc.exe to manipulate Windows services is uncommon. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = Clients should be resolving their DNS requests via a trusted DNS server. This search will identify DNS queries being sent to unauthorized DNS servers by comparing the destination and source of the traffic with assets marked as DNS servers. -how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that your DNS servers are identified correctly in the Assets and Identity table of Enterprise Security. -annotations = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} -known_false_positives = Legitimate DNS activity can be detected in this search. Investigate, verify and update the list of authorized DNS servers as appropriate. -providing_technologies = ["Splunk Stream", "Bro"] - - [savedsearch://ESCU - Detect Spike in S3 Bucket deletion - Rule] type = detection asset_type = S3 Bucket @@ -2794,15 +2768,15 @@ earliest_time_offset = 14400 latest_time_offset = 0 -[savedsearch://ESCU - Schtasks used for forcing a reboot - Rule] +[savedsearch://ESCU - Large Volume of DNS ANY Queries - 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"] +asset_type = DNS Servers +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"] [savedsearch://ESCU - Count of assets by category] @@ -2839,6 +2813,28 @@ known_false_positives = None at this time providing_technologies = ["AWS"] +[savedsearch://ESCU - Common Ransomware Extensions - 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"] + + +[savedsearch://ESCU - Abnormally High AWS Instances Terminated by User - 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 terminated by a particular user. Since we want to detect a high number of instances terminated within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances terminated by a particular user, as well as the average- and standard-deviation values. Assign a `threshold_value` in the search. Try starting with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier to 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. We then filter out outliers with a value of 1 and show only those instance-termination events that happened within the previous 10 minutes. +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. +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 with your AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify whether this search alerted on a human user. +providing_technologies = ["AWS"] + + [savedsearch://ESCU - Extended Period Without Successful Netbackup Backups - Rule] type = detection asset_type = Endpoint @@ -2860,15 +2856,14 @@ earliest_time_offset = 3600 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 - 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 - Reg.exe Manipulating Windows Services Registry Keys - Rule] @@ -2938,35 +2933,17 @@ 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. -known_false_positives = None at this time -providing_technologies = ["AWS"] -earliest_time_offset = 14400 -latest_time_offset = 0 - - -[savedsearch://ESCU - Malicious PowerShell Process - Encoded Command - Rule] +[savedsearch://ESCU - Execution of File with Multiple Extensions - Rule] type = detection asset_type = Endpoint -confidence = medium -explanation = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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 = System administrators may use this option, but it's not common. +confidence = high +explanation = This search uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. +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. +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"] -[savedsearch://ESCU - Add Prohibited Processes to Enterprise Security] -type = support -explanation = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. -how_to_implement = This search should be run on each new install of ESCU. -known_false_positives = None at this time -providing_technologies = ["Splunk Enterprise Security"] - - [savedsearch://ESCU - Monitor Email For Brand Abuse - Rule] type = detection asset_type = Endpoint @@ -2986,15 +2963,12 @@ 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 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"] +[savedsearch://ESCU - Add Prohibited Processes to Enterprise Security] +type = support +explanation = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. +how_to_implement = This search should be run on each new install of ESCU. +known_false_positives = None at this time +providing_technologies = ["Splunk Enterprise Security"] [savedsearch://ESCU - Single Letter Process On Endpoint - Rule] @@ -3030,14 +3004,15 @@ known_false_positives = There are no known false positives. providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Apache"] -[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 - 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 - Monitor DNS For Brand Abuse - Rule] @@ -3102,12 +3077,23 @@ earliest_time_offset = 14400 latest_time_offset = 0 -[savedsearch://ESCU - Baseline of API Calls per User ARN] +[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 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. +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. +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. known_false_positives = None at this time -providing_technologies = ["AWS"] +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] [savedsearch://ESCU - Get EC2 Launch Details] @@ -3120,44 +3106,33 @@ earliest_time_offset = 7200 latest_time_offset = 0 -[savedsearch://ESCU - AWS Cross Account Activity From Previously Unseen Account - 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. -providing_technologies = ["AWS"] - - -[savedsearch://ESCU - Email Attachments With Lots Of Spaces - Rule] +[savedsearch://ESCU - Attempt To Add Certificate To Untrusted Store - Rule] type = detection asset_type = Endpoint confidence = high -explanation = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. -how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +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 - 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 = ["Microsoft Exchange"] +providing_technologies = ["Netbackup"] +earliest_time_offset = 604800 +latest_time_offset = 0 + + +[savedsearch://ESCU - Baseline of blocked outbound traffic from AWS] +type = support +explanation = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. +known_false_positives = None at this time +providing_technologies = ["AWS"] [savedsearch://ESCU - Previously seen users in CloudTrail] @@ -3221,14 +3196,6 @@ 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. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro"] - - [savedsearch://ESCU - Detect Spike in Security Group Activity - Rule] type = detection asset_type = AWS Instance @@ -3360,6 +3327,16 @@ known_false_positives = There may be legitimate reasons for system administrator providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +[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 - Attempt To Stop Security Service - Rule] type = detection asset_type = Endpoint @@ -3371,6 +3348,17 @@ known_false_positives = None identified. Attempts to disable security-related se providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +[savedsearch://ESCU - WMI Permanent Event Subscription - 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 Windows event ID 5861. +how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. +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 - 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. @@ -3390,17 +3378,6 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[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 - Registry Keys for Creating SHIM Databases - Rule] type = detection asset_type = Endpoint @@ -3412,6 +3389,17 @@ known_false_positives = There are many legitimate applications that leverage shi providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +[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 - Remote Process Instantiation via WMI - Rule] type = detection asset_type = Endpoint @@ -3442,6 +3430,17 @@ known_false_positives = It's possible that a user has legitimately deleted a net providing_technologies = ["AWS"] +[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 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"] + + [savedsearch://ESCU - EC2 Instance Started With Previously Unseen AMI - Rule] type = detection asset_type = AWS Instance @@ -3472,14 +3471,14 @@ 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] +[savedsearch://ESCU - Malicious PowerShell Process - Encoded Command - 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. +confidence = medium +explanation = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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 = System administrators may use this option, but it's not common. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -3493,35 +3492,36 @@ known_false_positives = Some legitimate applications start with long command-lin providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Baseline of blocked outbound traffic from AWS] -type = support -explanation = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. +[savedsearch://ESCU - Email Attachments With Lots Of Spaces - Rule] +type = detection +asset_type = Endpoint +confidence = high +explanation = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. +how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. +annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} known_false_positives = None at this time -providing_technologies = ["AWS"] +providing_technologies = ["Microsoft Exchange"] -[savedsearch://ESCU - AWS Cloud Provisioning From Previously Unseen IP Address - Rule] +[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 - EC2 Instance Started With Previously Unseen Instance Type - 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. +explanation = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. 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. +known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. providing_technologies = ["AWS"] -[savedsearch://ESCU - Identify Systems Receiving Remote Desktop Traffic] -type = support -explanation = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. -how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro"] - - [savedsearch://ESCU - Get Risk Modifiers For Endpoint] type = contextual explanation = none diff --git a/src/default/savedsearches.conf b/src/default/savedsearches.conf index 362074a3b2..f8f38a1ebe 100644 --- a/src/default/savedsearches.conf +++ b/src/default/savedsearches.conf @@ -13,7 +13,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Indicator Removal o action.escu.known_false_positives = It is possible that these logs may be legitimately cleared by Administrators. action.escu.search_type = detection action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Ransomware", "Windows Log Manipulation"] +action.escu.analytic_story = ["Windows Log Manipulation", "Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Windows Event Log Cleared action.notable = 1 @@ -22,7 +22,7 @@ action.notable.param.rule_description = The Event Logging System has been cleare action.notable.param.rule_title = Windows Event Log Cleared 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 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 Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -47,54 +47,29 @@ schedule_window = auto is_visible = false search = ((sourcetype=*wineventlog:security) AND (EventCode=1102 OR EventCode=1100)) OR ((sourcetype=wineventlog:system OR sourcetype=XmlWinEventlog:System) AND EventCode=104) | stats count min(_time) as firstTime max(_time) as lastTime by EventCode sourcetype host | `ctime(firstTime)` | `ctime(lastTime)` | rename host as dest -[ESCU - Detect Activity Related to Pass the Hash Attacks - Rule] +[ESCU - Get Process Information For Port Activity] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2016-09-13 -action.escu.modification_date = 2017-09-18 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2017-06-25 +action.escu.modification_date = 2017-09-10 action.escu.channel = ESCU -action.escu.confidence = low -action.escu.eli5 = To detect pass the hash activity, we look at all events with event code 4624 or 4625 that specify a logon type 3 (network logons). We are looking for the NtLmSsP account, with a key length set to 0. These indicate lower level protocols that are typically used through Pass the Hash (WMI, SMB, etc.). The search also filters out events with an account name of 'Anonymous' to help reduce false positives. -action.escu.how_to_implement = To successfully implement this search, you must ingest your Windows Security Event logs and leverage the TA for Windows to extract EventCode, Logon_Process, Logon_Type, Key_Length and Account_Name fields from these events. -action.escu.full_search_name = ESCU - Detect Activity Related to Pass the Hash Attacks - Rule -action.escu.mappings = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} -action.escu.known_false_positives = Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate. -action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Lateral Movement"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Activity Related to Pass the Hash Attacks -action.notable = 1 -action.notable.param.nes_fields = -action.notable.param.rule_description = This search looks for Authentication log events from the Windows Security Audit logs to detect potential attempts for Passing the Hash -action.notable.param.rule_title = Detect Activity Related to Pass the Hash -action.notable.param.security_domain = access -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 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 = 10 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = ComputerName -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search looks for specific authentication events from the Windows Security Event logs to detect potential attempts at using the Pass-the-Hash technique. -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 that associates processes with network events. +action.escu.data_models = ["Application_State"] +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 = ["Command and Control", "SamSam Ransomware", "Ransomware", "Use of Cleartext Protocols", "Prohibited Traffic Allowed or Protocol Mismatch"] +action.escu.fields_required = ["dest_port", "src"] +action.escu.earliest_time_offset = 7200 +action.escu.latest_time_offset = 7200 +description = This search will return information about the process associated with observed network traffic to a specific destination port from a specific host. disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype="WinEventLog:Security" (EventCode=4624 OR EventCode=4625) Logon_Process=NtLmSsp Logon_Type=3 Account_Name !="ANONYMOUS LOGON" Key_Length=0 | table _time Source_Network_Address Account_Name Account_Domain ComputerName Workstation_Name +search = | from datamodel Application_State.Ports | search dest_port={dest_port} dest={src} | table dest dest_port process process_name [ESCU - Create or delete hidden shares using net.exe - Rule] action.escu = 0 @@ -160,7 +135,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Persistence"], "kil action.escu.known_false_positives = None at the moment action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Suspicious Windows Registry Activities", "Windows Defense Evasion Tactics"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Windows Defense Evasion Tactics", "Suspicious Windows Registry Activities"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Reg.exe used to hide files/directories via registry keys action.notable = 1 @@ -169,7 +144,7 @@ action.notable.param.rule_description = Regedit.exe is used by attackers to hide action.notable.param.rule_title = Regedit.exe used to hide a file/directory 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 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 @@ -194,29 +169,153 @@ schedule_window = auto is_visible = false search = sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational add Hidden REG_DWORD | search process=*reg.exe cmdline=*add* cmdline=*Hidden* cmdline=*REG_DWORD* | regex cmdline= "(/d\s+2)" | stats count values(cmdline) min(_time) as firstTime max(_time) as lastTime by dest process | `ctime(firstTime)` |`ctime(lastTime)` -[ESCU - Get Process Information For Port Activity] +[ESCU - Detect Activity Related to Pass the Hash Attacks - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-25 -action.escu.modification_date = 2017-09-10 +action.escu.creation_date = 2016-09-13 +action.escu.modification_date = 2017-09-18 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = To successfully implement this search you must be ingesting endpoint data that associates processes with network events. -action.escu.data_models = ["Application_State"] -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 = ["SamSam Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch", "Use of Cleartext Protocols", "Ransomware", "Command and Control"] -action.escu.fields_required = ["dest_port", "src"] -action.escu.earliest_time_offset = 7200 -action.escu.latest_time_offset = 7200 -description = This search will return information about the process associated with observed network traffic to a specific destination port from a specific host. +action.escu.confidence = low +action.escu.eli5 = To detect pass the hash activity, we look at all events with event code 4624 or 4625 that specify a logon type 3 (network logons). We are looking for the NtLmSsP account, with a key length set to 0. These indicate lower level protocols that are typically used through Pass the Hash (WMI, SMB, etc.). The search also filters out events with an account name of 'Anonymous' to help reduce false positives. +action.escu.how_to_implement = To successfully implement this search, you must ingest your Windows Security Event logs and leverage the TA for Windows to extract EventCode, Logon_Process, Logon_Type, Key_Length and Account_Name fields from these events. +action.escu.full_search_name = ESCU - Detect Activity Related to Pass the Hash Attacks - Rule +action.escu.mappings = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +action.escu.known_false_positives = Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate. +action.escu.search_type = detection +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Lateral Movement"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect Activity Related to Pass the Hash Attacks +action.notable = 1 +action.notable.param.nes_fields = +action.notable.param.rule_description = This search looks for Authentication log events from the Windows Security Audit logs to detect potential attempts for Passing the Hash +action.notable.param.rule_title = Detect Activity Related to Pass the Hash +action.notable.param.security_domain = access +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 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 = 10 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = ComputerName +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = This search looks for specific authentication events from the Windows Security Event logs to detect potential attempts at using the Pass-the-Hash technique. +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 = | from datamodel Application_State.Ports | search dest_port={dest_port} dest={src} | table dest dest_port process process_name +search = sourcetype="WinEventLog:Security" (EventCode=4624 OR EventCode=4625) Logon_Process=NtLmSsp Logon_Type=3 Account_Name !="ANONYMOUS LOGON" Key_Length=0 | table _time Source_Network_Address Account_Name Account_Domain ComputerName Workstation_Name + +[ESCU - Detect Long DNS TXT Record Response - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-06-18 +action.escu.modification_date = 2017-09-18 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. +action.escu.how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. +action.escu.data_models = ["Network_Resolution"] +action.escu.full_search_name = ESCU - Detect Long DNS TXT Record Response - Rule +action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} +action.escu.known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. +action.escu.search_type = detection +action.escu.providing_technologies = ["Splunk Stream", "Bro"] +action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect Long DNS TXT Record Response +action.notable = 1 +action.notable.param.nes_fields = src, query +action.notable.param.rule_description = A DNS TXT record response of over 100 characters was detected. +action.notable.param.rule_title = Long DNS TXT Record Response +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.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 = 70 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = src +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = This search is used to detect attempts to use DNS tunneling, by calculating the length of responses to DNS TXT queries. Endpoints using DNS as a method of transmission for data exfiltration, command and control, or evasion of security controls can often be detected by noting unusually large volumes of DNS traffic. +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_Resolution where DNS.message_type=response AND DNS.record_type=TXT by DNS.src DNS.dest DNS.answer DNS.record_type | `drop_dm_object_name("DNS")` | eval anslen=len(answer) | search anslen>100 | `ctime(firstTime)` | `ctime(lastTime)` | rename src as "Source IP", dest as "Destination IP", answer as "DNS Answer" anslen as "Answer Length" record_type as "DNS Record Type" firstTime as "First Time" lastTime as "Last Time" count as Count | table "Source IP" "Destination IP" "DNS Answer" "DNS Record Type" "Answer Length" Count "First Time" "Last Time" + +[ESCU - Web Fraud - Password Sharing Across Accounts - Rule] +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.channel = webfraud +action.escu.confidence = medium +action.escu.eli5 = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 +action.escu.how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. +action.escu.full_search_name = ESCU - Web Fraud - Password Sharing Across Accounts - Rule +action.escu.mappings = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. +action.escu.search_type = detection +action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] +action.escu.analytic_story = ["Web Fraud Detection"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Web Fraud - Password Sharing Across Accounts +action.notable = 1 +action.notable.param.nes_fields = user +action.notable.param.rule_description = This search is used to identify user accounts, $user$, that share common passwords +action.notable.param.rule_title = Web Fraud Detection: Password Sharing Across Accounts +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 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 = user +action.risk.param._risk_object_type = other +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 = 3600s +cron_schedule = 0 * * * * +description = This search is used to identify user accounts that share a common password. +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=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 - TOR Traffic - Rule] action.escu = 0 @@ -234,7 +333,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 = ["Prohibited Traffic Allowed or Protocol Mismatch", "Ransomware", "Command and Control"] +action.escu.analytic_story = ["Command and Control", "Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch"] action.correlationsearch.enabled = 1 action.correlationsearch.label = TOR Traffic action.notable = 1 @@ -243,7 +342,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 +383,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 +392,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 @@ -364,51 +463,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. -disabled=true -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 - -[ESCU - Identify Systems Creating Remote Desktop Traffic] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-04-24 -action.escu.modification_date = 2017-09-15 -action.escu.channel = ESCU -action.escu.eli5 = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. -action.escu.how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Identify Systems Creating Remote Desktop Traffic -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 = ["Lateral Movement"] -description = This search counts the numbers of times the system has generated remote desktop traffic. -dispatch.earliest_time = -30d@d +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 = | tstats `summariesonly` count from datamodel=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.src | `drop_dm_object_name("All_Traffic")` | sort - count +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 @@ -432,62 +534,44 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail `securityGroupAPIs` | 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 security_group_activity_baseline | stats count -[ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] +[ESCU - Unsuccessful Netbackup backups - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-26 -action.escu.modification_date = 2018-05-07 -action.escu.asset_at_risk = AWS Instance +action.escu.creation_date = 2017-06-15 +action.escu.modification_date = 2017-09-12 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ -\ -1. Counts the number of blocked outbound connections by each source IP\ -\ -1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ -\ -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 `numberOfBlockedConnections` as `latestCount`.\ -\ -1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. -action.escu.full_search_name = ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule -action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} -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.confidence = high +action.escu.eli5 = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. +action.escu.how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. +action.escu.full_search_name = ESCU - Unsuccessful Netbackup backups - Rule +action.escu.mappings = {"cis20": ["CIS 10"], "nist": ["PR.IP"]} +action.escu.known_false_positives = None identified action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS Traffic", "Command and Control", "AWS Network ACL Activity"] +action.escu.providing_technologies = ["Netbackup"] +action.escu.analytic_story = ["Monitor Backup Solution"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Spike in blocked Outbound Traffic from your AWS +action.correlationsearch.label = Unsuccessful Netbackup backups action.notable = 1 -action.notable.param.nes_fields = src_ip -action.notable.param.rule_description = A spike in the blocked outbound connection is detected from source $src_ip$. -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 ACL Details from ID\n - ESCU - AWS Network Interface details via resourceId\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 +action.notable.param.rule_description = The system $dest$ attempted a backup but encountered an error. +action.notable.param.rule_title = Failed backup attempt by $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 Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - All backup logs for 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 = 30 +action.risk.param._risk_score = 10 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 will detect spike in blocked outbound network connections originating from within your AWS environment. It will also update the cache file that factors in the latest data. -dispatch.earliest_time = -70m@m +alert.suppress.fields = dest +alert.suppress.period = 86400s +cron_schedule = 0 7 * * * +description = This search gives you the hosts where a backup was attempted and then failed. +dispatch.earliest_time = -24h@h dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -497,7 +581,7 @@ quantity = 0 realtime_schedule = 0 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) [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) | stats count as numberOfBlockedConnections by src_ip | inputlookup baseline_blocked_outbound_connections append=t | fields - latestCount | stats values(*) as * by src_ip | rename numberOfBlockedConnections as latestCount | eval newAvgBlockedConnections=avgBlockedConnections + (latestCount-avgBlockedConnections)/720 | eval newStdevBlockedConnections=sqrt(((pow(stdevBlockedConnections, 2)*719 + (latestCount-newAvgBlockedConnections)*(latestCount-avgBlockedConnections))/720)) | eval avgBlockedConnections=coalesce(newAvgBlockedConnections, avgBlockedConnections), stdevBlockedConnections=coalesce(newStdevBlockedConnections, stdevBlockedConnections), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) | table src_ip, latestCount, numDataPoints, avgBlockedConnections, stdevBlockedConnections | outputlookup baseline_blocked_outbound_connections | eval dataPointThreshold = 5, deviationThreshold = 3 | eval isSpike=if((latestCount > avgBlockedConnections+deviationThreshold*stdevBlockedConnections) AND numDataPoints > dataPointThreshold, 1, 0) | where isSpike=1 | table src_ip] | stats values(dest_ip) as "Blocked Destination IPs", values(interface_id) as "resourceId" count as numberOfBlockedConnections, dc(dest_ip) as uniqueDestConnections by src_ip +search = sourcetype="netbackup_logs" | stats latest(_time) as latestTime by COMPUTERNAME, MESSAGE | search MESSAGE="An error occurred, failed to backup." | `ctime(latestTime)` | rename COMPUTERNAME as dest, MESSAGE as signature | table latestTime, dest, signature [ESCU - Detect processes used for System Network Configuration Discovery - Rule] action.escu = 0 @@ -549,43 +633,43 @@ 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 by Processes.dest Processes.process_name Processes.user _time | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name(Processes)` | search `system_network_configuration_discovery_tools` | transaction dest maxpause=5m |where eventcount>=5 | table firstTime lastTime dest user process_name process parent_process eventcount -[ESCU - WMI Permanent Event Subscription - Rule] +[ESCU - EC2 Instance Started In Previously Unseen Region - 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.creation_date = 2018-02-01 +action.escu.modification_date = 2018-02-23 +action.escu.asset_at_risk = AWS Instance 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 Windows event ID 5861. -action.escu.how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. -action.escu.full_search_name = ESCU - WMI Permanent Event Subscription - 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.eli5 = In this search, we query CloudTrail logs to look for events that indicate that an instance was started in a particular region. Using the `previously_seen_aws_regions.csv` lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The `eval` and `if` functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with "Instance Started in a New Region". However, this region will be added to the list of `previously_seen_aws_regions.csv`. Please maintain `previously_seen_aws_regions.csv` +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 Regions" support search only once to create of baseline of previously seen regions. +action.escu.full_search_name = ESCU - EC2 Instance Started In Previously Unseen Region - Rule +action.escu.mappings = {"mitre_attack": ["Defense Evasion"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 12"], "nist": ["DE.DP", "DE.AE"]} +action.escu.known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Suspicious WMI Use"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = WMI Permanent Event Subscription +action.correlationsearch.label = EC2 Instance Started In Previously Unseen Region action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = This search looks for the creation of a permanent WMI event subscription via Windows event logs. -action.notable.param.rule_title = WMI Event Subscription Detected on $dest$ -action.notable.param.security_domain = endpoint +action.notable.param.nes_fields = awsRegion +action.notable.param.rule_description = An AWS instance is started in a new, previously unseen, region +action.notable.param.rule_title = AWS instance is started in a new region +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 Process Info\n - ESCU - Get Sysmon WMI Activity for 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 EC2 Instance Details by instanceId\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 - ESCU - Investigate AWS activities via region name\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._risk_object = awsRegion +action.risk.param._risk_object_type = other +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 = 28800s +alert.suppress.fields = awsRegion +alert.suppress.period = 14400s cron_schedule = 0 * * * * -description = This search looks for the creation of WMI permanent event subscriptions. +description = This search looks for CloudTrail events where an instance is started in a particular region in the last one hour and then compares it to a lookup file of previously seen regions where an instance was started dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -596,7 +680,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype="wineventlog:microsoft-windows-wmi-activity/operational" EventCode=5861 Binding | rex field=Message "Consumer =\s+(?[^;|^$]+)" | search consumer!="NTEventLogEventConsumer=\"SCM Event Log Consumer\"" | stats count min(_time) as firstTime max(_time) as lastTime by ComputerName, consumer, Message | `ctime(firstTime)`| `ctime(lastTime)` | rename ComputerName as dest +search = sourcetype=aws:cloudtrail earliest=-1h StartInstances | stats earliest(_time) as earliest latest(_time) as latest by awsRegion| inputlookup append=t previously_seen_aws_regions.csv | stats min(earliest) as earliest max(latest) as latest by awsRegion | outputlookup previously_seen_aws_regions.csv | eval regionStatus=if(earliest >= relative_time(now(), "-1d@d"), "Instance Started in a New Region","Previously Seen Region") | convert ctime(earliest) ctime(latest) | where regionStatus="Instance Started in a New Region" [ESCU - Get Outbound Emails to Hidden Cobra Threat Actors] action.escu = 0 @@ -808,7 +892,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 @@ -817,7 +901,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 @@ -914,43 +998,43 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) EventCode=13 object_path=*\\Explorer\\FileExts* process!=Explorer.exe AND process!=OpenWith.exe | stats count min(_time) as firstTime max(_time) as lastTime by dest, process, object_path, Details | rename Details as value | `ctime(firstTime)`| `ctime(lastTime)` -[ESCU - Detect S3 access from a new IP - Rule] +[ESCU - EC2 Instance Modified With Previously Unseen User - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-06-25 -action.escu.modification_date = 2018-06-28 -action.escu.asset_at_risk = S3 Bucket +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 = low -action.escu.eli5 = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource -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 S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. -action.escu.full_search_name = ESCU - Detect S3 access from a new IP - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -action.escu.known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour +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 = ["Suspicious AWS S3 Activities"] +action.escu.analytic_story = ["Unusual AWS EC2 Modifications"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect S3 access from a new IP +action.correlationsearch.label = EC2 Instance Modified With Previously Unseen User action.notable = 1 -action.notable.param.nes_fields = bucket_name, src_ip -action.notable.param.rule_description = A remote IP, $src_ip$, has made a successful connection with an S3 $bucket_name$. -action.notable.param.rule_title = S3 bucket $bucketName$ was accessed by a new $src_ip$ -action.notable.param.security_domain = network -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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\n"} +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 = src_ip +action.risk.param._risk_object = dest action.risk.param._risk_object_type = system -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 = bucket_name, src_ip -alert.suppress.period = 86400s -cron_schedule = 5 * * * * -description = This search looks at S3 bucket-access logs and detects new or previously unseen remote IP addresses that have successfully accessed an S3 bucket. +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 @@ -961,7 +1045,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:s3:accesslogs http_status=200 [search sourcetype=aws:s3:accesslogs http_status=200 | stats earliest(_time) as firstTime latest(_time) as lastTime by bucket_name remote_ip | inputlookup append=t previously_seen_S3_access_from_remote_ip.csv | stats min(firstTime) as firstTime, max(lastTime) as lastTime by bucket_name remote_ip | outputlookup previously_seen_S3_access_from_remote_ip.csv | eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newIP=1 | convert ctime(firstTime) ctime(lastTime) | table bucket_name remote_ip]| iplocation remote_ip |rename remote_ip as src_ip | table _time bucket_name src_ip City Country operation request_uri +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 Desktop Process Running On System - Rule] action.escu = 0 @@ -979,7 +1063,7 @@ action.escu.mappings = {"mitre_attack": ["Lateral Movement", "Remote Desktop Pro 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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Hidden Cobra Malware", "Lateral Movement"] +action.escu.analytic_story = ["Lateral Movement", "Hidden Cobra Malware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Remote Desktop Process Running On System action.notable = 1 @@ -988,7 +1072,7 @@ action.notable.param.rule_description = The system $dest$ is running the remote action.notable.param.rule_title = Remote Desktop Process Running 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.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 Outbound Emails to Hidden Cobra Threat Actors\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 @@ -1120,8 +1204,8 @@ action.escu.modification_date = 2019-02-14 action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = Using a lookup discover_dns_records generated by support search "Discover DNS records" we check previous network traffic and make sure the responses have not changed. -action.escu.how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that the discover_dns_record lookup table be populated by the included support search "Discover DNS record". \ +action.escu.eli5 = Using a lookup `discover_dns_records` generated by support search "Discover DNS records" we check previous network traffic and make sure the responses have not changed. +action.escu.how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the `Network_Resolution` data model. It also requires that the `discover_dns_record` lookup table be populated by the included support search "Discover DNS record". \ \ **Splunk>Phantom Playbook Integration**\ \ @@ -1226,28 +1310,55 @@ schedule_window = auto is_visible = false search = sourcetype=stream:http http_content_type=text* | rex field=cookie "form_key=(?\w+)" | streamstats window=2 current=1 range(_time) as TimeDelta by session_id | where TimeDelta>0 |stats count stdev(TimeDelta) as ClickSpeedStdDev avg(TimeDelta) as ClickSpeedAvg by session_id | where count>5 AND (ClickSpeedStdDev<.5 OR ClickSpeedAvg<.5) -[ESCU - Discover DNS records] +[ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2019-02-14 -action.escu.modification_date = 2019-02-14 +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.eli5 = Discover the DNS records and their answers for domains owned by the company using network traffic events. The discovered events are exported as a lookup named `discovered_dns_records.csv` -action.escu.how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. Also make sure that the cim_corporate_web_domains and cim_corporate_email_domains lookups are populated with the domains owned by your corporation -action.escu.data_models = ["Network_Resolution"] -action.escu.full_search_name = ESCU - Discover DNS records -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 = ["DNS Hijacking"] -description = The search takes corporate and common cloud provider domains configured under cim_corporate_email_domains.csv, cim_corporate_web_domains.csv, and cloud_domains.csv and finds their responses across the last 30 days from data in the Network Traffic datamodel, then stores the output under the discovered_dns_records.csv lookup -dispatch.earliest_time = -30d@d +action.escu.confidence = medium +action.escu.eli5 = This search returns the number of times a URL associated with this type of JexBoss probe is observed. +action.escu.how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. +action.escu.data_models = ["Web"] +action.escu.full_search_name = ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule +action.escu.mappings = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} +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 = ["JBoss Vulnerability", "SamSam Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect attackers scanning for vulnerable JBoss servers +action.notable = 1 +action.notable.param.nes_fields = +action.notable.param.rule_description = This search looks for specific GET/HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. +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 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 = 20 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest,url +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = This search looks for specific GET or HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. JexBoss is described as the exploit tool of choice for this malicious activity. +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 = | inputlookup cim_corporate_email_domains.csv | inputlookup append=T cim_corporate_web_domains.csv | inputlookup append=T cim_cloud_domains.csv | eval domain = trim(replace(domain, "\*", "")) | join domain [|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as answer from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!="unknown" DNS.answer!="" by DNS.query | rename DNS.query as query | where query!="unknown" | rex field=query "(?\w+\.\w+?)(?:$|/)"] | makemv delim=" " answer | makemv delim=" " type | sort -count | table count,domain,type,query,answer | outputlookup createinapp=true discovered_dns_records.csv +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 @@ -1265,7 +1376,7 @@ action.escu.mappings = {"mitre_attack": ["Commonly Used Port"], "kill_chain_phas 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 = ["Emotet Malware (TA18-201A)", "Hidden Cobra Malware", "Ransomware", "DHS Report TA18-074A"] +action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "Ransomware", "Hidden Cobra Malware", "DHS Report TA18-074A"] action.correlationsearch.enabled = 1 action.correlationsearch.label = SMB Traffic Spike action.notable = 1 @@ -1299,6 +1410,57 @@ 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 - AWS Cloud Provisioning From Previously Unseen IP Address - Rule] +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.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 +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 + [ESCU - Samsam Test File Write - Rule] action.escu = 0 action.escu.enabled = 1 @@ -1349,6 +1511,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_name) as file_name from datamodel=Endpoint.Filesystem where Filesystem.file_path=*\\windows\\system32\\test.txt by Filesystem.file_path | `drop_dm_object_name(Filesystem)` | `ctime(lastTime)` | `ctime(firstTime)` +[ESCU - Previously Seen AWS Cross Account Activity] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-06-04 +action.escu.modification_date = 2018-06-04 +action.escu.channel = ESCU +action.escu.eli5 = In this support search, we look for **AssumeRole** events where the requesting account is different from the requested account. The first and last times these events are seen are written to 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. Validate the user name entries in `previously_seen_aws_cross_account_activity.csv`, a lookup file created by this support search. +action.escu.full_search_name = ESCU - Previously Seen AWS Cross Account Activity +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Cross Account Activity"] +description = This search looks for **AssumeRole** events where the requesting account differs from the requested account, then writes these relationships to a lookup file. +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 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 - Investigate AWS activities via region name] action.escu = 0 action.escu.enabled = 1 @@ -1361,7 +1545,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 @@ -1372,29 +1556,6 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:cloudtrail awsRegion={awsRegion}| rename requestParameters.instancesSet.items{}.instanceId as instanceId| stats values(eventName) by userName instanceId -[ESCU - Get EC2 Instance Details by instanceId] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-02-12 -action.escu.modification_date = 2018-02-12 -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 = ["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 -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 - [ESCU - AWS Network Access Control List Created with All Open Ports - Rule] action.escu = 0 action.escu.enabled = 1 @@ -1493,56 +1654,6 @@ 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] -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 = 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 = ["Palo Alto Firewall", "Bro", "Splunk Stream"] -action.escu.analytic_story = ["Prohibited Traffic Allowed or Protocol Mismatch", "Ransomware", "Command and Control"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Prohibited Network Traffic Allowed -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.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.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 = 40 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -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 -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.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 - Detect Unauthorized Assets by MAC address - Rule] action.escu = 0 action.escu.enabled = 1 @@ -1655,7 +1766,7 @@ 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", "Suspicious AWS Traffic", "Suspicious Command-Line Executions", "Splunk Enterprise Vulnerability", "Credential Dumping", "Suspicious MSHTA Activity", "DNS Amplification Attacks", "Monitor for Updates", "SamSam Ransomware", "Malicious PowerShell", "Asset Tracking", "Prohibited Traffic Allowed or Protocol Mismatch", "Suspicious AWS EC2 Activities", "Splunk Enterprise Vulnerability CVE-2018-11409", "Unusual AWS EC2 Modifications", "Emotet Malware (TA18-201A)", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Suspicious AWS S3 Activities", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Suspicious Emails", "AWS Cross Account Activity", "DNS Hijacking", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Windows Defense Evasion Tactics", "Dynamic DNS", "Host Redirection", "Monitor Backup Solution", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Monitor for Unauthorized Software", "Brand Monitoring", "Suspicious WMI Use", "Suspicious AWS Login Activities", "AWS Network ACL Activity", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "AWS User Monitoring", "Web Fraud Detection", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "SQL Injection", "ColdRoot MacOS RAT", "Collection and Staging", "Disabling Security Tools", "Data Protection"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "AWS Network ACL Activity", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Web Fraud Detection", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "JBoss Vulnerability", "Suspicious AWS S3 Activities", "Windows Defense Evasion Tactics", "Splunk Enterprise Vulnerability CVE-2018-11409", "Dynamic DNS", "Unusual Processes", "Brand Monitoring", "Suspicious AWS EC2 Activities", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "AWS Cross Account Activity", "Suspicious AWS Login Activities", "ColdRoot MacOS RAT", "Suspicious DNS Traffic", "Command and Control", "SamSam Ransomware", "DNS Amplification Attacks", "Router & Infrastructure Security", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Host Redirection", "Suspicious Emails", "Ransomware", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Suspicious AWS Traffic", "AWS User Monitoring", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "Unusual AWS EC2 Modifications", "Monitor Backup Solution", "DHS Report TA18-074A", "Use of Cleartext Protocols", "DNS Hijacking", "Prohibited Traffic Allowed or Protocol Mismatch"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 864000 action.escu.latest_time_offset = 86400 @@ -1678,7 +1789,7 @@ 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", "Suspicious Command-Line Executions", "Credential Dumping", "Suspicious MSHTA Activity", "SamSam Ransomware", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Windows Service Abuse", "Netsh Abuse", "Windows Defense Evasion Tactics", "Orangeworm Attack Group", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Collection and Staging", "Disabling Security Tools"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Credential Dumping", "Disabling Security Tools", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Windows Defense Evasion Tactics", "Suspicious MSHTA Activity", "Windows Privilege Escalation", "SamSam Ransomware", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Ransomware", "Hidden Cobra Malware", "Windows File Extension and Association Abuse", "DHS Report TA18-074A"] action.escu.fields_required = ["process", "dest"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -1705,7 +1816,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 = ["Disabling Security Tools", "Netsh Abuse", "DHS Report TA18-074A"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Processes launching netsh action.notable = 1 @@ -1789,46 +1900,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 - Schtasks used for forcing a reboot - 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-11-03 +action.escu.modification_date = 2017-11-03 +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.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 = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["DNS Amplification Attacks"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Ransomware"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Large Volume of DNS ANY Queries +action.correlationsearch.label = Schtasks used for forcing a reboot 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.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.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 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.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 = 80 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 +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 @@ -1837,7 +1947,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 = (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 - Previously Seen EC2 Launches By User] action.escu = 0 @@ -1851,7 +1961,7 @@ action.escu.full_search_name = ESCU - Previously Seen EC2 Launches By User 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 EC2 Activities", "AWS Cryptomining"] +action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] description = This search builds a table of previously seen ARNs that have launched a EC2 instance. dispatch.earliest_time = -90d@d dispatch.latest_time = -10m@m @@ -1861,44 +1971,43 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | rename userIdentity.arn as arn | stats earliest(_time) as firstTime latest(_time) as lastTime by arn | outputlookup previously_seen_ec2_launches_by_user.csv | stats count -[ESCU - Detect Long DNS TXT Record Response - Rule] +[ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-18 -action.escu.modification_date = 2017-09-18 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-08-28 +action.escu.modification_date = 2018-08-28 +action.escu.asset_at_risk = Windows action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. -action.escu.how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. -action.escu.data_models = ["Network_Resolution"] -action.escu.full_search_name = ESCU - Detect Long DNS TXT Record Response - Rule -action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} -action.escu.known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. +action.escu.eli5 = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. +action.escu.how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. +action.escu.full_search_name = ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - 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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. action.escu.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Command and Control", "Suspicious DNS Traffic"] +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Credential Dumping"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Long DNS TXT Record Response +action.correlationsearch.label = Detect Mimikatz Via PowerShell And EventCode 4663 action.notable = 1 -action.notable.param.nes_fields = src, query -action.notable.param.rule_description = A DNS TXT record response of over 100 characters was detected. -action.notable.param.rule_title = Long DNS TXT Record Response -action.notable.param.security_domain = network +action.notable.param.nes_fields = user, dest +action.notable.param.rule_description = Possible attempt at credential dumping via PowerShell was detected on $dest$ by $user$. +action.notable.param.rule_title = Event ID 4663 Specifying PowerShell Reading From LSASS.exe Identified on $dest$. +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 DNS Server History for a host\n - ESCU - Get DNS traffic ratio\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 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 +action.risk.param._risk_object = dest action.risk.param._risk_object_type = system -action.risk.param._risk_score = 70 +action.risk.param._risk_score = 40 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = src +alert.suppress.fields = user, dest, process alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = This search is used to detect attempts to use DNS tunneling, by calculating the length of responses to DNS TXT queries. Endpoints using DNS as a method of transmission for data exfiltration, command and control, or evasion of security controls can often be detected by noting unusually large volumes of DNS traffic. +description = This search looks for PowerShell reading lsass memory consistent with credential dumping. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -1909,7 +2018,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_Resolution where DNS.message_type=response AND DNS.record_type=TXT by DNS.src DNS.dest DNS.answer DNS.record_type | `drop_dm_object_name("DNS")` | eval anslen=len(answer) | search anslen>100 | `ctime(firstTime)` | `ctime(lastTime)` | rename src as "Source IP", dest as "Destination IP", answer as "DNS Answer" anslen as "Answer Length" record_type as "DNS Record Type" firstTime as "First Time" lastTime as "Last Time" count as Count | table "Source IP" "Destination IP" "DNS Answer" "DNS Record Type" "Answer Length" Count "First Time" "Last Time" +search = sourcetype=wineventlog:security EventCode=4663 Process_Name=*powershell.exe Object_Name=*lsass.exe Access_Mask=0x10 | stats count min(_time) as firstTime max(_time) as lastTime by dest, Process_Name, Process_ID, Message | rename Process_Name as process | `ctime(firstTime)`| `ctime(lastTime)` [ESCU - Suspicious Reg.exe Process - Rule] action.escu = 0 @@ -1926,7 +2035,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 = ["Disabling Security Tools", "Windows Defense Evasion Tactics", "DHS Report TA18-074A"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Suspicious Reg.exe Process action.notable = 1 @@ -2010,27 +2119,55 @@ 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.parent_process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)`| search (process=*add* process=*Software\\Microsoft\\Powershell\\1\\ShellIds\\Microsoft.PowerShell* process=*ExecutionPolicy* process=*Unrestricted*) -[ESCU - Previously Seen AWS Cross Account Activity] +[ESCU - Prohibited Network Traffic Allowed - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-06-04 -action.escu.modification_date = 2018-06-04 +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.eli5 = In this support search, we look for **AssumeRole** events where the requesting account is different from the requested account. The first and last times these events are seen are written to 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. Validate the user name entries in `previously_seen_aws_cross_account_activity.csv`, a lookup file created by this support search. -action.escu.full_search_name = ESCU - Previously Seen AWS Cross Account Activity -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cross Account Activity"] -description = This search looks for **AssumeRole** events where the requesting account differs from the requested account, then writes these relationships to a lookup file. -dispatch.earliest_time = -30d@d +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.search_type = detection +action.escu.providing_technologies = ["Palo Alto Firewall", "Bro", "Splunk Stream"] +action.escu.analytic_story = ["Command and Control", "Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Prohibited Network Traffic Allowed +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.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\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 +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 = 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 +counttype = number of events +relation = greater than +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 | stats earliest(_time) as firstTime latest(_time) as lastTime by requestingAccountId, requestedAccountId | outputlookup previously_seen_aws_cross_account_activity | stats count +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 - Suspicious writes to windows Recycle Bin - Rule] action.escu = 0 @@ -2081,77 +2218,50 @@ 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)` -[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.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 - All backup logs for host] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-06-19 +action.escu.creation_date = 2017-08-16 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.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 = ["Netbackup"] -action.escu.analytic_story = ["Monitor Backup Solution"] +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Account Monitoring and Controls"] 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. +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 = | search sourcetype="netbackup_logs" dest={dest} +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 - 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.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 - Clients Connecting to Multiple DNS Servers - Rule] action.escu = 0 @@ -2169,7 +2279,7 @@ action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", action.escu.known_false_positives = It's possible that an enterprise has more than five DNS servers that are configured in a round-robin rotation. Please customize the search, as appropriate. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["DNS Hijacking", "Command and Control", "Suspicious DNS Traffic"] +action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control", "DNS Hijacking"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Clients Connecting to Multiple DNS Servers action.notable = 1 @@ -2178,7 +2288,7 @@ action.notable.param.rule_description = This search allows you to identify the e action.notable.param.rule_title = Client $src$ Connecting to Multiple DNS 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 - ESCU - Get DNS Server History for a host\n - ESCU - Get DNS traffic ratio\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 - 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 DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get History Of Email Sources\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 @@ -2203,6 +2313,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 @@ -2253,151 +2386,50 @@ 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] +[ESCU - Previously Seen AWS Regions] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-10-23 -action.escu.modification_date = 2018-10-23 +action.escu.creation_date = 2018-01-08 +action.escu.modification_date = 2018-01-08 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.eli5 = 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. +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 Regions 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 - Detect Prohibited Applications Spawning cmd.exe - Rule] -action.escu = 0 -action.escu.enabled = 1 -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 = 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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Suspicious Command-Line Executions", "Suspicious MSHTA Activity"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Prohibited Applications Spawning cmd.exe -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.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, parent_process -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. -dispatch.earliest_time = -70m@m +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] +description = This search looks for CloudTrail events where an AWS instance is started and creates a baseline of most recent time (latest) and the first time (earliest) we've seen this region in our dataset grouped by the value awsRegion for the last 30 days +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 = | 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_name Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] +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 - Detect USB device insertion - Rule] +[ESCU - Get User Information from Identity Table] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-03 -action.escu.modification_date = 2017-11-27 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = low -action.escu.eli5 = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device -action.escu.how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. -action.escu.data_models = ["Change_Analysis"] -action.escu.full_search_name = ESCU - Detect USB device insertion - Rule -action.escu.mappings = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} -action.escu.known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. -action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Data Protection"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect USB device insertion -action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = Read/Write attempt to a USB was detected on this host -action.notable.param.rule_title = Read/Write attempt to a USB 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 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"} -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.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = The search is used to detect hosts that generate Windows Event ID 4663 for successful attempts to write to or read from a removable storage and Event ID 4656 for failures, which occurs when a USB drive is plugged in. In this scenario we are querying the Change_Analysis data model to look for Windows Event ID 4656 or 4663 where the priority of the affected host is marked as high in the ES Assets and Identity Framework. -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 earliest(_time) AS earliest latest(_time) AS latest from datamodel=Change_Analysis where (nodename = All_Changes) All_Changes.result="Removable Storage device" (All_Changes.result_id=4663 OR All_Changes.result_id=4656) (All_Changes.src_priority=high) by All_Changes.dest | `drop_dm_object_name("All_Changes")`| `ctime(earliest)`| `ctime(latest)` - -[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.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 = You must be ingesting your backup logs. -action.escu.full_search_name = ESCU - Get Backup Logs For Endpoint +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 = ["Netbackup"] -action.escu.analytic_story = ["SamSam Ransomware", "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. +action.escu.providing_technologies = ["Splunk Enterprise Security"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "AWS Network ACL Activity", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "JBoss Vulnerability", "Suspicious AWS S3 Activities", "Windows Defense Evasion Tactics", "Dynamic DNS", "Unusual Processes", "Brand Monitoring", "Suspicious AWS EC2 Activities", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "Suspicious AWS Login Activities", "ColdRoot MacOS RAT", "Suspicious DNS Traffic", "Command and Control", "SamSam Ransomware", "Router & Infrastructure Security", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Host Redirection", "Suspicious Emails", "Ransomware", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "DHS Report TA18-074A", "Use of Cleartext Protocols", "DNS Hijacking"] +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 = | search sourcetype="netbackup_logs" COMPUTERNAME={dest} | rename COMPUTERNAME as dest, MESSAGE as signature | table _time, dest, signature +search = | `identities` | search identity={user} | table _time, identity, first, last, email, category, watchlist [ESCU - Get DNS Server History for a host] action.escu = 0 @@ -2411,7 +2443,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 = ["DNS Hijacking", "Dynamic DNS", "Host Redirection", "Command and Control", "Brand Monitoring", "Suspicious DNS Traffic", "Data Protection"] +action.escu.analytic_story = ["Dynamic DNS", "Brand Monitoring", "Suspicious DNS Traffic", "Command and Control", "Host Redirection", "Data Protection", "DNS Hijacking"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -2472,54 +2504,27 @@ schedule_window = auto is_visible = false search = | from datamodel Alerts.Alerts | search app=osquery:results (name=pack_osx-attacks_OSX_ColdRoot_RAT_Launchd OR name=pack_osx-attacks_OSX_ColdRoot_RAT_Files) | rename columns.path as path | bucket _time span=30s | stats count(path) by _time, host, user, path -[ESCU - Unsuccessful Netbackup backups - Rule] +[ESCU - Previously Seen EC2 Instance Types] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-15 -action.escu.modification_date = 2017-09-12 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-03-08 +action.escu.modification_date = 2018-03-08 action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. -action.escu.how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. -action.escu.full_search_name = ESCU - Unsuccessful Netbackup backups - Rule -action.escu.mappings = {"cis20": ["CIS 10"], "nist": ["PR.IP"]} -action.escu.known_false_positives = None identified -action.escu.search_type = detection -action.escu.providing_technologies = ["Netbackup"] -action.escu.analytic_story = ["Monitor Backup Solution"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Unsuccessful Netbackup backups -action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = The system $dest$ attempted a backup but encountered an error. -action.notable.param.rule_title = Failed backup attempt by $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 Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - All backup logs 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 = 10 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest -alert.suppress.period = 86400s -cron_schedule = 0 7 * * * -description = This search gives you the hosts where a backup was attempted and then failed. -dispatch.earliest_time = -24h@h +action.escu.eli5 = In this support search, we create a table of the earliest and latest time that a specific EC2 instance type has been seen. The instanceType request field is not required and defaults to m1.small, so any time this field is null, the search defaults the field to m1.small. This table is then outputted to a csv 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 EC2 Instance Types +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Cryptomining"] +description = This search builds a table of previously seen EC2 instance types +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 = sourcetype="netbackup_logs" | stats latest(_time) as latestTime by COMPUTERNAME, MESSAGE | search MESSAGE="An error occurred, failed to backup." | `ctime(latestTime)` | rename COMPUTERNAME as dest, MESSAGE as signature | table latestTime, dest, signature +search = sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | rename requestParameters.instanceType as instanceType | fillnull value="m1.small" instanceType | stats earliest(_time) as earliest latest(_time) as latest by instanceType | outputlookup previously_seen_ec2_instance_types.csv | stats count [ESCU - Remote Registry Key modifications - Rule] action.escu = 0 @@ -2537,7 +2542,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", "Suspicious Windows Registry Activities", "Lateral Movement", "Windows Defense Evasion Tactics"] +action.escu.analytic_story = ["Lateral Movement", "Windows Persistence Techniques", "Windows Defense Evasion Tactics", "Suspicious Windows Registry Activities"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Remote Registry Key modifications action.notable = 1 @@ -2546,7 +2551,7 @@ action.notable.param.rule_description = A registry key was modified remotely usi action.notable.param.rule_title = Remote Registry Key Modification detection 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 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 @@ -2571,44 +2576,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="\\\\*" by Registry.dest , Registry.status, Registry.user | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name(Registry)` -[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 @@ -2618,7 +2624,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 - Get Notable Info] action.escu = 0 @@ -2632,7 +2638,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious AWS Traffic", "Suspicious Command-Line Executions", "Splunk Enterprise Vulnerability", "Credential Dumping", "DNS Amplification Attacks", "Monitor for Updates", "Malicious PowerShell", "Asset Tracking", "Suspicious AWS EC2 Activities", "Splunk Enterprise Vulnerability CVE-2018-11409", "Emotet Malware (TA18-201A)", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Suspicious AWS S3 Activities", "Hidden Cobra Malware", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Windows Defense Evasion Tactics", "Dynamic DNS", "Host Redirection", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Brand Monitoring", "Suspicious WMI Use", "Suspicious AWS Login Activities", "AWS Network ACL Activity", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "AWS User Monitoring", "Web Fraud Detection", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "SQL Injection", "Collection and Staging", "Disabling Security Tools", "Data Protection"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "AWS Network ACL Activity", "Emotet Malware (TA18-201A)", "Web Fraud Detection", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "JBoss Vulnerability", "Suspicious AWS S3 Activities", "Windows Defense Evasion Tactics", "Splunk Enterprise Vulnerability CVE-2018-11409", "Dynamic DNS", "Brand Monitoring", "Suspicious AWS EC2 Activities", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "Suspicious AWS Login Activities", "Suspicious DNS Traffic", "Command and Control", "DNS Amplification Attacks", "Router & Infrastructure Security", "Collection and Staging", "Windows Service Abuse", "Host Redirection", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Suspicious AWS Traffic", "AWS User Monitoring", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "DHS Report TA18-074A", "Use of Cleartext Protocols"] action.escu.fields_required = ["event_id"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -2659,7 +2665,7 @@ action.escu.mappings = {"mitre_attack": ["Exfiltration", "Exfiltration Over Alte action.escu.known_false_positives = It is possible legitimate traffic can trigger this rule. Please investigate as appropriate. The threshold for generating an event can also be customized to better suit your environment. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Command and Control", "Suspicious DNS Traffic"] +action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Excessive DNS Failures action.notable = 1 @@ -2668,7 +2674,7 @@ action.notable.param.rule_description = This search identifies DNS query failure action.notable.param.rule_title = Excessive DNS Failures 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 DNS Server History for a host\n - ESCU - Get DNS traffic ratio\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 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.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -2759,7 +2765,7 @@ action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", action.escu.known_false_positives = It's possible there can be long domain names that are legitimate. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Hidden Cobra Malware", "Command and Control", "Suspicious DNS Traffic"] +action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control", "Hidden Cobra Malware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = DNS Query Length With High Standard Deviation action.notable = 1 @@ -2768,7 +2774,7 @@ action.notable.param.rule_description = Filter DNS requests and compute the stan action.notable.param.rule_title = DNS query length with high standard deviation 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 DNS Server History for a host\n - ESCU - Get DNS traffic ratio\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 Outbound Emails to Hidden Cobra Threat Actors\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 @@ -2809,7 +2815,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Indicator Removal o 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", "Windows Log Manipulation"] +action.escu.analytic_story = ["Windows Log Manipulation", "Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = USN Journal Deletion action.notable = 1 @@ -2818,7 +2824,7 @@ action.notable.param.rule_description = The system $dest$ deleted its NTFS journ action.notable.param.rule_title = File System Journal Deleted 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.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.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -2843,27 +2849,52 @@ 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=fsutil.exe by Processes.user Processes.process_name Processes.parent_process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` | search process="*deletejournal*" AND process="*usn*" -[ESCU - Previously Seen AWS Regions] +[ESCU - Identify Systems Creating Remote Desktop Traffic] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-01-08 -action.escu.modification_date = 2018-01-08 +action.escu.creation_date = 2017-04-24 +action.escu.modification_date = 2017-09-15 action.escu.channel = ESCU -action.escu.eli5 = 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. -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 Regions +action.escu.eli5 = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. +action.escu.how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Identify Systems Creating Remote Desktop Traffic 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 EC2 Activities", "AWS Cryptomining"] -description = This search looks for CloudTrail events where an AWS instance is started and creates a baseline of most recent time (latest) and the first time (earliest) we've seen this region in our dataset grouped by the value awsRegion for the last 30 days +action.escu.providing_technologies = ["Splunk Stream", "Bro"] +action.escu.analytic_story = ["Lateral Movement"] +description = This search counts the numbers of times the system has generated remote desktop traffic. 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 StartInstances | stats earliest(_time) as earliest latest(_time) as latest by awsRegion | outputlookup previously_seen_aws_regions.csv | stats count +search = | tstats `summariesonly` count from datamodel=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.src | `drop_dm_object_name("All_Traffic")` | sort - count + +[ESCU - Get Process responsible for the DNS traffic] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-04-10 +action.escu.modification_date = 2017-11-09 +action.escu.channel = ESCU +action.escu.eli5 = none +action.escu.how_to_implement = You must be ingesting endpoint data that associates processes with network events. This can come from endpoint protection products such as carbon black, or endpoint data sources such as Sysmon. +action.escu.data_models = ["Application_State"] +action.escu.full_search_name = ESCU - Get Process responsible for the DNS traffic +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 = ["Dynamic DNS", "Brand Monitoring", "Suspicious DNS Traffic", "Command and Control", "Host Redirection", "Data Protection", "DNS Hijacking"] +action.escu.fields_required = ["dest"] +action.escu.earliest_time_offset = 3600 +action.escu.latest_time_offset = 86400 +description = While investigating, an analyst will want to know what process and parent_ process is responsible for generating suspicious DNS traffic. Use the following search and enter the value of src_ip in the search to get specific details on the process responsible for creating the DNS traffic. +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | tstats allow_old_summaries=true values(All_Application_State.process) as "process" from datamodel=Application_State where nodename=All_Application_State.Ports All_Application_State.Ports.dest_port=53 All_Application_State.dest={dest} [ESCU - WMI Temporary Event Subscription - Rule] action.escu = 0 @@ -2930,7 +2961,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Modify Registry"], action.escu.known_false_positives = This registry key may be modified via administrators to implement a change in system policy. This type of change should be a very rare occurrence. 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 Defense Evasion Tactics"] +action.escu.analytic_story = ["Windows Defense Evasion Tactics", "Suspicious Windows Registry Activities"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Disabling Remote User Account Control action.notable = 1 @@ -2939,7 +2970,7 @@ action.notable.param.rule_description = The registry key SOFTWARE\Microsoft\Wind action.notable.param.rule_title = Registry Key Associated With Disabling Remote UAC 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 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 @@ -2964,55 +2995,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.registry_path="*Windows\\CurrentVersion\\Policies\\System\\LocalAccountTokenFilterPolicy" by Registry.dest, Registry.registry_key_name Registry.status Registry.user Registry.registry_path Registry.action | `drop_dm_object_name(Registry)` -[ESCU - EC2 Instance Started In Previously Unseen Region - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-02-01 -action.escu.modification_date = 2018-02-23 -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 that indicate that an instance was started in a particular region. Using the `previously_seen_aws_regions.csv` lookup file created using the support search, we compare the region where this instance was started to all previously observed regions. The `eval` and `if` functions determine that the earliest times seen for this region and instance were within the last day. If a new region is detected, it will alert you with "Instance Started in a New Region". However, this region will be added to the list of `previously_seen_aws_regions.csv`. Please maintain `previously_seen_aws_regions.csv` -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 Regions" support search only once to create of baseline of previously seen regions. -action.escu.full_search_name = ESCU - EC2 Instance Started In Previously Unseen Region - Rule -action.escu.mappings = {"mitre_attack": ["Defense Evasion"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 12"], "nist": ["DE.DP", "DE.AE"]} -action.escu.known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = EC2 Instance Started In Previously Unseen Region -action.notable = 1 -action.notable.param.nes_fields = awsRegion -action.notable.param.rule_description = An AWS instance is started in a new, previously unseen, region -action.notable.param.rule_title = AWS instance is started in a new region -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.recommended_actions = escu_contextualize, escu_investigate -action.risk = 1 -action.risk.param._risk_object = awsRegion -action.risk.param._risk_object_type = other -action.risk.param._risk_score = 30 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = awsRegion -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = This search looks for CloudTrail events where an instance is started in a particular region in the last one hour and then compares it to a lookup file of previously seen regions where an instance was started -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 earliest=-1h StartInstances | stats earliest(_time) as earliest latest(_time) as latest by awsRegion| inputlookup append=t previously_seen_aws_regions.csv | stats min(earliest) as earliest max(latest) as latest by awsRegion | outputlookup previously_seen_aws_regions.csv | eval regionStatus=if(earliest >= relative_time(now(), "-1d@d"), "Instance Started in a New Region","Previously Seen Region") | convert ctime(earliest) ctime(latest) | where regionStatus="Instance Started in a New Region" - [ESCU - AWS Cloud Provisioning From Previously Unseen City - Rule] action.escu = 0 action.escu.enabled = 1 @@ -3128,7 +3110,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 = ["Suspicious Command-Line Executions", "Ransomware", "Unusual Processes"] +action.escu.analytic_story = ["Suspicious Command-Line Executions", "Unusual Processes", "Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = System Processes Run From Unexpected Locations action.notable = 1 @@ -3137,7 +3119,7 @@ action.notable.param.rule_description = The system $dest$ has a process that nor action.notable.param.rule_title = System Processes Run From Unexpected Location 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 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 Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -3162,44 +3144,61 @@ 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 - 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 @@ -3210,7 +3209,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 - Previously seen S3 bucket access by remote IP] action.escu = 0 @@ -3234,56 +3233,6 @@ schedule_window = auto is_visible = false search = sourcetype=aws:s3:accesslogs http_status=200 | stats earliest(_time) as earliest latest(_time) as latest by bucket_name remote_ip | outputlookup previously_seen_S3_access_from_remote_ip | stats count -[ESCU - Execution of File with Multiple Extensions - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-01-26 -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 uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. -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. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Execution of File with Multiple Extensions - 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 Multiple Extensions -action.notable = 1 -action.notable.param.nes_fields = dest, process -action.notable.param.rule_description = The system $dest$ executed a file with a double extension. -action.notable.param.rule_title = Process With Multiple Extensions Launched 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"} -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 that have double extensions in the file name. This is typically done to obscure the "real" file extension and make it appear as though the file being accessed is a data file, as opposed to executable content. -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=Endpoint.Processes where Processes.process = *.doc.exe OR Processes.process = *.htm.exe OR Processes.process = *.html.exe OR Processes.process = *.txt.exe OR Processes.process = *.pdf.exe OR Processes.process = *.doc.exe by Processes.dest Processes.user Processes.process Processes.parent_process | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name(Processes)` - [ESCU - Common Ransomware Notes - Rule] action.escu = 0 action.escu.enabled = 1 @@ -3496,7 +3445,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", "Brand Monitoring", "Web Fraud Detection"] +action.escu.analytic_story = ["Web Fraud Detection", "Brand Monitoring", "Suspicious Emails"] action.escu.fields_required = ["src_user"] action.escu.earliest_time_offset = 86400 action.escu.latest_time_offset = 86400 @@ -3630,27 +3579,54 @@ 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_hash) as file_hash values(Filesystem.file_path) as file_path from datamodel=Endpoint.Filesystem where Filesystem.file_path="C:\\program.exe" by Filesystem.file_name | `drop_dm_object_name(Filesystem)` | `ctime(lastTime)` | `ctime(firstTime)` -[ESCU - Previously Seen EC2 Instance Types] +[ESCU - First time seen command line argument - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-08 -action.escu.modification_date = 2018-03-08 +action.escu.creation_date = 2018-04-09 +action.escu.modification_date = 2018-04-16 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = In this support search, we create a table of the earliest and latest time that a specific EC2 instance type has been seen. The instanceType request field is not required and defaults to m1.small, so any time this field is null, the search defaults the field to m1.small. This table is then outputted to a csv 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 EC2 Instance Types -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining"] -description = This search builds a table of previously seen EC2 instance types -dispatch.earliest_time = -90d@d +action.escu.confidence = medium +action.escu.eli5 = The subsearch returns all events where `cmd.exe` was used with a `/c` parameter in the command-line arguments to execute other commands/programs. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for command-line execution and outputs this data to the lookup file to update the local cache. It returns only those events that have first been seen in the past four hours. This is combined with the main search to return the time, user, destination, process, parent process, and value of the command-line argument. +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 Technology Add-on (TA). Please make sure you run the support search "Previously seen command line arguments,"—which creates a lookup file called `previously_seen_cmd_line_arguments.csv`—a historical baseline of all command-line arguments. You must also validate this list. +action.escu.full_search_name = ESCU - First time seen command line argument - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Scripting", "Persistence", "Command-Line Interface"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} +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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Hidden Cobra Malware", "DHS Report TA18-074A"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = First time seen command line argument +action.notable = 1 +action.notable.param.nes_fields = dest, user, process, cmdline +action.notable.param.rule_description = The system $dest$ executed a command-line argument, $cmdline$, that has not previously been seen. +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.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, process, cmdline +alert.suppress.period = 86400s +cron_schedule = 30 * * * * +description = This search looks for command-line arguments that use a `/c` parameter to execute a command that has not previously been seen. +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 eventName=RunInstances errorCode=success | rename requestParameters.instanceType as instanceType | fillnull value="m1.small" instanceType | stats earliest(_time) as earliest latest(_time) as latest by instanceType | outputlookup previously_seen_ec2_instance_types.csv | stats count +search = sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational process=cmd.exe cmdline="* /c *" [ search sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational process=cmd.exe cmdline="* /c *" | stats earliest(_time) as firstTime latest(_time) as lastTime by cmdline | inputlookup append=t previously_seen_cmd_line_arguments | stats min(firstTime) as firstTime, max(lastTime) as lastTime by cmdline | outputlookup previously_seen_cmd_line_arguments | eval newCmdLineArgument=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newCmdLineArgument=1 | `ctime(firstTime)` | `ctime(lastTime)` | table cmdline] | table _time, user,dest, process, parent_process, cmdline [ESCU - Suspicious Email Attachment Extensions - Rule] action.escu = 0 @@ -3786,7 +3762,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 = ["Suspicious AWS Traffic", "Suspicious AWS S3 Activities", "Command and Control", "AWS Suspicious Provisioning Activities"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities", "Command and Control", "Suspicious AWS Traffic", "AWS Suspicious Provisioning Activities"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 @@ -3797,50 +3773,51 @@ 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 - Previously Seen Running Windows Services] +[ESCU - All backup logs for host] 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.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Windows Service Abuse", "Orangeworm Attack Group"] -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 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.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 = 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 = 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 = contextual -action.escu.providing_technologies = ["Splunk Enterprise Security"] -action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Splunk Enterprise Vulnerability", "Credential Dumping", "Suspicious MSHTA Activity", "Monitor for Updates", "SamSam Ransomware", "Malicious PowerShell", "Asset Tracking", "Suspicious AWS EC2 Activities", "Emotet Malware (TA18-201A)", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Suspicious AWS S3 Activities", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Suspicious Emails", "DNS Hijacking", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Windows Defense Evasion Tactics", "Dynamic DNS", "Host Redirection", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Monitor for Unauthorized Software", "Brand Monitoring", "Suspicious WMI Use", "Suspicious AWS Login Activities", "AWS Network ACL Activity", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "SQL Injection", "ColdRoot MacOS RAT", "Collection and Staging", "Disabling Security Tools", "Data Protection"] -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.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 = | `identities` | search identity={user} | table _time, identity, first, last, email, category, watchlist +search = | search sourcetype="netbackup_logs" dest={dest} + +[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 - Child Processes of Spoolsv.exe - Rule] action.escu = 0 @@ -3892,52 +3869,55 @@ 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 - Get Process responsible for the DNS traffic] +[ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-10 -action.escu.modification_date = 2017-11-09 +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.eli5 = none -action.escu.how_to_implement = You must be ingesting endpoint data that associates processes with network events. This can come from endpoint protection products such as carbon black, or endpoint data sources such as Sysmon. -action.escu.data_models = ["Application_State"] -action.escu.full_search_name = ESCU - Get Process responsible for the DNS traffic -action.escu.known_false_positives = None at this time -action.escu.search_type = investigative +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.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["DNS Hijacking", "Dynamic DNS", "Host Redirection", "Command and Control", "Brand Monitoring", "Suspicious DNS Traffic", "Data Protection"] -action.escu.fields_required = ["dest"] -action.escu.earliest_time_offset = 3600 -action.escu.latest_time_offset = 86400 -description = While investigating, an analyst will want to know what process and parent_ process is responsible for generating suspicious DNS traffic. Use the following search and enter the value of src_ip in the search to get specific details on the process responsible for creating the DNS traffic. -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | tstats allow_old_summaries=true values(All_Application_State.process) as "process" from datamodel=Application_State where nodename=All_Application_State.Ports All_Application_State.Ports.dest_port=53 All_Application_State.dest={dest} - -[ESCU - Systems Ready for Spectre-Meltdown Windows Patch] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-01-08 -action.escu.modification_date = 2018-01-08 -action.escu.channel = ESCU -action.escu.eli5 = 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. -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.data_models = ["Change_Analysis"] -action.escu.full_search_name = ESCU - Systems Ready for Spectre-Meltdown Windows Patch -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 = ["Spectre And Meltdown Vulnerabilities"] -description = Some AV applications can cause the Spectre/Meltdown patch for Windows not to install successfully. This registry key is supposed to be created by the AV engine when it has been patched to be able to handle the Windows patch. If this key has been written, the system can then be patched for Spectre and Meltdown. -dispatch.earliest_time = -1d@d +action.escu.analytic_story = ["Suspicious Command-Line Executions", "Suspicious MSHTA Activity"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect Prohibited Applications Spawning cmd.exe +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.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, parent_process +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. +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=Change_Analysis.All_Changes where All_Changes.object_category=registry AND (All_Changes.object_path="HKLM\Software\Microsoft\Windows\CurrentVersion\QualityCompat*") by All_Changes.dest, All_Changes.command, All_Changes.user, All_Changes.object, All_Changes.object_path | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` +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_name Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] [ESCU - Detect hosts connecting to dynamic domain providers - Rule] action.escu = 0 @@ -3955,7 +3935,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 = ["Prohibited Traffic Allowed or Protocol Mismatch", "DNS Hijacking", "Dynamic DNS", "Command and Control", "Suspicious DNS Traffic", "Data Protection"] +action.escu.analytic_story = ["Dynamic DNS", "Suspicious DNS Traffic", "Command and Control", "Data Protection", "DNS Hijacking", "Prohibited Traffic Allowed or Protocol Mismatch"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect hosts connecting to dynamic domain providers action.notable = 1 @@ -3964,7 +3944,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 - 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"} +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 @@ -4103,114 +4083,68 @@ 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 = ["ColdRoot MacOS RAT", "SamSam Ransomware", "Ransomware", "DNS Hijacking"] +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 - Web Fraud - Password Sharing Across Accounts - Rule] +[ESCU - Detect USB device insertion - Rule] 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.channel = webfraud -action.escu.confidence = medium -action.escu.eli5 = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 -action.escu.how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. -action.escu.full_search_name = ESCU - Web Fraud - Password Sharing Across Accounts - Rule -action.escu.mappings = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. +action.escu.creation_date = 2017-08-03 +action.escu.modification_date = 2017-11-27 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = low +action.escu.eli5 = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device +action.escu.how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. +action.escu.data_models = ["Change_Analysis"] +action.escu.full_search_name = ESCU - Detect USB device insertion - Rule +action.escu.mappings = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} +action.escu.known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. 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 = ["Microsoft Windows"] +action.escu.analytic_story = ["Data Protection"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Web Fraud - Password Sharing Across Accounts +action.correlationsearch.label = Detect USB device insertion action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = This search is used to identify user accounts, $user$, that share common passwords -action.notable.param.rule_title = Web Fraud Detection: Password Sharing Across Accounts -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 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.nes_fields = dest +action.notable.param.rule_description = Read/Write attempt to a USB was detected on this host +action.notable.param.rule_title = Read/Write attempt to a USB 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 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"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = user -action.risk.param._risk_object_type = other -action.risk.param._risk_score = 10 +action.risk.param._risk_object = dest +action.risk.param._risk_object_type = system +action.risk.param._risk_score = 20 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = user -alert.suppress.period = 3600s +alert.suppress.fields = dest +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = This search is used to identify user accounts that share a common password. +description = The search is used to detect hosts that generate Windows Event ID 4663 for successful attempts to write to or read from a removable storage and Event ID 4656 for failures, which occurs when a USB drive is plugged in. In this scenario we are querying the Change_Analysis data model to look for Windows Event ID 4656 or 4663 where the priority of the affected host is marked as high in the ES Assets and Identity Framework. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -4221,7 +4155,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=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 +search = | tstats `summariesonly` count earliest(_time) AS earliest latest(_time) AS latest from datamodel=Change_Analysis where (nodename = All_Changes) All_Changes.result="Removable Storage device" (All_Changes.result_id=4663 OR All_Changes.result_id=4656) (All_Changes.src_priority=high) by All_Changes.dest | `drop_dm_object_name("All_Changes")`| `ctime(earliest)`| `ctime(latest)` [ESCU - Shim Database Installation With Suspicious Parameters - Rule] action.escu = 0 @@ -4272,45 +4206,44 @@ 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 - Detect malicious requests to exploit JBoss servers - Rule] +[ESCU - Abnormally High AWS Instances Launched by User - Rule] 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-02-26 +action.escu.modification_date = 2018-02-26 +action.escu.asset_at_risk = AWS Instance 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.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 = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] 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 Instance Details by instanceId\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 - ESCU - Investigate AWS activities via region name\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 @@ -4320,7 +4253,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 - Detect Excessive User Account Lockouts - Rule] action.escu = 0 @@ -4371,29 +4304,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 = ["SamSam Ransomware", "Ransomware", "DNS Hijacking", "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 @@ -4494,6 +4426,73 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` sum(All_Traffic.bytes_out) as bytes_out from datamodel=Network_Traffic where All_Traffic.src_category=email_server by All_Traffic.dest_ip _time span=1d | `drop_dm_object_name("All_Traffic")` | eventstats avg(bytes_out) as avg_bytes_out stdev(bytes_out) as stdev_bytes_out | eventstats count as num_data_samples avg(eval(if(_time < relative_time(now(), "@d"), bytes_out, null))) as per_source_avg_bytes_out stdev(eval(if(_time < relative_time(now(), "@d"), bytes_out, null))) as per_source_stdev_bytes_out by dest_ip | eval minimum_data_samples = 4, deviation_threshold = 3 | where num_data_samples >= minimum_data_samples AND bytes_out > (avg_bytes_out + (deviation_threshold * stdev_bytes_out)) AND bytes_out > (per_source_avg_bytes_out + (deviation_threshold * per_source_stdev_bytes_out)) AND _time >= relative_time(now(), "@d") | eval num_standard_deviations_away_from_server_average = round(abs(bytes_out - avg_bytes_out) / stdev_bytes_out, 2), num_standard_deviations_away_from_client_average = round(abs(bytes_out - per_source_avg_bytes_out) / per_source_stdev_bytes_out, 2) | table dest_ip, _time, bytes_out, avg_bytes_out, per_source_avg_bytes_out, num_standard_deviations_away_from_server_average, num_standard_deviations_away_from_client_average +[ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-04-26 +action.escu.modification_date = 2018-05-07 +action.escu.asset_at_risk = AWS Instance +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ +\ +1. Counts the number of blocked outbound connections by each source IP\ +\ +1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ +\ +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 `numberOfBlockedConnections` as `latestCount`.\ +\ +1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. +action.escu.full_search_name = ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule +action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} +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 = ["AWS Network ACL Activity", "Command and Control", "Suspicious AWS Traffic"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect Spike in blocked Outbound Traffic from your AWS +action.notable = 1 +action.notable.param.nes_fields = src_ip +action.notable.param.rule_description = A spike in the blocked outbound connection is detected from source $src_ip$. +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 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 +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 will detect spike in blocked outbound network connections originating from within your AWS environment. It will also update the cache file that factors in the latest data. +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:cloudwatchlogs:vpcflow action=blocked (src_ip=10.0.0.0/8 OR src_ip=172.16.0.0/12 OR src_ip=192.168.0.0/16) ( dest_ip!=10.0.0.0/8 AND dest_ip!=172.16.0.0/12 AND dest_ip!=192.168.0.0/16) [search 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) | stats count as numberOfBlockedConnections by src_ip | inputlookup baseline_blocked_outbound_connections append=t | fields - latestCount | stats values(*) as * by src_ip | rename numberOfBlockedConnections as latestCount | eval newAvgBlockedConnections=avgBlockedConnections + (latestCount-avgBlockedConnections)/720 | eval newStdevBlockedConnections=sqrt(((pow(stdevBlockedConnections, 2)*719 + (latestCount-newAvgBlockedConnections)*(latestCount-avgBlockedConnections))/720)) | eval avgBlockedConnections=coalesce(newAvgBlockedConnections, avgBlockedConnections), stdevBlockedConnections=coalesce(newStdevBlockedConnections, stdevBlockedConnections), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) | table src_ip, latestCount, numDataPoints, avgBlockedConnections, stdevBlockedConnections | outputlookup baseline_blocked_outbound_connections | eval dataPointThreshold = 5, deviationThreshold = 3 | eval isSpike=if((latestCount > avgBlockedConnections+deviationThreshold*stdevBlockedConnections) AND numDataPoints > dataPointThreshold, 1, 0) | where isSpike=1 | table src_ip] | stats values(dest_ip) as "Blocked Destination IPs", values(interface_id) as "resourceId" count as numberOfBlockedConnections, dc(dest_ip) as uniqueDestConnections by src_ip + [ESCU - Identify New User Accounts - Rule] action.escu = 0 action.escu.enabled = 1 @@ -4544,6 +4543,55 @@ 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 - Detect S3 access from a new IP - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-06-25 +action.escu.modification_date = 2018-06-28 +action.escu.asset_at_risk = S3 Bucket +action.escu.channel = ESCU +action.escu.confidence = low +action.escu.eli5 = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource +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 S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. +action.escu.full_search_name = ESCU - Detect S3 access from a new IP - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +action.escu.known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect S3 access from a new IP +action.notable = 1 +action.notable.param.nes_fields = bucket_name, src_ip +action.notable.param.rule_description = A remote IP, $src_ip$, has made a successful connection with an S3 $bucket_name$. +action.notable.param.rule_title = S3 bucket $bucketName$ was accessed by a new $src_ip$ +action.notable.param.security_domain = network +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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 = 20 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = bucket_name, src_ip +alert.suppress.period = 86400s +cron_schedule = 5 * * * * +description = This search looks at S3 bucket-access logs and detects new or previously unseen remote IP addresses that have successfully accessed an S3 bucket. +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:s3:accesslogs http_status=200 [search sourcetype=aws:s3:accesslogs http_status=200 | stats earliest(_time) as firstTime latest(_time) as lastTime by bucket_name remote_ip | inputlookup append=t previously_seen_S3_access_from_remote_ip.csv | stats min(firstTime) as firstTime, max(lastTime) as lastTime by bucket_name remote_ip | outputlookup previously_seen_S3_access_from_remote_ip.csv | eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newIP=1 | convert ctime(firstTime) ctime(lastTime) | table bucket_name remote_ip]| iplocation remote_ip |rename remote_ip as src_ip | table _time bucket_name src_ip City Country operation request_uri + [ESCU - Detect Large Outbound ICMP Packets - Rule] action.escu = 0 action.escu.enabled = 1 @@ -4594,55 +4642,6 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count earliest(_time) as earliest latest(_time) as latest values(All_Traffic.action) values(All_Traffic.bytes) from datamodel=Network_Traffic where All_Traffic.action !=blocked All_Traffic.dest_category !=internal (All_Traffic.protocol=icmp OR All_Traffic.transport=icmp) All_Traffic.bytes > 1000 by All_Traffic.src_ip All_Traffic.dest_ip | `drop_dm_object_name("All_Traffic")` | search ( dest_ip!=10.0.0.0/8 AND dest_ip!=172.16.0.0/12 AND dest_ip!=192.168.0.0/16) | convert ctime(earliest) ctime(latest) -[ESCU - First time seen command line argument - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-04-09 -action.escu.modification_date = 2018-04-16 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = The subsearch returns all events where `cmd.exe` was used with a `/c` parameter in the command-line arguments to execute other commands/programs. It appends the historical data to those results in the lookup file. Next, it recalculates the `firstTime` and `lastTime` field for command-line execution and outputs this data to the lookup file to update the local cache. It returns only those events that have first been seen in the past four hours. This is combined with the main search to return the time, user, destination, process, parent process, and value of the command-line argument. -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 Technology Add-on (TA). Please make sure you run the support search "Previously seen command line arguments,"—which creates a lookup file called `previously_seen_cmd_line_arguments.csv`—a historical baseline of all command-line arguments. You must also validate this list. -action.escu.full_search_name = ESCU - First time seen command line argument - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Scripting", "Persistence", "Command-Line Interface"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 3", "CIS 8"], "nist": ["PR.PT", "DE.CM", "PR.IP"]} -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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Hidden Cobra Malware", "Orangeworm Attack Group", "DHS Report TA18-074A"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = First time seen command line argument -action.notable = 1 -action.notable.param.nes_fields = dest, user, process, cmdline -action.notable.param.rule_description = The system $dest$ executed a command-line argument, $cmdline$, that has not previously been seen. -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.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, process, cmdline -alert.suppress.period = 86400s -cron_schedule = 30 * * * * -description = This search looks for command-line arguments that use a `/c` parameter to execute a command that has not previously been seen. -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 process=cmd.exe cmdline="* /c *" [ search sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational process=cmd.exe cmdline="* /c *" | stats earliest(_time) as firstTime latest(_time) as lastTime by cmdline | inputlookup append=t previously_seen_cmd_line_arguments | stats min(firstTime) as firstTime, max(lastTime) as lastTime by cmdline | outputlookup previously_seen_cmd_line_arguments | eval newCmdLineArgument=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newCmdLineArgument=1 | `ctime(firstTime)` | `ctime(lastTime)` | table cmdline] | table _time, user,dest, process, parent_process, cmdline - [ESCU - Get Logon Rights Modifications For User] action.escu = 0 action.escu.enabled = 1 @@ -4666,54 +4665,28 @@ schedule_window = auto is_visible = false search = | search sourcetype=WinEventLog:Security (EventCode=4718 OR EventCode=4717) user={user} | rename user as "Account Modified" | table _time, dest, "Account Modified", Access_Right, signature -[ESCU - Abnormally High AWS Instances Terminated by User - Rule] +[ESCU - Identify Systems Using Remote Desktop] 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-04-18 +action.escu.modification_date = 2017-09-15 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 terminated by a particular user. Since we want to detect a high number of instances terminated within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances terminated by a particular user, as well as the average- and standard-deviation values. Assign a `threshold_value` in the search. Try starting with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier to 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. We then filter out outliers with a value of 1 and show only those instance-termination events that happened within the previous 10 minutes. -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 - Abnormally High AWS Instances Terminated 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 with your AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify whether this search alerted on a human user. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS EC2 Activities"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Abnormally High AWS Instances Terminated by User -action.notable = 1 -action.notable.param.nes_fields = userName -action.notable.param.rule_description = An abnormally high number of instances were terminated by a user in a 10-minute window -action.notable.param.rule_title = High number of instances terminated by $userName$ -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 Instance Details by instanceId\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 - ESCU - Investigate AWS activities via region name\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.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 an abnormally high number of instances were successfully terminated by a user in a 10-minute window +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 -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=TerminateInstances errorCode=success | bucket span=10m _time | stats count AS instances_terminated by _time userName | eventstats avg(instances_terminated) as total_terminations_avg, stdev(instances_terminated) as total_terminations_stdev | eval threshold_value = 4 | eval isOutlier=if(instances_terminated > total_terminations_avg+(total_terminations_stdev * threshold_value), 1, 0) | search isOutlier=1 AND _time >= relative_time(now(), "-10m@m")| eval num_standard_deviations_away = round(abs(instances_terminated - total_terminations_avg) / total_terminations_stdev, 2) |table _time, userName, instances_terminated, num_standard_deviations_away, total_terminations_avg, total_terminations_stdev +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 - Scheduled Task Name Used by Dragonfly Threat Actors - Rule] action.escu = 0 @@ -4778,7 +4751,7 @@ action.escu.full_search_name = ESCU - Investigate Web Activity From src_ip 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 = ["Splunk Enterprise Vulnerability CVE-2018-11409", "DNS Hijacking", "Dynamic DNS", "ColdRoot MacOS RAT"] +action.escu.analytic_story = ["Splunk Enterprise Vulnerability CVE-2018-11409", "Dynamic DNS", "ColdRoot MacOS RAT", "DNS Hijacking"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -4802,7 +4775,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "Suspicious MSHTA Activity", "DNS Amplification Attacks", "Monitor for Updates", "SamSam Ransomware", "Malicious PowerShell", "Asset Tracking", "Prohibited Traffic Allowed or Protocol Mismatch", "Emotet Malware (TA18-201A)", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Suspicious Emails", "DNS Hijacking", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Dynamic DNS", "Host Redirection", "Monitor Backup Solution", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Monitor for Unauthorized Software", "Brand Monitoring", "Suspicious WMI Use", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "SQL Injection", "ColdRoot MacOS RAT", "Collection and Staging", "Disabling Security Tools", "Data Protection"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "JBoss Vulnerability", "Dynamic DNS", "Unusual Processes", "Brand Monitoring", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "ColdRoot MacOS RAT", "Suspicious DNS Traffic", "Command and Control", "SamSam Ransomware", "DNS Amplification Attacks", "Router & Infrastructure Security", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Host Redirection", "Suspicious Emails", "Ransomware", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "Monitor Backup Solution", "DHS Report TA18-074A", "Use of Cleartext Protocols", "DNS Hijacking", "Prohibited Traffic Allowed or Protocol Mismatch"] action.escu.fields_required = ["user"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 @@ -4826,7 +4799,7 @@ action.escu.full_search_name = ESCU - Get 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", "Suspicious Command-Line Executions", "Credential Dumping", "Suspicious MSHTA Activity", "SamSam Ransomware", "Malicious PowerShell", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Windows Defense Evasion Tactics", "Command and Control", "Monitor for Unauthorized Software", "Suspicious WMI Use", "Orangeworm Attack Group", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "Collection and Staging", "Disabling Security Tools"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Credential Dumping", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Windows Defense Evasion Tactics", "Unusual Processes", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Command and Control", "SamSam Ransomware", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Ransomware", "Hidden Cobra Malware", "Windows File Extension and Association Abuse", "Malicious PowerShell", "DHS Report TA18-074A"] action.escu.fields_required = ["process", "dest"] action.escu.earliest_time_offset = 7200 action.escu.latest_time_offset = 7200 @@ -5148,7 +5121,7 @@ action.escu.mappings = {"mitre_attack": ["Privilege Escalation", "Persistence", action.escu.known_false_positives = There are many legitimate applications that must execute upon 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 = ["Suspicious Windows Registry Activities", "Windows Privilege Escalation"] +action.escu.analytic_story = ["Windows Privilege Escalation", "Suspicious Windows Registry Activities"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Registry Keys Used For Privilege Escalation action.notable = 1 @@ -5157,7 +5130,7 @@ action.notable.param.rule_description = A registry key used for privilege escala action.notable.param.rule_title = Registry Key Associated With Privilege Escalation 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 @@ -5182,77 +5155,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 - Get All AWS Activity From Region] +[ESCU - Baseline of Network ACL Activity by ARN] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-19 -action.escu.modification_date = 2018-03-19 +action.escu.creation_date = 2018-05-21 +action.escu.modification_date = 2018-05-21 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.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 = investigative +action.escu.search_type = support 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 - 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 +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 @@ -5428,55 +5351,28 @@ 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 - Detect attackers scanning for vulnerable JBoss servers - Rule] +[ESCU - Discover DNS records] 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 = 2019-02-14 +action.escu.modification_date = 2019-02-14 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search returns the number of times a URL associated with this type of JexBoss probe is observed. -action.escu.how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. -action.escu.data_models = ["Web"] -action.escu.full_search_name = ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule -action.escu.mappings = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} -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.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect attackers scanning for vulnerable JBoss servers -action.notable = 1 -action.notable.param.nes_fields = -action.notable.param.rule_description = This search looks for specific GET/HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. -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.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.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest,url -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search looks for specific GET or HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. JexBoss is described as the exploit tool of choice for this malicious activity. -dispatch.earliest_time = -70m@m +action.escu.eli5 = Discover the DNS records and their answers for domains owned by the company using network traffic events. The discovered events are exported as a lookup named `discovered_dns_records.csv` +action.escu.how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. Also make sure that the cim_corporate_web_domains and cim_corporate_email_domains lookups are populated with the domains owned by your corporation +action.escu.data_models = ["Network_Resolution"] +action.escu.full_search_name = ESCU - Discover DNS records +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 = ["DNS Hijacking"] +description = The search takes corporate and common cloud provider domains configured under cim_corporate_email_domains.csv, cim_corporate_web_domains.csv, and cloud_domains.csv and finds their responses across the last 30 days from data in the Network Traffic datamodel, then stores the output under the discovered_dns_records.csv lookup +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 = | 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)` +search = | inputlookup cim_corporate_email_domains.csv | inputlookup append=T cim_corporate_web_domains.csv | inputlookup append=T cim_cloud_domains.csv | eval domain = trim(replace(domain, "\*", "")) | join domain [|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as answer from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!="unknown" DNS.answer!="" by DNS.query | rename DNS.query as query | where query!="unknown" | rex field=query "(?\w+\.\w+?)(?:$|/)"] | makemv delim=" " answer | makemv delim=" " type | sort -count | table count,domain,type,query,answer | outputlookup createinapp=true discovered_dns_records.csv [ESCU - Investigate Successful Remote Desktop Authentications] action.escu = 0 @@ -5502,128 +5398,6 @@ 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 - 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.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["SamSam Ransomware", "Ransomware"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Common Ransomware Extensions -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.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 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 = 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 -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 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 -action.escu.enabled = 1 -action.escu.creation_date = 2018-03-15 -action.escu.modification_date = 2018-03-12 -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 launches within the last hour and then appends the historical data in the lookup file to those results. It 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. -action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen User - Rule -action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.known_false_positives = It's possible that a user will start to create EC2 instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = EC2 Instance Started With Previously Unseen User -action.notable = 1 -action.notable.param.nes_fields = user, dest -action.notable.param.rule_description = The EC2 instance $dest$ was created by $user$. This user has never created an EC2 instance before. -action.notable.param.rule_title = EC2 Instance Created 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 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 = user, dest -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = This search looks for EC2 instances being created by users who have not created them before. -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 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 - Detect new user AWS Console Login - Rule] action.escu = 0 action.escu.enabled = 1 @@ -5673,6 +5447,55 @@ 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" +[ESCU - EC2 Instance Started With Previously Unseen User - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-03-15 +action.escu.modification_date = 2018-03-12 +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 launches within the last hour and then appends the historical data in the lookup file to those results. It 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. +action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen User - Rule +action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +action.escu.known_false_positives = It's possible that a user will start to create EC2 instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = EC2 Instance Started With Previously Unseen User +action.notable = 1 +action.notable.param.nes_fields = user, dest +action.notable.param.rule_description = The EC2 instance $dest$ was created by $user$. This user has never created an EC2 instance before. +action.notable.param.rule_title = EC2 Instance Created 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 - 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 - ESCU - Investigate AWS activities via region name\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 created by users who have not created them before. +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 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 - Previously seen command line arguments] action.escu = 0 action.escu.enabled = 1 @@ -5685,7 +5508,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Hidden Cobra Malware", "Orangeworm Attack Group", "DHS Report TA18-074A"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Hidden Cobra Malware", "DHS Report TA18-074A"] 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 @@ -5794,43 +5617,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 Mimikatz Via PowerShell And EventCode 4663 - Rule] +[ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-08-28 -action.escu.modification_date = 2018-08-28 -action.escu.asset_at_risk = Windows +action.escu.creation_date = 2017-07-08 +action.escu.modification_date = 2017-09-18 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. -action.escu.how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. -action.escu.full_search_name = ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - 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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. +action.escu.eli5 = Clients should be resolving their DNS requests via a trusted DNS server. This search will identify DNS queries being sent to unauthorized DNS servers by comparing the destination and source of the traffic with assets marked as DNS servers. +action.escu.how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that your DNS servers are identified correctly in the Assets and Identity table of Enterprise Security. +action.escu.data_models = ["Network_Resolution"] +action.escu.full_search_name = ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule +action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} +action.escu.known_false_positives = Legitimate DNS activity can be detected in this search. Investigate, verify and update the list of authorized DNS servers as appropriate. action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Credential Dumping"] +action.escu.providing_technologies = ["Splunk Stream", "Bro"] +action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control", "DNS Hijacking"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Mimikatz Via PowerShell And EventCode 4663 +action.correlationsearch.label = DNS Query Requests Resolved by Unauthorized DNS Servers action.notable = 1 -action.notable.param.nes_fields = user, dest -action.notable.param.rule_description = Possible attempt at credential dumping via PowerShell was detected on $dest$ by $user$. -action.notable.param.rule_title = Event ID 4663 Specifying PowerShell Reading From LSASS.exe Identified on $dest$. -action.notable.param.security_domain = access +action.notable.param.nes_fields = dest, src +action.notable.param.rule_description = The table represents a list of unauthorized DNS servers interacting with hosts in your network +action.notable.param.rule_title = DNS requests resolved by unauthorized DNS 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 - 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 - ESCU - Get Vulnerability Logs For Endpoint\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 History Of Email Sources\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 = dest +action.risk.param._risk_object = src 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, dest, process -alert.suppress.period = 86400s +alert.suppress.fields = dest,src +alert.suppress.period = 28800s cron_schedule = 0 * * * * -description = This search looks for PowerShell reading lsass memory consistent with credential dumping. +description = This search will detect DNS requests resolved by unauthorized DNS servers. Legitimate DNS servers should be identified in the Enterprise Security Assets and Identity Framework. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -5841,7 +5665,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=wineventlog:security EventCode=4663 Process_Name=*powershell.exe Object_Name=*lsass.exe Access_Mask=0x10 | stats count min(_time) as firstTime max(_time) as lastTime by dest, Process_Name, Process_ID, Message | rename Process_Name as process | `ctime(firstTime)`| `ctime(lastTime)` +search = | tstats `summariesonly` count from datamodel=Network_Resolution where DNS.dest_category != dns_server AND DNS.src_category != dns_server by DNS.src DNS.dest | `drop_dm_object_name("DNS")` [ESCU - Get All AWS Activity From Country] action.escu = 0 @@ -6060,28 +5884,6 @@ 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 - Get Authentication Logs For Endpoint] action.escu = 0 action.escu.enabled = 1 @@ -6095,7 +5897,7 @@ 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", "Suspicious Command-Line Executions", "Splunk Enterprise Vulnerability", "Credential Dumping", "Suspicious MSHTA Activity", "Monitor for Updates", "SamSam Ransomware", "Malicious PowerShell", "Asset Tracking", "Prohibited Traffic Allowed or Protocol Mismatch", "Emotet Malware (TA18-201A)", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Suspicious Emails", "DNS Hijacking", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Windows Defense Evasion Tactics", "Dynamic DNS", "Host Redirection", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Monitor for Unauthorized Software", "Brand Monitoring", "Suspicious WMI Use", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "SQL Injection", "ColdRoot MacOS RAT", "Collection and Staging", "Disabling Security Tools", "Data Protection"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "JBoss Vulnerability", "Windows Defense Evasion Tactics", "Dynamic DNS", "Unusual Processes", "Brand Monitoring", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "ColdRoot MacOS RAT", "Suspicious DNS Traffic", "Command and Control", "SamSam Ransomware", "Router & Infrastructure Security", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Host Redirection", "Suspicious Emails", "Ransomware", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "DHS Report TA18-074A", "DNS Hijacking", "Prohibited Traffic Allowed or Protocol Mismatch"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 43200 action.escu.latest_time_offset = 1 @@ -6170,7 +5972,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Indicator Removal o action.escu.known_false_positives = The wevtutil.exe application is a legitimate Windows event log utility. Administrators may use it to manage Windows event logs. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Ransomware", "Windows Log Manipulation"] +action.escu.analytic_story = ["Windows Log Manipulation", "Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Suspicious wevtutil Usage action.notable = 1 @@ -6179,7 +5981,7 @@ action.notable.param.rule_description = wevtutil is the windows event log tool. action.notable.param.rule_title = Suspicious wevtutil Usage 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 Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -6288,7 +6090,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", "Command and Control", "AWS Network ACL Activity"] +action.escu.analytic_story = ["AWS Network ACL Activity", "Command and Control", "Suspicious AWS Traffic"] action.escu.fields_required = ["resourceId"] action.escu.earliest_time_offset = 86400 action.escu.latest_time_offset = 0 @@ -6299,93 +6101,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] -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.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.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -action.escu.analytic_story = ["Brand Monitoring"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Monitor Web Traffic For Brand Abuse -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.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 = 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 = src -alert.suppress.period = 86400s -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. -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` 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 Started With Previously Unseen Instance Type - Rule] +[ESCU - Detect Spike in AWS API Activity - Rule] action.escu = 0 action.escu.enabled = 1 action.escu.creation_date = 2018-03-12 -action.escu.modification_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 = medium -action.escu.eli5 = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. -action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule -action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. +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 Cryptomining"] +action.escu.analytic_story = ["AWS User Monitoring"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = EC2 Instance Started With Previously Unseen Instance Type +action.correlationsearch.label = Detect Spike in AWS API Activity action.notable = 1 -action.notable.param.nes_fields = instanceType -action.notable.param.rule_description = The EC2 instance type $instanceType$ was used for the first time to create $dest$. -action.notable.param.rule_title = New EC2 Instance Type $instanceType$ detected -action.notable.param.security_domain = endpoint +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 EC2 Launch Details\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 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_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 = dest +alert.suppress.fields = user alert.suppress.period = 14400s cron_schedule = 0 * * * * -description = This search looks for EC2 instances being created with previously unseen instance types. +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 @@ -6396,7 +6170,101 @@ 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 | 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 +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 - Detect PsExec With accepteula Flag - Rule] +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.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 +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 + +[ESCU - Identify Systems Receiving Remote Desktop Traffic] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-04-24 +action.escu.modification_date = 2017-09-15 +action.escu.channel = ESCU +action.escu.eli5 = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. +action.escu.how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Identify Systems Receiving Remote Desktop Traffic +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 = ["Lateral Movement"] +description = This search counts the numbers of times the system has created remote desktop traffic +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=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.dest | `drop_dm_object_name("All_Traffic")` | sort - count + +[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 @@ -6413,7 +6281,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", "Windows Service Abuse", "Orangeworm Attack Group", "DHS Report TA18-074A", "Disabling Security Tools"] +action.escu.analytic_story = ["Disabling Security Tools", "Windows Persistence Techniques", "Orangeworm Attack Group", "Windows Service Abuse", "DHS Report TA18-074A"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Sc.exe Manipulating Windows Services action.notable = 1 @@ -6447,56 +6315,6 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*sc.exe* AND (cmdline="* create *" OR cmdline="* config *") | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` -[ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-07-08 -action.escu.modification_date = 2017-09-18 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = Clients should be resolving their DNS requests via a trusted DNS server. This search will identify DNS queries being sent to unauthorized DNS servers by comparing the destination and source of the traffic with assets marked as DNS servers. -action.escu.how_to_implement = To successfully implement this search you will need to ensure that DNS data is populating the Network_Resolution data model. It also requires that your DNS servers are identified correctly in the Assets and Identity table of Enterprise Security. -action.escu.data_models = ["Network_Resolution"] -action.escu.full_search_name = ESCU - DNS Query Requests Resolved by Unauthorized DNS Servers - Rule -action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} -action.escu.known_false_positives = Legitimate DNS activity can be detected in this search. Investigate, verify and update the list of authorized DNS servers as appropriate. -action.escu.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["DNS Hijacking", "Command and Control", "Suspicious DNS Traffic"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = DNS Query Requests Resolved by Unauthorized DNS Servers -action.notable = 1 -action.notable.param.nes_fields = dest, src -action.notable.param.rule_description = The table represents a list of unauthorized DNS servers interacting with hosts in your network -action.notable.param.rule_title = DNS requests resolved by unauthorized DNS 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 - ESCU - Get DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get Process responsible for the DNS traffic\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 = 40 -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 will detect DNS requests resolved by unauthorized DNS servers. Legitimate DNS servers should be identified in the Enterprise Security Assets and Identity Framework. -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 from datamodel=Network_Resolution where DNS.dest_category != dns_server AND DNS.src_category != dns_server by DNS.src DNS.dest | `drop_dm_object_name("DNS")` - [ESCU - Detect Spike in S3 Bucket deletion - Rule] action.escu = 0 action.escu.enabled = 1 @@ -6584,7 +6402,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 = ["SamSam Ransomware", "Ransomware", "Windows Log Manipulation"] +action.escu.analytic_story = ["Windows Log Manipulation", "SamSam Ransomware", "Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Deleting Shadow Copies action.notable = 1 @@ -6593,7 +6411,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 Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -6653,7 +6471,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 EC2 Activities", "Unusual AWS EC2 Modifications", "Suspicious AWS S3 Activities", "Suspicious AWS Login Activities", "AWS Network ACL Activity"] +action.escu.analytic_story = ["AWS Network ACL Activity", "Suspicious AWS S3 Activities", "Suspicious AWS EC2 Activities", "Suspicious AWS Login Activities", "Unusual AWS EC2 Modifications"] action.escu.fields_required = ["arn"] action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 @@ -6664,45 +6482,46 @@ 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 - Schtasks used for forcing a reboot - Rule] +[ESCU - Large Volume of DNS ANY Queries - 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.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 = 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.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.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.providing_technologies = ["Splunk Stream", "Bro"] +action.escu.analytic_story = ["DNS Amplification Attacks"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Schtasks used for forcing a reboot +action.correlationsearch.label = Large Volume of DNS ANY Queries 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 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.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 = 80 +action.risk.param._risk_score = 60 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 +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 @@ -6711,7 +6530,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)` +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 - Count of assets by category] action.escu = 0 @@ -6749,7 +6568,7 @@ action.escu.full_search_name = ESCU - Get Email Info 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", "Brand Monitoring"] +action.escu.analytic_story = ["Brand Monitoring", "Suspicious Emails"] action.escu.fields_required = ["message_id"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 7200 @@ -6804,6 +6623,105 @@ 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.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["SamSam Ransomware", "Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Common Ransomware Extensions +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.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 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 = 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 +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 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 - Abnormally High AWS Instances Terminated 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 terminated by a particular user. Since we want to detect a high number of instances terminated within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances terminated by a particular user, as well as the average- and standard-deviation values. Assign a `threshold_value` in the search. Try starting with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier to 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. We then filter out outliers with a value of 1 and show only those instance-termination events that happened within the previous 10 minutes. +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 - Abnormally High AWS Instances Terminated 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 with your AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify whether this search alerted on a human user. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Abnormally High AWS Instances Terminated by User +action.notable = 1 +action.notable.param.nes_fields = userName +action.notable.param.rule_description = An abnormally high number of instances were terminated by a user in a 10-minute window +action.notable.param.rule_title = High number of instances terminated by $userName$ +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 Instance Details by instanceId\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 - ESCU - Investigate AWS activities via region name\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.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 an abnormally high number of instances were successfully terminated by a user in a 10-minute window +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=TerminateInstances errorCode=success | bucket span=10m _time | stats count AS instances_terminated by _time userName | eventstats avg(instances_terminated) as total_terminations_avg, stdev(instances_terminated) as total_terminations_stdev | eval threshold_value = 4 | eval isOutlier=if(instances_terminated > total_terminations_avg+(total_terminations_stdev * threshold_value), 1, 0) | search isOutlier=1 AND _time >= relative_time(now(), "-10m@m")| eval num_standard_deviations_away = round(abs(instances_terminated - total_terminations_avg) / total_terminations_stdev, 2) |table _time, userName, instances_terminated, num_standard_deviations_away, total_terminations_avg, total_terminations_stdev + [ESCU - Extended Period Without Successful Netbackup Backups - Rule] action.escu = 0 action.escu.enabled = 1 @@ -6876,54 +6794,28 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:description id={networkAclId} | table id account_id vpc_id network_acl_entries{}.* -[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 - Reg.exe Manipulating Windows Services Registry Keys - Rule] action.escu = 0 @@ -7187,7 +7079,7 @@ 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 = ["Suspicious Command-Line Executions", "Credential Dumping", "SamSam Ransomware", "Emotet Malware (TA18-201A)", "Ransomware", "Suspicious Emails", "Netsh Abuse", "Host Redirection", "Monitor for Unauthorized Software", "Brand Monitoring", "Orangeworm Attack Group", "Unusual Processes"] +action.escu.analytic_story = ["Credential Dumping", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Unusual Processes", "Brand Monitoring", "SamSam Ransomware", "Monitor for Unauthorized Software", "Host Redirection", "Suspicious Emails", "Ransomware"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -7198,67 +7090,44 @@ schedule_window = auto is_visible = false search = | from datamodel Web.Web | search src={dest} -[ESCU - Get All AWS Activity From City] +[ESCU - Execution of File with Multiple Extensions - Rule] 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 - -[ESCU - Malicious PowerShell Process - Encoded Command - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2016-09-18 -action.escu.modification_date = 2018-12-03 +action.escu.creation_date = 2018-01-26 +action.escu.modification_date = 2018-11-02 action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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.confidence = high +action.escu.eli5 = This search uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. +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. action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Malicious PowerShell Process - Encoded Command - 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 = System administrators may use this option, but it's not common. +action.escu.full_search_name = ESCU - Execution of File with Multiple Extensions - 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 = ["Malicious PowerShell"] +action.escu.analytic_story = ["Windows File Extension and Association Abuse"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Malicious PowerShell Process - Encoded Command +action.correlationsearch.label = Execution of File with Multiple Extensions 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 has an encoded command on the command-line -action.notable.param.rule_title = PowerShell process with an encoded command detected on $dest$ +action.notable.param.nes_fields = dest, process +action.notable.param.rule_description = The system $dest$ executed a file with a double extension. +action.notable.param.rule_title = Process With Multiple Extensions 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 Process Info\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 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 = 60 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest, user, process_name -alert.suppress.period = 14400s +alert.suppress.fields = dest, process +alert.suppress.period = 28800s cron_schedule = 0 * * * * -description = This search looks for PowerShell processes that have encoded the script within the command-line. Malware has been seen using this parameter, as it obfuscates the code and makes it relatively easy to pass a script on the command-line. +description = This search looks for processes launched from files that have double extensions in the file name. This is typically done to obscure the "real" file extension and make it appear as though the file being accessed is a data file, as opposed to executable content. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -7269,30 +7138,7 @@ 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=*-EncodedCommand* OR process=*-enc* - -[ESCU - Add Prohibited Processes to Enterprise Security] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-06-27 -action.escu.modification_date = 2017-09-15 -action.escu.channel = ESCU -action.escu.eli5 = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. -action.escu.how_to_implement = This search should be run on each new install of ESCU. -action.escu.data_models = [] -action.escu.full_search_name = ESCU - Add Prohibited Processes to Enterprise Security -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"] -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 -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | inputlookup interesting_processes_lookup | search note!=ESCU* | inputlookup append=T prohibitedProcesses_lookup | fillnull value=* dest dest_pci_domain | fillnull value=false is_required is_secure | fillnull value=true is_prohibited | outputlookup interesting_processes_lookup | stats count +search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process = *.doc.exe OR Processes.process = *.htm.exe OR Processes.process = *.html.exe OR Processes.process = *.txt.exe OR Processes.process = *.pdf.exe OR Processes.process = *.doc.exe by Processes.dest Processes.user Processes.process Processes.parent_process | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name(Processes)` [ESCU - Monitor Email For Brand Abuse - Rule] action.escu = 0 @@ -7367,54 +7213,28 @@ 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] +[ESCU - Add Prohibited Processes to Enterprise Security] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2016-09-13 +action.escu.creation_date = 2017-06-27 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 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.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Lateral Movement"] -action.correlationsearch.enabled = 1 -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 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 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 = 50 -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 +action.escu.eli5 = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. +action.escu.how_to_implement = This search should be run on each new install of ESCU. +action.escu.data_models = [] +action.escu.full_search_name = ESCU - Add Prohibited Processes to Enterprise Security +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"] +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 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* cmdline="*/create*" cmdline="* /s *" | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` +search = | inputlookup interesting_processes_lookup | search note!=ESCU* | inputlookup append=T prohibitedProcesses_lookup | fillnull value=* dest dest_pci_domain | fillnull value=false is_required is_secure | fillnull value=true is_prohibited | outputlookup interesting_processes_lookup | stats count [ESCU - Single Letter Process On Endpoint - Rule] action.escu = 0 @@ -7565,29 +7385,55 @@ schedule_window = auto is_visible = false search = sourcetype="stream:http" http_method=POST http_content_length>1 | regex form_data="(?i)java\.lang\.(?:runtime|processbuilder)" | rename src_ip as src | stats count earliest(_time) as firstTime, latest(_time) as lastTime, values(url) as uri, values(status) as status, values(http_user_agent) as http_user_agent by src, dest | convert ctime(firstTime) ctime(lastTime) -[ESCU - Get First Occurrence and Last Occurrence of a MAC Address] +[ESCU - Remote Desktop Network Traffic - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-14 -action.escu.modification_date = 2017-09-13 +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.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. +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 = ["Lateral Movement", "SamSam Ransomware", "Hidden Cobra Malware"] +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 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 Outbound Emails to Hidden Cobra Threat Actors\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 = 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 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)` +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 - Monitor DNS For Brand Abuse - Rule] action.escu = 0 @@ -7834,27 +7680,78 @@ 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 - Baseline of API Calls per User ARN] +[ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-09 -action.escu.modification_date = 2018-04-09 +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.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.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 +action.escu.creation_date = 2018-01-08 +action.escu.modification_date = 2018-01-08 +action.escu.channel = ESCU +action.escu.eli5 = 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. +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.data_models = ["Change_Analysis"] +action.escu.full_search_name = ESCU - Systems Ready for Spectre-Meltdown Windows Patch 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 +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Spectre And Meltdown Vulnerabilities"] +description = Some AV applications can cause the Spectre/Meltdown patch for Windows not to install successfully. This registry key is supposed to be created by the AV engine when it has been patched to be able to handle the Windows patch. If this key has been written, the system can then be patched for Spectre and Meltdown. +dispatch.earliest_time = -1d@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 +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="HKLM\Software\Microsoft\Windows\CurrentVersion\QualityCompat*") by All_Changes.dest, All_Changes.command, All_Changes.user, All_Changes.object, All_Changes.object_path | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` [ESCU - Get EC2 Launch Details] action.escu = 0 @@ -7879,111 +7776,44 @@ 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 - AWS Cross Account Activity From Previously Unseen Account - Rule] +[ESCU - Attempt To Add Certificate To Untrusted Store - Rule] action.escu = 0 action.escu.enabled = 1 -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 = 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 = ["AWS"] -action.escu.analytic_story = ["AWS Cross Account Activity"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = AWS Cross Account Activity From Previously Unseen Account -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.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_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 = 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 -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=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 -action.escu.enabled = 1 -action.escu.creation_date = 2017-04-21 -action.escu.modification_date = 2017-09-19 +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 = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. -action.escu.how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. -action.escu.data_models = ["Email"] -action.escu.full_search_name = ESCU - Email Attachments With Lots Of Spaces - 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.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 = ["Microsoft Exchange"] -action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "Suspicious Emails"] +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 = Email Attachments With Lots Of Spaces +action.correlationsearch.label = Attempt To Add Certificate To Untrusted Store action.notable = 1 -action.notable.param.nes_fields = src_user, file_name -action.notable.param.rule_description = The sender $src_user$ has sent an email with a suspicious amount of spaces in the file name: $file_name$ -action.notable.param.rule_title = Suspicious Email Attachment from $src_user$ -action.notable.param.security_domain = network +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 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.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_user -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 60 +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 = src_user +alert.suppress.fields = process, dest alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = Attackers often use spaces as a means to obfuscate an attachment's file extension. This search looks for messages with email attachments that have many spaces within the filename. +description = Attempt to add a certificate to the untrusted certificate store dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -7994,7 +7824,52 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count values(All_Email.recipient) as recipient_address min(_time) as firstTime max(_time) as lastTime from datamodel=Email where All_Email.file_name="*" by All_Email.src_user, All_Email.file_name All_Email.message_id | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name("All_Email")` | eval space_ratio = (mvcount(split(file_name," "))-1)/len(file_name) | search space_ratio >= 0.1 | rex field=recipient_address "(?.*)@" +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 - 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 = ["SamSam Ransomware", "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 + +[ESCU - Baseline of blocked outbound traffic from AWS] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-04-26 +action.escu.modification_date = 2018-05-07 +action.escu.channel = ESCU +action.escu.eli5 = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. +action.escu.full_search_name = ESCU - Baseline of blocked outbound traffic from AWS +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", "Command and Control", "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 +disabled=true +realtime_schedule = 0 +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 - Previously seen users in CloudTrail] action.escu = 0 @@ -8103,7 +7978,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 = ["DNS Hijacking", "Dynamic DNS", "Command and Control", "Suspicious DNS Traffic"] +action.escu.analytic_story = ["Dynamic DNS", "Suspicious DNS Traffic", "Command and Control", "DNS Hijacking"] action.escu.fields_required = ["src_ip", "dest_ip"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -8130,7 +8005,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", "Emotet Malware (TA18-201A)", "Monitor for Unauthorized Software"] +action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "SamSam Ransomware", "Monitor for Unauthorized Software"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Prohibited Software On Endpoint action.notable = 1 @@ -8214,29 +8089,6 @@ 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] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-06-24 -action.escu.modification_date = 2017-09-13 -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.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 -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 - [ESCU - Detect Spike in Security Group Activity - Rule] action.escu = 0 action.escu.enabled = 1 @@ -8422,7 +8274,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "New Service"], "kill_chai action.escu.known_false_positives = A previously unseen service is not necessarily malicious. Verify that the service is legitimate and that was installed by a legitimate process. action.escu.search_type = detection action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Windows Service Abuse", "Orangeworm Attack Group"] +action.escu.analytic_story = ["Orangeworm Attack Group", "Windows Service Abuse"] action.correlationsearch.enabled = 1 action.correlationsearch.label = First Time Seen Running Windows Service action.notable = 1 @@ -8431,7 +8283,7 @@ action.notable.param.rule_description = The service $serviceName$ is running on action.notable.param.rule_title = First Time Seen Windows Service $serviceName$ 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 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 @@ -8472,7 +8324,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious MSHTA Activity", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Ransomware", "Suspicious Windows Registry Activities", "DHS Report TA18-074A"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Suspicious MSHTA Activity", "Suspicious Windows Registry Activities", "Ransomware", "DHS Report TA18-074A"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Registry Keys Used For Persistence action.notable = 1 @@ -8729,6 +8581,30 @@ 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)` +[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 - Attempt To Stop Security Service - Rule] action.escu = 0 action.escu.enabled = 1 @@ -8778,6 +8654,55 @@ schedule_window = auto is_visible = false search = sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational (process=net.exe OR process=sc.exe) cmdline="* stop *" | lookup security_services_lookup service as cmdline OUTPUTNEW category, description | search category=security | table _time, dest, user, parent_process, cmdline, description +[ESCU - WMI Permanent Event Subscription - 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 Windows event ID 5861. +action.escu.how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. +action.escu.full_search_name = ESCU - WMI Permanent Event Subscription - 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 +action.notable = 1 +action.notable.param.nes_fields = dest +action.notable.param.rule_description = This search looks for the creation of a permanent WMI event subscription via Windows event 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 +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="wineventlog:microsoft-windows-wmi-activity/operational" EventCode=5861 Binding | rex field=Message "Consumer =\s+(?[^;|^$]+)" | search consumer!="NTEventLogEventConsumer=\"SCM Event Log Consumer\"" | stats count min(_time) as firstTime max(_time) as lastTime by ComputerName, consumer, Message | `ctime(firstTime)`| `ctime(lastTime)` | rename ComputerName as dest + [ESCU - Previously seen API call per user roles in CloudTrail] action.escu = 0 action.escu.enabled = 1 @@ -8816,7 +8741,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "Accessibility Features"], 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 Privilege Escalation", "Unusual Processes"] +action.escu.analytic_story = ["Unusual Processes", "Windows Privilege Escalation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Uncommon Processes On Endpoint action.notable = 1 @@ -8825,7 +8750,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 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 - 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 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 @@ -8850,56 +8775,6 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Application_State by All_Application_State.dest All_Application_State.user All_Application_State.process | `ctime(firstTime)`| `ctime(lastTime)` | `drop_dm_object_name("All_Application_State")` | `uncommon_processes` -[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 = ["SamSam Ransomware", "Hidden Cobra Malware", "Lateral Movement"] -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 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 = 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 - Registry Keys for Creating SHIM Databases - Rule] action.escu = 0 action.escu.enabled = 1 @@ -8950,6 +8825,56 @@ 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 - Monitor Web Traffic For Brand Abuse - 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.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.search_type = detection +action.escu.providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] +action.escu.analytic_story = ["Brand Monitoring"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Monitor Web Traffic For Brand Abuse +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.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 = 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 = src +alert.suppress.period = 86400s +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. +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` 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 - Remote Process Instantiation via WMI - Rule] action.escu = 0 action.escu.enabled = 1 @@ -8965,7 +8890,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "Windows Management Instru action.escu.known_false_positives = The wmic.exe utility is a benign Windows application. It may be used legitimately by Administrators with these parameters for remote system administration, but it's relatively uncommon. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Ransomware", "Suspicious WMI Use"] +action.escu.analytic_story = ["Suspicious WMI Use", "Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Remote Process Instantiation via WMI action.notable = 1 @@ -8974,7 +8899,7 @@ action.notable.param.rule_description = This search looks for wmic.exe being lau action.notable.param.rule_title = Remote process instantiation via WMI 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.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.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -9071,6 +8996,55 @@ 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 - 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 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.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Lateral Movement"] +action.correlationsearch.enabled = 1 +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 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 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 = 50 +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 +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) 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 - EC2 Instance Started With Previously Unseen AMI - Rule] action.escu = 0 action.escu.enabled = 1 @@ -9158,7 +9132,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 = ["Command and Control", "Suspicious DNS Traffic", "Data Protection"] +action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control", "Data Protection"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detection of DNS Tunnels action.notable = 1 @@ -9192,44 +9166,44 @@ 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 - Malicious PowerShell Process - Encoded Command - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-08-28 -action.escu.modification_date = 2018-12-02 +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 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.confidence = medium +action.escu.eli5 = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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 - 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.full_search_name = ESCU - Malicious PowerShell Process - Encoded Command - 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 = System administrators may use this option, 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 = ["Credential Dumping"] +action.escu.analytic_story = ["Malicious PowerShell"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Attempted Credential Dump From Registry Via Reg.exe +action.correlationsearch.label = Malicious PowerShell Process - Encoded Command 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.rule_description = The system $dest$ executed a PowerShell process that has an encoded command on the command-line +action.notable.param.rule_title = PowerShell process with an encoded command 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.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 = 20 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = process_name, dest -alert.suppress.period = 86400s +alert.suppress.fields = dest, user, process_name +alert.suppress.period = 14400s 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, +description = This search looks for PowerShell processes that have encoded the script within the command-line. Malware has been seen using this parameter, as it obfuscates the code and makes it relatively easy to pass a script on the command-line. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -9240,7 +9214,7 @@ 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 = | 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=*-EncodedCommand* OR process=*-enc* [ESCU - Unusually Long Command Line - Rule] action.escu = 0 @@ -9256,7 +9230,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Ransomware", "Unusual Processes"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Unusual Processes", "Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Unusually Long Command Line action.notable = 1 @@ -9265,7 +9239,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 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 - 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 Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -9290,67 +9264,44 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` | eval cmdlen=len(cmdline) | eventstats stdev(cmdlen) as stdev, avg(cmdlen) as avg by dest | stats max(cmdlen) as maxlen, values(stdev) as stdevperhost, values(avg) as avgperhost by dest, process,cmdline| eval threshold = 10 | where maxlen > ((threshold*stdevperhost) + avgperhost) -[ESCU - Baseline of blocked outbound traffic from AWS] +[ESCU - Email Attachments With Lots Of Spaces - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-26 -action.escu.modification_date = 2018-05-07 +action.escu.creation_date = 2017-04-21 +action.escu.modification_date = 2017-09-19 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. -action.escu.full_search_name = ESCU - Baseline of blocked outbound traffic from AWS +action.escu.confidence = high +action.escu.eli5 = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. +action.escu.how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. +action.escu.data_models = ["Email"] +action.escu.full_search_name = ESCU - Email Attachments With Lots Of Spaces - 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 = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS Traffic", "Command and Control", "AWS Network ACL Activity"] -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 -disabled=true -realtime_schedule = 0 -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] -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.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.escu.providing_technologies = ["Microsoft Exchange"] +action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "Suspicious Emails"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = AWS Cloud Provisioning From Previously Unseen IP Address +action.correlationsearch.label = Email Attachments With Lots Of Spaces 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.nes_fields = src_user, file_name +action.notable.param.rule_description = The sender $src_user$ has sent an email with a suspicious amount of spaces in the file name: $file_name$ +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 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_ip -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 30 +action.risk.param._risk_object = src_user +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 60 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = src_ip -alert.suppress.period = 14400s +alert.suppress.fields = src_user +alert.suppress.period = 86400s 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." +description = Attackers often use spaces as a means to obfuscate an attachment's file extension. This search looks for messages with email attachments that have many spaces within the filename. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -9361,30 +9312,79 @@ 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 values(All_Email.recipient) as recipient_address 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")` | eval space_ratio = (mvcount(split(file_name," "))-1)/len(file_name) | search space_ratio >= 0.1 | rex field=recipient_address "(?.*)@" -[ESCU - Identify Systems Receiving Remote Desktop Traffic] +[ESCU - Count of Unique IPs Connecting to Ports] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-24 -action.escu.modification_date = 2017-09-15 +action.escu.creation_date = 2017-06-24 +action.escu.modification_date = 2017-09-13 action.escu.channel = ESCU -action.escu.eli5 = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. -action.escu.how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. +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 - Identify Systems Receiving Remote Desktop 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 = ["Lateral Movement"] -description = This search counts the numbers of times the system has created remote desktop traffic +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 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count from datamodel=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.dest | `drop_dm_object_name("All_Traffic")` | sort - count +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 - EC2 Instance Started With Previously Unseen Instance Type - Rule] +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.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. +action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule +action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +action.escu.known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. +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 Instance Type +action.notable = 1 +action.notable.param.nes_fields = instanceType +action.notable.param.rule_description = The EC2 instance type $instanceType$ was used for the first time to create $dest$. +action.notable.param.rule_title = New EC2 Instance Type $instanceType$ 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 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 instance types. +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 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 - Get Risk Modifiers For Endpoint] action.escu = 0 @@ -9399,7 +9399,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "Suspicious MSHTA Activity", "DNS Amplification Attacks", "Monitor for Updates", "SamSam Ransomware", "Malicious PowerShell", "Asset Tracking", "Prohibited Traffic Allowed or Protocol Mismatch", "Splunk Enterprise Vulnerability CVE-2018-11409", "Emotet Malware (TA18-201A)", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "Windows Persistence Techniques", "Account Monitoring and Controls", "Hidden Cobra Malware", "Ransomware", "Suspicious Windows Registry Activities", "Suspicious Emails", "DNS Hijacking", "Windows Log Manipulation", "Lateral Movement", "Windows Service Abuse", "Netsh Abuse", "Dynamic DNS", "Host Redirection", "Monitor Backup Solution", "Spectre And Meltdown Vulnerabilities", "Command and Control", "JBoss Vulnerability", "Monitor for Unauthorized Software", "Brand Monitoring", "Suspicious WMI Use", "Router & Infrastructure Security", "Orangeworm Attack Group", "Suspicious DNS Traffic", "Windows Privilege Escalation", "DHS Report TA18-074A", "Windows File Extension and Association Abuse", "Unusual Processes", "SQL Injection", "ColdRoot MacOS RAT", "Collection and Staging", "Disabling Security Tools", "Data Protection"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "JBoss Vulnerability", "Splunk Enterprise Vulnerability CVE-2018-11409", "Dynamic DNS", "Unusual Processes", "Brand Monitoring", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "ColdRoot MacOS RAT", "Suspicious DNS Traffic", "Command and Control", "SamSam Ransomware", "DNS Amplification Attacks", "Router & Infrastructure Security", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Host Redirection", "Suspicious Emails", "Ransomware", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "Monitor Backup Solution", "DHS Report TA18-074A", "Use of Cleartext Protocols", "DNS Hijacking", "Prohibited Traffic Allowed or Protocol Mismatch"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 From 79c296aaa1c08ed284a8f098345fca5e472fcad9 Mon Sep 17 00:00:00 2001 From: divious1 Date: Wed, 27 Feb 2019 20:11:59 -0500 Subject: [PATCH 10/18] removing extra quote --- escu/searches/detection_dns_record_changed.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escu/searches/detection_dns_record_changed.json b/escu/searches/detection_dns_record_changed.json index 432b00c83a..16e3f5bd59 100644 --- a/escu/searches/detection_dns_record_changed.json +++ b/escu/searches/detection_dns_record_changed.json @@ -34,7 +34,7 @@ ] }, "eli5": "Using a lookup `discover_dns_records` generated by support search \"Discover DNS records\" we check previous network traffic and make sure the responses have not changed.", - "how_to_implement": "To successfully implement this search you will need to ensure that DNS data is populating the `Network_Resolution` data model. It also requires that the `discover_dns_record` lookup table be populated by the included support search \"Discover DNS record\".

Splunk>Phantom Playbook Integration

If Splunk>Phantom is also configured in your environment, a Playbook called \"DNS Hijack Investigation\" can be configured to run when any results are found by this detection search. The playbook takes in the DNS record changed and uses Geoip, whois, Censys and PassiveTotal to detect if DNS issuers changed. To use this integration, install the Phantom App for Splunk https://splunkbase.splunk.com/app/3411/, add the correct hostname to the \"Phantom Instance\" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active.
(Playbook Link:https://my.phantom.us/4.1/playbook/dns-hijack-investigation/).

\"", + "how_to_implement": "To successfully implement this search you will need to ensure that DNS data is populating the `Network_Resolution` data model. It also requires that the `discover_dns_record` lookup table be populated by the included support search \"Discover DNS record\".

Splunk>Phantom Playbook Integration

If Splunk>Phantom is also configured in your environment, a Playbook called \"DNS Hijack Investigation\" can be configured to run when any results are found by this detection search. The playbook takes in the DNS record changed and uses Geoip, whois, Censys and PassiveTotal to detect if DNS issuers changed. To use this integration, install the Phantom App for Splunk https://splunkbase.splunk.com/app/3411/, add the correct hostname to the \"Phantom Instance\" field in the Adaptive Response Actions when configuring this detection search, and set the corresponding Playbook to active.
(Playbook Link:https://my.phantom.us/4.1/playbook/dns-hijack-investigation/).

", "known_false_positives": "Legitimate DNS changes can be detected in this search. Investigate, verify and update the list of provided current answers for the domains in question as appropriate.", "maintainers": [ { From d6b423ba1456ebfe98c8fe290adde5bb9179f566 Mon Sep 17 00:00:00 2001 From: research bot Date: Thu, 28 Feb 2019 01:18:00 +0000 Subject: [PATCH 11/18] updating src files [ci skip] --- src/default/analytic_stories.conf | 14 +- src/default/analyticstories.conf | 1288 ++++----- src/default/savedsearches.conf | 4410 ++++++++++++++--------------- 3 files changed, 2856 insertions(+), 2856 deletions(-) diff --git a/src/default/analytic_stories.conf b/src/default/analytic_stories.conf index bd448b1439..83d463f6a2 100644 --- a/src/default/analytic_stories.conf +++ b/src/default/analytic_stories.conf @@ -48,7 +48,7 @@ data_models = description = Monitor your AWS network infrastructure for bad configurations and malicious activity. Investigative searches help you probe deeper, when the facts warrant it. id = 2e8948a5-5239-406b-b56b-6c50ff268af4 version = 2.0 -mappings = {"mitre_attack": ["Command and Control", "Exfiltration", "Persistence"], "cis20": ["CIS 11", "CIS 12"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["DE.CM", "DE.AE", "DE.DP", "PR.AC"]} +mappings = {"mitre_attack": ["Command and Control", "Exfiltration", "Persistence"], "cis20": ["CIS 11", "CIS 12"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "nist": ["DE.DP", "DE.AE", "DE.CM", "PR.AC"]} modification_date = 2018-05-21 reference = ["https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_NACLs.html", "https://aws.amazon.com/blogs/security/how-to-help-prepare-for-ddos-attacks-by-reducing-your-attack-surface/"] providing_technologies = ["AWS", "Splunk Enterprise Security"] @@ -221,7 +221,7 @@ data_models = ["Application_State", "Authentication", "Endpoint", "Network_Traff description = Monitor for and investigate activities--such as suspicious writes to the Windows Recycling Bin or email servers sending high amounts of traffic to specific hosts, for example--that may indicate that an adversary is harvesting and exfiltrating sensitive data. id = 8e03c61e-13c4-4dcd-bfbe-5ce5a8dc031a version = 1.0 -mappings = {"mitre_attack": ["Commonly Used Port", "Data Staged", "Email Collection", "Collection"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.AE", "DE.CM"]} +mappings = {"mitre_attack": ["Commonly Used Port", "Data Staged", "Email Collection", "Collection"], "cis20": ["CIS 7", "CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.AE", "DE.CM"]} modification_date = 2018-11-02 reference = ["https://attack.mitre.org/wiki/Collection", "https://attack.mitre.org/wiki/Technique/T1074"] providing_technologies = ["Bro", "Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Splunk Enterprise Security", "Splunk Stream", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -241,7 +241,7 @@ data_models = ["Application_State", "Authentication", "Network_Resolution", "Net description = Detect and investigate tactics, techniques, and procedures leveraged by attackers to establish and operate command and control channels. Implants installed by attackers on compromised endpoints use these channels to receive instructions and send data back to the malicious operators. id = 943773c6-c4de-4f38-89a8-0b92f98804d8 version = 1.0 -mappings = {"mitre_attack": ["Command and Control", "Exfiltration Over Command and Control Channel", "Standard Non-Application Layer Protocol", "Commonly Used Port", "Exfiltration Over Alternative Protocol", "Exfiltration", "Standard Application Layer Protocol", "Defense Evasion"], "cis20": ["CIS 8", "CIS 9", "CIS 11", "CIS 12", "CIS 13", "CIS 3", "CIS 1"], "kill_chain_phases": ["Command and Control", "Delivery", "Actions on Objectives"], "nist": ["ID.AM", "PR.DS", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "DE.CM"]} +mappings = {"mitre_attack": ["Command and Control", "Exfiltration Over Command and Control Channel", "Standard Non-Application Layer Protocol", "Commonly Used Port", "Exfiltration Over Alternative Protocol", "Exfiltration", "Standard Application Layer Protocol", "Defense Evasion"], "cis20": ["CIS 8", "CIS 9", "CIS 11", "CIS 12", "CIS 13", "CIS 3", "CIS 1"], "kill_chain_phases": ["Command and Control", "Actions on Objectives", "Delivery"], "nist": ["ID.AM", "PR.DS", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "DE.CM"]} modification_date = 2018-07-24 reference = ["https://attack.mitre.org/wiki/Command_and_Control", "https://searchsecurity.techtarget.com/feature/Command-and-control-servers-The-puppet-masters-that-govern-malware"] providing_technologies = ["AWS", "Bluecoat", "Bro", "Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -401,7 +401,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", "Actions on Objectives", "Delivery", "Installation", "Command and Control"], "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", "Delivery", "Installation", "Command and Control", "Actions on Objectives"], "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"] @@ -799,7 +799,7 @@ data_models = ["Application_State", "Authentication", "Endpoint", "Network_Traff description = Leverage searches that allow you to detect and investigate unusual activities that might relate to the SamSam ransomware, including looking for file writes associated with SamSam, RDP brute force attacks, the presence of files with SamSam ransomware extensions, suspicious psexec use, and more. id = c4b89506-fbcf-4cb7-bfd6-527e54789604 version = 1.0 -mappings = {"mitre_attack": ["Exploitation of Vulnerability", "Execution", "Commonly Used Port", "Command-Line Interface", "Credential Access", "Lateral Movement", "Defense Evasion", "System Information Discovery", "Remote Desktop Protocol", "Discovery"], "cis20": ["CIS 3", "CIS 18", "CIS 8", "CIS 9", "CIS 10", "CIS 12", "CIS 2", "CIS 4", "CIS 16"], "kill_chain_phases": ["Delivery", "Actions on Objectives", "Reconnaissance", "Installation", "Command and Control"], "nist": ["ID.AM", "PR.DS", "ID.RA", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "PR.MA", "DE.CM"]} +mappings = {"mitre_attack": ["Exploitation of Vulnerability", "System Information Discovery", "Commonly Used Port", "Command-Line Interface", "Credential Access", "Lateral Movement", "Defense Evasion", "Execution", "Remote Desktop Protocol", "Discovery"], "cis20": ["CIS 3", "CIS 18", "CIS 8", "CIS 9", "CIS 10", "CIS 12", "CIS 2", "CIS 4", "CIS 16"], "kill_chain_phases": ["Delivery", "Actions on Objectives", "Reconnaissance", "Installation", "Command and Control"], "nist": ["ID.AM", "PR.DS", "ID.RA", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "PR.MA", "DE.CM"]} modification_date = 2018-12-14 reference = ["https://www.crowdstrike.com/blog/an-in-depth-analysis-of-samsam-ransomware-and-boss-spider/", "https://www.sophos.com/en-us/medialibrary/PDFs/technical-papers/SamSam-ransomware-chooses-Its-targets-carefully-wpna.pdf", "https://www.sophos.com/en-us/medialibrary/PDFs/technical-papers/SamSam-The-Almost-Six-Million-Dollar-Ransomware.pdf?cmp=26061"] providing_technologies = ["Apache", "Bluecoat", "Bro", "Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Nessus", "Netbackup", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -1072,7 +1072,7 @@ data_models = ["Application_State", "Authentication", "Change_Analysis", "Endpoi description = Monitor and detect registry changes initiated from remote locations, which can be a sign that an attacker has infiltrated your system. id = 2b1800dd-92f9-47dd-a981-fdf1351e5d55 version = 1.0 -mappings = {"mitre_attack": ["Modify Registry", "Local Port Monitor", "Application Shimming", "Lateral Movement", "Authentication Package", "Registry Run Keys / Start Folder", "AppInit DLLs", "Privilege Escalation", "Defense Evasion", "Accessibility Features", "Change Default File Association", "Persistence"], "cis20": ["CIS 5", "CIS 3", "CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.AE", "DE.CM", "PR.AC", "PR.IP"]} +mappings = {"mitre_attack": ["Modify Registry", "Local Port Monitor", "Authentication Package", "Lateral Movement", "Application Shimming", "Registry Run Keys / Start Folder", "AppInit DLLs", "Privilege Escalation", "Defense Evasion", "Accessibility Features", "Change Default File Association", "Persistence"], "cis20": ["CIS 5", "CIS 3", "CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.AE", "DE.CM", "PR.AC", "PR.IP"]} modification_date = 2018-12-03 reference = ["https://redcanary.com/blog/windows-registry-attacks-threat-detection/", "https://attack.mitre.org/wiki/Technique/T1112"] providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Splunk Enterprise Security", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -1147,7 +1147,7 @@ data_models = ["Email"] description = Monitor your environment for activity consistent with common attack techniques bad actors use when attempting to compromise web servers or other web-related assets. id = 31337aaa-bc22-4752-b599-ef112dq1dq7a version = 1.0 -mappings = {"mitre_attack": ["Valid Accounts", "Create Account"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 6", "CIS 16"], "nist": ["DE.CM", "DE.AE", "DE.DP"]} +mappings = {"mitre_attack": ["Valid Accounts", "Create Account"], "cis20": ["CIS 6", "CIS 16"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "DE.AE", "DE.CM"]} modification_date = 2018-10-08 reference = ["https://www.fbi.gov/scams-and-safety/common-fraud-schemes/internet-fraud", "https://www.fbi.gov/news/stories/2017-internet-crime-report-released-050718", "https://www.otalliance.org/news-events/press-releases/online-trust-alliance-reports-doubling-cyber-incidents-2017-0"] providing_technologies = ["Bro", "Microsoft Exchange", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream"] diff --git a/src/default/analyticstories.conf b/src/default/analyticstories.conf index 7b1935b6e0..842e1b1238 100644 --- a/src/default/analyticstories.conf +++ b/src/default/analyticstories.conf @@ -1073,28 +1073,6 @@ known_false_positives = Legitimate logon activity by authorized NTLM systems may providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - Detect Long DNS TXT Record Response - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. -how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. -annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} -known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. -providing_technologies = ["Splunk Stream", "Bro"] - - -[savedsearch://ESCU - Web Fraud - Password Sharing Across Accounts - Rule] -type = detection -asset_type = account -confidence = medium -explanation = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 -how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. -annotations = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. -providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] - - [savedsearch://ESCU - TOR Traffic - Rule] type = detection asset_type = Endpoint @@ -1127,23 +1105,25 @@ earliest_time_offset = 3600 latest_time_offset = 3600 -[savedsearch://ESCU - Monitor Successful Backups] -type = support -explanation = This search gives you the count and the hostname of all the systems that had a successful backup each day. -how_to_implement = To successfully implement this search you must be ingesting your backup logs. -known_false_positives = None at this time -providing_technologies = ["Netbackup"] - - -[savedsearch://ESCU - Detect API activity from users without MFA - Rule] +[savedsearch://ESCU - Detect Long DNS TXT Record Response - Rule] type = detection -asset_type = AWS Instance +asset_type = Endpoint 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"] +explanation = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. +how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. +annotations = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} +known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. +providing_technologies = ["Splunk Stream", "Bro"] + + +[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 - Baseline of Security Group Activity by ARN] @@ -1154,15 +1134,33 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Unsuccessful Netbackup backups - Rule] +[savedsearch://ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. -how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. -annotations = {"cis20": ["CIS 10"], "nist": ["PR.IP"]} -known_false_positives = None identified -providing_technologies = ["Netbackup"] +asset_type = AWS Instance +confidence = medium +explanation = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ +\ +1. Counts the number of blocked outbound connections by each source IP\ +\ +1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ +\ +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 `numberOfBlockedConnections` as `latestCount`.\ +\ +1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. +annotations = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} +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. +providing_technologies = ["AWS"] [savedsearch://ESCU - Detect processes used for System Network Configuration Discovery - Rule] @@ -1284,14 +1282,14 @@ known_false_positives = There may be other processes in your environment that us providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - EC2 Instance Modified With Previously Unseen User - Rule] +[savedsearch://ESCU - Detect S3 access from a new IP - 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. +asset_type = S3 Bucket +confidence = low +explanation = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. +annotations = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour providing_technologies = ["AWS"] @@ -1317,15 +1315,37 @@ known_false_positives = The activity may be legitimate. For this reason, it's be providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - Remote Desktop Network Bruteforce - Rule] +[savedsearch://ESCU - Detect Spike in S3 Bucket deletion - Rule] type = detection -asset_type = Endpoint +asset_type = S3 Bucket confidence = medium -explanation = This search monitors for abnormal amounts of remote-desktop (RDP) traffic from a source to a destination that may be indicative of a brute-force attack. It does this by filtering out RDP traffic from the Network_Traffic.All_Traffic data model, using twice the standard deviation of all source-to-destination connections. If any tuple is within more than two standard deviations of all other usual RDP traffic flows, it is indicative of a brute-force attack. -how_to_implement = You must ensure that your network traffic data is populating the Network_Traffic data model. -annotations = {"mitre_attack": ["Credential Access", "Remote Desktop Protocol", "Lateral Movement"], "kill_chain_phases": ["Reconnaissance", "Delivery"], "cis20": ["CIS 12", "CIS 9", "CIS 16"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} -known_false_positives = RDP gateways may have unusually high amounts of traffic from all other hosts' RDP applications in the network. -providing_technologies = ["Bro", "Splunk Stream"] +explanation = This search and its corresponding subsearch run through the following series of steps: \ +\ +1. Retrieve all the AWS CloudTrail log entries that have recorded AWS API calls specifically for deletion of S3 buckets.\ +\ +1. Kick off a subsearch that retrieves the same data and pulls out and converts the ARN into a more friendly format.\ +\ +1. Count the number of API calls per ARN.\ +\ +1. Load 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. Drop the count from the latest hour, since it is unnecessary, and merge the rest of the data with the results of the `stats` command. \ +\ +1. Rename `apiCalls` as `latestCount`.\ +\ +1. Calculate the new average value for each ARN with the latest count, weighting the past more heavily than the current hour. It does the same for the standard deviation—weighting the past more heavily than the current.\ +\ +1. Update the cache file with the latest results.\ +\ +1. Set the minimum threshold for the number of data points and the number of standard deviations away from the mean it must be to be considered a spike.\ +\ +1. Make 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 if the count is a sufficient number of standard deviations away from the average.\ +\ +1. Filter 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 the deleted S3 buckets, the number of unique API calls, and the total number of API calls for each of these user ARNs. +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. This search works best when you run the "Baseline of S3 Bucket deletion activity by ARN" support search once to create a baseline of previously seen S3 bucket-deletion activity. +annotations = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} +known_false_positives = Based on the values of`dataPointThreshold` and `deviationThreshold`, the false positive rate may vary. Please modify this according the your environment. +providing_technologies = ["AWS"] [savedsearch://ESCU - DNS record changed - Rule] @@ -1341,7 +1361,7 @@ If Splunk>Phantom is also configured in your environment, a Playbook called "DNS \ (Playbook Link:`https://my.phantom.us/4.1/playbook/dns-hijack-investigation/`).\ \ -" + annotations = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} known_false_positives = Legitimate DNS changes can be detected in this search. Investigate, verify and update the list of provided current answers for the domains in question as appropriate. providing_technologies = ["Splunk Stream", "Bro"] @@ -1358,39 +1378,12 @@ known_false_positives = As is common with many fraud-related searches, we are us providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] -[savedsearch://ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule] -type = detection -asset_type = Web Server -confidence = medium -explanation = This search returns the number of times a URL associated with this type of JexBoss probe is observed. -how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. -annotations = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} -known_false_positives = It's possible for legitimate HTTP requests to be made to URLs containing the suspicious paths. -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 - 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 - Discover DNS records] +type = support +explanation = Discover the DNS records and their answers for domains owned by the company using network traffic events. The discovered events are exported as a lookup named `discovered_dns_records.csv` +how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. Also make sure that the cim_corporate_web_domains and cim_corporate_email_domains lookups are populated with the domains owned by your corporation +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro"] [savedsearch://ESCU - Samsam Test File Write - Rule] @@ -1404,22 +1397,15 @@ known_false_positives = No false positives have been identified. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[savedsearch://ESCU - Previously Seen AWS Cross Account Activity] -type = support -explanation = In this support search, we look for **AssumeRole** events where the requesting account is different from the requested account. The first and last times these events are seen are written to 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. Validate the user name entries in `previously_seen_aws_cross_account_activity.csv`, a lookup file created by this support search. -known_false_positives = None at this time -providing_technologies = ["AWS"] - - -[savedsearch://ESCU - Investigate AWS activities via region name] -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 - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] +type = detection +asset_type = Windows +confidence = medium +explanation = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. +how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. +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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. +providing_technologies = ["Microsoft Windows"] [savedsearch://ESCU - AWS Network Access Control List Created with All Open Ports - Rule] @@ -1444,6 +1430,17 @@ known_false_positives = The activity may be legitimate. PowerShell is often used providing_technologies = ["Microsoft Windows"] +[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 - Detect Unauthorized Assets by MAC address - Rule] type = detection asset_type = Infrastructure @@ -1466,14 +1463,15 @@ known_false_positives = It is possible that your vulnerability scanner is not de providing_technologies = ["Nessus", "Qualys"] -[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 - Get Parent Process Info] @@ -1508,15 +1506,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 - Schtasks used for forcing a reboot - Rule] +[savedsearch://ESCU - Shim Database File Creation - 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"] +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"] [savedsearch://ESCU - Previously Seen EC2 Launches By User] @@ -1527,15 +1525,12 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] -type = detection -asset_type = Windows -confidence = medium -explanation = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. -how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. -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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. -providing_technologies = ["Microsoft Windows"] +[savedsearch://ESCU - Monitor Successful Backups] +type = support +explanation = This search gives you the count and the hostname of all the systems that had a successful backup each day. +how_to_implement = To successfully implement this search you must be ingesting your backup logs. +known_false_positives = None at this time +providing_technologies = ["Netbackup"] [savedsearch://ESCU - Suspicious Reg.exe Process - Rule] @@ -1560,36 +1555,31 @@ known_false_positives = Administrators may attempt to change the default executi providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[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 - 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 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 +[savedsearch://ESCU - Previously Seen AWS Cross Account Activity] +type = support +explanation = In this support search, we look for **AssumeRole** events where the requesting account is different from the requested account. The first and last times these events are seen are written to 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. Validate the user name entries in `previously_seen_aws_cross_account_activity.csv`, a lookup file created by this support search. known_false_positives = None at this time -providing_technologies = ["Microsoft Windows"] -earliest_time_offset = 86400 -latest_time_offset = 86400 +providing_technologies = ["AWS"] + + +[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 - 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] @@ -1640,14 +1630,14 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Get User Information from Identity Table] -type = contextual +[savedsearch://ESCU - Get All AWS Activity From Region] +type = investigative 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 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 = ["Splunk Enterprise Security"] -earliest_time_offset = 864000 -latest_time_offset = 86400 +providing_technologies = ["AWS"] +earliest_time_offset = 14400 +latest_time_offset = 0 [savedsearch://ESCU - Get DNS Server History for a host] @@ -1701,14 +1691,15 @@ known_false_positives = No known false positives for this detection. providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] -[savedsearch://ESCU - Get Notable Info] -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 = 3600 -latest_time_offset = 3600 +[savedsearch://ESCU - Email servers sending high volume traffic to hosts - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = This search may look complex, but it's a neat representation of how statistics can help you understand your dataset to bubble up events that are not normal compared to its behavior. The search consists of three parts. The first part of the SPL fetches the data you want to work on. In this search, we calculate the sum of bytes sent and bytes_out from systems categorized as email_server to each host. We then calculate the average and standard deviation for the bytes sent to all the hosts combined and on a per-host basis. Then we set threshold values to deviation_threshold and minimum_data_samples using eval statements. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. We then check for byte transfers that are statistically significantly higher than normal. The search then gives IP address of the host, the time of the increased byte transfer, how much data was transferred, and the average amount of data transfer the email server normally sends to all hosts and to this specific host. Finally, it includes the number of standard deviations away the byte count was from these averages. +how_to_implement = This search requires you to be ingesting your network traffic and populating the Network_Traffic data model. Your email servers must be categorized as "email_server" for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. +annotations = {"mitre_attack": ["Collection", "Email Collection", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} +known_false_positives = The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers. +providing_technologies = ["Bro", "Splunk Stream"] [savedsearch://ESCU - Excessive DNS Failures - Rule] @@ -1722,17 +1713,6 @@ known_false_positives = It is possible legitimate traffic can trigger this rule. providing_technologies = ["Splunk Stream", "Bro"] -[savedsearch://ESCU - File with Samsam Extension - Rule] -type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks at file modifications across your hosts and creates notable events when it identifies files with extensions associated with the SamSam ransomware, including `.stubbin`, `.berkshire`, `.satoshi`, `.sophos`, or `.keyxml`. Files with these extensions have been observed in SamSam attacks consisting of payload data or keying material. -how_to_implement = You must be ingesting data that records file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Installation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -known_false_positives = Because these extensions are not typically used in normal operations, you should investigate all results. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] - - [savedsearch://ESCU - DNS Query Length With High Standard Deviation - Rule] type = detection asset_type = Endpoint @@ -1763,14 +1743,15 @@ known_false_positives = None at this time providing_technologies = ["Splunk Stream", "Bro"] -[savedsearch://ESCU - Get Process responsible for the DNS traffic] -type = investigative -explanation = none -how_to_implement = You must be ingesting endpoint data that associates processes with network events. This can come from endpoint protection products such as carbon black, or endpoint data sources such as Sysmon. -known_false_positives = None at this time -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -earliest_time_offset = 3600 -latest_time_offset = 86400 +[savedsearch://ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule] +type = detection +asset_type = Web Server +confidence = medium +explanation = This search returns the number of times a URL associated with this type of JexBoss probe is observed. +how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. +annotations = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} +known_false_positives = It's possible for legitimate HTTP requests to be made to URLs containing the suspicious paths. +providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] [savedsearch://ESCU - WMI Temporary Event Subscription - Rule] @@ -1830,33 +1811,15 @@ 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 - Attempt To Add Certificate To Untrusted Store - 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. -providing_technologies = ["AWS"] +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 - Previously seen S3 bucket access by remote IP] @@ -1974,15 +1937,14 @@ known_false_positives = None identified providing_technologies = ["Microsoft Exchange"] -[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 - 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 - Create a list of approved AWS service accounts] @@ -2013,13 +1975,13 @@ earliest_time_offset = 1209600 latest_time_offset = 0 -[savedsearch://ESCU - Get All AWS Activity From Region] -type = investigative +[savedsearch://ESCU - Get Backup Logs For Endpoint] +type = contextual 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. +how_to_implement = You must be ingesting your backup logs. known_false_positives = None at this time -providing_technologies = ["AWS"] -earliest_time_offset = 14400 +providing_technologies = ["Netbackup"] +earliest_time_offset = 604800 latest_time_offset = 0 @@ -2034,14 +1996,21 @@ known_false_positives = Some legitimate printer-related processes may show up as providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] -type = detection -asset_type = Endpoint -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. +[savedsearch://ESCU - Get Process responsible for the DNS traffic] +type = investigative +explanation = none +how_to_implement = You must be ingesting endpoint data that associates processes with network events. This can come from endpoint protection products such as carbon black, or endpoint data sources such as Sysmon. +known_false_positives = None at this time +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +earliest_time_offset = 3600 +latest_time_offset = 86400 + + +[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. +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. +known_false_positives = None at this time providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -2086,13 +2055,13 @@ known_false_positives = None identified 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 @@ -2140,14 +2109,37 @@ known_false_positives = It is possible that a legitimate user is experiencing an providing_technologies = ["Microsoft Windows"] -[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. -known_false_positives = None at this time +[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"] -earliest_time_offset = 14400 -latest_time_offset = 0 [savedsearch://ESCU - RunDLL Loading DLL By Ordinal - Rule] @@ -2161,66 +2153,35 @@ known_false_positives = While not common, loading a DLL under %AppData% and call providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Email servers sending high volume traffic to hosts - Rule] +[savedsearch://ESCU - Get Notable Info] +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 = 3600 +latest_time_offset = 3600 + + +[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 - Windows hosts file modification - Rule] type = detection asset_type = Endpoint -confidence = medium -explanation = This search may look complex, but it's a neat representation of how statistics can help you understand your dataset to bubble up events that are not normal compared to its behavior. The search consists of three parts. The first part of the SPL fetches the data you want to work on. In this search, we calculate the sum of bytes sent and bytes_out from systems categorized as email_server to each host. We then calculate the average and standard deviation for the bytes sent to all the hosts combined and on a per-host basis. Then we set threshold values to deviation_threshold and minimum_data_samples using eval statements. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. We then check for byte transfers that are statistically significantly higher than normal. The search then gives IP address of the host, the time of the increased byte transfer, how much data was transferred, and the average amount of data transfer the email server normally sends to all hosts and to this specific host. Finally, it includes the number of standard deviations away the byte count was from these averages. -how_to_implement = This search requires you to be ingesting your network traffic and populating the Network_Traffic data model. Your email servers must be categorized as "email_server" for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. -annotations = {"mitre_attack": ["Collection", "Email Collection", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} -known_false_positives = The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers. -providing_technologies = ["Bro", "Splunk Stream"] - - -[savedsearch://ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] -type = detection -asset_type = AWS Instance -confidence = medium -explanation = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ -\ -1. Counts the number of blocked outbound connections by each source IP\ -\ -1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ -\ -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 `numberOfBlockedConnections` as `latestCount`.\ -\ -1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. -annotations = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} -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. -providing_technologies = ["AWS"] - - -[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 - Detect S3 access from a new IP - Rule] -type = detection -asset_type = S3 Bucket -confidence = low -explanation = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. -annotations = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour -providing_technologies = ["AWS"] +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 - Detect Large Outbound ICMP Packets - Rule] @@ -2283,35 +2244,33 @@ earliest_time_offset = 604800 latest_time_offset = 0 -[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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -earliest_time_offset = 7200 -latest_time_offset = 7200 - - -[savedsearch://ESCU - Spike in File Writes - Rule] +[savedsearch://ESCU - Unsuccessful Netbackup backups - 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"] +confidence = high +explanation = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. +how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. +annotations = {"cis20": ["CIS 10"], "nist": ["PR.IP"]} +known_false_positives = None identified +providing_technologies = ["Netbackup"] -[savedsearch://ESCU - Detect new API calls from user roles - Rule] +[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] type = detection -asset_type = AWS Instance +asset_type = S3 Bucket 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. +explanation = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. +annotations = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. providing_technologies = ["AWS"] @@ -2336,14 +2295,17 @@ 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] @@ -2431,12 +2393,15 @@ known_false_positives = Legitimate router connections may appear as new connecti providing_technologies = ["Active Directory", "Palo Alto Firewall"] -[savedsearch://ESCU - Discover DNS records] -type = support -explanation = Discover the DNS records and their answers for domains owned by the company using network traffic events. The discovered events are exported as a lookup named `discovered_dns_records.csv` -how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. Also make sure that the cim_corporate_web_domains and cim_corporate_email_domains lookups are populated with the domains owned by your corporation -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro"] +[savedsearch://ESCU - File with Samsam Extension - Rule] +type = detection +asset_type = Endpoint +confidence = high +explanation = This search looks at file modifications across your hosts and creates notable events when it identifies files with extensions associated with the SamSam ransomware, including `.stubbin`, `.berkshire`, `.satoshi`, `.sophos`, or `.keyxml`. Files with these extensions have been observed in SamSam attacks consisting of payload data or keying material. +how_to_implement = You must be ingesting data that records file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. +annotations = {"mitre_attack": [], "kill_chain_phases": ["Installation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +known_false_positives = Because these extensions are not typically used in normal operations, you should investigate all results. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] [savedsearch://ESCU - Investigate Successful Remote Desktop Authentications] @@ -2449,15 +2414,26 @@ 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 +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 - Scheduled tasks used in BadRabbit ransomware - Rule] +type = detection +asset_type = Endpoint 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"] +explanation = The search looks for execution of schtasks.exe with parameters that indicate that specific task names related to the Bad Rabbit ransomware were created or deleted. The specific task name used are rhaegal, drogon and viserion_. 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. +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": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +known_false_positives = No known false positives +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] [savedsearch://ESCU - EC2 Instance Started With Previously Unseen User - Rule] @@ -2471,6 +2447,17 @@ known_false_positives = It's possible that a user will start to create EC2 insta providing_technologies = ["AWS"] +[savedsearch://ESCU - Detect new user AWS Console Login - 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"] + + [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. @@ -2490,15 +2477,25 @@ known_false_positives = Administrators may use this legitimately to gather info providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Process Execution via WMI - Rule] +[savedsearch://ESCU - Registry Keys for Creating SHIM Databases - 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 processes launched via WMI, either remotely or locally, by looking for processes launched by WmiPrvSE.exe, which is the process WMI uses to execute new processes and commands. -how_to_implement = To successfully implement this search, you must 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": ["Execution", "Windows Management Instrumentation"], "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 wmi to execute commands for legitimate purposes. -providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] +explanation = In this search, we look for modifications to registry keys used for shim databases on Microsoft platforms via the object_category and object_path field in the Change_Analysis data model and give you the destination, command used to initiate the change, the user who conducted this activity, the resource affected(object), and the whole path of the object. An application compatibility shim is a small library that transparently intercepts an API (via hooking), changes the parameters passed, handles the operation itself, or redirects the operation elsewhere, such as additional code stored on a system. This capability can be also leveraged by attackers to create and store malicious files in a shim database as observed in CARBANAK backdoor. +how_to_implement = To successfully implement this search, you must populate the Change_Analysis data model. This is typically populated via endpoint detection and response products, such as Carbon Black or other endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. +annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +known_false_positives = There are many legitimate applications that leverage shim databases for compatibility purposes for legacy applications +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] @@ -2532,17 +2529,6 @@ earliest_time_offset = 172800 latest_time_offset = 86400 -[savedsearch://ESCU - Shim Database File Creation - Rule] -type = detection -asset_type = Endpoint -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"] - - [savedsearch://ESCU - Script Execution via WMI - Rule] type = detection asset_type = Endpoint @@ -2573,14 +2559,15 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[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 - 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 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"] [savedsearch://ESCU - Detect web traffic to dynamic domain providers - Rule] @@ -2633,37 +2620,15 @@ earliest_time_offset = 86400 latest_time_offset = 0 -[savedsearch://ESCU - Detect Spike in AWS API Activity - Rule] +[savedsearch://ESCU - Monitor Web Traffic For Brand Abuse - 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"] +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 - Detect PsExec With accepteula Flag - Rule] @@ -2677,19 +2642,14 @@ known_false_positives = Administrators can leverage PsExec for accessing remote providing_technologies = ["Sysmon"] -[savedsearch://ESCU - Identify Systems Receiving Remote Desktop Traffic] -type = support -explanation = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. -how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro"] - - -[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 +[savedsearch://ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule] +type = detection +asset_type = AWS Instance +confidence = medium +explanation = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. +annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. providing_technologies = ["AWS"] @@ -2704,37 +2664,15 @@ known_false_positives = Using sc.exe to manipulate Windows services is uncommon. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Detect Spike in S3 Bucket deletion - Rule] +[savedsearch://ESCU - Remote Desktop Network Bruteforce - Rule] type = detection -asset_type = S3 Bucket +asset_type = Endpoint confidence = medium -explanation = This search and its corresponding subsearch run through the following series of steps: \ -\ -1. Retrieve all the AWS CloudTrail log entries that have recorded AWS API calls specifically for deletion of S3 buckets.\ -\ -1. Kick off a subsearch that retrieves the same data and pulls out and converts the ARN into a more friendly format.\ -\ -1. Count the number of API calls per ARN.\ -\ -1. Load 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. Drop the count from the latest hour, since it is unnecessary, and merge the rest of the data with the results of the `stats` command. \ -\ -1. Rename `apiCalls` as `latestCount`.\ -\ -1. Calculate the new average value for each ARN with the latest count, weighting the past more heavily than the current hour. It does the same for the standard deviation—weighting the past more heavily than the current.\ -\ -1. Update the cache file with the latest results.\ -\ -1. Set the minimum threshold for the number of data points and the number of standard deviations away from the mean it must be to be considered a spike.\ -\ -1. Make 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 if the count is a sufficient number of standard deviations away from the average.\ -\ -1. Filter 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 the deleted S3 buckets, the number of unique API calls, and the total number of API calls for each of these user ARNs. -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. This search works best when you run the "Baseline of S3 Bucket deletion activity by ARN" support search once to create a baseline of previously seen S3 bucket-deletion activity. -annotations = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} -known_false_positives = Based on the values of`dataPointThreshold` and `deviationThreshold`, the false positive rate may vary. Please modify this according the your environment. -providing_technologies = ["AWS"] +explanation = This search monitors for abnormal amounts of remote-desktop (RDP) traffic from a source to a destination that may be indicative of a brute-force attack. It does this by filtering out RDP traffic from the Network_Traffic.All_Traffic data model, using twice the standard deviation of all source-to-destination connections. If any tuple is within more than two standard deviations of all other usual RDP traffic flows, it is indicative of a brute-force attack. +how_to_implement = You must ensure that your network traffic data is populating the Network_Traffic data model. +annotations = {"mitre_attack": ["Credential Access", "Remote Desktop Protocol", "Lateral Movement"], "kill_chain_phases": ["Reconnaissance", "Delivery"], "cis20": ["CIS 12", "CIS 9", "CIS 16"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} +known_false_positives = RDP gateways may have unusually high amounts of traffic from all other hosts' RDP applications in the network. +providing_technologies = ["Bro", "Splunk Stream"] [savedsearch://ESCU - Deleting Shadow Copies - Rule] @@ -2779,12 +2717,15 @@ known_false_positives = Legitimate ANY requests may trigger this search, however 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] @@ -2813,17 +2754,6 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Common Ransomware Extensions - 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"] - - [savedsearch://ESCU - Abnormally High AWS Instances Terminated by User - Rule] type = detection asset_type = AWS Instance @@ -2846,14 +2776,15 @@ 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] @@ -2877,15 +2808,22 @@ known_false_positives = It is unusual for a service to be created or modified by providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Scheduled tasks used in BadRabbit ransomware - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = The search looks for execution of schtasks.exe with parameters that indicate that specific task names related to the Bad Rabbit ransomware were created or deleted. The specific task name used are rhaegal, drogon and viserion_. 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. -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": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} -known_false_positives = No known false positives -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 - Investigate AWS activities via region name] +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 - AWS Cloud Provisioning From Previously Unseen Country - Rule] @@ -2933,15 +2871,12 @@ earliest_time_offset = 3600 latest_time_offset = 3600 -[savedsearch://ESCU - Execution of File with Multiple Extensions - Rule] -type = detection -asset_type = Endpoint -confidence = high -explanation = This search uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. -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. -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"] +[savedsearch://ESCU - Add Prohibited Processes to Enterprise Security] +type = support +explanation = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. +how_to_implement = This search should be run on each new install of ESCU. +known_false_positives = None at this time +providing_technologies = ["Splunk Enterprise Security"] [savedsearch://ESCU - Monitor Email For Brand Abuse - Rule] @@ -2955,6 +2890,17 @@ known_false_positives = None at this time providing_technologies = ["Microsoft Exchange", "Bro", "Splunk Stream"] +[savedsearch://ESCU - AWS Network Access Control List Deleted - Rule] +type = detection +asset_type = AWS Instance +confidence = medium +explanation = The search looks for CloudTrail events to detect whether any network ACLs have been deleted and gives you values of error messages and error codes (if any), user details, user source IP, the user who initiated this request, and the name of the event. +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. +annotations = {"mitre_attack": ["Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11"], "nist": ["DE.DP", "DE.AE"]} +known_false_positives = It's possible that a user has legitimately deleted a network ACL. +providing_technologies = ["AWS"] + + [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. @@ -2963,12 +2909,14 @@ known_false_positives = None at this time providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - Add Prohibited Processes to Enterprise Security] -type = support -explanation = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. -how_to_implement = This search should be run on each new install of ESCU. +[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 = ["Splunk Enterprise Security"] +providing_technologies = ["Microsoft Windows", "Linux", "macOS"] +earliest_time_offset = 43200 +latest_time_offset = 1 [savedsearch://ESCU - Single Letter Process On Endpoint - Rule] @@ -2993,6 +2941,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 - Suspicious Java Classes - Rule] type = detection asset_type = Endpoint @@ -3004,15 +2962,14 @@ known_false_positives = There are no known false positives. providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Apache"] -[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 - Monitor DNS For Brand Abuse - Rule] @@ -3056,6 +3013,17 @@ 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 @@ -3077,22 +3045,14 @@ earliest_time_offset = 14400 latest_time_offset = 0 -[savedsearch://ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule] +[savedsearch://ESCU - Malicious PowerShell Process - Encoded Command - 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. -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. -known_false_positives = None at this time +confidence = medium +explanation = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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 = System administrators may use this option, but it's not common. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -3106,33 +3066,54 @@ 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 - Get Backup Logs For Endpoint] +[savedsearch://ESCU - AWS Network ACL Details from ID] type = contextual explanation = none -how_to_implement = You must be ingesting your backup logs. +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 = ["Netbackup"] -earliest_time_offset = 604800 +providing_technologies = ["AWS"] +earliest_time_offset = 3600 latest_time_offset = 0 -[savedsearch://ESCU - Baseline of blocked outbound traffic from AWS] -type = support -explanation = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. +[savedsearch://ESCU - Email Attachments With Lots Of Spaces - Rule] +type = detection +asset_type = Endpoint +confidence = high +explanation = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. +how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. +annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} known_false_positives = None at this time -providing_technologies = ["AWS"] +providing_technologies = ["Microsoft Exchange"] [savedsearch://ESCU - Previously seen users in CloudTrail] @@ -3153,17 +3134,6 @@ earliest_time_offset = 14400 latest_time_offset = 0 -[savedsearch://ESCU - Detect New Open S3 buckets - Rule] -type = detection -asset_type = S3 Bucket -confidence = medium -explanation = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. -annotations = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. -providing_technologies = ["AWS"] - - [savedsearch://ESCU - Get DNS traffic ratio] type = investigative explanation = none @@ -3196,6 +3166,16 @@ known_false_positives = It is likely that the outbound Server Message Block (SMB providing_technologies = ["Bro", "Splunk Stream"] +[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 = ["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] type = detection asset_type = AWS Instance @@ -3273,15 +3253,15 @@ known_false_positives = There are many legitimate applications that must execute providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[savedsearch://ESCU - Batch File Write to System32 - Rule] +[savedsearch://ESCU - SMB Traffic Spike - 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 = 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 - AWS Investigate User Activities By AccessKeyId] @@ -3305,36 +3285,26 @@ known_false_positives = Although unlikely, some legitimate applications may exhi providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Email files written outside of the Outlook directory - Rule] +[savedsearch://ESCU - Web Fraud - Password Sharing Across Accounts - Rule] type = detection -asset_type = Endpoint +asset_type = account 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"] +explanation = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 +how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. +annotations = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. +providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] -[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"] - - -[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 +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 - Attempt To Stop Security Service - Rule] @@ -3359,12 +3329,15 @@ known_false_positives = Although unlikely, administrators may use event subscrip providing_technologies = ["Microsoft Windows"] -[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 - 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"] [savedsearch://ESCU - Uncommon Processes On Endpoint - Rule] @@ -3378,26 +3351,48 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Registry Keys for Creating SHIM Databases - Rule] +[savedsearch://ESCU - Remote Desktop Network Traffic - Rule] type = detection asset_type = Endpoint confidence = medium -explanation = In this search, we look for modifications to registry keys used for shim databases on Microsoft platforms via the object_category and object_path field in the Change_Analysis data model and give you the destination, command used to initiate the change, the user who conducted this activity, the resource affected(object), and the whole path of the object. An application compatibility shim is a small library that transparently intercepts an API (via hooking), changes the parameters passed, handles the operation itself, or redirects the operation elsewhere, such as additional code stored on a system. This capability can be also leveraged by attackers to create and store malicious files in a shim database as observed in CARBANAK backdoor. -how_to_implement = To successfully implement this search, you must populate the Change_Analysis data model. This is typically populated via endpoint detection and response products, such as Carbon Black or other endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. -annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -known_false_positives = There are many legitimate applications that leverage shim databases for compatibility purposes for legacy applications -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +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 - Monitor Web Traffic For Brand Abuse - Rule] +[savedsearch://ESCU - Process Execution via WMI - 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"] +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 processes launched via WMI, either remotely or locally, by looking for processes launched by WmiPrvSE.exe, which is the process WMI uses to execute new processes and commands. +how_to_implement = To successfully implement this search, you must 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": ["Execution", "Windows Management Instrumentation"], "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 wmi to execute commands for legitimate purposes. +providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] + + +[savedsearch://ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] +type = detection +asset_type = Endpoint +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"] + + +[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. +providing_technologies = ["AWS"] [savedsearch://ESCU - Remote Process Instantiation via WMI - Rule] @@ -3411,6 +3406,28 @@ known_false_positives = The wmic.exe utility is a benign Windows application. It providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] +[savedsearch://ESCU - Batch File Write to System32 - 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"] + + +[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 @@ -3419,25 +3436,14 @@ known_false_positives = None at this time providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - AWS Network Access Control List Deleted - Rule] -type = detection -asset_type = AWS Instance -confidence = medium -explanation = The search looks for CloudTrail events to detect whether any network ACLs have been deleted and gives you values of error messages and error codes (if any), user details, user source IP, the user who initiated this request, and the name of the event. -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. -annotations = {"mitre_attack": ["Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11"], "nist": ["DE.DP", "DE.AE"]} -known_false_positives = It's possible that a user has legitimately deleted a network ACL. -providing_technologies = ["AWS"] - - -[savedsearch://ESCU - Schtasks scheduling job on remote system - Rule] +[savedsearch://ESCU - Execution of File with Multiple Extensions - 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 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. +confidence = high +explanation = This search uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. +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. +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"] @@ -3471,14 +3477,14 @@ known_false_positives = It's possible that normal DNS traffic will exhibit this providing_technologies = ["Splunk Stream", "Bro"] -[savedsearch://ESCU - Malicious PowerShell Process - Encoded Command - Rule] +[savedsearch://ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule] type = detection asset_type = Endpoint -confidence = medium -explanation = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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 = System administrators may use this option, but it's not common. +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"] @@ -3492,15 +3498,12 @@ known_false_positives = Some legitimate applications start with long command-lin providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Email Attachments With Lots Of Spaces - Rule] -type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. -how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +[savedsearch://ESCU - Baseline of blocked outbound traffic from AWS] +type = support +explanation = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. known_false_positives = None at this time -providing_technologies = ["Microsoft Exchange"] +providing_technologies = ["AWS"] [savedsearch://ESCU - Count of Unique IPs Connecting to Ports] @@ -3511,15 +3514,12 @@ known_false_positives = None at this time providing_technologies = ["Splunk Stream", "Bro"] -[savedsearch://ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule] -type = detection -asset_type = AWS Instance -confidence = medium -explanation = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. -annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. -providing_technologies = ["AWS"] +[savedsearch://ESCU - Identify Systems Receiving Remote Desktop Traffic] +type = support +explanation = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. +how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro"] [savedsearch://ESCU - Get Risk Modifiers For Endpoint] diff --git a/src/default/savedsearches.conf b/src/default/savedsearches.conf index f8f38a1ebe..a6ec82e29c 100644 --- a/src/default/savedsearches.conf +++ b/src/default/savedsearches.conf @@ -13,7 +13,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Indicator Removal o action.escu.known_false_positives = It is possible that these logs may be legitimately cleared by Administrators. action.escu.search_type = detection action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Windows Log Manipulation", "Ransomware"] +action.escu.analytic_story = ["Ransomware", "Windows Log Manipulation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Windows Event Log Cleared action.notable = 1 @@ -22,7 +22,7 @@ action.notable.param.rule_description = The Event Logging System has been cleare action.notable.param.rule_title = Windows Event Log Cleared 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 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 @@ -60,7 +60,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 = ["Command and Control", "SamSam Ransomware", "Ransomware", "Use of Cleartext Protocols", "Prohibited Traffic Allowed or Protocol Mismatch"] +action.escu.analytic_story = ["Ransomware", "Command and Control", "SamSam Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch", "Use of Cleartext Protocols"] action.escu.fields_required = ["dest_port", "src"] action.escu.earliest_time_offset = 7200 action.escu.latest_time_offset = 7200 @@ -135,7 +135,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Persistence"], "kil action.escu.known_false_positives = None at the moment action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Windows Defense Evasion Tactics", "Suspicious Windows Registry Activities"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows Defense Evasion Tactics", "Windows Persistence Techniques"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Reg.exe used to hide files/directories via registry keys action.notable = 1 @@ -144,7 +144,7 @@ action.notable.param.rule_description = Regedit.exe is used by attackers to hide action.notable.param.rule_title = Regedit.exe used to hide a file/directory 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.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 @@ -218,105 +218,6 @@ schedule_window = auto is_visible = false search = sourcetype="WinEventLog:Security" (EventCode=4624 OR EventCode=4625) Logon_Process=NtLmSsp Logon_Type=3 Account_Name !="ANONYMOUS LOGON" Key_Length=0 | table _time Source_Network_Address Account_Name Account_Domain ComputerName Workstation_Name -[ESCU - Detect Long DNS TXT Record Response - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-06-18 -action.escu.modification_date = 2017-09-18 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. -action.escu.how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. -action.escu.data_models = ["Network_Resolution"] -action.escu.full_search_name = ESCU - Detect Long DNS TXT Record Response - Rule -action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} -action.escu.known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. -action.escu.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Long DNS TXT Record Response -action.notable = 1 -action.notable.param.nes_fields = src, query -action.notable.param.rule_description = A DNS TXT record response of over 100 characters was detected. -action.notable.param.rule_title = Long DNS TXT Record Response -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.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 = 70 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = src -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search is used to detect attempts to use DNS tunneling, by calculating the length of responses to DNS TXT queries. Endpoints using DNS as a method of transmission for data exfiltration, command and control, or evasion of security controls can often be detected by noting unusually large volumes of DNS traffic. -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_Resolution where DNS.message_type=response AND DNS.record_type=TXT by DNS.src DNS.dest DNS.answer DNS.record_type | `drop_dm_object_name("DNS")` | eval anslen=len(answer) | search anslen>100 | `ctime(firstTime)` | `ctime(lastTime)` | rename src as "Source IP", dest as "Destination IP", answer as "DNS Answer" anslen as "Answer Length" record_type as "DNS Record Type" firstTime as "First Time" lastTime as "Last Time" count as Count | table "Source IP" "Destination IP" "DNS Answer" "DNS Record Type" "Answer Length" Count "First Time" "Last Time" - -[ESCU - Web Fraud - Password Sharing Across Accounts - Rule] -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.channel = webfraud -action.escu.confidence = medium -action.escu.eli5 = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 -action.escu.how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. -action.escu.full_search_name = ESCU - Web Fraud - Password Sharing Across Accounts - Rule -action.escu.mappings = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. -action.escu.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] -action.escu.analytic_story = ["Web Fraud Detection"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Web Fraud - Password Sharing Across Accounts -action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = This search is used to identify user accounts, $user$, that share common passwords -action.notable.param.rule_title = Web Fraud Detection: Password Sharing Across Accounts -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 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 = user -action.risk.param._risk_object_type = other -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 = 3600s -cron_schedule = 0 * * * * -description = This search is used to identify user accounts that share a common password. -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=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 - TOR Traffic - Rule] action.escu = 0 action.escu.enabled = 1 @@ -333,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 = ["Command and Control", "Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch"] +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 @@ -383,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 = ["Emotet Malware (TA18-201A)", "Suspicious Command-Line Executions"] +action.escu.analytic_story = ["Suspicious Command-Line Executions", "Emotet Malware (TA18-201A)"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect Use of cmd.exe to Launch Script Interpreters action.notable = 1 @@ -392,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 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 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 @@ -441,66 +342,45 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` values(Web.url) as url from datamodel=Web by Web.src,Web.http_user_agent,Web.http_method | `drop_dm_object_name("Web")`| where like(src, "{src}") and like(http_method, "POST") -[ESCU - Monitor Successful Backups] +[ESCU - Detect Long DNS TXT Record Response - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-24 -action.escu.modification_date = 2017-09-12 -action.escu.channel = ESCU -action.escu.eli5 = This search gives you the count and the hostname of all the systems that had a successful backup each day. -action.escu.how_to_implement = To successfully implement this search you must be ingesting your backup logs. -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 = ["SamSam Ransomware", "Ransomware", "Monitor Backup Solution"] -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 -disabled=true -realtime_schedule = 0 -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 - Detect API activity from users without MFA - Rule] -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-06-18 +action.escu.modification_date = 2017-09-18 +action.escu.asset_at_risk = Endpoint 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.eli5 = This search uses the Network_Resolution data model and gathers all the answers to DNS queries for TXT records. The query then looks at the answer section and calculates the length of the answer. The search will then return information for those responses that exceed 100 characters in length. +action.escu.how_to_implement = To successfully implement this search you need to ingest data from your DNS logs, or monitor DNS traffic using Stream, Bro or something similar. Specifically, this query requires that the DNS data model is populated with information regarding the DNS record type that is being returned as well as the data in the answer section of the protocol. +action.escu.data_models = ["Network_Resolution"] +action.escu.full_search_name = ESCU - Detect Long DNS TXT Record Response - Rule +action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} +action.escu.known_false_positives = It's possible that legitimate TXT record responses can be long enough to trigger this search. You can modify the packet threshold for this search to help mitigate false positives. action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS User Monitoring"] +action.escu.providing_technologies = ["Splunk Stream", "Bro"] +action.escu.analytic_story = ["Command and Control", "Suspicious DNS Traffic"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect API activity from users without MFA +action.correlationsearch.label = Detect Long DNS TXT Record Response 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.nes_fields = src, query +action.notable.param.rule_description = A DNS TXT record response of over 100 characters was detected. +action.notable.param.rule_title = Long DNS TXT Record Response 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.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"} 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._risk_object = src +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 = 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 +alert.suppress.fields = src +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = This search is used to detect attempts to use DNS tunneling, by calculating the length of responses to DNS TXT queries. Endpoints using DNS as a method of transmission for data exfiltration, command and control, or evasion of security controls can often be detected by noting unusually large volumes of DNS traffic. +dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -510,7 +390,30 @@ 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)` +search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Resolution where DNS.message_type=response AND DNS.record_type=TXT by DNS.src DNS.dest DNS.answer DNS.record_type | `drop_dm_object_name("DNS")` | eval anslen=len(answer) | search anslen>100 | `ctime(firstTime)` | `ctime(lastTime)` | rename src as "Source IP", dest as "Destination IP", answer as "DNS Answer" anslen as "Answer Length" record_type as "DNS Record Type" firstTime as "First Time" lastTime as "Last Time" count as Count | table "Source IP" "Destination IP" "DNS Answer" "DNS Record Type" "Answer Length" Count "First Time" "Last Time" + +[ESCU - Get Logon Rights Modifications For Endpoint] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-08-16 +action.escu.modification_date = 2017-09-12 +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. +disabled=true +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 [ESCU - Baseline of Security Group Activity by ARN] action.escu = 0 @@ -534,44 +437,62 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail `securityGroupAPIs` | 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 security_group_activity_baseline | stats count -[ESCU - Unsuccessful Netbackup backups - Rule] +[ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-15 -action.escu.modification_date = 2017-09-12 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-04-26 +action.escu.modification_date = 2018-05-07 +action.escu.asset_at_risk = AWS Instance action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. -action.escu.how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. -action.escu.full_search_name = ESCU - Unsuccessful Netbackup backups - Rule -action.escu.mappings = {"cis20": ["CIS 10"], "nist": ["PR.IP"]} -action.escu.known_false_positives = None identified +action.escu.confidence = medium +action.escu.eli5 = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ +\ +1. Counts the number of blocked outbound connections by each source IP\ +\ +1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ +\ +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 `numberOfBlockedConnections` as `latestCount`.\ +\ +1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. +action.escu.full_search_name = ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule +action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} +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 = ["Netbackup"] -action.escu.analytic_story = ["Monitor Backup Solution"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Command and Control", "AWS Network ACL Activity", "Suspicious AWS Traffic"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Unsuccessful Netbackup backups +action.correlationsearch.label = Detect Spike in blocked Outbound Traffic from your AWS action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = The system $dest$ attempted a backup but encountered an error. -action.notable.param.rule_title = Failed backup attempt by $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 Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\n\n2. [[action|escu_investigate]]: Based on ESCU investigate recommendations:\n - ESCU - All backup logs for host\n"} +action.notable.param.nes_fields = src_ip +action.notable.param.rule_description = A spike in the blocked outbound connection is detected from source $src_ip$. +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 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 = dest +action.risk.param._risk_object = src_ip action.risk.param._risk_object_type = system -action.risk.param._risk_score = 10 +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 = 86400s -cron_schedule = 0 7 * * * -description = This search gives you the hosts where a backup was attempted and then failed. -dispatch.earliest_time = -24h@h +alert.suppress.fields = src_ip +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = This search will detect spike in blocked outbound network connections originating from within your AWS environment. It will also update the cache file that factors in the latest data. +dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -581,7 +502,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype="netbackup_logs" | stats latest(_time) as latestTime by COMPUTERNAME, MESSAGE | search MESSAGE="An error occurred, failed to backup." | `ctime(latestTime)` | rename COMPUTERNAME as dest, MESSAGE as signature | table latestTime, dest, signature +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) [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) | stats count as numberOfBlockedConnections by src_ip | inputlookup baseline_blocked_outbound_connections append=t | fields - latestCount | stats values(*) as * by src_ip | rename numberOfBlockedConnections as latestCount | eval newAvgBlockedConnections=avgBlockedConnections + (latestCount-avgBlockedConnections)/720 | eval newStdevBlockedConnections=sqrt(((pow(stdevBlockedConnections, 2)*719 + (latestCount-newAvgBlockedConnections)*(latestCount-avgBlockedConnections))/720)) | eval avgBlockedConnections=coalesce(newAvgBlockedConnections, avgBlockedConnections), stdevBlockedConnections=coalesce(newStdevBlockedConnections, stdevBlockedConnections), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) | table src_ip, latestCount, numDataPoints, avgBlockedConnections, stdevBlockedConnections | outputlookup baseline_blocked_outbound_connections | eval dataPointThreshold = 5, deviationThreshold = 3 | eval isSpike=if((latestCount > avgBlockedConnections+deviationThreshold*stdevBlockedConnections) AND numDataPoints > dataPointThreshold, 1, 0) | where isSpike=1 | table src_ip] | stats values(dest_ip) as "Blocked Destination IPs", values(interface_id) as "resourceId" count as numberOfBlockedConnections, dc(dest_ip) as uniqueDestConnections by src_ip [ESCU - Detect processes used for System Network Configuration Discovery - Rule] action.escu = 0 @@ -648,7 +569,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion"], "kill_chain_phases" action.escu.known_false_positives = It's possible that a user has unknowingly started an instance in a new region. Please verify that this activity is legitimate. action.escu.search_type = detection action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] action.correlationsearch.enabled = 1 action.correlationsearch.label = EC2 Instance Started In Previously Unseen Region action.notable = 1 @@ -657,7 +578,7 @@ action.notable.param.rule_description = An AWS instance is started in a new, pre action.notable.param.rule_title = AWS instance is started in a new region 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 Instance Details by instanceId\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 - ESCU - Investigate AWS activities via region name\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 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 = awsRegion @@ -964,7 +885,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 @@ -973,7 +894,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 @@ -998,43 +919,43 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) EventCode=13 object_path=*\\Explorer\\FileExts* process!=Explorer.exe AND process!=OpenWith.exe | stats count min(_time) as firstTime max(_time) as lastTime by dest, process, object_path, Details | rename Details as value | `ctime(firstTime)`| `ctime(lastTime)` -[ESCU - EC2 Instance Modified With Previously Unseen User - Rule] +[ESCU - Detect S3 access from a new IP - 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.creation_date = 2018-06-25 +action.escu.modification_date = 2018-06-28 +action.escu.asset_at_risk = S3 Bucket 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.confidence = low +action.escu.eli5 = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource +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 S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. +action.escu.full_search_name = ESCU - Detect S3 access from a new IP - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +action.escu.known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour action.escu.search_type = detection action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Unusual AWS EC2 Modifications"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = EC2 Instance Modified With Previously Unseen User +action.correlationsearch.label = Detect S3 access from a new IP 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.nes_fields = bucket_name, src_ip +action.notable.param.rule_description = A remote IP, $src_ip$, has made a successful connection with an S3 $bucket_name$. +action.notable.param.rule_title = S3 bucket $bucketName$ was accessed by a new $src_ip$ +action.notable.param.security_domain = network +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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 = 30 +action.risk.param._risk_score = 20 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. +alert.suppress.fields = bucket_name, src_ip +alert.suppress.period = 86400s +cron_schedule = 5 * * * * +description = This search looks at S3 bucket-access logs and detects new or previously unseen remote IP addresses that have successfully accessed an S3 bucket. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -1045,7 +966,7 @@ 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:s3:accesslogs http_status=200 [search sourcetype=aws:s3:accesslogs http_status=200 | stats earliest(_time) as firstTime latest(_time) as lastTime by bucket_name remote_ip | inputlookup append=t previously_seen_S3_access_from_remote_ip.csv | stats min(firstTime) as firstTime, max(lastTime) as lastTime by bucket_name remote_ip | outputlookup previously_seen_S3_access_from_remote_ip.csv | eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newIP=1 | convert ctime(firstTime) ctime(lastTime) | table bucket_name remote_ip]| iplocation remote_ip |rename remote_ip as src_ip | table _time bucket_name src_ip City Country operation request_uri [ESCU - Remote Desktop Process Running On System - Rule] action.escu = 0 @@ -1063,7 +984,7 @@ action.escu.mappings = {"mitre_attack": ["Lateral Movement", "Remote Desktop Pro 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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Lateral Movement", "Hidden Cobra Malware"] +action.escu.analytic_story = ["Hidden Cobra Malware", "Lateral Movement"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Remote Desktop Process Running On System action.notable = 1 @@ -1072,7 +993,7 @@ action.notable.param.rule_description = The system $dest$ is running the remote action.notable.param.rule_title = Remote Desktop Process Running 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 Outbound Emails to Hidden Cobra Threat Actors\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 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 @@ -1146,44 +1067,65 @@ schedule_window = auto is_visible = false search = sourcetype=wineventlog:security EventCode=4720 OR (EventCode=4732 Group_Name= Administrators) | transaction Security_ID maxspan=180m | search EventCode=4720 EventCode=4732 | table _time user dest EventCode Security_ID Group_Name src_user Message -[ESCU - Remote Desktop Network Bruteforce - Rule] +[ESCU - Detect Spike in S3 Bucket deletion - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-12-14 -action.escu.modification_date = 2018-12-14 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-07-17 +action.escu.modification_date = 2018-11-27 +action.escu.asset_at_risk = S3 Bucket action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = This search monitors for abnormal amounts of remote-desktop (RDP) traffic from a source to a destination that may be indicative of a brute-force attack. It does this by filtering out RDP traffic from the Network_Traffic.All_Traffic data model, using twice the standard deviation of all source-to-destination connections. If any tuple is within more than two standard deviations of all other usual RDP traffic flows, it is indicative of a brute-force attack. -action.escu.how_to_implement = You must ensure that your network traffic data is populating the Network_Traffic data model. -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Remote Desktop Network Bruteforce - Rule -action.escu.mappings = {"mitre_attack": ["Credential Access", "Remote Desktop Protocol", "Lateral Movement"], "kill_chain_phases": ["Reconnaissance", "Delivery"], "cis20": ["CIS 12", "CIS 9", "CIS 16"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} -action.escu.known_false_positives = RDP gateways may have unusually high amounts of traffic from all other hosts' RDP applications in the network. +action.escu.eli5 = This search and its corresponding subsearch run through the following series of steps: \ +\ +1. Retrieve all the AWS CloudTrail log entries that have recorded AWS API calls specifically for deletion of S3 buckets.\ +\ +1. Kick off a subsearch that retrieves the same data and pulls out and converts the ARN into a more friendly format.\ +\ +1. Count the number of API calls per ARN.\ +\ +1. Load 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. Drop the count from the latest hour, since it is unnecessary, and merge the rest of the data with the results of the `stats` command. \ +\ +1. Rename `apiCalls` as `latestCount`.\ +\ +1. Calculate the new average value for each ARN with the latest count, weighting the past more heavily than the current hour. It does the same for the standard deviation—weighting the past more heavily than the current.\ +\ +1. Update the cache file with the latest results.\ +\ +1. Set the minimum threshold for the number of data points and the number of standard deviations away from the mean it must be to be considered a spike.\ +\ +1. Make 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 if the count is a sufficient number of standard deviations away from the average.\ +\ +1. Filter 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 the deleted S3 buckets, the number of unique API calls, and the total number of API calls for each of these user ARNs. +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. This search works best when you run the "Baseline of S3 Bucket deletion activity by ARN" support search once to create a baseline of previously seen S3 bucket-deletion activity. +action.escu.full_search_name = ESCU - Detect Spike in S3 Bucket deletion - Rule +action.escu.mappings = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} +action.escu.known_false_positives = Based on the values of`dataPointThreshold` and `deviationThreshold`, the false positive rate may vary. Please modify this according the your environment. action.escu.search_type = detection -action.escu.providing_technologies = ["Bro", "Splunk Stream"] -action.escu.analytic_story = ["SamSam Ransomware"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Remote Desktop Network Bruteforce +action.correlationsearch.label = Detect Spike in S3 Bucket deletion action.notable = 1 -action.notable.param.nes_fields = dest, src -action.notable.param.rule_description = Remote-desktop traffic detected from $src$ to $dest$. This activity is consistent with a brute-force attack. -action.notable.param.rule_title = Bruteforce Remote Desktop Network Traffic detected from $src$ to $dest$ +action.notable.param.nes_fields = user +action.notable.param.rule_description = A spike in the number of S3 buckets deleted by $user$ was detected. +action.notable.param.rule_title = Spike detected in S3 bucket deletion activity 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 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.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 = 75 +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 = dest,src -alert.suppress.period = 28800s +alert.suppress.fields = user +alert.suppress.period = 14400s cron_schedule = 0 * * * * -description = This search looks for RDP application network traffic and filters any source/destination pair generating more than twice the standard deviation of the average traffic. +description = This search detects users creating spikes in API activity related to deletion of S3 buckets in your AWS environment. It will also update the cache file that factors in the latest data. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -1194,7 +1136,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.app=rdp by All_Traffic.src All_Traffic.dest All_Traffic.dest_port | eventstats stdev(count) AS stdev avg(count) AS avg p50(count) AS p50| where count>(stdev*2) | rename All_Traffic.src AS src All_Traffic.dest AS dest | table firstTime lastTime src dest count avg p50 stdev +search = sourcetype=aws:cloudtrail eventName=DeleteBucket [search sourcetype=aws:cloudtrail eventName=DeleteBucket | spath output=arn path=userIdentity.arn | stats count as apiCalls by arn | inputlookup s3_deletion_baseline append=t | fields - latestCount | stats values(*) as * by arn | rename apiCalls as latestCount | eval newAvgApiCalls=avgApiCalls + (latestCount-avgApiCalls)/720 | eval newStdevApiCalls=sqrt(((pow(stdevApiCalls, 2)*719 + (latestCount-newAvgApiCalls)*(latestCount-avgApiCalls))/720)) | eval avgApiCalls=coalesce(newAvgApiCalls, avgApiCalls), stdevApiCalls=coalesce(newStdevApiCalls, stdevApiCalls), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) | table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls | outputlookup s3_deletion_baseline | eval dataPointThreshold = 15, deviationThreshold = 3 | eval isSpike=if((latestCount > avgApiCalls+deviationThreshold*stdevApiCalls) AND numDataPoints > dataPointThreshold, 1, 0) | where isSpike=1 | rename arn as userIdentity.arn | table userIdentity.arn] | spath output=user userIdentity.arn | spath output=bucketName path=requestParameters.bucketName | stats values(bucketName) as bucketName, count as numberOfApiCalls, dc(eventName) as uniqueApisCalled by user [ESCU - DNS record changed - Rule] action.escu = 0 @@ -1213,7 +1155,7 @@ If Splunk>Phantom is also configured in your environment, a Playbook called "DNS \ (Playbook Link:`https://my.phantom.us/4.1/playbook/dns-hijack-investigation/`).\ \ -" + action.escu.data_models = ["Network_Resolution"] action.escu.full_search_name = ESCU - DNS record changed - Rule action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 1", "CIS 3", "CIS 8", "CIS 12"], "nist": ["ID.AM", "PR.DS", "PR.IP", "DE.AE", "DE.CM"]} @@ -1310,156 +1252,28 @@ schedule_window = auto is_visible = false search = sourcetype=stream:http http_content_type=text* | rex field=cookie "form_key=(?\w+)" | streamstats window=2 current=1 range(_time) as TimeDelta by session_id | where TimeDelta>0 |stats count stdev(TimeDelta) as ClickSpeedStdDev avg(TimeDelta) as ClickSpeedAvg by session_id | where count>5 AND (ClickSpeedStdDev<.5 OR ClickSpeedAvg<.5) -[ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule] +[ESCU - Discover DNS records] 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 = 2019-02-14 +action.escu.modification_date = 2019-02-14 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search returns the number of times a URL associated with this type of JexBoss probe is observed. -action.escu.how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. -action.escu.data_models = ["Web"] -action.escu.full_search_name = ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule -action.escu.mappings = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} -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 = ["JBoss Vulnerability", "SamSam Ransomware"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect attackers scanning for vulnerable JBoss servers -action.notable = 1 -action.notable.param.nes_fields = -action.notable.param.rule_description = This search looks for specific GET/HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. -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 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 = 20 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest,url -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search looks for specific GET or HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. JexBoss is described as the exploit tool of choice for this malicious activity. -dispatch.earliest_time = -70m@m +action.escu.eli5 = Discover the DNS records and their answers for domains owned by the company using network traffic events. The discovered events are exported as a lookup named `discovered_dns_records.csv` +action.escu.how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. Also make sure that the cim_corporate_web_domains and cim_corporate_email_domains lookups are populated with the domains owned by your corporation +action.escu.data_models = ["Network_Resolution"] +action.escu.full_search_name = ESCU - Discover DNS records +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 = ["DNS Hijacking"] +description = The search takes corporate and common cloud provider domains configured under cim_corporate_email_domains.csv, cim_corporate_web_domains.csv, and cloud_domains.csv and finds their responses across the last 30 days from data in the Network Traffic datamodel, then stores the output under the discovered_dns_records.csv lookup +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 = | 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 = ["Emotet Malware (TA18-201A)", "Ransomware", "Hidden Cobra Malware", "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 - AWS Cloud Provisioning From Previously Unseen IP Address - Rule] -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.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 -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 = | inputlookup cim_corporate_email_domains.csv | inputlookup append=T cim_corporate_web_domains.csv | inputlookup append=T cim_cloud_domains.csv | eval domain = trim(replace(domain, "\*", "")) | join domain [|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as answer from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!="unknown" DNS.answer!="" by DNS.query | rename DNS.query as query | where query!="unknown" | rex field=query "(?\w+\.\w+?)(?:$|/)"] | makemv delim=" " answer | makemv delim=" " type | sort -count | table count,domain,type,query,answer | outputlookup createinapp=true discovered_dns_records.csv [ESCU - Samsam Test File Write - Rule] action.escu = 0 @@ -1511,50 +1325,54 @@ 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_name) as file_name from datamodel=Endpoint.Filesystem where Filesystem.file_path=*\\windows\\system32\\test.txt by Filesystem.file_path | `drop_dm_object_name(Filesystem)` | `ctime(lastTime)` | `ctime(firstTime)` -[ESCU - Previously Seen AWS Cross Account Activity] +[ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-06-04 -action.escu.modification_date = 2018-06-04 +action.escu.creation_date = 2018-08-28 +action.escu.modification_date = 2018-08-28 +action.escu.asset_at_risk = Windows action.escu.channel = ESCU -action.escu.eli5 = In this support search, we look for **AssumeRole** events where the requesting account is different from the requested account. The first and last times these events are seen are written to 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. Validate the user name entries in `previously_seen_aws_cross_account_activity.csv`, a lookup file created by this support search. -action.escu.full_search_name = ESCU - Previously Seen AWS Cross Account Activity -action.escu.known_false_positives = None at this time -action.escu.search_type = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cross Account Activity"] -description = This search looks for **AssumeRole** events where the requesting account differs from the requested account, then writes these relationships to a lookup file. -dispatch.earliest_time = -30d@d +action.escu.confidence = medium +action.escu.eli5 = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. +action.escu.how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. +action.escu.full_search_name = ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - 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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. +action.escu.search_type = detection +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Credential Dumping"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect Mimikatz Via PowerShell And EventCode 4663 +action.notable = 1 +action.notable.param.nes_fields = user, dest +action.notable.param.rule_description = Possible attempt at credential dumping via PowerShell was detected on $dest$ by $user$. +action.notable.param.rule_title = Event ID 4663 Specifying PowerShell Reading From LSASS.exe Identified on $dest$. +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 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 = 40 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = user, dest, process +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = This search looks for PowerShell reading lsass memory consistent with credential dumping. +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 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 - Investigate AWS activities via region name] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-02-09 -action.escu.modification_date = 2018-02-09 -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 - 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 S3 Activities", "Suspicious AWS EC2 Activities"] -action.escu.fields_required = ["awsRegion"] -action.escu.earliest_time_offset = 14400 -action.escu.latest_time_offset = 0 -description = This search lists all the user activities logged by CloudTrail for a specific region in question and will create a table of the values of parameters requested, the type of the event and the response from the AWS API by each user -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | search sourcetype=aws:cloudtrail awsRegion={awsRegion}| rename requestParameters.instancesSet.items{}.instanceId as instanceId| stats values(eventName) by userName instanceId +search = sourcetype=wineventlog:security EventCode=4663 Process_Name=*powershell.exe Object_Name=*lsass.exe Access_Mask=0x10 | stats count min(_time) as firstTime max(_time) as lastTime by dest, Process_Name, Process_ID, Message | rename Process_Name as process | `ctime(firstTime)`| `ctime(lastTime)` [ESCU - AWS Network Access Control List Created with All Open Ports - Rule] action.escu = 0 @@ -1654,6 +1472,56 @@ 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] +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 = 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 = ["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 = Prohibited Network Traffic Allowed +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.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\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 +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 = 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 +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.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 - Detect Unauthorized Assets by MAC address - Rule] action.escu = 0 action.escu.enabled = 1 @@ -1754,28 +1622,55 @@ 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 - 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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "AWS Network ACL Activity", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Web Fraud Detection", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "JBoss Vulnerability", "Suspicious AWS S3 Activities", "Windows Defense Evasion Tactics", "Splunk Enterprise Vulnerability CVE-2018-11409", "Dynamic DNS", "Unusual Processes", "Brand Monitoring", "Suspicious AWS EC2 Activities", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "AWS Cross Account Activity", "Suspicious AWS Login Activities", "ColdRoot MacOS RAT", "Suspicious DNS Traffic", "Command and Control", "SamSam Ransomware", "DNS Amplification Attacks", "Router & Infrastructure Security", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Host Redirection", "Suspicious Emails", "Ransomware", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Suspicious AWS Traffic", "AWS User Monitoring", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "Unusual AWS EC2 Modifications", "Monitor Backup Solution", "DHS Report TA18-074A", "Use of Cleartext Protocols", "DNS Hijacking", "Prohibited Traffic Allowed or Protocol Mismatch"] -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 - Get Parent Process Info] action.escu = 0 @@ -1789,7 +1684,7 @@ 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", "Credential Dumping", "Disabling Security Tools", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Windows Defense Evasion Tactics", "Suspicious MSHTA Activity", "Windows Privilege Escalation", "SamSam Ransomware", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Ransomware", "Hidden Cobra Malware", "Windows File Extension and Association Abuse", "DHS Report TA18-074A"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Credential Dumping", "Suspicious Command-Line Executions", "Windows Service Abuse", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Netsh Abuse", "Suspicious MSHTA Activity", "Orangeworm Attack Group", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Collection and Staging", "DHS Report TA18-074A", "SamSam Ransomware", "Disabling Security Tools", "Suspicious Windows Registry Activities", "Windows Defense Evasion Tactics", "Windows Persistence Techniques"] action.escu.fields_required = ["process", "dest"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -1816,7 +1711,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 = ["Disabling Security Tools", "Netsh Abuse", "DHS Report TA18-074A"] +action.escu.analytic_story = ["Netsh Abuse", "DHS Report TA18-074A", "Disabling Security Tools"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Processes launching netsh action.notable = 1 @@ -1900,45 +1795,46 @@ 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 - Schtasks used for forcing a reboot - Rule] +[ESCU - Shim Database File Creation - Rule] 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-10-03 +action.escu.modification_date = 2018-11-02 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.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.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.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Windows Persistence Techniques"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Schtasks used for forcing a reboot +action.correlationsearch.label = Shim Database File Creation 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.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 = 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.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 = 80 +action.risk.param._risk_score = 20 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest, cmdline -alert.suppress.period = 28800s +alert.suppress.fields = dest +alert.suppress.period = 14400s 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 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 counttype = number of events @@ -1947,7 +1843,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)` +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 @@ -1961,7 +1857,7 @@ action.escu.full_search_name = ESCU - Previously Seen EC2 Launches By User action.escu.known_false_positives = None at this time action.escu.search_type = support action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] description = This search builds a table of previously seen ARNs that have launched a EC2 instance. dispatch.earliest_time = -90d@d dispatch.latest_time = -10m@m @@ -1971,54 +1867,27 @@ schedule_window = auto is_visible = false search = sourcetype=aws:cloudtrail eventName=RunInstances errorCode=success | rename userIdentity.arn as arn | stats earliest(_time) as firstTime latest(_time) as lastTime by arn | outputlookup previously_seen_ec2_launches_by_user.csv | stats count -[ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] +[ESCU - Monitor Successful Backups] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-08-28 -action.escu.modification_date = 2018-08-28 -action.escu.asset_at_risk = Windows +action.escu.creation_date = 2017-08-24 +action.escu.modification_date = 2017-09-12 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. -action.escu.how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. -action.escu.full_search_name = ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - 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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. -action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Credential Dumping"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Mimikatz Via PowerShell And EventCode 4663 -action.notable = 1 -action.notable.param.nes_fields = user, dest -action.notable.param.rule_description = Possible attempt at credential dumping via PowerShell was detected on $dest$ by $user$. -action.notable.param.rule_title = Event ID 4663 Specifying PowerShell Reading From LSASS.exe Identified on $dest$. -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 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 = 40 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = user, dest, process -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search looks for PowerShell reading lsass memory consistent with credential dumping. -dispatch.earliest_time = -70m@m +action.escu.eli5 = This search gives you the count and the hostname of all the systems that had a successful backup each day. +action.escu.how_to_implement = To successfully implement this search you must be ingesting your backup logs. +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", "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 disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=wineventlog:security EventCode=4663 Process_Name=*powershell.exe Object_Name=*lsass.exe Access_Mask=0x10 | stats count min(_time) as firstTime max(_time) as lastTime by dest, Process_Name, Process_ID, Message | rename Process_Name as process | `ctime(firstTime)`| `ctime(lastTime)` +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 - Suspicious Reg.exe Process - Rule] action.escu = 0 @@ -2035,7 +1904,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 = ["Disabling Security Tools", "Windows Defense Evasion Tactics", "DHS Report TA18-074A"] +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 @@ -2044,7 +1913,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 @@ -2119,45 +1988,89 @@ 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.parent_process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)`| search (process=*add* process=*Software\\Microsoft\\Powershell\\1\\ShellIds\\Microsoft.PowerShell* process=*ExecutionPolicy* process=*Unrestricted*) -[ESCU - Prohibited Network Traffic Allowed - Rule] +[ESCU - Previously Seen AWS Cross Account Activity] 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.creation_date = 2018-06-04 +action.escu.modification_date = 2018-06-04 +action.escu.channel = ESCU +action.escu.eli5 = In this support search, we look for **AssumeRole** events where the requesting account is different from the requested account. The first and last times these events are seen are written to 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. Validate the user name entries in `previously_seen_aws_cross_account_activity.csv`, a lookup file created by this support search. +action.escu.full_search_name = ESCU - Previously Seen AWS Cross Account Activity +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Cross Account Activity"] +description = This search looks for **AssumeRole** events where the requesting account differs from the requested account, then writes these relationships to a lookup file. +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 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 - 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 + +[ESCU - Detect API activity from users without MFA - Rule] +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.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 = 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 = ["Palo Alto Firewall", "Bro", "Splunk Stream"] -action.escu.analytic_story = ["Command and Control", "Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS User Monitoring"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Prohibited Network Traffic Allowed +action.correlationsearch.label = Detect API activity from users without MFA 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.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 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.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_ip -action.risk.param._risk_object_type = system -action.risk.param._risk_score = 40 +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 = 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 +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 @@ -2167,79 +2080,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")` - -[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 = 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 -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)` - -[ESCU - Get Logon Rights Modifications For Endpoint] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-08-16 -action.escu.modification_date = 2017-09-12 -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. -disabled=true -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 - Previously Seen Running Windows Services] action.escu = 0 @@ -2253,7 +2094,7 @@ 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"] +action.escu.analytic_story = ["Windows Service Abuse", "Orangeworm Attack Group"] description = This collects the services that have been started across your entire enterprise. dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m @@ -2279,7 +2120,7 @@ action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", action.escu.known_false_positives = It's possible that an enterprise has more than five DNS servers that are configured in a round-robin rotation. Please customize the search, as appropriate. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control", "DNS Hijacking"] +action.escu.analytic_story = ["DNS Hijacking", "Command and Control", "Suspicious DNS Traffic"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Clients Connecting to Multiple DNS Servers action.notable = 1 @@ -2288,7 +2129,7 @@ action.notable.param.rule_description = This search allows you to identify the e action.notable.param.rule_title = Client $src$ Connecting to Multiple DNS 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 Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\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 DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get History Of Email Sources\n - ESCU - Get Process responsible for the DNS traffic\n - ESCU - Investigate Web Activity From src_ip\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"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -2352,7 +2193,7 @@ action.escu.mappings = {"mitre_attack": ["Persistence", "Privilege Escalation", action.escu.known_false_positives = You will encounter noise from legitimate print-monitor registry entries. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Suspicious Windows Registry Activities"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows Persistence Techniques"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Monitor Registry Keys for Print Monitors action.notable = 1 @@ -2361,7 +2202,7 @@ action.notable.param.rule_description = A registry key associated with adding pr action.notable.param.rule_title = Registry Key changes for Print Monitors 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 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.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 @@ -2398,7 +2239,7 @@ action.escu.full_search_name = ESCU - Previously Seen AWS Regions action.escu.known_false_positives = None at this time action.escu.search_type = support action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] description = This search looks for CloudTrail events where an AWS instance is started and creates a baseline of most recent time (latest) and the first time (earliest) we've seen this region in our dataset grouped by the value awsRegion for the last 30 days dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m @@ -2408,28 +2249,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 All AWS Activity From Region] 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 = 2018-03-19 +action.escu.modification_date = 2018-03-19 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 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 = contextual -action.escu.providing_technologies = ["Splunk Enterprise Security"] -action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "AWS Network ACL Activity", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "JBoss Vulnerability", "Suspicious AWS S3 Activities", "Windows Defense Evasion Tactics", "Dynamic DNS", "Unusual Processes", "Brand Monitoring", "Suspicious AWS EC2 Activities", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "Suspicious AWS Login Activities", "ColdRoot MacOS RAT", "Suspicious DNS Traffic", "Command and Control", "SamSam Ransomware", "Router & Infrastructure Security", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Host Redirection", "Suspicious Emails", "Ransomware", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "DHS Report TA18-074A", "Use of Cleartext Protocols", "DNS Hijacking"] -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.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 = | `identities` | search identity={user} | table _time, identity, first, last, email, category, watchlist +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 - Get DNS Server History for a host] action.escu = 0 @@ -2443,7 +2284,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 = ["Dynamic DNS", "Brand Monitoring", "Suspicious DNS Traffic", "Command and Control", "Host Redirection", "Data Protection", "DNS Hijacking"] +action.escu.analytic_story = ["DNS Hijacking", "Brand Monitoring", "Command and Control", "Data Protection", "Host Redirection", "Suspicious DNS Traffic", "Dynamic DNS"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -2542,7 +2383,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 = ["Lateral Movement", "Windows Persistence Techniques", "Windows Defense Evasion Tactics", "Suspicious Windows Registry Activities"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Lateral Movement", "Windows Defense Evasion Tactics", "Windows Persistence Techniques"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Remote Registry Key modifications action.notable = 1 @@ -2551,7 +2392,7 @@ action.notable.param.rule_description = A registry key was modified remotely usi action.notable.param.rule_title = Remote Registry Key Modification detection 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.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 @@ -2626,28 +2467,55 @@ 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 -[ESCU - Get Notable Info] +[ESCU - Email servers sending high volume traffic to hosts - 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-12-20 +action.escu.modification_date = 2017-12-20 +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 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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "AWS Network ACL Activity", "Emotet Malware (TA18-201A)", "Web Fraud Detection", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "JBoss Vulnerability", "Suspicious AWS S3 Activities", "Windows Defense Evasion Tactics", "Splunk Enterprise Vulnerability CVE-2018-11409", "Dynamic DNS", "Brand Monitoring", "Suspicious AWS EC2 Activities", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "Suspicious AWS Login Activities", "Suspicious DNS Traffic", "Command and Control", "DNS Amplification Attacks", "Router & Infrastructure Security", "Collection and Staging", "Windows Service Abuse", "Host Redirection", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Suspicious AWS Traffic", "AWS User Monitoring", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "DHS Report TA18-074A", "Use of Cleartext Protocols"] -action.escu.fields_required = ["event_id"] -action.escu.earliest_time_offset = 3600 -action.escu.latest_time_offset = 3600 -description = This search queries the notable index to retrieve detailed information captured within the notable. Every notable has a unique ID associated with it, which is used to point us directly to the notable event under investigation. +action.escu.confidence = medium +action.escu.eli5 = This search may look complex, but it's a neat representation of how statistics can help you understand your dataset to bubble up events that are not normal compared to its behavior. The search consists of three parts. The first part of the SPL fetches the data you want to work on. In this search, we calculate the sum of bytes sent and bytes_out from systems categorized as email_server to each host. We then calculate the average and standard deviation for the bytes sent to all the hosts combined and on a per-host basis. Then we set threshold values to deviation_threshold and minimum_data_samples using eval statements. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. We then check for byte transfers that are statistically significantly higher than normal. The search then gives IP address of the host, the time of the increased byte transfer, how much data was transferred, and the average amount of data transfer the email server normally sends to all hosts and to this specific host. Finally, it includes the number of standard deviations away the byte count was from these averages. +action.escu.how_to_implement = This search requires you to be ingesting your network traffic and populating the Network_Traffic data model. Your email servers must be categorized as "email_server" for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Email servers sending high volume traffic to hosts - Rule +action.escu.mappings = {"mitre_attack": ["Collection", "Email Collection", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} +action.escu.known_false_positives = The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers. +action.escu.search_type = detection +action.escu.providing_technologies = ["Bro", "Splunk Stream"] +action.escu.analytic_story = ["Collection and Staging"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Email servers sending high volume traffic to hosts +action.notable = 1 +action.notable.param.nes_fields = dest_ip +action.notable.param.rule_description = High volume of traffic that originated from an email server is being sent to $dest_ip$ +action.notable.param.rule_title = High volume of traffic from an email server sent to $dest_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 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_ip +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_ip +alert.suppress.period = 86400s +cron_schedule = 0 0 * * * +description = This search looks for an increase of data transfers from your email server to your clients. This could be indicative of a malicious actor collecting data using your email server. +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 = | search `notable_by_id({event_id})` | table time, rule_name, dest, dest_asset_id, dest_owner, priority, severity, owner, status_description +search = | tstats `summariesonly` sum(All_Traffic.bytes_out) as bytes_out from datamodel=Network_Traffic where All_Traffic.src_category=email_server by All_Traffic.dest_ip _time span=1d | `drop_dm_object_name("All_Traffic")` | eventstats avg(bytes_out) as avg_bytes_out stdev(bytes_out) as stdev_bytes_out | eventstats count as num_data_samples avg(eval(if(_time < relative_time(now(), "@d"), bytes_out, null))) as per_source_avg_bytes_out stdev(eval(if(_time < relative_time(now(), "@d"), bytes_out, null))) as per_source_stdev_bytes_out by dest_ip | eval minimum_data_samples = 4, deviation_threshold = 3 | where num_data_samples >= minimum_data_samples AND bytes_out > (avg_bytes_out + (deviation_threshold * stdev_bytes_out)) AND bytes_out > (per_source_avg_bytes_out + (deviation_threshold * per_source_stdev_bytes_out)) AND _time >= relative_time(now(), "@d") | eval num_standard_deviations_away_from_server_average = round(abs(bytes_out - avg_bytes_out) / stdev_bytes_out, 2), num_standard_deviations_away_from_client_average = round(abs(bytes_out - per_source_avg_bytes_out) / per_source_stdev_bytes_out, 2) | table dest_ip, _time, bytes_out, avg_bytes_out, per_source_avg_bytes_out, num_standard_deviations_away_from_server_average, num_standard_deviations_away_from_client_average [ESCU - Excessive DNS Failures - Rule] action.escu = 0 @@ -2665,7 +2533,7 @@ action.escu.mappings = {"mitre_attack": ["Exfiltration", "Exfiltration Over Alte action.escu.known_false_positives = It is possible legitimate traffic can trigger this rule. Please investigate as appropriate. The threshold for generating an event can also be customized to better suit your environment. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control"] +action.escu.analytic_story = ["Command and Control", "Suspicious DNS Traffic"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Excessive DNS Failures action.notable = 1 @@ -2674,7 +2542,7 @@ action.notable.param.rule_description = This search identifies DNS query failure action.notable.param.rule_title = Excessive DNS Failures 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"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -2699,56 +2567,6 @@ 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 - File with Samsam Extension - Rule] -action.escu = 0 -action.escu.enabled = 1 -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 = high -action.escu.eli5 = This search looks at file modifications across your hosts and creates notable events when it identifies files with extensions associated with the SamSam ransomware, including `.stubbin`, `.berkshire`, `.satoshi`, `.sophos`, or `.keyxml`. Files with these extensions have been observed in SamSam attacks consisting of payload data or keying material. -action.escu.how_to_implement = You must be ingesting data that records file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - File with Samsam Extension - Rule -action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Installation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -action.escu.known_false_positives = Because these extensions are not typically used in normal operations, you should investigate all results. -action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["SamSam Ransomware"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = File with Samsam Extension -action.notable = 1 -action.notable.param.nes_fields = dest, file_name -action.notable.param.rule_description = A file with an extension associated with SamSam ransomware was written on $dest$. -action.notable.param.rule_title = File with known SamSam 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 = 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,file_name -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = The search looks for file writes with extensions consistent with a SamSam ransomware attack. -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 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 "(?\.[^\.]+)$" | search file_extension=.stubbin OR file_extension=.berkshire OR file_extension=.satoshi OR file_extension=.sophos OR file_extension=.keyxml - [ESCU - DNS Query Length With High Standard Deviation - Rule] action.escu = 0 action.escu.enabled = 1 @@ -2765,7 +2583,7 @@ action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", action.escu.known_false_positives = It's possible there can be long domain names that are legitimate. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control", "Hidden Cobra Malware"] +action.escu.analytic_story = ["Command and Control", "Hidden Cobra Malware", "Suspicious DNS Traffic"] action.correlationsearch.enabled = 1 action.correlationsearch.label = DNS Query Length With High Standard Deviation action.notable = 1 @@ -2774,7 +2592,7 @@ action.notable.param.rule_description = Filter DNS requests and compute the stan action.notable.param.rule_title = DNS query length with high standard deviation 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 Outbound Emails to Hidden Cobra Threat Actors\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 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"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -2815,7 +2633,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Indicator Removal o 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 Log Manipulation", "Ransomware"] +action.escu.analytic_story = ["Ransomware", "Windows Log Manipulation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = USN Journal Deletion action.notable = 1 @@ -2824,7 +2642,7 @@ action.notable.param.rule_description = The system $dest$ deleted its NTFS journ action.notable.param.rule_title = File System Journal Deleted 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 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 @@ -2872,29 +2690,55 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count from datamodel=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.src | `drop_dm_object_name("All_Traffic")` | sort - count -[ESCU - Get Process responsible for the DNS traffic] +[ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-10 -action.escu.modification_date = 2017-11-09 +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.eli5 = none -action.escu.how_to_implement = You must be ingesting endpoint data that associates processes with network events. This can come from endpoint protection products such as carbon black, or endpoint data sources such as Sysmon. -action.escu.data_models = ["Application_State"] -action.escu.full_search_name = ESCU - Get Process responsible for the DNS traffic -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 = ["Dynamic DNS", "Brand Monitoring", "Suspicious DNS Traffic", "Command and Control", "Host Redirection", "Data Protection", "DNS Hijacking"] -action.escu.fields_required = ["dest"] -action.escu.earliest_time_offset = 3600 -action.escu.latest_time_offset = 86400 -description = While investigating, an analyst will want to know what process and parent_ process is responsible for generating suspicious DNS traffic. Use the following search and enter the value of src_ip in the search to get specific details on the process responsible for creating the DNS traffic. +action.escu.confidence = medium +action.escu.eli5 = This search returns the number of times a URL associated with this type of JexBoss probe is observed. +action.escu.how_to_implement = You must be ingesting data from the web server or network traffic that contains web specific information, and populating the Web data model. +action.escu.data_models = ["Web"] +action.escu.full_search_name = ESCU - Detect attackers scanning for vulnerable JBoss servers - Rule +action.escu.mappings = {"mitre_attack": ["Discovery", "System Information Discovery"], "kill_chain_phases": ["Reconnaissance"]} +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 = ["JBoss Vulnerability", "SamSam Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect attackers scanning for vulnerable JBoss servers +action.notable = 1 +action.notable.param.nes_fields = +action.notable.param.rule_description = This search looks for specific GET/HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. +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 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 = 20 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest,url +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = This search looks for specific GET or HEAD requests to web servers that are indicative of reconnaissance attempts to identify vulnerable JBoss servers. JexBoss is described as the exploit tool of choice for this malicious activity. +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 allow_old_summaries=true values(All_Application_State.process) as "process" from datamodel=Application_State where nodename=All_Application_State.Ports All_Application_State.Ports.dest_port=53 All_Application_State.dest={dest} +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 - WMI Temporary Event Subscription - Rule] action.escu = 0 @@ -2961,7 +2805,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Modify Registry"], action.escu.known_false_positives = This registry key may be modified via administrators to implement a change in system policy. This type of change should be a very rare occurrence. 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", "Suspicious Windows Registry Activities"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows Defense Evasion Tactics"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Disabling Remote User Account Control action.notable = 1 @@ -2970,7 +2814,7 @@ action.notable.param.rule_description = The registry key SOFTWARE\Microsoft\Wind action.notable.param.rule_title = Registry Key Associated With Disabling Remote UAC 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 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.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 @@ -3110,7 +2954,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 = ["Suspicious Command-Line Executions", "Unusual Processes", "Ransomware"] +action.escu.analytic_story = ["Suspicious Command-Line Executions", "Ransomware", "Unusual Processes"] action.correlationsearch.enabled = 1 action.correlationsearch.label = System Processes Run From Unexpected Locations action.notable = 1 @@ -3119,7 +2963,7 @@ action.notable.param.rule_description = The system $dest$ has a process that nor action.notable.param.rule_title = System Processes Run From Unexpected Location 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 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 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 @@ -3144,61 +2988,44 @@ 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 - Attempt To Add Certificate To Untrusted Store - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-02-01 -action.escu.modification_date = 2018-11-02 -action.escu.asset_at_risk = AWS Instance +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 = 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.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 = ["AWS"] -action.escu.analytic_story = ["AWS Cross Account Activity"] +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 = AWS Cross Account Activity From Previously Unseen Account +action.correlationsearch.label = Attempt To Add Certificate To Untrusted Store 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.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.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_user -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 20 +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 = 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. +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 @@ -3209,7 +3036,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 = | 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 - Previously seen S3 bucket access by remote IP] action.escu = 0 @@ -3249,7 +3076,7 @@ action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Actions on Ob action.escu.known_false_positives = It's possible that a legitimate file could be created with the same name used by ransomware note files. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["SamSam Ransomware", "Ransomware"] +action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Common Ransomware Notes action.notable = 1 @@ -3258,7 +3085,7 @@ action.notable.param.rule_description = A file modification associated with a ra action.notable.param.rule_title = Ransomware Note 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 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 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 @@ -3445,7 +3272,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 = ["Web Fraud Detection", "Brand Monitoring", "Suspicious Emails"] +action.escu.analytic_story = ["Brand Monitoring", "Suspicious Emails", "Web Fraud Detection"] action.escu.fields_required = ["src_user"] action.escu.earliest_time_offset = 86400 action.escu.latest_time_offset = 86400 @@ -3469,7 +3296,7 @@ action.escu.full_search_name = ESCU - Get Update 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 = ["SamSam Ransomware", "Ransomware"] +action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 @@ -3594,7 +3421,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Hidden Cobra Malware", "DHS Report TA18-074A"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Hidden Cobra Malware", "DHS Report TA18-074A"] action.correlationsearch.enabled = 1 action.correlationsearch.label = First time seen command line argument action.notable = 1 @@ -3678,55 +3505,28 @@ 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 - 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", "Credential Dumping", "DNS Hijacking", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "DNS Amplification Attacks", "AWS Cross Account Activity", "Windows Service Abuse", "AWS User Monitoring", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Suspicious AWS S3 Activities", "Netsh Abuse", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "Suspicious MSHTA Activity", "AWS Network ACL Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious AWS Traffic", "Suspicious Emails", "Web Fraud Detection", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Splunk Enterprise Vulnerability CVE-2018-11409", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "Monitor Backup Solution", "SamSam Ransomware", "Disabling Security Tools", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Unusual AWS EC2 Modifications", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Asset Tracking", "Windows Defense Evasion Tactics", "Router & Infrastructure Security", "Windows Log Manipulation", "Prohibited Traffic Allowed or Protocol Mismatch", "Dynamic DNS", "Suspicious AWS Login Activities", "Windows Persistence Techniques", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] +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 - Create a list of approved AWS service accounts] action.escu = 0 @@ -3762,7 +3562,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 = ["Suspicious AWS S3 Activities", "Command and Control", "Suspicious AWS Traffic", "AWS Suspicious Provisioning Activities"] +action.escu.analytic_story = ["AWS Suspicious Provisioning Activities", "Suspicious AWS S3 Activities", "Command and Control", "Suspicious AWS Traffic"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 @@ -3796,28 +3596,28 @@ schedule_window = auto is_visible = false search = | search sourcetype="netbackup_logs" dest={dest} -[ESCU - Get All AWS Activity From Region] +[ESCU - Get Backup Logs For Endpoint] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-19 -action.escu.modification_date = 2018-03-19 +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 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.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 = 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.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 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. +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=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 +search = | search sourcetype="netbackup_logs" COMPUTERNAME={dest} | rename COMPUTERNAME as dest, MESSAGE as signature | table _time, dest, signature [ESCU - Child Processes of Spoolsv.exe - Rule] action.escu = 0 @@ -3869,55 +3669,52 @@ 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 - Detect Prohibited Applications Spawning cmd.exe - Rule] +[ESCU - Get Process responsible for the DNS traffic] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-10-07 -action.escu.modification_date = 2018-11-15 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2017-04-10 +action.escu.modification_date = 2017-11-09 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.search_type = detection +action.escu.eli5 = none +action.escu.how_to_implement = You must be ingesting endpoint data that associates processes with network events. This can come from endpoint protection products such as carbon black, or endpoint data sources such as Sysmon. +action.escu.data_models = ["Application_State"] +action.escu.full_search_name = ESCU - Get Process responsible for the DNS traffic +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 Command-Line Executions", "Suspicious MSHTA Activity"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Prohibited Applications Spawning cmd.exe -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.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, parent_process -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. -dispatch.earliest_time = -70m@m -dispatch.latest_time = -10m@m +action.escu.analytic_story = ["DNS Hijacking", "Brand Monitoring", "Command and Control", "Data Protection", "Host Redirection", "Suspicious DNS Traffic", "Dynamic DNS"] +action.escu.fields_required = ["dest"] +action.escu.earliest_time_offset = 3600 +action.escu.latest_time_offset = 86400 +description = While investigating, an analyst will want to know what process and parent_ process is responsible for generating suspicious DNS traffic. Use the following search and enter the value of src_ip in the search to get specific details on the process responsible for creating the DNS traffic. 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.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_name Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] +search = | tstats allow_old_summaries=true values(All_Application_State.process) as "process" from datamodel=Application_State where nodename=All_Application_State.Ports All_Application_State.Ports.dest_port=53 All_Application_State.dest={dest} + +[ESCU - Systems Ready for Spectre-Meltdown Windows Patch] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-01-08 +action.escu.modification_date = 2018-01-08 +action.escu.channel = ESCU +action.escu.eli5 = 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. +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.data_models = ["Change_Analysis"] +action.escu.full_search_name = ESCU - Systems Ready for Spectre-Meltdown Windows Patch +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 = ["Spectre And Meltdown Vulnerabilities"] +description = Some AV applications can cause the Spectre/Meltdown patch for Windows not to install successfully. This registry key is supposed to be created by the AV engine when it has been patched to be able to handle the Windows patch. If this key has been written, the system can then be patched for Spectre and Meltdown. +dispatch.earliest_time = -1d@d +dispatch.latest_time = -10m@m +disabled=true +realtime_schedule = 0 +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="HKLM\Software\Microsoft\Windows\CurrentVersion\QualityCompat*") by All_Changes.dest, All_Changes.command, All_Changes.user, All_Changes.object, All_Changes.object_path | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` [ESCU - Detect hosts connecting to dynamic domain providers - Rule] action.escu = 0 @@ -3935,7 +3732,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 = ["Dynamic DNS", "Suspicious DNS Traffic", "Command and Control", "Data Protection", "DNS Hijacking", "Prohibited Traffic Allowed or Protocol Mismatch"] +action.escu.analytic_story = ["DNS Hijacking", "Command and Control", "Data Protection", "Suspicious DNS Traffic", "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 @@ -3944,7 +3741,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 - 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.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 @@ -4083,29 +3880,28 @@ 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 - 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", "SamSam Ransomware", "Ransomware", "DNS Hijacking"] -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 - Detect USB device insertion - Rule] action.escu = 0 @@ -4221,7 +4017,7 @@ action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Ac 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 = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Abnormally High AWS Instances Launched by User action.notable = 1 @@ -4230,7 +4026,7 @@ action.notable.param.rule_description = An abnormally high number of instances w action.notable.param.rule_title = High Number of instances launched by $userName$ 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 Instance Details by instanceId\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 - ESCU - Investigate AWS activities via region name\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 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 = userName @@ -4304,28 +4100,76 @@ 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 All AWS Activity From City] +[ESCU - Detect Spike in AWS API Activity - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-19 -action.escu.modification_date = 2018-03-19 +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.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.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 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. +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 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: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 = 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 - RunDLL Loading DLL By Ordinal - Rule] action.escu = 0 @@ -4376,111 +4220,91 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*rundll32.exe* cmdline="*AppData*" cmdline="*,#2" | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` -[ESCU - Email servers sending high volume traffic to hosts - Rule] +[ESCU - Get Notable Info] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-12-20 -action.escu.modification_date = 2017-12-20 +action.escu.creation_date = 2017-03-15 +action.escu.modification_date = 2017-09-20 +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 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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Credential Dumping", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "DNS Amplification Attacks", "Windows Service Abuse", "AWS User Monitoring", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Windows Privilege Escalation", "Suspicious AWS S3 Activities", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "AWS Network ACL Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious AWS Traffic", "Web Fraud Detection", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Collection and Staging", "Splunk Enterprise Vulnerability CVE-2018-11409", "Malicious PowerShell", "DHS Report TA18-074A", "Disabling Security Tools", "Suspicious DNS Traffic", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Lateral Movement", "Asset Tracking", "Windows Defense Evasion Tactics", "Router & Infrastructure Security", "Windows Log Manipulation", "Dynamic DNS", "Suspicious AWS Login Activities", "Windows Persistence Techniques", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] +action.escu.fields_required = ["event_id"] +action.escu.earliest_time_offset = 3600 +action.escu.latest_time_offset = 3600 +description = This search queries the notable index to retrieve detailed information captured within the notable. Every notable has a unique ID associated with it, which is used to point us directly to the notable event under investigation. +disabled=true +realtime_schedule = 0 +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 - Get Vulnerability Logs For Endpoint] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-08-24 +action.escu.modification_date = 2017-09-10 +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.known_false_positives = None at this time +action.escu.search_type = contextual +action.escu.providing_technologies = ["Nessus"] +action.escu.analytic_story = ["DNS Hijacking", "Ransomware", "SamSam Ransomware", "ColdRoot MacOS RAT"] +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 +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | from datamodel Vulnerabilities.Vulnerabilities | search dest={dest} + +[ESCU - Windows hosts file modification - 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.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search may look complex, but it's a neat representation of how statistics can help you understand your dataset to bubble up events that are not normal compared to its behavior. The search consists of three parts. The first part of the SPL fetches the data you want to work on. In this search, we calculate the sum of bytes sent and bytes_out from systems categorized as email_server to each host. We then calculate the average and standard deviation for the bytes sent to all the hosts combined and on a per-host basis. Then we set threshold values to deviation_threshold and minimum_data_samples using eval statements. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. We then check for byte transfers that are statistically significantly higher than normal. The search then gives IP address of the host, the time of the increased byte transfer, how much data was transferred, and the average amount of data transfer the email server normally sends to all hosts and to this specific host. Finally, it includes the number of standard deviations away the byte count was from these averages. -action.escu.how_to_implement = This search requires you to be ingesting your network traffic and populating the Network_Traffic data model. Your email servers must be categorized as "email_server" for the search to work, as well. You may need to adjust the deviation_threshold and minimum_data_samples values based on the network traffic in your environment. The "deviation_threshold" field is a multiplying factor to control how much variation you're willing to tolerate. The "minimum_data_samples" field is the minimum number of connections of data samples required for the statistic to be valid. -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Email servers sending high volume traffic to hosts - Rule -action.escu.mappings = {"mitre_attack": ["Collection", "Email Collection", "Commonly Used Port"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7"], "nist": ["PR.PT", "DE.CM", "DE.AE"]} -action.escu.known_false_positives = The false-positive rate will vary based on how you set the deviation_threshold and data_samples values. Our recommendation is to adjust these values based on your network traffic to and from your email servers. +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.search_type = detection -action.escu.providing_technologies = ["Bro", "Splunk Stream"] -action.escu.analytic_story = ["Collection and Staging"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Host Redirection"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Email servers sending high volume traffic to hosts +action.correlationsearch.label = Windows hosts file modification action.notable = 1 -action.notable.param.nes_fields = dest_ip -action.notable.param.rule_description = High volume of traffic that originated from an email server is being sent to $dest_ip$ -action.notable.param.rule_title = High volume of traffic from an email server sent to $dest_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 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 = 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.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 -action.risk.param._risk_object = dest_ip +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 = dest_ip +alert.suppress.fields = dest,user alert.suppress.period = 86400s -cron_schedule = 0 0 * * * -description = This search looks for an increase of data transfers from your email server to your clients. This could be indicative of a malicious actor collecting data using your email server. -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 = | tstats `summariesonly` sum(All_Traffic.bytes_out) as bytes_out from datamodel=Network_Traffic where All_Traffic.src_category=email_server by All_Traffic.dest_ip _time span=1d | `drop_dm_object_name("All_Traffic")` | eventstats avg(bytes_out) as avg_bytes_out stdev(bytes_out) as stdev_bytes_out | eventstats count as num_data_samples avg(eval(if(_time < relative_time(now(), "@d"), bytes_out, null))) as per_source_avg_bytes_out stdev(eval(if(_time < relative_time(now(), "@d"), bytes_out, null))) as per_source_stdev_bytes_out by dest_ip | eval minimum_data_samples = 4, deviation_threshold = 3 | where num_data_samples >= minimum_data_samples AND bytes_out > (avg_bytes_out + (deviation_threshold * stdev_bytes_out)) AND bytes_out > (per_source_avg_bytes_out + (deviation_threshold * per_source_stdev_bytes_out)) AND _time >= relative_time(now(), "@d") | eval num_standard_deviations_away_from_server_average = round(abs(bytes_out - avg_bytes_out) / stdev_bytes_out, 2), num_standard_deviations_away_from_client_average = round(abs(bytes_out - per_source_avg_bytes_out) / per_source_stdev_bytes_out, 2) | table dest_ip, _time, bytes_out, avg_bytes_out, per_source_avg_bytes_out, num_standard_deviations_away_from_server_average, num_standard_deviations_away_from_client_average - -[ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-04-26 -action.escu.modification_date = 2018-05-07 -action.escu.asset_at_risk = AWS Instance -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search retrieves all the VPC Flow log entries that have recorded a blocked outbound network connection originating from your AWS environment. Then it kicks off a subsearch, which looks at the same data and performs the following series of steps: \ -\ -1. Counts the number of blocked outbound connections by each source IP\ -\ -1. Loads the cache file that contains the number of data points, the count from the latest hour, the average blocked connections, and the standard deviation for each source IP.\ -\ -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 `numberOfBlockedConnections` as `latestCount`.\ -\ -1. Calculates the new average value for each source IP 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 source IPs to the main search. The main search subsequently gets the list of all destination IPs for which the traffic was blocked, the network interface ID, the number of unique destination IP, and the total number of blocked connections for each of these source IP addresses. 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 VPC Flow logs. You can modify `dataPointThreshold` and `deviationThreshold` to better fit your environment. The `dataPointThreshold` variable is the number of data points required to meet the definition of "spike." The `deviationThreshold` variable is the number of standard deviations away from the mean that the value must be to be considered a spike. This search works best when you run the "Baseline of Blocked Outbound Connection" support search once to create a history of previously seen blocked outbound connections. -action.escu.full_search_name = ESCU - Detect Spike in blocked Outbound Traffic from your AWS - Rule -action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control"], "kill_chain_phases": ["Actions on Objectives", "Command and Control"], "cis20": ["CIS 11"], "nist": ["DE.AE", "DE.CM", "PR.AC"]} -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 = ["AWS Network ACL Activity", "Command and Control", "Suspicious AWS Traffic"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Spike in blocked Outbound Traffic from your AWS -action.notable = 1 -action.notable.param.nes_fields = src_ip -action.notable.param.rule_description = A spike in the blocked outbound connection is detected from source $src_ip$. -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 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 -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 will detect spike in blocked outbound network connections originating from within your AWS environment. It will also update the cache file that factors in the latest data. +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 @@ -4491,106 +4315,7 @@ quantity = 0 realtime_schedule = 0 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) [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) | stats count as numberOfBlockedConnections by src_ip | inputlookup baseline_blocked_outbound_connections append=t | fields - latestCount | stats values(*) as * by src_ip | rename numberOfBlockedConnections as latestCount | eval newAvgBlockedConnections=avgBlockedConnections + (latestCount-avgBlockedConnections)/720 | eval newStdevBlockedConnections=sqrt(((pow(stdevBlockedConnections, 2)*719 + (latestCount-newAvgBlockedConnections)*(latestCount-avgBlockedConnections))/720)) | eval avgBlockedConnections=coalesce(newAvgBlockedConnections, avgBlockedConnections), stdevBlockedConnections=coalesce(newStdevBlockedConnections, stdevBlockedConnections), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) | table src_ip, latestCount, numDataPoints, avgBlockedConnections, stdevBlockedConnections | outputlookup baseline_blocked_outbound_connections | eval dataPointThreshold = 5, deviationThreshold = 3 | eval isSpike=if((latestCount > avgBlockedConnections+deviationThreshold*stdevBlockedConnections) AND numDataPoints > dataPointThreshold, 1, 0) | where isSpike=1 | table src_ip] | stats values(dest_ip) as "Blocked Destination IPs", values(interface_id) as "resourceId" count as numberOfBlockedConnections, dc(dest_ip) as uniqueDestConnections by src_ip - -[ESCU - Identify New User Accounts - 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 - Detect S3 access from a new IP - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-06-25 -action.escu.modification_date = 2018-06-28 -action.escu.asset_at_risk = S3 Bucket -action.escu.channel = ESCU -action.escu.confidence = low -action.escu.eli5 = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource -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 S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. -action.escu.full_search_name = ESCU - Detect S3 access from a new IP - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -action.escu.known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS S3 Activities"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect S3 access from a new IP -action.notable = 1 -action.notable.param.nes_fields = bucket_name, src_ip -action.notable.param.rule_description = A remote IP, $src_ip$, has made a successful connection with an S3 $bucket_name$. -action.notable.param.rule_title = S3 bucket $bucketName$ was accessed by a new $src_ip$ -action.notable.param.security_domain = network -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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 = 20 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = bucket_name, src_ip -alert.suppress.period = 86400s -cron_schedule = 5 * * * * -description = This search looks at S3 bucket-access logs and detects new or previously unseen remote IP addresses that have successfully accessed an S3 bucket. -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:s3:accesslogs http_status=200 [search sourcetype=aws:s3:accesslogs http_status=200 | stats earliest(_time) as firstTime latest(_time) as lastTime by bucket_name remote_ip | inputlookup append=t previously_seen_S3_access_from_remote_ip.csv | stats min(firstTime) as firstTime, max(lastTime) as lastTime by bucket_name remote_ip | outputlookup previously_seen_S3_access_from_remote_ip.csv | eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newIP=1 | convert ctime(firstTime) ctime(lastTime) | table bucket_name remote_ip]| iplocation remote_ip |rename remote_ip as src_ip | table _time bucket_name src_ip City Country operation request_uri +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 - Detect Large Outbound ICMP Packets - Rule] action.escu = 0 @@ -4751,7 +4476,7 @@ action.escu.full_search_name = ESCU - Investigate Web Activity From src_ip 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 = ["Splunk Enterprise Vulnerability CVE-2018-11409", "Dynamic DNS", "ColdRoot MacOS RAT", "DNS Hijacking"] +action.escu.analytic_story = ["DNS Hijacking", "Splunk Enterprise Vulnerability CVE-2018-11409", "ColdRoot MacOS RAT", "Dynamic DNS"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -4775,7 +4500,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "JBoss Vulnerability", "Dynamic DNS", "Unusual Processes", "Brand Monitoring", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "ColdRoot MacOS RAT", "Suspicious DNS Traffic", "Command and Control", "SamSam Ransomware", "DNS Amplification Attacks", "Router & Infrastructure Security", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Host Redirection", "Suspicious Emails", "Ransomware", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "Monitor Backup Solution", "DHS Report TA18-074A", "Use of Cleartext Protocols", "DNS Hijacking", "Prohibited Traffic Allowed or Protocol Mismatch"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Credential Dumping", "DNS Hijacking", "DNS Amplification Attacks", "Windows Service Abuse", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Netsh Abuse", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "Suspicious MSHTA Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious Emails", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "Monitor Backup Solution", "SamSam Ransomware", "Disabling Security Tools", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Asset Tracking", "Router & Infrastructure Security", "Windows Log Manipulation", "Prohibited Traffic Allowed or Protocol Mismatch", "Dynamic DNS", "Windows Persistence Techniques", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] action.escu.fields_required = ["user"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 @@ -4786,69 +4511,44 @@ 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 - Unsuccessful Netbackup backups - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-03-15 -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.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", "Credential Dumping", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Windows Defense Evasion Tactics", "Unusual Processes", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Command and Control", "SamSam Ransomware", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Ransomware", "Hidden Cobra Malware", "Windows File Extension and Association Abuse", "Malicious PowerShell", "DHS Report TA18-074A"] -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 = | from datamodel Application_State.Processes | search process=*{process}* dest={dest} - -[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-15 +action.escu.modification_date = 2017-09-12 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.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.confidence = high +action.escu.eli5 = This search looks across the most recent backup events for each host, and returns those messages that indicate there was a backup failure. +action.escu.how_to_implement = To successfully implement this search you need to obtain data from your backup solution, either from the backup logs on your endpoints or from a central server responsible for performing the backups. If you do not use Netbackup, you can modify this search for your specific backup solution. +action.escu.full_search_name = ESCU - Unsuccessful Netbackup backups - Rule +action.escu.mappings = {"cis20": ["CIS 10"], "nist": ["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 = ["SamSam Ransomware", "Ransomware"] +action.escu.providing_technologies = ["Netbackup"] +action.escu.analytic_story = ["Monitor Backup Solution"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Spike in File Writes +action.correlationsearch.label = Unsuccessful Netbackup backups 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.rule_description = The system $dest$ attempted a backup but encountered an error. +action.notable.param.rule_title = Failed backup attempt by $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 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 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 - All backup logs 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 = 30 +action.risk.param._risk_score = 10 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 +alert.suppress.period = 86400s +cron_schedule = 0 7 * * * +description = This search gives you the hosts where a backup was attempted and then failed. +dispatch.earliest_time = -24h@h dispatch.latest_time = -10m@m disabled=true enableSched = 1 @@ -4858,45 +4558,67 @@ 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 = sourcetype="netbackup_logs" | stats latest(_time) as latestTime by COMPUTERNAME, MESSAGE | search MESSAGE="An error occurred, failed to backup." | `ctime(latestTime)` | rename COMPUTERNAME as dest, MESSAGE as signature | table latestTime, dest, signature -[ESCU - Detect new API calls from user roles - Rule] +[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.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.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 - Detect New Open S3 buckets - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-07-25 +action.escu.modification_date = 2018-07-25 +action.escu.asset_at_risk = S3 Bucket +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. +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), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. +action.escu.full_search_name = ESCU - Detect New Open S3 buckets - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +action.escu.known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect new API calls from user roles +action.correlationsearch.label = Detect New Open S3 buckets 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.rule_description = An open/public S3 bucket, $bucketName$, was created by $user$. +action.notable.param.rule_title = Public S3 bucket $bucketName$ created 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.next_steps = {"version": 1, "data": "Recommended following steps:\n\n1. [[action|escu_contextualize]]: Based on ESCU context gathering recommendations:\n - ESCU - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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._risk_score = 70 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = user +alert.suppress.fields = user,bucketName 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`. +cron_schedule = 5 * * * * +description = This search looks for CloudTrail events where a user has created an open/public S3 bucket. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -4907,7 +4629,7 @@ 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)` +search = sourcetype=aws:cloudtrail AllUsers eventName=PutBucketAcl | spath output=userIdentityArn path=userIdentity.arn | spath output=bucketName path=requestParameters.bucketName | spath output=aclControlList path=requestParameters.AccessControlPolicy.AccessControlList | spath input=aclControlList output=grantee path=Grant{} | mvexpand grantee | spath input=grantee | search Grantee.URI=*AllUsers | rename userIdentityArn as user| table _time, src,awsRegion Permission, Grantee.URI, bucketName, user [ESCU - Hiding Files And Directories With Attrib.exe - Rule] action.escu = 0 @@ -4924,7 +4646,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Persistence"], "kil action.escu.known_false_positives = Some applications and users may legitimately use attrib.exe to interact with the files. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Windows Defense Evasion Tactics"] +action.escu.analytic_story = ["Windows Defense Evasion Tactics", "Windows Persistence Techniques"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Hiding Files And Directories With Attrib.exe action.notable = 1 @@ -4933,7 +4655,7 @@ action.notable.param.rule_description = Attrib.exe is often used by attackers to action.notable.param.rule_title = Suspicious usage of attrib.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 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.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 @@ -5008,28 +4730,56 @@ 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.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.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. +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 +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=stream:http {session_id} | stats values(url) values(http_user_agent) by src_ip status +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 - Execution of File With Spaces Before Extension - Rule] action.escu = 0 @@ -5351,28 +5101,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 - Discover DNS records] +[ESCU - File with Samsam Extension - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2019-02-14 -action.escu.modification_date = 2019-02-14 +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.eli5 = Discover the DNS records and their answers for domains owned by the company using network traffic events. The discovered events are exported as a lookup named `discovered_dns_records.csv` -action.escu.how_to_implement = To successfully implement this search, you must be ingesting network traffic, and populating the Network_Traffic data model. Also make sure that the cim_corporate_web_domains and cim_corporate_email_domains lookups are populated with the domains owned by your corporation -action.escu.data_models = ["Network_Resolution"] -action.escu.full_search_name = ESCU - Discover DNS records -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 = ["DNS Hijacking"] -description = The search takes corporate and common cloud provider domains configured under cim_corporate_email_domains.csv, cim_corporate_web_domains.csv, and cloud_domains.csv and finds their responses across the last 30 days from data in the Network Traffic datamodel, then stores the output under the discovered_dns_records.csv lookup -dispatch.earliest_time = -30d@d +action.escu.confidence = high +action.escu.eli5 = This search looks at file modifications across your hosts and creates notable events when it identifies files with extensions associated with the SamSam ransomware, including `.stubbin`, `.berkshire`, `.satoshi`, `.sophos`, or `.keyxml`. Files with these extensions have been observed in SamSam attacks consisting of payload data or keying material. +action.escu.how_to_implement = You must be ingesting data that records file-system activity from your hosts to populate the Endpoint file-system data-model node. If you are using Sysmon, you will need a Splunk Universal Forwarder on each endpoint from which you want to collect data. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - File with Samsam Extension - Rule +action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Installation"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +action.escu.known_false_positives = Because these extensions are not typically used in normal operations, you should investigate all results. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["SamSam Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = File with Samsam Extension +action.notable = 1 +action.notable.param.nes_fields = dest, file_name +action.notable.param.rule_description = A file with an extension associated with SamSam ransomware was written on $dest$. +action.notable.param.rule_title = File with known SamSam 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 = 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,file_name +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = The search looks for file writes with extensions consistent with a SamSam ransomware attack. +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 = | inputlookup cim_corporate_email_domains.csv | inputlookup append=T cim_corporate_web_domains.csv | inputlookup append=T cim_cloud_domains.csv | eval domain = trim(replace(domain, "\*", "")) | join domain [|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as answer from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!="unknown" DNS.answer!="" by DNS.query | rename DNS.query as query | where query!="unknown" | rex field=query "(?\w+\.\w+?)(?:$|/)"] | makemv delim=" " answer | makemv delim=" " type | sort -count | table count,domain,type,query,answer | outputlookup createinapp=true discovered_dns_records.csv +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 "(?\.[^\.]+)$" | search file_extension=.stubbin OR file_extension=.berkshire OR file_extension=.satoshi OR file_extension=.sophos OR file_extension=.keyxml [ESCU - Investigate Successful Remote Desktop Authentications] action.escu = 0 @@ -5398,6 +5175,155 @@ 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 - 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.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Common Ransomware Extensions +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.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 = 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,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 +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 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 - Scheduled tasks used in BadRabbit ransomware - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-11-03 +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 execution of schtasks.exe with parameters that indicate that specific task names related to the Bad Rabbit ransomware were created or deleted. The specific task name used are rhaegal, drogon and viserion_. 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. +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 - Scheduled tasks used in BadRabbit ransomware - Rule +action.escu.mappings = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +action.escu.known_false_positives = No known false positives +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Scheduled tasks used in BadRabbit ransomware +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 that task names specific to Bad Rabbit ransomware has been created or deleted +action.notable.param.rule_title = Scheduled tasks used in BadRabbit ransomware 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 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.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, process +alert.suppress.period = 28800s +cron_schedule = 0 * * * * +description = This search looks for flags passed to schtasks.exe on the command-line that indicate that task names related to the execution of Bad Rabbit ransomware were created or deleted. +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=*schtasks.exe (Processes.process= *create* OR Processes.process= *delete*) by Processes.parent_process Processes.process_name Processes.user | `drop_dm_object_name("")` | `ctime(firstTime)`|`ctime(lastTime)` | search (process=*rhaegal* OR process=*drogon* OR *viserion_*) + +[ESCU - EC2 Instance Started With Previously Unseen User - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-03-15 +action.escu.modification_date = 2018-03-12 +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 launches within the last hour and then appends the historical data in the lookup file to those results. It 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. +action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen User - Rule +action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +action.escu.known_false_positives = It's possible that a user will start to create EC2 instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = EC2 Instance Started With Previously Unseen User +action.notable = 1 +action.notable.param.nes_fields = user, dest +action.notable.param.rule_description = The EC2 instance $dest$ was created by $user$. This user has never created an EC2 instance before. +action.notable.param.rule_title = EC2 Instance Created 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 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 = user, dest +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = This search looks for EC2 instances being created by users who have not created them before. +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 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 - Detect new user AWS Console Login - Rule] action.escu = 0 action.escu.enabled = 1 @@ -5447,55 +5373,6 @@ 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" -[ESCU - EC2 Instance Started With Previously Unseen User - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-03-15 -action.escu.modification_date = 2018-03-12 -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 launches within the last hour and then appends the historical data in the lookup file to those results. It 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. -action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen User - Rule -action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.known_false_positives = It's possible that a user will start to create EC2 instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Cryptomining", "Suspicious AWS EC2 Activities"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = EC2 Instance Started With Previously Unseen User -action.notable = 1 -action.notable.param.nes_fields = user, dest -action.notable.param.rule_description = The EC2 instance $dest$ was created by $user$. This user has never created an EC2 instance before. -action.notable.param.rule_title = EC2 Instance Created 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 - 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 - ESCU - Investigate AWS activities via region name\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 created by users who have not created them before. -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 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 - Previously seen command line arguments] action.escu = 0 action.escu.enabled = 1 @@ -5508,7 +5385,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Hidden Cobra Malware", "DHS Report TA18-074A"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Hidden Cobra Malware", "DHS Report TA18-074A"] 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 @@ -5568,43 +5445,44 @@ 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=wmic.exe AND Processes.process= */node* by Processes.user Processes.process_name Processes.parent_process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` -[ESCU - Process Execution via WMI - Rule] +[ESCU - Registry Keys for Creating SHIM Databases - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-10-23 -action.escu.modification_date = 2018-10-23 +action.escu.creation_date = 2017-08-27 +action.escu.modification_date = 2017-09-15 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 processes launched via WMI, either remotely or locally, by looking for processes launched by WmiPrvSE.exe, which is the process WMI uses to execute new processes and commands. -action.escu.how_to_implement = To successfully implement this search, you must 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 - Process Execution via WMI - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "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 wmi to execute commands for legitimate purposes. +action.escu.eli5 = In this search, we look for modifications to registry keys used for shim databases on Microsoft platforms via the object_category and object_path field in the Change_Analysis data model and give you the destination, command used to initiate the change, the user who conducted this activity, the resource affected(object), and the whole path of the object. An application compatibility shim is a small library that transparently intercepts an API (via hooking), changes the parameters passed, handles the operation itself, or redirects the operation elsewhere, such as additional code stored on a system. This capability can be also leveraged by attackers to create and store malicious files in a shim database as observed in CARBANAK backdoor. +action.escu.how_to_implement = To successfully implement this search, you must populate the Change_Analysis data model. This is typically populated via endpoint detection and response products, such as Carbon Black or other endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. +action.escu.data_models = ["Change_Analysis"] +action.escu.full_search_name = ESCU - Registry Keys for Creating SHIM Databases - Rule +action.escu.mappings = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +action.escu.known_false_positives = There are many legitimate applications that leverage shim databases for compatibility purposes for legacy applications action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Suspicious WMI Use"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows Persistence Techniques"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Process Execution via WMI +action.correlationsearch.label = Registry Keys for Creating SHIM Databases action.notable = 1 -action.notable.param.nes_fields = dest, user, process -action.notable.param.rule_description = This search looks for child processes of WmiPrvSE.exe, which indicates that a process was launched via WMI. -action.notable.param.rule_title = Process launched via WMI on $dest$ +action.notable.param.nes_fields = dest, user +action.notable.param.rule_description = A registry key that is used for persistence on Windows was modified on $dest$ by $user$ +action.notable.param.rule_title = Registry Key Associated With SHIM databases 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.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._risk_score = 30 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest,user -alert.suppress.period = 28800s +alert.suppress.fields = dest,object_path +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = This search looks for processes launched via WMI. +description = This search looks for registry activity associated with application compatibility shims, which can be leveraged by attackers for various nefarious purposes. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -5615,7 +5493,30 @@ quantity = 0 realtime_schedule = 0 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)` +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", "Credential Dumping", "DNS Hijacking", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "Windows Service Abuse", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Suspicious AWS S3 Activities", "Netsh Abuse", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "Suspicious MSHTA Activity", "AWS Network ACL Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious Emails", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "SamSam Ransomware", "Disabling Security Tools", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Asset Tracking", "Windows Defense Evasion Tactics", "Router & Infrastructure Security", "Windows Log Manipulation", "Dynamic DNS", "Suspicious AWS Login Activities", "Windows Persistence Techniques", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] +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 @@ -5633,7 +5534,7 @@ action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control", action.escu.known_false_positives = Legitimate DNS activity can be detected in this search. Investigate, verify and update the list of authorized DNS servers as appropriate. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["Suspicious DNS Traffic", "Command and Control", "DNS Hijacking"] +action.escu.analytic_story = ["DNS Hijacking", "Command and Control", "Suspicious DNS Traffic"] action.correlationsearch.enabled = 1 action.correlationsearch.label = DNS Query Requests Resolved by Unauthorized DNS Servers action.notable = 1 @@ -5642,7 +5543,7 @@ action.notable.param.rule_description = The table represents a list of unauthori action.notable.param.rule_title = DNS requests resolved by unauthorized DNS 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 Risk Modifiers For Endpoint\n - ESCU - Get Risk Modifiers For User\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 DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get History Of Email Sources\n - ESCU - Get Process responsible for the DNS traffic\n - ESCU - Investigate Web Activity From src_ip\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"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -5714,56 +5615,6 @@ schedule_window = auto is_visible = false search = |tstats `summariesonly` values(All_Email.dest) as dest values(All_Email.recipient) as recepient min(_time) as firstTime max(_time) as lastTime count from datamodel=Email.All_Email by All_Email.src |`drop_dm_object_name(All_Email)` | `ctime(firstTime)` | `ctime(lastTime)` -[ESCU - Shim Database File Creation - 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.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.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Windows Persistence Techniques"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Shim Database File Creation -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.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 = 20 -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 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 -counttype = number of events -relation = greater than -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 - Script Execution via WMI - Rule] action.escu = 0 action.escu.enabled = 1 @@ -5884,29 +5735,54 @@ 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 - Get Authentication Logs For Endpoint] +[ESCU - Schtasks scheduling job on remote system - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-10 -action.escu.modification_date = 2017-11-01 +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.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", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "JBoss Vulnerability", "Windows Defense Evasion Tactics", "Dynamic DNS", "Unusual Processes", "Brand Monitoring", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "ColdRoot MacOS RAT", "Suspicious DNS Traffic", "Command and Control", "SamSam Ransomware", "Router & Infrastructure Security", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Host Redirection", "Suspicious Emails", "Ransomware", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "DHS Report TA18-074A", "DNS Hijacking", "Prohibited Traffic Allowed or Protocol Mismatch"] -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. +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.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Lateral Movement"] +action.correlationsearch.enabled = 1 +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 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 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 = 50 +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 +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 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 - Detect web traffic to dynamic domain providers - Rule] action.escu = 0 @@ -5972,7 +5848,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Indicator Removal o action.escu.known_false_positives = The wevtutil.exe application is a legitimate Windows event log utility. Administrators may use it to manage Windows event logs. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Log Manipulation", "Ransomware"] +action.escu.analytic_story = ["Ransomware", "Windows Log Manipulation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Suspicious wevtutil Usage action.notable = 1 @@ -5981,7 +5857,7 @@ action.notable.param.rule_description = wevtutil is the windows event log tool. action.notable.param.rule_title = Suspicious wevtutil Usage 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 @@ -6090,7 +5966,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 = ["AWS Network ACL Activity", "Command and Control", "Suspicious AWS Traffic"] +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 @@ -6101,65 +5977,44 @@ 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 - Detect Spike in AWS API Activity - Rule] +[ESCU - Monitor Web Traffic For Brand Abuse - Rule] 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-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 = 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.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 = ["AWS"] -action.escu.analytic_story = ["AWS User Monitoring"] +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 Spike in AWS API Activity +action.correlationsearch.label = Monitor Web Traffic For Brand Abuse 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.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 = 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.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 = user -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 30 +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 = user -alert.suppress.period = 14400s +alert.suppress.fields = src +alert.suppress.period = 86400s 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. +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 @@ -6170,7 +6025,7 @@ 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 = | 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 - Detect PsExec With accepteula Flag - Rule] action.escu = 0 @@ -6187,7 +6042,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "Command-Line Interface"], 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.escu.analytic_story = ["DHS Report TA18-074A", "SamSam Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect PsExec With accepteula Flag action.notable = 1 @@ -6196,7 +6051,7 @@ action.notable.param.rule_description = The process pssxec.exe was run with the 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.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 @@ -6221,50 +6076,54 @@ 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 -[ESCU - Identify Systems Receiving Remote Desktop Traffic] +[ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-24 -action.escu.modification_date = 2017-09-15 +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 = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. -action.escu.how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Identify Systems Receiving Remote Desktop Traffic -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 = ["Lateral Movement"] -description = This search counts the numbers of times the system has created remote desktop traffic -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=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.dest | `drop_dm_object_name("All_Traffic")` | sort - count - -[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.confidence = medium +action.escu.eli5 = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. +action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule +action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +action.escu.known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. +action.escu.search_type = detection 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 +action.escu.analytic_story = ["AWS Cryptomining"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = EC2 Instance Started With Previously Unseen Instance Type +action.notable = 1 +action.notable.param.nes_fields = instanceType +action.notable.param.rule_description = The EC2 instance type $instanceType$ was used for the first time to create $dest$. +action.notable.param.rule_title = New EC2 Instance Type $instanceType$ 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 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 instance types. +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 | 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 +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 - Sc.exe Manipulating Windows Services - Rule] action.escu = 0 @@ -6281,7 +6140,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 = ["Disabling Security Tools", "Windows Persistence Techniques", "Orangeworm Attack Group", "Windows Service Abuse", "DHS Report TA18-074A"] +action.escu.analytic_story = ["Windows Service Abuse", "Orangeworm Attack Group", "DHS Report TA18-074A", "Disabling Security Tools", "Windows Persistence Techniques"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Sc.exe Manipulating Windows Services action.notable = 1 @@ -6315,65 +6174,44 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) process=*sc.exe* AND (cmdline="* create *" OR cmdline="* config *") | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` -[ESCU - Detect Spike in S3 Bucket deletion - Rule] +[ESCU - Remote Desktop Network Bruteforce - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-07-17 -action.escu.modification_date = 2018-11-27 -action.escu.asset_at_risk = S3 Bucket +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 = This search and its corresponding subsearch run through the following series of steps: \ -\ -1. Retrieve all the AWS CloudTrail log entries that have recorded AWS API calls specifically for deletion of S3 buckets.\ -\ -1. Kick off a subsearch that retrieves the same data and pulls out and converts the ARN into a more friendly format.\ -\ -1. Count the number of API calls per ARN.\ -\ -1. Load 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. Drop the count from the latest hour, since it is unnecessary, and merge the rest of the data with the results of the `stats` command. \ -\ -1. Rename `apiCalls` as `latestCount`.\ -\ -1. Calculate the new average value for each ARN with the latest count, weighting the past more heavily than the current hour. It does the same for the standard deviation—weighting the past more heavily than the current.\ -\ -1. Update the cache file with the latest results.\ -\ -1. Set the minimum threshold for the number of data points and the number of standard deviations away from the mean it must be to be considered a spike.\ -\ -1. Make 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 if the count is a sufficient number of standard deviations away from the average.\ -\ -1. Filter 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 the deleted S3 buckets, the number of unique API calls, and the total number of API calls for each of these user ARNs. -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. This search works best when you run the "Baseline of S3 Bucket deletion activity by ARN" support search once to create a baseline of previously seen S3 bucket-deletion activity. -action.escu.full_search_name = ESCU - Detect Spike in S3 Bucket deletion - Rule -action.escu.mappings = {"mitre_attack": ["Credential Access", "Execution"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["DE.DP", "DE.CM", "PR.AC"]} -action.escu.known_false_positives = Based on the values of`dataPointThreshold` and `deviationThreshold`, the false positive rate may vary. Please modify this according the your environment. +action.escu.eli5 = This search monitors for abnormal amounts of remote-desktop (RDP) traffic from a source to a destination that may be indicative of a brute-force attack. It does this by filtering out RDP traffic from the Network_Traffic.All_Traffic data model, using twice the standard deviation of all source-to-destination connections. If any tuple is within more than two standard deviations of all other usual RDP traffic flows, it is indicative of a brute-force attack. +action.escu.how_to_implement = You must ensure that your network traffic data is populating the Network_Traffic data model. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Remote Desktop Network Bruteforce - Rule +action.escu.mappings = {"mitre_attack": ["Credential Access", "Remote Desktop Protocol", "Lateral Movement"], "kill_chain_phases": ["Reconnaissance", "Delivery"], "cis20": ["CIS 12", "CIS 9", "CIS 16"], "nist": ["DE.AE", "PR.AC", "PR.IP"]} +action.escu.known_false_positives = RDP gateways may have unusually high amounts of traffic from all other hosts' RDP applications in the network. action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS S3 Activities"] +action.escu.providing_technologies = ["Bro", "Splunk Stream"] +action.escu.analytic_story = ["SamSam Ransomware"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Spike in S3 Bucket deletion +action.correlationsearch.label = Remote Desktop Network Bruteforce action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = A spike in the number of S3 buckets deleted by $user$ was detected. -action.notable.param.rule_title = Spike detected in S3 bucket deletion activity by $user$. +action.notable.param.nes_fields = dest, src +action.notable.param.rule_description = Remote-desktop traffic detected from $src$ to $dest$. This activity is consistent with a brute-force attack. +action.notable.param.rule_title = Bruteforce Remote Desktop Network Traffic detected from $src$ to $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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 = user -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 30 +action.risk.param._risk_object = src +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 = user -alert.suppress.period = 14400s +alert.suppress.fields = dest,src +alert.suppress.period = 28800s cron_schedule = 0 * * * * -description = This search detects users creating spikes in API activity related to deletion of S3 buckets in your AWS environment. It will also update the cache file that factors in the latest data. +description = This search looks for RDP application network traffic and filters any source/destination pair generating more than twice the standard deviation of the average traffic. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -6384,7 +6222,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail eventName=DeleteBucket [search sourcetype=aws:cloudtrail eventName=DeleteBucket | spath output=arn path=userIdentity.arn | stats count as apiCalls by arn | inputlookup s3_deletion_baseline append=t | fields - latestCount | stats values(*) as * by arn | rename apiCalls as latestCount | eval newAvgApiCalls=avgApiCalls + (latestCount-avgApiCalls)/720 | eval newStdevApiCalls=sqrt(((pow(stdevApiCalls, 2)*719 + (latestCount-newAvgApiCalls)*(latestCount-avgApiCalls))/720)) | eval avgApiCalls=coalesce(newAvgApiCalls, avgApiCalls), stdevApiCalls=coalesce(newStdevApiCalls, stdevApiCalls), numDataPoints=if(isnull(latestCount), numDataPoints, numDataPoints+1) | table arn, latestCount, numDataPoints, avgApiCalls, stdevApiCalls | outputlookup s3_deletion_baseline | eval dataPointThreshold = 15, deviationThreshold = 3 | eval isSpike=if((latestCount > avgApiCalls+deviationThreshold*stdevApiCalls) AND numDataPoints > dataPointThreshold, 1, 0) | where isSpike=1 | rename arn as userIdentity.arn | table userIdentity.arn] | spath output=user userIdentity.arn | spath output=bucketName path=requestParameters.bucketName | stats values(bucketName) as bucketName, count as numberOfApiCalls, dc(eventName) as uniqueApisCalled by user +search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where All_Traffic.app=rdp by All_Traffic.src All_Traffic.dest All_Traffic.dest_port | eventstats stdev(count) AS stdev avg(count) AS avg p50(count) AS p50| where count>(stdev*2) | rename All_Traffic.src AS src All_Traffic.dest AS dest | table firstTime lastTime src dest count avg p50 stdev [ESCU - Deleting Shadow Copies - Rule] action.escu = 0 @@ -6402,7 +6240,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 = ["Windows Log Manipulation", "SamSam Ransomware", "Ransomware"] +action.escu.analytic_story = ["Ransomware", "SamSam Ransomware", "Windows Log Manipulation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Deleting Shadow Copies action.notable = 1 @@ -6411,7 +6249,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 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 @@ -6471,7 +6309,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 = ["AWS Network ACL Activity", "Suspicious AWS S3 Activities", "Suspicious AWS EC2 Activities", "Suspicious AWS Login Activities", "Unusual AWS EC2 Modifications"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "Suspicious AWS S3 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 @@ -6532,28 +6370,54 @@ 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 - Count of assets by category] +[ESCU - Suspicious writes to windows Recycle Bin - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-11 -action.escu.modification_date = 2017-09-13 +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.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 +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 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_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 @@ -6591,7 +6455,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 = ["SamSam Ransomware", "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 @@ -6623,56 +6487,6 @@ 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.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["SamSam Ransomware", "Ransomware"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Common Ransomware Extensions -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.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 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 = 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 -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 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 - Abnormally High AWS Instances Terminated by User - Rule] action.escu = 0 action.escu.enabled = 1 @@ -6771,28 +6585,55 @@ 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] action.escu = 0 @@ -6832,7 +6673,7 @@ action.escu.mappings = {"mitre_attack": ["Persistence", "Privilege Escalation", action.escu.known_false_positives = It is unusual for a service to be created or modified by directly manipulating the registry. However, there may be legitimate instances of this behavior. It is important to validate and investigate, as appropriate. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Windows Service Abuse"] +action.escu.analytic_story = ["Windows Service Abuse", "Windows Persistence Techniques"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Reg.exe Manipulating Windows Services Registry Keys action.notable = 1 @@ -6866,55 +6707,50 @@ schedule_window = auto is_visible = false search = sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational services | search (EventCode=12 OR EventCode=13) process=reg.exe object_path=*\\services\\* | stats count values(object_path) as object_path min(_time) as firstTime max(_time) as lastTime by dest process | `ctime(firstTime)` |`ctime(lastTime)` -[ESCU - Scheduled tasks used in BadRabbit ransomware - Rule] +[ESCU - Baseline of API Calls per User ARN] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-11-03 -action.escu.modification_date = 2018-11-15 -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 = medium -action.escu.eli5 = The search looks for execution of schtasks.exe with parameters that indicate that specific task names related to the Bad Rabbit ransomware were created or deleted. The specific task name used are rhaegal, drogon and viserion_. 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. -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 - Scheduled tasks used in BadRabbit ransomware - Rule -action.escu.mappings = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} -action.escu.known_false_positives = No known false positives -action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Ransomware"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Scheduled tasks used in BadRabbit ransomware -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 that task names specific to Bad Rabbit ransomware has been created or deleted -action.notable.param.rule_title = Scheduled tasks used in BadRabbit ransomware 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 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.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, process -alert.suppress.period = 28800s -cron_schedule = 0 * * * * -description = This search looks for flags passed to schtasks.exe on the command-line that indicate that task names related to the execution of Bad Rabbit ransomware were created or deleted. -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 min(_time) values(Processes.process) as process max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=*schtasks.exe (Processes.process= *create* OR Processes.process= *delete*) by Processes.parent_process Processes.process_name Processes.user | `drop_dm_object_name("")` | `ctime(firstTime)`|`ctime(lastTime)` | search (process=*rhaegal* OR process=*drogon* OR *viserion_*) +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 - Investigate AWS activities via region name] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-02-09 +action.escu.modification_date = 2018-02-09 +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 - 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.fields_required = ["awsRegion"] +action.escu.earliest_time_offset = 14400 +action.escu.latest_time_offset = 0 +description = This search lists all the user activities logged by CloudTrail for a specific region in question and will create a table of the values of parameters requested, the type of the event and the response from the AWS API by each user +disabled=true +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | search sourcetype=aws:cloudtrail awsRegion={awsRegion}| rename requestParameters.instancesSet.items{}.instanceId as instanceId| stats values(eventName) by userName instanceId [ESCU - AWS Cloud Provisioning From Previously Unseen Country - Rule] action.escu = 0 @@ -7079,7 +6915,7 @@ 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 = ["Credential Dumping", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Orangeworm Attack Group", "Suspicious Command-Line Executions", "Unusual Processes", "Brand Monitoring", "SamSam Ransomware", "Monitor for Unauthorized Software", "Host Redirection", "Suspicious Emails", "Ransomware"] +action.escu.analytic_story = ["Credential Dumping", "Suspicious Command-Line Executions", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Netsh Abuse", "Host Redirection", "Orangeworm Attack Group", "Suspicious Emails", "Unusual Processes", "Monitor for Unauthorized Software", "SamSam Ransomware"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -7090,55 +6926,28 @@ schedule_window = auto is_visible = false search = | from datamodel Web.Web | search src={dest} -[ESCU - Execution of File with Multiple Extensions - Rule] +[ESCU - Add Prohibited Processes to Enterprise Security] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-01-26 -action.escu.modification_date = 2018-11-02 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2017-06-27 +action.escu.modification_date = 2017-09-15 action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. -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. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Execution of File with Multiple Extensions - 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 Multiple Extensions -action.notable = 1 -action.notable.param.nes_fields = dest, process -action.notable.param.rule_description = The system $dest$ executed a file with a double extension. -action.notable.param.rule_title = Process With Multiple Extensions Launched 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"} -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 that have double extensions in the file name. This is typically done to obscure the "real" file extension and make it appear as though the file being accessed is a data file, as opposed to executable content. -dispatch.earliest_time = -70m@m +action.escu.eli5 = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. +action.escu.how_to_implement = This search should be run on each new install of ESCU. +action.escu.data_models = [] +action.escu.full_search_name = ESCU - Add Prohibited Processes to Enterprise Security +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 = ["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 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=Endpoint.Processes where Processes.process = *.doc.exe OR Processes.process = *.htm.exe OR Processes.process = *.html.exe OR Processes.process = *.txt.exe OR Processes.process = *.pdf.exe OR Processes.process = *.doc.exe by Processes.dest Processes.user Processes.process Processes.parent_process | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name(Processes)` +search = | inputlookup interesting_processes_lookup | search note!=ESCU* | inputlookup append=T prohibitedProcesses_lookup | fillnull value=* dest dest_pci_domain | fillnull value=false is_required is_secure | fillnull value=true is_prohibited | outputlookup interesting_processes_lookup | stats count [ESCU - Monitor Email For Brand Abuse - Rule] action.escu = 0 @@ -7190,6 +6999,55 @@ 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 - AWS Network Access Control List Deleted - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-01-08 +action.escu.modification_date = 2017-01-10 +action.escu.asset_at_risk = AWS Instance +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = The search looks for CloudTrail events to detect whether any network ACLs have been deleted and gives you values of error messages and error codes (if any), user details, user source IP, the user who initiated this request, and the name of the event. +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 - AWS Network Access Control List Deleted - Rule +action.escu.mappings = {"mitre_attack": ["Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11"], "nist": ["DE.DP", "DE.AE"]} +action.escu.known_false_positives = It's possible that a user has legitimately deleted a network ACL. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["AWS Network ACL Activity"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = AWS Network Access Control List Deleted +action.notable = 1 +action.notable.param.nes_fields = src, src_user, eventName +action.notable.param.rule_description = AWS network ACL has been deleted by $src_user. +action.notable.param.rule_title = AWS Network ACL deleted 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 - AWS Network ACL Details from ID\n - ESCU - AWS Network Interface details via resourceId\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 = src_user +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 80 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = src_user +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = Enforcing network-access controls is one of the defensive mechanisms used by cloud administrators to restrict access to a cloud instance. After the attacker has gained control of the AWS console by compromising an admin account, they can delete a network ACL and gain access to the instance from anywhere. This search will query the CloudTrail logs to detect users deleting network ACLs. +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 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 - Windows Updates Install Failures] action.escu = 0 action.escu.enabled = 1 @@ -7203,7 +7061,7 @@ 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 = ["SamSam Ransomware", "Ransomware"] +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 @@ -7213,28 +7071,29 @@ 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 - Add Prohibited Processes to Enterprise Security] +[ESCU - Get Authentication Logs For Endpoint] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-27 -action.escu.modification_date = 2017-09-15 +action.escu.creation_date = 2017-04-10 +action.escu.modification_date = 2017-11-01 action.escu.channel = ESCU -action.escu.eli5 = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. -action.escu.how_to_implement = This search should be run on each new install of ESCU. -action.escu.data_models = [] -action.escu.full_search_name = ESCU - Add Prohibited Processes to Enterprise Security +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 = support -action.escu.providing_technologies = ["Splunk Enterprise Security"] -action.escu.analytic_story = ["SamSam Ransomware", "Monitor for Unauthorized Software"] -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 +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", "Credential Dumping", "DNS Hijacking", "Suspicious Command-Line Executions", "Windows Service Abuse", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Netsh Abuse", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "Suspicious MSHTA Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious Emails", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "SamSam Ransomware", "Disabling Security Tools", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Asset Tracking", "Windows Defense Evasion Tactics", "Router & Infrastructure Security", "Windows Log Manipulation", "Prohibited Traffic Allowed or Protocol Mismatch", "Dynamic DNS", "Windows Persistence Techniques", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] +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 = | inputlookup interesting_processes_lookup | search note!=ESCU* | inputlookup append=T prohibitedProcesses_lookup | fillnull value=* dest dest_pci_domain | fillnull value=false is_required is_secure | fillnull value=true is_prohibited | outputlookup interesting_processes_lookup | stats count +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 - Single Letter Process On Endpoint - Rule] action.escu = 0 @@ -7336,6 +7195,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 - Suspicious Java Classes - Rule] action.escu = 0 action.escu.enabled = 1 @@ -7385,55 +7267,29 @@ schedule_window = auto is_visible = false search = sourcetype="stream:http" http_method=POST http_content_length>1 | regex form_data="(?i)java\.lang\.(?:runtime|processbuilder)" | rename src_ip as src | stats count earliest(_time) as firstTime, latest(_time) as lastTime, values(url) as uri, values(status) as status, values(http_user_agent) as http_user_agent by src, dest | convert ctime(firstTime) ctime(lastTime) -[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 = ["Lateral Movement", "SamSam Ransomware", "Hidden Cobra Malware"] -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 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 Outbound Emails to Hidden Cobra Threat Actors\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 = 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 - Monitor DNS For Brand Abuse - Rule] action.escu = 0 @@ -7607,6 +7463,55 @@ 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 @@ -7680,44 +7585,44 @@ 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] +[ESCU - Malicious PowerShell Process - Encoded Command - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-08-28 -action.escu.modification_date = 2018-12-02 +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 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.confidence = medium +action.escu.eli5 = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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 - 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.full_search_name = ESCU - Malicious PowerShell Process - Encoded Command - 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 = System administrators may use this option, 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 = ["Credential Dumping"] +action.escu.analytic_story = ["Malicious PowerShell"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Attempted Credential Dump From Registry Via Reg.exe +action.correlationsearch.label = Malicious PowerShell Process - Encoded Command 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.rule_description = The system $dest$ executed a PowerShell process that has an encoded command on the command-line +action.notable.param.rule_title = PowerShell process with an encoded command 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.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 = 20 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = process_name, dest -alert.suppress.period = 86400s +alert.suppress.fields = dest, user, process_name +alert.suppress.period = 14400s 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, +description = This search looks for PowerShell processes that have encoded the script within the command-line. Malware has been seen using this parameter, as it obfuscates the code and makes it relatively easy to pass a script on the command-line. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -7728,30 +7633,7 @@ 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 -action.escu.creation_date = 2018-01-08 -action.escu.modification_date = 2018-01-08 -action.escu.channel = ESCU -action.escu.eli5 = 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. -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.data_models = ["Change_Analysis"] -action.escu.full_search_name = ESCU - Systems Ready for Spectre-Meltdown Windows Patch -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 = ["Spectre And Meltdown Vulnerabilities"] -description = Some AV applications can cause the Spectre/Meltdown patch for Windows not to install successfully. This registry key is supposed to be created by the AV engine when it has been patched to be able to handle the Windows patch. If this key has been written, the system can then be patched for Spectre and Meltdown. -dispatch.earliest_time = -1d@d -dispatch.latest_time = -10m@m -disabled=true -realtime_schedule = 0 -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="HKLM\Software\Microsoft\Windows\CurrentVersion\QualityCompat*") by All_Changes.dest, All_Changes.command, All_Changes.user, All_Changes.object, All_Changes.object_path | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` +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=*-EncodedCommand* OR process=*-enc* [ESCU - Get EC2 Launch Details] action.escu = 0 @@ -7776,44 +7658,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 @@ -7824,52 +7723,80 @@ 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 - Get Backup Logs For Endpoint] +[ESCU - AWS Network ACL Details from ID] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-24 -action.escu.modification_date = 2017-09-14 +action.escu.creation_date = 2018-01-18 +action.escu.modification_date = 2017-01-22 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.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 = ["Netbackup"] -action.escu.analytic_story = ["SamSam Ransomware", "Ransomware"] -action.escu.fields_required = ["dest"] -action.escu.earliest_time_offset = 604800 +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 will tell you the backup status from your netbackup_logs of a specific endpoint for the last week. +description = This search queries AWS description logs and returns all the information about a specific network ACL via network ACL ID 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:description id={networkAclId} | table id account_id vpc_id network_acl_entries{}.* -[ESCU - Baseline of blocked outbound traffic from AWS] +[ESCU - Email Attachments With Lots Of Spaces - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-26 -action.escu.modification_date = 2018-05-07 +action.escu.creation_date = 2017-04-21 +action.escu.modification_date = 2017-09-19 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. -action.escu.full_search_name = ESCU - Baseline of blocked outbound traffic from AWS +action.escu.confidence = high +action.escu.eli5 = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. +action.escu.how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. +action.escu.data_models = ["Email"] +action.escu.full_search_name = ESCU - Email Attachments With Lots Of Spaces - 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 = support -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Network ACL Activity", "Command and Control", "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 +action.escu.search_type = detection +action.escu.providing_technologies = ["Microsoft Exchange"] +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 +action.notable.param.nes_fields = src_user, file_name +action.notable.param.rule_description = The sender $src_user$ has sent an email with a suspicious amount of spaces in the file name: $file_name$ +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 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 +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 60 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = src_user +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = Attackers often use spaces as a means to obfuscate an attachment's file extension. This search looks for messages with email attachments that have many spaces within the filename. +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: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 +search = | tstats `summariesonly` count values(All_Email.recipient) as recipient_address min(_time) as firstTime max(_time) as lastTime from datamodel=Email where All_Email.file_name="*" by All_Email.src_user, All_Email.file_name All_Email.message_id | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name("All_Email")` | eval space_ratio = (mvcount(split(file_name," "))-1)/len(file_name) | search space_ratio >= 0.1 | rex field=recipient_address "(?.*)@" [ESCU - Previously seen users in CloudTrail] action.escu = 0 @@ -7916,55 +7843,6 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:cloudtrail userIdentity.arn={src_user} | spath output=user path=userIdentity.arn | rename sourceIPAddress as src_ip | table _time, user, src_ip, awsRegion, eventName, errorCode, errorMessage -[ESCU - Detect New Open S3 buckets - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-07-25 -action.escu.modification_date = 2018-07-25 -action.escu.asset_at_risk = S3 Bucket -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. -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), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. -action.escu.full_search_name = ESCU - Detect New Open S3 buckets - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -action.escu.known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS S3 Activities"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect New Open S3 buckets -action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = An open/public S3 bucket, $bucketName$, was created by $user$. -action.notable.param.rule_title = Public S3 bucket $bucketName$ created 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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 = 70 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = user,bucketName -alert.suppress.period = 86400s -cron_schedule = 5 * * * * -description = This search looks for CloudTrail events where a user has created an open/public S3 bucket. -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 AllUsers eventName=PutBucketAcl | spath output=userIdentityArn path=userIdentity.arn | spath output=bucketName path=requestParameters.bucketName | spath output=aclControlList path=requestParameters.AccessControlPolicy.AccessControlList | spath input=aclControlList output=grantee path=Grant{} | mvexpand grantee | spath input=grantee | search Grantee.URI=*AllUsers | rename userIdentityArn as user| table _time, src,awsRegion Permission, Grantee.URI, bucketName, user - [ESCU - Get DNS traffic ratio] action.escu = 0 action.escu.enabled = 1 @@ -7978,7 +7856,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 = ["Dynamic DNS", "Suspicious DNS Traffic", "Command and Control", "DNS Hijacking"] +action.escu.analytic_story = ["DNS Hijacking", "Command and Control", "Suspicious DNS Traffic", "Dynamic DNS"] action.escu.fields_required = ["src_ip", "dest_ip"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -8005,7 +7883,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 = ["Emotet Malware (TA18-201A)", "SamSam Ransomware", "Monitor for Unauthorized Software"] +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 @@ -8014,7 +7892,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 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 - 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 @@ -8089,6 +7967,30 @@ 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 - Get Process Info] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-03-15 +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.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", "Credential Dumping", "Suspicious Command-Line Executions", "Windows Service Abuse", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Netsh Abuse", "Command and Control", "Suspicious MSHTA Activity", "Orangeworm Attack Group", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "SamSam Ransomware", "Disabling Security Tools", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Windows Defense Evasion Tactics", "Windows Log Manipulation", "Windows Persistence Techniques"] +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 = | from datamodel Application_State.Processes | search process=*{process}* dest={dest} + [ESCU - Detect Spike in Security Group Activity - Rule] action.escu = 0 action.escu.enabled = 1 @@ -8274,7 +8176,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "New Service"], "kill_chai action.escu.known_false_positives = A previously unseen service is not necessarily malicious. Verify that the service is legitimate and that was installed by a legitimate process. action.escu.search_type = detection action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Orangeworm Attack Group", "Windows Service Abuse"] +action.escu.analytic_story = ["Windows Service Abuse", "Orangeworm Attack Group"] action.correlationsearch.enabled = 1 action.correlationsearch.label = First Time Seen Running Windows Service action.notable = 1 @@ -8283,7 +8185,7 @@ action.notable.param.rule_description = The service $serviceName$ is running on action.notable.param.rule_title = First Time Seen Windows Service $serviceName$ 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 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 @@ -8324,7 +8226,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Emotet Malware (TA18-201A)", "Windows Persistence Techniques", "Suspicious MSHTA Activity", "Suspicious Windows Registry Activities", "Ransomware", "DHS Report TA18-074A"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Emotet Malware (TA18-201A)", "Ransomware", "Suspicious MSHTA Activity", "DHS Report TA18-074A", "Suspicious Windows Registry Activities", "Windows Persistence Techniques"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Registry Keys Used For Persistence action.notable = 1 @@ -8358,45 +8260,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 - Batch File Write to System32 - Rule] +[ESCU - SMB Traffic Spike - 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 = 2017-08-20 +action.escu.modification_date = 2017-09-10 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.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.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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["SamSam Ransomware"] +action.escu.providing_technologies = ["Bro", "Splunk Stream"] +action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "Ransomware", "Hidden Cobra Malware", "DHS Report TA18-074A"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Batch File Write to System32 +action.correlationsearch.label = SMB Traffic Spike 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.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.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 = dest +action.risk.param._risk_object = src 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,file_name -alert.suppress.period = 14400s +alert.suppress.fields = src +alert.suppress.period = 28800s cron_schedule = 0 * * * * -description = The search looks for a batch file (.bat) written to the Windows system directory tree. -dispatch.earliest_time = -70m@m +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 @@ -8406,7 +8308,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 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 - AWS Investigate User Activities By AccessKeyId] action.escu = 0 @@ -8481,45 +8383,94 @@ 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=mshta.exe by Processes.user Processes.process_name Processes.parent_process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)`| search (process=*vbscript* OR process=*javascript*) -[ESCU - Email files written outside of the Outlook directory - Rule] +[ESCU - Web Fraud - Password Sharing Across Accounts - 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.creation_date = 2018-07-12 +action.escu.modification_date = 2018-10-08 +action.escu.asset_at_risk = account +action.escu.channel = webfraud +action.escu.confidence = medium +action.escu.eli5 = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 +action.escu.how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. +action.escu.full_search_name = ESCU - Web Fraud - Password Sharing Across Accounts - Rule +action.escu.mappings = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. +action.escu.search_type = detection +action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] +action.escu.analytic_story = ["Web Fraud Detection"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Web Fraud - Password Sharing Across Accounts +action.notable = 1 +action.notable.param.nes_fields = user +action.notable.param.rule_description = This search is used to identify user accounts, $user$, that share common passwords +action.notable.param.rule_title = Web Fraud Detection: Password Sharing Across Accounts +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 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 = user +action.risk.param._risk_object_type = other +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 = 3600s +cron_schedule = 0 * * * * +description = This search is used to identify user accounts that share a common password. +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=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] +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 = 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.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", "Tanium", "Ziften"] -action.escu.analytic_story = ["Collection and Staging"] +action.escu.providing_technologies = ["Active Directory"] +action.escu.analytic_story = ["Account Monitoring and Controls"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Email files written outside of the Outlook directory +action.correlationsearch.label = Identify New User Accounts 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.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 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 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 = 50 +action.risk.param._risk_score = 40 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest, file_path +alert.suppress.fields = identity 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 +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 @@ -8529,81 +8480,7 @@ 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 - Windows hosts file modification - 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.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.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Host Redirection"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Windows hosts file modification -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.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,user -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 -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=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 - 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)` +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 - Attempt To Stop Security Service - Rule] action.escu = 0 @@ -8703,27 +8580,55 @@ schedule_window = auto is_visible = false search = sourcetype="wineventlog:microsoft-windows-wmi-activity/operational" EventCode=5861 Binding | rex field=Message "Consumer =\s+(?[^;|^$]+)" | search consumer!="NTEventLogEventConsumer=\"SCM Event Log Consumer\"" | stats count min(_time) as firstTime max(_time) as lastTime by ComputerName, consumer, Message | `ctime(firstTime)`| `ctime(lastTime)` | rename ComputerName as 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 - Uncommon Processes On Endpoint - Rule] action.escu = 0 @@ -8741,7 +8646,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "Accessibility Features"], 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 = ["Unusual Processes", "Windows Privilege Escalation"] +action.escu.analytic_story = ["Windows Privilege Escalation", "Unusual Processes"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Uncommon Processes On Endpoint action.notable = 1 @@ -8750,7 +8655,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"} +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 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 @@ -8775,29 +8680,128 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Application_State by All_Application_State.dest All_Application_State.user All_Application_State.process | `ctime(firstTime)`| `ctime(lastTime)` | `drop_dm_object_name("All_Application_State")` | `uncommon_processes` -[ESCU - Registry Keys for Creating SHIM Databases - Rule] +[ESCU - Remote Desktop Network Traffic - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-27 +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 = In this search, we look for modifications to registry keys used for shim databases on Microsoft platforms via the object_category and object_path field in the Change_Analysis data model and give you the destination, command used to initiate the change, the user who conducted this activity, the resource affected(object), and the whole path of the object. An application compatibility shim is a small library that transparently intercepts an API (via hooking), changes the parameters passed, handles the operation itself, or redirects the operation elsewhere, such as additional code stored on a system. This capability can be also leveraged by attackers to create and store malicious files in a shim database as observed in CARBANAK backdoor. -action.escu.how_to_implement = To successfully implement this search, you must populate the Change_Analysis data model. This is typically populated via endpoint detection and response products, such as Carbon Black or other endpoint data sources such as Sysmon. The data used for this search is typically generated via logs that report reads and writes to the registry. -action.escu.data_models = ["Change_Analysis"] -action.escu.full_search_name = ESCU - Registry Keys for Creating SHIM Databases - Rule -action.escu.mappings = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -action.escu.known_false_positives = There are many legitimate applications that leverage shim databases for compatibility purposes for legacy applications +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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Windows Persistence Techniques", "Suspicious Windows Registry Activities"] +action.escu.providing_technologies = ["Bro", "Splunk Stream"] +action.escu.analytic_story = ["Hidden Cobra Malware", "SamSam Ransomware", "Lateral Movement"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Registry Keys for Creating SHIM Databases +action.correlationsearch.label = Remote Desktop Network Traffic action.notable = 1 -action.notable.param.nes_fields = dest, user -action.notable.param.rule_description = A registry key that is used for persistence on Windows was modified on $dest$ by $user$ -action.notable.param.rule_title = Registry Key Associated With SHIM databases on $dest$ +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 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 = 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 - Process Execution via WMI - 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 processes launched via WMI, either remotely or locally, by looking for processes launched by WmiPrvSE.exe, which is the process WMI uses to execute new processes and commands. +action.escu.how_to_implement = To successfully implement this search, you must 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 - Process Execution via WMI - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "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 wmi to execute commands for legitimate purposes. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Suspicious WMI Use"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Process Execution via WMI +action.notable = 1 +action.notable.param.nes_fields = dest, user, process +action.notable.param.rule_description = This search looks for child processes of WmiPrvSE.exe, which indicates that a process was launched via WMI. +action.notable.param.rule_title = Process launched via WMI 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 processes launched via WMI. +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 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] +action.escu = 0 +action.escu.enabled = 1 +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 = 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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Suspicious Command-Line Executions", "Suspicious MSHTA Activity"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect Prohibited Applications Spawning cmd.exe +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"} @@ -8805,14 +8809,63 @@ 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, parent_process +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. +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.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_name Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] + +[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 = dest,object_path -alert.suppress.period = 86400s +alert.suppress.fields = user, dest +alert.suppress.period = 14400s cron_schedule = 0 * * * * -description = This search looks for registry activity associated with application compatibility shims, which can be leveraged by attackers for various nefarious purposes. +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 @@ -8823,57 +8876,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=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 - Monitor Web Traffic For Brand Abuse - 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.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.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -action.escu.analytic_story = ["Brand Monitoring"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Monitor Web Traffic For Brand Abuse -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.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 = 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 = src -alert.suppress.period = 86400s -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. -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` 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 `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 @@ -8890,7 +8893,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "Windows Management Instru action.escu.known_false_positives = The wmic.exe utility is a benign Windows application. It may be used legitimately by Administrators with these parameters for remote system administration, but it's relatively uncommon. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Suspicious WMI Use", "Ransomware"] +action.escu.analytic_story = ["Ransomware", "Suspicious WMI Use"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Remote Process Instantiation via WMI action.notable = 1 @@ -8899,7 +8902,7 @@ action.notable.param.rule_description = This search looks for wmic.exe being lau action.notable.param.rule_title = Remote process instantiation via WMI 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 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 - 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 @@ -8924,6 +8927,105 @@ 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 - Batch File Write to System32 - Rule] +action.escu = 0 +action.escu.enabled = 1 +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 = 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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["SamSam Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Batch File Write to System32 +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.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 = 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,file_name +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +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 +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 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 - 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 @@ -8937,7 +9039,7 @@ action.escu.full_search_name = ESCU - Windows Updates Install Successes action.escu.known_false_positives = None at this time action.escu.search_type = support action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["SamSam Ransomware", "Ransomware"] +action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] description = This search is intended to give you a feel for how often successful Windows updates are applied in your environments. Fluctuations in these numbers will allow you to determine when you should be concerned. dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m @@ -8947,92 +9049,44 @@ 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=installed by _time span=1d -[ESCU - AWS Network Access Control List Deleted - Rule] +[ESCU - Execution of File with Multiple Extensions - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-01-08 -action.escu.modification_date = 2017-01-10 -action.escu.asset_at_risk = AWS Instance -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = The search looks for CloudTrail events to detect whether any network ACLs have been deleted and gives you values of error messages and error codes (if any), user details, user source IP, the user who initiated this request, and the name of the event. -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 - AWS Network Access Control List Deleted - Rule -action.escu.mappings = {"mitre_attack": ["Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 11"], "nist": ["DE.DP", "DE.AE"]} -action.escu.known_false_positives = It's possible that a user has legitimately deleted a network ACL. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["AWS Network ACL Activity"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = AWS Network Access Control List Deleted -action.notable = 1 -action.notable.param.nes_fields = src, src_user, eventName -action.notable.param.rule_description = AWS network ACL has been deleted by $src_user. -action.notable.param.rule_title = AWS Network ACL deleted 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 - AWS Network ACL Details from ID\n - ESCU - AWS Network Interface details via resourceId\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 = src_user -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 80 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = src_user -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = Enforcing network-access controls is one of the defensive mechanisms used by cloud administrators to restrict access to a cloud instance. After the attacker has gained control of the AWS console by compromising an admin account, they can delete a network ACL and gain access to the instance from anywhere. This search will query the CloudTrail logs to detect users deleting network ACLs. -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 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 - 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.creation_date = 2018-01-26 +action.escu.modification_date = 2018-11-02 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 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.confidence = high +action.escu.eli5 = This search uses the "Application State" data model to look for process names with specific combinations of double extensions. Relatively straightforward, the search looks for strings in the "process" field that match what you're looking for. +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. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Execution of File with Multiple Extensions - 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 = ["Lateral Movement"] +action.escu.analytic_story = ["Windows File Extension and Association Abuse"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Schtasks scheduling job on remote system +action.correlationsearch.label = Execution of File with Multiple Extensions 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.nes_fields = dest, process +action.notable.param.rule_description = The system $dest$ executed a file with a double extension. +action.notable.param.rule_title = Process With Multiple Extensions 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 Process Info\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 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._risk_score = 60 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest,cmdline +alert.suppress.fields = dest, process 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. +description = This search looks for processes launched from files that have double extensions in the file name. This is typically done to obscure the "real" file extension and make it appear as though the file being accessed is a data file, as opposed to executable content. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -9043,7 +9097,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* cmdline="*/create*" cmdline="* /s *" | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` +search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process = *.doc.exe OR Processes.process = *.htm.exe OR Processes.process = *.html.exe OR Processes.process = *.txt.exe OR Processes.process = *.pdf.exe OR Processes.process = *.doc.exe by Processes.dest Processes.user Processes.process Processes.parent_process | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name(Processes)` [ESCU - EC2 Instance Started With Previously Unseen AMI - Rule] action.escu = 0 @@ -9132,7 +9186,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", "Command and Control", "Data Protection"] +action.escu.analytic_story = ["Command and Control", "Data Protection", "Suspicious DNS Traffic"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detection of DNS Tunnels action.notable = 1 @@ -9141,7 +9195,7 @@ action.notable.param.rule_description = Potential DNS tunnel detected from $src$ action.notable.param.rule_title = DNS tunnel detected on $src$ action.notable.param.security_domain = network 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 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"} +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"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -9166,44 +9220,44 @@ 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 - Malicious PowerShell Process - Encoded Command - Rule] +[ESCU - Attempted Credential Dump From Registry Via Reg.exe - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2016-09-18 -action.escu.modification_date = 2018-12-03 +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 = medium -action.escu.eli5 = This search looks for PowerShell processes that are passing encoded commands on the command-line. The flags "-EncodedCommand" and "-enc" are two different possible flags that can be used to pass base64 encoded commands to PowerShell. 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.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 - Malicious PowerShell Process - Encoded Command - 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 = System administrators may use this option, but it's not common. +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 = ["Malicious PowerShell"] +action.escu.analytic_story = ["Credential Dumping"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Malicious PowerShell Process - Encoded Command +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 = The system $dest$ executed a PowerShell process that has an encoded command on the command-line -action.notable.param.rule_title = PowerShell process with an encoded command detected on $dest$ +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 = 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.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 = 20 +action.risk.param._risk_score = 80 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest, user, process_name -alert.suppress.period = 14400s +alert.suppress.fields = process_name, dest +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = This search looks for PowerShell processes that have encoded the script within the command-line. Malware has been seen using this parameter, as it obfuscates the code and makes it relatively easy to pass a script on the command-line. +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 @@ -9214,7 +9268,7 @@ 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=*-EncodedCommand* OR process=*-enc* +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 - Unusually Long Command Line - Rule] action.escu = 0 @@ -9230,7 +9284,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Unusual Processes", "Ransomware"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Ransomware", "Unusual Processes"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Unusually Long Command Line action.notable = 1 @@ -9239,7 +9293,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 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 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 - Investigate Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -9264,55 +9318,27 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` | eval cmdlen=len(cmdline) | eventstats stdev(cmdlen) as stdev, avg(cmdlen) as avg by dest | stats max(cmdlen) as maxlen, values(stdev) as stdevperhost, values(avg) as avgperhost by dest, process,cmdline| eval threshold = 10 | where maxlen > ((threshold*stdevperhost) + avgperhost) -[ESCU - Email Attachments With Lots Of Spaces - Rule] +[ESCU - Baseline of blocked outbound traffic from AWS] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-21 -action.escu.modification_date = 2017-09-19 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-04-26 +action.escu.modification_date = 2018-05-07 action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. -action.escu.how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. -action.escu.data_models = ["Email"] -action.escu.full_search_name = ESCU - Email Attachments With Lots Of Spaces - Rule -action.escu.mappings = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +action.escu.eli5 = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. +action.escu.full_search_name = ESCU - Baseline of blocked outbound traffic from AWS action.escu.known_false_positives = None at this time -action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Exchange"] -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 -action.notable.param.nes_fields = src_user, file_name -action.notable.param.rule_description = The sender $src_user$ has sent an email with a suspicious amount of spaces in the file name: $file_name$ -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 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 -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 60 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = src_user -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = Attackers often use spaces as a means to obfuscate an attachment's file extension. This search looks for messages with email attachments that have many spaces within the filename. -dispatch.earliest_time = -70m@m +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +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 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(All_Email.recipient) as recipient_address 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")` | eval space_ratio = (mvcount(split(file_name," "))-1)/len(file_name) | search space_ratio >= 0.1 | rex field=recipient_address "(?.*)@" +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 - Count of Unique IPs Connecting to Ports] action.escu = 0 @@ -9337,54 +9363,28 @@ 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 -[ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule] +[ESCU - Identify Systems Receiving Remote Desktop Traffic] 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-04-24 +action.escu.modification_date = 2017-09-15 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = The subsearch returns the instance types of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It then recalculates the earliest seen time field for each instance type and returns only those instance types that has 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 Instance Types" support search once to create a history of previously seen instance types. -action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen Instance Type - Rule -action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.known_false_positives = It is possible that an admin will create a new system using a new instance type never used before. Verify with the creator that they intended to create the system with the new instance type. -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 Instance Type -action.notable = 1 -action.notable.param.nes_fields = instanceType -action.notable.param.rule_description = The EC2 instance type $instanceType$ was used for the first time to create $dest$. -action.notable.param.rule_title = New EC2 Instance Type $instanceType$ 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 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 instance types. -dispatch.earliest_time = -70m@m +action.escu.eli5 = This search counts the numbers of times the system has received a connection to TCP/ 3389, the default port used for RDP traffic. +action.escu.how_to_implement = To successfully implement this search you must ingest network traffic and populate the Network_Traffic data model. If a system receives a lot of remote desktop traffic, you can apply the category common_rdp_destination to it. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Identify Systems Receiving Remote Desktop Traffic +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 = ["Lateral Movement"] +description = This search counts the numbers of times the system has created remote desktop traffic +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=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 +search = | tstats `summariesonly` count from datamodel=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.dest | `drop_dm_object_name("All_Traffic")` | sort - count [ESCU - Get Risk Modifiers For Endpoint] action.escu = 0 @@ -9399,7 +9399,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Splunk Enterprise Vulnerability", "Credential Dumping", "SQL Injection", "Suspicious WMI Use", "Lateral Movement", "Disabling Security Tools", "Netsh Abuse", "Emotet Malware (TA18-201A)", "Account Monitoring and Controls", "Windows Persistence Techniques", "Orangeworm Attack Group", "JBoss Vulnerability", "Splunk Enterprise Vulnerability CVE-2018-11409", "Dynamic DNS", "Unusual Processes", "Brand Monitoring", "Suspicious MSHTA Activity", "Windows Log Manipulation", "Windows Privilege Escalation", "Asset Tracking", "ColdRoot MacOS RAT", "Suspicious DNS Traffic", "Command and Control", "SamSam Ransomware", "DNS Amplification Attacks", "Router & Infrastructure Security", "Monitor for Unauthorized Software", "Collection and Staging", "Windows Service Abuse", "Suspicious Windows Registry Activities", "Host Redirection", "Suspicious Emails", "Ransomware", "Hidden Cobra Malware", "Spectre And Meltdown Vulnerabilities", "Apache Struts Vulnerability", "Monitor for Updates", "Windows File Extension and Association Abuse", "Malicious PowerShell", "Data Protection", "Monitor Backup Solution", "DHS Report TA18-074A", "Use of Cleartext Protocols", "DNS Hijacking", "Prohibited Traffic Allowed or Protocol Mismatch"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Credential Dumping", "DNS Hijacking", "DNS Amplification Attacks", "Windows Service Abuse", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Netsh Abuse", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "Suspicious MSHTA Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious Emails", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Splunk Enterprise Vulnerability CVE-2018-11409", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "Monitor Backup Solution", "SamSam Ransomware", "Disabling Security Tools", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Asset Tracking", "Router & Infrastructure Security", "Windows Log Manipulation", "Prohibited Traffic Allowed or Protocol Mismatch", "Dynamic DNS", "Windows Persistence Techniques", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 From 8260bc7af37fdf8c28252d3fce5c1cf9a47092d3 Mon Sep 17 00:00:00 2001 From: bpatel Date: Fri, 1 Mar 2019 11:04:10 -0800 Subject: [PATCH 12/18] updating valid datamodels --- bin/validate_manifests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/validate_manifests.py b/bin/validate_manifests.py index 1a851c7c67..c23393ee17 100644 --- a/bin/validate_manifests.py +++ b/bin/validate_manifests.py @@ -11,7 +11,7 @@ import sys # HIGH Level Fields MANIFEST_DIRECTORY = str(environ["CIRCLE_WORKING_DIRECTORY"] + - "/security-content") + "/security-content") print MANIFEST_DIRECTORY @@ -30,6 +30,8 @@ VALID_DATA_MODELS = [ "Authentication", "Certificates", "Change_Analysis", + "Change", + "Malware", "Email", "Identity_Management", "Network_Resolution", From f8afa6122bf1a138245090d7850ad5f6543a850b Mon Sep 17 00:00:00 2001 From: divious1 Date: Mon, 4 Mar 2019 10:36:45 -0500 Subject: [PATCH 13/18] minor error in rendering content --- escu/searches/detection_dyn_dns_queries.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escu/searches/detection_dyn_dns_queries.json b/escu/searches/detection_dyn_dns_queries.json index b79e5a5fe3..1922b90d36 100644 --- a/escu/searches/detection_dyn_dns_queries.json +++ b/escu/searches/detection_dyn_dns_queries.json @@ -33,7 +33,7 @@ "Bro" ] }, - "eli5": "The search is querying an accelerated Network_Resolution data model to count and list the values of resolved domains for each DNS query and checks that against the list of Dynamic DNS providers (lookup - dynamic_dns_providers) by each host (DNS.src)", + "eli5": "The search is querying an accelerated `Network_Resolution` data model to count and list the values of resolved domains for each DNS query and checks that against the list of Dynamic DNS providers (lookup - `dynamic_dns_providers`) by each host (DNS.src)", "how_to_implement": "First, you'll need to ingest data from your DNS operations. This can be done by ingesting logs from your server or data collected passively by Splunk Stream or similar solutions. Specifically, data that contains the domain that is being queried and the IP of the host originating the request must be populating the Network_Resolution data model. This search also leverages a lookup file, dynamic_dns_providers_default.csv, which contains a non-exhaustive list of Dynamic DNS providers. Please consider updating the local lookup periodically by adding new domains to the list of dynamic_dns_providers_local.csv.", "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.", "maintainers": [ From 81b8e78b0636eaebec6a38a9288480f069831d54 Mon Sep 17 00:00:00 2001 From: divious1 Date: Mon, 4 Mar 2019 11:11:27 -0500 Subject: [PATCH 14/18] more render errors --- escu/searches/contextual_get_risk_for_endpoint.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escu/searches/contextual_get_risk_for_endpoint.json b/escu/searches/contextual_get_risk_for_endpoint.json index 7127213e54..6b317c181c 100644 --- a/escu/searches/contextual_get_risk_for_endpoint.json +++ b/escu/searches/contextual_get_risk_for_endpoint.json @@ -32,7 +32,7 @@ } ], "search": "| from datamodel:Risk.All_Risk | search risk_object_type=system risk_object={dest} | 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)`", - "search_description": "For the last 7 days, the search will query the Risk data model in Splunk Enterprise Security and calculate the count, sum of the risk_scores, names of the correlation searches that contributed to create a risk score for a specific endpoint(machine_name) ", + "search_description": "For the last 7 days, the search will query the Risk data model in Splunk Enterprise Security and calculate the count, sum of the risk\\_scores, names of the correlation searches that contributed to create a risk score for a specific endpoint(machine\\_name) ", "search_id": "fdcfb369-1725-4c24-824a-22972d7f0d65", "search_name": "Get Risk Modifiers For Endpoint", "search_type": "contextual", From 9d24b94d390e9b7b720722a4f253564e017a54e6 Mon Sep 17 00:00:00 2001 From: divious1 Date: Mon, 4 Mar 2019 11:13:20 -0500 Subject: [PATCH 15/18] same render fixes --- escu/searches/support_discover_dns_records.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escu/searches/support_discover_dns_records.json b/escu/searches/support_discover_dns_records.json index 0829cf8dca..bde237dea0 100644 --- a/escu/searches/support_discover_dns_records.json +++ b/escu/searches/support_discover_dns_records.json @@ -35,7 +35,7 @@ "latest_time": "-10m@m" }, "search": "| inputlookup cim_corporate_email_domains.csv | inputlookup append=T cim_corporate_web_domains.csv | inputlookup append=T cim_cloud_domains.csv | eval domain = trim(replace(domain, \"\\*\", \"\")) | join domain [|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as answer from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!=\"unknown\" DNS.answer!=\"\" by DNS.query | rename DNS.query as query | where query!=\"unknown\" | rex field=query \"(?\\w+\\.\\w+?)(?:$|/)\"] | makemv delim=\" \" answer | makemv delim=\" \" type | sort -count | table count,domain,type,query,answer | outputlookup createinapp=true discovered_dns_records.csv", - "search_description": "The search takes corporate and common cloud provider domains configured under cim_corporate_email_domains.csv, cim_corporate_web_domains.csv, and cloud_domains.csv and finds their responses across the last 30 days from data in the Network Traffic datamodel, then stores the output under the discovered_dns_records.csv lookup", + "search_description": "The search takes corporate and common cloud provider domains configured under `cim_corporate_email_domains.csv`, `cim_corporate_web_domains.csv`, and `cloud_domains.csv` finds their responses across the last 30 days from data in the `Network_Traffic` datamodel, then stores the output under the `discovered_dns_records.csv` lookup", "search_id": "c096f721-8842-42ce-bfc7-74bd8c72b7c3", "search_name": "Discover DNS records", "search_type": "support", From 83a994b04ce83df445a9fd3a82bbab0adf787a67 Mon Sep 17 00:00:00 2001 From: bblacet <34106689+bblacet@users.noreply.github.com> Date: Mon, 4 Mar 2019 16:04:05 -0800 Subject: [PATCH 16/18] Fixed a few typos. --- escu/stories/dns_hijacking.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escu/stories/dns_hijacking.json b/escu/stories/dns_hijacking.json index 62ac281caa..727f1d47db 100644 --- a/escu/stories/dns_hijacking.json +++ b/escu/stories/dns_hijacking.json @@ -13,7 +13,7 @@ ], "modification_date": "2019-02-14", "name": "DNS Hijacking", - "narrative": "Dubbed the Achilles heel of the Internet (see https://www.f5.com/labs/articles/threat-intelligence/dns-is-still-the-achilles-heel-of-the-internet-25613), DNS plays a critical role in routing web traffic but is notoriously vulnerable to attack. Its distributed nature is one reason, as it relies on unstructured connections between millions of clients and servers over inherently insecure protocols.

The gravity and extent of the importance of securing DNS from attacks is undeniable. The fallout of compromised DNS can be disastrous. Not only can hackers bring down an entire business, they can intercept confidential information, emails, and login credentials, as well.

On January 22, 2019, the US Department of Homeland Security 2019's Cybersecurity and Infrastructure Security Agency (CISA) raised awareness of some high-profile DNS hijacking attacks against infrastructure, both in the United States and abroad. It issued Emergency Directive 19-01 (see https://cyber.dhs.gov/ed/19-01/), which summarized the activity and required government agencies to take the following four actions, all within 10 days:
  1. For all .gov or other agency-managed domains, audit public DNS records on all authoritative and secondary DNS servers, verify that they resolve to the intended location or report them to CISA.
  2. Update the passwords for all accounts on systems that can make changes to each agency 2019s DNS records.
  3. Implement multi-factor authentication (MFA) for all accounts on systems that can make changes to each agency 2019s DNS records or, if impossible, provide CISA with the names of systems, the reasons why MFA cannot be enabled within the required timeline, and an ETA for when it can be enabled.
  4. CISA will begin regular delivery of newly added certificates to Certificate Transparency (CT) logs for agency domains via the Cyber Hygiene service. Upon receipt, agencies must immediately begin monitoring CT log data for certificates issued that they did not request. If an agency confirms that a certificate was unauthorized, it must report the certificate to the issuing certificate authority and to CISA.
Of course, it makes sense to put equivalent actions in place within your environment, as well.

In DNS hijacking, the attacker assumes control over an account or makes use of a DNS service exploit to make changes to DNS records. Once they gain access, attackers can substitute their own MX records, name-server records, and addresses, redirecting emails and traffic through their infrastructure, where they can read, copy, or modify information seen. They can also generate valid encryption certificates to help them avoid browser-certificate checks. In one notable attack on the Internet service provider, GoDaddy, the hackers altered Sender Policy Framework (SPF) records a relatively minor change that did not inflict excessive damage but allowed for more effective spam campaigns.

The searches in this Analytic Story help you detect and investigate activities that may indicate that DNS hijacking has taken place within your environment.", + "narrative": "Dubbed the Achilles heel of the Internet (see https://www.f5.com/labs/articles/threat-intelligence/dns-is-still-the-achilles-heel-of-the-internet-25613), DNS plays a critical role in routing web traffic but is notoriously vulnerable to attack. One reason is its distributed nature. It relies on unstructured connections between millions of clients and servers over inherently insecure protocols.

The gravity and extent of the importance of securing DNS from attacks is undeniable. The fallout of compromised DNS can be disastrous. Not only can hackers bring down an entire business, they can intercept confidential information, emails, and login credentials, as well.

On January 22, 2019, the US Department of Homeland Security 2019's Cybersecurity and Infrastructure Security Agency (CISA) raised awareness of some high-profile DNS hijacking attacks against infrastructure, both in the United States and abroad. It issued Emergency Directive 19-01 (see https://cyber.dhs.gov/ed/19-01/), which summarized the activity and required government agencies to take the following four actions, all within 10 days:
  1. For all .gov or other agency-managed domains, audit public DNS records on all authoritative and secondary DNS servers, verify that they resolve to the intended location or report them to CISA.
  2. Update the passwords for all accounts on systems that can make changes to each agency 2019's DNS records.
  3. Implement multi-factor authentication (MFA) for all accounts on systems that can make changes to each agency's 2019 DNS records or, if impossible, provide CISA with the names of systems, the reasons why MFA cannot be enabled within the required timeline, and an ETA for when it can be enabled.
  4. CISA will begin regular delivery of newly added certificates to Certificate Transparency (CT) logs for agency domains via the Cyber Hygiene service. Upon receipt, agencies must immediately begin monitoring CT log data for certificates issued that they did not request. If an agency confirms that a certificate was unauthorized, it must report the certificate to the issuing certificate authority and to CISA.
Of course, it makes sense to put equivalent actions in place within your environment, as well.

In DNS hijacking, the attacker assumes control over an account or makes use of a DNS service exploit to make changes to DNS records. Once they gain access, attackers can substitute their own MX records, name-server records, and addresses, redirecting emails and traffic through their infrastructure, where they can read, copy, or modify information seen. They can also generate valid encryption certificates to help them avoid browser-certificate checks. In one notable attack on the Internet service provider, GoDaddy, the hackers altered Sender Policy Framework (SPF) records a relatively minor change that did not inflict excessive damage but allowed for more effective spam campaigns.

The searches in this Analytic Story help you detect and investigate activities that may indicate that DNS hijacking has taken place within your environment.", "original_authors": [ { "company": "Splunk", From 365bd2af6e0bebff5f726ba4d5b0ecd359eaeffc Mon Sep 17 00:00:00 2001 From: divious1 Date: Tue, 5 Mar 2019 10:09:56 -0500 Subject: [PATCH 17/18] allow us to run them locally --- .circleci/config.yml | 14 +++++++------- bin/manifest_to_escu.py | 18 +++++++++++++++--- bin/spell_check_manifests.py | 23 ++++++++++++++++------- bin/validate_manifests.py | 17 ++++++++++------- 4 files changed, 48 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d9b8aed48..c2c7f57c2e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,19 +51,19 @@ jobs: command: | cd security-content source venv/bin/activate - python bin/validate_manifests.py + python bin/validate_manifests.py --path . - run: name: run manifest to escu command: | cd security-content source venv/bin/activate - python bin/manifest_to_escu.py + python bin/manifest_to_escu.py --path . --output src/default/ - run: name: run manifest to usecase library command: | cd security-content source venv/bin/activate - python bin/manifest_to_usecaselibrary.py + python bin/manifest_to_usecaselibrary.py --path . --output src/default/ - persist_to_workspace: root: security-content/src/default paths: @@ -87,7 +87,7 @@ jobs: fi - attach_workspace: # Must be absolute path or relative path from working_directory - at: ~/repo/updated + at: ~/repo/updated - run: name: store updated analyticstories.conf command: | @@ -101,7 +101,7 @@ jobs: git commit --allow-empty -m "updating src files [ci skip]" # Push quietly to prevent showing the token in log git push https://${GITHUB_TOKEN}@github.com/splunk/security-content.git ${CIRCLE_BRANCH} - tar -czvf content-pack.tar.gz src/* + tar -czvf content-pack.tar.gz src/* - persist_to_workspace: root: security-content/ paths: @@ -111,7 +111,7 @@ jobs: - image: cibuilds/github:0.10 steps: - attach_workspace: - at: ~/repo/updated + at: ~/repo/updated - run: name: publish release on github command: | @@ -143,4 +143,4 @@ workflows: ignore: /.*/ - + diff --git a/bin/manifest_to_escu.py b/bin/manifest_to_escu.py index 07b2012377..592d5d91ae 100644 --- a/bin/manifest_to_escu.py +++ b/bin/manifest_to_escu.py @@ -1,15 +1,14 @@ # Take the manifest files and build files for Enterprise Security Content Updates with markdown syntax + import datetime import glob import json import os +import argparse ALL_UUIDS = [] -MANIFEST_DIRECTORY = "." -OUTPUT_DIRECTORY = 'src/default/' - def markdown(x): markdown = str(x) @@ -368,4 +367,17 @@ def main(): if __name__ == "__main__": + + # grab arguments + parser = argparse.ArgumentParser(description="converts security-content manifests to source files", epilog=""" + This tool converts manifests to the source files to be used by products, specfically Splunk's. + It generates the savesearches.conf, analyticsstories.conf files for ES.""") + parser.add_argument("-p", "--path", required=True, help="path to security-security content repo") + parser.add_argument("-o", "--output", required=True, help="path to the output directory") + + # parse them + args = parser.parse_args() + MANIFEST_DIRECTORY = args.path + OUTPUT_DIRECTORY = args.output + main() diff --git a/bin/spell_check_manifests.py b/bin/spell_check_manifests.py index 659d726e3f..6b09bb9830 100644 --- a/bin/spell_check_manifests.py +++ b/bin/spell_check_manifests.py @@ -4,20 +4,18 @@ Take the manifest files and build files for Enterprise Security import glob import os.path import json -import sys -import traceback +import argparse # HIGH Level Fields -MANIFEST_DIRECTORY = "../manifests" - -#Add these lines: +# Add these lines: import nltk -from nltk.corpus import wordnet as WN from nltk.corpus import stopwords -stop_words_en = set(stopwords.words('english')) import enchant import grammar_check +stop_words_en = set(stopwords.words('english')) + + def check_spelling(sentences): errors = [] sp = enchant.Dict("en_US") @@ -47,6 +45,7 @@ def check_grammar(sentences): return errors + def spell_check_search_manifest(search): ''' Validate that the search has the required fields for savedsearches.conf ''' errors = [] @@ -103,6 +102,7 @@ def spell_check_story_manifest(story): errors.extend(spelling_errors) errors.extend(grammar_errors) + def main(): ''' Open manifest file, validate required fields ''' @@ -149,5 +149,14 @@ def main(): if not errors: print "No errors found" + if __name__ == "__main__": + # grab arguments + parser = argparse.ArgumentParser(description="spell checks the security-contents manifests") + parser.add_argument("-p", "--path", required=True, help="path to security-security content repo") + + # parse them + args = parser.parse_args() + MANIFEST_DIRECTORY = args.path + main() diff --git a/bin/validate_manifests.py b/bin/validate_manifests.py index 1a851c7c67..b1482f09a4 100644 --- a/bin/validate_manifests.py +++ b/bin/validate_manifests.py @@ -3,18 +3,13 @@ Take the manifest files and build files for Enterprise Security ''' import glob -from os import path, environ import json import jsonschema import sys +import argparse +from os import path # HIGH Level Fields - -MANIFEST_DIRECTORY = str(environ["CIRCLE_WORKING_DIRECTORY"] + - "/security-content") - -print MANIFEST_DIRECTORY - STORY_CATEGORIES = [ "Abuse", "Adversary Tactics", "Best Practices", "Cloud Security", "Malware", "Vulnerability" @@ -577,4 +572,12 @@ def main(): if __name__ == "__main__": + # grab arguments + parser = argparse.ArgumentParser(description="validates security content manifests", epilog=""" + Validates security manifest for correctness, adhering to spec and other common items.""") + parser.add_argument("-p", "--path", required=True, help="path to security-security content repo") + + # parse them + args = parser.parse_args() + MANIFEST_DIRECTORY = args.path main() From 71ca1a7fd9f609f5616d46869686f2f3f16c904c Mon Sep 17 00:00:00 2001 From: research bot Date: Tue, 5 Mar 2019 19:03:45 +0000 Subject: [PATCH 18/18] updating src files [ci skip] --- src/default/analytic_stories.conf | 12 +- src/default/analyticstories.conf | 1034 ++++---- src/default/savedsearches.conf | 3898 ++++++++++++++--------------- 3 files changed, 2472 insertions(+), 2472 deletions(-) diff --git a/src/default/analytic_stories.conf b/src/default/analytic_stories.conf index 83d463f6a2..e6dd3957b6 100644 --- a/src/default/analytic_stories.conf +++ b/src/default/analytic_stories.conf @@ -221,7 +221,7 @@ data_models = ["Application_State", "Authentication", "Endpoint", "Network_Traff description = Monitor for and investigate activities--such as suspicious writes to the Windows Recycling Bin or email servers sending high amounts of traffic to specific hosts, for example--that may indicate that an adversary is harvesting and exfiltrating sensitive data. id = 8e03c61e-13c4-4dcd-bfbe-5ce5a8dc031a version = 1.0 -mappings = {"mitre_attack": ["Commonly Used Port", "Data Staged", "Email Collection", "Collection"], "cis20": ["CIS 7", "CIS 8"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["PR.PT", "DE.AE", "DE.CM"]} +mappings = {"mitre_attack": ["Commonly Used Port", "Data Staged", "Email Collection", "Collection"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 7", "CIS 8"], "nist": ["PR.PT", "DE.AE", "DE.CM"]} modification_date = 2018-11-02 reference = ["https://attack.mitre.org/wiki/Collection", "https://attack.mitre.org/wiki/Technique/T1074"] providing_technologies = ["Bro", "Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Splunk Enterprise Security", "Splunk Stream", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -328,7 +328,7 @@ detection_searches = ["ESCU - Clients Connecting to Multiple DNS Servers - Rule" investigative_searches = ["ESCU - Get DNS Server History for a host", "ESCU - Get DNS traffic ratio", "ESCU - Get Process responsible for the DNS traffic", "ESCU - Investigate Web Activity From src_ip", "ESCU - Get History Of Email Sources"] contextual_searches = ["ESCU - Get Vulnerability Logs For Endpoint", "ESCU - Get Authentication Logs For Endpoint", "ESCU - Get Notable History", "ESCU - Get User Information from Identity Table", "ESCU - Get Risk Modifiers For User", "ESCU - Get Risk Modifiers For Endpoint"] support_searches = ["ESCU - Discover DNS records"] -narrative = Dubbed the Achilles heel of the Internet (see https://www.f5.com/labs/articles/threat-intelligence/dns-is-still-the-achilles-heel-of-the-internet-25613), DNS plays a critical role in routing web traffic but is notoriously vulnerable to attack. Its distributed nature is one reason, as it relies on unstructured connections between millions of clients and servers over inherently insecure protocols.\ +narrative = Dubbed the Achilles heel of the Internet (see https://www.f5.com/labs/articles/threat-intelligence/dns-is-still-the-achilles-heel-of-the-internet-25613), DNS plays a critical role in routing web traffic but is notoriously vulnerable to attack. One reason is its distributed nature. It relies on unstructured connections between millions of clients and servers over inherently insecure protocols.\ \ The gravity and extent of the importance of securing DNS from attacks is undeniable. The fallout of compromised DNS can be disastrous. Not only can hackers bring down an entire business, they can intercept confidential information, emails, and login credentials, as well. \ \ @@ -336,9 +336,9 @@ On January 22, 2019, the US Department of Homeland Security 2019's Cybersecurity \ 1. For all .gov or other agency-managed domains, audit public DNS records on all authoritative and secondary DNS servers, verify that they resolve to the intended location or report them to CISA.\ \ -1. Update the passwords for all accounts on systems that can make changes to each agency 2019s DNS records.\ +1. Update the passwords for all accounts on systems that can make changes to each agency 2019's DNS records.\ \ -1. Implement multi-factor authentication (MFA) for all accounts on systems that can make changes to each agency 2019s DNS records or, if impossible, provide CISA with the names of systems, the reasons why MFA cannot be enabled within the required timeline, and an ETA for when it can be enabled.\ +1. Implement multi-factor authentication (MFA) for all accounts on systems that can make changes to each agency's 2019 DNS records or, if impossible, provide CISA with the names of systems, the reasons why MFA cannot be enabled within the required timeline, and an ETA for when it can be enabled.\ \ 1. CISA will begin regular delivery of newly added certificates to Certificate Transparency (CT) logs for agency domains via the Cyber Hygiene service. Upon receipt, agencies must immediately begin monitoring CT log data for certificates issued that they did not request. If an agency confirms that a certificate was unauthorized, it must report the certificate to the issuing certificate authority and to CISA.Of course, it makes sense to put equivalent actions in place within your environment, as well. \ \ @@ -799,7 +799,7 @@ data_models = ["Application_State", "Authentication", "Endpoint", "Network_Traff description = Leverage searches that allow you to detect and investigate unusual activities that might relate to the SamSam ransomware, including looking for file writes associated with SamSam, RDP brute force attacks, the presence of files with SamSam ransomware extensions, suspicious psexec use, and more. id = c4b89506-fbcf-4cb7-bfd6-527e54789604 version = 1.0 -mappings = {"mitre_attack": ["Exploitation of Vulnerability", "System Information Discovery", "Commonly Used Port", "Command-Line Interface", "Credential Access", "Lateral Movement", "Defense Evasion", "Execution", "Remote Desktop Protocol", "Discovery"], "cis20": ["CIS 3", "CIS 18", "CIS 8", "CIS 9", "CIS 10", "CIS 12", "CIS 2", "CIS 4", "CIS 16"], "kill_chain_phases": ["Delivery", "Actions on Objectives", "Reconnaissance", "Installation", "Command and Control"], "nist": ["ID.AM", "PR.DS", "ID.RA", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "PR.MA", "DE.CM"]} +mappings = {"mitre_attack": ["Exploitation of Vulnerability", "Execution", "Commonly Used Port", "Command-Line Interface", "Credential Access", "Lateral Movement", "Defense Evasion", "System Information Discovery", "Remote Desktop Protocol", "Discovery"], "cis20": ["CIS 3", "CIS 18", "CIS 8", "CIS 9", "CIS 10", "CIS 12", "CIS 2", "CIS 4", "CIS 16"], "kill_chain_phases": ["Delivery", "Actions on Objectives", "Reconnaissance", "Installation", "Command and Control"], "nist": ["ID.AM", "PR.DS", "ID.RA", "PR.IP", "PR.PT", "PR.AC", "DE.AE", "PR.MA", "DE.CM"]} modification_date = 2018-12-14 reference = ["https://www.crowdstrike.com/blog/an-in-depth-analysis-of-samsam-ransomware-and-boss-spider/", "https://www.sophos.com/en-us/medialibrary/PDFs/technical-papers/SamSam-ransomware-chooses-Its-targets-carefully-wpna.pdf", "https://www.sophos.com/en-us/medialibrary/PDFs/technical-papers/SamSam-The-Almost-Six-Million-Dollar-Ransomware.pdf?cmp=26061"] providing_technologies = ["Apache", "Bluecoat", "Bro", "Carbon Black Response", "CrowdStrike Falcon", "Linux", "Microsoft Windows", "Nessus", "Netbackup", "Palo Alto Firewall", "Splunk Enterprise Security", "Splunk Stream", "Sysmon", "Tanium", "Ziften", "macOS"] @@ -931,7 +931,7 @@ data_models = description = Use the searches in this Analytic Story to monitor your AWS S3 buckets for evidence of anomalous activity and suspicious behaviors, such as detecting open S3 buckets and buckets being accessed from a new IP. The contextual and investigative searches will give you more information, when required. id = 2e8948a5-5239-406b-b56b-6c50w3168af3 version = 2.0 -mappings = {"mitre_attack": ["Exfiltration", "Credential Access", "Execution", "Initial Access"], "cis20": ["CIS 13", "CIS 14"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.DP", "PR.DS", "DE.CM", "PR.AC"]} +mappings = {"mitre_attack": ["Exfiltration", "Credential Access", "Execution", "Initial Access"], "cis20": ["CIS 13", "CIS 14"], "kill_chain_phases": ["Actions on Objectives"], "nist": ["DE.CM", "PR.DS", "DE.DP", "PR.AC"]} modification_date = 2018-11-27 reference = ["https://d0.awsstatic.com/whitepapers/aws-security-best-practices.pdf", "https://www.tripwire.com/state-of-security/security-data-protection/cloud/public-aws-s3-buckets-writable/"] providing_technologies = ["AWS", "Splunk Enterprise Security"] diff --git a/src/default/analyticstories.conf b/src/default/analyticstories.conf index 842e1b1238..afe0eca898 100644 --- a/src/default/analyticstories.conf +++ b/src/default/analyticstories.conf @@ -252,7 +252,7 @@ version = 1.0 category = Adversary Tactics description = Secure your environment against DNS hijacks with searches that help you detect and investigate unauthorized changes to DNS records. maintainers = [{"company": "Splunk", "email": "bpatel@splunk.com", "name": "Bhavin Patel"}] -narrative = Dubbed the Achilles heel of the Internet (see https://www.f5.com/labs/articles/threat-intelligence/dns-is-still-the-achilles-heel-of-the-internet-25613), DNS plays a critical role in routing web traffic but is notoriously vulnerable to attack. Its distributed nature is one reason, as it relies on unstructured connections between millions of clients and servers over inherently insecure protocols.\ +narrative = Dubbed the Achilles heel of the Internet (see https://www.f5.com/labs/articles/threat-intelligence/dns-is-still-the-achilles-heel-of-the-internet-25613), DNS plays a critical role in routing web traffic but is notoriously vulnerable to attack. One reason is its distributed nature. It relies on unstructured connections between millions of clients and servers over inherently insecure protocols.\ \ The gravity and extent of the importance of securing DNS from attacks is undeniable. The fallout of compromised DNS can be disastrous. Not only can hackers bring down an entire business, they can intercept confidential information, emails, and login credentials, as well. \ \ @@ -260,9 +260,9 @@ On January 22, 2019, the US Department of Homeland Security 2019's Cybersecurity \ 1. For all .gov or other agency-managed domains, audit public DNS records on all authoritative and secondary DNS servers, verify that they resolve to the intended location or report them to CISA.\ \ -1. Update the passwords for all accounts on systems that can make changes to each agency 2019s DNS records.\ +1. Update the passwords for all accounts on systems that can make changes to each agency 2019's DNS records.\ \ -1. Implement multi-factor authentication (MFA) for all accounts on systems that can make changes to each agency 2019s DNS records or, if impossible, provide CISA with the names of systems, the reasons why MFA cannot be enabled within the required timeline, and an ETA for when it can be enabled.\ +1. Implement multi-factor authentication (MFA) for all accounts on systems that can make changes to each agency's 2019 DNS records or, if impossible, provide CISA with the names of systems, the reasons why MFA cannot be enabled within the required timeline, and an ETA for when it can be enabled.\ \ 1. CISA will begin regular delivery of newly added certificates to Certificate Transparency (CT) logs for agency domains via the Cyber Hygiene service. Upon receipt, agencies must immediately begin monitoring CT log data for certificates issued that they did not request. If an agency confirms that a certificate was unauthorized, it must report the certificate to the issuing certificate authority and to CISA.Of course, it makes sense to put equivalent actions in place within your environment, as well. \ \ @@ -1031,14 +1031,15 @@ known_false_positives = It is possible that these logs may be legitimately clear providing_technologies = ["Microsoft Windows"] -[savedsearch://ESCU - Get Process Information For Port Activity] -type = investigative -explanation = none -how_to_implement = To successfully implement this search you must be ingesting endpoint data that associates processes with network events. -known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -earliest_time_offset = 7200 -latest_time_offset = 7200 +[savedsearch://ESCU - Detect Activity Related to Pass the Hash Attacks - Rule] +type = detection +asset_type = Endpoint +confidence = low +explanation = To detect pass the hash activity, we look at all events with event code 4624 or 4625 that specify a logon type 3 (network logons). We are looking for the NtLmSsP account, with a key length set to 0. These indicate lower level protocols that are typically used through Pass the Hash (WMI, SMB, etc.). The search also filters out events with an account name of 'Anonymous' to help reduce false positives. +how_to_implement = To successfully implement this search, you must ingest your Windows Security Event logs and leverage the TA for Windows to extract EventCode, Logon_Process, Logon_Type, Key_Length and Account_Name fields from these events. +annotations = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +known_false_positives = Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate. +providing_technologies = ["Microsoft Windows"] [savedsearch://ESCU - Create or delete hidden shares using net.exe - Rule] @@ -1062,15 +1063,14 @@ known_false_positives = None at the moment providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Detect Activity Related to Pass the Hash Attacks - Rule] -type = detection -asset_type = Endpoint -confidence = low -explanation = To detect pass the hash activity, we look at all events with event code 4624 or 4625 that specify a logon type 3 (network logons). We are looking for the NtLmSsP account, with a key length set to 0. These indicate lower level protocols that are typically used through Pass the Hash (WMI, SMB, etc.). The search also filters out events with an account name of 'Anonymous' to help reduce false positives. -how_to_implement = To successfully implement this search, you must ingest your Windows Security Event logs and leverage the TA for Windows to extract EventCode, Logon_Process, Logon_Type, Key_Length and Account_Name fields from these events. -annotations = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} -known_false_positives = Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate. -providing_technologies = ["Microsoft Windows"] +[savedsearch://ESCU - Get Process Information For Port Activity] +type = investigative +explanation = none +how_to_implement = To successfully implement this search you must be ingesting endpoint data that associates processes with network events. +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] +earliest_time_offset = 7200 +latest_time_offset = 7200 [savedsearch://ESCU - TOR Traffic - Rule] @@ -1126,6 +1126,14 @@ earliest_time_offset = 86400 latest_time_offset = 86400 +[savedsearch://ESCU - Identify Systems Creating Remote Desktop Traffic] +type = support +explanation = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. +how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. +known_false_positives = None at this time +providing_technologies = ["Splunk Stream", "Bro"] + + [savedsearch://ESCU - Baseline of Security Group Activity by ARN] type = support explanation = Use this search to create a baseline for API calls related to security groups by the users who initiated this activity. It returns all logged API calls for all security-group-related 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. @@ -1282,14 +1290,11 @@ known_false_positives = There may be other processes in your environment that us providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Detect S3 access from a new IP - Rule] -type = detection -asset_type = S3 Bucket -confidence = low -explanation = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. -annotations = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour +[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"] @@ -1386,6 +1391,19 @@ known_false_positives = None at this time providing_technologies = ["Splunk Stream", "Bro"] +[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 - Samsam Test File Write - Rule] type = detection asset_type = Endpoint @@ -1397,15 +1415,24 @@ known_false_positives = No false positives have been identified. providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[savedsearch://ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] -type = detection -asset_type = Windows -confidence = medium -explanation = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. -how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. -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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. -providing_technologies = ["Microsoft Windows"] +[savedsearch://ESCU - Investigate AWS activities via region name] +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 - 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 - AWS Network Access Control List Created with All Open Ports - Rule] @@ -1463,15 +1490,14 @@ 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. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +[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] @@ -1506,15 +1532,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 - 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 - Previously Seen EC2 Launches By User] @@ -1563,12 +1589,26 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[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 - Suspicious File Write - Rule] +type = detection +asset_type = Endpoint +confidence = high +explanation = This search looks at files being created or modified in the Endpoint file-system data model. The names of those files are checked against an included lookup file, which contains the names of files associated with malware or attack activity. The search returns any files with matching names, along with a note (also specified in the lookup file) that gives or points to more information about the files. +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. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file system reads and writes. In addition, this search leverages an included lookup file that contains the names of the files to watch for, as well as a note to communicate why that file name is being monitored. This lookup file can be edited to add or remove file the file names you want to monitor. +annotations = {"mitre_attack": [], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +known_false_positives = It's possible for a legitimate file to be created with the same name as one noted in the lookup file. Filenames listed in the lookup file should be unique enough that collisions are rare. Looking at the location of the file and the process responsible for the activity can help determine whether or not the activity is legitimate. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] [savedsearch://ESCU - Detect API activity from users without MFA - Rule] @@ -1622,21 +1662,35 @@ known_false_positives = You will encounter noise from legitimate print-monitor r providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[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. -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 - Detect Prohibited Applications Spawning cmd.exe - Rule] +type = detection +asset_type = Endpoint +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"] -[savedsearch://ESCU - Get All AWS Activity From Region] -type = investigative +[savedsearch://ESCU - Detect USB device insertion - Rule] +type = detection +asset_type = Endpoint +confidence = low +explanation = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device +how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. +annotations = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} +known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. +providing_technologies = ["Microsoft Windows"] + + +[savedsearch://ESCU - Get Backup Logs For Endpoint] +type = contextual 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. +how_to_implement = You must be ingesting your backup logs. known_false_positives = None at this time -providing_technologies = ["AWS"] -earliest_time_offset = 14400 +providing_technologies = ["Netbackup"] +earliest_time_offset = 604800 latest_time_offset = 0 @@ -1680,15 +1734,15 @@ 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 - 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] @@ -1713,6 +1767,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 @@ -1735,12 +1800,15 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Identify Systems Creating Remote Desktop Traffic] -type = support -explanation = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. -how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. -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 - Detect attackers scanning for vulnerable JBoss servers - Rule] @@ -1811,15 +1879,15 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Attempt To Add Certificate To Untrusted Store - Rule] +[savedsearch://ESCU - Common Ransomware Extensions - 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"] +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 - Previously seen S3 bucket access by remote IP] @@ -1937,14 +2005,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] @@ -1975,14 +2044,14 @@ earliest_time_offset = 1209600 latest_time_offset = 0 -[savedsearch://ESCU - Get Backup Logs For Endpoint] +[savedsearch://ESCU - Get User Information from Identity Table] type = contextual explanation = none -how_to_implement = You must be ingesting your backup logs. +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 = ["Netbackup"] -earliest_time_offset = 604800 -latest_time_offset = 0 +providing_technologies = ["Splunk Enterprise Security"] +earliest_time_offset = 864000 +latest_time_offset = 86400 [savedsearch://ESCU - Child Processes of Spoolsv.exe - Rule] @@ -2006,19 +2075,11 @@ earliest_time_offset = 3600 latest_time_offset = 86400 -[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. -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. -known_false_positives = None at this time -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] - - [savedsearch://ESCU - Detect hosts connecting to dynamic domain providers - Rule] type = detection asset_type = Endpoint confidence = medium -explanation = The search is querying an accelerated Network_Resolution data model to count and list the values of resolved domains for each DNS query and checks that against the list of Dynamic DNS providers (lookup - dynamic_dns_providers) by each host (DNS.src) +explanation = The search is querying an accelerated `Network_Resolution` data model to count and list the values of resolved domains for each DNS query and checks that against the list of Dynamic DNS providers (lookup - `dynamic_dns_providers`) by each host (DNS.src) how_to_implement = First, you'll need to ingest data from your DNS operations. This can be done by ingesting logs from your server or data collected passively by Splunk Stream or similar solutions. Specifically, data that contains the domain that is being queried and the IP of the host originating the request must be populating the Network_Resolution data model. This search also leverages a lookup file, `dynamic_dns_providers_default.csv`, which contains a non-exhaustive list of Dynamic DNS providers. Please consider updating the local lookup periodically by adding new domains to the list of `dynamic_dns_providers_local.csv`. annotations = {"mitre_attack": ["Exfiltration", "Exfiltration Over Command and Control Channel", "Defense Evasion", "Commonly Used Port"], "kill_chain_phases": ["Command and Control", "Actions on Objectives"], "cis20": ["CIS 8", "CIS 12", "CIS 13"], "nist": ["PR.DS", "PR.PT", "DE.AE", "DE.CM"]} 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. @@ -2055,60 +2116,6 @@ known_false_positives = None identified providing_technologies = ["Microsoft Windows"] -[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. -known_false_positives = None at this time -providing_technologies = ["AWS"] -earliest_time_offset = 14400 -latest_time_offset = 0 - - -[savedsearch://ESCU - Detect USB device insertion - Rule] -type = detection -asset_type = Endpoint -confidence = low -explanation = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device -how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. -annotations = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} -known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. -providing_technologies = ["Microsoft Windows"] - - -[savedsearch://ESCU - Shim Database Installation With Suspicious Parameters - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = This search looks for the execution of sdbinst.exe with command-line arguments of -q and -p. The -q option performs a silent installation with no visible window, status, or warning information. The -p option allows the shim database to contain patches. It will return the count, the first time, and the last time these command-line arguments were seen on each endpoint and by each user. -how_to_implement = To successfully implement this search, you need to ingest logs with both the process name and command-line from your endpoints. If you are using Sysmon, you will need to have a Splunk Universal Forwarder on each endpoint that you want to collect the data on. You will also need to have to deploy the Sysmon TA on these endpoints and on your search head. You must have at least version 6.0.4 of the Sysmon TA. -annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} -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] -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"] - - -[savedsearch://ESCU - Detect Excessive User Account Lockouts - Rule] -type = detection -asset_type = Windows -confidence = medium -explanation = This search looks for the Windows event code 4740 within your Windows Security Logs, which indicates that an account locked out. It then counts the numbers of times an account has been locked out in a four hour window and displays those accounts with a count greater than five. -how_to_implement = While this search does not require you to adhere to Splunk CIM, you must be ingesting your Windows security event logs in order for this search to execute successfully. -annotations = {"mitre_attack": ["Valid Accounts"], "cis20": ["CIS 16"], "nist": ["PR.IP"]} -known_false_positives = It is possible that a legitimate user is experiencing an issue causing multiple account login failures leading to lockouts. -providing_technologies = ["Microsoft Windows"] - - [savedsearch://ESCU - Detect Spike in AWS API Activity - Rule] type = detection asset_type = AWS Instance @@ -2142,6 +2149,60 @@ known_false_positives = providing_technologies = ["AWS"] +[savedsearch://ESCU - Web Fraud - Password Sharing Across Accounts - Rule] +type = detection +asset_type = account +confidence = medium +explanation = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 +how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. +annotations = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. +providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] + + +[savedsearch://ESCU - Shim Database Installation With Suspicious Parameters - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = This search looks for the execution of sdbinst.exe with command-line arguments of -q and -p. The -q option performs a silent installation with no visible window, status, or warning information. The -p option allows the shim database to contain patches. It will return the count, the first time, and the last time these command-line arguments were seen on each endpoint and by each user. +how_to_implement = To successfully implement this search, you need to ingest logs with both the process name and command-line from your endpoints. If you are using Sysmon, you will need to have a Splunk Universal Forwarder on each endpoint that you want to collect the data on. You will also need to have to deploy the Sysmon TA on these endpoints and on your search head. You must have at least version 6.0.4 of the Sysmon TA. +annotations = {"mitre_attack": ["Persistence", "Application Shimming"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["DE.CM"]} +known_false_positives = None identified +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] + + +[savedsearch://ESCU - Detect malicious requests to exploit JBoss servers - 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"] + + +[savedsearch://ESCU - Detect Excessive User Account Lockouts - Rule] +type = detection +asset_type = Windows +confidence = medium +explanation = This search looks for the Windows event code 4740 within your Windows Security Logs, which indicates that an account locked out. It then counts the numbers of times an account has been locked out in a four hour window and displays those accounts with a count greater than five. +how_to_implement = While this search does not require you to adhere to Splunk CIM, you must be ingesting your Windows security event logs in order for this search to execute successfully. +annotations = {"mitre_attack": ["Valid Accounts"], "cis20": ["CIS 16"], "nist": ["PR.IP"]} +known_false_positives = It is possible that a legitimate user is experiencing an issue causing multiple account login failures leading to lockouts. +providing_technologies = ["Microsoft Windows"] + + +[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 - RunDLL Loading DLL By Ordinal - Rule] type = detection asset_type = Endpoint @@ -2163,16 +2224,6 @@ earliest_time_offset = 3600 latest_time_offset = 3600 -[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 - Windows hosts file modification - Rule] type = detection asset_type = Endpoint @@ -2184,15 +2235,26 @@ known_false_positives = There may be legitimate reasons for system administrator providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[savedsearch://ESCU - Detect Large Outbound ICMP Packets - Rule] +[savedsearch://ESCU - Detect S3 access from a new IP - Rule] +type = detection +asset_type = S3 Bucket +confidence = low +explanation = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), then configure your S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. +annotations = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour +providing_technologies = ["AWS"] + + +[savedsearch://ESCU - WMI Permanent Event Subscription - Rule] type = detection asset_type = Endpoint confidence = medium -explanation = This search works by looking at fields in the Network_Traffic data model, which is populated by various firewalls and passive networking monitoring technologies. Specifically, the search looks for ICMP packets larger than 1,000 bytes with a destination that is external to your organization. -how_to_implement = In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have a good understanding of how your network segments are designed and that you are able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the company's assets in the `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model -annotations = {"mitre_attack": ["Command and Control", "Standard Non-Application Layer Protocol"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE"]} -known_false_positives = ICMP packets are used in a variety of ways to help troubleshoot networking issues and ensure the proper flow of traffic. As such, it is possible that a large ICMP packet could be perfectly legitimate. If large ICMP packets are associated with command and control traffic, there will typically be a large number of these packets observed over time. If the search is providing a large number of false positives, you can modify the search to adjust the byte threshold or whitelist specific IP addresses, as necessary. -providing_technologies = ["Bro", "Splunk Stream", "Palo Alto Firewall"] +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 Windows event ID 5861. +how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. +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 - Get Logon Rights Modifications For User] @@ -2205,12 +2267,15 @@ earliest_time_offset = 86400 latest_time_offset = 86400 -[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 - Abnormally High AWS Instances Terminated by User - 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 terminated by a particular user. Since we want to detect a high number of instances terminated within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances terminated by a particular user, as well as the average- and standard-deviation values. Assign a `threshold_value` in the search. Try starting with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier to 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. We then filter out outliers with a value of 1 and show only those instance-termination events that happened within the previous 10 minutes. +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. +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 with your AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify whether this search alerted on a human user. +providing_technologies = ["AWS"] [savedsearch://ESCU - Scheduled Task Name Used by Dragonfly Threat Actors - Rule] @@ -2263,14 +2328,14 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Detect New Open S3 buckets - Rule] +[savedsearch://ESCU - Detect new API calls from user roles - Rule] type = detection -asset_type = S3 Bucket +asset_type = AWS Instance confidence = medium -explanation = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. -how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. -annotations = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. +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"] @@ -2295,17 +2360,14 @@ known_false_positives = It's possible that legitimate traffic will have long URL providing_technologies = ["Splunk Stream", "Bro"] -[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 - 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 - Execution of File With Spaces Before Extension - Rule] @@ -2340,12 +2402,25 @@ known_false_positives = There are many legitimate applications that must execute providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[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`. +[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 - 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. +providing_technologies = ["AWS"] [savedsearch://ESCU - AWS S3 Bucket details via bucketName] @@ -2369,6 +2444,17 @@ known_false_positives = It is possible that an administrator created and deleted providing_technologies = ["Microsoft Windows"] +[savedsearch://ESCU - Remote WMI Command Attempt - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = Many a times, attackers leverage native Windows utilities that are designed to help administrators better manage their systems, infrastructure, and auditing, but are instead leveraged for malicious purposes. In this case, we are looking for instances of wmic.exe being run with various parameters that are not typically used by administrators. +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", "Windows Management Instrumentation"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +known_false_positives = Administrators may use this legitimately to gather info from remote systems. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] + + [savedsearch://ESCU - AWS Cloud Provisioning From Previously Unseen Region - Rule] type = detection asset_type = AWS Instance @@ -2404,6 +2490,16 @@ known_false_positives = Because these extensions are not typically used in norma providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +[savedsearch://ESCU - AWS Network Interface details via resourceId] +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 configuration inputs +known_false_positives = None at this time +providing_technologies = ["AWS"] +earliest_time_offset = 86400 +latest_time_offset = 0 + + [savedsearch://ESCU - Investigate Successful Remote Desktop Authentications] type = investigative explanation = none @@ -2414,39 +2510,6 @@ earliest_time_offset = 86400 latest_time_offset = 0 -[savedsearch://ESCU - Common Ransomware Extensions - 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"] - - -[savedsearch://ESCU - Scheduled tasks used in BadRabbit ransomware - Rule] -type = detection -asset_type = Endpoint -confidence = medium -explanation = The search looks for execution of schtasks.exe with parameters that indicate that specific task names related to the Bad Rabbit ransomware were created or deleted. The specific task name used are rhaegal, drogon and viserion_. 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. -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": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} -known_false_positives = No known false positives -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] - - -[savedsearch://ESCU - EC2 Instance Started With Previously Unseen User - Rule] -type = detection -asset_type = AWS Instance -confidence = medium -explanation = The subsearch returns the ARNs of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It 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. -annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -known_false_positives = It's possible that a user will start to create EC2 instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior. -providing_technologies = ["AWS"] - - [savedsearch://ESCU - Detect new user AWS Console Login - Rule] type = detection asset_type = AWS Instance @@ -2458,6 +2521,17 @@ known_false_positives = When a legitimate new user logins for the first time, th providing_technologies = ["AWS"] +[savedsearch://ESCU - EC2 Instance Started With Previously Unseen User - Rule] +type = detection +asset_type = AWS Instance +confidence = medium +explanation = The subsearch returns the ARNs of all successful EC2 instance launches within the last hour and then appends the historical data in the lookup file to those results. It 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. +annotations = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +known_false_positives = It's possible that a user will start to create EC2 instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior. +providing_technologies = ["AWS"] + + [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. @@ -2466,15 +2540,15 @@ known_false_positives = None at this time providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Remote WMI Command Attempt - Rule] +[savedsearch://ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] type = detection -asset_type = Endpoint +asset_type = Windows confidence = medium -explanation = Many a times, attackers leverage native Windows utilities that are designed to help administrators better manage their systems, infrastructure, and auditing, but are instead leveraged for malicious purposes. In this case, we are looking for instances of wmic.exe being run with various parameters that are not typically used by administrators. -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", "Windows Management Instrumentation"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} -known_false_positives = Administrators may use this legitimately to gather info from remote systems. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +explanation = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. +how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. +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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. +providing_technologies = ["Microsoft Windows"] [savedsearch://ESCU - Registry Keys for Creating SHIM Databases - Rule] @@ -2488,16 +2562,6 @@ 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 @@ -2529,6 +2593,17 @@ earliest_time_offset = 172800 latest_time_offset = 86400 +[savedsearch://ESCU - Shim Database File Creation - Rule] +type = detection +asset_type = Endpoint +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"] + + [savedsearch://ESCU - Script Execution via WMI - Rule] type = detection asset_type = Endpoint @@ -2551,23 +2626,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 - 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] @@ -2610,14 +2687,15 @@ known_false_positives = Some legitimate processes may be only rarely executed in providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - AWS Network Interface details via resourceId] -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 configuration inputs -known_false_positives = None at this time -providing_technologies = ["AWS"] -earliest_time_offset = 86400 -latest_time_offset = 0 +[savedsearch://ESCU - Detect Large Outbound ICMP Packets - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = This search works by looking at fields in the Network_Traffic data model, which is populated by various firewalls and passive networking monitoring technologies. Specifically, the search looks for ICMP packets larger than 1,000 bytes with a destination that is external to your organization. +how_to_implement = In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have a good understanding of how your network segments are designed and that you are able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the company's assets in the `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model +annotations = {"mitre_attack": ["Command and Control", "Standard Non-Application Layer Protocol"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE"]} +known_false_positives = ICMP packets are used in a variety of ways to help troubleshoot networking issues and ensure the proper flow of traffic. As such, it is possible that a large ICMP packet could be perfectly legitimate. If large ICMP packets are associated with command and control traffic, there will typically be a large number of these packets observed over time. If the search is providing a large number of false positives, you can modify the search to adjust the byte threshold or whitelist specific IP addresses, as necessary. +providing_technologies = ["Bro", "Splunk Stream", "Palo Alto Firewall"] [savedsearch://ESCU - Monitor Web Traffic For Brand Abuse - Rule] @@ -2631,17 +2709,6 @@ known_false_positives = None at this time providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Palo Alto Firewall"] -[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 - EC2 Instance Started With Previously Unseen Instance Type - Rule] type = detection asset_type = AWS Instance @@ -2653,6 +2720,14 @@ 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 @@ -2706,26 +2781,23 @@ earliest_time_offset = 14400 latest_time_offset = 0 -[savedsearch://ESCU - Large Volume of DNS ANY Queries - Rule] +[savedsearch://ESCU - Schtasks used for forcing a reboot - Rule] type = detection -asset_type = DNS Servers -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"] - - -[savedsearch://ESCU - Suspicious writes to windows Recycle Bin - Rule] -type = detection -asset_type = Windows +asset_type = Endpoint 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"] +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 - 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 - Get Email Info] @@ -2754,17 +2826,6 @@ known_false_positives = None at this time providing_technologies = ["AWS"] -[savedsearch://ESCU - Abnormally High AWS Instances Terminated by User - 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 terminated by a particular user. Since we want to detect a high number of instances terminated within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances terminated by a particular user, as well as the average- and standard-deviation values. Assign a `threshold_value` in the search. Try starting with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier to 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. We then filter out outliers with a value of 1 and show only those instance-termination events that happened within the previous 10 minutes. -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. -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 with your AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify whether this search alerted on a human user. -providing_technologies = ["AWS"] - - [savedsearch://ESCU - Extended Period Without Successful Netbackup Backups - Rule] type = detection asset_type = Endpoint @@ -2776,27 +2837,27 @@ known_false_positives = None identified providing_technologies = ["Netbackup"] -[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] +[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 = 86400 +earliest_time_offset = 3600 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] type = detection asset_type = Endpoint @@ -2808,22 +2869,15 @@ known_false_positives = It is unusual for a service to be created or modified by 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 - Investigate AWS activities via region name] -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 - Scheduled tasks used in BadRabbit ransomware - Rule] +type = detection +asset_type = Endpoint +confidence = medium +explanation = The search looks for execution of schtasks.exe with parameters that indicate that specific task names related to the Bad Rabbit ransomware were created or deleted. The specific task name used are rhaegal, drogon and viserion_. 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. +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": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +known_false_positives = No known false positives +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] [savedsearch://ESCU - AWS Cloud Provisioning From Previously Unseen Country - Rule] @@ -2839,26 +2893,23 @@ known_false_positives = This is a strictly behavioral search, so we define "fals providing_technologies = ["AWS"] -[savedsearch://ESCU - Processes created by netsh - Rule] +[savedsearch://ESCU - Suspicious Java Classes - Rule] type = detection asset_type = Endpoint confidence = medium -explanation = This search looks for all processes with the parent process "c:\Windows\System32\netsh.exe" and returns the process, the command line used to execute it, the host name, and the user context under which it ran. -how_to_implement = To successfully implement this search, you must be ingesting logs with the process name, command-line arguments, and parent processes from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. -annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -known_false_positives = It is unusual for netsh.exe to have any child processes in most environments. It makes sense to investigate the child process and verify whether the process spawned is legitimate. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +explanation = The search leverages HTTP form data from typically POST events that can be captured with Splunk streams or similar wire data capture tools. The search looks for java classes like `processbuilder` and `runtime` are used to create a new process and execute commands inside java, and are synonymous with spawning a shell. There are very exceptional reasons to ever these classes in Java via an HTTP API and hence when seen are highly suspicious. Also, this is a common vectors leverage to exploit Apache Struts. +how_to_implement = In order to properly run this search, Splunk needs to ingest data from your web-traffic appliances that serve or sit in the path of your Struts application servers. This can be accomplished by indexing data from a web proxy, or by using network traffic-analysis tools, such as Splunk Stream or Bro. +annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 7", "CIS 12"], "nist": ["DE.AE"]} +known_false_positives = There are no known false positives. +providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Apache"] -[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 - 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 - Investigate Web Activity From Host] @@ -2871,12 +2922,14 @@ earliest_time_offset = 3600 latest_time_offset = 3600 -[savedsearch://ESCU - Add Prohibited Processes to Enterprise Security] -type = support -explanation = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. -how_to_implement = This search should be run on each new install of ESCU. +[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. known_false_positives = None at this time -providing_technologies = ["Splunk Enterprise Security"] +providing_technologies = ["AWS"] +earliest_time_offset = 14400 +latest_time_offset = 0 [savedsearch://ESCU - Monitor Email For Brand Abuse - Rule] @@ -2909,14 +2962,15 @@ known_false_positives = None at this time providing_technologies = ["Microsoft Windows"] -[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 - 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 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"] [savedsearch://ESCU - Single Letter Process On Endpoint - Rule] @@ -2941,35 +2995,34 @@ 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 +confidence = high +explanation = This search looks for the processes **net.exe** and **sc.exe** with a parameter of `"stop"`. It then searches a list of security-related services included in a lookup file for matches on the command line. Results are subsequently returned in table format. The included lookup file can be modified to update the services to monitor. +how_to_implement = You must 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. The search is shipped with a lookup file, `security_services.csv`, that can be edited to update the list of services to monitor. This lookup file can be edited directly where it lives in `$SPLUNK_HOME/etc/apps/DA-ESS-ContentUpdate/lookups`, or via the Splunk console. You should add the names of services an attacker might use on the command line and surround with asterisks (*****), so that they work properly when searching the command line. The file should be updated with the names of any services you would like to monitor for attempts to stop the service., +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 = None identified. Attempts to disable security-related services should be identified and understood. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Suspicious Java Classes - Rule] +[savedsearch://ESCU - Processes created by netsh - Rule] type = detection asset_type = Endpoint confidence = medium -explanation = The search leverages HTTP form data from typically POST events that can be captured with Splunk streams or similar wire data capture tools. The search looks for java classes like `processbuilder` and `runtime` are used to create a new process and execute commands inside java, and are synonymous with spawning a shell. There are very exceptional reasons to ever these classes in Java via an HTTP API and hence when seen are highly suspicious. Also, this is a common vectors leverage to exploit Apache Struts. -how_to_implement = In order to properly run this search, Splunk needs to ingest data from your web-traffic appliances that serve or sit in the path of your Struts application servers. This can be accomplished by indexing data from a web proxy, or by using network traffic-analysis tools, such as Splunk Stream or Bro. -annotations = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 7", "CIS 12"], "nist": ["DE.AE"]} -known_false_positives = There are no known false positives. -providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Apache"] +explanation = This search looks for all processes with the parent process "c:\Windows\System32\netsh.exe" and returns the process, the command line used to execute it, the host name, and the user context under which it ran. +how_to_implement = To successfully implement this search, you must be ingesting logs with the process name, command-line arguments, and parent processes from your endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the Sysmon TA. +annotations = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +known_false_positives = It is unusual for netsh.exe to have any child processes in most environments. It makes sense to investigate the child process and verify whether the process spawned is legitimate. +providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[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. +[savedsearch://ESCU - Add Prohibited Processes to Enterprise Security] +type = support +explanation = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. +how_to_implement = This search should be run on each new install of ESCU. known_false_positives = None at this time -providing_technologies = ["Splunk Stream", "Bro", "Microsoft Windows"] -earliest_time_offset = 864000 -latest_time_offset = 86400 +providing_technologies = ["Splunk Enterprise Security"] [savedsearch://ESCU - Monitor DNS For Brand Abuse - Rule] @@ -2983,15 +3036,14 @@ known_false_positives = None at this time providing_technologies = ["Splunk Stream", "Bro"] -[savedsearch://ESCU - Suspicious File Write - Rule] -type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks at files being created or modified in the Endpoint file-system data model. The names of those files are checked against an included lookup file, which contains the names of files associated with malware or attack activity. The search returns any files with matching names, along with a note (also specified in the lookup file) that gives or points to more information about the files. -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. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file system reads and writes. In addition, this search leverages an included lookup file that contains the names of the files to watch for, as well as a note to communicate why that file name is being monitored. This lookup file can be edited to add or remove file the file names you want to monitor. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -known_false_positives = It's possible for a legitimate file to be created with the same name as one noted in the lookup file. Filenames listed in the lookup file should be unique enough that collisions are rare. Looking at the location of the file and the process responsible for the activity can help determine whether or not the activity is legitimate. -providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +[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] @@ -3013,17 +3065,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 @@ -3045,6 +3086,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 - Malicious PowerShell Process - Encoded Command - Rule] type = detection asset_type = Endpoint @@ -3095,25 +3147,20 @@ known_false_positives = Using multiple AWS accounts and roles is perfectly valid providing_technologies = ["AWS"] -[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. +[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. +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 = 3600 -latest_time_offset = 0 -[savedsearch://ESCU - Email Attachments With Lots Of Spaces - Rule] -type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. -how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. -annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} +[savedsearch://ESCU - Baseline of blocked outbound traffic from AWS] +type = support +explanation = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. known_false_positives = None at this time -providing_technologies = ["Microsoft Exchange"] +providing_technologies = ["AWS"] [savedsearch://ESCU - Previously seen users in CloudTrail] @@ -3134,6 +3181,17 @@ earliest_time_offset = 14400 latest_time_offset = 0 +[savedsearch://ESCU - Detect New Open S3 buckets - Rule] +type = detection +asset_type = S3 Bucket +confidence = medium +explanation = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. +how_to_implement = You must install the AWS App for Splunk (version 5.1.0 or later) and Splunk Add-on for AWS (version 4.4.0 or later), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. +annotations = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. +providing_technologies = ["AWS"] + + [savedsearch://ESCU - Get DNS traffic ratio] type = investigative explanation = none @@ -3285,15 +3343,15 @@ known_false_positives = Although unlikely, some legitimate applications may exhi providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Web Fraud - Password Sharing Across Accounts - Rule] +[savedsearch://ESCU - Email files written outside of the Outlook directory - Rule] type = detection -asset_type = account +asset_type = Endpoint confidence = medium -explanation = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 -how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. -annotations = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. -providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] +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 - Identify New User Accounts - Rule] @@ -3307,28 +3365,14 @@ known_false_positives = If the Identity_Management data model is not updated reg providing_technologies = ["Active Directory"] -[savedsearch://ESCU - Attempt To Stop Security Service - Rule] -type = detection -asset_type = Endpoint -confidence = high -explanation = This search looks for the processes **net.exe** and **sc.exe** with a parameter of `"stop"`. It then searches a list of security-related services included in a lookup file for matches on the command line. Results are subsequently returned in table format. The included lookup file can be modified to update the services to monitor. -how_to_implement = You must 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. The search is shipped with a lookup file, `security_services.csv`, that can be edited to update the list of services to monitor. This lookup file can be edited directly where it lives in `$SPLUNK_HOME/etc/apps/DA-ESS-ContentUpdate/lookups`, or via the Splunk console. You should add the names of services an attacker might use on the command line and surround with asterisks (*****), so that they work properly when searching the command line. The file should be updated with the names of any services you would like to monitor for attempts to stop the service., -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 = None identified. Attempts to disable security-related services should be identified and understood. +[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 - WMI Permanent Event Subscription - 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 Windows event ID 5861. -how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. -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 - Spike in File Writes - Rule] type = detection asset_type = Endpoint @@ -3351,17 +3395,6 @@ known_false_positives = None identified providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[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 - Process Execution via WMI - Rule] type = detection asset_type = Endpoint @@ -3373,28 +3406,6 @@ 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] -type = detection -asset_type = Endpoint -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"] - - -[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. -providing_technologies = ["AWS"] - - [savedsearch://ESCU - Remote Process Instantiation via WMI - Rule] type = detection asset_type = Endpoint @@ -3417,17 +3428,6 @@ known_false_positives = It is possible for this search to generate a notable eve providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -[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 @@ -3477,14 +3477,11 @@ 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. +[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. +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. +known_false_positives = None at this time providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] @@ -3498,12 +3495,15 @@ known_false_positives = Some legitimate applications start with long command-lin providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -[savedsearch://ESCU - Baseline of blocked outbound traffic from AWS] -type = support -explanation = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. +[savedsearch://ESCU - Email Attachments With Lots Of Spaces - Rule] +type = detection +asset_type = Endpoint +confidence = high +explanation = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. +how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. +annotations = {"mitre_attack": [], "kill_chain_phases": ["Delivery"], "cis20": ["CIS 7"], "nist": ["PR.IP"]} known_false_positives = None at this time -providing_technologies = ["AWS"] +providing_technologies = ["Microsoft Exchange"] [savedsearch://ESCU - Count of Unique IPs Connecting to Ports] diff --git a/src/default/savedsearches.conf b/src/default/savedsearches.conf index a6ec82e29c..e5ec63fca3 100644 --- a/src/default/savedsearches.conf +++ b/src/default/savedsearches.conf @@ -47,29 +47,54 @@ schedule_window = auto is_visible = false search = ((sourcetype=*wineventlog:security) AND (EventCode=1102 OR EventCode=1100)) OR ((sourcetype=wineventlog:system OR sourcetype=XmlWinEventlog:System) AND EventCode=104) | stats count min(_time) as firstTime max(_time) as lastTime by EventCode sourcetype host | `ctime(firstTime)` | `ctime(lastTime)` | rename host as dest -[ESCU - Get Process Information For Port Activity] +[ESCU - Detect Activity Related to Pass the Hash Attacks - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-25 -action.escu.modification_date = 2017-09-10 +action.escu.creation_date = 2016-09-13 +action.escu.modification_date = 2017-09-18 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = none -action.escu.how_to_implement = To successfully implement this search you must be ingesting endpoint data that associates processes with network events. -action.escu.data_models = ["Application_State"] -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", "Command and Control", "SamSam Ransomware", "Prohibited Traffic Allowed or Protocol Mismatch", "Use of Cleartext Protocols"] -action.escu.fields_required = ["dest_port", "src"] -action.escu.earliest_time_offset = 7200 -action.escu.latest_time_offset = 7200 -description = This search will return information about the process associated with observed network traffic to a specific destination port from a specific host. +action.escu.confidence = low +action.escu.eli5 = To detect pass the hash activity, we look at all events with event code 4624 or 4625 that specify a logon type 3 (network logons). We are looking for the NtLmSsP account, with a key length set to 0. These indicate lower level protocols that are typically used through Pass the Hash (WMI, SMB, etc.). The search also filters out events with an account name of 'Anonymous' to help reduce false positives. +action.escu.how_to_implement = To successfully implement this search, you must ingest your Windows Security Event logs and leverage the TA for Windows to extract EventCode, Logon_Process, Logon_Type, Key_Length and Account_Name fields from these events. +action.escu.full_search_name = ESCU - Detect Activity Related to Pass the Hash Attacks - Rule +action.escu.mappings = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} +action.escu.known_false_positives = Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate. +action.escu.search_type = detection +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Lateral Movement"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect Activity Related to Pass the Hash Attacks +action.notable = 1 +action.notable.param.nes_fields = +action.notable.param.rule_description = This search looks for Authentication log events from the Windows Security Audit logs to detect potential attempts for Passing the Hash +action.notable.param.rule_title = Detect Activity Related to Pass the Hash +action.notable.param.security_domain = access +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 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 = 10 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = ComputerName +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = This search looks for specific authentication events from the Windows Security Event logs to detect potential attempts at using the Pass-the-Hash technique. +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 = | from datamodel Application_State.Ports | search dest_port={dest_port} dest={src} | table dest dest_port process process_name +search = sourcetype="WinEventLog:Security" (EventCode=4624 OR EventCode=4625) Logon_Process=NtLmSsp Logon_Type=3 Account_Name !="ANONYMOUS LOGON" Key_Length=0 | table _time Source_Network_Address Account_Name Account_Domain ComputerName Workstation_Name [ESCU - Create or delete hidden shares using net.exe - Rule] action.escu = 0 @@ -135,7 +160,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Persistence"], "kil action.escu.known_false_positives = None at the moment 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 Defense Evasion Tactics", "Windows Persistence Techniques"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows Persistence Techniques", "Windows Defense Evasion Tactics"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Reg.exe used to hide files/directories via registry keys action.notable = 1 @@ -144,7 +169,7 @@ action.notable.param.rule_description = Regedit.exe is used by attackers to hide action.notable.param.rule_title = Regedit.exe used to hide a file/directory 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 @@ -169,54 +194,29 @@ schedule_window = auto is_visible = false search = sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational add Hidden REG_DWORD | search process=*reg.exe cmdline=*add* cmdline=*Hidden* cmdline=*REG_DWORD* | regex cmdline= "(/d\s+2)" | stats count values(cmdline) min(_time) as firstTime max(_time) as lastTime by dest process | `ctime(firstTime)` |`ctime(lastTime)` -[ESCU - Detect Activity Related to Pass the Hash Attacks - Rule] +[ESCU - Get Process Information For Port Activity] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2016-09-13 -action.escu.modification_date = 2017-09-18 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2017-06-25 +action.escu.modification_date = 2017-09-10 action.escu.channel = ESCU -action.escu.confidence = low -action.escu.eli5 = To detect pass the hash activity, we look at all events with event code 4624 or 4625 that specify a logon type 3 (network logons). We are looking for the NtLmSsP account, with a key length set to 0. These indicate lower level protocols that are typically used through Pass the Hash (WMI, SMB, etc.). The search also filters out events with an account name of 'Anonymous' to help reduce false positives. -action.escu.how_to_implement = To successfully implement this search, you must ingest your Windows Security Event logs and leverage the TA for Windows to extract EventCode, Logon_Process, Logon_Type, Key_Length and Account_Name fields from these events. -action.escu.full_search_name = ESCU - Detect Activity Related to Pass the Hash Attacks - Rule -action.escu.mappings = {"mitre_attack": ["Lateral Movement", "Pass the Hash"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3", "CIS 5", "CIS 16"], "nist": ["PR.PT", "PR.AT", "PR.AC", "PR.IP"]} -action.escu.known_false_positives = Legitimate logon activity by authorized NTLM systems may be detected by this search. Please investigate as appropriate. -action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Lateral Movement"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Activity Related to Pass the Hash Attacks -action.notable = 1 -action.notable.param.nes_fields = -action.notable.param.rule_description = This search looks for Authentication log events from the Windows Security Audit logs to detect potential attempts for Passing the Hash -action.notable.param.rule_title = Detect Activity Related to Pass the Hash -action.notable.param.security_domain = access -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 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 = 10 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = ComputerName -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search looks for specific authentication events from the Windows Security Event logs to detect potential attempts at using the Pass-the-Hash technique. -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 that associates processes with network events. +action.escu.data_models = ["Application_State"] +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", "Command and Control", "Prohibited Traffic Allowed or Protocol Mismatch", "SamSam Ransomware", "Use of Cleartext Protocols"] +action.escu.fields_required = ["dest_port", "src"] +action.escu.earliest_time_offset = 7200 +action.escu.latest_time_offset = 7200 +description = This search will return information about the process associated with observed network traffic to a specific destination port from a specific host. disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype="WinEventLog:Security" (EventCode=4624 OR EventCode=4625) Logon_Process=NtLmSsp Logon_Type=3 Account_Name !="ANONYMOUS LOGON" Key_Length=0 | table _time Source_Network_Address Account_Name Account_Domain ComputerName Workstation_Name +search = | from datamodel Application_State.Ports | search dest_port={dest_port} dest={src} | table dest dest_port process process_name [ESCU - TOR Traffic - Rule] action.escu = 0 @@ -415,6 +415,29 @@ 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 +[ESCU - Identify Systems Creating Remote Desktop Traffic] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-04-24 +action.escu.modification_date = 2017-09-15 +action.escu.channel = ESCU +action.escu.eli5 = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. +action.escu.how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Identify Systems Creating Remote Desktop Traffic +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 = ["Lateral Movement"] +description = This search counts the numbers of times the system has generated remote desktop traffic. +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=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.src | `drop_dm_object_name("All_Traffic")` | sort - count + [ESCU - Baseline of Security Group Activity by ARN] action.escu = 0 action.escu.enabled = 1 @@ -859,7 +882,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 MSHTA Activity", "Suspicious Windows Registry Activities"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Suspicious MSHTA Activity"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -885,7 +908,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 = ["Windows File Extension and Association Abuse", "Suspicious Windows Registry Activities"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows File Extension and Association Abuse"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Suspicious Changes to File Associations action.notable = 1 @@ -894,7 +917,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 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.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 @@ -919,54 +942,27 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) EventCode=13 object_path=*\\Explorer\\FileExts* process!=Explorer.exe AND process!=OpenWith.exe | stats count min(_time) as firstTime max(_time) as lastTime by dest, process, object_path, Details | rename Details as value | `ctime(firstTime)`| `ctime(lastTime)` -[ESCU - Detect S3 access from a new IP - Rule] +[ESCU - Baseline of Network ACL Activity by ARN] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-06-25 -action.escu.modification_date = 2018-06-28 -action.escu.asset_at_risk = S3 Bucket +action.escu.creation_date = 2018-05-21 +action.escu.modification_date = 2018-05-21 action.escu.channel = ESCU -action.escu.confidence = low -action.escu.eli5 = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource -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 S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. -action.escu.full_search_name = ESCU - Detect S3 access from a new IP - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -action.escu.known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour -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 = ["Suspicious AWS S3 Activities"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect S3 access from a new IP -action.notable = 1 -action.notable.param.nes_fields = bucket_name, src_ip -action.notable.param.rule_description = A remote IP, $src_ip$, has made a successful connection with an S3 $bucket_name$. -action.notable.param.rule_title = S3 bucket $bucketName$ was accessed by a new $src_ip$ -action.notable.param.security_domain = network -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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 = 20 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = bucket_name, src_ip -alert.suppress.period = 86400s -cron_schedule = 5 * * * * -description = This search looks at S3 bucket-access logs and detects new or previously unseen remote IP addresses that have successfully accessed an S3 bucket. -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:s3:accesslogs http_status=200 [search sourcetype=aws:s3:accesslogs http_status=200 | stats earliest(_time) as firstTime latest(_time) as lastTime by bucket_name remote_ip | inputlookup append=t previously_seen_S3_access_from_remote_ip.csv | stats min(firstTime) as firstTime, max(lastTime) as lastTime by bucket_name remote_ip | outputlookup previously_seen_S3_access_from_remote_ip.csv | eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newIP=1 | convert ctime(firstTime) ctime(lastTime) | table bucket_name remote_ip]| iplocation remote_ip |rename remote_ip as src_ip | table _time bucket_name src_ip City Country operation request_uri +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 - Remote Desktop Process Running On System - Rule] action.escu = 0 @@ -1266,7 +1262,7 @@ 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 = ["DNS Hijacking"] -description = The search takes corporate and common cloud provider domains configured under cim_corporate_email_domains.csv, cim_corporate_web_domains.csv, and cloud_domains.csv and finds their responses across the last 30 days from data in the Network Traffic datamodel, then stores the output under the discovered_dns_records.csv lookup +description = The search takes corporate and common cloud provider domains configured under `cim_corporate_email_domains.csv`, `cim_corporate_web_domains.csv`, and `cloud_domains.csv` finds their responses across the last 30 days from data in the `Network_Traffic` datamodel, then stores the output under the `discovered_dns_records.csv` lookup dispatch.earliest_time = -30d@d dispatch.latest_time = -10m@m disabled=true @@ -1275,6 +1271,57 @@ schedule_window = auto is_visible = false search = | inputlookup cim_corporate_email_domains.csv | inputlookup append=T cim_corporate_web_domains.csv | inputlookup append=T cim_cloud_domains.csv | eval domain = trim(replace(domain, "\*", "")) | join domain [|tstats summariesonly=true count values(DNS.record_type) as type, values(DNS.answer) as answer from datamodel=Network_Resolution where DNS.message_type=RESPONSE DNS.answer!="unknown" DNS.answer!="" by DNS.query | rename DNS.query as query | where query!="unknown" | rex field=query "(?\w+\.\w+?)(?:$|/)"] | makemv delim=" " answer | makemv delim=" " type | sort -count | table count,domain,type,query,answer | outputlookup createinapp=true discovered_dns_records.csv +[ESCU - AWS Cloud Provisioning From Previously Unseen IP Address - Rule] +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.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 +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 + [ESCU - Samsam Test File Write - Rule] action.escu = 0 action.escu.enabled = 1 @@ -1325,54 +1372,51 @@ 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_name) as file_name from datamodel=Endpoint.Filesystem where Filesystem.file_path=*\\windows\\system32\\test.txt by Filesystem.file_path | `drop_dm_object_name(Filesystem)` | `ctime(lastTime)` | `ctime(firstTime)` -[ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] +[ESCU - Investigate AWS activities via region name] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-08-28 -action.escu.modification_date = 2018-08-28 -action.escu.asset_at_risk = Windows +action.escu.creation_date = 2018-02-09 +action.escu.modification_date = 2018-02-09 action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. -action.escu.how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. -action.escu.full_search_name = ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - 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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. -action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Credential Dumping"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Mimikatz Via PowerShell And EventCode 4663 -action.notable = 1 -action.notable.param.nes_fields = user, dest -action.notable.param.rule_description = Possible attempt at credential dumping via PowerShell was detected on $dest$ by $user$. -action.notable.param.rule_title = Event ID 4663 Specifying PowerShell Reading From LSASS.exe Identified on $dest$. -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 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 = 40 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = user, dest, process -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search looks for PowerShell reading lsass memory consistent with credential dumping. -dispatch.earliest_time = -70m@m -dispatch.latest_time = -10m@m +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 - 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.fields_required = ["awsRegion"] +action.escu.earliest_time_offset = 14400 +action.escu.latest_time_offset = 0 +description = This search lists all the user activities logged by CloudTrail for a specific region in question and will create a table of the values of parameters requested, the type of the event and the response from the AWS API by each user disabled=true -enableSched = 1 -counttype = number of events -relation = greater than -quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=wineventlog:security EventCode=4663 Process_Name=*powershell.exe Object_Name=*lsass.exe Access_Mask=0x10 | stats count min(_time) as firstTime max(_time) as lastTime by dest, Process_Name, Process_ID, Message | rename Process_Name as process | `ctime(firstTime)`| `ctime(lastTime)` +search = | search sourcetype=aws:cloudtrail awsRegion={awsRegion}| rename requestParameters.instancesSet.items{}.instanceId as instanceId| stats values(eventName) by userName instanceId + +[ESCU - Get EC2 Instance Details by instanceId] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-02-12 +action.escu.modification_date = 2018-02-12 +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 = ["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 +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 [ESCU - AWS Network Access Control List Created with All Open Ports - Rule] action.escu = 0 @@ -1622,55 +1666,28 @@ 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", "Windows Service Abuse", "Host Redirection", "Suspicious AWS EC2 Activities", "DHS Report TA18-074A", "Suspicious Windows Registry Activities", "Windows Persistence Techniques", "ColdRoot MacOS RAT", "Monitor Backup Solution", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Unusual Processes", "DNS Amplification Attacks", "Suspicious WMI Use", "Asset Tracking", "Ransomware", "Command and Control", "Suspicious AWS Login Activities", "Windows Privilege Escalation", "Windows Log Manipulation", "Windows File Extension and Association Abuse", "AWS Network ACL Activity", "Prohibited Traffic Allowed or Protocol Mismatch", "Brand Monitoring", "SamSam Ransomware", "Data Protection", "Router & Infrastructure Security", "Malicious PowerShell", "Disabling Security Tools", "SQL Injection", "Windows Defense Evasion Tactics", "Emotet Malware (TA18-201A)", "Hidden Cobra Malware", "Suspicious Emails", "JBoss Vulnerability", "Suspicious DNS Traffic", "Spectre And Meltdown Vulnerabilities", "Credential Dumping", "Suspicious AWS Traffic", "Collection and Staging", "Netsh Abuse", "Account Monitoring and Controls", "Suspicious AWS S3 Activities", "Monitor for Updates", "Use of Cleartext Protocols", "Lateral Movement", "Dynamic DNS", "AWS User Monitoring", "Web Fraud Detection", "DNS Hijacking", "Splunk Enterprise Vulnerability", "Unusual AWS EC2 Modifications", "AWS Cross Account Activity", "Apache Struts Vulnerability", "Suspicious MSHTA Activity", "Splunk Enterprise Vulnerability CVE-2018-11409", "Monitor for Unauthorized Software"] +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 - Get Parent Process Info] action.escu = 0 @@ -1684,7 +1701,7 @@ 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", "Credential Dumping", "Suspicious Command-Line Executions", "Windows Service Abuse", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Netsh Abuse", "Suspicious MSHTA Activity", "Orangeworm Attack Group", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Collection and Staging", "DHS Report TA18-074A", "SamSam Ransomware", "Disabling Security Tools", "Suspicious Windows Registry Activities", "Windows Defense Evasion Tactics", "Windows Persistence Techniques"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Windows Service Abuse", "DHS Report TA18-074A", "Suspicious Windows Registry Activities", "Windows Persistence Techniques", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Ransomware", "Windows Privilege Escalation", "Windows File Extension and Association Abuse", "SamSam Ransomware", "Disabling Security Tools", "Windows Defense Evasion Tactics", "Emotet Malware (TA18-201A)", "Hidden Cobra Malware", "Credential Dumping", "Collection and Staging", "Netsh Abuse", "Suspicious MSHTA Activity"] action.escu.fields_required = ["process", "dest"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -1711,7 +1728,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 @@ -1720,7 +1737,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 @@ -1795,45 +1812,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 - 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 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 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 = 20 +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 = 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 +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 @@ -1843,7 +1860,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)` +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 - Previously Seen EC2 Launches By User] action.escu = 0 @@ -1879,7 +1896,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", "Monitor Backup Solution", "SamSam Ransomware"] +action.escu.analytic_story = ["Monitor Backup Solution", "Ransomware", "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 @@ -1954,7 +1971,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "PowerShell", "Scripting"] action.escu.known_false_positives = Administrators may attempt to change the default execution policy on a system for a variety of reasons. However, setting the policy to "Unrestricted" as this search is designed to identify would be unusual. Hits should be reviewed and investigated as appropriate. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Credential Dumping", "Malicious PowerShell"] +action.escu.analytic_story = ["Malicious PowerShell", "Credential Dumping"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Attempt To Set Default PowerShell Execution Policy To Unrestricted action.notable = 1 @@ -1963,7 +1980,7 @@ action.notable.param.rule_description = An attempt to modify the default PowerSh action.notable.param.rule_title = Attempt To Set PowerShell Execution Policy To "Unrestricted" 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 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 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 @@ -2010,28 +2027,104 @@ 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 - Count of assets by category] +[ESCU - Suspicious writes to windows Recycle Bin - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-11 -action.escu.modification_date = 2017-09-13 +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.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 +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 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_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 - Suspicious File Write - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-06-14 +action.escu.modification_date = 2018-11-14 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = high +action.escu.eli5 = This search looks at files being created or modified in the Endpoint file-system data model. The names of those files are checked against an included lookup file, which contains the names of files associated with malware or attack activity. The search returns any files with matching names, along with a note (also specified in the lookup file) that gives or points to more information about the files. +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. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file system reads and writes. In addition, this search leverages an included lookup file that contains the names of the files to watch for, as well as a note to communicate why that file name is being monitored. This lookup file can be edited to add or remove file the file names you want to monitor. +action.escu.data_models = ["Endpoint"] +action.escu.full_search_name = ESCU - Suspicious File Write - 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's possible for a legitimate file to be created with the same name as one noted in the lookup file. Filenames listed in the lookup file should be unique enough that collisions are rare. Looking at the location of the file and the process responsible for the activity can help determine whether or not the activity is legitimate. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Hidden Cobra Malware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Suspicious File Write +action.notable = 1 +action.notable.param.nes_fields = dest, file_name +action.notable.param.rule_description = A write to a filename associated with malicious activity detected on $dest$. +action.notable.param.rule_title = Suspicious File Write 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 Outbound Emails to Hidden Cobra Threat Actors\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,file_name +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = The search looks for files created with names that have been linked to malicious activity. +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.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] action.escu = 0 @@ -2120,7 +2213,7 @@ action.escu.mappings = {"mitre_attack": ["Command and Control", "Exfiltration", action.escu.known_false_positives = It's possible that an enterprise has more than five DNS servers that are configured in a round-robin rotation. Please customize the search, as appropriate. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["DNS Hijacking", "Command and Control", "Suspicious DNS Traffic"] +action.escu.analytic_story = ["Command and Control", "Suspicious DNS Traffic", "DNS Hijacking"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Clients Connecting to Multiple DNS Servers action.notable = 1 @@ -2129,7 +2222,7 @@ action.notable.param.rule_description = This search allows you to identify the e action.notable.param.rule_title = Client $src$ Connecting to Multiple DNS 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 - ESCU - Get DNS Server History for a host\n - ESCU - Get DNS traffic ratio\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 - 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 DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get History Of Email Sources\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 @@ -2227,50 +2320,128 @@ 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 - Previously Seen AWS Regions] +[ESCU - Detect Prohibited Applications Spawning cmd.exe - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-01-08 -action.escu.modification_date = 2018-01-08 +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.eli5 = 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. -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 Regions -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 EC2 Activities", "AWS Cryptomining"] -description = This search looks for CloudTrail events where an AWS instance is started and creates a baseline of most recent time (latest) and the first time (earliest) we've seen this region in our dataset grouped by the value awsRegion for the last 30 days -dispatch.earliest_time = -30d@d +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.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.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect Prohibited Applications Spawning cmd.exe +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.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, parent_process +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. +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 StartInstances | stats earliest(_time) as earliest latest(_time) as latest by awsRegion | outputlookup previously_seen_aws_regions.csv | stats count +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_name Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] -[ESCU - Get All AWS Activity From Region] +[ESCU - Detect USB device insertion - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-03-19 -action.escu.modification_date = 2018-03-19 +action.escu.creation_date = 2017-08-03 +action.escu.modification_date = 2017-11-27 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = low +action.escu.eli5 = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device +action.escu.how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. +action.escu.data_models = ["Change_Analysis"] +action.escu.full_search_name = ESCU - Detect USB device insertion - Rule +action.escu.mappings = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} +action.escu.known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. +action.escu.search_type = detection +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Data Protection"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect USB device insertion +action.notable = 1 +action.notable.param.nes_fields = dest +action.notable.param.rule_description = Read/Write attempt to a USB was detected on this host +action.notable.param.rule_title = Read/Write attempt to a USB 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 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"} +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.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = The search is used to detect hosts that generate Windows Event ID 4663 for successful attempts to write to or read from a removable storage and Event ID 4656 for failures, which occurs when a USB drive is plugged in. In this scenario we are querying the Change_Analysis data model to look for Windows Event ID 4656 or 4663 where the priority of the affected host is marked as high in the ES Assets and Identity Framework. +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 earliest(_time) AS earliest latest(_time) AS latest from datamodel=Change_Analysis where (nodename = All_Changes) All_Changes.result="Removable Storage device" (All_Changes.result_id=4663 OR All_Changes.result_id=4656) (All_Changes.src_priority=high) by All_Changes.dest | `drop_dm_object_name("All_Changes")`| `ctime(earliest)`| `ctime(latest)` + +[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 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.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 = 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.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 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. +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=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 +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 @@ -2284,7 +2455,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 = ["DNS Hijacking", "Brand Monitoring", "Command and Control", "Data Protection", "Host Redirection", "Suspicious DNS Traffic", "Dynamic DNS"] +action.escu.analytic_story = ["Host Redirection", "Command and Control", "Brand Monitoring", "Data Protection", "Suspicious DNS Traffic", "Dynamic DNS", "DNS Hijacking"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -2383,7 +2554,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 = ["Suspicious Windows Registry Activities", "Lateral Movement", "Windows Defense Evasion Tactics", "Windows Persistence Techniques"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows Persistence Techniques", "Windows Defense Evasion Tactics", "Lateral Movement"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Remote Registry Key modifications action.notable = 1 @@ -2392,7 +2563,7 @@ action.notable.param.rule_description = A registry key was modified remotely usi action.notable.param.rule_title = Remote Registry Key Modification detection 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 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 @@ -2417,45 +2588,44 @@ 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 - Abnormally High AWS Instances Launched by User - Rule] 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-02-26 +action.escu.modification_date = 2018-02-26 +action.escu.asset_at_risk = AWS Instance 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.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 = ["JBoss Vulnerability", "SamSam Ransomware"] +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 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 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 @@ -2465,7 +2635,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 @@ -2567,6 +2737,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 @@ -2667,28 +2887,55 @@ 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=fsutil.exe by Processes.user Processes.process_name Processes.parent_process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` | search process="*deletejournal*" AND process="*usn*" -[ESCU - Identify Systems Creating Remote Desktop Traffic] +[ESCU - Remote Desktop Network Traffic - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-24 +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.eli5 = This search counts the numbers of times the system has tried to connect to another system on TCP/3389, the default port used for RDP traffic. -action.escu.how_to_implement = To successfully implement this search, you must ingest network traffic and populate the Network_Traffic data model. +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 - Identify Systems Creating Remote Desktop Traffic -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 = ["Lateral Movement"] -description = This search counts the numbers of times the system has generated remote desktop traffic. -dispatch.earliest_time = -30d@d +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 = ["SamSam Ransomware", "Hidden Cobra Malware", "Lateral Movement"] +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 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 = 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 from datamodel=Network_Traffic where All_Traffic.dest_port=3389 by All_Traffic.src | `drop_dm_object_name("All_Traffic")` | sort - count +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 - Detect attackers scanning for vulnerable JBoss servers - Rule] action.escu = 0 @@ -2706,7 +2953,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 = ["JBoss Vulnerability", "SamSam Ransomware"] +action.escu.analytic_story = ["SamSam Ransomware", "JBoss Vulnerability"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect attackers scanning for vulnerable JBoss servers action.notable = 1 @@ -2715,7 +2962,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 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.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.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -2954,7 +3201,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 = ["Suspicious Command-Line Executions", "Ransomware", "Unusual Processes"] +action.escu.analytic_story = ["Suspicious Command-Line Executions", "Unusual Processes", "Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = System Processes Run From Unexpected Locations action.notable = 1 @@ -2963,7 +3210,7 @@ action.notable.param.rule_description = The system $dest$ has a process that nor action.notable.param.rule_title = System Processes Run From Unexpected Location 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 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 Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -2988,44 +3235,44 @@ 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 - Attempt To Add Certificate To Untrusted Store - Rule] +[ESCU - Common Ransomware Extensions - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-09 +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 = 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.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 - 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.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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Disabling Security Tools"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Attempt To Add Certificate To Untrusted Store +action.correlationsearch.label = Common Ransomware Extensions 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.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 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 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 = 50 +action.risk.param._risk_score = 80 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = process, dest -alert.suppress.period = 86400s +alert.suppress.fields = dest,file_name +alert.suppress.period = 14400s cron_schedule = 0 * * * * -description = Attempt to add a certificate to the untrusted certificate store +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 @@ -3036,7 +3283,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 = | 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 - Previously seen S3 bucket access by remote IP] action.escu = 0 @@ -3421,7 +3668,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Hidden Cobra Malware", "DHS Report TA18-074A"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "DHS Report TA18-074A", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Hidden Cobra Malware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = First time seen command line argument action.notable = 1 @@ -3430,7 +3677,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 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 Outbound Emails to Hidden Cobra Threat Actors\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 @@ -3505,28 +3752,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Credential Dumping", "DNS Hijacking", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "DNS Amplification Attacks", "AWS Cross Account Activity", "Windows Service Abuse", "AWS User Monitoring", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Suspicious AWS S3 Activities", "Netsh Abuse", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "Suspicious MSHTA Activity", "AWS Network ACL Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious AWS Traffic", "Suspicious Emails", "Web Fraud Detection", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Splunk Enterprise Vulnerability CVE-2018-11409", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "Monitor Backup Solution", "SamSam Ransomware", "Disabling Security Tools", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Unusual AWS EC2 Modifications", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Asset Tracking", "Windows Defense Evasion Tactics", "Router & Infrastructure Security", "Windows Log Manipulation", "Prohibited Traffic Allowed or Protocol Mismatch", "Dynamic DNS", "Suspicious AWS Login Activities", "Windows Persistence Techniques", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] -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 @@ -3562,7 +3836,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 S3 Activities", "Command and Control", "Suspicious AWS Traffic"] +action.escu.analytic_story = ["Command and Control", "AWS Suspicious Provisioning Activities", "Suspicious AWS Traffic", "Suspicious AWS S3 Activities"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 @@ -3596,28 +3870,28 @@ schedule_window = auto is_visible = false search = | search sourcetype="netbackup_logs" dest={dest} -[ESCU - Get Backup Logs For Endpoint] +[ESCU - Get User Information from Identity Table] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-08-24 -action.escu.modification_date = 2017-09-14 +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 = You must be ingesting your backup logs. -action.escu.full_search_name = ESCU - Get Backup Logs For Endpoint +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 = ["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. +action.escu.providing_technologies = ["Splunk Enterprise Security"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Windows Service Abuse", "Host Redirection", "Suspicious AWS EC2 Activities", "DHS Report TA18-074A", "Suspicious Windows Registry Activities", "Windows Persistence Techniques", "ColdRoot MacOS RAT", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Unusual Processes", "Suspicious WMI Use", "Asset Tracking", "Ransomware", "Command and Control", "Suspicious AWS Login Activities", "Windows Privilege Escalation", "Windows Log Manipulation", "Windows File Extension and Association Abuse", "AWS Network ACL Activity", "Brand Monitoring", "SamSam Ransomware", "Data Protection", "Router & Infrastructure Security", "Malicious PowerShell", "Disabling Security Tools", "SQL Injection", "Windows Defense Evasion Tactics", "Emotet Malware (TA18-201A)", "Hidden Cobra Malware", "Suspicious Emails", "JBoss Vulnerability", "Suspicious DNS Traffic", "Spectre And Meltdown Vulnerabilities", "Credential Dumping", "Collection and Staging", "Netsh Abuse", "Account Monitoring and Controls", "Suspicious AWS S3 Activities", "Monitor for Updates", "Use of Cleartext Protocols", "Lateral Movement", "Dynamic DNS", "DNS Hijacking", "Splunk Enterprise Vulnerability", "Apache Struts Vulnerability", "Suspicious MSHTA Activity", "Monitor for Unauthorized Software"] +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 = | search sourcetype="netbackup_logs" COMPUTERNAME={dest} | rename COMPUTERNAME as dest, MESSAGE as signature | table _time, dest, signature +search = | `identities` | search identity={user} | table _time, identity, first, last, email, category, watchlist [ESCU - Child Processes of Spoolsv.exe - Rule] action.escu = 0 @@ -3682,7 +3956,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 = ["DNS Hijacking", "Brand Monitoring", "Command and Control", "Data Protection", "Host Redirection", "Suspicious DNS Traffic", "Dynamic DNS"] +action.escu.analytic_story = ["Host Redirection", "Command and Control", "Brand Monitoring", "Data Protection", "Suspicious DNS Traffic", "Dynamic DNS", "DNS Hijacking"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 86400 @@ -3693,29 +3967,6 @@ schedule_window = auto is_visible = false search = | tstats allow_old_summaries=true values(All_Application_State.process) as "process" from datamodel=Application_State where nodename=All_Application_State.Ports All_Application_State.Ports.dest_port=53 All_Application_State.dest={dest} -[ESCU - Systems Ready for Spectre-Meltdown Windows Patch] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-01-08 -action.escu.modification_date = 2018-01-08 -action.escu.channel = ESCU -action.escu.eli5 = 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. -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.data_models = ["Change_Analysis"] -action.escu.full_search_name = ESCU - Systems Ready for Spectre-Meltdown Windows Patch -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 = ["Spectre And Meltdown Vulnerabilities"] -description = Some AV applications can cause the Spectre/Meltdown patch for Windows not to install successfully. This registry key is supposed to be created by the AV engine when it has been patched to be able to handle the Windows patch. If this key has been written, the system can then be patched for Spectre and Meltdown. -dispatch.earliest_time = -1d@d -dispatch.latest_time = -10m@m -disabled=true -realtime_schedule = 0 -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="HKLM\Software\Microsoft\Windows\CurrentVersion\QualityCompat*") by All_Changes.dest, All_Changes.command, All_Changes.user, All_Changes.object, All_Changes.object_path | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` - [ESCU - Detect hosts connecting to dynamic domain providers - Rule] action.escu = 0 action.escu.enabled = 1 @@ -3724,7 +3975,7 @@ action.escu.modification_date = 2018-07-24 action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = The search is querying an accelerated Network_Resolution data model to count and list the values of resolved domains for each DNS query and checks that against the list of Dynamic DNS providers (lookup - dynamic_dns_providers) by each host (DNS.src) +action.escu.eli5 = The search is querying an accelerated `Network_Resolution` data model to count and list the values of resolved domains for each DNS query and checks that against the list of Dynamic DNS providers (lookup - `dynamic_dns_providers`) by each host (DNS.src) action.escu.how_to_implement = First, you'll need to ingest data from your DNS operations. This can be done by ingesting logs from your server or data collected passively by Splunk Stream or similar solutions. Specifically, data that contains the domain that is being queried and the IP of the host originating the request must be populating the Network_Resolution data model. This search also leverages a lookup file, `dynamic_dns_providers_default.csv`, which contains a non-exhaustive list of Dynamic DNS providers. Please consider updating the local lookup periodically by adding new domains to the list of `dynamic_dns_providers_local.csv`. action.escu.data_models = ["Network_Resolution"] action.escu.full_search_name = ESCU - Detect hosts connecting to dynamic domain providers - Rule @@ -3732,7 +3983,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 = ["DNS Hijacking", "Command and Control", "Data Protection", "Suspicious DNS Traffic", "Prohibited Traffic Allowed or Protocol Mismatch", "Dynamic DNS"] +action.escu.analytic_story = ["Command and Control", "Prohibited Traffic Allowed or Protocol Mismatch", "Data Protection", "Suspicious DNS Traffic", "Dynamic DNS", "DNS Hijacking"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect hosts connecting to dynamic domain providers action.notable = 1 @@ -3741,7 +3992,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 - 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.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 - ESCU - Get Vulnerability Logs For Endpoint\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 History Of Email Sources\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 @@ -3880,226 +4131,6 @@ 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 - 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 - -[ESCU - Detect USB device insertion - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-08-03 -action.escu.modification_date = 2017-11-27 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = low -action.escu.eli5 = USB is a common attack vector for delivering or propagating malicious code, or the exfiltration of data. Your corporation may have a policy of not allowing removable media at all, or may only allow approved media to be used on specific hosts by specific users. By logging USB activity from Windows and other endpoints gathered using the Universal Forwarder, you can gain an understanding of what systems might be vulnerable to attack via removable media, or what users might need additional security training. This search is looking for event_id 4656 for failure and 4663 for successful USB read/write attempts from Windows Security Event logs, which is the event code generated when a files are read from and written to a removable storage device -action.escu.how_to_implement = To successfully implement this search, you must ingest Windows Security Event logs and track event code 4663 and 4656. Ensure that the field from the event logs is being mapped to the result_id field in the Change_Analysis data model. To minimize the alert volume, this search leverages the Assets and Identity framework to filter out events from those assets not marked high priority in the Enterprise Security Assets and Identity Framework. -action.escu.data_models = ["Change_Analysis"] -action.escu.full_search_name = ESCU - Detect USB device insertion - Rule -action.escu.mappings = {"mitre_attack": ["Exfiltration"], "kill_chain_phases": ["Installation", "Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.PT", "PR.DS"]} -action.escu.known_false_positives = Legitimate USB activity will also be detected. Please verify and investigate as appropriate. -action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Data Protection"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect USB device insertion -action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = Read/Write attempt to a USB was detected on this host -action.notable.param.rule_title = Read/Write attempt to a USB 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 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"} -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.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = The search is used to detect hosts that generate Windows Event ID 4663 for successful attempts to write to or read from a removable storage and Event ID 4656 for failures, which occurs when a USB drive is plugged in. In this scenario we are querying the Change_Analysis data model to look for Windows Event ID 4656 or 4663 where the priority of the affected host is marked as high in the ES Assets and Identity Framework. -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 earliest(_time) AS earliest latest(_time) AS latest from datamodel=Change_Analysis where (nodename = All_Changes) All_Changes.result="Removable Storage device" (All_Changes.result_id=4663 OR All_Changes.result_id=4656) (All_Changes.src_priority=high) by All_Changes.dest | `drop_dm_object_name("All_Changes")`| `ctime(earliest)`| `ctime(latest)` - -[ESCU - Shim Database Installation With Suspicious Parameters - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-10-03 -action.escu.modification_date = 2017-10-10 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search looks for the execution of sdbinst.exe with command-line arguments of -q and -p. The -q option performs a silent installation with no visible window, status, or warning information. The -p option allows the shim database to contain patches. It will return the count, the first time, and the last time these command-line arguments were seen on each endpoint and by each user. -action.escu.how_to_implement = To successfully implement this search, you need to ingest logs with both the process name and command-line from your endpoints. If you are using Sysmon, you will need to have a Splunk Universal Forwarder on each endpoint that you want to collect the data on. You will also need to have to deploy the Sysmon TA on these endpoints and on your search head. You must have at least version 6.0.4 of the Sysmon TA. -action.escu.full_search_name = ESCU - Shim Database Installation With Suspicious Parameters - 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 = None identified -action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Windows Persistence Techniques"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Shim Database Installation With Suspicious Parameters -action.notable = 1 -action.notable.param.nes_fields = dest, user, process -action.notable.param.rule_description = The system $dest$ had a shim database installed. -action.notable.param.rule_title = Shim Database Installation 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.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = dest,user -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = This search detects the process execution and arguments required to silently create a shim database. The sdbinst.exe application is used to install shim database files (.sdb). A shim is a small library which transparently intercepts an API, changes the parameters passed, handles the operation itself, or redirects the operation elsewhere. -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 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] -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 = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Abnormally High AWS Instances Launched by User -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.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.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.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 -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=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 - Detect Excessive User Account Lockouts - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-08-17 -action.escu.modification_date = 2017-09-23 -action.escu.asset_at_risk = Windows -action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search looks for the Windows event code 4740 within your Windows Security Logs, which indicates that an account locked out. It then counts the numbers of times an account has been locked out in a four hour window and displays those accounts with a count greater than five. -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 in order for this search to execute successfully. -action.escu.full_search_name = ESCU - Detect Excessive User Account Lockouts - Rule -action.escu.mappings = {"mitre_attack": ["Valid Accounts"], "cis20": ["CIS 16"], "nist": ["PR.IP"]} -action.escu.known_false_positives = It is possible that a legitimate user is experiencing an issue causing multiple account login failures leading to lockouts. -action.escu.search_type = detection -action.escu.providing_technologies = ["Microsoft Windows"] -action.escu.analytic_story = ["Account Monitoring and Controls"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Excessive User Account Lockouts -action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = The account $user$ has been locked out an excessive number of times -action.notable.param.rule_title = $user$ locked account an excessive number of times -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 = user -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search detects accounts that have been locked out a relatively high number of times in a short period. -dispatch.earliest_time = -4h@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 = 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 - Detect Spike in AWS API Activity - Rule] action.escu = 0 action.escu.enabled = 1 @@ -4171,6 +4202,227 @@ 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 +[ESCU - Web Fraud - Password Sharing Across Accounts - Rule] +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.channel = webfraud +action.escu.confidence = medium +action.escu.eli5 = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 +action.escu.how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. +action.escu.full_search_name = ESCU - Web Fraud - Password Sharing Across Accounts - Rule +action.escu.mappings = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. +action.escu.search_type = detection +action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] +action.escu.analytic_story = ["Web Fraud Detection"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Web Fraud - Password Sharing Across Accounts +action.notable = 1 +action.notable.param.nes_fields = user +action.notable.param.rule_description = This search is used to identify user accounts, $user$, that share common passwords +action.notable.param.rule_title = Web Fraud Detection: Password Sharing Across Accounts +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 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 = user +action.risk.param._risk_object_type = other +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 = 3600s +cron_schedule = 0 * * * * +description = This search is used to identify user accounts that share a common password. +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=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 - Shim Database Installation With Suspicious Parameters - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-10-03 +action.escu.modification_date = 2017-10-10 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = This search looks for the execution of sdbinst.exe with command-line arguments of -q and -p. The -q option performs a silent installation with no visible window, status, or warning information. The -p option allows the shim database to contain patches. It will return the count, the first time, and the last time these command-line arguments were seen on each endpoint and by each user. +action.escu.how_to_implement = To successfully implement this search, you need to ingest logs with both the process name and command-line from your endpoints. If you are using Sysmon, you will need to have a Splunk Universal Forwarder on each endpoint that you want to collect the data on. You will also need to have to deploy the Sysmon TA on these endpoints and on your search head. You must have at least version 6.0.4 of the Sysmon TA. +action.escu.full_search_name = ESCU - Shim Database Installation With Suspicious Parameters - 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 = None identified +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Windows Persistence Techniques"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Shim Database Installation With Suspicious Parameters +action.notable = 1 +action.notable.param.nes_fields = dest, user, process +action.notable.param.rule_description = The system $dest$ had a shim database installed. +action.notable.param.rule_title = Shim Database Installation 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.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest,user +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = This search detects the process execution and arguments required to silently create a shim database. The sdbinst.exe application is used to install shim database files (.sdb). A shim is a small library which transparently intercepts an API, changes the parameters passed, handles the operation itself, or redirects the operation elsewhere. +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 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 - Detect malicious requests to exploit JBoss servers - Rule] +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.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.search_type = detection +action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Apache", "Bro"] +action.escu.analytic_story = ["SamSam Ransomware", "JBoss Vulnerability"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect malicious requests to exploit JBoss servers +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.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.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,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 +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=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 +action.escu.enabled = 1 +action.escu.creation_date = 2017-08-17 +action.escu.modification_date = 2017-09-23 +action.escu.asset_at_risk = Windows +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = This search looks for the Windows event code 4740 within your Windows Security Logs, which indicates that an account locked out. It then counts the numbers of times an account has been locked out in a four hour window and displays those accounts with a count greater than five. +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 in order for this search to execute successfully. +action.escu.full_search_name = ESCU - Detect Excessive User Account Lockouts - Rule +action.escu.mappings = {"mitre_attack": ["Valid Accounts"], "cis20": ["CIS 16"], "nist": ["PR.IP"]} +action.escu.known_false_positives = It is possible that a legitimate user is experiencing an issue causing multiple account login failures leading to lockouts. +action.escu.search_type = detection +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Account Monitoring and Controls"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect Excessive User Account Lockouts +action.notable = 1 +action.notable.param.nes_fields = user +action.notable.param.rule_description = The account $user$ has been locked out an excessive number of times +action.notable.param.rule_title = $user$ locked account an excessive number of times +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 = user +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = This search detects accounts that have been locked out a relatively high number of times in a short period. +dispatch.earliest_time = -4h@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 = 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] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-08-24 +action.escu.modification_date = 2017-09-10 +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.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", "DNS Hijacking"] +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 +realtime_schedule = 0 +schedule_window = auto +is_visible = false +search = | from datamodel Vulnerabilities.Vulnerabilities | search dest={dest} + [ESCU - RunDLL Loading DLL By Ordinal - Rule] action.escu = 0 action.escu.enabled = 1 @@ -4232,7 +4484,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Credential Dumping", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "DNS Amplification Attacks", "Windows Service Abuse", "AWS User Monitoring", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Windows Privilege Escalation", "Suspicious AWS S3 Activities", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "AWS Network ACL Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious AWS Traffic", "Web Fraud Detection", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Collection and Staging", "Splunk Enterprise Vulnerability CVE-2018-11409", "Malicious PowerShell", "DHS Report TA18-074A", "Disabling Security Tools", "Suspicious DNS Traffic", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Lateral Movement", "Asset Tracking", "Windows Defense Evasion Tactics", "Router & Infrastructure Security", "Windows Log Manipulation", "Dynamic DNS", "Suspicious AWS Login Activities", "Windows Persistence Techniques", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Windows Service Abuse", "Host Redirection", "Suspicious AWS EC2 Activities", "DHS Report TA18-074A", "Windows Persistence Techniques", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "DNS Amplification Attacks", "Suspicious WMI Use", "Asset Tracking", "Command and Control", "Suspicious AWS Login Activities", "Windows Privilege Escalation", "Windows Log Manipulation", "Windows File Extension and Association Abuse", "AWS Network ACL Activity", "Brand Monitoring", "Data Protection", "Router & Infrastructure Security", "Malicious PowerShell", "Disabling Security Tools", "SQL Injection", "Windows Defense Evasion Tactics", "Emotet Malware (TA18-201A)", "Hidden Cobra Malware", "JBoss Vulnerability", "Suspicious DNS Traffic", "Spectre And Meltdown Vulnerabilities", "Credential Dumping", "Suspicious AWS Traffic", "Collection and Staging", "Account Monitoring and Controls", "Suspicious AWS S3 Activities", "Monitor for Updates", "Use of Cleartext Protocols", "Lateral Movement", "Dynamic DNS", "AWS User Monitoring", "Web Fraud Detection", "Splunk Enterprise Vulnerability", "Apache Struts Vulnerability", "Splunk Enterprise Vulnerability CVE-2018-11409"] action.escu.fields_required = ["event_id"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -4243,30 +4495,6 @@ 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 - Get Vulnerability Logs For Endpoint] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-08-24 -action.escu.modification_date = 2017-09-10 -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.known_false_positives = None at this time -action.escu.search_type = contextual -action.escu.providing_technologies = ["Nessus"] -action.escu.analytic_story = ["DNS Hijacking", "Ransomware", "SamSam Ransomware", "ColdRoot MacOS RAT"] -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 -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | from datamodel Vulnerabilities.Vulnerabilities | search dest={dest} - [ESCU - Windows hosts file modification - Rule] action.escu = 0 action.escu.enabled = 1 @@ -4317,44 +4545,43 @@ 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)` -[ESCU - Detect Large Outbound ICMP Packets - Rule] +[ESCU - Detect S3 access from a new IP - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-06-01 -action.escu.modification_date = 2018-06-01 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-06-25 +action.escu.modification_date = 2018-06-28 +action.escu.asset_at_risk = S3 Bucket action.escu.channel = ESCU -action.escu.confidence = medium -action.escu.eli5 = This search works by looking at fields in the Network_Traffic data model, which is populated by various firewalls and passive networking monitoring technologies. Specifically, the search looks for ICMP packets larger than 1,000 bytes with a destination that is external to your organization. -action.escu.how_to_implement = In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have a good understanding of how your network segments are designed and that you are able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the company's assets in the `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model -action.escu.data_models = ["Network_Traffic"] -action.escu.full_search_name = ESCU - Detect Large Outbound ICMP Packets - Rule -action.escu.mappings = {"mitre_attack": ["Command and Control", "Standard Non-Application Layer Protocol"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE"]} -action.escu.known_false_positives = ICMP packets are used in a variety of ways to help troubleshoot networking issues and ensure the proper flow of traffic. As such, it is possible that a large ICMP packet could be perfectly legitimate. If large ICMP packets are associated with command and control traffic, there will typically be a large number of these packets observed over time. If the search is providing a large number of false positives, you can modify the search to adjust the byte threshold or whitelist specific IP addresses, as necessary. +action.escu.confidence = low +action.escu.eli5 = Here the subsearch executes first and returns all successful S3 bucket-access attempts (HTTP code "200") within the last hour. It groups the results by the earliest and latest times it has seen a remote IP accessing a particular bucket. It appends this information to the historical data from the lookup file and then recalculates the `firstTime` and `lastTime` field for each remote IP accessing an S3 bucket. Next, it returns only those remote IP addresses that have first been seen accessing a specific bucket within the past hour. This is combined with the main search to return the time, bucket name, source IP, city, and country operations performed, as well as the requested URI of the resource +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 S3 access logs' inputs. This search works best when you run the "Previously Seen S3 Bucket Access by Remote IP" support search once to create a history of previously seen remote IPs and bucket names. +action.escu.full_search_name = ESCU - Detect S3 access from a new IP - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13", "CIS 14"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +action.escu.known_false_positives = S3 buckets can be accessed from any IP, as long as it can make a successful connection. This will be a false postive, since the search is looking for a new IP within the past hour action.escu.search_type = detection -action.escu.providing_technologies = ["Bro", "Splunk Stream", "Palo Alto Firewall"] -action.escu.analytic_story = ["Command and Control"] +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Large Outbound ICMP Packets +action.correlationsearch.label = Detect S3 access from a new IP action.notable = 1 -action.notable.param.nes_fields = src_ip, dest_ip -action.notable.param.rule_description = Large outbound ICMP packet detected. -action.notable.param.rule_title = Large ICMP packet from $src_ip$ to $dest_ip$ detected +action.notable.param.nes_fields = bucket_name, src_ip +action.notable.param.rule_description = A remote IP, $src_ip$, has made a successful connection with an S3 $bucket_name$. +action.notable.param.rule_title = S3 bucket $bucketName$ was accessed by a new $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.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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 = 50 +action.risk.param._risk_score = 20 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = src_ip -alert.suppress.period = 28800s -cron_schedule = 0 * * * * -description = This search looks for outbound ICMP packets with a packet size larger than 1,000 bytes. Various threat actors have been known to use ICMP as a command and control channel for their attack infrastructure. Large ICMP packets from an endpoint to a remote host may be indicative of this activity. +alert.suppress.fields = bucket_name, src_ip +alert.suppress.period = 86400s +cron_schedule = 5 * * * * +description = This search looks at S3 bucket-access logs and detects new or previously unseen remote IP addresses that have successfully accessed an S3 bucket. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -4365,7 +4592,56 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = | tstats `summariesonly` count earliest(_time) as earliest latest(_time) as latest values(All_Traffic.action) values(All_Traffic.bytes) from datamodel=Network_Traffic where All_Traffic.action !=blocked All_Traffic.dest_category !=internal (All_Traffic.protocol=icmp OR All_Traffic.transport=icmp) All_Traffic.bytes > 1000 by All_Traffic.src_ip All_Traffic.dest_ip | `drop_dm_object_name("All_Traffic")` | search ( dest_ip!=10.0.0.0/8 AND dest_ip!=172.16.0.0/12 AND dest_ip!=192.168.0.0/16) | convert ctime(earliest) ctime(latest) +search = sourcetype=aws:s3:accesslogs http_status=200 [search sourcetype=aws:s3:accesslogs http_status=200 | stats earliest(_time) as firstTime latest(_time) as lastTime by bucket_name remote_ip | inputlookup append=t previously_seen_S3_access_from_remote_ip.csv | stats min(firstTime) as firstTime, max(lastTime) as lastTime by bucket_name remote_ip | outputlookup previously_seen_S3_access_from_remote_ip.csv | eval newIP=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newIP=1 | convert ctime(firstTime) ctime(lastTime) | table bucket_name remote_ip]| iplocation remote_ip |rename remote_ip as src_ip | table _time bucket_name src_ip City Country operation request_uri + +[ESCU - WMI Permanent Event Subscription - 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 Windows event ID 5861. +action.escu.how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. +action.escu.full_search_name = ESCU - WMI Permanent Event Subscription - 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 +action.notable = 1 +action.notable.param.nes_fields = dest +action.notable.param.rule_description = This search looks for the creation of a permanent WMI event subscription via Windows event 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 +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="wineventlog:microsoft-windows-wmi-activity/operational" EventCode=5861 Binding | rex field=Message "Consumer =\s+(?[^;|^$]+)" | search consumer!="NTEventLogEventConsumer=\"SCM Event Log Consumer\"" | stats count min(_time) as firstTime max(_time) as lastTime by ComputerName, consumer, Message | `ctime(firstTime)`| `ctime(lastTime)` | rename ComputerName as dest [ESCU - Get Logon Rights Modifications For User] action.escu = 0 @@ -4390,28 +4666,54 @@ schedule_window = auto is_visible = false search = | search sourcetype=WinEventLog:Security (EventCode=4718 OR EventCode=4717) user={user} | rename user as "Account Modified" | table _time, dest, "Account Modified", Access_Right, signature -[ESCU - Identify Systems Using Remote Desktop] +[ESCU - Abnormally High AWS Instances Terminated by User - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-18 -action.escu.modification_date = 2017-09-15 +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.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. +action.escu.confidence = medium +action.escu.eli5 = In this search, we query CloudTrail logs to look for events where an instance is successfully terminated by a particular user. Since we want to detect a high number of instances terminated within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances terminated by a particular user, as well as the average- and standard-deviation values. Assign a `threshold_value` in the search. Try starting with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier to 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. We then filter out outliers with a value of 1 and show only those instance-termination events that happened within the previous 10 minutes. +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 - Abnormally High AWS Instances Terminated 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 with your AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify whether this search alerted on a human user. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Abnormally High AWS Instances Terminated by User +action.notable = 1 +action.notable.param.nes_fields = userName +action.notable.param.rule_description = An abnormally high number of instances were terminated by a user in a 10-minute window +action.notable.param.rule_title = High number of instances terminated by $userName$ +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 Instance Details by instanceId\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 - ESCU - Investigate AWS activities via region name\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.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 an abnormally high number of instances were successfully terminated by a user in a 10-minute window 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 = | 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 +search = sourcetype=aws:cloudtrail eventName=TerminateInstances errorCode=success | bucket span=10m _time | stats count AS instances_terminated by _time userName | eventstats avg(instances_terminated) as total_terminations_avg, stdev(instances_terminated) as total_terminations_stdev | eval threshold_value = 4 | eval isOutlier=if(instances_terminated > total_terminations_avg+(total_terminations_stdev * threshold_value), 1, 0) | search isOutlier=1 AND _time >= relative_time(now(), "-10m@m")| eval num_standard_deviations_away = round(abs(instances_terminated - total_terminations_avg) / total_terminations_stdev, 2) |table _time, userName, instances_terminated, num_standard_deviations_away, total_terminations_avg, total_terminations_stdev [ESCU - Scheduled Task Name Used by Dragonfly Threat Actors - Rule] action.escu = 0 @@ -4476,7 +4778,7 @@ action.escu.full_search_name = ESCU - Investigate Web Activity From src_ip 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 = ["DNS Hijacking", "Splunk Enterprise Vulnerability CVE-2018-11409", "ColdRoot MacOS RAT", "Dynamic DNS"] +action.escu.analytic_story = ["ColdRoot MacOS RAT", "Dynamic DNS", "DNS Hijacking", "Splunk Enterprise Vulnerability CVE-2018-11409"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -4500,7 +4802,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Credential Dumping", "DNS Hijacking", "DNS Amplification Attacks", "Windows Service Abuse", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Netsh Abuse", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "Suspicious MSHTA Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious Emails", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "Monitor Backup Solution", "SamSam Ransomware", "Disabling Security Tools", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Asset Tracking", "Router & Infrastructure Security", "Windows Log Manipulation", "Prohibited Traffic Allowed or Protocol Mismatch", "Dynamic DNS", "Windows Persistence Techniques", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Windows Service Abuse", "Host Redirection", "DHS Report TA18-074A", "Suspicious Windows Registry Activities", "Windows Persistence Techniques", "ColdRoot MacOS RAT", "Monitor Backup Solution", "Orangeworm Attack Group", "Unusual Processes", "DNS Amplification Attacks", "Suspicious WMI Use", "Asset Tracking", "Ransomware", "Command and Control", "Windows Privilege Escalation", "Windows Log Manipulation", "Windows File Extension and Association Abuse", "Prohibited Traffic Allowed or Protocol Mismatch", "Brand Monitoring", "SamSam Ransomware", "Data Protection", "Router & Infrastructure Security", "Malicious PowerShell", "Disabling Security Tools", "SQL Injection", "Emotet Malware (TA18-201A)", "Hidden Cobra Malware", "Suspicious Emails", "JBoss Vulnerability", "Suspicious DNS Traffic", "Spectre And Meltdown Vulnerabilities", "Credential Dumping", "Collection and Staging", "Netsh Abuse", "Account Monitoring and Controls", "Monitor for Updates", "Use of Cleartext Protocols", "Lateral Movement", "Dynamic DNS", "DNS Hijacking", "Splunk Enterprise Vulnerability", "Apache Struts Vulnerability", "Suspicious MSHTA Activity", "Monitor for Unauthorized Software"] action.escu.fields_required = ["user"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 @@ -4582,43 +4884,43 @@ 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 - Detect New Open S3 buckets - Rule] +[ESCU - Detect new API calls from user roles - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-07-25 -action.escu.modification_date = 2018-07-25 -action.escu.asset_at_risk = S3 Bucket +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 = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. -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), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. -action.escu.full_search_name = ESCU - Detect New Open S3 buckets - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} -action.escu.known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. +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 = ["Suspicious AWS S3 Activities"] +action.escu.analytic_story = ["AWS User Monitoring"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect New Open S3 buckets +action.correlationsearch.label = Detect new API calls from user roles action.notable = 1 action.notable.param.nes_fields = user -action.notable.param.rule_description = An open/public S3 bucket, $bucketName$, was created by $user$. -action.notable.param.rule_title = Public S3 bucket $bucketName$ created by $user$ -action.notable.param.security_domain = network +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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 - 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 = 70 +action.risk.param._risk_score = 10 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = user,bucketName +alert.suppress.fields = user alert.suppress.period = 86400s -cron_schedule = 5 * * * * -description = This search looks for CloudTrail events where a user has created an open/public S3 bucket. +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 @@ -4629,7 +4931,7 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype=aws:cloudtrail AllUsers eventName=PutBucketAcl | spath output=userIdentityArn path=userIdentity.arn | spath output=bucketName path=requestParameters.bucketName | spath output=aclControlList path=requestParameters.AccessControlPolicy.AccessControlList | spath input=aclControlList output=grantee path=Grant{} | mvexpand grantee | spath input=grantee | search Grantee.URI=*AllUsers | rename userIdentityArn as user| table _time, src,awsRegion Permission, Grantee.URI, bucketName, user +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 - Hiding Files And Directories With Attrib.exe - Rule] action.escu = 0 @@ -4646,7 +4948,7 @@ action.escu.mappings = {"mitre_attack": ["Defense Evasion", "Persistence"], "kil action.escu.known_false_positives = Some applications and users may legitimately use attrib.exe to interact with the files. 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", "Windows Persistence Techniques"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Windows Defense Evasion Tactics"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Hiding Files And Directories With Attrib.exe action.notable = 1 @@ -4655,7 +4957,7 @@ action.notable.param.rule_description = Attrib.exe is often used by attackers to action.notable.param.rule_title = Suspicious usage of attrib.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 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 @@ -4730,56 +5032,28 @@ 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 - AWS Cloud Provisioning From Previously Unseen IP Address - Rule] +[ESCU - Get Web Session Information via session_id] 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 = 2018-10-08 +action.escu.modification_date = 2018-10-08 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 -dispatch.latest_time = -10m@m +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 -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 = | 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 @@ -4844,7 +5118,7 @@ action.escu.full_search_name = ESCU - Investigate Network Traffic From src_ip action.escu.known_false_positives = None at this time action.escu.search_type = investigative action.escu.providing_technologies = ["Splunk Stream", "Bro", "Palo Alto Firewall"] -action.escu.analytic_story = ["Splunk Enterprise Vulnerability CVE-2018-11409", "ColdRoot MacOS RAT"] +action.escu.analytic_story = ["ColdRoot MacOS RAT", "Splunk Enterprise Vulnerability CVE-2018-11409"] action.escu.fields_required = ["src_ip"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -4871,7 +5145,7 @@ action.escu.mappings = {"mitre_attack": ["Privilege Escalation", "Persistence", action.escu.known_false_positives = There are many legitimate applications that must execute upon 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 Privilege Escalation", "Suspicious Windows Registry Activities"] +action.escu.analytic_story = ["Suspicious Windows Registry Activities", "Windows Privilege Escalation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Registry Keys Used For Privilege Escalation action.notable = 1 @@ -4880,7 +5154,7 @@ action.notable.param.rule_description = A registry key used for privilege escala action.notable.param.rule_title = Registry Key Associated With Privilege Escalation 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 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.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 @@ -4905,27 +5179,77 @@ 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 - Baseline of Network ACL Activity by ARN] +[ESCU - Get All AWS Activity From Region] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-05-21 -action.escu.modification_date = 2018-05-21 +action.escu.creation_date = 2018-03-19 +action.escu.modification_date = 2018-03-19 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.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 = support +action.escu.search_type = investigative 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 +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 = 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 +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 - 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 - AWS S3 Bucket details via bucketName] action.escu = 0 @@ -5000,6 +5324,56 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Change_Analysis where All_Changes.result_id=4720 OR All_Changes.result_id=4726 by All_Changes.result_id All_Changes.user All_Changes.dest | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` | transaction user maxspan=240m | search result_id=4720 result_id=4726 +[ESCU - Remote WMI Command Attempt - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-01-13 +action.escu.modification_date = 2018-12-03 +action.escu.asset_at_risk = Endpoint +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = Many a times, attackers leverage native Windows utilities that are designed to help administrators better manage their systems, infrastructure, and auditing, but are instead leveraged for malicious purposes. In this case, we are looking for instances of wmic.exe being run with various parameters that are not typically used by administrators. +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 - Remote WMI Command Attempt - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "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 = Administrators may use this legitimately to gather info from remote systems. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Suspicious WMI Use"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Remote WMI Command Attempt +action.notable = 1 +action.notable.param.nes_fields = dest,user,process_name +action.notable.param.rule_description = This search looks for wmic.exe being launched with parameters to operate on remote systems. +action.notable.param.rule_title = Endpoint - Remote WMI command attempt +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 = 30 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest,user,process_name +alert.suppress.period = 28800s +cron_schedule = 50 * * * * +description = This search looks for wmic.exe being launched with parameters to operate on remote systems. +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=wmic.exe AND Processes.process= */node* by Processes.user Processes.process_name Processes.parent_process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` + [ESCU - AWS Cloud Provisioning From Previously Unseen Region - Rule] action.escu = 0 action.escu.enabled = 1 @@ -5151,6 +5525,29 @@ 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 "(?\.[^\.]+)$" | search file_extension=.stubbin OR file_extension=.berkshire OR file_extension=.satoshi OR file_extension=.sophos OR file_extension=.keyxml +[ESCU - AWS Network Interface details via resourceId] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-05-07 +action.escu.modification_date = 2018-05-07 +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 configuration inputs +action.escu.full_search_name = ESCU - AWS Network Interface details via resourceId +action.escu.known_false_positives = None at this time +action.escu.search_type = contextual +action.escu.providing_technologies = ["AWS"] +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 +description = This search queries AWS configuration logs and returns the information about a specific network interface via network interface ID. The information will include the ARN of the network interface, its relationships with other AWS resources, the public and the private IP associated with the network interface. +disabled=true +realtime_schedule = 0 +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 - Investigate Successful Remote Desktop Authentications] action.escu = 0 action.escu.enabled = 1 @@ -5175,155 +5572,6 @@ 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 - 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.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Ransomware", "SamSam Ransomware"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Common Ransomware Extensions -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.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 = 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,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 -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 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 - Scheduled tasks used in BadRabbit ransomware - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-11-03 -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 execution of schtasks.exe with parameters that indicate that specific task names related to the Bad Rabbit ransomware were created or deleted. The specific task name used are rhaegal, drogon and viserion_. 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. -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 - Scheduled tasks used in BadRabbit ransomware - Rule -action.escu.mappings = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} -action.escu.known_false_positives = No known false positives -action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Ransomware"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Scheduled tasks used in BadRabbit ransomware -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 that task names specific to Bad Rabbit ransomware has been created or deleted -action.notable.param.rule_title = Scheduled tasks used in BadRabbit ransomware 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 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.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, process -alert.suppress.period = 28800s -cron_schedule = 0 * * * * -description = This search looks for flags passed to schtasks.exe on the command-line that indicate that task names related to the execution of Bad Rabbit ransomware were created or deleted. -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=*schtasks.exe (Processes.process= *create* OR Processes.process= *delete*) by Processes.parent_process Processes.process_name Processes.user | `drop_dm_object_name("")` | `ctime(firstTime)`|`ctime(lastTime)` | search (process=*rhaegal* OR process=*drogon* OR *viserion_*) - -[ESCU - EC2 Instance Started With Previously Unseen User - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-03-15 -action.escu.modification_date = 2018-03-12 -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 launches within the last hour and then appends the historical data in the lookup file to those results. It 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. -action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen User - Rule -action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} -action.escu.known_false_positives = It's possible that a user will start to create EC2 instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = EC2 Instance Started With Previously Unseen User -action.notable = 1 -action.notable.param.nes_fields = user, dest -action.notable.param.rule_description = The EC2 instance $dest$ was created by $user$. This user has never created an EC2 instance before. -action.notable.param.rule_title = EC2 Instance Created 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 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 = user, dest -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = This search looks for EC2 instances being created by users who have not created them before. -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 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 - Detect new user AWS Console Login - Rule] action.escu = 0 action.escu.enabled = 1 @@ -5373,6 +5621,55 @@ 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" +[ESCU - EC2 Instance Started With Previously Unseen User - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-03-15 +action.escu.modification_date = 2018-03-12 +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 launches within the last hour and then appends the historical data in the lookup file to those results. It 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. +action.escu.full_search_name = ESCU - EC2 Instance Started With Previously Unseen User - Rule +action.escu.mappings = {"cis20": ["CIS 1"], "nist": ["ID.AM"]} +action.escu.known_false_positives = It's possible that a user will start to create EC2 instances when they haven't before for any number of reasons. Verify with the user that is launching instances that this is the intended behavior. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = EC2 Instance Started With Previously Unseen User +action.notable = 1 +action.notable.param.nes_fields = user, dest +action.notable.param.rule_description = The EC2 instance $dest$ was created by $user$. This user has never created an EC2 instance before. +action.notable.param.rule_title = EC2 Instance Created 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 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 = user, dest +alert.suppress.period = 14400s +cron_schedule = 0 * * * * +description = This search looks for EC2 instances being created by users who have not created them before. +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 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 - Previously seen command line arguments] action.escu = 0 action.escu.enabled = 1 @@ -5385,7 +5682,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Hidden Cobra Malware", "DHS Report TA18-074A"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "DHS Report TA18-074A", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Hidden Cobra Malware"] 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 @@ -5395,44 +5692,43 @@ schedule_window = auto is_visible = false search = sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational process=cmd.exe cmdline="* /c *" | stats earliest(_time) as firstTime latest(_time) as lastTime by cmdline | outputlookup previously_seen_cmd_line_arguments | stats count -[ESCU - Remote WMI Command Attempt - Rule] +[ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-01-13 -action.escu.modification_date = 2018-12-03 -action.escu.asset_at_risk = Endpoint +action.escu.creation_date = 2018-08-28 +action.escu.modification_date = 2018-08-28 +action.escu.asset_at_risk = Windows action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = Many a times, attackers leverage native Windows utilities that are designed to help administrators better manage their systems, infrastructure, and auditing, but are instead leveraged for malicious purposes. In this case, we are looking for instances of wmic.exe being run with various parameters that are not typically used by administrators. -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 - Remote WMI Command Attempt - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Windows Management Instrumentation"], "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 = Administrators may use this legitimately to gather info from remote systems. +action.escu.eli5 = This search looks for Windows Event Code 4663 (object access), where the process performing the access is PowerShell.exe, the target process of the access is lsass.exe, and the access mask is given as 0x10. This is consistent with the use of PowerShell to execute Mimikatz using sekurlsa::logonpasswords. It will return the host where the activity occurred, the process and associated id, the enabled privilege, and the message in the event. +action.escu.how_to_implement = You must be ingesting Windows Security logs. You must also enable the account change auditing here: http://docs.splunk.com/Documentation/Splunk/7.0.2/Data/MonitorWindowseventlogdata. Additionally, this search requires you to enable your Group Management Audit Logs in your Local Windows Security Policy and to be ingesting those logs. More information on how to enable them can be found here: http://whatevernetworks.com/auditing-group-membership-changes-in-active-directory/. Finally, please make sure that the local administrator group name is "Administrators" to be able to look for the right group membership changes. +action.escu.full_search_name = ESCU - Detect Mimikatz Via PowerShell And EventCode 4663 - 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 = The activity may be legitimate. PowerShell is often used by administrators to perform various tasks, and it's possible this event could be generated in those cases. In these cases, false positives should be fairly obvious and you may need to tweak the search to eliminate noise. action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Suspicious WMI Use"] +action.escu.providing_technologies = ["Microsoft Windows"] +action.escu.analytic_story = ["Credential Dumping"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Remote WMI Command Attempt +action.correlationsearch.label = Detect Mimikatz Via PowerShell And EventCode 4663 action.notable = 1 -action.notable.param.nes_fields = dest,user,process_name -action.notable.param.rule_description = This search looks for wmic.exe being launched with parameters to operate on remote systems. -action.notable.param.rule_title = Endpoint - Remote WMI command attempt -action.notable.param.security_domain = endpoint +action.notable.param.nes_fields = user, dest +action.notable.param.rule_description = Possible attempt at credential dumping via PowerShell was detected on $dest$ by $user$. +action.notable.param.rule_title = Event ID 4663 Specifying PowerShell Reading From LSASS.exe Identified on $dest$. +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 Process Info\n - ESCU - Get Sysmon WMI Activity for 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 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 = 30 +action.risk.param._risk_score = 40 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest,user,process_name -alert.suppress.period = 28800s -cron_schedule = 50 * * * * -description = This search looks for wmic.exe being launched with parameters to operate on remote systems. +alert.suppress.fields = user, dest, process +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = This search looks for PowerShell reading lsass memory consistent with credential dumping. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -5443,7 +5739,7 @@ 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=wmic.exe AND Processes.process= */node* by Processes.user Processes.process_name Processes.parent_process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` +search = sourcetype=wineventlog:security EventCode=4663 Process_Name=*powershell.exe Object_Name=*lsass.exe Access_Mask=0x10 | stats count min(_time) as firstTime max(_time) as lastTime by dest, Process_Name, Process_ID, Message | rename Process_Name as process | `ctime(firstTime)`| `ctime(lastTime)` [ESCU - Registry Keys for Creating SHIM Databases - Rule] action.escu = 0 @@ -5495,29 +5791,6 @@ 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", "Credential Dumping", "DNS Hijacking", "Suspicious AWS EC2 Activities", "Suspicious Command-Line Executions", "Windows Service Abuse", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Suspicious AWS S3 Activities", "Netsh Abuse", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "Suspicious MSHTA Activity", "AWS Network ACL Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious Emails", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "SamSam Ransomware", "Disabling Security Tools", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Asset Tracking", "Windows Defense Evasion Tactics", "Router & Infrastructure Security", "Windows Log Manipulation", "Dynamic DNS", "Suspicious AWS Login Activities", "Windows Persistence Techniques", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] -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 @@ -5534,7 +5807,7 @@ action.escu.mappings = {"mitre_attack": ["Exfiltration", "Command and Control", action.escu.known_false_positives = Legitimate DNS activity can be detected in this search. Investigate, verify and update the list of authorized DNS servers as appropriate. action.escu.search_type = detection action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["DNS Hijacking", "Command and Control", "Suspicious DNS Traffic"] +action.escu.analytic_story = ["Command and Control", "Suspicious DNS Traffic", "DNS Hijacking"] action.correlationsearch.enabled = 1 action.correlationsearch.label = DNS Query Requests Resolved by Unauthorized DNS Servers action.notable = 1 @@ -5543,7 +5816,7 @@ action.notable.param.rule_description = The table represents a list of unauthori action.notable.param.rule_title = DNS requests resolved by unauthorized DNS 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 - ESCU - Get DNS Server History for a host\n - ESCU - Get DNS traffic ratio\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 - 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 DNS Server History for a host\n - ESCU - Get DNS traffic ratio\n - ESCU - Get History Of Email Sources\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 @@ -5615,6 +5888,56 @@ schedule_window = auto is_visible = false search = |tstats `summariesonly` values(All_Email.dest) as dest values(All_Email.recipient) as recepient min(_time) as firstTime max(_time) as lastTime count from datamodel=Email.All_Email by All_Email.src |`drop_dm_object_name(All_Email)` | `ctime(firstTime)` | `ctime(lastTime)` +[ESCU - Shim Database File Creation - 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.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.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] +action.escu.analytic_story = ["Windows Persistence Techniques"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Shim Database File Creation +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.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 = 20 +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 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 +counttype = number of events +relation = greater than +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 - Script Execution via WMI - Rule] action.escu = 0 action.escu.enabled = 1 @@ -5713,66 +6036,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 - 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 @@ -5782,7 +6083,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", "Windows Service Abuse", "Host Redirection", "DHS Report TA18-074A", "Suspicious Windows Registry Activities", "Windows Persistence Techniques", "ColdRoot MacOS RAT", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Unusual Processes", "Suspicious WMI Use", "Asset Tracking", "Ransomware", "Command and Control", "Windows Privilege Escalation", "Windows Log Manipulation", "Windows File Extension and Association Abuse", "Prohibited Traffic Allowed or Protocol Mismatch", "Brand Monitoring", "SamSam Ransomware", "Data Protection", "Router & Infrastructure Security", "Malicious PowerShell", "Disabling Security Tools", "SQL Injection", "Windows Defense Evasion Tactics", "Emotet Malware (TA18-201A)", "Hidden Cobra Malware", "Suspicious Emails", "JBoss Vulnerability", "Suspicious DNS Traffic", "Spectre And Meltdown Vulnerabilities", "Credential Dumping", "Collection and Staging", "Netsh Abuse", "Account Monitoring and Controls", "Monitor for Updates", "Lateral Movement", "Dynamic DNS", "DNS Hijacking", "Splunk Enterprise Vulnerability", "Apache Struts Vulnerability", "Suspicious MSHTA Activity", "Monitor for Unauthorized Software"] +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 @@ -5920,7 +6245,7 @@ action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["In action.escu.known_false_positives = Some legitimate processes may be only rarely executed in your environment. As these are identified, update `rare_process_whitelist_local.csv` to filter them out of your search results. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Emotet Malware (TA18-201A)", "Unusual Processes"] +action.escu.analytic_story = ["Unusual Processes", "Emotet Malware (TA18-201A)"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect Rare Executables action.notable = 1 @@ -5929,7 +6254,7 @@ action.notable.param.rule_description = The process $process$ was detected runni action.notable.param.rule_title = Rare Process $process$ 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 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 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 @@ -5954,28 +6279,55 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count values(Processes.dest) as dest values(Processes.user) as user min(_time) as firstTime max(_time) as lastTime from datamodel=Endpoint.Processes by Processes.process_name | rename Processes.process_name as process | rex field=user "(?.*)\\\\(?.*)" | `ctime(firstTime)`| `ctime(lastTime)`| search [| tstats count from datamodel=Endpoint.Processes by Processes.process_name | rare Processes.process_name limit=30 | rename Processes.process_name as process| `filter_rare_process_whitelist`| table process ] -[ESCU - AWS Network Interface details via resourceId] +[ESCU - Detect Large Outbound ICMP Packets - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-05-07 -action.escu.modification_date = 2018-05-07 +action.escu.creation_date = 2018-06-01 +action.escu.modification_date = 2018-06-01 +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 configuration inputs -action.escu.full_search_name = ESCU - AWS Network Interface details via resourceId -action.escu.known_false_positives = None at this time -action.escu.search_type = contextual -action.escu.providing_technologies = ["AWS"] -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 -description = This search queries AWS configuration logs and returns the information about a specific network interface via network interface ID. The information will include the ARN of the network interface, its relationships with other AWS resources, the public and the private IP associated with the network interface. +action.escu.confidence = medium +action.escu.eli5 = This search works by looking at fields in the Network_Traffic data model, which is populated by various firewalls and passive networking monitoring technologies. Specifically, the search looks for ICMP packets larger than 1,000 bytes with a destination that is external to your organization. +action.escu.how_to_implement = In order to run this search effectively, we highly recommend that you leverage the Assets and Identity framework. It is important that you have a good understanding of how your network segments are designed and that you are able to distinguish internal from external address space. Add a category named `internal` to the CIDRs that host the company's assets in the `assets_by_cidr.csv` lookup file, which is located in `$SPLUNK_HOME/etc/apps/SA-IdentityManagement/lookups/`. More information on updating this lookup can be found here: https://docs.splunk.com/Documentation/ES/5.0.0/Admin/Addassetandidentitydata. This search also requires you to be ingesting your network traffic and populating the Network_Traffic data model +action.escu.data_models = ["Network_Traffic"] +action.escu.full_search_name = ESCU - Detect Large Outbound ICMP Packets - Rule +action.escu.mappings = {"mitre_attack": ["Command and Control", "Standard Non-Application Layer Protocol"], "kill_chain_phases": ["Command and Control"], "cis20": ["CIS 9", "CIS 12"], "nist": ["DE.AE"]} +action.escu.known_false_positives = ICMP packets are used in a variety of ways to help troubleshoot networking issues and ensure the proper flow of traffic. As such, it is possible that a large ICMP packet could be perfectly legitimate. If large ICMP packets are associated with command and control traffic, there will typically be a large number of these packets observed over time. If the search is providing a large number of false positives, you can modify the search to adjust the byte threshold or whitelist specific IP addresses, as necessary. +action.escu.search_type = detection +action.escu.providing_technologies = ["Bro", "Splunk Stream", "Palo Alto Firewall"] +action.escu.analytic_story = ["Command and Control"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect Large Outbound ICMP Packets +action.notable = 1 +action.notable.param.nes_fields = src_ip, dest_ip +action.notable.param.rule_description = Large outbound ICMP packet detected. +action.notable.param.rule_title = Large ICMP packet from $src_ip$ to $dest_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.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 = 50 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = src_ip +alert.suppress.period = 28800s +cron_schedule = 0 * * * * +description = This search looks for outbound ICMP packets with a packet size larger than 1,000 bytes. Various threat actors have been known to use ICMP as a command and control channel for their attack infrastructure. Large ICMP packets from an endpoint to a remote host may be indicative of this activity. +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:config resourceId={resourceId} | table _time ARN relationships{}.resourceType relationships{}.name relationships{}.resourceId configuration.privateIpAddresses{}.privateIpAddress configuration.privateIpAddresses{}.association.publicIp +search = | tstats `summariesonly` count earliest(_time) as earliest latest(_time) as latest values(All_Traffic.action) values(All_Traffic.bytes) from datamodel=Network_Traffic where All_Traffic.action !=blocked All_Traffic.dest_category !=internal (All_Traffic.protocol=icmp OR All_Traffic.transport=icmp) All_Traffic.bytes > 1000 by All_Traffic.src_ip All_Traffic.dest_ip | `drop_dm_object_name("All_Traffic")` | search ( dest_ip!=10.0.0.0/8 AND dest_ip!=172.16.0.0/12 AND dest_ip!=192.168.0.0/16) | convert ctime(earliest) ctime(latest) [ESCU - Monitor Web Traffic For Brand Abuse - Rule] action.escu = 0 @@ -6027,55 +6379,6 @@ 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` -[ESCU - Detect PsExec With accepteula Flag - Rule] -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.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 = ["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 = 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 - EC2 Instance Started With Previously Unseen Instance Type - Rule] action.escu = 0 action.escu.enabled = 1 @@ -6125,6 +6428,28 @@ 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 @@ -6140,7 +6465,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 Service Abuse", "Orangeworm Attack Group", "DHS Report TA18-074A", "Disabling Security Tools", "Windows Persistence Techniques"] +action.escu.analytic_story = ["Windows Service Abuse", "DHS Report TA18-074A", "Windows Persistence Techniques", "Orangeworm Attack Group", "Disabling Security Tools"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Sc.exe Manipulating Windows Services action.notable = 1 @@ -6240,7 +6565,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 @@ -6249,7 +6574,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 @@ -6309,7 +6634,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 EC2 Activities", "Suspicious AWS S3 Activities", "AWS Network ACL Activity", "Unusual AWS EC2 Modifications", "Suspicious AWS Login Activities"] +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "Suspicious AWS Login Activities", "AWS Network ACL Activity", "Suspicious AWS S3 Activities", "Unusual AWS EC2 Modifications"] action.escu.fields_required = ["arn"] action.escu.earliest_time_offset = 14400 action.escu.latest_time_offset = 0 @@ -6320,95 +6645,45 @@ 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 - Large Volume of DNS ANY Queries - Rule] +[ESCU - Schtasks used for forcing a reboot - 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.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.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Bro"] -action.escu.analytic_story = ["DNS Amplification Attacks"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Large Volume of DNS ANY Queries -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.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.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 = 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.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 = ["Sysmon"] -action.escu.analytic_story = ["Collection and Staging"] +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Windows Persistence Techniques", "Ransomware"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Suspicious writes to windows Recycle Bin +action.correlationsearch.label = Schtasks used for forcing a reboot 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.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.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.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._risk_score = 80 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest -alert.suppress.period = 86400s +alert.suppress.fields = dest, cmdline +alert.suppress.period = 28800s cron_schedule = 0 * * * * -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 +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 @@ -6417,7 +6692,30 @@ 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 = (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 - 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 [ESCU - Get Email Info] action.escu = 0 @@ -6455,7 +6753,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", "Monitor Backup Solution", "SamSam Ransomware"] +action.escu.analytic_story = ["Monitor Backup Solution", "Ransomware", "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 @@ -6487,55 +6785,6 @@ 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 Terminated 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 terminated by a particular user. Since we want to detect a high number of instances terminated within a short period, we create event buckets for 10-minute windows. We then calculate the total number of instances terminated by a particular user, as well as the average- and standard-deviation values. Assign a `threshold_value` in the search. Try starting with 3 (but it will likely need to be tweaked for your environment). The `eval` function will set the outlier to 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. We then filter out outliers with a value of 1 and show only those instance-termination events that happened within the previous 10 minutes. -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 - Abnormally High AWS Instances Terminated 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 with your AWS infrastructure are known to exhibit this behavior. Please adjust the threshold values and filter out service accounts from the output. Always verify whether this search alerted on a human user. -action.escu.search_type = detection -action.escu.providing_technologies = ["AWS"] -action.escu.analytic_story = ["Suspicious AWS EC2 Activities"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Abnormally High AWS Instances Terminated by User -action.notable = 1 -action.notable.param.nes_fields = userName -action.notable.param.rule_description = An abnormally high number of instances were terminated by a user in a 10-minute window -action.notable.param.rule_title = High number of instances terminated by $userName$ -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 Instance Details by instanceId\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 - ESCU - Investigate AWS activities via region name\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.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 an abnormally high number of instances were successfully terminated by a user in a 10-minute window -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=TerminateInstances errorCode=success | bucket span=10m _time | stats count AS instances_terminated by _time userName | eventstats avg(instances_terminated) as total_terminations_avg, stdev(instances_terminated) as total_terminations_stdev | eval threshold_value = 4 | eval isOutlier=if(instances_terminated > total_terminations_avg+(total_terminations_stdev * threshold_value), 1, 0) | search isOutlier=1 AND _time >= relative_time(now(), "-10m@m")| eval num_standard_deviations_away = round(abs(instances_terminated - total_terminations_avg) / total_terminations_stdev, 2) |table _time, userName, instances_terminated, num_standard_deviations_away, total_terminations_avg, total_terminations_stdev - [ESCU - Extended Period Without Successful Netbackup Backups - Rule] action.escu = 0 action.escu.enabled = 1 @@ -6585,44 +6834,66 @@ 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 - Email files written outside of the Outlook directory - Rule] +[ESCU - AWS Network ACL Details from ID] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-12-13 -action.escu.modification_date = 2018-11-02 +action.escu.creation_date = 2018-01-18 +action.escu.modification_date = 2017-01-22 +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 +disabled=true +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{}.* + +[ESCU - Detect PsExec With accepteula Flag - Rule] +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.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.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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Collection and Staging"] +action.escu.providing_technologies = ["Sysmon"] +action.escu.analytic_story = ["DHS Report TA18-074A", "SamSam Ransomware"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Email files written outside of the Outlook directory +action.correlationsearch.label = Detect PsExec With accepteula Flag 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.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.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 = 50 +action.risk.param._risk_score = 75 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest, file_path +alert.suppress.fields = dest, parent_process 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. +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 @@ -6633,30 +6904,7 @@ 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 - Get EC2 Instance Details by instanceId] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-02-12 -action.escu.modification_date = 2018-02-12 -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 = ["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 -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 @@ -6707,50 +6955,55 @@ schedule_window = auto is_visible = false search = sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational services | search (EventCode=12 OR EventCode=13) process=reg.exe object_path=*\\services\\* | stats count values(object_path) as object_path min(_time) as firstTime max(_time) as lastTime by dest process | `ctime(firstTime)` |`ctime(lastTime)` -[ESCU - Baseline of API Calls per User ARN] +[ESCU - Scheduled tasks used in BadRabbit ransomware - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-09 -action.escu.modification_date = 2018-04-09 +action.escu.creation_date = 2017-11-03 +action.escu.modification_date = 2018-11-15 +action.escu.asset_at_risk = Endpoint 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 +action.escu.confidence = medium +action.escu.eli5 = The search looks for execution of schtasks.exe with parameters that indicate that specific task names related to the Bad Rabbit ransomware were created or deleted. The specific task name used are rhaegal, drogon and viserion_. 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. +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 - Scheduled tasks used in BadRabbit ransomware - Rule +action.escu.mappings = {"mitre_attack": ["Persistence", "Lateral Movement", "Execution", "Scheduled Task"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 3"], "nist": ["PR.IP"]} +action.escu.known_false_positives = No known false positives +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Ransomware"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Scheduled tasks used in BadRabbit ransomware +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 that task names specific to Bad Rabbit ransomware has been created or deleted +action.notable.param.rule_title = Scheduled tasks used in BadRabbit ransomware 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 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.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, process +alert.suppress.period = 28800s +cron_schedule = 0 * * * * +description = This search looks for flags passed to schtasks.exe on the command-line that indicate that task names related to the execution of Bad Rabbit ransomware were created or deleted. +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 | 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 - Investigate AWS activities via region name] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-02-09 -action.escu.modification_date = 2018-02-09 -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 - 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.fields_required = ["awsRegion"] -action.escu.earliest_time_offset = 14400 -action.escu.latest_time_offset = 0 -description = This search lists all the user activities logged by CloudTrail for a specific region in question and will create a table of the values of parameters requested, the type of the event and the response from the AWS API by each user -disabled=true -realtime_schedule = 0 -schedule_window = auto -is_visible = false -search = | search sourcetype=aws:cloudtrail awsRegion={awsRegion}| rename requestParameters.instancesSet.items{}.instanceId as instanceId| stats values(eventName) by userName instanceId +search = | tstats `summariesonly` count min(_time) values(Processes.process) as process max(_time) as lastTime from datamodel=Endpoint.Processes where Processes.process_name=*schtasks.exe (Processes.process= *create* OR Processes.process= *delete*) by Processes.parent_process Processes.process_name Processes.user | `drop_dm_object_name("")` | `ctime(firstTime)`|`ctime(lastTime)` | search (process=*rhaegal* OR process=*drogon* OR *viserion_*) [ESCU - AWS Cloud Provisioning From Previously Unseen Country - Rule] action.escu = 0 @@ -6803,44 +7056,43 @@ 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 Country | eval newCountry=if(firstTime >= relative_time(now(), "-70m@m"), 1, 0) | where newCountry=1 | table Country] | spath output=user userIdentity.arn | rename sourceIPAddress as src_ip | table _time, user, src_ip, Country, eventName, errorCode -[ESCU - Processes created by netsh - Rule] +[ESCU - Suspicious Java Classes - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-01-04 -action.escu.modification_date = 2018-11-02 +action.escu.creation_date = 2018-12-06 +action.escu.modification_date = 2018-12-06 action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU action.escu.confidence = medium -action.escu.eli5 = This search looks for all processes with the parent process "c:\Windows\System32\netsh.exe" and returns the process, the command line used to execute it, the host name, and the user context under which it ran. -action.escu.how_to_implement = To successfully implement this search, you must be ingesting logs with the process name, command-line arguments, and parent processes from your endpoints. 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 - Processes created by netsh - Rule -action.escu.mappings = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} -action.escu.known_false_positives = It is unusual for netsh.exe to have any child processes in most environments. It makes sense to investigate the child process and verify whether the process spawned is legitimate. +action.escu.eli5 = The search leverages HTTP form data from typically POST events that can be captured with Splunk streams or similar wire data capture tools. The search looks for java classes like `processbuilder` and `runtime` are used to create a new process and execute commands inside java, and are synonymous with spawning a shell. There are very exceptional reasons to ever these classes in Java via an HTTP API and hence when seen are highly suspicious. Also, this is a common vectors leverage to exploit Apache Struts. +action.escu.how_to_implement = In order to properly run this search, Splunk needs to ingest data from your web-traffic appliances that serve or sit in the path of your Struts application servers. This can be accomplished by indexing data from a web proxy, or by using network traffic-analysis tools, such as Splunk Stream or Bro. +action.escu.full_search_name = ESCU - Suspicious Java Classes - Rule +action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 7", "CIS 12"], "nist": ["DE.AE"]} +action.escu.known_false_positives = There are no known false positives. action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Netsh Abuse"] +action.escu.providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Apache"] +action.escu.analytic_story = ["Apache Struts Vulnerability"] action.correlationsearch.enabled = 1 -action.correlationsearch.label = Processes created by netsh +action.correlationsearch.label = Suspicious Java Classes action.notable = 1 -action.notable.param.nes_fields = dest, process, parent_process -action.notable.param.rule_description = A process, $process$, is spawned by netsh.exe. It is highly unlikely for netsh to have any child processes. -action.notable.param.rule_title = Process spawned by netsh.exe detected on $dest$ -action.notable.param.security_domain = endpoint +action.notable.param.nes_fields = src, url, http_user_agent +action.notable.param.rule_description = The host $src$ with user agent $http_user_agent$ is sending web traffic to $url$, which contains suspicious Java classes. These classes may be indicative of remote code execution in Java frameworks, such as Apache Struts. +action.notable.param.rule_title = Suspicious Java Classes: Possible RCE against Struts or similar Java framework from $src$ +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 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 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 - Investigate Suspicious Strings in HTTP Header\n - ESCU - Investigate Web POSTs From src\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 = 50 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = dest, process -alert.suppress.period = 86400s +alert.suppress.fields = src, url, http_user_agent +alert.suppress.period = 3600s cron_schedule = 0 * * * * -description = This search looks for processes launching netsh.exe to execute various commands via the netsh command-line utility. Netsh.exe is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running. Netsh can be used as a persistence proxy technique to execute a helper .dll when netsh.exe is executed. In this search, we are looking for processes spawned by netsh.exe that are executing commands via the command line. +description = This search looks for suspicious Java classes that are often used to exploit remote command execution in common Java frameworks, such as Apache Struts. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -6851,56 +7103,29 @@ quantity = 0 realtime_schedule = 0 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)` +search = sourcetype="stream:http" http_method=POST http_content_length>1 | regex form_data="(?i)java\.lang\.(?:runtime|processbuilder)" | rename src_ip as src | stats count earliest(_time) as firstTime, latest(_time) as lastTime, values(url) as uri, values(status) as status, values(http_user_agent) as http_user_agent by src, dest | convert 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.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.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Palo Alto Firewall", "Bro"] -action.escu.analytic_story = ["Web Fraud Detection"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Web Fraud - Account Harvesting -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.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.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_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 +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 -enableSched = 1 -counttype = number of events -relation = greater than -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 +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 - Investigate Web Activity From Host] action.escu = 0 @@ -6915,7 +7140,7 @@ 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 = ["Credential Dumping", "Suspicious Command-Line Executions", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Netsh Abuse", "Host Redirection", "Orangeworm Attack Group", "Suspicious Emails", "Unusual Processes", "Monitor for Unauthorized Software", "SamSam Ransomware"] +action.escu.analytic_story = ["Host Redirection", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Unusual Processes", "Ransomware", "Brand Monitoring", "SamSam Ransomware", "Emotet Malware (TA18-201A)", "Suspicious Emails", "Credential Dumping", "Netsh Abuse", "Monitor for Unauthorized Software"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 3600 action.escu.latest_time_offset = 3600 @@ -6926,28 +7151,28 @@ schedule_window = auto is_visible = false search = | from datamodel Web.Web | search src={dest} -[ESCU - Add Prohibited Processes to Enterprise Security] +[ESCU - Get All AWS Activity From City] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-27 -action.escu.modification_date = 2017-09-15 +action.escu.creation_date = 2018-03-19 +action.escu.modification_date = 2018-03-19 action.escu.channel = ESCU -action.escu.eli5 = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. -action.escu.how_to_implement = This search should be run on each new install of ESCU. -action.escu.data_models = [] -action.escu.full_search_name = ESCU - Add Prohibited Processes to Enterprise Security +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 = support -action.escu.providing_technologies = ["Splunk Enterprise Security"] -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 +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 = | inputlookup interesting_processes_lookup | search note!=ESCU* | inputlookup append=T prohibitedProcesses_lookup | fillnull value=* dest dest_pci_domain | fillnull value=false is_required is_secure | fillnull value=true is_prohibited | outputlookup interesting_processes_lookup | stats count +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 - Monitor Email For Brand Abuse - Rule] action.escu = 0 @@ -7071,29 +7296,54 @@ 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 - Get Authentication Logs For Endpoint] +[ESCU - Schtasks scheduling job on remote system - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-04-10 -action.escu.modification_date = 2017-11-01 +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.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", "Credential Dumping", "DNS Hijacking", "Suspicious Command-Line Executions", "Windows Service Abuse", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Netsh Abuse", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "Suspicious MSHTA Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious Emails", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "SamSam Ransomware", "Disabling Security Tools", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Asset Tracking", "Windows Defense Evasion Tactics", "Router & Infrastructure Security", "Windows Log Manipulation", "Prohibited Traffic Allowed or Protocol Mismatch", "Dynamic DNS", "Windows Persistence Techniques", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] -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. +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.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Lateral Movement"] +action.correlationsearch.enabled = 1 +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 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 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 = 50 +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 +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 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 @@ -7195,54 +7445,31 @@ 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] +[ESCU - Attempt To Stop Security Service - 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 - Suspicious Java Classes - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2018-12-06 -action.escu.modification_date = 2018-12-06 +action.escu.creation_date = 2018-04-09 +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 leverages HTTP form data from typically POST events that can be captured with Splunk streams or similar wire data capture tools. The search looks for java classes like `processbuilder` and `runtime` are used to create a new process and execute commands inside java, and are synonymous with spawning a shell. There are very exceptional reasons to ever these classes in Java via an HTTP API and hence when seen are highly suspicious. Also, this is a common vectors leverage to exploit Apache Struts. -action.escu.how_to_implement = In order to properly run this search, Splunk needs to ingest data from your web-traffic appliances that serve or sit in the path of your Struts application servers. This can be accomplished by indexing data from a web proxy, or by using network traffic-analysis tools, such as Splunk Stream or Bro. -action.escu.full_search_name = ESCU - Suspicious Java Classes - Rule -action.escu.mappings = {"mitre_attack": ["Execution"], "kill_chain_phases": ["Exploitation"], "cis20": ["CIS 7", "CIS 12"], "nist": ["DE.AE"]} -action.escu.known_false_positives = There are no known false positives. +action.escu.confidence = high +action.escu.eli5 = This search looks for the processes **net.exe** and **sc.exe** with a parameter of `"stop"`. It then searches a list of security-related services included in a lookup file for matches on the command line. Results are subsequently returned in table format. The included lookup file can be modified to update the services to monitor. +action.escu.how_to_implement = You must 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. The search is shipped with a lookup file, `security_services.csv`, that can be edited to update the list of services to monitor. This lookup file can be edited directly where it lives in `$SPLUNK_HOME/etc/apps/DA-ESS-ContentUpdate/lookups`, or via the Splunk console. You should add the names of services an attacker might use on the command line and surround with asterisks (*****), so that they work properly when searching the command line. The file should be updated with the names of any services you would like to monitor for attempts to stop the service., +action.escu.full_search_name = ESCU - Attempt To Stop Security Service - 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 = None identified. Attempts to disable security-related services should be identified and understood. action.escu.search_type = detection -action.escu.providing_technologies = ["Splunk Stream", "Bro", "Bluecoat", "Apache"] -action.escu.analytic_story = ["Apache Struts Vulnerability"] +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 = Suspicious Java Classes +action.correlationsearch.label = Attempt To Stop Security Service action.notable = 1 -action.notable.param.nes_fields = src, url, http_user_agent -action.notable.param.rule_description = The host $src$ with user agent $http_user_agent$ is sending web traffic to $url$, which contains suspicious Java classes. These classes may be indicative of remote code execution in Java frameworks, such as Apache Struts. -action.notable.param.rule_title = Suspicious Java Classes: Possible RCE against Struts or similar Java framework from $src$ -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 - Investigate Suspicious Strings in HTTP Header\n - ESCU - Investigate Web POSTs From src\n"} +action.notable.param.nes_fields = dest, process, user +action.notable.param.rule_description = Attempt to stop a security-related service on $dest$ +action.notable.param.rule_title = Attempt to Stop Security Service 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"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = src @@ -7251,10 +7478,10 @@ action.risk.param._risk_score = 50 action.risk.param.verbose = 0 alert.digest_mode = 1 alert.suppress = 1 -alert.suppress.fields = src, url, http_user_agent -alert.suppress.period = 3600s +alert.suppress.fields = dest, user +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = This search looks for suspicious Java classes that are often used to exploit remote command execution in common Java frameworks, such as Apache Struts. +description = This search looks for attempts to stop security-related services on the endpoint. dispatch.earliest_time = -70m@m dispatch.latest_time = -10m@m disabled=true @@ -7265,31 +7492,80 @@ quantity = 0 realtime_schedule = 0 schedule_window = auto is_visible = false -search = sourcetype="stream:http" http_method=POST http_content_length>1 | regex form_data="(?i)java\.lang\.(?:runtime|processbuilder)" | rename src_ip as src | stats count earliest(_time) as firstTime, latest(_time) as lastTime, values(url) as uri, values(status) as status, values(http_user_agent) as http_user_agent by src, dest | convert ctime(firstTime) ctime(lastTime) +search = sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational (process=net.exe OR process=sc.exe) cmdline="* stop *" | lookup security_services_lookup service as cmdline OUTPUTNEW category, description | search category=security | table _time, dest, user, parent_process, cmdline, description -[ESCU - Get First Occurrence and Last Occurrence of a MAC Address] +[ESCU - Processes created by netsh - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2017-06-14 -action.escu.modification_date = 2017-09-13 +action.escu.creation_date = 2018-01-04 +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 = 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.confidence = medium +action.escu.eli5 = This search looks for all processes with the parent process "c:\Windows\System32\netsh.exe" and returns the process, the command line used to execute it, the host name, and the user context under which it ran. +action.escu.how_to_implement = To successfully implement this search, you must be ingesting logs with the process name, command-line arguments, and parent processes from your endpoints. 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 - Processes created by netsh - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Command-Line Interface", "Persistence"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 8"], "nist": ["PR.PT", "DE.CM"]} +action.escu.known_false_positives = It is unusual for netsh.exe to have any child processes in most environments. It makes sense to investigate the child process and verify whether the process spawned is legitimate. +action.escu.search_type = detection +action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] +action.escu.analytic_story = ["Netsh Abuse"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Processes created by netsh +action.notable = 1 +action.notable.param.nes_fields = dest, process, parent_process +action.notable.param.rule_description = A process, $process$, is spawned by netsh.exe. It is highly unlikely for netsh to have any child processes. +action.notable.param.rule_title = Process spawned by 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 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 = 50 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = dest, process +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = This search looks for processes launching netsh.exe to execute various commands via the netsh command-line utility. Netsh.exe is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running. Netsh can be used as a persistence proxy technique to execute a helper .dll when netsh.exe is executed. In this search, we are looking for processes spawned by netsh.exe that are executing commands via 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 = | 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 - Add Prohibited Processes to Enterprise Security] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2017-06-27 +action.escu.modification_date = 2017-09-15 +action.escu.channel = ESCU +action.escu.eli5 = This search outputs the interesting processes lookup table and filters out all processes in the table that haven't already been inserted by ESCU. It then appends to those results all the processes currently identified by ESCU that should be prohibited. Next, it fills in the required fields with processes identified by ESCU, and then writes the results back to the interesting process lookup table. This is done so any new processes identified that should be prohibited will be added to the lookup table without creating any duplicate entries. +action.escu.how_to_implement = This search should be run on each new install of ESCU. +action.escu.data_models = [] +action.escu.full_search_name = ESCU - Add Prohibited Processes to Enterprise Security 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. +action.escu.search_type = support +action.escu.providing_technologies = ["Splunk Enterprise Security"] +action.escu.analytic_story = ["SamSam Ransomware", "Monitor for Unauthorized Software"] +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 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)` +search = | inputlookup interesting_processes_lookup | search note!=ESCU* | inputlookup append=T prohibitedProcesses_lookup | fillnull value=* dest dest_pci_domain | fillnull value=false is_required is_secure | fillnull value=true is_prohibited | outputlookup interesting_processes_lookup | stats count [ESCU - Monitor DNS For Brand Abuse - Rule] action.escu = 0 @@ -7341,55 +7617,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 - Suspicious File Write - Rule] +[ESCU - Get First Occurrence and Last Occurrence of a MAC Address] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-06-14 -action.escu.modification_date = 2018-11-14 -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 = high -action.escu.eli5 = This search looks at files being created or modified in the Endpoint file-system data model. The names of those files are checked against an included lookup file, which contains the names of files associated with malware or attack activity. The search returns any files with matching names, along with a note (also specified in the lookup file) that gives or points to more information about the files. -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. This is typically populated via endpoint detection-and-response products, such as Carbon Black, or via other endpoint data sources, such as Sysmon. The data used for this search is typically generated via logs that report file system reads and writes. In addition, this search leverages an included lookup file that contains the names of the files to watch for, as well as a note to communicate why that file name is being monitored. This lookup file can be edited to add or remove file the file names you want to monitor. -action.escu.data_models = ["Endpoint"] -action.escu.full_search_name = ESCU - Suspicious File Write - 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's possible for a legitimate file to be created with the same name as one noted in the lookup file. Filenames listed in the lookup file should be unique enough that collisions are rare. Looking at the location of the file and the process responsible for the activity can help determine whether or not the activity is legitimate. -action.escu.search_type = detection -action.escu.providing_technologies = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon"] -action.escu.analytic_story = ["Hidden Cobra Malware"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Suspicious File Write -action.notable = 1 -action.notable.param.nes_fields = dest, file_name -action.notable.param.rule_description = A write to a filename associated with malicious activity detected on $dest$. -action.notable.param.rule_title = Suspicious File Write 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 Outbound Emails to Hidden Cobra Threat Actors\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,file_name -alert.suppress.period = 14400s -cron_schedule = 0 * * * * -description = The search looks for files created with names that have been linked to malicious activity. -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 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)` +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 @@ -7463,55 +7713,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 @@ -7585,6 +7786,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 - Malicious PowerShell Process - Encoded Command - Rule] action.escu = 0 action.escu.enabled = 1 @@ -7725,78 +7976,49 @@ 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 -[ESCU - AWS Network ACL Details from ID] +[ESCU - Previously Seen AWS Regions] 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 = 2018-01-08 +action.escu.modification_date = 2018-01-08 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.eli5 = 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. +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 Regions action.escu.known_false_positives = None at this time -action.escu.search_type = contextual +action.escu.search_type = support 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 -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{}.* - -[ESCU - Email Attachments With Lots Of Spaces - Rule] -action.escu = 0 -action.escu.enabled = 1 -action.escu.creation_date = 2017-04-21 -action.escu.modification_date = 2017-09-19 -action.escu.asset_at_risk = Endpoint -action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. -action.escu.how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. -action.escu.data_models = ["Email"] -action.escu.full_search_name = ESCU - Email Attachments With Lots Of Spaces - 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 = ["Microsoft Exchange"] -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 -action.notable.param.nes_fields = src_user, file_name -action.notable.param.rule_description = The sender $src_user$ has sent an email with a suspicious amount of spaces in the file name: $file_name$ -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 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 -action.risk.param._risk_object_type = user -action.risk.param._risk_score = 60 -action.risk.param.verbose = 0 -alert.digest_mode = 1 -alert.suppress = 1 -alert.suppress.fields = src_user -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = Attackers often use spaces as a means to obfuscate an attachment's file extension. This search looks for messages with email attachments that have many spaces within the filename. -dispatch.earliest_time = -70m@m +action.escu.analytic_story = ["Suspicious AWS EC2 Activities", "AWS Cryptomining"] +description = This search looks for CloudTrail events where an AWS instance is started and creates a baseline of most recent time (latest) and the first time (earliest) we've seen this region in our dataset grouped by the value awsRegion for the last 30 days +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 = | tstats `summariesonly` count values(All_Email.recipient) as recipient_address min(_time) as firstTime max(_time) as lastTime from datamodel=Email where All_Email.file_name="*" by All_Email.src_user, All_Email.file_name All_Email.message_id | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name("All_Email")` | eval space_ratio = (mvcount(split(file_name," "))-1)/len(file_name) | search space_ratio >= 0.1 | rex field=recipient_address "(?.*)@" +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 - Baseline of blocked outbound traffic from AWS] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-04-26 +action.escu.modification_date = 2018-05-07 +action.escu.channel = ESCU +action.escu.eli5 = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. +action.escu.full_search_name = ESCU - Baseline of blocked outbound traffic from AWS +action.escu.known_false_positives = None at this time +action.escu.search_type = support +action.escu.providing_technologies = ["AWS"] +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 +disabled=true +realtime_schedule = 0 +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 - Previously seen users in CloudTrail] action.escu = 0 @@ -7843,6 +8065,55 @@ schedule_window = auto is_visible = false search = | search sourcetype=aws:cloudtrail userIdentity.arn={src_user} | spath output=user path=userIdentity.arn | rename sourceIPAddress as src_ip | table _time, user, src_ip, awsRegion, eventName, errorCode, errorMessage +[ESCU - Detect New Open S3 buckets - Rule] +action.escu = 0 +action.escu.enabled = 1 +action.escu.creation_date = 2018-07-25 +action.escu.modification_date = 2018-07-25 +action.escu.asset_at_risk = S3 Bucket +action.escu.channel = ESCU +action.escu.confidence = medium +action.escu.eli5 = This search queries CloudTrail logs for events with S3 bucket access controls given to the "All Users" group, which allows anyone in the world access to the resource. This search generates a table displaying the time when the bucket was made public, the permission of the S3 bucket, the bucket name, and the ARN of the user who created the bucket. +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), and then configure your CloudTrail inputs. The threshold value should be tuned to your environment. +action.escu.full_search_name = ESCU - Detect New Open S3 buckets - Rule +action.escu.mappings = {"mitre_attack": ["Execution", "Initial Access", "Exfiltration"], "kill_chain_phases": ["Actions on Objectives"], "cis20": ["CIS 13"], "nist": ["PR.DS", "PR.AC", "DE.CM"]} +action.escu.known_false_positives = While this search has no known false positives, it is possible that an AWS admin has legitimately created a public bucket for a specific purpose. That said, AWS strongly advises against granting full control to the "All Users" group. +action.escu.search_type = detection +action.escu.providing_technologies = ["AWS"] +action.escu.analytic_story = ["Suspicious AWS S3 Activities"] +action.correlationsearch.enabled = 1 +action.correlationsearch.label = Detect New Open S3 buckets +action.notable = 1 +action.notable.param.nes_fields = user +action.notable.param.rule_description = An open/public S3 bucket, $bucketName$, was created by $user$. +action.notable.param.rule_title = Public S3 bucket $bucketName$ created 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 - AWS S3 Bucket details via bucketName\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 - ESCU - Get All AWS Activity From IP Address\n - ESCU - Investigate AWS activities via region name\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 = 70 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = user,bucketName +alert.suppress.period = 86400s +cron_schedule = 5 * * * * +description = This search looks for CloudTrail events where a user has created an open/public S3 bucket. +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 AllUsers eventName=PutBucketAcl | spath output=userIdentityArn path=userIdentity.arn | spath output=bucketName path=requestParameters.bucketName | spath output=aclControlList path=requestParameters.AccessControlPolicy.AccessControlList | spath input=aclControlList output=grantee path=Grant{} | mvexpand grantee | spath input=grantee | search Grantee.URI=*AllUsers | rename userIdentityArn as user| table _time, src,awsRegion Permission, Grantee.URI, bucketName, user + [ESCU - Get DNS traffic ratio] action.escu = 0 action.escu.enabled = 1 @@ -7856,7 +8127,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 = ["DNS Hijacking", "Command and Control", "Suspicious DNS Traffic", "Dynamic DNS"] +action.escu.analytic_story = ["Command and Control", "Suspicious DNS Traffic", "Dynamic DNS", "DNS Hijacking"] action.escu.fields_required = ["src_ip", "dest_ip"] action.escu.earliest_time_offset = 0 action.escu.latest_time_offset = 86400 @@ -7883,7 +8154,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 = ["Emotet Malware (TA18-201A)", "Monitor for Unauthorized Software", "SamSam Ransomware"] +action.escu.analytic_story = ["SamSam Ransomware", "Emotet Malware (TA18-201A)", "Monitor for Unauthorized Software"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Prohibited Software On Endpoint action.notable = 1 @@ -7892,7 +8163,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 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.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 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 @@ -7933,7 +8204,7 @@ action.escu.mappings = {"mitre_attack": ["Commonly Used Port", "Credential Acces action.escu.known_false_positives = It is likely that the outbound Server Message Block (SMB) traffic is legitimate, if the company's internal networks are not well-defined in the Assets and Identity Framework. Categorize the internal CIDR blocks as `internal` in the lookup file to avoid creating notable events for traffic destined to those CIDR blocks. Any other network connection that is going out to the Internet should be investigated and blocked. Best practices suggest preventing external communications of all SMB versions and related protocols at the network boundary. action.escu.search_type = detection action.escu.providing_technologies = ["Bro", "Splunk Stream"] -action.escu.analytic_story = ["Hidden Cobra Malware", "DHS Report TA18-074A"] +action.escu.analytic_story = ["DHS Report TA18-074A", "Hidden Cobra Malware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Detect Outbound SMB Traffic action.notable = 1 @@ -7942,7 +8213,7 @@ action.notable.param.rule_description = Outbound SMB network traffic detected. action.notable.param.rule_title = Outbound SMB traffic from $src_ip$ to $dest_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 - 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 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 Outbound Emails to Hidden Cobra Threat Actors\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_ip @@ -7980,7 +8251,7 @@ action.escu.full_search_name = ESCU - Get 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", "Credential Dumping", "Suspicious Command-Line Executions", "Windows Service Abuse", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Netsh Abuse", "Command and Control", "Suspicious MSHTA Activity", "Orangeworm Attack Group", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "SamSam Ransomware", "Disabling Security Tools", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Windows Defense Evasion Tactics", "Windows Log Manipulation", "Windows Persistence Techniques"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Windows Service Abuse", "DHS Report TA18-074A", "Suspicious Windows Registry Activities", "Windows Persistence Techniques", "Suspicious Command-Line Executions", "Orangeworm Attack Group", "Unusual Processes", "Suspicious WMI Use", "Ransomware", "Command and Control", "Windows Privilege Escalation", "Windows Log Manipulation", "Windows File Extension and Association Abuse", "SamSam Ransomware", "Malicious PowerShell", "Disabling Security Tools", "Windows Defense Evasion Tactics", "Emotet Malware (TA18-201A)", "Hidden Cobra Malware", "Credential Dumping", "Collection and Staging", "Netsh Abuse", "Lateral Movement", "Suspicious MSHTA Activity", "Monitor for Unauthorized Software"] action.escu.fields_required = ["process", "dest"] action.escu.earliest_time_offset = 7200 action.escu.latest_time_offset = 7200 @@ -8226,7 +8497,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Emotet Malware (TA18-201A)", "Ransomware", "Suspicious MSHTA Activity", "DHS Report TA18-074A", "Suspicious Windows Registry Activities", "Windows Persistence Techniques"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "DHS Report TA18-074A", "Suspicious Windows Registry Activities", "Windows Persistence Techniques", "Ransomware", "Emotet Malware (TA18-201A)", "Suspicious MSHTA Activity"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Registry Keys Used For Persistence action.notable = 1 @@ -8235,7 +8506,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 @@ -8276,7 +8547,7 @@ action.escu.mappings = {"mitre_attack": ["Commonly Used Port"], "kill_chain_phas 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 = ["Emotet Malware (TA18-201A)", "Ransomware", "Hidden Cobra Malware", "DHS Report TA18-074A"] +action.escu.analytic_story = ["DHS Report TA18-074A", "Ransomware", "Emotet Malware (TA18-201A)", "Hidden Cobra Malware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = SMB Traffic Spike action.notable = 1 @@ -8285,7 +8556,7 @@ action.notable.param.rule_description = There was a spike in SMB traffic from $s 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.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 Outbound Emails to Hidden Cobra Threat Actors\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 @@ -8383,43 +8654,44 @@ 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=mshta.exe by Processes.user Processes.process_name Processes.parent_process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)`| search (process=*vbscript* OR process=*javascript*) -[ESCU - Web Fraud - Password Sharing Across Accounts - Rule] +[ESCU - Email files written outside of the Outlook directory - Rule] 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.channel = webfraud +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 = A common password across user accounts generally indicates that the users are choosing poor passwords or that a fraudster has a common password across multiple accounts embedded within a script. The search will extract the username and password information from the form_data field, then calculate the number and values for usernames that have the same passwords. Finally, it outputs the values where the unique usernames sharing passwords are greater than 5 -action.escu.how_to_implement = We need to start with a dataset that allows us to see the values of usernames and passwords that users are submitting to the website hosting the Magento2 e-commerce platform (commonly found in the HTTP form_data field). A tokenized or hashed value of a password is acceptable and certainly preferable to a clear-text password. Common data sources used for this detection are customized Apache logs, customized IIS, and Splunk Stream. -action.escu.full_search_name = ESCU - Web Fraud - Password Sharing Across Accounts - Rule -action.escu.mappings = {"cis20": ["CIS 16"], "nist": ["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 anamoluous behavior. +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 = ["Splunk Stream", "Palo Alto Firewall", "Bro"] -action.escu.analytic_story = ["Web Fraud 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 = Web Fraud - Password Sharing Across Accounts +action.correlationsearch.label = Email files written outside of the Outlook directory action.notable = 1 -action.notable.param.nes_fields = user -action.notable.param.rule_description = This search is used to identify user accounts, $user$, that share common passwords -action.notable.param.rule_title = Web Fraud Detection: Password Sharing Across Accounts -action.notable.param.security_domain = threat +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 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 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 = user -action.risk.param._risk_object_type = other -action.risk.param._risk_score = 10 +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 = user -alert.suppress.period = 3600s +alert.suppress.fields = dest, file_path +alert.suppress.period = 86400s cron_schedule = 0 * * * * -description = This search is used to identify user accounts that share a common password. +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 @@ -8430,7 +8702,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=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 +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 - Identify New User Accounts - Rule] action.escu = 0 @@ -8482,103 +8754,28 @@ 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 - Attempt To Stop Security Service - Rule] +[ESCU - Identify Systems Using Remote Desktop] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-09 +action.escu.creation_date = 2017-04-18 action.escu.modification_date = 2017-09-15 -action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.confidence = high -action.escu.eli5 = This search looks for the processes **net.exe** and **sc.exe** with a parameter of `"stop"`. It then searches a list of security-related services included in a lookup file for matches on the command line. Results are subsequently returned in table format. The included lookup file can be modified to update the services to monitor. -action.escu.how_to_implement = You must 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. The search is shipped with a lookup file, `security_services.csv`, that can be edited to update the list of services to monitor. This lookup file can be edited directly where it lives in `$SPLUNK_HOME/etc/apps/DA-ESS-ContentUpdate/lookups`, or via the Splunk console. You should add the names of services an attacker might use on the command line and surround with asterisks (*****), so that they work properly when searching the command line. The file should be updated with the names of any services you would like to monitor for attempts to stop the service., -action.escu.full_search_name = ESCU - Attempt To Stop Security Service - 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 = None identified. Attempts to disable security-related services should be identified and understood. -action.escu.search_type = detection +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 = ["Disabling Security Tools"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Attempt To Stop Security Service -action.notable = 1 -action.notable.param.nes_fields = dest, process, user -action.notable.param.rule_description = Attempt to stop a security-related service on $dest$ -action.notable.param.rule_title = Attempt to Stop Security Service 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"} -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, user -alert.suppress.period = 86400s -cron_schedule = 0 * * * * -description = This search looks for attempts to stop security-related services on the endpoint. -dispatch.earliest_time = -70m@m +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 -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=net.exe OR process=sc.exe) cmdline="* stop *" | lookup security_services_lookup service as cmdline OUTPUTNEW category, description | search category=security | table _time, dest, user, parent_process, cmdline, description - -[ESCU - WMI Permanent Event Subscription - 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 Windows event ID 5861. -action.escu.how_to_implement = To successfully implement this search, you must be ingesting the Windows WMI activity logs. This can be done by adding a stanza to inputs.conf on the system generating logs with a title of [WinEventLog://Microsoft-Windows-WMI-Activity/Operational]. -action.escu.full_search_name = ESCU - WMI Permanent Event Subscription - 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 -action.notable = 1 -action.notable.param.nes_fields = dest -action.notable.param.rule_description = This search looks for the creation of a permanent WMI event subscription via Windows event 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 -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="wineventlog:microsoft-windows-wmi-activity/operational" EventCode=5861 Binding | rex field=Message "Consumer =\s+(?[^;|^$]+)" | search consumer!="NTEventLogEventConsumer=\"SCM Event Log Consumer\"" | stats count min(_time) as firstTime max(_time) as lastTime by ComputerName, consumer, Message | `ctime(firstTime)`| `ctime(lastTime)` | rename ComputerName as dest +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 - Spike in File Writes - Rule] action.escu = 0 @@ -8646,7 +8843,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "Accessibility Features"], 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 Privilege Escalation", "Unusual Processes"] +action.escu.analytic_story = ["Unusual Processes", "Windows Privilege Escalation"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Uncommon Processes On Endpoint action.notable = 1 @@ -8655,7 +8852,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 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 - 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 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 @@ -8680,56 +8877,6 @@ schedule_window = auto is_visible = false search = | tstats `summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Application_State by All_Application_State.dest All_Application_State.user All_Application_State.process | `ctime(firstTime)`| `ctime(lastTime)` | `drop_dm_object_name("All_Application_State")` | `uncommon_processes` -[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", "SamSam Ransomware", "Lateral Movement"] -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 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 = 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 - Process Execution via WMI - Rule] action.escu = 0 action.escu.enabled = 1 @@ -8779,105 +8926,6 @@ 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] -action.escu = 0 -action.escu.enabled = 1 -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 = 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 = ["Carbon Black Response", "CrowdStrike Falcon", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Suspicious Command-Line Executions", "Suspicious MSHTA Activity"] -action.correlationsearch.enabled = 1 -action.correlationsearch.label = Detect Prohibited Applications Spawning cmd.exe -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.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, parent_process -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. -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.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_name Processes.process_name Processes.dest | `drop_dm_object_name(Processes)` | `ctime(firstTime)`| `ctime(lastTime)` |search [`prohibited_apps_launching_cmd`] - -[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 action.escu.enabled = 1 @@ -8893,7 +8941,7 @@ action.escu.mappings = {"mitre_attack": ["Execution", "Windows Management Instru action.escu.known_false_positives = The wmic.exe utility is a benign Windows application. It may be used legitimately by Administrators with these parameters for remote system administration, but it's relatively uncommon. action.escu.search_type = detection action.escu.providing_technologies = ["Carbon Black Response", "Sysmon", "Tanium", "Ziften"] -action.escu.analytic_story = ["Ransomware", "Suspicious WMI Use"] +action.escu.analytic_story = ["Suspicious WMI Use", "Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Remote Process Instantiation via WMI action.notable = 1 @@ -8902,7 +8950,7 @@ action.notable.param.rule_description = This search looks for wmic.exe being lau action.notable.param.rule_title = Remote process instantiation via WMI 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.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.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -8977,55 +9025,6 @@ 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 -[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 @@ -9220,55 +9219,28 @@ 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 - Systems Ready for Spectre-Meltdown Windows Patch] 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-01-08 +action.escu.modification_date = 2018-01-08 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.eli5 = 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. +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.data_models = ["Change_Analysis"] +action.escu.full_search_name = ESCU - Systems Ready for Spectre-Meltdown Windows Patch +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 = ["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.analytic_story = ["Spectre And Meltdown Vulnerabilities"] +description = Some AV applications can cause the Spectre/Meltdown patch for Windows not to install successfully. This registry key is supposed to be created by the AV engine when it has been patched to be able to handle the Windows patch. If this key has been written, the system can then be patched for Spectre and Meltdown. +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 = | 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 = | 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="HKLM\Software\Microsoft\Windows\CurrentVersion\QualityCompat*") by All_Changes.dest, All_Changes.command, All_Changes.user, All_Changes.object, All_Changes.object_path | `ctime(lastTime)` | `ctime(firstTime)` | `drop_dm_object_name("All_Changes")` [ESCU - Unusually Long Command Line - Rule] action.escu = 0 @@ -9284,7 +9256,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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Ransomware", "Unusual Processes"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Suspicious Command-Line Executions", "Unusual Processes", "Ransomware"] action.correlationsearch.enabled = 1 action.correlationsearch.label = Unusually Long Command Line action.notable = 1 @@ -9293,7 +9265,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 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 - 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 Web Activity From Host\n"} action.notable.param.recommended_actions = escu_contextualize, escu_investigate action.risk = 1 action.risk.param._risk_object = dest @@ -9318,27 +9290,55 @@ schedule_window = auto is_visible = false search = (sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational OR tag=process) | stats count min(_time) as firstTime max(_time) as lastTime by dest, user, process, cmdline | `ctime(firstTime)`| `ctime(lastTime)` | eval cmdlen=len(cmdline) | eventstats stdev(cmdlen) as stdev, avg(cmdlen) as avg by dest | stats max(cmdlen) as maxlen, values(stdev) as stdevperhost, values(avg) as avgperhost by dest, process,cmdline| eval threshold = 10 | where maxlen > ((threshold*stdevperhost) + avgperhost) -[ESCU - Baseline of blocked outbound traffic from AWS] +[ESCU - Email Attachments With Lots Of Spaces - Rule] action.escu = 0 action.escu.enabled = 1 -action.escu.creation_date = 2018-04-26 -action.escu.modification_date = 2018-05-07 +action.escu.creation_date = 2017-04-21 +action.escu.modification_date = 2017-09-19 +action.escu.asset_at_risk = Endpoint action.escu.channel = ESCU -action.escu.eli5 = Use this search to create a baseline of blocked outbound network connections by each source IP in your AWS environment. This search returns all log events that correspond to a blocked outbound network connection, extracts the source IP from where the outbound connection was initiated, and collects the events in one-hour groupings. Next, it calculates the number of outbound connections blocked per hour. For each source IP, it calculates the average and standard deviation of this count on a per-hour basis. It also includes the number of data points each source IP 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 `VPC flow logs.`. -action.escu.full_search_name = ESCU - Baseline of blocked outbound traffic from AWS +action.escu.confidence = high +action.escu.eli5 = This search looks at any emails with file attachment names that contain many spaces relative to the length of the file name. Specifically, it checks if spaces make up more than 10% of the number of characters in the file name. This percentage can be tuned for each environment. The search will then output the message ID of the email, the count, the recipient address and the recipient user, first and last time this event was seen and the space ratio of the file attachment name. +action.escu.how_to_implement = You need to ingest data from emails. Specifically, the sender's address and the file names of any attachments must be mapped to the Email data model. The threshold ratio is set to 10%, but this value can be configured to suit each environment. +action.escu.data_models = ["Email"] +action.escu.full_search_name = ESCU - Email Attachments With Lots Of Spaces - 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 = support -action.escu.providing_technologies = ["AWS"] -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 +action.escu.search_type = detection +action.escu.providing_technologies = ["Microsoft Exchange"] +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 +action.notable.param.nes_fields = src_user, file_name +action.notable.param.rule_description = The sender $src_user$ has sent an email with a suspicious amount of spaces in the file name: $file_name$ +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 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 +action.risk.param._risk_object_type = user +action.risk.param._risk_score = 60 +action.risk.param.verbose = 0 +alert.digest_mode = 1 +alert.suppress = 1 +alert.suppress.fields = src_user +alert.suppress.period = 86400s +cron_schedule = 0 * * * * +description = Attackers often use spaces as a means to obfuscate an attachment's file extension. This search looks for messages with email attachments that have many spaces within the filename. +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: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 +search = | tstats `summariesonly` count values(All_Email.recipient) as recipient_address min(_time) as firstTime max(_time) as lastTime from datamodel=Email where All_Email.file_name="*" by All_Email.src_user, All_Email.file_name All_Email.message_id | `ctime(firstTime)` | `ctime(lastTime)` | `drop_dm_object_name("All_Email")` | eval space_ratio = (mvcount(split(file_name," "))-1)/len(file_name) | search space_ratio >= 0.1 | rex field=recipient_address "(?.*)@" [ESCU - Count of Unique IPs Connecting to Ports] action.escu = 0 @@ -9399,11 +9399,11 @@ 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 = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Credential Dumping", "DNS Hijacking", "DNS Amplification Attacks", "Windows Service Abuse", "Brand Monitoring", "Emotet Malware (TA18-201A)", "Ransomware", "Windows Privilege Escalation", "Netsh Abuse", "Command and Control", "Splunk Enterprise Vulnerability", "Data Protection", "Host Redirection", "JBoss Vulnerability", "Suspicious MSHTA Activity", "Monitor for Updates", "Orangeworm Attack Group", "Suspicious Emails", "Windows File Extension and Association Abuse", "Hidden Cobra Malware", "Unusual Processes", "Collection and Staging", "Splunk Enterprise Vulnerability CVE-2018-11409", "Monitor for Unauthorized Software", "Malicious PowerShell", "DHS Report TA18-074A", "Monitor Backup Solution", "SamSam Ransomware", "Disabling Security Tools", "Suspicious DNS Traffic", "ColdRoot MacOS RAT", "Spectre And Meltdown Vulnerabilities", "Suspicious WMI Use", "Suspicious Windows Registry Activities", "Lateral Movement", "Asset Tracking", "Router & Infrastructure Security", "Windows Log Manipulation", "Prohibited Traffic Allowed or Protocol Mismatch", "Dynamic DNS", "Windows Persistence Techniques", "Use of Cleartext Protocols", "Apache Struts Vulnerability", "SQL Injection", "Account Monitoring and Controls"] +action.escu.analytic_story = ["Possible Backdoor Activity Associated With MUDCARP Espionage Campaigns", "Windows Service Abuse", "Host Redirection", "DHS Report TA18-074A", "Suspicious Windows Registry Activities", "Windows Persistence Techniques", "ColdRoot MacOS RAT", "Monitor Backup Solution", "Orangeworm Attack Group", "Unusual Processes", "DNS Amplification Attacks", "Suspicious WMI Use", "Asset Tracking", "Ransomware", "Command and Control", "Windows Privilege Escalation", "Windows Log Manipulation", "Windows File Extension and Association Abuse", "Prohibited Traffic Allowed or Protocol Mismatch", "Brand Monitoring", "SamSam Ransomware", "Data Protection", "Router & Infrastructure Security", "Malicious PowerShell", "Disabling Security Tools", "SQL Injection", "Emotet Malware (TA18-201A)", "Hidden Cobra Malware", "Suspicious Emails", "JBoss Vulnerability", "Suspicious DNS Traffic", "Spectre And Meltdown Vulnerabilities", "Credential Dumping", "Collection and Staging", "Netsh Abuse", "Account Monitoring and Controls", "Monitor for Updates", "Use of Cleartext Protocols", "Lateral Movement", "Dynamic DNS", "DNS Hijacking", "Splunk Enterprise Vulnerability", "Apache Struts Vulnerability", "Suspicious MSHTA Activity", "Splunk Enterprise Vulnerability CVE-2018-11409", "Monitor for Unauthorized Software"] action.escu.fields_required = ["dest"] action.escu.earliest_time_offset = 604800 action.escu.latest_time_offset = 0 -description = For the last 7 days, the search will query the Risk data model in Splunk Enterprise Security and calculate the count, sum of the risk_scores, names of the correlation searches that contributed to create a risk score for a specific endpoint(machine_name) +description = For the last 7 days, the search will query the Risk data model in Splunk Enterprise Security and calculate the count, sum of the risk\_scores, names of the correlation searches that contributed to create a risk score for a specific endpoint(machine\_name) disabled=true realtime_schedule = 0 schedule_window = auto