<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pirate Kitty on Medium]]></title>
        <description><![CDATA[Stories by Pirate Kitty on Medium]]></description>
        <link>https://medium.com/@the_pirate_kitty?source=rss-f90557ba38c4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*jywdScRDD2q-OlTPP-Redg@2x.jpeg</url>
            <title>Stories by Pirate Kitty on Medium</title>
            <link>https://medium.com/@the_pirate_kitty?source=rss-f90557ba38c4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 14:01:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@the_pirate_kitty/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Connecting the Clues: Building a Cross-SIEM Investigation Framework with Claude Code]]></title>
            <link>https://medium.com/@the_pirate_kitty/connecting-the-clues-building-a-cross-siem-investigation-framework-with-claude-code-1cb11cd83400?source=rss-f90557ba38c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cb11cd83400</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security-operations]]></category>
            <dc:creator><![CDATA[Pirate Kitty]]></dc:creator>
            <pubDate>Mon, 03 Aug 2026 20:51:26 GMT</pubDate>
            <atom:updated>2026-08-03T20:51:26.741Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RbV9FlKMC0Rfa55l" /><figcaption>Photo by <a href="https://unsplash.com/@ashleybatz?utm_source=medium&amp;utm_medium=referral">Ashley Batz</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>How I designed a reusable workflow for correlating Windows Sysmon activity with AWS CloudTrail events across Splunk and Azure Data Explorer</strong></p><p>Security investigations rarely stay inside a single tool.</p><p>Endpoint activity may live in one platform. Cloud audit events may live in another. Identity evidence may be stored somewhere else entirely. Even when an organization has a central SIEM, analysts often need to reconstruct an incident from several sources that were never designed to tell one continuous story.</p><p>For the final project in my AI Cyber Defense Ops coursework, I explored that challenge by building a cross-SIEM investigation framework for correlating Windows Sysmon telemetry in Splunk with AWS CloudTrail events stored in Azure Data Explorer.</p><p>The project centered on one practical security question:</p><blockquote><em>When an AWS credential is used from a Windows workstation, can we connect the local process activity to the cloud actions that followed?</em></blockquote><p>Answering that question requires more than one query.</p><p>Sysmon can show which process launched, which user ran it, what the command line contained, and what parent process created it. CloudTrail can show which AWS API call occurred, which cloud identity made it, where the request originated, and whether the action succeeded.</p><p>Neither source provides the full truth by itself.</p><p>The goal of this project was to bring those fragments together in a repeatable, explainable investigation workflow.</p><h3>Why Cross-SIEM Correlation Matters</h3><p>Consider a developer workstation where a local user runs:</p><pre>aws sts get-caller-identity</pre><p>Sysmon can reveal the endpoint side of the action:</p><ul><li>The originating host</li><li>The operating-system user</li><li>The complete command line</li><li>The process identifier</li><li>The parent process</li><li>The execution timestamp</li></ul><p>CloudTrail can reveal the cloud side:</p><ul><li>The AWS API event</li><li>The IAM identity</li><li>The source IP address</li><li>The AWS CLI user agent</li><li>The result of the request</li><li>The AWS service involved</li><li>Whether the activity was read-only</li></ul><p>Sysmon may confirm that aws.exe ran, but it cannot prove that the request reached AWS or show what AWS processed.</p><p>CloudTrail may confirm that an API call occurred, but it does not automatically identify the local workstation, Windows user, or process tree that initiated it.</p><p>The course presents this as a conceptual challenge before a technical one: the two systems hold different parts of the same action, and time may be the only field they have directly in common.</p><p>Cross-SIEM correlation helps transform those separate records into a single investigative narrative.</p><h3>Defining the Threat Scenario</h3><p>A general-purpose correlation persona could have been built, but I wanted this project to begin with a clear investigative specialty.</p><p>I selected <strong>credential and identity pivot investigations</strong>.</p><p>The persona is designed to examine situations where activity begins with a local Windows identity and continues through an AWS IAM identity.</p><p>Its primary questions include:</p><ul><li>Were AWS credentials used from the expected workstation and local user?</li><li>Did the local AWS CLI command produce the expected CloudTrail activity?</li><li>Did the request originate from an unusual source IP address or user agent?</li><li>Are there CloudTrail actions with no corresponding endpoint process event?</li><li>Are there local AWS CLI executions that never produced cloud activity?</li><li>Did benign identity verification progress into discovery, enumeration, privilege use, or resource access?</li></ul><p>This focus gave the persona a meaningful specialty without limiting the broader framework. The same correlation model can later be adapted to other cloud actions, identity systems, or telemetry sources.</p><h3>Building the Cross-SIEM Analyst Persona</h3><p>The first major deliverable was a new Cross-SIEM Analyst persona for Claude Code.</p><p>I added it to my existing claude-security-personas repository, which is designed as a growing collection of reusable security roles.</p><p>The Cross-SIEM Analyst is an investigative persona rather than a general coding assistant. Its role is to examine evidence across systems, explain relationships, preserve uncertainty, and route findings to the appropriate specialist when needed.</p><p>Its default behavior requires it to:</p><ul><li>Examine both telemetry sources before drawing conclusions</li><li>Bound every query by time</li><li>Separate observed facts from inference</li><li>Divide findings into matched and unmatched groups</li><li>Assign confidence to every proposed correlation</li><li>Explain plausible reasons for missing matches</li><li>Preserve the exact queries used</li><li>Avoid overstating partial evidence</li><li>Escalate identity-focused findings to an IAM specialist</li><li>Escalate broader compromise indicators to incident response</li></ul><p>The persona does not treat two events occurring near each other as automatic proof that they belong together.</p><p>Instead, it evaluates several supporting signals and explains why a match is high, medium, or low confidence.</p><p>That distinction is important. A useful investigative assistant should not merely produce conclusions. It should show how those conclusions were reached and where uncertainty remains.</p><h3>Mapping AWS CLI Commands to CloudTrail Events</h3><p>One of the most interesting parts of the project was translating a command typed on a workstation into the API event expected in CloudTrail.</p><p>For many AWS CLI operations, the transformation is predictable.</p><p>For example:</p><pre>aws sts get-caller-identity</pre><p>typically corresponds to:</p><pre>GetCallerIdentity</pre><p>Likewise:</p><pre>aws iam list-users</pre><p>maps to:</p><pre>ListUsers</pre><p>The first argument after aws also helps identify the expected CloudTrail event source:</p><pre>sts  →  sts.amazonaws.com<br>iam  →  iam.amazonaws.com<br>ec2  →  ec2.amazonaws.com</pre><p>The default transformation converts an AWS CLI verb from kebab-case into the PascalCase event name used by CloudTrail. The course also emphasizes that this is only a starting rule, because several commands do not map one-to-one.</p><p>High-level Amazon S3 commands are the clearest example.</p><p>A command such as:</p><pre>aws s3 sync ./dir s3://example-bucket/</pre><p>may produce several CloudTrail events, including object listings, metadata checks, and uploads.</p><p>A move operation may create both copy and delete activity.</p><p>A paginated list operation may produce multiple CloudTrail records from one local command.</p><p>Other commands remain entirely local:</p><pre>aws configure<br>aws --version<br>aws help<br>aws s3 presign</pre><p>Those may appear in Sysmon without producing a corresponding CloudTrail event.</p><p>That does not automatically mean the cloud record is missing or that suspicious activity occurred. It may simply mean no AWS API request was expected.</p><p>These exceptions became part of the persona’s reasoning rules and the standalone project’s field-mapping documentation.</p><h3>Creating the Standalone Investigation Framework</h3><p>The second major deliverable was a separate repository dedicated to the investigation workflow:</p><pre>aws-cross-siem-correlation/<br>├── correlation-queries/<br>│   ├── identity-pivot.spl.md<br>│   └── identity-pivot.kql.md<br>├── fixtures/<br>│   ├── sample-sysmon-events.json<br>│   └── sample-cloudtrail-events.json<br>├── field-mapping.md<br>├── validation-notes.md<br>├── README.md<br>├── LICENSE<br>└── .gitignore</pre><p>This separation was intentional.</p><p>The persona repository contains reusable investigative expertise.</p><p>The standalone repository contains the concrete Sysmon-to-CloudTrail use case, including:</p><ul><li>SPL query templates</li><li>KQL query templates</li><li>Field mappings</li><li>Synthetic telemetry</li><li>Correlation guidance</li><li>Confidence rules</li><li>Validation notes</li><li>Future live-testing requirements</li></ul><p>Keeping those layers separate prevents the persona from becoming tied to one lab or one set of endpoints.</p><p>It also makes the project easier to extend. The same persona could eventually support different SIEM products or additional telemetry sources, while the investigation repository remains focused on one defined correlation pattern.</p><h3>Building the Correlation Model</h3><p>The framework does not depend on one perfect join key.</p><p>Instead, it evaluates several signals together.</p><h3>Time</h3><p>A Sysmon process event and its corresponding CloudTrail event should usually occur within a short period.</p><p>The default correlation window is narrow enough to remain meaningful while still accounting for normal processing and ingestion delay.</p><p>The course recommends beginning with a window of approximately plus or minus 60 seconds and expanding only when there is a documented reason, such as clock drift or delayed ingestion.</p><h3>Command semantics</h3><p>The AWS CLI service and verb help determine which CloudTrail event name and event source should be expected.</p><p>For example, an STS identity command should not normally be correlated with an unrelated EC2 write event simply because the timestamps are close.</p><h3>User agent</h3><p>CloudTrail activity containing an AWS CLI user-agent signature provides strong evidence that the request originated from command-line tooling.</p><p>This does not prove which workstation generated it, but it strengthens the correlation.</p><h3>Source IP address</h3><p>When the workstation’s expected egress address is known, CloudTrail’s source IP can provide an additional confirmation signal.</p><p>An unexpected address may indicate:</p><ul><li>Use from another workstation</li><li>Use from automation</li><li>Use from a cloud-hosted system</li><li>Credential misuse</li><li>A legitimate network path that has not yet been documented</li></ul><h3>Identity context</h3><p>The Windows user and the AWS IAM identity are separate identities.</p><p>The framework does not treat them as interchangeable. Instead, it explains the transition:</p><ul><li>A local operating-system user launched the process.</li><li>The AWS CLI used configured credentials.</li><li>AWS recorded activity under the associated IAM identity.</li></ul><p>That host-to-cloud identity relationship is the core of the project.</p><h3>Read-only behavior</h3><p>Commands beginning with verbs such as Get, List, or Describe should generally correspond to read-only CloudTrail activity.</p><p>If a supposedly read-only command aligns with a write operation, the mismatch deserves additional investigation.</p><h3>Reporting Matches and Gaps</h3><p>The output model divides evidence into three main groups.</p><h3>Matched Events</h3><p>These are Sysmon and CloudTrail records that align through several supporting signals, such as:</p><ul><li>Timestamp proximity</li><li>Expected API mapping</li><li>Matching AWS service</li><li>AWS CLI user agent</li><li>Source IP evidence</li><li>Identity context</li><li>Read-only or write behavior</li></ul><p>Each match includes a confidence rating and a written explanation.</p><p>A high-confidence correlation should be supported by several independent signals, not only time.</p><h3>Unmatched Sysmon Events</h3><p>These show that the AWS CLI ran locally, but no corresponding CloudTrail event was identified.</p><p>Possible explanations include:</p><ul><li>A local-only command</li><li>Authentication failure</li><li>Network failure</li><li>Incorrect API mapping</li><li>A request outside the selected time window</li><li>Missing CloudTrail ingestion</li><li>Delayed event availability</li><li>A command that generated different events than initially expected</li></ul><p>The persona must provide a hypothesis rather than simply labeling the event “unmatched.”</p><h3>Unmatched CloudTrail Events</h3><p>These are AWS API calls for which no corresponding endpoint process event was found.</p><p>Possible explanations include:</p><ul><li>The credentials were used from another host</li><li>The activity came from a script or automation platform</li><li>The action originated from a cloud service</li><li>Endpoint telemetry was unavailable</li><li>The Sysmon event fell outside the query window</li><li>The AWS identity was used unexpectedly</li></ul><p>This group may be especially important during credential misuse investigations because it can reveal cloud activity that the expected workstation does not explain.</p><h3>Preserving the Queries</h3><p>The report also retains the SPL and KQL used during the investigation.</p><p>That supports:</p><ul><li>Reproducibility</li><li>Peer review</li><li>Auditability</li><li>Detection engineering</li><li>Later tuning</li><li>Validation against future data</li></ul><p>The final result is not only a conclusion. It is a documented investigative process.</p><h3>Validating Without the Live Environment</h3><p>The course demonstrated the workflow using an existing Constructing Defense environment containing Splunk, Sysmon, Azure Data Explorer, CloudTrail data, and authenticated access to both systems.</p><p>I did not have access to that environment during this project.</p><p>Rather than copying demonstration credentials or presenting unexecuted queries as tested results, I adapted the work for safe offline development.</p><p>I created fictional Sysmon and CloudTrail fixtures using:</p><ul><li>Synthetic hostnames</li><li>Fabricated users</li><li>Fabricated AWS identities</li><li>Documentation-only IP ranges</li><li>Reserved example domains</li><li>Fictional account identifiers</li><li>No real passwords, tokens, systems, or cloud resources</li></ul><p>The synthetic evidence allowed me to review:</p><ul><li>Field alignment</li><li>Query structure</li><li>AWS CLI mapping logic</li><li>Matching categories</li><li>Confidence rules</li><li>Expected report content</li><li>Escalation decisions</li></ul><p>The repository clearly distinguishes between completed implementation and deferred live validation.</p><h3>Completed</h3><ul><li>Cross-SIEM Analyst persona</li><li>SPL query templates</li><li>KQL query templates</li><li>Sysmon-to-CloudTrail field mapping</li><li>AWS CLI-to-CloudTrail reasoning rules</li><li>Confidence model</li><li>Escalation guidance</li><li>Synthetic event fixtures</li><li>Offline validation documentation</li><li>Public project documentation</li></ul><h3>Deferred</h3><ul><li>Live execution against Splunk</li><li>Live execution against Azure Data Explorer</li><li>Correlation using paired real Sysmon and CloudTrail telemetry</li><li>Measurement of real ingestion delay</li><li>Validation of environmental clock drift</li><li>Testing against the full Constructing Defense range</li></ul><p>This creates a clean and honest checkpoint.</p><p>The project can be resumed later without pretending that live validation occurred when it did not.</p><h3>Security and Privacy Decisions</h3><p>The source material included lab-specific endpoints and demonstration credentials for convenience.</p><p>I deliberately excluded those details from both public repositories.</p><p>The published work contains no:</p><ul><li>Passwords</li><li>Personal access tokens</li><li>Azure bearer tokens</li><li>AWS access keys</li><li>Private lab addresses</li><li>Instructor account details</li><li>Personal cloud identities</li><li>Production account identifiers</li><li>Live investigation reports</li><li>Environment-specific secrets</li></ul><p>Generated reports and local settings are also separated from reusable public content.</p><p>This was not a secondary concern.</p><p>A security project is incomplete if publishing it exposes the environment it was designed to protect.</p><p>The technical workflow and the publication workflow both needed guardrails.</p><h3>What I Learned</h3><p>The central lesson was not simply how to write SPL or KQL.</p><p>It was how to design an investigation when evidence is fragmented and no perfect join key exists.</p><p>Cross-system investigations require analysts to reason about:</p><ul><li>Which source can answer each part of the question</li><li>Which fields are genuinely comparable</li><li>Which signals strengthen a match</li><li>Which assumptions must remain explicit</li><li>What normal mismatches look like</li><li>How confidence should change as evidence accumulates</li><li>When an anomaly should be escalated</li><li>Which specialist should receive the handoff</li></ul><p>The project also reinforced the importance of giving AI a carefully bounded role.</p><p>The Cross-SIEM Analyst is not instructed to invent certainty, collapse identities together, or treat every mismatch as compromise.</p><p>It is instructed to:</p><ul><li>Preserve partial truth</li><li>Explain ambiguity</li><li>Show its work</li><li>Identify missing evidence</li><li>Distinguish fact from inference</li><li>Escalate responsibly</li></ul><p>That is what makes the persona useful as an investigative partner rather than merely a query generator.</p><h3>Extending the Pattern</h3><p>Although this project focuses on Sysmon and CloudTrail, the underlying pattern can support many other investigations.</p><p>Examples include:</p><ul><li>Endpoint detection telemetry correlated with Sysmon</li><li>Entra ID sign-ins correlated with Azure Activity Log events</li><li>GitHub audit activity correlated with cloud deployments</li><li>CI/CD pipeline activity correlated with AWS identity use</li><li>DNS telemetry correlated with endpoint network connections</li><li>Email-security events correlated with endpoint activity</li><li>Cloud control-plane activity correlated with local administrative tools</li></ul><p>Each version would require its own:</p><ul><li>Field mapping</li><li>Query logic</li><li>Expected behavior</li><li>Normal exceptions</li><li>Correlation windows</li><li>Confidence rules</li><li>Escalation paths</li></ul><p>The broader lesson is that cross-SIEM correlation is not one fixed integration.</p><p>It is a reusable reasoning pattern for connecting evidence across systems.</p><h3>Completing the Project</h3><p>This work was completed as part of the <a href="https://learn.justhacking.com/courses/3a440c2c-1a0f-4b14-b5c9-bf6cf47dade9/take"><strong>AI Cyber Defense Ops</strong></a> course from <a href="https://www.justhacking.com/"><strong>Just Hacking Training</strong></a>, with support from the inspiring <a href="https://www.wicys.org/"><strong>WiCyS</strong></a><strong> </strong>(Women in Cybersecurity) cohort that introduced me to the program.</p><blockquote>This has been the final module of this course, and my work can be viewed on my <strong>GitHub</strong> at <a href="https://github.com/Pirate-Kitty/aws-cross-siem-correlation">aws-cross-siem-correlation</a></blockquote><p>The project brought together several ideas from across the course:</p><ul><li>Reusable personas</li><li>Command-line workflows</li><li>Structured reporting</li><li>Safe configuration</li><li>Evidence-driven investigation design</li><li>Public documentation</li><li>Security-conscious publication practices</li></ul><p>Two telemetry platforms.<br>Two query languages.<br>Two different views of the same activity.<br>One investigative story.</p><p>The most valuable lesson was not any single query, platform, or Claude feature.</p><p>It was learning how to identify a problem, choose the right component, build the workflow carefully, preserve uncertainty, and create something reusable for future investigations.</p><p>That is the capability I am carrying forward.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cb11cd83400" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Reusable Library of Claude Code Security Personas]]></title>
            <link>https://medium.com/@the_pirate_kitty/building-a-reusable-library-of-claude-code-security-personas-d3adc563abb3?source=rss-f90557ba38c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3adc563abb3</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ai-security]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <dc:creator><![CDATA[Pirate Kitty]]></dc:creator>
            <pubDate>Fri, 31 Jul 2026 21:20:55 GMT</pubDate>
            <atom:updated>2026-07-31T21:20:55.205Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YmJ0pwxhfsWDXwf4" /><figcaption>Photo by <a href="https://unsplash.com/@hidefu?utm_source=medium&amp;utm_medium=referral">hidefumi ohmichi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Turning one security-prompting exercise into a practical, extensible toolkit for 15 cybersecurity roles</h3><p>Cybersecurity work rarely fits into a single mindset.</p><p>An analyst may begin the day triaging alerts, shift into incident response, investigate an identity compromise, review a detection rule, and later help assess a cloud configuration or application design. Each task requires a different set of priorities, safeguards, questions, and output formats.</p><p>Claude Code can support all of those activities, but its default system prompt is designed primarily for software-engineering work. Without additional guidance, every new security session may begin with the same repeated instructions:</p><ul><li>Preserve evidence.</li><li>Distinguish facts from inferences.</li><li>Map findings to MITRE ATT&amp;CK.</li><li>Include false-positive analysis.</li><li>Do not make changes to the subject system.</li><li>Explain what would disprove the current hypothesis.</li></ul><p>System-prompt personas offer a way to define that working mindset once and reuse it consistently.</p><p>What began as an exercise to create three security personas grew into a public, tested library of <strong>15 distinct Claude Code security personas</strong>, each available as both a plain Markdown prompt and a selectable Output Style. The repository also includes testing records, installation guidance, role boundaries, a contribution guide, and a roadmap for future expansion.</p><blockquote>This repository can be found on my GitHub: <a href="https://github.com/Pirate-Kitty/claude-security-personas">claude-security-personas</a></blockquote><h3>What a Persona Changes</h3><p>A persona does not replace the rest of the Claude Code ecosystem.</p><p>Instead, it occupies a specific layer:</p><ul><li>CLAUDE.md describes the project and environment.</li><li>Skills provide reusable methodologies.</li><li>Commands package explicit workflows.</li><li>MCP servers provide tools and knowledge sources.</li><li>Hooks enforce deterministic safeguards.</li><li>Personas shape the mindset Claude applies throughout the session.</li></ul><p>The course described this distinction especially well: project context establishes where Claude is working, skills influence how work is performed, and the persona establishes who Claude is acting as during that session.</p><p>A strong persona influences:</p><ul><li>priorities</li><li>default questions</li><li>decision-making posture</li><li>preferred frameworks and formats</li><li>safety constraints</li><li>response structure</li><li>escalation and handoff behavior</li></ul><p>For example, a Threat Hunter should generate hypotheses and pivots. An Incident Responder should preserve evidence and reconstruct a timeline. A Detection Engineer should produce testable rules with concrete false-positive analysis.</p><p>The tools available underneath may remain the same, but the reasoning lens changes.</p><h3>The Six-Section Persona Pattern</h3><p>Every persona in this project uses the same structure:</p><ol><li><strong>Role</strong></li><li><strong>Priorities</strong></li><li><strong>Default Behaviors</strong></li><li><strong>Tool and Format Preferences</strong></li><li><strong>Constraints</strong></li><li><strong>Output Style</strong></li></ol><p>This consistency is important.</p><p>The Role section establishes the job being performed. Priorities define which trade-offs matter most. Default Behaviors identify practices that should appear in every relevant response. Tool and Format Preferences establish frameworks, query languages, schemas, and presentation conventions. Constraints define what the persona must avoid. Output Style creates a predictable deliverable.</p><p>This makes each persona understandable, reviewable, testable, and easier to extend.</p><p>It also prevents a persona from becoming little more than a job title followed by vague instructions to “act like an expert.”</p><h3>The First Three Personas</h3><p>The original exercise focused on three defensive roles.</p><h3>Threat Hunter</h3><p>The Threat Hunter persona works from hypotheses and weak signals rather than confirmed alerts.</p><p>It is expected to:</p><ul><li>state the working hypothesis</li><li>map observations to MITRE ATT&amp;CK</li><li>suggest multiple pivots</li><li>identify contradictory evidence</li><li>ask what would disprove the hypothesis</li><li>communicate confidence and uncertainty</li></ul><p>Its output is structured around hypothesis, supporting evidence, evidence against, next pivots, and confidence.</p><h3>Incident Responder</h3><p>The Incident Responder persona treats systems and artifacts as potential evidence.</p><p>Its priorities include:</p><ul><li>evidence preservation</li><li>timeline accuracy</li><li>separation of observed facts from inference</li><li>IOC tracking</li><li>clear identification of evidence gaps</li><li>read-only collection during investigative phases</li></ul><p>The persona explicitly avoids destructive or evidence-altering recommendations unless the user clearly states that the investigation has entered containment.</p><h3>Detection Engineer</h3><p>The Detection Engineer persona treats every rule as something that must eventually survive production use.</p><p>Each rule must include:</p><ul><li>the detection logic</li><li>a plain-language explanation</li><li>ATT&amp;CK mapping</li><li>positive and negative tests</li><li>specific false-positive scenarios</li><li>performance considerations</li><li>telemetry requirements</li><li>tuning guidance</li></ul><p>This persona retains Claude Code’s coding-oriented instructions because it regularly creates Sigma YAML, SPL, KQL, and other rule artifacts.</p><h3>Expanding Beyond the Exercise</h3><p>Once the original three personas were complete, the pattern proved too useful to leave there.</p><p>The project expanded in several controlled iterations, with each new role required to have a distinct purpose and clear boundaries from the existing collection.</p><h3>Security Operations and Validation</h3><p><strong>SOC Analyst L1</strong> focuses on rapid, consistent alert triage, enrichment, severity assessment, escalation criteria, and concise case notes.</p><p><strong>Purple Teamer</strong> plans authorized simulations, maps activity to ATT&amp;CK, compares expected telemetry with observed results, and identifies gaps in detections and controls.</p><h3>Cloud and Identity</h3><p><strong>Cloud Security Engineer</strong> evaluates cloud posture, provider-specific controls, logging, identity, infrastructure as code, and repeatable remediation across AWS, Azure, and Google Cloud.</p><p><strong>IAM Investigator</strong> approaches investigations through identities, authentication, authorization, OAuth, SSO, MFA, conditional access, privilege changes, sessions, and tokens.</p><h3>Evidence and Technical Analysis</h3><p><strong>Malware Analyst</strong> follows a static-first, evidence-driven approach to examining suspicious files, extracting characteristics and indicators while avoiding premature execution or attribution.</p><p><strong>Digital Forensics Examiner</strong> emphasizes provenance, verified working copies, hashes, transformations, timeline reconstruction, and strict separation of facts from analyst interpretation.</p><p><strong>Vulnerability Analyst</strong> distinguishes scanner output from validated findings and evaluates exploitability, exposure, business impact, compensating controls, and remediation priority.</p><h3>Governance and Risk</h3><p><strong>GRC Analyst</strong> separates policy, procedure, implementation, evidence, and operating effectiveness. It supports framework mapping and auditor-ready reporting without treating document existence as proof that a control is functioning.</p><h3>Intelligence, Architecture, and Secure Delivery</h3><p><strong>Threat Intelligence Analyst</strong> converts raw reporting and indicators into assessed intelligence. It evaluates source reliability separately from information credibility, records confidence, preserves provenance, and avoids weak attribution claims.</p><p><strong>Application Security Engineer</strong> reviews applications, APIs, configurations, and software designs. It establishes trust boundaries and application context before naming a vulnerability, then provides secure remediation and regression-test guidance.</p><p><strong>Security Architect</strong> begins with business objectives, system boundaries, assets, data flows, trust zones, and threat assumptions. It defines technology-neutral requirements before recommending products and documents trade-offs and residual risk.</p><p><strong>DevSecOps Engineer</strong> integrates security controls into build, deployment, infrastructure, and release workflows. It emphasizes staged adoption, reproducibility, least-privilege pipeline access, testing, rollback planning, and explicit ownership.</p><p>The final expansion brought the repository to 15 personas and added nearly 1,000 lines of persona, testing, roadmap, and contributor documentation in a single reviewed iteration. (<a href="https://github.com/Pirate-Kitty/claude-security-personas/commit/bf70a857d11e9bd4bcecc9544c8f0025256d171d">GitHub</a>)</p><h3>Plain Personas and Output Styles</h3><p>Each role is represented twice.</p><h3>Plain Markdown Personas</h3><p>The plain persona files can be loaded at session launch with:</p><pre>claude --append-system-prompt-file &lt;persona-file&gt;</pre><p>Appending is the preferred everyday pattern because it preserves Claude Code’s built-in tool-use, editing, and safety instructions while adding the security role’s mindset.</p><p>Bash aliases make these personas available through memorable commands such as:</p><pre>claude-hunter<br>claude-ir<br>claude-de</pre><p>Additional aliases follow the same pattern for the expanded collection.</p><h3>Output Styles</h3><p>Each persona also has a corresponding Output Style with YAML frontmatter.</p><p>Output Styles can be discovered through Claude Code’s standard configuration directories and selected through the interactive configuration menu. They are useful when a persona should be selectable from a menu or pinned as a project default.</p><p>The keep-coding-instructions setting is chosen according to the role.</p><p>Personas that regularly create or modify code-like artifacts retain coding instructions. Examples include:</p><ul><li>Detection Engineer</li><li>Purple Teamer</li><li>Cloud Security Engineer</li><li>Application Security Engineer</li><li>DevSecOps Engineer</li></ul><p>Primarily investigative, analytical, architectural, or reporting personas generally do not.</p><h3>Testing the Mindset, Not Just the File</h3><p>Creating a Markdown file does not prove that a persona works.</p><p>Each persona was tested with fictional data and acceptance criteria designed around its expected behavior.</p><p>The tests asked questions such as:</p><ul><li>Did the Threat Hunter state a hypothesis and identify disconfirming pivots?</li><li>Did the Incident Responder avoid destructive recommendations?</li><li>Did the Detection Engineer include positive and negative tests?</li><li>Did the SOC Analyst remain within triage scope rather than performing full incident response?</li><li>Did the IAM Investigator distinguish authentication from authorization?</li><li>Did the Vulnerability Analyst avoid treating scanner output as confirmation?</li><li>Did the GRC Analyst distinguish control documentation from operating effectiveness?</li><li>Did the Threat Intelligence Analyst separate source reliability from information credibility?</li><li>Did the Security Architect define requirements before products?</li><li>Did the DevSecOps Engineer preserve reliable delivery and explain rollback behavior?</li></ul><p>The project also tested multiple loading methods:</p><ul><li>interactive append mode</li><li>Output Style discovery</li><li>headless -p execution</li><li>--bare execution</li><li>restricted-tool operation</li><li>full system-prompt replacement</li></ul><p>Testing results and any corrective changes were recorded in TESTING.md, creating a repeatable baseline for later contributions.</p><h3>Clear Boundaries Make the Collection Stronger</h3><p>As the library grew, overlap became one of the largest design risks.</p><p>Many cybersecurity roles touch the same evidence, tools, or systems. The difference lies in the objective.</p><p>A Threat Intelligence Analyst may assess a report about an adversary. A Threat Hunter uses that intelligence to search telemetry. An Incident Responder reconstructs what happened after suspicious activity is identified. A Malware Analyst examines a sample associated with the activity. A Detection Engineer writes logic to find the behavior again.</p><p>Similarly, a Security Architect defines cross-domain requirements. A Cloud Security Engineer implements provider-specific controls. A DevSecOps Engineer integrates controls into delivery workflows. An Application Security Engineer reviews the software itself.</p><p>The personas therefore include explicit handoff boundaries. They state not only what the role does, but also when the task should move to another persona.</p><p>That makes the collection more realistic and reduces the chance that one persona becomes a generic “do all cybersecurity work” prompt.</p><h3>Making the Repository Extensible</h3><p>The project now includes two documents intended to support future contributors.</p><h3>CONTRIBUTING.md</h3><p>The contribution guide explains:</p><ul><li>how to select a distinct role</li><li>the required six-section structure</li><li>naming conventions</li><li>the paired persona and Output Style requirement</li><li>how to choose keep-coding-instructions</li><li>fictional-data testing requirements</li><li>safety and authorization expectations</li><li>required README and testing updates</li><li>publication-readiness checks</li></ul><h3>ROADMAP.md</h3><p>The roadmap makes it clear that the current collection is complete and usable while preserving ideas for future releases.</p><p>Possible additions include:</p><ul><li>Penetration Tester or Authorized Security Tester</li><li>Security Program Manager</li><li>Security Awareness and Training Specialist</li><li>Data Security and Privacy Engineer</li><li>Third-Party Risk Analyst</li><li>OT/ICS Security Analyst</li><li>Network Security Engineer</li><li>Security Automation or SOAR Engineer</li><li>Product Security Engineer</li><li>Mobile Security Analyst</li><li>Kubernetes or Container Security Engineer</li><li>Cryptography and Key Management Specialist</li><li>Business Continuity and Disaster Recovery Analyst</li><li>Insider Threat Analyst</li><li>Fraud or Abuse Analyst</li><li>Cybersecurity Policy Analyst</li><li>Security Researcher</li><li>Red Team Operator</li><li>AI Security Engineer</li></ul><p>These are not missing requirements. They are a backlog for anyone who wants to fork the repository, build a specialized collection, or contribute a carefully bounded role.</p><h3>What I Learned</h3><p>The most important lesson was that system prompts are not merely a place to add personality.</p><p>Used carefully, they can establish professional discipline.</p><p>A security persona can require evidence before conclusions, preserve uncertainty, prevent destructive recommendations, enforce specific deliverable formats, and create predictable handoffs between roles.</p><p>The project also reinforced that a good persona requires more than expertise language. It needs:</p><ul><li>a defined objective</li><li>explicit priorities</li><li>repeatable behaviors</li><li>clear safety limits</li><li>output requirements</li><li>tests that prove the behavior appears</li></ul><p>The result is not a replacement for professional judgment, organizational procedures, or qualified specialists. It is a reusable way to make AI-assisted security work more consistent, transparent, and role-aware.</p><h3>Final Project Outcome</h3><p>The completed repository now includes:</p><ul><li>15 cybersecurity personas</li><li>15 matching Output Styles</li><li>reusable alias and installation patterns</li><li>documented interactive and scripted usage</li><li>fictional-data behavioral testing</li><li>role-selection and handoff guidance</li><li>a contribution standard</li><li>a future expansion roadmap</li><li>a clean public project history</li></ul><p>What started as a small exercise in modifying Claude Code’s system prompt became a broad framework for applying distinct cybersecurity mindsets across technical, investigative, operational, architectural, intelligence, and governance work.</p><p>This work grew from the <a href="https://learn.justhacking.com/courses/3a440c2c-1a0f-4b14-b5c9-bf6cf47dade9/take"><strong>AI Cyber Defense Ops</strong></a><strong> </strong>course from <a href="https://www.justhacking.com/"><strong>Just Hacking Training</strong></a>, together with the encouragement and community provided by the phenomenal<strong> </strong><a href="https://www.wicys.org/"><strong>WiCyS</strong></a><strong> (</strong>Women in Cybersecurity) cohort that introduced me to the project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3adc563abb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Safer Purple-Team Workflow with Claude Code, Atomic Red Team, and Hayabusa]]></title>
            <link>https://medium.com/@the_pirate_kitty/building-a-safer-purple-team-workflow-with-claude-code-atomic-red-team-and-hayabusa-2f8d23996911?source=rss-f90557ba38c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f8d23996911</guid>
            <category><![CDATA[cybersecurity-automation]]></category>
            <category><![CDATA[purple-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[atomic-red-team]]></category>
            <category><![CDATA[threat-detection]]></category>
            <dc:creator><![CDATA[Pirate Kitty]]></dc:creator>
            <pubDate>Mon, 27 Jul 2026 14:49:54 GMT</pubDate>
            <atom:updated>2026-07-27T14:49:54.146Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tgrM6ERqh4IPArmX" /><figcaption>Photo by <a href="https://unsplash.com/@cikedondong?utm_source=medium&amp;utm_medium=referral">Abby AR</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This project was developed through the hands-on <a href="https://learn.justhacking.com/courses/3a440c2c-1a0f-4b14-b5c9-bf6cf47dade9/take"><strong>AI Cyber Defense Ops</strong></a><strong> </strong>course from<strong> </strong><a href="https://www.justhacking.com/"><strong>Just Hacking Training</strong></a>, thanks to the cohort community support provided by <a href="https://www.wicys.org/"><strong>WiCyS</strong></a><strong> </strong>(Women in Cybersecurity).</p><p>Purple-team exercises are most effective when offensive simulation and defensive validation operate as one repeatable process.</p><p>Threat intelligence identifies behaviors worth testing. Atomic Red Team provides reproducible technique simulations. Endpoint evidence shows what occurred. Detection tools evaluate the resulting telemetry. Reports then turn those observations into practical improvements.</p><p>The challenge is not finding individual tools that can perform each task. The challenge is connecting them without losing authorization boundaries, evidence integrity, privacy controls, or an accurate record of what was actually tested.</p><p>For this project, I built a Claude Code workflow that coordinates those pieces while deliberately keeping live execution in human hands. The completed toolkit supports exercise scoping, ATT&amp;CK technique mapping, runbook generation, append-only execution logging, detection validation, after-action reporting, and reusable plugin packaging.</p><p>It also connects to an existing Hayabusa MCP server and works alongside an earlier threat-intelligence analysis project without merging those repositories or duplicating their code.</p><h3>The Goal: One Controlled Purple-Team Loop</h3><p>The workflow follows a clear sequence:</p><p><strong>Threat intelligence → ATT&amp;CK mapping → Atomic test planning → authorized execution → telemetry analysis → detection validation → reporting</strong></p><p>Rather than building another all-in-one security tool, I treated this repository as an orchestration layer.</p><p>That distinction became important.</p><p>The project prepares, structures, and documents the work around Atomic Red Team testing. It does not automatically execute attack techniques. An authorized human operator must still approve the target, technique, time window, cleanup process, and evidence location before anything is run.</p><p>This preserves a critical security boundary: automation can accelerate planning and analysis without quietly turning a documentation workflow into an attack-execution framework.</p><h3>Building the Workflow as Separate Commands</h3><p>The project uses six slash commands, each with a distinct responsibility:</p><ul><li>/purple-scope</li><li>/purple-map-techniques</li><li>/purple-runbook</li><li>/purple-log</li><li>/purple-report</li><li>/query</li></ul><p>The first five form the main exercise lifecycle.</p><h3>Scoping comes first</h3><p>/purple-scope establishes the authorization boundary before the project proceeds. It records approved targets, techniques, time windows, operators, cleanup requirements, evidence-handling locations, and sign-off.</p><p>This is not just administrative paperwork.</p><p>A purple-team workflow can become unsafe when technical preparation gets ahead of authorization. Requiring scope first prevents the project from generating increasingly actionable material for an exercise that has not yet been approved.</p><h3>Mapping remains planning-only</h3><p>The Atomic Red Team mapper translates approved ATT&amp;CK techniques into candidate tests from a local Atomic Red Team repository.</p><p>The mapper was intentionally restricted to read-only tools. It can inspect files, search content, and report candidate tests, but it cannot run shell commands, modify files, or execute techniques.</p><p>That limitation makes its role unambiguous: it recommends tests; it does not perform them.</p><h3>Runbooks make execution explicit</h3><p>/purple-runbook turns approved mappings into human-readable procedures.</p><p>A useful runbook needs more than a command. It must also capture prerequisites, expected telemetry, cleanup instructions, safety notes, and evidence requirements.</p><p>The result helps the operator understand what will happen, what evidence should be produced, and how the environment should be returned to its prior state.</p><h3>Logging remains append-only</h3><p>/purple-log records what the human operator reports after execution.</p><p>The append-only approach is deliberate. Exercise records should not be casually rewritten as new results arrive. Corrections can be added, but the original chronology remains visible.</p><p>This creates a more reliable audit trail and makes later reporting easier to trust.</p><h3>Reporting closes the loop</h3><p>/purple-report assembles the exercise record into an after-action report covering execution outcomes, detections, misses, partial coverage, gaps, and follow-up work.</p><p>The report is not merely a summary of successful alerts. It should also preserve uncertainty, failed tests, unavailable telemetry, environmental limitations, and areas that were never validated.</p><p>That makes the report more useful for improving both detections and the exercise process itself.</p><h3>Designing SIEM Validation for More Than One Environment</h3><p>The /query command required one of the most important design decisions in the project.</p><p>The intended workflow supports generating SIEM queries, running them through an available integration, mapping results to ATT&amp;CK, and producing investigation notes. It also supports manual execution when no live SIEM connection is available.</p><p>Rather than locking the project to one platform, /query now asks which SIEM product or query language applies to each invocation.</p><p>The command:</p><ol><li>Requires an existing scoped exercise.</li><li>Identifies the SIEM product or query language being used.</li><li>Generates the appropriate query syntax.</li><li>Defines the expected data source and time range.</li><li>Provides the query for execution.</li><li>Accepts sanitized results after they are returned.</li><li>Maps findings to ATT&amp;CK.</li><li>Adds detection status and investigation notes to the exercise record.</li></ol><p>This design allows the same command to support environments using Splunk, another SIEM platform, or a manual query workflow.</p><p>The manual path was tested with sanitized and synthetic data. That validated command discovery, scoped-exercise enforcement, query generation, pause-for-results behavior, ATT&amp;CK mapping, and documentation output.</p><p>The live portion can be completed later without redesigning the command.</p><h3>Connecting Existing Projects Without Merging Them</h3><p>This project brought together capabilities created earlier in the course.</p><p>The Hayabusa MCP server remained in its own repository. The purple-team project connected to it through local, machine-specific configuration.</p><p>The threat-intelligence and correlation project also remained separate. Instead of copying its code into the purple-team repository, the workflow used defined handoff points and sanitized sample data.</p><p>Atomic Red Team was handled the same way. Its repository stayed external and was referenced through a local path.</p><p>This produced a cleaner architecture:</p><ul><li>Each repository retains one clear purpose.</li><li>Existing tools can be updated independently.</li><li>The orchestration project does not vendor large external dependencies.</li><li>Machine-specific paths remain outside version control.</li><li>Reuse does not require duplication.</li></ul><p>The local Hayabusa configuration, external evidence directory, and Atomic Red Team path are stored in ignored files. The public repository contains sanitized examples and placeholders rather than personal directory paths or system identifiers.</p><p>This separation also makes the project more portable. Another user can adapt the configuration to their own environment without inheriting unrelated repositories, evidence, credentials, or system paths.</p><h3>Privacy and Redaction Became Part of the Architecture</h3><p>The repository includes a pre-write redaction hook that checks Git operations before information is staged, committed, or pushed.</p><p>Its purpose is to catch several high-risk patterns, including private-key headers, selected credential assignments, cloud access-key formats, and private IP addresses.</p><p>The hook is a backstop, not a substitute for careful evidence handling.</p><p>The primary rule remains:</p><p><strong>Real secrets, raw evidence, personal identifiers, hostnames, and machine-specific configuration should never enter the repository in the first place.</strong></p><p>Testing the hook uncovered two genuine implementation problems.</p><p>First, one search pattern began with hyphens. Without the correct argument handling, the search utility interpreted the pattern as an option rather than data. The existing error tolerance then risked treating a scanning failure as though no sensitive content had been found.</p><p>The fix separated normal “no match” behavior from genuine tool errors. A scanner error now causes the hook to fail closed.</p><p>Second, ignored files were not included in the original untracked-file scan. That created a path where a sensitive ignored file could potentially be force-added without being checked.</p><p>The scan was updated to include ignored files as part of the review.</p><p>These were valuable findings because both problems existed inside a control that initially appeared to be working. The lesson was clear: a security check needs adversarial testing, not just a successful happy-path run.</p><h3>Testing the Workflow Without Crossing the Safety Boundary</h3><p>The project was tested in layers.</p><p>A synthetic exercise walked through the command chain from scoping to reporting. This verified ordering, required gates, mapper behavior, runbook generation, append-only logging, and report assembly.</p><p>The Hayabusa MCP server was called through the actual MCP protocol against a sample EVTX file. Its result was compared with a direct Hayabusa execution against the same sample.</p><p>The Atomic mapper was invoked as a real subagent with its restricted tool permissions enforced by the test harness.</p><p>A sanitized threat-intelligence correlation scenario was also passed through the cross-project workflow. That scenario produced a correlated finding and a negative control, which then led to candidate ATT&amp;CK mappings and Atomic Red Team lookups.</p><p>The lookup exposed a genuine coverage gap: a technique existed, but the local Atomic Red Team data did not contain a provider-specific test for the environment represented in the sample.</p><p>That was not treated as a software defect.</p><p>It was documented as a content-coverage gap that would need one of three responses during a future exercise:</p><ul><li>source an appropriate existing test,</li><li>develop an authorized custom test,</li><li>or record the gap as accepted coverage debt.</li></ul><p>The tooling, integrations, safeguards, and synthetic workflow were completed and tested.</p><p>The final live exercise uses the fuller Constructing Defense lab environment, including Windows systems, Sysmon telemetry, and Splunk. That environment was available as part of the learning path, but my current host did not have the resources to run the complete range comfortably.</p><p>I therefore completed and validated the tool-building portion without overstating the live-exercise results.</p><p>The complete live exercise can be performed later when I have access to a system with enough resources to run the full Constructing Defense lab comfortably.</p><h3>Lessons Learned</h3><h3>1. Orchestration is not the same as execution</h3><p>A workflow can provide substantial value without directly running offensive actions.</p><p>Scoping, mapping, evidence planning, validation, and reporting are all meaningful automation targets. Keeping live execution under human control made the system safer and easier to audit.</p><h3>2. Integration should preserve boundaries</h3><p>Connecting repositories does not require merging them.</p><p>External tools remained external, with local paths and clearly defined interfaces. This reduced duplication, protected machine-specific information, and kept each project maintainable.</p><h3>3. A successful test must be described precisely</h3><p>“Tested” can mean many things.</p><p>A command can be structurally valid, invoked through its real interface, exercised with synthetic fixtures, connected to a real MCP server, or tested against a complete live lab.</p><p>Those are different levels of validation.</p><p>The documentation now distinguishes among static verification, manual walkthroughs, harness-enforced invocation, live MCP calls, synthetic-result validation, and environment-dependent live execution.</p><h3>4. Infrastructure requirements should be identified early</h3><p>The complete live workflow depends on more than software installation.</p><p>A domain controller, Windows workstation, Sysmon, Splunk, and supporting telemetry require substantial virtualization resources. Identifying that capacity requirement earlier would have made the boundary between tool development and lab execution clearer from the beginning.</p><h3>5. Adapting the workflow is better than overstating the result</h3><p>When the full lab could not be hosted on the available hardware, the project did not fabricate a live result or weaken the testing standard.</p><p>Instead, the tooling was validated with safe fixtures, actual MCP calls, sample EVTX data, and synthetic exercise records.</p><p>The remaining live execution is clearly defined and can be performed later without rebuilding the project.</p><h3>6. Security controls need hostile test cases</h3><p>The redaction hook’s most important improvements came from testing how it failed.</p><p>Controls should be challenged with malformed inputs, ignored files, tool errors, forced operations, and patterns that resemble command-line options.</p><h3>7. Publication readiness is a separate review</h3><p>A technically correct repository can still tell the wrong story.</p><p>Before the final checkpoint, the public documentation needed a separate pass to remove stale language about pending commits, incomplete validation, and unpublished work.</p><p>README files, handoff documents, testing notes, command lists, and project status statements all need to describe the same current state.</p><h3>8. Honest gaps are findings, not failures</h3><p>The missing provider-specific Atomic test was useful information.</p><p>Purple teaming is partly about discovering where tools, telemetry, detections, and test libraries do not cover the intended behavior. A documented gap creates a concrete improvement target.</p><h3>The Final Result</h3><p>The completed repository is a local Claude Code purple-team toolkit that coordinates:</p><ul><li>authorization and exercise scoping,</li><li>ATT&amp;CK-to-Atomic Red Team mapping,</li><li>human-executed runbooks,</li><li>append-only exercise logging,</li><li>Hayabusa-assisted EVTX analysis,</li><li>SIEM query generation and validation,</li><li>detection-gap tracking,</li><li>after-action reporting,</li><li>privacy checks,</li><li>and reusable plugin packaging.</li></ul><p>It is intentionally not presented as an autonomous offensive platform.</p><p>Its value lies in making the purple-team process more consistent, reviewable, privacy-aware, and evidence-driven.</p><p>The project’s tools and integrations are complete. The workflow has been validated with sample and synthetic data, including real Hayabusa MCP interaction and Atomic Red Team lookups.</p><p>The remaining live exercise depends on access to hardware capable of running the complete Constructing Defense lab. Once that environment is available, the project can support an authorized target, approved techniques, a controlled execution window, exported telemetry, and live SIEM results.</p><p>The foundation is built.</p><p>The next stage is using it in the full lab environment when the necessary resources are available.</p><p>This project can be found on my GitHub:</p><blockquote><a href="https://github.com/Pirate-Kitty/purple-team-git">purple-team-git</a></blockquote><h3>Thanks for reading!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f8d23996911" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Investigation Findings to Executive-Ready Security Artifacts]]></title>
            <link>https://medium.com/@the_pirate_kitty/from-investigation-findings-to-executive-ready-security-artifacts-1e74d0520cb4?source=rss-f90557ba38c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e74d0520cb4</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security-operations]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Pirate Kitty]]></dc:creator>
            <pubDate>Thu, 23 Jul 2026 21:27:08 GMT</pubDate>
            <atom:updated>2026-07-23T21:27:08.448Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pny31VGkCQTOBMqu" /><figcaption>Photo by <a href="https://unsplash.com/@lookphoto?utm_source=medium&amp;utm_medium=referral">Look Studio</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>This work was completed as part of the <a href="https://learn.justhacking.com/courses/3a440c2c-1a0f-4b14-b5c9-bf6cf47dade9/take">AI Cyber Defense Ops</a> course from <a href="http://www.justhacking.com/">Just Hacking Training</a>, with support from the outstanding <a href="https://www.wicys.org/">WiCyS</a> (Women in CyberSecurity) cohort that introduced me to this project.</blockquote><h3>Turning one synthetic incident analysis into a technical report, stakeholder presentation, detection dashboard, and interactive timeline</h3><p>Security investigations do not end when the technical analysis is complete.</p><p>The findings still have to be communicated to several audiences, each with different expectations. Technical teams need detail. Leadership needs clarity. Detection engineers need a view of gaps and coverage. Stakeholders need a concise account of what happened, what was affected, and what comes next.</p><p>That last step can become its own substantial workload. Investigation results often live across terminal output, database records, Markdown notes, ATT&amp;CK mappings, timelines, and analyst observations. Turning all of that into polished documents and visual artifacts can take hours even when the investigation itself is already complete.</p><p>In this stage of the AI Cyber Defense Ops course, I used Claude Desktop to move from structured investigation findings to four audience-specific deliverables:</p><ul><li>a formal Incident Response Report</li><li>an executive stakeholder presentation</li><li>an interactive detection coverage dashboard</li><li>an interactive attack timeline</li></ul><p>The exercise demonstrated how the same source material can be adapted without losing the distinction between technical evidence, business communication, and detection-engineering needs.</p><h3>Beginning with a reproducible investigation</h3><p>The reporting exercise was built on the threat-intelligence and correlation tooling developed in the previous stage of the project.</p><p>The project contains a Python command-line tool for ingesting indicators of compromise, analyzing endpoint and cloud telemetry, correlating findings across both sources, storing results in SQLite, and optionally adding LLM-assisted review. Its deterministic IOC-matching path can run without an LLM backend, and the repository includes synthetic fixtures for a fully offline demonstration.</p><p>For this exercise, I used the local synthetic workflow to create a correlated result from test data rather than inventing an incident narrative from scratch.</p><p>The workflow ingested a shared synthetic IP indicator, analyzed Sysmon-like endpoint data, analyzed CloudTrail-like cloud data, and correlated the two through a local SQLite database.</p><p>That distinction mattered. The goal was not to pretend that the lab represented a production incident. The goal was to preserve a realistic analytical workflow while keeping the data safe, local, and reproducible.</p><p>The resulting database was summarized into a Markdown findings file containing the timeline, endpoint and cloud observations, correlated indicators, ATT&amp;CK mappings, detection gaps, recommendations, confidence levels, and limitations.</p><p>That single file became the source of truth for the rest of the reporting process.</p><h3>One source, four audiences</h3><p>The central lesson was that a single investigation should not be communicated in a single format.</p><p>Leadership wants a high-level explanation of business impact and response. Technical teams need detailed findings, timelines, IOCs, and remediation steps. Stakeholders may need a presentation for a post-incident review. The SOC benefits from interactive views of detection coverage and attack progression.</p><p>Instead of manually rebuilding the same content four times, I uploaded the findings summary to Claude Desktop and asked it to generate the full set of deliverables.</p><p>The important part was not simply requesting polished files. It was defining the audience and purpose for each one.</p><h3>The Incident Response Report</h3><p>The Word report was designed for technical teams, compliance stakeholders, and anyone who might need a durable investigation record.</p><p>It included:</p><ul><li>an executive summary</li><li>incident details and scope</li><li>a chronological timeline</li><li>the attack chain</li><li>technical analysis</li><li>MITRE ATT&amp;CK mappings</li><li>IOC tables</li><li>impact assessment</li><li>containment and remediation</li><li>prioritized recommendations</li><li>appendices and limitations</li></ul><p>The report format allowed the evidence to remain detailed without forcing leadership-level readers to work through raw technical output.</p><p>It also highlighted the importance of uncertainty language. Synthetic data does not remove the need for careful wording. A finding can still be overstated if a report converts “observed in both datasets” into “confirmed malicious infrastructure,” or if it labels an indicator “known bad” without evidence supporting that conclusion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*-Tw5vgXB5l-1dvucNWIqaA.png" /><figcaption>Incident Response Report</figcaption></figure><h3>The Executive Presentation</h3><p>The PowerPoint used the same findings but changed the communication strategy.</p><p>Technical depth was reduced. The focus shifted toward:</p><ul><li>what happened</li><li>the sequence of major events</li><li>what was at risk</li><li>what was actually observed</li><li>how the response worked</li><li>the highest-priority recommendations</li><li>the next steps</li></ul><p>This was not simply a shortened version of the Word report.</p><p>The presentation needed plain language, restrained text, visual structure, and a clear distinction between observed impact and potential risk. A useful executive presentation should help decision-makers understand the incident without requiring them to interpret database records, telemetry fields, or raw ATT&amp;CK mappings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EcArcEp1U70R7uwbytBjVw.png" /><figcaption>Executive Presentation Deck</figcaption></figure><h3>The Detection Coverage Dashboard</h3><p>The dashboard changed the question from “What happened?” to “How well could we detect it?”</p><p>It presented the ATT&amp;CK techniques associated with the synthetic scenario and displayed whether detection coverage was complete, partial, or missing.</p><p>The interactive format made it possible to:</p><ul><li>compare coverage across techniques</li><li>display summary metrics</li><li>distinguish covered techniques from gaps</li><li>filter the view to focus on missing or partial coverage</li></ul><p>This is where an artifact becomes more useful than a static report. A table can document detection status, but an interactive dashboard helps analysts explore the gaps quickly and focus remediation work.</p><p>The dashboard also connected incident findings directly to detection engineering rather than leaving the ATT&amp;CK mapping as a passive appendix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*YnwMeDpjzypksnn9RUDAbw.png" /><figcaption>Detection Coverage Dashboard</figcaption></figure><h3>The Interactive Attack Timeline</h3><p>The timeline artifact organized the incident progression across endpoint, cloud, network, and detection events.</p><p>Instead of reading a long chronological table, the viewer could see the attack sequence as a visual progression and interact with individual events for more detail.</p><p>This format is especially useful when an incident crosses multiple data sources. A simple list can obscure relationships between endpoint execution, outbound communication, cloud activity, and alerting. A visual timeline makes those transitions easier to follow.</p><p>It also provides another opportunity to separate observation from interpretation. A timeline should show what the data supports, in the correct order, without adding causation that the evidence does not establish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*cO3oum6ErAe6tMa9fuEWDQ.png" /><figcaption>Attack Timeline</figcaption></figure><h3>The most important step: reviewing the outputs</h3><p>The most valuable part of the exercise was not the initial generation. It was the review.</p><p>Claude Desktop identified several real inconsistencies across the deliverables:</p><ul><li>a contradictory TLP designation</li><li>an indicator described with more certainty than the source supported</li><li>“known-bad IP” wording that repeated the same unsupported assumption</li></ul><p>The timeline ordering, however, was checked and did not require correction.</p><p>Those findings reinforced a critical rule: AI-generated documents should not be distributed simply because they look polished.</p><p>Professional formatting can make unsupported wording appear authoritative. A clean executive slide can still contain an inaccurate claim. A well-designed dashboard can still misrepresent confidence.</p><p>The final artifacts were reviewed together for consistency in:</p><ul><li>TLP labeling</li><li>IOC confidence</li><li>indicator characterization</li><li>synthetic-data disclosure</li><li>timeline ordering</li><li>ATT&amp;CK mappings</li><li>recommendations</li><li>limitations</li></ul><p>Only after that cross-document review were the outputs treated as complete.</p><h3>Keeping generated analysis out of the public repository</h3><p>The local database and findings summary were kept under the ignored analysis/ directory.</p><p>That was intentional.</p><p>The public repository documents how to reproduce the synthetic workflow, but the generated SQLite database and analyst-authored summary remain local, regenerable artifacts.</p><p>This kept the public project focused on the reusable tooling, tests, fixtures, and documentation while preventing generated analysis files from becoming permanent project state.</p><p>It also preserved a clean distinction between:</p><ul><li>the software</li><li>the synthetic inputs</li><li>the locally generated findings</li><li>the presentation artifacts created from those findings</li></ul><p>That separation makes the workflow easier to reproduce and easier to audit.</p><h3>What I took away from this stage</h3><p>The most important lesson was not that AI can create Word documents, PowerPoint presentations, or interactive HTML.</p><p>It was that the same investigation must be translated carefully for different audiences.</p><p>The technical report preserved evidence and detail.</p><p>The executive presentation reduced complexity without hiding material risk.</p><p>The detection dashboard connected findings to defensive coverage.</p><p>The timeline made the progression easier to understand across data sources.</p><p>Claude Desktop accelerated the formatting and artifact-generation work, but the analyst still had to control the source material, review the claims, resolve contradictions, preserve uncertainty, and decide what belonged in public or private project records.</p><p>That is where the real reporting discipline lives.</p><p>The resulting artifacts demonstrate the last mile of incident response: not just finding what happened, but communicating it accurately to the people who need to act on it.</p><h3>Project</h3><blockquote>The completed source code and documentation are available in the project repository. Find it on my GitHub at the following link:</blockquote><blockquote><a href="https://github.com/Pirate-Kitty/complex-analysis-git">complex-analysis-git</a></blockquote><blockquote>Thanks for reading!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e74d0520cb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Threat Intelligence and Multi-Source Correlation CLI with Claude Code]]></title>
            <link>https://medium.com/@the_pirate_kitty/building-a-threat-intelligence-and-multi-source-correlation-cli-with-claude-code-92373a3ab639?source=rss-f90557ba38c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/92373a3ab639</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[mitre-attack]]></category>
            <category><![CDATA[ai-engineering]]></category>
            <dc:creator><![CDATA[Pirate Kitty]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 17:56:15 GMT</pubDate>
            <atom:updated>2026-07-20T17:56:15.915Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OwNYYI63H_O1f8Qs" /><figcaption>Photo by <a href="https://unsplash.com/@milebola?utm_source=medium&amp;utm_medium=referral">Milan Bishwakarma</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>Turning public threat reports, endpoint telemetry, and cloud logs into a controlled, testable security-analysis workflow</em></p><p>This work was completed through <a href="https://www.justhacking.com/"><strong>Just Hacking Training</strong></a><strong>’s </strong><a href="https://learn.justhacking.com/courses/3a440c2c-1a0f-4b14-b5c9-bf6cf47dade9/take"><strong>AI Cyber Defense Ops</strong></a><strong> course</strong>, which I joined through a cohort with <a href="https://www.wicys.org/"><strong>WiCyS</strong></a>.</p><p>In the latest stage of this course, I moved beyond building tools for isolated security tasks and focused on a broader challenge: how to structure an investigation when useful evidence is spread across multiple sources.</p><p>Threat-intelligence reports are usually written for people, not machines. Endpoint and cloud logs often describe different parts of the same activity. Large language models can help interpret both, but only when they are placed inside a workflow with clear boundaries, structured inputs, validation, and human review.</p><p>For this project, I built a Python command-line application that can:</p><ul><li>Ingest threat intelligence from JSON, CSV, STIX, MISP exports, or a public report URL</li><li>Extract and normalize indicators of compromise</li><li>Map reported behavior to a controlled MITRE ATT&amp;CK technique set</li><li>Analyze endpoint and cloud telemetry</li><li>Correlate findings across both sources</li><li>Store investigation state in SQLite</li><li>Generate a simulation and detection plan</li><li>Use Claude, LiteLLM, or Ollama through an explicitly selected backend</li></ul><p>The resulting project became more than a demonstration of AI-assisted analysis. It became an exercise in designing trust boundaries around untrusted data and probabilistic model output.</p><h3>Starting with the Investigation Workflow</h3><p>I began in Plan Mode and defined the architecture before allowing implementation changes.</p><p>The project needed two related workflows.</p><p>The first would process threat intelligence:</p><pre>Threat report<br>    → extract content<br>    → identify IOCs and behaviors<br>    → map ATT&amp;CK techniques<br>    → create a simulation and detection plan</pre><p>The second would support investigation and correlation:</p><pre>Endpoint telemetry<br>    → endpoint findings</pre><pre>Cloud telemetry<br>    → cloud findings</pre><pre>Endpoint + cloud findings<br>    → shared indicators<br>    → unified correlations</pre><p>I kept manual approval enabled throughout implementation. Before each command or file change, Claude described what it intended to change, why the change was necessary, the exact file or command involved, and any security or privacy implications.</p><p>This made the approved plan unfold transparently. It also created opportunities to stop unnecessary dependencies, question new architecture, and prevent the project from expanding beyond its intended purpose.</p><h3>Building a Structured Security CLI</h3><p>The application is organized as a Python package with separate components for ingestion, storage, models, analysis, correlation, reporting, and language-model integration.</p><p>SQLite acts as the shared store between pipeline stages. It retains sources, indicators, endpoint events and findings, cloud events and findings, and correlations.</p><p>All database operations pass through a single repository layer using parameterized queries. That design matters because threat reports and telemetry are untrusted external inputs. None of those values should ever be inserted directly into dynamically constructed SQL.</p><p>The project’s main commands include:</p><pre>cti ingest-ti<br>cti ingest-ti-url<br>cti analyze-endpoint<br>cti analyze-cloud<br>cti correlate<br>cti verify-backends</pre><p>The endpoint and cloud analyzers use a hybrid design. Deterministic logic performs IOC matching even when no language model is configured. The selected model is used only for contextual analysis, anomaly interpretation, and severity judgment.</p><p>This separation keeps essential matching logic predictable while reserving the model for work that benefits from broader reasoning.</p><h3>Processing Threat Intelligence from Local Files</h3><p>The first ingestion path supports several common formats:</p><ul><li>JSON</li><li>CSV</li><li>STIX 2.1 bundles</li><li>Static MISP JSON exports</li></ul><p>Indicators are normalized before being stored, and duplicates are controlled through the combination of indicator type and normalized value.</p><p>The project does not pretend to support every possible form of each standard. For example, the STIX parser accepts straightforward single-comparison patterns but skips compound patterns rather than partially interpreting them and producing unreliable results.</p><p>That was an important design principle throughout the project: unsupported complexity should be identified clearly, not processed with false confidence.</p><h3>Adding Public Threat-Report Ingestion</h3><p>The final major addition was ingest-ti-url.</p><p>This command accepts a user-selected public threat-intelligence URL and performs the following sequence:</p><pre>Public URL<br>    → guarded network request<br>    → HTML-to-text extraction<br>    → structured LLM analysis<br>    → IOC storage<br>    → ATT&amp;CK mapping<br>    → Markdown report</pre><p>The generated report contains:</p><ul><li>Source information</li><li>Threat summary</li><li>Extracted indicators</li><li>ATT&amp;CK technique mappings</li><li>Confidence and supporting evidence</li><li>A proposed simulation and detection plan</li></ul><p>I chose a standard-library HTML extraction approach instead of introducing another parsing dependency. The result remains intentionally modest: it is designed to extract useful report text without attempting to reproduce a full browser or document-rendering engine.</p><p>The report is written to a local analysis/ directory, which is excluded from Git by default so investigation output is not accidentally published.</p><h3>Treating URL Ingestion as a Security Boundary</h3><p>Accepting an arbitrary URL introduces risks that do not exist when reading a local file.</p><p>A poorly constrained fetch function can be abused to reach internal services, loopback addresses, private networks, or cloud metadata endpoints. For that reason, the URL workflow received a dedicated guarded network layer.</p><p>The implementation:</p><ul><li>Allows only HTTP and HTTPS</li><li>Resolves and checks the destination before connecting</li><li>Blocks private, loopback, link-local, multicast, and reserved addresses</li><li>Explicitly blocks cloud metadata addresses</li><li>Revalidates every redirect destination</li><li>Limits response size</li><li>Applies a network timeout</li></ul><p>The documentation also records a remaining DNS-rebinding timing risk between validation and connection. Rather than overstating the protection, the project identifies that residual limitation and defines the analyst-selected URL as part of the accepted threat model.</p><p>That transparency is important in security engineering. A control does not need to be perfect to be useful, but its limits need to be understood.</p><h3>Constraining ATT&amp;CK Mapping</h3><p>One of the most consequential design choices involved MITRE ATT&amp;CK technique IDs.</p><p>Allowing a language model to generate technique IDs entirely from memory would be convenient, but it would also create a risk of invented, outdated, or mismatched mappings.</p><p>Instead, I included a small, curated local taxonomy of commonly used Enterprise ATT&amp;CK techniques.</p><p>The model is instructed to choose only from that list. After the response is returned, the application performs a second validation and drops any technique ID that does not exist in the local taxonomy.</p><p>This creates two layers of control:</p><ol><li>Prompt-level constraint</li><li>Application-level enforcement</li></ol><p>The curated list is intentionally limited and is not presented as a replacement for the full ATT&amp;CK knowledge base. Generated mappings are starting points for analyst review, not unquestionable conclusions.</p><h3>Correlating Endpoint and Cloud Activity</h3><p>Endpoint and cloud data often describe different stages of the same incident.</p><p>An endpoint log might reveal a suspicious process, command line, or matched indicator. A cloud log might show authentication activity, configuration changes, or access from the same infrastructure.</p><p>The project analyzes each source separately before correlating the results.</p><p>The correlation engine pivots on shared matched indicators and applies a documented heuristic score. It handles:</p><ul><li>Findings that occur within the selected time window</li><li>Related findings outside the preferred window</li><li>One-sided evidence where only one source contains a strong match</li><li>Multiple possible correlations ranked by score</li></ul><p>The score is not described as machine learning. It is a fixed, inspectable heuristic whose weights can be reviewed and adjusted.</p><p>That distinction matters. A transparent heuristic may be less sophisticated than a trained model, but it is also easier to explain, test, and audit.</p><h3>Making Alternate Models Explicitly Opt-In</h3><p>The application supports three interchangeable model backends:</p><ul><li>Claude</li><li>LiteLLM</li><li>Ollama</li></ul><p>Each implements the same internal interface and returns schema-validated structured output.</p><p>However, alternate backends are never selected automatically.</p><p>There is no configuration option that silently changes the default model. LiteLLM or Ollama is contacted only when the user names that backend in the command being run. If the selected primary model is unavailable, the endpoint and cloud analyzers fall back to deterministic-only processing rather than sending data to a different model.</p><p>This rule is enforced in the backend factory, not merely documented in the command-line interface.</p><p>That prevents a future configuration change from quietly routing sensitive investigation data somewhere the analyst did not intend.</p><p>The project contains the adapters needed to communicate with these services, but it does not install, start, or manage the external services themselves. That distinction is also documented clearly.</p><h3>Testing with Synthetic Data</h3><p>The completed project contains <strong>69 tests</strong>:</p><ul><li>68 tests in the default suite</li><li>One explicitly opt-in live-backend test</li></ul><p>The default tests use synthetic fixtures and do not require real credentials, production logs, or external model services.</p><p>The validation covered:</p><ul><li>File-based ingestion</li><li>IOC normalization and deduplication</li><li>SQLite writes and queries</li><li>Endpoint analysis</li><li>Cloud analysis</li><li>Cross-source correlation</li><li>URL validation</li><li>Redirect handling</li><li>ATT&amp;CK taxonomy enforcement</li><li>Markdown reporting</li><li>Backend-selection controls</li><li>The complete ingest-analyze-correlate pipeline</li></ul><p>I also ran focused end-to-end checks after publication. The tests created temporary SQLite databases where needed and removed them automatically, leaving the repository clean.</p><p>Synthetic testing made it possible to validate realistic workflow behavior without placing real investigation data, identities, tokens, or private infrastructure details into a public repository.</p><h3>Preserving Context Without Losing Control</h3><p>Complex builds can consume a large amount of working context.</p><p>Instead of treating a long Claude session as the durable source of truth, I used:</p><ul><li>CLAUDE.md for project instructions</li><li>HANDOFF.md for current state, decisions, limitations, and continuation guidance</li><li>Small Git milestones for stable checkpoints</li><li>Full testing before each major commit</li><li>Privacy and publication reviews before pushing</li></ul><p>The project was built across a sequence of independently reviewable commits. Each checkpoint represented a working state rather than a partial collection of unverified changes.</p><p>This became especially useful as the project grew from basic scaffolding into ingestion, storage, analysis, correlation, backend abstraction, verification, and public-report processing.</p><h3>What I Learned</h3><p>The central lesson was not that an AI model can read a threat report or summarize logs. Those capabilities are useful, but they are only one part of the system.</p><p>The stronger pattern was:</p><pre>Scope the work<br>    → separate the evidence sources<br>    → use deterministic processing where possible<br>    → constrain model output<br>    → correlate structured findings<br>    → preserve provenance and limitations<br>    → verify before publication</pre><p>Several other lessons stood out:</p><p><strong>AI output needs enforceable boundaries.</strong><br> Prompt instructions are helpful, but important restrictions should also be implemented in code.</p><p><strong>Deterministic and probabilistic analysis can complement each other.</strong><br> IOC matching does not require an LLM. Contextual interpretation may benefit from one.</p><p><strong>External data should be treated as hostile by default.</strong><br> Threat reports, telemetry, URLs, redirects, model responses, and database inputs all cross trust boundaries.</p><p><strong>Limitations belong in the documentation.</strong><br> A smaller honest capability is more useful than an impressive claim the code cannot fully support.</p><p><strong>Model flexibility should not remove operator control.</strong><br> Supporting several backends is valuable only when the analyst remains responsible for choosing where data goes.</p><h3>Final Thoughts</h3><p>This project began as an exercise in threat-intelligence processing and multi-source correlation. It developed into a broader example of how AI-assisted security tooling can be designed responsibly.</p><p>The application can ingest structured intelligence or a public report, analyze endpoint and cloud evidence, correlate findings, and produce a usable investigation report. More importantly, it does so with explicit model selection, constrained ATT&amp;CK mappings, parameterized storage, synthetic testing, documented limitations, and guarded handling of user-supplied URLs.</p><p>The result is not an autonomous incident responder, and it is not intended to replace analyst judgment.</p><p>It is a repeatable analysis framework that helps organize evidence, reduce manual processing, and make AI-assisted conclusions easier to review.</p><blockquote>Thanks for reading!</blockquote><h4>The complete project is available on GitHub:</h4><blockquote><a href="https://github.com/Pirate-Kitty/complex-analysis-git?utm_source=chatgpt.com">complex-analysis</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92373a3ab639" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Guardrails That Can Be Safely Maintained: Claude Code Hooks for a Security Scanner]]></title>
            <link>https://medium.com/@the_pirate_kitty/building-guardrails-that-can-be-safely-maintained-claude-code-hooks-for-a-security-scanner-02913e5e271c?source=rss-f90557ba38c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/02913e5e271c</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security-engineering]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Pirate Kitty]]></dc:creator>
            <pubDate>Fri, 17 Jul 2026 13:33:21 GMT</pubDate>
            <atom:updated>2026-07-17T13:33:21.725Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XEdkxBs2KdOvCdx0" /><figcaption>Photo by <a href="https://unsplash.com/@atieh_khoshraftar?utm_source=medium&amp;utm_medium=referral">Atieh Khoshraftar</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Module 7 of the <a href="https://learn.justhacking.com/courses/3a440c2c-1a0f-4b14-b5c9-bf6cf47dade9/take"><strong>AI Cyber Defense Operations</strong></a> course focused on Claude Code hooks: automated checks that run at specific points in a development session.</p><p>With support from <a href="https://www.justhacking.com/"><strong>Just Hacking Training</strong></a> and <a href="https://www.wicys.org/"><strong>WiCyS</strong></a><strong> (Women in Cybersecurity)</strong>, I applied the module to my existing Hayabusa MCP security-scanner project. The goal was not simply to automate more work. It was to place repeatable security and validation controls directly into the workflow while preserving manual review and approval.</p><p>The result was a stronger project, broader test coverage, and a practical lesson in security engineering: controls also need a safe maintenance path.</p><p>Repository:<br> <a href="https://github.com/Pirate-Kitty/hayabusa-mcp-security-scanner">https://github.com/Pirate-Kitty/hayabusa-mcp-security-scanner</a></p><h3>Moving from remembered checks to automated controls</h3><p>Before this module, the project already relied on several deliberate safeguards:</p><ul><li>Plan Mode before implementation</li><li>manual approval for commands and file changes</li><li>test and validation routines</li><li>Git checkpoints</li><li>staged-diff review</li><li>privacy and security checks before publication</li></ul><p>Those controls remained in place. The hooks were not intended to replace human judgment or give Claude broader authority.</p><p>Instead, they added automated checks around actions already taking place. Certain protections no longer depended entirely on remembering to request them each time.</p><p>The completed project uses four Claude Code hook events.</p><p>A SessionStart hook checks that expected project prerequisites are available when Claude begins working.</p><p>A PreToolUse hook evaluates paths before file operations and blocks access to sensitive locations.</p><p>A PostToolUse hook runs rule validation after relevant changes.</p><p>A Stop hook provides a generic desktop notification when Claude finishes and the work is ready for review.</p><p>Together, these hooks add multiple layers of protection without removing manual approval from the workflow.</p><h3>Guardrails should not become permission shortcuts</h3><p>One of the most important design decisions was keeping hook behavior separate from permission authority.</p><p>The sensitive-path hook can deny an unsafe action, but it does not automatically approve a safe one. When a path does not match the deny rules, the hook returns no approval decision and leaves Claude’s normal permission process in place.</p><p>That distinction matters.</p><p>A security hook should be able to stop a dangerous action without quietly granting access to everything else. Manual approval remains the controlling layer.</p><p>The same principle applies to the Stop notification. A message that Claude has stopped does not mean:</p><ul><li>the implementation succeeded</li><li>the tests passed</li><li>the output is correct</li><li>the work is ready to publish</li></ul><p>It means only that Claude has completed the current task and the result requires human review.</p><h3>When the protection hook blocked its own configuration</h3><p>The most useful challenge in this module appeared when the sensitive-path protection blocked the next implementation step.</p><p>The hook was designed to prevent Claude from reaching beyond the repository and to protect files capable of changing Claude’s behavior. Its coverage included:</p><ul><li>paths outside the project root</li><li>.claude/settings.json</li><li>.claude/settings.local.json</li><li>credential files and private-key formats</li><li>protected configuration directories</li><li>nested sensitive paths</li><li>resolved paths and symlinks</li></ul><p>When it was time to register the new Stop hook, Claude needed to update .claude/settings.json.</p><p>The protection hook blocked the edit.</p><p>Claude proposed temporarily disabling the hooks so the configuration could be changed. That would have been convenient, but it would also have removed the control I was actively relying on.</p><p>I declined.</p><p>The hook was enforcing the policy we had created. The actual design gap was that the configuration had been protected without first establishing a safe procedure for maintaining it.</p><p>This is a useful distinction. Security controls often introduce operational friction. That does not necessarily mean the control is broken. Sometimes the friction reveals that the administrative process around the control is incomplete.</p><h3>Maintaining the guardrail without disabling it</h3><p>Rather than suspend the protection, I used a narrower process.</p><p>Claude created a temporary, ignored reference file inside the repository containing only the proposed Stop-hook registration. It did not edit the protected settings file directly, and the temporary file was not intended for staging or publication.</p><p>The settings update was then applied separately, outside Claude.</p><p>This preserved the original security boundaries:</p><ul><li>Claude did not gain access to the protected configuration</li><li>the sensitive-path rule remained active</li><li>the proposed change stayed visible and reviewable</li><li>no broad path exception was introduced</li><li>the temporary artifact remained outside the final commit</li></ul><p>The process was slower than disabling the hook, but it preserved the security model instead of bypassing it.</p><h3>Recovering from a malformed configuration</h3><p>The next problem came from attempting to move the JSON registration manually.</p><p>During the terminal editing process, .claude/settings.json became malformed. JSON is unforgiving: an extra comma, misplaced brace, or incorrectly nested object is enough to invalidate the entire file.</p><p>A parser reported the error near the edited section.</p><p>At that point, continuing to repair the file by eye would have introduced more uncertainty. Instead, I restored the last valid committed version from Git.</p><p>That reinforced one of the most practical lessons from the project:</p><blockquote><em>A clean Git checkpoint is not only project history. It is a recovery mechanism.</em></blockquote><p>Because the earlier version had been committed and validated, I did not need to reconstruct the settings file from memory. I restored a known-good copy and confirmed that it parsed correctly before continuing.</p><p>That turned an uncertain manual repair into a controlled rollback.</p><h3>Using structured tools for structured data</h3><p>After restoring the valid settings file, I did not return to manual copy-and-paste.</p><p>The safer approach was to let Python parse both JSON files:</p><ul><li>the existing settings file</li><li>the temporary Stop-hook registration file</li></ul><p>Python merged the new Stop entry into the existing hooks object and rewrote the result as formatted JSON.</p><p>The updated settings file was immediately checked again with Python’s JSON parser. No validation output confirmed that the file was syntactically valid.</p><p>This lesson extends beyond Claude Code.</p><p>When working with structured formats such as JSON, YAML, XML, or configuration manifests, a text editor is often not the safest tool for combining data. A parser understands the document structure and can apply a targeted update without relying on cursor placement, clipboard behavior, or manual brace matching.</p><h3>Designing a privacy-safe completion notification</h3><p>The new Stop hook uses Linux desktop notifications, but it was intentionally designed to reveal almost nothing.</p><p>The notification reads:</p><blockquote><em>Task complete — review required</em></blockquote><p>It does not display:</p><ul><li>prompts</li><li>repository paths</li><li>filenames</li><li>commands</li><li>logs</li><li>transcripts</li><li>test results</li><li>system details</li></ul><p>It also does not claim that the task succeeded.</p><p>The hook is non-blocking and fails quietly when desktop notifications are unavailable. It also suppresses rapid duplicate notifications so repeated Stop events do not flood the desktop.</p><p>This makes the feature useful without turning desktop notifications into another source of information exposure.</p><p>That concern matters in security work. Even a harmless-looking notification could reveal investigation names, customer references, internal paths, malware sample names, or other project details to anyone who can see the screen.</p><p>A generic completion notice was the safer design.</p><h3>Testing hooks as part of the security boundary</h3><p>The hooks were not treated as isolated convenience scripts. They were tested as part of the project’s security boundary.</p><p>The sensitive-path tests covered cases including:</p><ul><li>protected filenames</li><li>nested protected directories</li><li>mixed-case paths</li><li>path traversal</li><li>absolute paths</li><li>symlink resolution</li><li>paths outside the repository</li><li>key and credential formats</li></ul><p>The Stop-hook tests covered notification behavior, privacy limitations, failure handling, and duplicate suppression.</p><p>Earlier in the module, the project had reached 56 passing tests. By the final checkpoint, the full suite had grown to:</p><p><strong>86 passed, 0 failed</strong></p><p>The test count itself is less important than what it represents. Each automated control received regression coverage so future changes would be less likely to weaken it silently.</p><h3>A lab recovery before development began</h3><p>The hook work was not the only technical event during the session.</p><p>Before returning to the project, the Ubuntu VM entered maintenance mode and warned that not all disks had been found. The newer kernel’s initramfs needed to be rebuilt.</p><p>The recovery process involved:</p><ul><li>opening the advanced GRUB options</li><li>booting the older working kernel</li><li>rebuilding the newer kernel’s initramfs</li><li>rebooting successfully into the newer kernel</li><li>retaining the older kernel as a fallback</li></ul><p>This was not part of the Claude Code module itself, but it reflects the reality of lab work. Development, virtualization, operating systems, security tooling, and recovery procedures do not exist in isolation.</p><p>The ability to return to a known-good state matters at every layer.</p><h3>Completing the final checkpoint</h3><p>Before committing, I reviewed the complete intended change set:</p><ul><li>the new Stop notification hook</li><li>the Claude settings registration</li><li>expanded hook tests</li><li>README updates</li><li>HANDOFF updates</li></ul><p>The temporary registration artifact was removed, along with the temporary .gitignore entry that had protected it from accidental staging.</p><p>The staged diff was reviewed before committing. The final commit was then verified locally, Claude was exited, and the push was completed from the regular terminal.</p><p>A final documentation review is planned for Module 8 to confirm that the repository landing page accurately reflects all four implemented hooks and contains no stale wording from earlier implementation stages.</p><h3>What I took away from Module 7</h3><p>Hooks made the project more consistent by placing security and validation checks directly around Claude’s actions.</p><p>The most valuable lesson came from the blocker.</p><p>The protection hook prevented Claude from changing a protected configuration file. The challenge was not that the control had failed. The challenge was that the project did not yet have a safe process for maintaining the protected file.</p><p>The solution was not to remove the guardrail.</p><p>It was to preserve the boundary, create a controlled maintenance path, use Git for recovery, validate structured data with structured tools, and keep human approval at the center of the workflow.</p><p>Automation is most useful when it makes the safe path easier.</p><p>Good security engineering also ensures that the controls themselves can be maintained without bypassing the protections they were created to provide.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02913e5e271c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Repeatable Security Workflows with Claude Code Slash Commands]]></title>
            <link>https://medium.com/@the_pirate_kitty/building-repeatable-security-workflows-with-claude-code-slash-commands-ff3f531bd4f0?source=rss-f90557ba38c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff3f531bd4f0</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[automation-security]]></category>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[mitre-attack]]></category>
            <dc:creator><![CDATA[Pirate Kitty]]></dc:creator>
            <pubDate>Wed, 15 Jul 2026 14:09:30 GMT</pubDate>
            <atom:updated>2026-07-15T14:09:30.011Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MgdQA7o-SEizbHUM" /><figcaption>Photo by <a href="https://unsplash.com/@krysamon?utm_source=medium&amp;utm_medium=referral">Krys Amon</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This project is part of my work through <a href="https://www.justhacking.com/">Just Hacking Training</a>’s <a href="https://learn.justhacking.com/courses/3a440c2c-1a0f-4b14-b5c9-bf6cf47dade9/take"><strong>AI Cyber Defense Ops</strong></a> course. I’m grateful to JHT for the practical, build-focused instruction and to <a href="https://www.wicys.org/">Women in Cybersecurity</a> (WiCyS) for the community and encouragement to keep developing, documenting, and sharing the work.</p><h3>Turning EVTX analysis into controlled, reusable investigation and triage workflows</h3><p>In earlier stages of this project, I built a Hayabusa MCP server that could scan EVTX files, expose detection coverage, and support rule-development workflows.</p><p>The next step was not to add another analysis tool. It was to make the existing capabilities easier to use consistently.</p><p>That is where Claude Code slash commands became useful.</p><p>Rather than writing a long prompt every time I wanted to investigate an EVTX file, I created explicit workflows that could be invoked on demand. The commands define the process, while I decide when to run it and which inputs to provide.</p><p>The result was two project-level commands:</p><ul><li>/investigate-evtx for a full investigation workflow</li><li>/triage for faster prioritization and escalation decisions</li></ul><p>Both commands reuse the MCP tools and detection resources already present in the repository.</p><h3>From available tools to repeatable workflows</h3><p>The MCP server already provided the underlying capabilities:</p><ul><li>scanning EVTX files with Hayabusa</li><li>retrieving rule information</li><li>reviewing ATT&amp;CK coverage</li><li>identifying detection gaps</li><li>suggesting relevant rules</li></ul><p>However, having those tools available did not automatically produce a consistent investigation process.</p><p>An analyst still had to remember the sequence:</p><ol><li>Run the scan.</li><li>review the findings.</li><li>identify relevant Rule IDs.</li><li>map them to MITRE ATT&amp;CK.</li><li>check detection coverage.</li><li>document the results.</li><li>link the investigation to related work.</li></ol><p>A slash command turns that sequence into a repeatable workflow.</p><p>Instead of rebuilding the process in each prompt, the command contains the instructions for how the task should be performed and how the final output should be structured.</p><h3>The investigation command</h3><p>The first command accepts an EVTX file path and an optional minimum severity.</p><p>Its workflow includes:</p><ul><li>validating the input</li><li>running the Hayabusa scan</li><li>reviewing suspicious findings</li><li>resolving ATT&amp;CK techniques from detection metadata</li><li>checking coverage through the existing MCP resources</li><li>creating an Obsidian-compatible investigation note</li><li>linking related investigations only when they share a verified technique ID or Rule ID</li></ul><p>The default minimum severity is medium.</p><p>That keeps routine investigations focused on findings that are more likely to require attention, while still allowing a lower threshold during broader threat-hunting work.</p><p>The severity can be overridden when needed, but the command validates the supplied value before scanning. Unsupported values are rejected rather than silently interpreted.</p><p>We also tested case-insensitive inputs so values such as LOW and Low could be normalized consistently.</p><h3>Obsidian-compatible investigation notes</h3><p>Each successful run produces a Markdown note with structured metadata and backlinks.</p><p>A simplified example looks like this:</p><pre>---<br>date: 2026-07-13<br>tags:<br>  - investigation<br>  - credential-access<br>techniques:<br>  - T1003.001<br>status: in-progress<br>---</pre><pre># EVTX Investigation</pre><pre>## Summary</pre><pre>## Findings</pre><pre>### Suspicious LSASS Access</pre><pre>**Technique:** [[T1003.001]]  <br>**Rule ID:** example-rule-id</pre><pre>## Detection Coverage</pre><pre>## Analyst Notes</pre><pre>## Related Investigations</pre><p>The [[T1003.001]] syntax creates an Obsidian backlink.</p><p>Over time, these links can connect investigations to ATT&amp;CK techniques and reveal recurring patterns across separate analyses.</p><p>The important design decision was to base automatic relationships on evidence. Notes are cross-referenced only when they share an exact ATT&amp;CK technique ID or Rule ID. Similar wording or general subject matter is not enough.</p><h3>Keeping investigation data out of Git</h3><p>Investigation notes can contain sensitive information, including:</p><ul><li>event details</li><li>host information</li><li>usernames</li><li>system paths</li><li>timestamps</li><li>case references</li></ul><p>For that reason, the generated investigations/ directory is excluded through .gitignore.</p><p>The command files and reusable project logic can be tracked publicly, while generated investigation data remains local.</p><p>This separation matters. .gitignore is not merely repository cleanup in this case; it is part of the privacy boundary.</p><p>The workflow also checks that the expected output directory is ignored before relying on it for generated notes.</p><h3>Expanding the project with a triage command</h3><p>After completing the main investigation workflow, I added a /triage command.</p><p>The goal was not to duplicate the first command. Triage serves a different purpose.</p><p>A full investigation gathers and documents evidence in detail. Triage focuses on the immediate decision:</p><ul><li>escalate</li><li>investigate further</li><li>likely benign</li><li>insufficient evidence</li></ul><p>The triage workflow accepts:</p><ul><li>an EVTX file path</li><li>an optional severity</li><li>an optional case ID</li></ul><p>It then:</p><ul><li>runs the existing Hayabusa analysis</li><li>groups the highest-priority findings</li><li>identifies the relevant ATT&amp;CK techniques and Rule IDs</li><li>checks detection coverage</li><li>assigns a triage outcome</li><li>generates a separate Obsidian-compatible triage note</li></ul><p>The optional case ID can be included in the filename, but only after validation.</p><p>Allowed values are limited to letters, numbers, hyphens, and underscores. Path separators, traversal sequences, shell characters, email addresses, and unsuitable sensitive values are rejected.</p><p>That prevents a convenience feature from becoming a filename or path-safety problem.</p><h3>Reusable technique notes without case data</h3><p>The triage expansion also introduced a tracked techniques/ knowledge base.</p><p>These notes are intended to contain reusable information such as:</p><ul><li>ATT&amp;CK technique ID and name</li><li>tactic</li><li>related Hayabusa Rule IDs</li><li>general detection coverage</li><li>reusable analyst guidance</li></ul><p>They are deliberately separated from case-specific investigation data.</p><p>Technique notes should not contain:</p><ul><li>hostnames</li><li>usernames</li><li>case IDs</li><li>raw events</li><li>private paths</li><li>investigation timestamps</li><li>credentials</li><li>secrets</li><li>other personally identifiable information</li></ul><p>The synchronization logic also preserves analyst-written content. Managed sections can be updated, but freeform notes should not be overwritten.</p><p>This makes the technique library useful as long-term project knowledge without turning it into a secondary store of sensitive incident data.</p><h3>Controlled implementation after Plan Mode</h3><p>One of the most useful lessons from this work had less to do with Markdown syntax and more to do with implementation discipline.</p><p>I began in Plan Mode and asked Claude to inspect the repository before making changes.</p><p>After the plan was approved, I continued with manual approval enabled. Before each step, Claude explained:</p><ul><li>what would change</li><li>why the change was needed</li><li>which file or command was involved</li><li>whether there was any privacy or security impact</li></ul><p>This created a clear transition from planning to controlled execution.</p><p>The plan did not disappear once implementation began. It unfolded visibly, one approved step at a time.</p><p>That made it easier to:</p><ul><li>catch scope drift</li><li>verify file locations</li><li>review safety consequences</li><li>stop unexpected changes before they occurred</li><li>maintain a reliable record of how the project evolved</li></ul><p>For repository work, especially security tooling, this is a strong form of command hygiene.</p><h3>Testing command behavior</h3><p>The repository has automated tests for the underlying Python and MCP implementation, but it does not have a native harness for executing Claude Code slash commands end to end.</p><p>The command workflows were therefore verified through controlled manual tests.</p><p>Those tests covered:</p><ul><li>low-severity overrides</li><li>the default medium-severity path</li><li>invalid severity rejection</li><li>mixed-case normalization</li><li>case ID validation</li><li>dry-run behavior</li><li>output-path handling</li><li>note creation without overwriting earlier output</li><li>technique synchronization</li><li>preservation of analyst-written sections</li><li>cleanup of temporary test artifacts</li></ul><p>The underlying tools remain covered by the project’s automated test suite, while the command-specific orchestration was validated through deliberate invocation and file review.</p><h3>What this added to the project</h3><p>The project now has three complementary layers:</p><p><strong>MCP tools and resources</strong> provide the underlying analysis capabilities.</p><p><strong>Skills</strong> provide reusable methodology for work such as detection engineering.</p><p><strong>Slash commands</strong> provide explicit workflows that I invoke with specific inputs.</p><p>Together, they turn a collection of tools into a more usable defensive-security system.</p><p>The commands do not replace analyst judgment. They create a consistent structure for applying it.</p><h3>Final takeaway</h3><p>The most valuable part of slash commands is not that they shorten a prompt.</p><p>Their real value is that they make a workflow explicit.</p><p>Inputs are validated. Steps occur in a known order. Outputs follow a consistent structure. Privacy boundaries can be built into the process instead of being remembered afterward.</p><p>For this project, that meant turning EVTX analysis into repeatable investigation and triage workflows while reusing the Hayabusa MCP capabilities already in place.</p><p>The result is faster to invoke, easier to review, safer to repeat, and more useful as the investigation library grows.</p><p>This work was completed as part of the AI Cyber Defense Operations course from Just Hacking Training, while continuing to develop the public Hayabusa MCP Security Scanner project.</p><h3>Thanks for reading!</h3><p>Please check out my work for this project on GitHub.</p><h3>GitHub repository</h3><p>The finished project is available here:</p><blockquote><strong>GitHub:</strong> <strong>[</strong><a href="https://github.com/Pirate-Kitty/hayabusa-mcp-security-scanner">hayabusa-mcp-security-scanner</a><strong>]</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff3f531bd4f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Claude Code Skills Safely: Codifying Detection Engineering Methodology]]></title>
            <link>https://medium.com/@the_pirate_kitty/building-claude-code-skills-safely-codifying-detection-engineering-methodology-a234d799de6e?source=rss-f90557ba38c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/a234d799de6e</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[ai-security]]></category>
            <dc:creator><![CDATA[Pirate Kitty]]></dc:creator>
            <pubDate>Mon, 13 Jul 2026 12:31:45 GMT</pubDate>
            <atom:updated>2026-07-14T01:26:01.201Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tmiBYs2UBWrN-yKK" /><figcaption>Photo by <a href="https://unsplash.com/@h4x0r3?utm_source=medium&amp;utm_medium=referral">Thao LEE</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This exercise brings me to the next working version of the Hayabusa MCP Security Scanner I created throughout the first half of this challenge.</p><p>Thank you to <a href="https://medium.com/@the_pirate_kitty/building-a-hayabusa-mcp-security-scanner-with-claude-code-and-claude-desktop-on-linux-a53624c20bc7"><strong>Just Hacking Training</strong></a><strong> </strong>and <a href="https://www.wicys.org/"><strong>WiCyS</strong></a> (Women in Cybersecurity) for sharing the cohort opportunity that introduced me to this outstanding<strong> </strong><a href="https://learn.justhacking.com/courses/3a440c2c-1a0f-4b14-b5c9-bf6cf47dade9/take"><strong>Cyber Defense Ops</strong></a><strong> </strong>course!</p><p>Reaching the halfway point feels like a meaningful milestone. I am proud of what I have built so far and excited to begin the next set of exercises.</p><h3>GitHub repository</h3><p>The finished project is available here:</p><blockquote><strong><em>GitHub:</em></strong><em> </em><strong><em>[</em></strong><a href="https://github.com/Pirate-Kitty/hayabusa-mcp-security-scanner"><em>hayabusa-mcp-security-scanner</em></a><strong><em>]</em></strong></blockquote><h3>How I added project-scoped standards, validation scripts, and third-party skill review to a Hayabusa MCP security scanner</h3><p>In earlier stages of this project, I gave Claude Code access to detection tools and security knowledge through a Model Context Protocol server. That allowed Claude to work with Hayabusa, analyze detection coverage, and suggest rule ideas.</p><p>The next challenge was different:</p><blockquote><em>How do I teach Claude to follow a consistent methodology automatically?</em></blockquote><p>A tool gives Claude capabilities. A knowledge source gives Claude information. Neither one necessarily enforces how a team expects security work to be performed.</p><p>Claude Code Skills address that problem. A Skill can activate when the task matches a defined context, then apply standards, reference material, and validation steps without requiring the same instructions in every prompt.</p><p>For this project, I created a project-scoped detection-engineering Skill inside the existing Hayabusa MCP repository.</p><p>The completed project is available here:</p><p><a href="https://github.com/Pirate-Kitty/hayabusa-mcp-security-scanner?utm_source=chatgpt.com">View the Hayabusa MCP Security Scanner repository on GitHub</a></p><h3>What a Skill Adds</h3><p>The project already had an MCP server that exposed Hayabusa-related tools and resources. The Skill added a methodology layer.</p><p><strong>CLAUDE.md</strong><br> Stable project context and instructions.</p><p><strong>MCP server</strong><br> Structured access to tools and resources.</p><p><strong>Skill</strong><br> Methodology that activates when relevant work is detected.</p><p><strong>Slash command</strong><br> A workflow invoked manually.</p><p><strong>Hook</strong><br> Behavior triggered by a specific event.</p><p><strong>HANDOFF.md</strong><br> Current project state and next steps.</p><p>The detection-engineering Skill was designed to activate when Claude worked with:</p><ul><li>detection rules</li><li>ATT&amp;CK mappings</li><li>severity classifications</li><li>false positives</li><li>test cases</li><li>related YAML files</li></ul><p>Instead of repeatedly reminding Claude to follow these standards, I encoded them into the project.</p><h3>Keeping the Skill Project-Scoped</h3><p>Claude Code supports Skills at different scopes.</p><p>A user-level Skill can affect work across projects:</p><pre>~/.claude/skills/</pre><p>A project-level Skill lives inside the repository:</p><pre>.claude/skills/</pre><p>For this work, project scope was the better choice. The methodology belongs to the detection project and should not automatically influence unrelated repositories.</p><p>The resulting structure included:</p><pre>.claude/<br>└── skills/<br>    └── detection-engineering/<br>        ├── SKILL.md<br>        ├── scripts/<br>        │   └── validate-rule.py<br>        └── references/<br>            ├── example-rules/<br>            ├── severity-guide.md<br>            └── false-positive-patterns.md</pre><p>This kept the methodology, validator, and references together. It also made the Skill easier to review and maintain.</p><h3>Writing a Reliable Trigger Description</h3><p>A Skill’s YAML frontmatter includes a description field. Claude uses this field to decide when the Skill should activate.</p><p>A vague description such as “security work” would be unreliable. A trigger that only activates on one exact phrase would be too narrow.</p><p>A better description includes multiple relevant actions and contexts:</p><pre>---<br>name: detection-engineering<br>description: |<br>  Detection rule development standards. Activate when:<br>  - Writing, creating, or modifying detection rules<br>  - Reviewing rules for quality or completeness<br>  - Discussing detection coverage or gaps<br>  - Working with YAML files containing detection logic<br>  - Validating ATT&amp;CK mappings, severity, or false positives<br>---</pre><p>The goal is not maximum breadth. The goal is reliable activation without interfering with unrelated work.</p><h3>Adding Deterministic Validation</h3><p>Natural-language instructions are useful, but scripts provide a second layer of assurance.</p><p>The validation script was placed inside the Skill:</p><pre>.claude/skills/detection-engineering/scripts/validate-rule.py</pre><p>Keeping it there instead of at the repository root had several advantages:</p><ul><li>it remained packaged with the methodology it enforced</li><li>its purpose was clear</li><li>it did not clutter the root directory</li><li>the Skill could be reviewed or moved as one unit</li></ul><p>The broader pattern is reusable:</p><ol><li>Claude creates or modifies an artifact.</li><li>The Skill instructs Claude to validate it.</li><li>A script checks exact requirements.</li><li>Claude reports and corrects any issues.</li></ol><p>This pattern can be used for more than detection rules. It can also support compliance documents, incident reports, configuration files, and infrastructure definitions.</p><h3>Using Reference Files</h3><p>The Skill also included supporting documents:</p><pre>references/example-rules/<br>references/severity-guide.md<br>references/false-positive-patterns.md</pre><p>This kept the main SKILL.md focused while still giving Claude access to examples and standards.</p><p>That is a useful design pattern for larger Skills:</p><ul><li>keep the central instructions concise</li><li>move detailed examples and supporting guidance into references</li></ul><h3>Preserving the Project Before Changes</h3><p>Before adding the Skill, I verified that the existing Hayabusa repository was in a known-good state.</p><p>The checks included:</p><pre>git status<br>git branch --show-current<br>git log -1 --format=&#39;Author: %an &lt;%ae&gt;%nCommitter: %cn &lt;%ce&gt;&#39;<br>git rev-list --left-right --count origin/main...main</pre><p>These confirmed:</p><ul><li>the working tree was clean</li><li>the branch was main</li><li>Git was using the intended no-reply identity</li><li>local and remote branches were synchronized</li></ul><p>I also used Plan Mode before allowing changes. Claude first reviewed the repository structure, dependencies, tests, documentation, and security concerns without editing anything.</p><p>This created a clean boundary between the completed project and the new implementation.</p><h3>Updating HANDOFF.md After Testing</h3><p>One practical lesson was that HANDOFF.md should reflect the verified final state, not the expected state before testing.</p><p>The first update happened before the full regression test run. After all tests passed, the handoff needed another revision so it no longer described testing as pending.</p><p>The final sequence was:</p><ol><li>Complete implementation.</li><li>Run the new validation checks.</li><li>Run all existing regression tests.</li><li>Update HANDOFF.md.</li><li>Review for stale or duplicated information.</li><li>Review for secrets, PII, private paths, and unintended files.</li><li>Stage the intended changes.</li><li>Review the staged diff.</li><li>Commit.</li><li>Verify the clean working tree.</li><li>Push from the regular terminal.</li></ol><p>All 41 existing tests passed after the Skill and documentation changes.</p><p>That mattered because new Claude configuration should not silently break existing MCP functionality.</p><h3>Evaluating a Third-Party Skill Without Blind Trust</h3><p>The second half of the exercise introduced a third-party YARA-authoring Skill.</p><p>This was especially valuable because Skills may contain more than Markdown instructions. They can include:</p><ul><li>Python or shell scripts</li><li>hooks</li><li>commands</li><li>MCP servers</li><li>dependencies</li><li>filesystem or network access</li></ul><p>A reputable publisher is a useful signal, but it is not a permanent guarantee. Maintainer accounts can be compromised. Dependencies can change. Safe code can later receive unsafe updates.</p><p>The right approach was:</p><blockquote><em>Treat the third-party Skill as untrusted code under evaluation, not as trusted code because of the publisher’s reputation.</em></blockquote><h3>Creating an Isolated Review Area</h3><p>Rather than installing the third-party Skill directly into the completed Hayabusa repository, I created a separate lab:</p><pre>mkdir -p ~/skill-test<br>cd ~/skill-test<br>python3 -m venv .venv<br>source .venv/bin/activate</pre><p>Before doing this, I had already:</p><ul><li>committed and pushed the Hayabusa repository</li><li>confirmed that the repository was synchronized</li><li>powered off the VM cleanly</li><li>created a VM snapshot</li></ul><p>Git protected the repository files. The VM snapshot protected the wider environment, including Claude configuration, packages, and plugins.</p><p>Those are different recovery layers, and both were useful.</p><h3>Cloning Before Installing</h3><p>I cloned the third-party repository for inspection before installing its marketplace entry:</p><pre>git clone --depth 1 https://github.com/trailofbits/skills.git trailofbits-skills</pre><p>I then recorded the checked-out revision:</p><pre>git -C trailofbits-skills rev-parse HEAD</pre><p>A commit hash does not prove that code is safe. Its value is reproducibility: it identifies exactly which revision was reviewed.</p><h3>Reviewing Structure Before Behavior</h3><p>The review worked best in layers.</p><p>First, inventory the files:</p><pre>find trailofbits-skills/plugins/yara-authoring -type f | sort</pre><p>For a short, important file such as plugin.json, reading the full file was appropriate:</p><pre>cat path/to/.claude-plugin/plugin.json</pre><p>For larger files, targeted searches helped locate areas requiring attention:</p><pre>grep -RniE &#39;hook|script|command|mcp|network|http|https|curl|wget|socket|subprocess|os\.system|eval|exec|base64|credential|token|secret|dependency|install|pip|uv|cargo|brew&#39; \<br>path/to/yara-authoring</pre><p>This was only a screening step.</p><p>YARA documentation naturally contains terms such as:</p><ul><li>base64</li><li>regex</li><li>scripts</li><li>macros</li><li>socket-related names</li><li>Windows API names</li></ul><p>A keyword match does not prove dangerous behavior. Context still matters.</p><h3>Reviewing the Executable Scripts</h3><p>The plugin contained two Python scripts:</p><pre>yara_lint.py<br>atom_analyzer.py</pre><p>I screened them for higher-risk behavior:</p><pre>grep -nEi &#39;^(import|from) |requests|urllib|httpx|socket|subprocess|os\.system|popen|eval\(|exec\(|base64|open\(|write|unlink|remove|rmtree|chmod|chown|environ|token|credential|secret&#39; \<br>path/to/scripts/*.py</pre><p>The imports included expected modules such as:</p><ul><li>argparse</li><li>json</li><li>re</li><li>sys</li><li>yara_x</li></ul><p>The analyzer parsed hexadecimal values and wildcard bytes. A comment about removing braces referred to string normalization, not deleting files.</p><p>The linter used normal file-reading behavior:</p><pre>file_path.read_text()</pre><p>The review did not reveal evidence of:</p><ul><li>outbound network access</li><li>subprocess or shell execution</li><li>credential access</li><li>dynamic eval or exec</li><li>file deletion</li><li>permission changes</li><li>hooks</li><li>MCP servers</li><li>agents</li></ul><p>That did not make the plugin risk-free. It made the risk understandable enough to proceed with a limited test.</p><h3>Why grep Helps, but Is Not Enough</h3><p>This exercise clarified an important point.</p><p>grep is useful when you know what indicators to search for:</p><ul><li>network libraries</li><li>subprocess calls</li><li>environment variables</li><li>file-writing methods</li><li>hook or MCP configuration</li></ul><p>But grep cannot tell you whether a match is dangerous.</p><p>A strong review combines:</p><ol><li>find to inventory files</li><li>cat for short, critical files</li><li>grep for targeted screening</li><li>contextual reading of matches</li><li>isolated execution with synthetic data</li></ol><p>This is a realistic process for someone still learning code review. The goal is not to recognize every issue instantly. The goal is to narrow the review in a repeatable way.</p><h3>Choosing Local Plugin Scope</h3><p>When Claude Code asked how the plugin should be installed, I chose:</p><blockquote><em>Install for you, in this repository only — local scope.</em></blockquote><p>That prevented the Skill from being enabled across unrelated projects and avoided sharing it through repository configuration.</p><p>Local scope does not necessarily mean every cached file exists only inside the folder. It means the plugin is enabled only for that user and project context.</p><p>That distinction matters.</p><h3>Installing YARA-X Without Making It System-Wide</h3><p>The Skill required YARA-X for its validation tools.</p><p>The Python binding was installed inside the isolated virtual environment:</p><pre>python -m pip install yara-x</pre><p>It was verified with:</p><pre>python -c &quot;import yara_x; print(&#39;yara_x import successful&#39;)&quot;</pre><p>The separate yr CLI was downloaded as an architecture-specific Linux release for x86_64.</p><p>Before extraction, I verified the checksum:</p><pre>sha256sum downloaded-archive.tar.gz</pre><p>The CLI was extracted into:</p><pre>~/skill-test/yr</pre><p>It was not moved into /usr/local/bin.</p><p>The installed version was:</p><pre>yara-x-cli 1.19.0</pre><p>For the active shell, I added the lab folder to PATH:</p><pre>export PATH=&quot;$HOME/skill-test:$PATH&quot;</pre><p>This allowed the shorter command:</p><pre>yr --version</pre><p>without changing the system permanently.</p><h3>Tool Placement Should Be Intentional</h3><p>One of the most useful lessons was understanding where a tool should live.</p><p>PlacementAppropriate useSystem-wideTrusted tools used across many projectsUser-levelPersonal tools used broadlyProject-localIsolated, version-specific, experimental, or higher-risk tooling</p><p>Keeping YARA-X project-local provided:</p><ul><li>containment</li><li>reproducibility</li><li>easier cleanup</li><li>deliberate upgrades</li><li>less chance of affecting unrelated projects</li></ul><p>Project-local placement does not make the tool inaccessible. It can always be called directly:</p><pre>~/skill-test/yr --version</pre><p>Adding the directory to PATH is only a convenience.</p><p>This is not a universal rule. Tool placement should be based on trust, frequency of use, compatibility needs, and potential impact.</p><h3>Handling Version Drift</h3><p>Keeping a tool creates a maintenance responsibility.</p><p>Before using the lab again, I should verify:</p><pre>cd ~/skill-test<br>source .venv/bin/activate<br>export PATH=&quot;$HOME/skill-test:$PATH&quot;</pre><pre>yr --version<br>python -m pip show yara-x</pre><p>Then I can compare those versions with the current official release.</p><p>A newer version does not automatically mean “update immediately.” A responsible update process includes reviewing:</p><ul><li>release notes</li><li>security fixes</li><li>compatibility changes</li><li>Skill support</li><li>new dependencies</li><li>checksums</li></ul><p>This avoids both silently using an outdated tool and replacing a known-good tool with an unreviewed update.</p><h3>Testing With Synthetic Data</h3><p>The final test used a harmless synthetic YARA-X rule rather than real malware.</p><p>Claude created a rule for test strings such as:</p><pre>training_sample<br>demo_payload</pre><p>The rule was validated with:</p><pre>yr check</pre><p>and the plugin’s scripts:</p><pre>yara_lint.py<br>atom_analyzer.py</pre><p>All three completed successfully.</p><p>This confirmed:</p><ul><li>the third-party Skill activated</li><li>YARA-X was available</li><li>the Python binding worked</li><li>the rule syntax was valid</li><li>the linter and atom analyzer ran</li><li>no real malware sample was required</li></ul><h3>Removing the Third-Party Integration</h3><p>After the exercise, I:</p><ol><li>uninstalled the yara-authoring plugin</li><li>removed the Trail of Bits marketplace</li><li>confirmed the plugin was no longer installed</li><li>returned to the Hayabusa repository</li><li>verified the repository remained clean</li><li>confirmed local and remote main were still synchronized</li></ol><p>The isolated YARA-X lab remained available for future controlled use, but the third-party Claude integration was removed.</p><h3>What I Learned</h3><p>This project reinforced several broader principles.</p><h3>Methodology should be encoded</h3><p>Repeated instructions are easy to forget. A Skill can turn team expectations into reusable behavior.</p><h3>Natural language and scripts complement each other</h3><p>Claude can reason about quality, while scripts enforce exact requirements.</p><h3>Scope is a security boundary</h3><p>User, project, and local scopes have different consequences.</p><h3>Reputation is not verification</h3><p>A known publisher reduces uncertainty but does not eliminate supply-chain risk.</p><h3>Security review is a process</h3><p>Inventory, targeted searches, contextual reading, isolation, synthetic testing, and cleanup work together.</p><h3>Tool placement communicates intent</h3><p>A project-local tool is easier to contain, reproduce, audit, and remove.</p><h3>Git does not replace environment recovery</h3><p>Git protects repository content. VM snapshots protect the broader environment.</p><h3>Documentation should reflect verified reality</h3><p>HANDOFF.md should describe the state after testing, not the expected state before it.</p><h3>Final Project State</h3><p>The completed Hayabusa repository now includes:</p><ul><li>a project-scoped detection-engineering Skill</li><li>a SKILL.md trigger and methodology</li><li>a rule validator</li><li>reference guidance</li><li>updated project documentation</li><li>a refreshed HANDOFF.md</li><li>all 41 existing tests passing</li><li>a committed and pushed checkpoint on main</li></ul><p>The third-party YARA exercise was completed in a separate lab. The plugin and marketplace were then removed.</p><p>The result was not simply a functioning Skill. It was a repeatable process for introducing AI-assisted methodology and third-party tooling without abandoning review, containment, or recovery planning.</p><h4>Thank you for checking out this article, and stay tuned for more!</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a234d799de6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Giving Claude a Detection Knowledge Base with MCP Resources]]></title>
            <link>https://medium.com/@the_pirate_kitty/giving-claude-a-detection-knowledge-base-with-mcp-resources-1cc06a0bb170?source=rss-f90557ba38c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cc06a0bb170</guid>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[mitre-attack]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Pirate Kitty]]></dc:creator>
            <pubDate>Sat, 11 Jul 2026 20:01:44 GMT</pubDate>
            <atom:updated>2026-07-12T03:49:29.526Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V7SkBxW89GImC0aF" /><figcaption>Photo by <a href="https://unsplash.com/@sasun1990?utm_source=medium&amp;utm_medium=referral">Sasun Bughdaryan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In my previous article, <a href="https://medium.com/@the_pirate_kitty/building-a-hayabusa-mcp-security-scanner-with-claude-code-and-claude-desktop-on-linux-a53624c20bc7"><strong>Building a Hayabusa MCP Security Scanner with Claude Code and Claude Desktop on Linux</strong></a>, I documented my work through Module 3 of <a href="https://medium.com/@the_pirate_kitty/building-a-hayabusa-mcp-security-scanner-with-claude-code-and-claude-desktop-on-linux-a53624c20bc7"><strong>Just Hacking Training</strong></a>’s course: <a href="https://learn.justhacking.com/courses/3a440c2c-1a0f-4b14-b5c9-bf6cf47dade9/take"><strong>AI Cyber Defense Ops</strong></a>. This article continues that project with Module 4, where I extended the scanner into a detection knowledge base using MCP resources.</p><p>Thank you to <a href="https://www.wicys.org/"><strong>WiCyS</strong></a> (Women in Cybersecurity) for sharing the cohort opportunity that introduced me to this challenging and exciting course!</p><h3>Extending a Hayabusa MCP server so Claude can browse Sigma rules, map ATT&amp;CK coverage, and produce safe detection-rule drafts</h3><p>In the previous phase of this project, I built a Model Context Protocol server that connected Claude to Hayabusa.</p><p>Claude could call tools to:</p><ul><li>scan Windows Event Log files with Hayabusa;</li><li>search the detection rules bundled with Hayabusa;</li><li>filter and summarize the resulting findings.</li></ul><p>That gave Claude the ability to <strong>take actions</strong>, but it did not give Claude a structured way to browse the detection knowledge behind those actions.</p><p>Claude could run the scanner, but questions such as these still required more context:</p><ul><li>Which local rules detect a particular MITRE ATT&amp;CK technique?</li><li>Do we have rules mapped to Kerberoasting or DCSync?</li><li>Which techniques have no matching rules?</li><li>What should a draft detection rule contain when a gap is found?</li></ul><p>The next step was to add MCP resources: read-only data that Claude could browse as a detection engineering knowledge base.</p><p>The completed server now includes four tools, four resource patterns, and 41 passing tests while preserving the Hayabusa functionality built earlier.</p><h3>Tools and resources solve different problems</h3><p>The distinction between MCP tools and resources became much clearer during this project.</p><blockquote><strong><em>Tools let Claude do something. Resources give Claude something reliable to read.</em></strong></blockquote><p>My original server exposed two tools:</p><pre>scan_evtx<br>get_hayabusa_rules</pre><p>scan_evtx runs Hayabusa against an EVTX file.</p><p>get_hayabusa_rules searches information from Hayabusa’s rule collection.</p><p>Those are useful actions, but repeatedly calling a search tool is not the same as exposing a structured knowledge base.</p><p>For this phase, I added these resource patterns:</p><pre>detection://rules<br>detection://rules/{rule_identifier}<br>detection://rules/by-technique/{technique_id}<br>detection://attack/techniques/{technique_id}</pre><p>Claude can now:</p><ul><li>browse a compact index of local rules;</li><li>retrieve the complete YAML for one rule;</li><li>list rules mapped to a technique;</li><li>check whether the local ruleset contains coverage for a technique.</li></ul><p>The resources do not modify anything. They expose existing data in a form Claude can inspect when needed.</p><h3>Extending the working server instead of starting over</h3><p>Rather than create a separate demonstration project, I extended the existing Hayabusa MCP server.</p><p>That meant preserving:</p><ul><li>the two original tools;</li><li>the current server.py entry point;</li><li>the existing .mcp.json configuration;</li><li>both Claude Code and Claude Desktop compatibility;</li><li>the existing Hayabusa binary and rule directories;</li><li>the earlier test suite.</li></ul><p>The resource implementation was additive. It did not replace the working scan and search functions.</p><p>This was an important practical lesson: adding AI-facing functionality does not have to mean rebuilding a system. A working project can be extended incrementally, with regression tests protecting the behavior that already works.</p><h3>Using the real Hayabusa rule collection</h3><p>The exercise could have been completed with five or six sample Sigma rules.</p><p>Instead, I exposed the actual rule collection already present in the Hayabusa project.</p><p>The server searches recursively through:</p><pre>hayabusa/rules/hayabusa/<br>hayabusa/rules/sigma/</pre><p>The collection included nearly 5,000 YAML files.</p><p>Working with a real ruleset immediately introduced design questions that a tiny sample directory would not reveal:</p><ul><li>How should rules be identified when filenames repeat?</li><li>How should the server avoid reparsing thousands of files for every request?</li><li>How should broad queries be prevented from creating oversized MCP responses?</li><li>Should a parent ATT&amp;CK technique match rules tagged only with sub-techniques?</li><li>How should duplicate or missing rule identifiers be handled?</li></ul><p>Those became some of the most valuable parts of the project.</p><h3>Stable identifiers for individual rules</h3><p>The individual-rule resource uses this pattern:</p><pre>detection://rules/{rule_identifier}</pre><p>A filename alone was not safe enough because separate nested directories can contain rules with the same filename.</p><p>The server therefore uses the Sigma rule’s own YAML id UUID as the primary identifier.</p><p>That identifier remains stable even if the rule file is moved or renamed.</p><p>For a rule that does not contain a valid id, the server creates a deterministic fallback from the rule’s relative path. The fallback uses a SHA-256 digest rather than Python’s built-in hash() function, which can vary between processes.</p><p>The index also records where the identifier came from:</p><pre>{<br>  &quot;resource_id&quot;: &quot;rule-identifier&quot;,<br>  &quot;id_source&quot;: &quot;yaml&quot;<br>}</pre><p>Duplicate identifiers are not silently resolved. If two rules claim the same UUID, the server reports the collision rather than choosing one and risking retrieval of the wrong rule.</p><p>That is a small but important defensive decision. An explicit error is safer than confidently returning the wrong detection logic.</p><h3>An on-demand, process-lifetime rule index</h3><p>Parsing thousands of YAML files for every MCP request would be wasteful.</p><p>The server now builds an enriched rule index only when it is first needed:</p><ol><li>The first resource request triggers the recursive parse.</li><li>Each rule receives its stable resource identifier.</li><li>ATT&amp;CK tags and lookup information are indexed.</li><li>The completed index is cached for the lifetime of the server process.</li></ol><p>Later requests reuse that cached index.</p><p>This significantly reduces repeated work, but it also creates a clear operational consequence: if the rule files change, the MCP server must be restarted before the cache reflects those changes.</p><p>That matched something we had already observed during development. After changing server.py, reconnecting the MCP server or restarting Claude Code may be required before Claude sees the updated behavior.</p><h3>Keeping resource responses manageable</h3><p>Returning the full content of every rule through detection://rules would create an enormous response.</p><p>The root resource therefore returns a compact index rather than thousands of full YAML documents.</p><p>Each record contains selected metadata such as:</p><pre>{<br>  &quot;resource_id&quot;: &quot;...&quot;,<br>  &quot;id_source&quot;: &quot;yaml&quot;,<br>  &quot;title&quot;: &quot;...&quot;,<br>  &quot;level&quot;: &quot;high&quot;<br>}</pre><p>The response also reports:</p><ul><li>total indexed rules;</li><li>rows returned;</li><li>whether the result was truncated;</li><li>any duplicate identifiers.</li></ul><p>The index is capped at 500 rows.</p><p>When Claude needs the full content of one rule, it can retrieve it separately:</p><pre>detection://rules/{rule_identifier}</pre><p>This works more like browsing a filesystem: list the available records first, then open only what is relevant.</p><h3>Parent techniques and sub-techniques</h3><p>The technique resources accept values such as:</p><pre>T1003<br>T1003.001</pre><p>Inputs are normalized case-insensitively, so t1003.001 and T1003.001 behave the same way.</p><p>The matching rules are intentionally asymmetric.</p><p>A query for a specific sub-technique such as:</p><pre>T1003.001</pre><p>matches only that sub-technique.</p><p>It does not match:</p><ul><li>the parent technique;</li><li>sibling sub-techniques;</li><li>unrelated tags that happen to share part of the identifier.</li></ul><p>A query for the parent:</p><pre>T1003</pre><p>may include rules tagged directly with T1003 and rules tagged with its sub-techniques, such as:</p><pre>T1003.001<br>T1003.006</pre><p>The result can distinguish direct matches from sub-technique matches.</p><p>This makes broad parent queries useful for coverage reviews without making precise sub-technique queries overly permissive.</p><h3>Validating the live resources</h3><p>After restarting Claude Code and reconnecting the MCP server, I tested the new resources against the actual Hayabusa collection.</p><p>The live lookups returned:</p><ul><li>T1003.001: 123 matching rule entries;</li><li>T1558.003: 23 matching rules;</li><li>T1003.006: 9 matching rules.</li></ul><p>T1003.001 is associated with LSASS Memory, T1558.003 with Kerberoasting, and T1003.006 with DCSync.</p><p>The first result contained fewer distinct titles than total entries. That did not indicate a filtering bug. Large rule collections can contain variants, repeated titles, or multiple files associated with the same technique.</p><p>The important validation was that different techniques returned different result sets and that precise sub-technique queries remained exact.</p><h3>What “covered” actually means</h3><p>The project uses a deliberately narrow definition of coverage:</p><pre>covered = one or more matching local rules exist<br>not_covered = no matching local rules exist</pre><p>That is useful, but it is not a complete assessment of defensive capability.</p><p>A covered result does not prove that:</p><ul><li>the rule is enabled;</li><li>the required event source is being collected;</li><li>the rule performs well in the environment;</li><li>false positives are acceptable;</li><li>the rule has been tuned;</li><li>every meaningful form of the technique is detected;</li><li>responders have a validated playbook.</li></ul><p>The server also does not currently bundle a complete authoritative MITRE ATT&amp;CK dataset.</p><p>It can recognize and validate technique-ID syntax, but it does not independently provide every:</p><ul><li>technique name;</li><li>description;</li><li>tactic assignment;</li><li>detection strategy;</li><li>data-source requirement.</li></ul><p>Rather than invent unsupported metadata, the server limits its response to facts available from the local rules.</p><p>That boundary became especially visible during a Credential Access analysis. The local rule mappings were available, but the server itself could not enumerate every technique belonging to the tactic. Claude had to supply that broader tactic list from its general knowledge rather than retrieve it from a connected authoritative resource.</p><p>That distinction matters.</p><h3>Adding coverage analysis as a tool</h3><p>Once the resource layer was working, I added:</p><pre>analyze_coverage</pre><p>This tool accepts one or more ATT&amp;CK technique IDs and returns:</p><ul><li>normalized technique ID;</li><li>binary coverage status;</li><li>number of matching rules;</li><li>sample matching rule identifiers;</li><li>individual errors for malformed inputs.</li></ul><p>A malformed ID does not cause the entire batch to fail.</p><p>The tool reuses the same matching helper used by the resources. This prevents the resource and tool layers from developing conflicting definitions of coverage.</p><p>During testing, a Credential Access review considered 802 local rule mappings.</p><p>The server’s native model remained binary, but Claude could still summarize broader parent-technique coverage. For example, a parent technique could be described as partially represented when some sub-techniques had matching rules and others did not.</p><p>That interpretation was useful, but it was presented as an analytical summary rather than a native server status.</p><h3>Suggesting a rule without writing one</h3><p>The second added tool was:</p><pre>suggest_rule</pre><p>This tool first checks the existing local coverage.</p><p>When matching rules already exist, it returns those rules for review instead of assuming that another rule is automatically needed.</p><p>When no matching rule exists, it returns a read-only Sigma-style draft.</p><p>It does not create a YAML file.</p><p>It also does not invent an ATT&amp;CK technique name or tactic when authoritative metadata is unavailable. The draft uses the validated technique ID and leaves environment-specific fields marked for human completion.</p><p>For the live test, Claude identified T1611 as having no matching local rules and called suggest_rule.</p><p>The tool returned a template containing TODO fields and clearly stated that they needed to be completed and validated before the output could be treated as a real detection rule.</p><p>That was exactly the intended behavior.</p><p>The test confirmed that:</p><ul><li>a local coverage gap was identified;</li><li>a structured starting point was returned;</li><li>the output was not represented as production-ready;</li><li>no rule file was created;</li><li>no existing file was modified;</li><li>human validation remained mandatory.</li></ul><p>This is the role I want AI to have in a detection workflow: assisting with organization and scaffolding, not silently making production security decisions.</p><h3>Forty-one passing tests</h3><p>The final regression suite contains 41 passing tests:</p><pre>15 resource tests<br>5 get_hayabusa_rules tests<br>7 scan_evtx tests<br>6 analyze_coverage tests<br>8 suggest_rule tests</pre><p>The tests cover:</p><ul><li>resource registration;</li><li>resource templates;</li><li>compact rule indexing;</li><li>full YAML retrieval;</li><li>stable identifiers;</li><li>malformed technique IDs;</li><li>exact sub-technique matching;</li><li>parent inclusion;</li><li>sibling exclusion;</li><li>coverage payloads;</li><li>tool registration;</li><li>batch coverage behavior;</li><li>covered and uncovered rule suggestions;</li><li>read-only enforcement;</li><li>original scan behavior;</li><li>original rule-search behavior.</li></ul><p>The read-only protection for suggest_rule is tested directly. The test records the modification times of every rule file before and after the tool is called and confirms that nothing changed.</p><p>The two original tools and all four resource patterns continued to work after the new tools were added.</p><h3>A safer public-repository workflow</h3><p>Because this repository is public, privacy and credential safety had to be part of the development process.</p><p>The workflow used was:</p><ol><li>Verify the Git branch and identity.</li><li>Confirm the GitHub no-reply email.</li><li>Keep Claude Code in manual-approval mode.</li><li>Implement in small checkpoints.</li><li>Run focused tests and the full regression suite.</li><li>Update HANDOFF.md before the final checkpoint commit.</li><li>Review changes for secrets and personal information.</li><li>Stage only the intended files.</li><li>Review the staged diff.</li><li>Commit and verify the working tree.</li><li>Exit Claude Code.</li><li>Push from the regular terminal.</li><li>Paste the fine-grained token only at the password prompt.</li><li>Confirm that main and origin/main are synchronized.</li></ol><p>The review included checks for:</p><ul><li>tokens and credentials;</li><li>personal email addresses;</li><li>private usernames;</li><li>IP addresses and hostnames;</li><li>unnecessary absolute paths;</li><li>generated artifacts;</li><li>virtual environments;</li><li>caches;</li><li>local configuration.</li></ul><p>The GitHub token was never placed in a command, source file, remote URL, documentation file, Claude prompt, or chat message.</p><p>One process improvement also came out of the project: HANDOFF.md should be updated before the final commit, not afterward. That keeps the completed code and its durable handoff record together.</p><h3>Grounding makes Claude more useful</h3><p>The most important result was not simply adding more MCP endpoints.</p><p>It was changing the source of Claude’s answers.</p><p>Without resources, Claude might answer a detection-coverage question from general knowledge or require rule information to be pasted into the conversation.</p><p>With resources, Claude can inspect the actual local Hayabusa ruleset.</p><p>Without shared matching logic, a resource and a tool might calculate coverage differently.</p><p>With shared helpers, they use the same local evidence.</p><p>Without safeguards, a rule-suggestion tool might write an unvalidated file into the repository.</p><p>With a read-only design, it returns a visibly incomplete draft and leaves implementation decisions with the analyst.</p><p>The pattern I want to continue using is:</p><blockquote><em>Give AI controlled access to real data, separate facts from inference, preserve human validation, and test every boundary.</em></blockquote><p>The server can now:</p><ul><li>run Hayabusa scans;</li><li>search Hayabusa rules;</li><li>expose those rules as browsable resources;</li><li>evaluate local ATT&amp;CK mappings;</li><li>analyze coverage;</li><li>provide safe draft guidance for uncovered techniques.</li></ul><p>The usefulness comes from grounding, not from giving the model unchecked authority.</p><p>And all 41 tests pass!</p><h3>GitHub repository</h3><p>The finished project is available here:</p><blockquote><strong><em>GitHub:</em></strong><em> </em><strong><em>[</em></strong><a href="https://github.com/Pirate-Kitty/hayabusa-mcp-security-scanner"><em>hayabusa-mcp-security-scanner</em></a><strong><em>]</em></strong></blockquote><h3>Thanks for reading!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cc06a0bb170" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Hayabusa MCP Security Scanner with Claude Code and Claude Desktop on Linux]]></title>
            <link>https://medium.com/@the_pirate_kitty/building-a-hayabusa-mcp-security-scanner-with-claude-code-and-claude-desktop-on-linux-a53624c20bc7?source=rss-f90557ba38c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/a53624c20bc7</guid>
            <category><![CDATA[claude-ai]]></category>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Pirate Kitty]]></dc:creator>
            <pubDate>Fri, 10 Jul 2026 16:29:30 GMT</pubDate>
            <atom:updated>2026-07-10T23:48:39.569Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9R3eq3PUGPFAWDKs" /><figcaption>Photo by <a href="https://unsplash.com/@parthsanghavi300?utm_source=medium&amp;utm_medium=referral">Parth Sanghavi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This project is part of the <a href="https://learn.justhacking.com/courses/3a440c2c-1a0f-4b14-b5c9-bf6cf47dade9"><strong>AI Cyber Defense Ops</strong></a> coursework I am completing through <a href="https://www.justhacking.com/"><strong>Just Hacking Training</strong></a>. I discovered this engaging and valuable set of challenges through a cohort shared by <a href="https://www.wicys.org/"><strong>WiCyS </strong></a><strong>— Women in CyberSecurity</strong>.</p><p>In this post, I am documenting one of the course modules, which included several hands-on challenges involving MCP, Claude Code, Claude Desktop, Hayabusa, EVTX analysis, and security-tool integration.</p><p>I have shared the GitHub repository for this project at the end of the article. I also encourage anyone looking for structured, practical training in building advanced AI-assisted cybersecurity workflows to explore the course.</p><h3>Connecting Claude to EVTX threat detection, rule discovery, and security analysis through MCP</h3><p>When I started this project, I was not simply trying to build another Python script.</p><p>The goal was to create a security tool that Claude could use directly.</p><p>That difference matters.</p><p>A script may solve a problem once, but it still requires someone to remember how to run it, what arguments it expects, where the files are located, and how to interpret the output. By wrapping Hayabusa in an MCP server, I was able to turn that workflow into a reusable tool that Claude could call more naturally.</p><p>The finished project connects Claude to Hayabusa for EVTX scanning, severity filtering, rule discovery, and structured security analysis.</p><p>It also works across both Claude Code and Claude Desktop.</p><p>That made this project feel less like a one-time coding exercise and more like the beginning of a reusable cyber defense workflow.</p><h3>What I built</h3><p>I built a Python-based MCP server around Hayabusa, a Windows event log analysis and threat detection tool.</p><p>The server exposes two tools:</p><ul><li>scan_evtx</li><li>get_hayabusa_rules</li></ul><p>The first tool scans EVTX files and returns filtered findings.</p><p>The second retrieves Hayabusa detection rules and can narrow them by keyword.</p><p>Together, they allow Claude to do things such as:</p><ul><li>scan an EVTX file</li><li>filter findings by minimum severity</li><li>search for a particular rule or detection topic</li><li>return a concise summary or fuller structured output</li><li>limit the number of results</li><li>explore Hayabusa rules without manually browsing the rule directories</li></ul><p>Instead of repeatedly explaining how to invoke Hayabusa, I can now ask Claude to use the connected MCP tool.</p><p>That is the core value of the project.</p><h3>Why MCP changed the workflow</h3><p>In an earlier project, I built a Linux journal security parser with Claude’s help.</p><p>That was useful, but Claude was still helping me work with code.</p><p>This project moved beyond that.</p><p>With MCP, Claude does not need to rediscover how the tool works each time. The server defines the available tools, their parameters, and the structure of the returned data.</p><p>That allows requests to become much more direct.</p><p>For example:</p><blockquote><em>Scan this EVTX file and return findings at Low severity or higher.</em></blockquote><p>Or:</p><blockquote><em>Show me Hayabusa rules related to Mimikatz.</em></blockquote><p>The technical work still exists underneath, but the interface becomes easier to use and more repeatable.</p><p>That is what made this project especially valuable to me.</p><h3>Setting up the project cleanly</h3><p>I completed the project on Ubuntu, so I wanted the environment to be isolated, reproducible, and easy to return to.</p><p>I created a project-specific Python virtual environment:</p><pre>cd ~/mcp-hayabusa<br>python3 -m venv .venv<br>source .venv/bin/activate</pre><p>That became part of my normal project-entry routine:</p><pre>cd ~/mcp-hayabusa<br>source .venv/bin/activate<br>claude</pre><p>I also recorded the Python dependency in requirements.txt rather than relying on memory.</p><p>The project began with:</p><pre>mcp</pre><p>These were small decisions, but they made the build easier to manage.</p><p>They also supported a cleaner public repository later.</p><h3>Verifying Hayabusa before building around it</h3><p>Before writing the MCP wrapper, I downloaded the Hayabusa release, verified its checksum, and confirmed the binary reported the expected version.</p><p>That step was important.</p><p>Automation should not begin with an unverified dependency.</p><p>I wanted to know that:</p><ul><li>the download was authentic</li><li>the binary was intact</li><li>the version was correct</li><li>the tool could run successfully in the environment</li></ul><p>Only after those checks did I begin building the MCP integration.</p><p>This is a habit I plan to keep for future security projects.</p><h3>Building the first MCP tool</h3><p>The first tool was scan_evtx.</p><p>Its job was to take an EVTX file path, invoke Hayabusa, and return usable findings.</p><p>The first version focused on the basic workflow:</p><ul><li>validate the file path</li><li>run Hayabusa</li><li>collect JSON output</li><li>filter findings by severity</li><li>return structured results</li><li>handle errors clearly</li></ul><p>Once the basic version worked, I expanded it with additional parameters:</p><ul><li>minimum_severity</li><li>rule_filter</li><li>output_format</li><li>max_results</li></ul><p>These options made the tool more practical.</p><p>For example, a user can request only medium-severity findings, filter results for a specific detection rule, or limit the number of returned events.</p><h3>A missed detection exposed a wrapper bug</h3><p>One of the most useful lessons came after the tool appeared to be working correctly.</p><p>The tests passed.</p><p>The MCP server returned valid output.</p><p>At first glance, everything looked fine.</p><p>Then I compared the wrapper output directly against Hayabusa’s raw output.</p><p>Hayabusa showed one Low-severity finding, but the MCP tool did not surface it.</p><p>That meant the wrapper was not faithfully representing the underlying tool.</p><p>The issue was corrected, and the expected behavior became:</p><ul><li>informational should include the known Low finding</li><li>low should include the known Low finding</li><li>medium and above should exclude it</li></ul><p>This was an important reminder that successful execution is not the same as correct behavior.</p><p>A wrapper can run without errors and still lose information.</p><p>For security tooling, comparing the wrapper’s results to the source tool is essential.</p><h3>Adding Hayabusa rule discovery</h3><p>The second tool was get_hayabusa_rules.</p><p>This tool retrieves Hayabusa rule details and returns them as structured JSON.</p><p>It also supports keyword filtering.</p><p>That makes it possible to search for rules related to specific topics, such as:</p><ul><li>Mimikatz</li><li>credential dumping</li><li>PowerShell</li><li>lateral movement</li><li>suspicious account activity</li></ul><p>This added another dimension to the project.</p><p>The server was no longer only scanning logs. It could also help explore the detection content behind Hayabusa.</p><p>That creates useful possibilities for:</p><ul><li>detection engineering</li><li>analyst training</li><li>rule research</li><li>incident investigation</li><li>presentation and reporting tasks</li></ul><h3>Connecting the server to Claude Code</h3><p>After the tools worked locally, I connected the MCP server to Claude Code.</p><p>The project used an .mcp.json configuration so Claude Code could discover and connect to the server.</p><p>Once connected, I verified the integration through the MCP interface and tested both tools.</p><p>One practical lesson was that server changes were not always visible immediately.</p><p>After editing server.py, I sometimes needed to reconnect the server or restart the Claude session before the updated behavior appeared.</p><p>That is now part of my normal MCP workflow:</p><ol><li>edit the server</li><li>run the tests</li><li>reconnect the MCP server</li><li>test the tool again from Claude</li></ol><p>This prevented confusion between old server state and current code.</p><h3>Packaging the project for Claude Desktop</h3><p>The next step was connecting the same MCP server to Claude Desktop.</p><p>This required packaging the project as a Desktop extension and creating the required manifest.</p><p>The initial version did not work correctly because it referenced the project’s external virtual environment.</p><p>That approach was not portable.</p><p>Once the extension was installed into Claude Desktop’s extension area, it could not safely rely on dependencies living elsewhere in the project directory.</p><p>To solve that, the dependencies were packaged locally for the extension.</p><p>A build script was created to regenerate the extension dependencies rather than committing hundreds of generated files to Git.</p><p>The lib/ directory contained roughly 900 files, including compiled and platform-specific files, so it was added to .gitignore.</p><p>The build process now recreates those files when needed.</p><p>That kept the public repository smaller and cleaner.</p><h3>The Linux executable-permission problem</h3><p>The Claude Desktop extension introduced one more Linux-specific issue.</p><p>The Hayabusa binary worked in the project directory, but the installed extension copy failed with a permission error.</p><p>The cause was the file mode.</p><p>When the unpacked extension was copied into Claude Desktop’s extension directory, the Hayabusa binary was installed with permissions equivalent to 0600.</p><p>That meant the file was readable and writable, but not executable.</p><p>The installed copy needed:</p><pre>chmod 755</pre><p>After correcting the permissions on the Hayabusa binary inside the installed extension, the scan tool worked successfully in Claude Desktop.</p><p>This became one of the most practical lessons from the project:</p><blockquote><em>A file can be present, correctly configured, and still fail because the installed copy does not preserve executable permissions.</em></blockquote><p>That detail is now documented for future Linux users of the project.</p><h3>Using the MCP tool in Claude Desktop</h3><p>Once both MCP tools worked in Claude Desktop, I used the integration for a productivity-focused proof of concept.</p><p>Claude retrieved Hayabusa rule details through the MCP server and used that information to create a short PowerPoint presentation.</p><p>The presentation showed several Hayabusa rules in a concise, professional format.</p><p>This demonstrated that the project was not limited to technical command execution.</p><p>The same structured security data could also support:</p><ul><li>reports</li><li>presentations</li><li>training materials</li><li>analyst summaries</li><li>stakeholder communication</li></ul><p>That cross-over between technical analysis and communication was one of my favorite parts of the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_X5Ne9bO_fKyNgtDU_tARA.png" /><figcaption><em>Claude Desktop used the Hayabusa MCP tool to retrieve rule details and create a short PowerPoint proof of concept.</em></figcaption></figure><p>The presentation output provided a clear visual example of the MCP workflow in action.</p><p>Claude was not manually given the rule details.</p><p>It retrieved them through the connected tool and then transformed the structured results into a presentation format.</p><p>That is exactly the kind of reusable workflow MCP is designed to support.</p><h3>Preparing the repository for publication</h3><p>Before publishing the project, I completed a full repository audit.</p><p>The review identified several items that needed attention:</p><ul><li>machine-specific absolute paths</li><li>a local username in configuration and handoff files</li><li>hundreds of tracked generated dependency files</li><li>platform-specific compiled files</li><li>a sample EVTX file with unclear redistribution considerations</li><li>a missing project license</li><li>internal project notes that needed review</li></ul><p>The cleanup included:</p><ul><li>replacing machine-specific configuration with a portable example</li><li>removing local usernames and absolute paths</li><li>adding lib/ to .gitignore</li><li>generating dependencies through a build script</li><li>removing the sample EVTX file from the public repository</li><li>adding a project license</li><li>reviewing CLAUDE.md</li><li>improving the README</li><li>documenting the Linux permission workaround</li></ul><p>The project history also required attention.</p><p>Because personal and machine-specific information had appeared in earlier commits, removing those details from the latest files was not enough.</p><p>The repository history was replaced with one clean, sanitized initial commit before publication.</p><p>That ensured the public branch did not retain the earlier sensitive values.</p><h3>Publishing to GitHub</h3><p>The repository was renamed using a descriptive convention consistent with my previous project:</p><pre>hayabusa-mcp-security-scanner</pre><p>The branch was also renamed to:</p><pre>main</pre><p>Before pushing, I verified:</p><ul><li>the working tree was clean</li><li>the current branch was main</li><li>only one sanitized commit remained</li><li>the sensitive strings were absent from reachable history</li><li>generated files were not tracked</li><li>the required project files were present</li><li>the tests passed</li><li>the final privacy audit was clean</li></ul><p>For authentication, I used a fine-grained GitHub personal access token limited to the repository.</p><p>The push was completed from the regular terminal rather than inside Claude Code so the interactive username and token prompts could be handled safely.</p><p>The token was entered only at the password prompt and was never placed in a command, URL, project file, chat, or Claude prompt.</p><h3>GitHub repository</h3><p>The finished project is available here:</p><blockquote><strong>GitHub:</strong> <strong>[</strong><a href="http://hayabusa-mcp-security-scanner/">hayabusa-mcp-security-scanner</a><strong>]</strong></blockquote><h3>What I learned</h3><p>This project taught me much more than how to connect one command-line tool to Claude.</p><p>It taught me a repeatable pattern for building AI-assisted security tools.</p><p>That pattern is:</p><ol><li>identify a useful command-line tool</li><li>verify the dependency before using it</li><li>wrap it with clear MCP tools</li><li>define structured parameters and output</li><li>test the wrapper independently</li><li>compare the wrapper output to the underlying tool</li><li>connect it to multiple Claude interfaces</li><li>document platform-specific behavior</li><li>audit the repository before publication</li><li>preserve a clean, reproducible project history</li></ol><p>It also reinforced several workflow habits I plan to continue using:</p><ul><li>create the virtual environment early</li><li>record dependencies before installing them</li><li>keep generated files out of Git</li><li>verify raw tool output instead of trusting wrapper success</li><li>reconnect MCP servers after code changes</li><li>maintain a durable HANDOFF.md</li><li>audit for personal information before publication</li><li>use main as the branch name</li><li>authenticate outside Claude Code when interactive prompts are required</li></ul><h3>Final thoughts</h3><p>The most important shift in this project was moving from:</p><blockquote><em>Claude helps me write a security script</em></blockquote><p>to:</p><blockquote><em>Claude can use a defined security tool</em></blockquote><p>That is a much more powerful model.</p><p>The MCP server gives Claude a reusable interface for Hayabusa instead of requiring the workflow to be explained from the beginning each time.</p><p>It can scan EVTX files, filter findings, retrieve detection rules, and return structured results.</p><p>It can also use those results in other contexts, such as creating a presentation.</p><p>That combination of analysis, automation, and communication is what made this project feel like a meaningful step forward in my AI cyber defense work.</p><blockquote>I hope that you enjoyed checking out this article! Please stay tuned for more to come as I break into the next modules of this training activity!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a53624c20bc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>