completed: 2026-02

This program is vibe-coded in Gemini AI and Claude code and is from the original program created by Josh Madakor


Overview

The Agentic SOC Analyst is an advanced threat-hunting tool that leverages Large Language Models (LLMs) to automate complex Security Operations Center (SOC) workflows. It acts as an “AI Agent” that bridges the gap between natural language security inquiries and technical Azure Log Analytics data. By combining an intuitive Tkinter-based GUI with powerful backend logic, the tool enables analysts to perform rapid investigation, automated KQL generation, and deep log analysis.

Key Features

  • Natural Language to KQL: Translates plain-English investigation requests (e.g., “Find suspicious logins from last night”) into precise, efficient Azure Kusto Query Language (KQL).
  • Self-Healing Queries: Features an automated “Self-Heal” mechanism that detects KQL syntax errors or schema mismatches and uses the AI to automatically rewrite and fix the query before retrying.
  • Automated Threat Analysis: Batches log results and analyzes them against known MITRE ATT&CK tactics and techniques, providing confidence scores and actionable recommendations.
  • Multi-Tabbed GUI: A modern “Dark SOC” themed interface built with Tkinter, featuring dedicated tabs for AI Investigation, Manual KQL, Findings Management, and Session Logs.
  • Export & Reporting: Support for exporting findings in JSON, TXT, and CSV formats for integration into incident reports or ticketing systems.

Technical Stack

  • Language: Python 3.10+
  • AI Integration: OpenAI API (GPT-4o/GPT-5 models) for reasoning and KQL generation.
  • Cloud Infrastructure: Azure SDK (azure-monitor-query, azure-identity) for direct interaction with Log Analytics workspaces.
  • Frontend: Tkinter with customized ttk styles for a professional dark-mode aesthetic.
  • Data Handling: Pandas for CSV processing and log data manipulation.

Architecture & Engineering Highlights

  • Threaded Operations: To ensure the UI remains responsive during long-running API calls or log queries, the tool utilizes Python’s threading module with a custom CancelToken system to allow users to safely abort operations.
  • Agentic Prompt Engineering: Implements specialized system prompts that define “Rules of Engagement” for the AI, ensuring output is strictly formatted as valid JSON and adheres to security schema best practices (e.g., preferring CompromisedEntity over DeviceName in SecurityAlerts).
  • Batch Processing: To handle large datasets without exceeding LLM token limits, the engine automatically splits log data into manageable batches for analysis.

Project Impact

This tool demonstrates a significant reduction in “Mean Time to Detect” (MTTD) by allowing junior analysts to perform complex queries usually reserved for KQL experts. It also automates the tedious task of manual log correlation, surfacing critical MITRE ATT&CK-aligned findings in seconds.