$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
This section presents representative outcomes produced by the IOC-to-regex protocol and summarizes the reference evaluation used to assess its operational applicability. The reference evaluation processed 3,156 CTI reports associated with MITRE ATT&CK techniques, analyzed more than 230,000 sentences, extracted more than 63,000 IOC candidates, and evaluated generated regexes against more than 2,400 independently collected ground-truth strings from ten MITRE ATT&CK Evaluation scenarios. These ground-truth strings are expert-curated attack artifacts reported independently by cybersecurity vendors during the MITRE ATT&CK Evaluation exercises and therefore reflect the structural patterns that human analysts and vendors document in practice. The results below focus on workflow behavior, structural correctness, and evaluation outcomes relevant to operational log analysis and detection workflows.
An overview of the end-to-end pipeline is provided in Figure 1, which summarizes the capture-group finding and regex generation stages that frame the remainder of the representative results.
Stage 1: Document Parsing Output
Figure 2 shows the output of Stage 1, where an input CTI report is parsed into a unified Markdown representation. Upon successful execution, the interface displays a structured preview of the document, including section boundaries and relevance indicators.
Correct execution is indicated by coherent paragraph segmentation and preservation of technical artifacts such as file paths, registry keys, and command-line fragments. Excessive truncation or loss of formatting at this stage may affect downstream analysis and should be addressed before proceeding.
Stage 2: Consensus-Based IOC Extraction
Figure 3 illustrates the output of Stage 2, where candidate IOCs are extracted using multi-LLM ensemble voting. The resulting interface presents a JSON-formatted IOC collection annotated with vote counts and contributing models.
Only IOCs that meet the configured minimum consensus threshold are retained. IOCs excluded at this stage typically reflect model-specific hallucinations or ambiguous text fragments. Their exclusion is an expected and desirable outcome, indicating that ensemble voting is functioning correctly.
Stage 3: IOC Analysis and Classification
Table 2 summarizes the expected output, automated validation steps, and analyst-facing quality-control checks for each protocol stage.
Figure 4 displays the IOC candidates that did not meet the consensus threshold during ensemble voting at Stage 2 and that the interface surfaces for analyst inspection. Such candidates typically reflect model-specific hallucinations or ambiguous text fragments. Figure 4 and Figure 5 therefore correspond to distinct stage outputs — the discarded set from Stage 2 and the retained set from Stage 3 — rather than to alternative views of the same Stage 3 process.
Figure 5 presents the retained IOC table produced by Stage 3 after JSON parsing, rule-based categorization, and IOC deduplication. For each retained IOC, the stage records a standardized category, source tag, and the original extraction key when available, before passing the IOC to downstream normalization.
Stage 4: Graph-Assisted IOC Normalization Across IOC Types
Figures 6, Figure 7 and Figure 8 illustrate representative normalization results for three IOC categories addressed in the current study: file paths, registry keys, and command-line indicators. For each category, the figures compare the original IOC extracted from the CTI report with the normalized representation produced using graph-assisted analysis.
Across all IOC types, the protocol decomposes each IOC into semantic components and resolves hierarchical relationships using structured knowledge encoded in the graph database. In the current implementation, Neo4j stores normalized Path, Registry, and CLI nodes and uses adjacency relationships to test whether components belong to recognized chains. This role is analogous to the use of structured ATT&CK knowledge during detection engineering2.
Importantly, this normalization step records explicit semantic roles for IOC components by labeling them as keep or discard rather than silently removing them from the analysis record. The normalized string is reconstructed primarily from keep components, while discard components remain available as metadata for downstream regex generation and validation.
Correct execution of this stage is indicated by normalized IOCs that retain meaningful structural context and exhibit consistent capture-group labeling across different IOC types. Visual comparison between original and normalized representations provides a practical quality-control mechanism to verify that capture-group resolution has been applied consistently and without unintended information loss.
Stage 5: Regular Expression Generation with Auxiliary Constraint-Based Selection
Figure 9 illustrates the output of Stage 5, where the protocol generates structurally compliant regular expressions from normalized IOCs through an iterative validation workflow. The implementation combines an initial generation prompt, diagnostic re-prompting when a candidate fails to match the IOC, discard-aware validation, and capped retry loops.
Given a normalized IOC and its associated keep/discard component specification, the workflow first generates an initial regex candidate. The candidate is then tested against the IOC, diagnostically re-prompted when matching fails, checked for forbidden discarded tokens, and evaluated for over-generalization using random negative strings.
When multiple candidates satisfy the basic validation checks, the protocol applies an auxiliary constraint-based selection mechanism to retain a representative regex for downstream use. The current implementation scores candidates with `Score = n_cg - n_wc`, where `n_cg` is the number of represented keep components and `n_wc` is the number of discarded or unmapped tokens present in the regex.
The selection function is defined as:
Score = n_cg − n_wc
This is the equal-weight specialization (α = β = 1) of the more general form Score = α·n_cg − β·n_wc. Here, n_cg denotes the number of represented keep components and n_wc denotes the number of discard components or unmapped extra tokens reintroduced by the regex. The implementation also records iteration counts, issue lists, estimated token consumption, cache usage, and latency telemetry for each IOC. The equal-weight setting was used as a simple deterministic default for the reference implementation; because it treats a missing keep component and a reintroduced discard component as equally undesirable, other weightings may be preferred in deployment contexts where false negatives and false positives carry different operational costs.
The final regex is selected as the candidate that best satisfies these constraints. Regexes that place required capture-group components inside optional constructs, for example ( ... )?, are excluded from selection because they weaken semantic consistency. This selection step is auxiliary to the generation process and is not intended to serve as a standalone quality metric.
Analytics Overview of CTI Processing
Figure 10 provides an overview of the CTI analysis outcomes across all processed documents. In the reference evaluation, IOC extraction over 3,156 CTI reports produced more than 63,000 IOC candidates, including 12,195 file paths, 2,302 registry keys, and 10,286 command-line indicators, with the remaining candidates belonging to non-regex-target IOC types.
These counts provide a high-level validation that the extracted indicators are concentrated in the three IOC categories targeted by the current protocol while also showing that many extracted artifacts remain outside the regex-generation scope. When reproducing the workflow, report the exact number of CTI reports processed, total IOC candidates, category-wise counts, and the provider, model, model version, temperature, repeat count, and consensus threshold used during extraction.
In the reference evaluation, generated regexes were assessed against more than 2,400 independently collected ground-truth strings from ten MITRE ATT&CK Evaluation scenarios and achieved an average hit rate of 99.1 % together with an average cross-IOC mismatch rate of 0.8 %. In this manuscript, mismatch rate is used as a semantic-specificity measure: a mismatch occurs when a regex generated for one IOC also matches a ground-truth string associated with a different IOC. This quantity should not be interpreted as an end-to-end operational alert false-positive rate, which also depends on downstream rule logic and deployment context.
The distribution reflects the structural composition of the CTI corpus and allows users to verify that the extracted indicators align with expected IOC types. Large deviations from expected proportions may indicate upstream parsing or extraction issues and should be examined before proceeding to downstream normalization and regex generation.
Analysis of Regex Optimization Actions
Figure 11 summarizes the actions performed during regular expression generation and refinement. The distribution includes three types of actions: initial regex generation, LLM-driven optimization steps, and retry-based regeneration.
LLM-driven optimization accounts for 51.7 % of all actions observed. This prevalence indicates that initial generation alone is frequently insufficient to produce regexes that satisfy capture-group constraints and exclusion requirements. Instead, iterative optimization is actively and repeatedly applied to refine candidate regexes.
Rather than reflecting inefficiency, this distribution demonstrates that the optimization workflow is a necessary and integral component of the protocol when generating structurally compliant regexes from complex IOC inputs.
A separate scalability characterization over a random sample of 6,000 IOCs generated with the scalability-test LLM (see the Materials Table) reported a median latency of 2.95 s per IOC and a mean latency of 23.18 s. In the same characterization, syntax-valid regex compilation reached 99.56 %, overall generation success reached 99.4 %, the mean estimated token usage was approximately 3,986 tokens per IOC, and the workflow required approximately 7.89 LLM calls per IOC on average. First-pass success rates were 56.46 % for the match-debug loop and 72.92 % for the non-capture-group validation loop. These measurements help characterize computational cost and operational throughput for batch use.
No expert review of a sampled output subset was used for model retraining in the current reference characterization; the reported results reflect automated pipeline execution and the downstream evaluation datasets described above.
Operational evidence and failure handling. Figure 12 shows the structure of the exported SIEM regex file produced by the protocol, together with rule-level validation evidence for representative file-path, registry-key, and command-line patterns. Figure 13 shows the corresponding full JSON report, which exposes all stage outputs (extracted, analyzed, and normalized IOCs together with the generated regex patterns and per-IOC validation flags) and is the primary artifact downstream tooling consumes. Figure 14 illustrates the protocol’s handling of a noisy CTI input: a defanged, whitespace-perturbed file path is flagged at the analysis stage, corrected, normalized to the canonical %TEMP% template, and then converted into a compiling, matching regex. This worked example complements the operational evidence in Figure 12 and Figure 13 by documenting how the protocol behaves when the raw IOC text departs from the canonical form.

