Listen to this Post
The integration of Security Copilot with Microsoft Sentinel enables autonomous anomaly detection and incident creation, showcasing a shift from traditional summarization to AI-driven analysis. This approach leverages AI to identify anomalies directly from data, paving the way for advanced producer-reviewer agent architectures in cybersecurity.
Key Resources:
- Starting Point: Hesham’s Blog Post
- Experiment Code: GitHub Repository
You Should Know:
1. Setting Up Security Copilot with Sentinel
To replicate this use case, follow these steps:
Prerequisites:
- Microsoft Sentinel instance
- Security Copilot access (requires Azure AI integration)
- KQL (Kusto Query Language) knowledge
Steps:
1. Enable Security Copilot in Sentinel:
Connect to Azure Connect-AzAccount Enable Security Copilot module Set-AzSecurityCopilot -WorkspaceName "YourSentinelWorkspace" -Enable
2. Create an Automated Anomaly Detection Query:
SecurityEvent | where EventID == 4625 // Failed logins | summarize FailedAttempts = count() by Account | where FailedAttempts > 5 | extend AnomalyScore = log(FailedAttempts)
3. Trigger Incident Creation via Logic Apps:
- Use Azure Logic Apps to parse Copilot’s output.
- Deploy an HTTP trigger to Sentinel’s Incident API:
curl -X POST -H "Authorization: Bearer $token" -H "Content-Type: application/json" -d '{"title":"AI-Generated Incident","severity":"Medium"}' https://management.azure.com/subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.SecurityInsights/incidents
2. Implementing a Producer-Reviewer Agent System
The proposed dual-agent system involves:
- Producer Agent: Runs KQL queries, detects anomalies, drafts incidents.
- Reviewer Agent: Validates incidents using predefined rules.
Example Workflow:
Producer Agent (Pseudocode) anomalies = SecurityCopilot.detect_anomalies(logs) if anomalies: incident = Sentinel.create_incident(anomalies) ReviewerAgent.review(incident) Reviewer Agent def review(incident): if incident.confidence > 0.8: incident.approve() else: incident.flag_for_manual_review()
3. Optimizing KQL for AI-Driven Analysis
Since Copilot processes large datasets, query efficiency is critical:
– Filter early: Reduce dataset size before AI processing.
– Use summarization:
SigninLogs | summarize FailedLogins=countif(ResultType != "0"), UniqueIPs=dcount(IPAddress) by UserPrincipalName | where FailedLogins > 3
What Undercode Say
This experiment demonstrates how Security Copilot can evolve beyond basic summarization into autonomous threat detection. Future applications may include:
– Self-healing SOCs: AI agents auto-remediate low-risk alerts.
– Dynamic Tuning: Machine learning adjusts KQL thresholds in real-time.
Key Commands to Explore:
Check Sentinel incidents via CLI az sentinel incident list --workspace-name "YourWorkspace" Automate responses with Azure Functions func azure functionapp publish YourFunction --python
Expected Output:
- AI-generated incidents in Sentinel.
- Reduced manual triage through automated review agents.
- Scalable anomaly detection with optimized KQL.
For further implementation:
References:
Reported By: Mariocuomo Securitycopilot – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅



