KGCS Documentation

Log4j RCE Case Study — CVE-2021-44228

Quick Navigation

This case study demonstrates end-to-end KGCS reasoning through the highest-impact CVE of 2021.

Choose Your Section

Section Focus Audience Time
01 Vulnerability Overview What is CVE-2021-44228? Impact metrics, timeline, affected systems Risk/Compliance 5 min
02 Root Cause Analysis Deep dive into CWE-91 and why Log4j is vulnerable Developers/Security Architects 8 min
03 Attack Scenarios How attackers weaponize this (CAPEC patterns → ATT&CK techniques) Security Engineers/Red Teamers 7 min
04 Detection Coverage Detection analytics (CAR), network IOCs, EDR rules SOCs/Blue Teamers 6 min
05 Defense Playbook Patch strategy, hardening, D3FEND+SHIELD techniques DevOps/Security Ops 8 min
06 Reasoning Walkthrough Step-by-step KGCS agent analysis with queries Developers/Researchers 10 min
07 Live Query Examples Real agent request/response payloads + Cypher templates Python/Neo4j developers 8 min
08 vs LLM Comparison (Deferred) How KGCS differs from ChatGPT analysis Everyone TBD

Case Study at a Glance

┌─────────────────────────────────────────────────────────────────┐
│ VULNERABILITY: CVE-2021-44228                                  │
│ Apache Log4j Remote Code Execution                             │
│                                                                 │
│ IMPACT:          CVSS 10.0 (Critical)                          │
│ AFFECTED:        619,861 platform configurations               │
│ DISCOVERED:      December 24, 2021                             │
│ ROOT CAUSE:      CWE-91 (Improper Neutralization)              │
│                                                                 │
│ ATTACK CHAIN:                                                  │
│   Attacker crafts log message                                 │
│   ↓                                                             │
│   JNDI lookup triggered ($ {...})                             │
│   ↓                                                             │
│   Remote class loading (LDAP/RMI)                             │
│   ↓                                                             │
│   Arbitrary code execution in app context                     │
│                                                                 │
│ KGCS REASONING:                                                │
│   CVE-2021-44228                                              │
│   ├─ CAUSED_BY → CWE-91                                        │
│   ├─ AFFECTS → 619,861 platforms                              │
│   └─ HAS_SCORE → CVSS 10.0                                     │
│                                                                 │
│   CWE-91                                                       │
│   ├─ DEMONSTRATED_BY → CAPEC-88 (OS Command Injection)        │
│   └─ DEMONSTRATED_BY → CAPEC-242 (Code Injection)             │
│                                                                 │
│   [CAPEC-88 and CAPEC-242]                                    │
│   └─ IMPLEMENTS → T1059 (Command and Scripting Interpreter)   │
│                                                                 │
│   T1059                                                        │
│   ├─ MITIGATED_BY → D3FEND-PA, D3FEND-RI                      │
│   ├─ DETECTED_BY → CAR-2020-04-001                            │
│   ├─ COUNTERED_BY → SHIELD-D (Decoys)                         │
│   └─ DISRUPTS → Multiple ENGAGE concepts                      │
│                                                                 │
│ CONFIDENCE:      0.95 (all edges verified, 5 hops)            │
│ PROVENANCE:      NVD, MITRE CAPEC, MITRE ATT&CK              │
└─────────────────────────────────────────────────────────────────┘

Key Takeaway

Log4j demonstrates why KGCS matters:


How to Use This Case Study

Option 1: Deep Dive (All Sections)

  1. Read the overview and root cause first (context)
  2. Work through attack scenarios and detection (understanding)
  3. Study the reasoning walkthrough and queries (hands-on)

Option 2: Focused Reading (Role-Based)

Option 3: Query-First (For Hands-On Learning)

  1. Start with 07 Live Query Examples
  2. Run the queries against your Neo4j graph
  3. Read the sections that explain the results

Running KGCS Agents Against This Data

All three agents have test data for Log4j. Try these queries:

Systems Agent:

POST /query
{
  "correlation_id": "case-study-log4j-001",
  "intent": "vuln_lookup",
  "data": {
    "cveId": "CVE-2021-44228"
  }
}

Offensive Agent:

POST /query
{
  "correlation_id": "case-study-log4j-002",
  "intent": "attack_path",
  "data": {
    "cweId": "CWE-91"
  }
}

Defensive Agent:

POST /query
{
  "correlation_id": "case-study-log4j-003",
  "intent": "coverage_map",
  "data": {
    "attackId": "T1059"
  }
}

See: 07 Live Query Examples for complete payloads and responses.


Learning Outcomes

After completing this case study, you'll understand:

✅ How KGCS connects CVE → CWE → CAPEC → ATT&CK → Defenses ✅ How to run KGCS agents against real attack scenarios ✅ How confidence scoring and provenance tracking work ✅ How to query the Neo4j graph directly using Cypher ✅ Why deterministic reasoning beats LLM hallucination for security ✅ How to extend KGCS with your own vulnerabilities


References


Next: Start with Vulnerability Overview →