Figure 1: Overall architecture of the IOC-to-regex protocol. The figure summarizes the end-to-end pipeline. Candidate IOC strings produced by the upstream IOC extractor are decomposed and compared against reference nodes in a Neo4j graph populated from Windows documentation (step 1), which retrieves known path, registry, and command-line components (step 2). Variable or environment-specific fragments are labeled as discard and excluded from the normalized reconstruction while retained in component metadata, yielding a normalized IOC with component-level keep and discard labels (step 3). These normalized IOCs are then passed to an LLM-based regex generation stage (step 4) that produces candidate regular expressions, which are scored and iteratively optimized against capture-group constraints and discarded-token rules (step 5) before a final regex is selected (step 6). Please click here to view a larger version of this figure.

Figure 2: Stage 1 document parsing output. Side-by-side comparison of the original CTI report and the parsed document preview. The left panel shows the original CTI report in PDF format, while the right panel displays the unified Markdown representation generated by the parser. Please click here to view a larger version of this figure.

Figure 3: Consensus-based IOC extraction using multi-LLM ensemble voting. The interface illustrates the ensemble-based IOC extraction process and its intermediate results. The red box highlights the configured LLM instances participating in IOC extraction, including the selected providers and the number of repeated extraction runs performed for each model. The blue box indicates the user-defined consensus threshold, which specifies the minimum number of occurrences required for an IOC to be retained. After aggregating extraction results across all models and repetitions, candidate IOCs that appear fewer times than the threshold are discarded. The orange box shows the final set of retained IOCs that satisfy the consensus criterion and are passed to downstream analysis stages. Please click here to view a larger version of this figure.

