Detection: Cisco AI Defense Security Alerts by Application Name

Description

This analytic summarizes Cisco AI Defense events by application, connection, action, message direction, and severity over ten-minute intervals. Allowed responses flagged for privacy guardrails are handled by the dedicated sensitive-response detection. Allowed prompts flagged for privacy guardrails are handled by Cisco AI Defense Allowed Sensitive Prompt. Repeated prompt injection, code detection, PII, or PCI events are handled by the repeated high-risk activity detection.

  1`cisco_ai_defense`
  2
  3
  4| rename genai_application.application_name as application_name,
  5         connection.connection_name as connection_name
  6
  7
  8| eval policy_name='policy.policy_name',
  9
 10       guardrail_ruleset_type=mvjoin('event_policy_guardrail_assocs{}.policy_guardrail_assoc.guardrail_avail_ruleset.guardrail_ruleset_type', ", "),
 11
 12       guardrail_entity_name=mvjoin('event_policy_guardrail_assocs{}.policy_guardrail_assoc.guardrail_avail_entity.guardrail_entity_name', ", "),
 13
 14       action=lower(event_action), message_type=lower(event_message_type),
 15
 16       has_privacy=if(mvfind('event_policy_guardrail_assocs{}.policy_guardrail_assoc.guardrail_avail_ruleset.guardrail_ruleset_type', "(?i)\\bPII\\b
 17|personally identifiable information
 18|\\bPCI\\b
 19|payment card industry")>=0, 1, 0),
 20
 21       has_sensitive_response=if(message_type="response" AND has_privacy=1, 1, 0),
 22
 23       has_security=if(mvfind('event_policy_guardrail_assocs{}.policy_guardrail_assoc.guardrail_avail_ruleset.guardrail_ruleset_type', "(?i)prompt injection
 24|code detection")>=0, 1, 0)
 25
 26```Prioritize allowed sensitive responses, then security and privacy guardrails```
 27
 28
 29| eval severity=case(
 30      action="allow" AND has_sensitive_response=1, "critical",
 31      action="block" AND has_sensitive_response=1, "high",
 32      action="allow" AND has_security=1, "high",
 33      action="block" AND has_security=1, "medium",
 34      action="allow" AND has_privacy=1, "high",
 35      action="block" AND has_privacy=1, "medium",
 36      true(), "low"
 37  )
 38
 39
 40| eval risk_score=case(
 41    severity="critical", 100,
 42    severity="high", 80,
 43    severity="medium", 50,
 44    severity="low", 20
 45)
 46
 47
 48| eval application_name=if(isnotnull(application_name) AND len(trim(application_name))>0, application_name, "unknown"),
 49       connection_name=if(isnotnull(connection_name) AND len(trim(connection_name))>0, connection_name, "unknown"),
 50       application_key=if(isnotnull(application_id) AND len(trim(application_id))>0, application_id, application_name),
 51       connection_key=if(isnotnull(connection_id) AND len(trim(connection_id))>0, connection_id, connection_name),
 52       is_high_risk=if(has_security=1 OR has_privacy=1, 1, 0),
 53       is_allowed_sensitive_response=if(action="allow" AND has_sensitive_response=1, 1, 0),
 54       is_allowed_sensitive_prompt=if(action="allow" AND message_type="prompt" AND has_privacy=1, 1, 0),
 55       high_risk_event_id=if((has_security=1 OR has_privacy=1) AND is_allowed_sensitive_prompt=0, event_id, null()),
 56       event_time=_time
 57
 58
 59| bin _time span=10m
 60
 61```Use the same application/connection window and threshold as Cisco AI Defense Repeated High Risk Activity```
 62
 63| eventstats count as same_high_risk_event_count by _time application_key connection_key high_risk_event_id
 64
 65| eventstats dc(high_risk_event_id) as high_risk_event_count by _time application_key connection_key
 66
 67```Leave allowed sensitive responses to Cisco AI Defense Allowed Sensitive Response, allowed sensitive prompts to Cisco AI Defense Allowed Sensitive Prompt, and repeated high-risk bursts to Cisco AI Defense Repeated High Risk Activity```
 68
 69| where is_allowed_sensitive_response=0 AND is_allowed_sensitive_prompt=0 AND NOT (is_high_risk=1 AND (high_risk_event_count>=5 OR same_high_risk_event_count>=3))
 70
 71
 72| stats count as event_count
 73        dc(event_id) as distinct_event_count
 74        min(event_time) as firstTime
 75        max(event_time) as lastTime
 76        values(event_id) as event_ids
 77        values(event_action) as event_actions
 78        values(event_message_type) as message_types
 79        values(resource_type) as resource_types
 80        values(model.model_name) as model_names
 81        values(application_name) as application_name
 82        values(connection_name) as connection_name
 83        values(policy_name) as policy_names
 84        values(guardrail_ruleset_type) as guardrail_ruleset_types
 85        values(guardrail_entity_name) as guardrail_entity_names
 86        max(risk_score) as risk_score
 87    by _time application_key connection_key action message_type severity
 88
 89
 90| `security_content_ctime(firstTime)`
 91
 92| `security_content_ctime(lastTime)`
 93
 94
 95| table _time firstTime lastTime application_key application_name connection_key connection_name
 96        action message_type severity risk_score event_count distinct_event_count event_ids
 97        resource_types model_names policy_names guardrail_ruleset_types guardrail_entity_names
 98
 99
100| `cisco_ai_defense_security_alerts_by_application_name_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_security_alerts_by_application_name_filter search *
cisco_ai_defense_security_alerts_by_application_name_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.AE
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) No
Creates Intermediate Finding (Risk Event) Yes
Anomaly detections generate Intermediate Findings (Risk Events). They do not generate a Finding (Notable) directly.

Implementation

Install and configure the Cisco Security Cloud app to ingest Cisco AI Defense alerts into Splunk with the cisco:ai:defense sourcetype. 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.

Known False Positives

False positives may vary based on Cisco AI Defense configuration; monitor and filter out the alerts that are not relevant to your environment.

Associated Analytic Story

Intermediate Findings

Message Entity Field Entity Type Risk Score
Cisco AI Defense summarized [$event_count$] events for application [$application_name$] and connection [$connection_name$] over ten minutes. Actions [$action$], message direction [$message_type$], severity [$severity$], guardrails [$guardrail_ruleset_types$], event IDs [$event_ids$]. application_name other 50

References

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: 8