Back to Articles

ExCyTIn-Bench: Microsoft's Framework for Testing LLM Agents Against Real Cybersecurity Threats

[ View on GitHub ]

ExCyTIn-Bench: Microsoft's Framework for Testing LLM Agents Against Real Cybersecurity Threats

Hook

When GPT-4 was asked to investigate a real security breach, it missed 73% of the attack chain connections that a junior SOC analyst would catch. Microsoft built ExCyTIn-Bench to measure exactly this gap—and the results are unsettling.

Context

Security Operations Centers face an overwhelming volume of alerts daily, with tier-1 analysts spending hours correlating events across fragmented data sources to piece together attack narratives. The promise of LLM-powered security agents has captivated the industry: imagine AI assistants that can autonomously investigate incidents, query security logs, and present coherent threat timelines. Yet despite impressive demos, we've lacked rigorous ways to measure whether these agents can actually perform real threat hunting.

Existing AI benchmarks test general reasoning or basic cybersecurity knowledge through multiple-choice questions, but investigating actual security incidents requires something entirely different—the ability to construct queries across relational data, follow lateral movement patterns, correlate timestamps, and reason about attacker behavior across multiple linked events. Microsoft's SecRL repository addresses this gap with ExCyTIn-Bench (Extensible Cyber Threat Investigation Benchmark), a framework that deploys real anonymized security incident data in MySQL databases and tests whether LLM agents can answer investigative questions that require multi-hop reasoning across SecurityIncident and SecurityAlert tables. This isn't about recalling CVE numbers; it's about whether AI can think like a threat hunter.

Technical Insight

ExCyTIn-Bench's architecture reveals sophisticated thinking about evaluation methodology. At its core sits a MySQL database containing eight different attack scenarios—ransomware campaigns, lateral movement patterns, data exfiltration chains—all anonymized but preserving the relational structure that makes real investigations challenging. The system deploys via Docker containers, with each incident potentially consuming 10GB of disk space for the full forensic timeline.

The brilliance lies in how questions are generated and categorized. Rather than manually writing test cases, the framework constructs directed graphs from the security logs, where nodes represent entities (hosts, users, processes) and edges represent relationships (connections, authentications, file operations). It then uses advanced reasoning models like O1 and O3 to generate investigation questions that require traversing these graphs. Here's what the question generation process looks like in practice:

# Simplified representation of graph construction
from collections import defaultdict

class SecurityGraph:
    def __init__(self, incidents, alerts):
        self.graph = defaultdict(list)
        self.entities = {}
        
        # Build graph from security events
        for alert in alerts:
            source = alert['source_entity']
            target = alert['target_entity']
            
            self.graph[source].append({
                'target': target,
                'event_type': alert['event_type'],
                'timestamp': alert['timestamp'],
                'alert_id': alert['id']
            })
            
    def find_attack_paths(self, start_entity, max_hops=5):
        """Find multi-hop attack chains from initial compromise"""
        paths = []
        visited = set()
        
        def dfs(entity, path, hops):
            if hops > max_hops or entity in visited:
                return
            visited.add(entity)
            
            for edge in self.graph[entity]:
                new_path = path + [edge]
                paths.append(new_path)
                dfs(edge['target'], new_path, hops + 1)
                
        dfs(start_entity, [], 0)
        return paths

The framework then calculates "path relevance scores" for each generated question based on how many graph edges must be traversed to answer it. Questions requiring single-table lookups get low scores; questions demanding correlation across five SecurityAlert records and temporal reasoning get high scores. This scoring drives the train-test split—ensuring the test set contains genuinely challenging multi-hop investigations rather than simple fact retrieval.

What makes this particularly clever is the integration with AG2 (formerly AutoGen) for agent orchestration. The benchmark doesn't just send raw prompts to LLMs; it evaluates complete agent systems that can maintain conversation context, execute SQL queries, and iterate on results. An agent might need to first query for all alerts on a compromised host, then trace lateral movement by following authentication events, then identify data staging by analyzing file operations—all requiring multiple tool calls and reasoning steps.

The evaluation methodology uses GPT-4o as an LLM judge, comparing agent responses against reference answers with a rubric covering correctness, completeness, and reasoning quality. The benchmark includes both zero-shot evaluation and few-shot in-context learning scenarios, where agents can "learn" from training questions before tackling test cases. This enables research into whether LLM agents can perform continual learning during security operations—improving their investigation techniques as they encounter more incidents.

Microsoft's results across Claude Opus-4.5, GPT-5.1, Qwen-235B, and Grok-4 reveal that even cutting-edge models struggle with multi-hop reasoning in security contexts. Accuracy drops precipitously as path relevance scores increase, suggesting these agents excel at surface-level queries but falter when investigations require connecting disparate events across time and entities—exactly the skills that separate junior analysts from experienced threat hunters.

Gotcha

The infrastructure requirements are non-trivial. You're looking at 33GB for the complete dataset, plus Docker overhead, plus the computational cost of running evaluation queries. If you're on a laptop or have limited disk space, you'll need to work with individual incidents rather than the full benchmark suite. The Docker dependency also means you can't easily deploy this in restricted environments or integrate it into lightweight CI/CD pipelines.

More fundamentally, the anonymization cuts both ways. While it enables public release without exposing sensitive data, it also means the entities, timestamps, and some attack patterns are sanitized in ways that might not reflect real-world investigation complexity. Actual threat hunting involves domain knowledge—recognizing that "SYSTEM" behaving unusually matters more than "User_A743" doing the same. The benchmark abstracts away this contextual richness. Additionally, the reliance on GPT-4o as the evaluation judge introduces vendor lock-in and reproducibility concerns. If OpenAI changes their model or API, your evaluation scores might shift. The framework doesn't currently support pluggable judge models or provide judge agreement metrics across different evaluators, which would strengthen confidence in the benchmarking results.

Verdict

Use ExCyTIn-Bench if you're building LLM-powered security tools and need rigorous evaluation of their threat investigation capabilities, if you're researching agent reasoning in specialized domains, or if you're a security team considering AI augmentation and want to benchmark solutions against realistic scenarios before deployment. The framework provides unprecedented insight into where current LLM agents succeed and fail in security operations. Skip if you need production security tooling (this is purely a benchmark, not an operational system), if you lack the infrastructure for 30GB+ datasets and Docker deployments, or if you're looking for evaluation on non-anonymized real-world data where domain context matters. This is a research and evaluation framework for developers and security researchers, not an end-user security product.

// ADD TO YOUR README
[![Featured on Starlog](https://starlog.is/api/badge/llm-engineering/microsoft-secrl.svg)](https://starlog.is/api/badge-click/llm-engineering/microsoft-secrl)