Figure 4: IOCs discarded by ensemble voting at Stage 2. Side-by-side view of IOC candidates that did not meet the configured minimum-vote threshold during ensemble voting and are surfaced for analyst inspection. Discarded candidates typically reflect model-specific hallucinations or ambiguous text fragments and are not passed to the Stage 3 categorization step. Please click here to view a larger version of this figure.

Figure 5: Retained IOC set with standardized classification. IOC candidates retained after Stage 3 processing are shown together with their standardized categories, source tags, and original extraction keys when available. This table provides the structured IOC input used by the normalization stage. Please click here to view a larger version of this figure.

Figure 6: File path IOC normalization using graph-assisted analysis. Side-by-side comparison of an original file path IOC and its normalized representation. Graph-based traversal queries known Path components by normalized name and labels each component as keep or discard. Drive identifiers and variable filename fragments can therefore be marked discard in the component record while the normalized form is reconstructed primarily from kept structural segments required for downstream pattern construction. Please click here to view a larger version of this figure.

Figure 7: Registry key IOC normalization using graph-assisted analysis. Normalization of a registry key IOC through graph-assisted resolution of hierarchical registry structures. Abbreviated root keys are expanded to canonical registry hives, and the analyzer extracts the longest contiguous known registry substring while skipping host placeholders, SID-like values, and GUID-like tokens. The output records keep/discard labels for each retained component and produces a canonical registry path for downstream processing. Please click here to view a larger version of this figure.

Figure 8: Command-line IOC normalization using graph-assisted analysis. Comparison of an original command-line IOC and its normalized representation. The protocol tokenizes the command line while preserving quoted strings, normalizes the leading command token through Neo4j lookup when possible, and recursively analyzes embedded path-like or registry-like fragments. Stable command-related components are labeled keep, variable arguments are labeled discard, and the final canonical command structure is reconstructed from the kept elements. Please click here to view a larger version of this figure.

Figure 9: Constraint-based selection of regular expression candidates. Multiple regex candidates are generated for each normalized IOC using an iterative validation workflow. A constraint-driven scoring mechanism is applied to select a final regex that preserves designated capture-group components while limiting undesired variable substrings. Please click here to view a larger version of this figure.

Figure 10: Distribution of extracted IOCs across CTI reports. Summary of IOC extraction results showing the total number of indicators identified from CTI reports and their distribution across file paths, registry keys, and command-line indicators. This view provides a high-level validation of CTI content coverage and extraction behavior. Please click here to view a larger version of this figure.

Figure 11: Distribution of optimization actions during regular expression generation. Breakdown of actions performed during regex generation, including initial generation, LLM-driven optimization, and retry-based regeneration. LLM-driven optimization accounts for 51.7 % of all actions, illustrating that iterative refinement is an essential component of the protocol for producing regexes that satisfy capture-group constraints. Please click here to view a larger version of this figure.

Figure 12: Representative exported regex file. Sample contents of the SIEM regex export (siem_rules.txt) generated by the protocol. Each entry includes the source IOC, the inferred category (file path, registry key, or command line), and the validated regex pattern. The accompanying validation table summarizes the expected behavior and the system evidence used to confirm correctness for each rule type. Please click here to view a larger version of this figure.

