Detection: Cisco AI Defense Repeated High Risk Activity

Description

Detects bursts of five or more distinct Cisco AI Defense event IDs, or three or more occurrences of the same event ID, matching prompt injection, code detection, PII, or PCI guardrails for the same application and connection within ten minutes. Allowed PII/PCI prompt events are handled by Cisco AI Defense Allowed Sensitive Prompt. These patterns can indicate iterative prompt-injection probing or repeated attempts to use an AI application to access restricted data or capabilities.

 1`cisco_ai_defense`
 2
 3```Leave allowed PII/PCI prompt events to Cisco AI Defense Allowed Sensitive Prompt```
 4
 5
 6| eval is_allowed_sensitive_prompt=if(lower(event_action)="allow" AND lower(event_message_type)="prompt" AND mvfind('event_policy_guardrail_assocs{}.policy_guardrail_assoc.guardrail_avail_ruleset.guardrail_ruleset_type', "(?i)\\bPII\\b
 7|personally identifiable information
 8|\\bPCI\\b
 9|payment card industry")>=0, 1, 0)
10
11| where is_allowed_sensitive_prompt=0
12
13
14| eval guardrail_ruleset_type=mvjoin('event_policy_guardrail_assocs{}.policy_guardrail_assoc.guardrail_avail_ruleset.guardrail_ruleset_type', ", "),
15       application_name=if(isnotnull('genai_application.application_name') AND len(trim('genai_application.application_name'))>0, 'genai_application.application_name', "unknown"),
16       connection_name=if(isnotnull('connection.connection_name') AND len(trim('connection.connection_name'))>0, 'connection.connection_name', "unknown"),
17       application_key=if(isnotnull(application_id) AND len(trim(application_id))>0, application_id, application_name),
18       connection_key=if(isnotnull(connection_id) AND len(trim(connection_id))>0, connection_id, connection_name)
19
20
21| where mvfind('event_policy_guardrail_assocs{}.policy_guardrail_assoc.guardrail_avail_ruleset.guardrail_ruleset_type', "(?i)prompt injection
22|code detection
23|\\bPII\\b
24|personally identifiable information
25|\\bPCI\\b
26|payment card industry")>=0
27
28
29| bin _time span=10m
30
31```Track repeated records with the same Cisco event ID separately from bursts of distinct event IDs```
32
33| eventstats count as same_event_id_count by _time application_key connection_key event_id
34
35
36| stats count as event_count
37        dc(event_id) as distinct_event_count
38        max(eval(if(isnotnull(event_id) AND len(trim(event_id))>0, same_event_id_count, 0))) as max_same_event_id_count
39        values(eval(if(isnotnull(event_id) AND len(trim(event_id))>0 AND same_event_id_count>=3, event_id, null()))) as repeated_event_ids
40        count(eval(lower(event_action)="allow")) as allowed_event_count
41        count(eval(lower(event_action)="block")) as blocked_event_count
42        values(event_id) as event_ids
43        values(event_action) as event_actions
44        values(event_message_type) as message_types
45        values(policy.policy_name) as policy_names
46        values(guardrail_ruleset_type) as guardrail_ruleset_types
47        values(connection_name) as connection_names
48        values(application_name) as application_names
49    by _time application_key connection_key
50
51
52| where distinct_event_count>=5 OR max_same_event_id_count>=3
53
54
55| table _time application_key application_names connection_key connection_names
56        event_count distinct_event_count max_same_event_id_count repeated_event_ids
57        allowed_event_count blocked_event_count event_actions message_types policy_names
58        guardrail_ruleset_types event_ids
59
60
61| `cisco_ai_defense_repeated_high_risk_activity_filter`

Data Source

Name Platform Sourcetype Source
Cisco AI Defense Alerts Other 'cisco:ai:defense' 'not_applicable'

Macros Used

Name Value
cisco_ai_defense sourcetype=cisco:ai:defense
cisco_ai_defense_repeated_high_risk_activity_filter search *
cisco_ai_defense_repeated_high_risk_activity_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
DE.CM
CIS 10

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Finding (Notable) Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Intermediate Finding (Risk Event) No
TTP detections generate a Finding (Notable) and may generate Intermediate Findings (Risk Events) for associated entities.

Implementation

Install and configure the Cisco Security Cloud app to ingest Cisco AI Defense alerts into Splunk. Confirm that extraction is enabled for the required fields as shown in the detection search. Configure the "cisco_ai_defense" macro to match the index, source, and sourcetype used in your environment. Adjust the five-distinct-event threshold, three-occurrence same-event-ID threshold, and ten-minute window as needed.

Known False Positives

Automated testing, red-team exercises, application QA, or a popular shared application may generate repeated guardrail events. Review whether the window contains allowed events and whether the activity was expected for the application and connection.

Associated Analytic Story

Finding

Title Entity Field Entity Type Risk Score
Cisco AI Defense observed [$event_count$] high risk event occurrences across [$distinct_event_count$] unique event IDs in ten minutes for application [$application_names$] and connection [$connection_names$]. Maximum same-ID count -> [$max_same_event_id_count$] ; Allowed events -> [$allowed_event_count$] ; Blocked events -> [$blocked_event_count$]. application_key other 50

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation ✅ Passing N/A N/A N/A
Unit ✅ Passing Dataset not_applicable cisco:ai:defense
Integration ✅ Passing Dataset not_applicable cisco:ai:defense

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub |

Version: 1