Blog··7 min read

Building an Expert-System-Inspired Architecture with LLM Agents

Rule engines failed, agents alone are unreliable. DarkMoon kept one auditable rule and 14 abstention reasons. The design and its measured limits.

DarkMoon research series·A. Architecture & attack paths·Article 4 of 23·All 23 articles

Introduction

Expert systems such as MYCIN, in the 1970s and 1980s, encoded specialist knowledge as rules, attached certainty to conclusions and could answer "why?" and "how?". They also taught the field two durable lessons: knowledge is expensive to acquire, and rule bases are brittle outside the cases they were written for.

LLM agents look like the opposite design: no explicit rules, broad competence, fluent explanations. DarkMoon's attack-path work ended up combining the two, and the record shows the classic lessons applying almost word for word. This article describes the resulting architecture as an engineering pattern. Details are in the expert-systems chapter of the research repository.

The problem

DarkMoon needed a component that decides whether a link between two findings is supported. Two pure designs were available.

  • Pure symbolic: write rules that derive links from findings. Auditable, deterministic, but someone must supply the facts and the rules must cover the cases.
  • Pure neural: let the LLM agent say which findings are linked. Broad coverage, almost free, but the claim is an opinion.

Both were tried, and both failed in recognisable ways.

Methodology

The repository groups every rule-based attempt, those still in the product and those rejected, and reads them against the expert-system and neuro-symbolic literature. The current design is then described from the code at the documented commit of the open-source edition.

What the symbolic attempts showed

AttemptWhat it didResultLabel
Structured "chain data" fieldsfour typed pre/post fields the agent fills on each findingfilled 0/340 and 0/51 times; hidden from the schemaVERIFIED
Expert engine (rules arm vs observation-only arm)rule-based linking on a live lab0 verified paths in both arms; contaminated, removed from evidenceSUPERSEDED
"Own command" attributiona finding owns the observed command whose values it reuses5 families of false proven links, then 7 new false linksVERIFIED
MulVAL-like capability graphCWE/CAPEC/ATT&CK pre/post-conditions10/78 edges correct (12.8 %)SIMULATED
Rules on finding textheld-out replay on stored campaigns12 to 15 % held-out precision on the internal lab, 0/10 on Juice ShopSIMULATED
ATT&CK tactic-order filterplausibility of declared pairsaccepted 74 % of pairs and 10/10 false chains; warnings onlyVERIFIED

The repository reads these as the two classic failures (HYPOTHESIS, consistent with the literature): a knowledge-acquisition bottleneck (nobody filled the structured fields; specialists had never been instructed to) and brittleness outside the rule base (a capability graph produces many plausible but wrong edges).

What the neural side showed

Agents asked to declare links in one optional list (enabled_by) did fill it, with 0 invented ids on 50 findings, but strict precision against oracles was 0.6, 0.556 and 0.316 on three single runs. Fluent, cheap, and right roughly one to two times in three.

The resulting split

Architecture D keeps a minimal symbolic core behind the agents:

  1. The LLM proposes. Agents declare enabled_by on the push they already make. The server stores each valid declaration as declared_by_agent and shows it at once as a Possible Attack Path.
  2. One rule disposes. edge_verifier.qualify_edge promotes a link to observed_flow only when a value fingerprint is shared in full by both findings' evidence, was produced by a unique earlier execution, and was consumed by a later successful execution, in order, with no other finding presenting the value afterwards. A recorded refused attempt without the value is additionally needed for causal_necessity_demonstrated.
  3. Refusal is explained. Otherwise the link stays declared, with one of 14 closed abstention reasons (no_shared_value, session_unknown, run_compacted, ambiguous_origin, exogenous_value and others). Each link carries its state, reason and evidence references; references hold execution ids and a 12-character fingerprint prefix, never a value.
  4. Structure stays context. Inferred topology paths and ATT&CK warnings remain visible, always labelled hypotheses, never ranked.

The rule can only promote, never invent an edge. Model output can never promote an edge. That is the symbolic guarantee; everything else is labelled by its source.

Real results

  • On synthetic adversarial scenarios the core behaves as designed: 0 false promotions on 100 scenarios and 117 edges, recall 0.867, mutation score 95.2 % with 0 permissive survivors (EXP-049, SIMULATED). An earlier mutation run had 38 permissive survivors; they were killed before release.
  • On real data the core abstains: 0 of 25 declared links qualified on the c5/c6 replay (15 no_shared_value and 1 session_unknown on c5; 9 no_shared_value on c6), 0 of 19 on c7, 0 of 19 on the final lab run (VERIFIED / SIMULATED as marked in the repository).
  • The reason is structural: agents write *** where a credential was, and the Privacy Gateway tokenises secrets before the model sees them. 0 of 50 real pushes contained a non-host placeholder, so there was nothing exact to attribute.