Figure 13: Representative full JSON report. End-to-end pipeline output produced after running all five protocol stages on a representative CTI report. The JSON document records the source file, parsed-section count, extracted IOCs grouped by category, stage-3 categorized records with source tags, stage-4 normalization diff, and stage-5 regex patterns with per-IOC validation flags. The report also exposes top-level success and error metadata that allow downstream tooling to detect partial failures. Please click here to view a larger version of this figure.

Figure 14: Failed or noisy input: identification and correction. Worked example of how the protocol identifies and recovers from a noisy IOC. The raw input %T E M P%\malware[.]exe is flagged because its environment-variable token contains inserted spaces and its file extension has been defanged. The correction step removes the inserted whitespace and restores the literal dot; Stage 4 normalization then expands %TEMP% to the canonical Windows Temp directory template; and Stage 5 generates a regex that compiles and matches the corrected normalized IOC. This example illustrates the noisy-input handling discussed in the Discussion. Please click here to view a larger version of this figure.
| Element | Type | Value / Schema | Example | Notes |
| Node label | Label | :Path | Windows, System32, cmd.exe | Stores Windows file-path components |
| Node label | Label | :Registry | SOFTWARE, Microsoft, Windows NT | Stores registry-key components below root hives |
| Node label | Label | :CLI | powershell.exe, -ExecutionPolicy, Bypass | Stores command tokens and parameters |
| Node property | String | name | cmd.exe | Original casing; used for display in normalized output |
| Node property | String | name_lower | cmd.exe | Lowercase form; used as lookup key for all MATCH queries |
| Relationship | Directed edge | (a)-[:NEXT]->(b) | (Windows)-[:NEXT]->(System32) | Both endpoints share the same label; encodes native adjacency on Windows systems |
| Constraint | Uniqueness | n.name_lower UNIQUE per label | - | Applied to :Path, :Registry, :CLI |
| Data source | Coverage | Windows 8, 10, 11 | - | Client OS populated into graph |
| Data source | Coverage | Windows Server 2012, 2016, 2019, 2022 | - | Server OS populated into graph |
Table 1: Neo4j graph schema used for IOC normalization (Stage 4). Lists the three node labels (Path, Registry, CLI), their shared property schema (name, name_lower), the directed adjacency relationship used for native-ordering edges, uniqueness constraints, and the Windows client and server versions that populate the graph.
| Stage | Expected output | Automated validation | Analyst-facing quality control |
| Stage 1: Document parsing | Unified Markdown text, chunked at 4,000 characters before LLM processing. | — | Visual check of Markdown preview to confirm that file paths, registry keys, command-line fragments, and section boundaries survive parsing; switch backend if technical strings are truncated. |
| Stage 2: IOC extraction | JSON with three top-level keys (File Paths, Command Lines, Registry Keys); per-IOC vote counts and contributing-model metadata when ensemble voting is enabled. | Consensus threshold filter (min_votes) excludes IOCs whose vote count is below the configured threshold. | Inspection of excluded candidates to distinguish hallucinations from overly strict voting before adjusting min_votes. |
| Stage 3: IOC analysis and classification | Categorized IOC list: each IOC paired with a standardized category, source tag, and original extraction key when available. | Standardized-category mapping via regex-based rules and IOC-pattern heuristics; (IOC, category) pair deduplication. | Spot-check of categorized output for ambiguous or noisy candidates (Figure 4A). |
| Stage 4: Neo4j-assisted normalization | Per-IOC normalized form with component-level keep / discard labels. | Cypher queries (i)-(iii) over the Windows reference graph; deterministic preprocessing fallback when Neo4j is unavailable. | Inspection of all-discard cases to identify graph-coverage gaps; extension of graph data with vendor- or environment-specific references when needed. |
| Stage 5: Regex generation and scoring | Final regex per IOC with candidate scores, optimization history, iteration counts, and per-IOC telemetry. | Match test, static quality checks, boundary-aware forbidden-token check, over-generalization test against 5 deterministic negative samples; fallback to highest-scoring partial match (used_fallback flag). | Optimization-history review for fallback regexes; per-IOC failure-position diagnostic inspection before regenerating. |
Table 2: Stage-output and validation summary. Maps each protocol stage (1–5) to its expected artifact, the automated validation evidence produced by the pipeline (regex compilation status, hit rate, cross-IOC mismatch rate, optimization iteration counts), and the corresponding analyst-facing quality-control check (visual comparison, inspection of discarded candidates, and category review).
Supplementary File 1: Verbatim LLM prompts. The verbatim system and human prompts used for Stage 2 IOC extraction and Stage 5 regex generation and optimization.Please click here to download this file.
Supplementary File 2: Implementation details for Stages 4 and 5. Algorithmic and implementation details supporting the Stage 4 graph-assisted IOC normalization and the Stage 5 regex validation, scoring, and iteration control. Please click here to download this file.