Skip to content

Commit edb7165

Browse files
authored
Merge pull request #2880 from splunk/release_v4.14.0
Release branch for 4.14.0
2 parents 17c02b7 + 585e125 commit edb7165

File tree

165 files changed

+930
-328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+930
-328
lines changed

.vscode/launch.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@
4949
"justMyCode": true,
5050
"args": ["-p", "detections", "content_changer", "-cf", "fix_kill_chain"]
5151
},
52+
{
53+
"name": "contentctl convert",
54+
"type": "python",
55+
"request": "launch",
56+
"program": "${workspaceFolder}/contentctl.py",
57+
"console": "integratedTerminal",
58+
"justMyCode": true,
59+
"args": ["-p", ".", "convert", "-dm", "ocsf", "-dp", "dev_ssa/endpoint/ssa___windows_wmiprvse_spawn_msbuild.yml", "-o", "ssa_detections/endpoint"]
60+
},
5261
{
5362
"name": "Python: Current File",
5463
"type": "python",

bin/contentctl_project/contentctl_infrastructure/builder/backend_splunk_ba.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class SplunkBABackend(TextQueryBackend):
6767
wildcard_match_expression : ClassVar[Optional[str]] = "{field} LIKE {value}"
6868

6969

70+
7071
def __init__(self, processing_pipeline: Optional["sigma.processing.pipeline.ProcessingPipeline"] = None, collect_errors: bool = False, min_time : str = "-30d", max_time : str = "now", detection : Detection = None, field_mapping: dict = None, **kwargs):
7172
super().__init__(processing_pipeline, collect_errors, **kwargs)
7273
self.min_time = min_time or "-30d"
@@ -110,13 +111,29 @@ def finalize_query_data_model(self, rule: SigmaRule, query: str, index: int, sta
110111
parent = new_val
111112
i = i + 1
112113
continue
113-
parser_str = '| eval ' + new_val + ' = ' + parent + '.' + val + ' '
114+
new_val_spaces = new_val + "="
115+
if new_val_spaces not in query:
116+
parser_str = '| eval ' + new_val + ' = ' + parent + '.' + val + ' '
117+
else:
118+
parser_str = '| eval ' + new_val + ' = ' + 'lower(' + parent + '.' + val + ') '
114119
detection_str = detection_str + parser_str
115120
parsed_fields.append(new_val)
116121
parent = new_val
117122
i = i + 1
118123

119-
detection_str = detection_str + "| where " + query
124+
### Convert sigma values into lower case
125+
lower_query = ""
126+
in_quotes = False
127+
for char in query:
128+
if char == '"':
129+
in_quotes = not in_quotes
130+
if in_quotes:
131+
lower_query += char.lower()
132+
else:
133+
lower_query += char
134+
135+
detection_str = detection_str + "| where " + lower_query
136+
120137
detection_str = detection_str.replace("\\\\\\\\", "\\\\")
121138
return detection_str
122139

contentctl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sys
22
import argparse
3-
import os
3+
import os
44

55
from bin.contentctl_project.contentctl_core.domain.entities.link_validator import LinkValidator
66

detections/application/suspicious_email_attachment_extensions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ date: '2023-04-14'
55
author: David Dorsey, Splunk
66
status: experimental
77
type: Anomaly
8-
description: This search looks for emails that have attachments with suspicious file
9-
extensions.
8+
description: |-
9+
The following analytic detects emails that contain attachments with suspicious file extensions. Detecting and responding to emails with suspicious attachments can mitigate the risks associated with phishing and malware attacks, thereby protecting the organization's data and systems from potential harm. The detection is made by using a Splunk query that searches for emails in the datamodel=Email where the filename of the attachment is not empty. The analytic uses the tstats command to summarize the count, first time, and last time of the emails that meet the criteria. It groups the results by the source user, file name, and message ID of the email. The detection is important because it indicates potential phishing or malware delivery attempts in which an attacker attempts to deliver malicious content through email attachments, which can lead to data breaches, malware infections, or unauthorized access to sensitive information. Next steps include reviewing the identified emails and attachments and analyzing the source user, file name, and message ID to determine if they are legitimate or malicious. Additionally, you must inspect any relevant on-disk artifacts associated with the attachments and investigate any concurrent processes to identify the source of the attack.
1010
data_source: []
1111
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)
1212
as lastTime from datamodel=Email where All_Email.file_name="*" by All_Email.src_user,

detections/application/web_servers_executing_suspicious_processes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ date: '2019-04-01'
55
author: David Dorsey, Splunk
66
status: experimental
77
type: TTP
8-
description: This search looks for suspicious processes on all systems labeled as
9-
web servers.
8+
description: |-
9+
The following analytic detects suspicious processes on systems labeled as web servers. This detection is made by a Splunk query that searches for specific process names that might indicate malicious activity. These suspicious processes include "whoami", "ping", "iptables", "wget", "service", and "curl". Uses the Splunk data model "Endpoint.Processes" and filters the results to only include systems categorized as web servers. This detection is important because it indicates unauthorized or malicious activity on web servers since these processes are commonly used by attackers to perform reconnaissance, establish persistence, or exfiltrate data from compromised systems. The impact of such an attack can be significant, ranging from data theft to the deployment of additional malicious payloads, potentially leading to ransomware or other damaging outcomes. False positives might occur since the legitimate use of these processes on web servers can trigger the analytic. Next steps include triaging and investigating to determine the legitimacy of the activity. Also, review the source and command of the suspicious process. You must also examine any relevant on-disk artifacts and look for concurrent processes to identify the source of the attack.
1010
data_source:
1111
- Sysmon Event ID 1
1212
search: '| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time)

detections/cloud/amazon_eks_kubernetes_pod_scan_detection.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ date: '2020-04-15'
55
author: Rod Soto, Splunk
66
status: experimental
77
type: Hunting
8-
description: This search provides detection information on unauthenticated requests
9-
against Kubernetes' Pods API
8+
description: |-
9+
The following analytic detects unauthenticated requests made against the Kubernetes' Pods API through proactive monitoring to protect the Kubernetes environment from unauthorized access and potential security breaches. The detection is made by using the Splunk query `aws_cloudwatchlogs_eks` with specific filters to identify these requests. Identifies events where the `user.username` is set to "system:anonymous", the `verb` is set to "list", and the `objectRef.resource` is set to "pods". Additionally, the search checks if the `requestURI` is equal to "/api/v1/pods". Analyzing these events helps you to identify any unauthorized access attempts to the Kubernetes' Pods API. Unauthenticated requests can indicate potential security breaches or unauthorized access to sensitive resources within the Kubernetes environment. The detection is important because unauthorized access to Kubernetes' Pods API can lead to the compromise of sensitive data, unauthorized execution of commands, or even the potential for lateral movement within the Kubernetes cluster. False positives might occur since there might be legitimate use cases for unauthenticated requests in certain scenarios. Therefore, you must review and validate any detected events before taking any action. Next steps include investigating the incident to mitigate any ongoing threats, and strengthening the security measures to prevent future unauthorized access attempts.
1010
data_source: []
1111
search: '`aws_cloudwatchlogs_eks` "user.username"="system:anonymous" verb=list objectRef.resource=pods
1212
requestURI="/api/v1/pods" | rename source as cluster_name sourceIPs{} as src_ip

detections/cloud/azure_ad_privileged_role_assigned_to_service_principal.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,15 @@ date: '2023-04-28'
55
author: Mauricio Velazco, Splunk
66
status: production
77
type: TTP
8-
description: The following analytic is geared towards detecting potential privilege escalation threats in Azure Active Directory (AD). It identifies instances where privileged roles, which hold elevated permissions, are assigned to Service Principals. These non-human entities that can access Azure resources could be exploited in an attack scenario, leading to unauthorized access or malicious activities. The analytic runs a specific search within the ingested Azure AD events, specifically leveraging the AuditLogs log category. Keep in mind, however, that there could be false positives, as administrators may legitimately assign privileged roles to Service Principals.
8+
description: "The following analytic detects potential privilege escalation threats in Azure Active Directory (AD). The detection is made by running a specific search within the ingested Azure Active Directory events to leverage the AuditLogs log category. This detection is important because it identifies instances where privileged roles that hold elevated permissions are assigned to service principals. This prevents unauthorized access or malicious activities, which occur when these non-human entities access Azure resources to exploit them. False positives might occur since administrators can legitimately assign privileged roles to service principals."
99
data_source: []
10-
search: ' `azuread` operationName="Add member to role"
11-
| rename properties.* as *
12-
| search "targetResources{}.type"=ServicePrincipal
13-
| rename initiatedBy.user.userPrincipalName as initiatedBy
14-
| rename targetResources{}.modifiedProperties{}.newValue as roles
15-
| eval role=mvindex(roles,1)
16-
| rename targetResources{}.displayName as apps
17-
| eval displayName=mvindex(apps,0)
18-
| lookup privileged_azure_ad_roles azureadrole AS role OUTPUT isprvilegedadrole description
19-
| search isprvilegedadrole = True
20-
| stats values(displayName) by _time, initiatedBy, result, operationName, role
21-
| `azure_ad_privileged_role_assigned_to_service_principal_filter`'
10+
search: ' `azuread` operationName="Add member to role" | rename properties.* as *
11+
| search "targetResources{}.type"=ServicePrincipal | rename initiatedBy.user.userPrincipalName
12+
as initiatedBy | rename targetResources{}.modifiedProperties{}.newValue as roles
13+
| eval role=mvindex(roles,1) | rename targetResources{}.displayName as apps | eval
14+
displayName=mvindex(apps,0) | lookup privileged_azure_ad_roles azureadrole AS role
15+
OUTPUT isprvilegedadrole description | search isprvilegedadrole = True | stats values(displayName)
16+
by _time, initiatedBy, result, operationName, role | `azure_ad_privileged_role_assigned_to_service_principal_filter`'
2217
how_to_implement: You must install the latest version of Splunk Add-on for Microsoft
2318
Cloud Services from Splunkbase (https://splunkbase.splunk.com/app/3110/#/details).
2419
You must be ingesting Azure Active Directory events into your Splunk environment.
@@ -33,8 +28,8 @@ tags:
3328
asset_type: Azure Active Directory
3429
confidence: 50
3530
impact: 70
36-
message: A privileged Azure AD role was assigned to the Service Principal $displayName$ initiated
37-
by $initiatedBy$
31+
message: A privileged Azure AD role was assigned to the Service Principal $displayName$
32+
initiated by $initiatedBy$
3833
mitre_attack_id:
3934
- T1098
4035
- T1098.003

detections/cloud/circle_ci_disable_security_job.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ date: '2021-09-02'
55
author: Patrick Bareiss, Splunk
66
status: production
77
type: Anomaly
8-
description: This search looks for disable security job in CircleCI pipeline.
8+
description: |-
9+
This analytic searches for a specific behavior in CircleCI pipelines such as the disabling of security jobs. The detection is made by using a Splunk query that renames certain fields and retrieves values for specified job names, workflow IDs and names, user information, commit messages, URLs, and branches. Then, the query identifies mandatory jobs for each workflow and searches for instances where they were run. The search also identifies the phase of the pipeline as "build" and extracts the repository name from the URL using regular expressions. The detection is important because it detects attempts to bypass security measures in CircleCI pipelines, which can potentially lead to malicious code being introduced into the pipeline, data breaches, system downtime, and reputational damage. False positives might occur since legitimate use cases can require the disabling of security jobs. However, you can proactively monitor and identify any suspicious activity in the pipeline using this analytic and mitigate potential threats through early detection.
910
data_source: []
1011
search: '`circleci` | rename vcs.committer_name as user vcs.subject as commit_message
1112
vcs.url as url workflows.* as * | stats values(job_name) as job_names by workflow_id

detections/cloud/circle_ci_disable_security_step.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ date: '2021-09-01'
55
author: Patrick Bareiss, Splunk
66
status: experimental
77
type: Anomaly
8-
description: This search looks for disable security step in CircleCI pipeline.
8+
description: |-
9+
The following analytic detects the disablement of security steps in a CircleCI pipeline. Addressing instances of security step disablement in CircleCI pipelines can mitigate the risks associated with potential security vulnerabilities and unauthorized changes. A proactive approach helps protect the organization's infrastructure, data, and overall security posture. The detection is made by a Splunk query that searches for specific criteria within CircleCI logs through a combination of field renaming, joining, and statistical analysis to identify instances where security steps are disabled. It retrieves information such as job IDs, job names, commit details, and user information from the CircleCI logs. The detection is important because it indicates potential security vulnerabilities or unauthorized changes to the pipeline caused by someone within the organization intentionally or unintentionally disabling security steps in the CircleCI pipeline.Disabling security steps can leave the pipeline and the associated infrastructure exposed to potential attacks, data breaches, or the introduction of malicious code into the pipeline. Investigate by reviewing the job name, commit details, and user information associated with the disablement of security steps. You must also examine any relevant on-disk artifacts and identify concurrent processes that might indicate the source of the attack or unauthorized change.
910
data_source: []
1011
search: '`circleci` | rename workflows.job_id AS job_id | join job_id [ | search `circleci`
1112
| stats values(name) as step_names count by job_id job_name ] | stats count by step_names

detections/cloud/cloud_api_calls_from_previously_unseen_user_roles.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ date: '2020-09-04'
55
author: David Dorsey, Splunk
66
status: experimental
77
type: Anomaly
8-
description: This search looks for new commands from each user role.
8+
description: |-
9+
The following analytic detects when a new command is run by a user, who typically does not run those commands. The detection is made by a Splunk query to search for these commands in the Change data model. Identifies commands run by users with the user_type of AssumedRole and a status of success. The query retrieves the earliest and latest timestamps of each command run and groups the results by the user and command. Then, it drops the unnecessary data model object name and creates a lookup to verify if the command was seen before. The lookup table contains information about previously seen cloud API calls for each user role, including the first time the command was seen and whether enough data is available for analysis. If the firstTimeSeenUserApiCall field is null or greater than the relative time of 24 hours ago, it indicates that the command is new and was not seen before. The final result table includes the firstTime, user, object, and command fields of the new commands. It also applies the security_content_ctime function to format the timestamps and applies a filter to remove any cloud API calls from previously unseen user roles. The detection is important because it helps to identify new commands run by different user roles. New commands can indicate potential malicious activity or unauthorized actions within the environment. Detecting and investigating these new commands can help identify and mitigate potential security threats earlier, preventing data breaches, unauthorized access, or other damaging outcomes.
910
data_source: []
1011
search: '| tstats earliest(_time) as firstTime, latest(_time) as lastTime from datamodel=Change
1112
where All_Changes.user_type=AssumedRole AND All_Changes.status=success by All_Changes.user,

0 commit comments

Comments
 (0)