In expert-system terms, the inference engine is sound on its test set and starved of facts in production.

Limits

  • The "neuro-symbolic" description is a positioning, not a claim of novelty. Stevanovic and Wachter, ChainGraph and Intentest also pair an LLM with an explicit graph; none of these systems, DarkMoon included, has published a controlled measure of edge precision on real executed chains.
  • The harness and its oracle were built by the same team; mutation testing shows the tests constrain the rules, not that the rules fit real data.
  • Pattern rules R1 and R3, which still produce the rare Evidence-Backed paths, read the evidence text the agent wrote, not an independent capture. Two product strings overstate this and are flagged for correction.
  • Whether observed_flow can ever trigger on real data with masked evidence is UNKNOWN.

Figures

Diagram. Figure 1. The minimal neuro-symbolic split of architecture D.
Figure 1. The minimal neuro-symbolic split of architecture D.
DarkMoon Terminal Explorer Prioritized Treatment Plan on synthetic demo data: a list pane of remediation actions and an inspector pane; the plan is ordered by reported severity times proof because no Evidence-Backed Attack Path exists, and the action panel lists related paths.
Figure 2. The consequence of abstention in the product: without an evidence-backed path, prioritisation falls back to severity and proof, and says so. Synthetic demo data.Original capture: ASCIT31/darkmoon-attack-paths-research
DarkMoon Pro Prioritized Treatment Plan on synthetic demo data (DVGA demo lab): one action per weakness class and asset, status counters (proposed, approved, in progress, applied but not verified, not reproduced at retest, reproduced at retest, risk accepted, deferred) and a table with the findings, attack paths and controls each action covers, its priority and its verification status.
Figure 3. The treatment plan in DarkMoon Pro states how it is built and keeps Evidence-Backed and Possible paths apart in its legend, with one action per weakness class and asset. Synthetic demo data (demo.dark-moon.org).Captured 20 November 2026 from demo.dark-moon.org (current interface).
DarkMoon Pro attack-path detail on an anonymised real OWASP Juice Shop campaign: the inferred path 'Admin Role Registration via API Parameter Injection', marked Inferred · not proven, the explanation that it is deduced from topology and confirmed findings, a 'Break this path' card listing the findings to fix with their proof status, CVSS and remediation pull request, and the two steps drawn dashed on the map.
Figure 4. A path detail in DarkMoon Pro: the path carries its state (Inferred · not proven) and the rule it was deduced by, and the 'Break this path' card lists each finding with its own proof status. Anonymised real OWASP Juice Shop campaign of 26 April 2026 (demo.dark-moon.org).Captured 21 November 2026 from demo.dark-moon.org (current interface).

Scientific sources

  • Buchanan, Shortliffe (eds.). Rule-Based Expert Systems: The MYCIN Experiments of the Stanford Heuristic Programming Project. Addison-Wesley, 1984. (No DOI; verified indirectly through reviews indexed in Crossref, as recorded in the repository bibliography.)
  • d'Avila Garcez, Lamb. Neurosymbolic AI: The 3rd Wave. 2020. arXiv:2012.05876
  • Kautz. The Third AI Summer: AAAI Robert S. Engelmore Memorial Lecture. 2022. doi:10.1002/aaai.12036
  • Ou, Govindavajhala, Appel. MulVAL: A Logic-based Network Security Analyzer. USENIX Security 2005. usenix.org
  • Stevanovic, Wachter. Automating Attack Graph Construction for Agentic Pentesting. Towards Neuro-Symbolic Vulnerability Hunting. 2026. arXiv:2609.15523
  • dos Santos Barbosa. Thinking in Graphs: Neo4j-Backed Exploit-Chain Reasoning for LLM Penetration-Testing Agents. 2026. arXiv:2610.20902

Research, source code & reproducibility


The verifier lives in a single file of the open-source repository. Reading it, and trying to make it promote an edge it should not, is the most useful review we can receive.

Next
Run it against your own lab

Darkmoon is open source (AGPL-3.0) and self hosted. Clone it, point it at a target you own, and read every line.