DEV Community

Cover image for Introducing Serket: Local-First Active Directory Attack Path Analysis Without Neo4j or SMB Noise
AraizCorp
AraizCorp

Posted on Edited on

Introducing Serket: Local-First Active Directory Attack Path Analysis Without Neo4j or SMB Noise

Introducing Serket: Local-First Active Directory Attack Path Analysis Without Neo4j or SMB Noise

Active Directory (AD) remains the primary identity and access management backbone for more than 90% of Fortune 500 enterprises. Consequently, it remains the primary battleground for red teams, penetration testers, and enterprise defenders.

For years, graph-based attack path analysis has been synonymous with BloodHound. While BloodHound revolutionized how we visualize Active Directory permissions, modern corporate environments present steep operational friction for traditional tooling:

  1. Massive Telemetry Footprint (SMB Noise): Traditional collectors often enumerate local sessions by connecting over SMB (ports 445/139) to hundreds or thousands of domain workstations. In a mature environment, this generates immediate volume-based alerts across EDRs, NDRs, and Windows Event Logs (Event IDs 4624, 5140, 5145).
  2. Infrastructure Overhead: Running and maintaining a local Neo4j database graph instance, managing Java runtimes, and dealing with schema migrations often introduces unnecessary friction during time-constrained security assessments.
  3. Black-box Validation: When a collector binary is dropped onto an engagement endpoint, it frequently triggers signature-based detections before a single query can be issued.

To address these operational realities, AraizCorp LLC developed Serket.


🦂 What is Serket?

Serket (named after the ancient Egyptian deity of protection and venom healing) is a local-first, agentless Active Directory relationship intelligence engine and attack-path analysis workbench built entirely in Python.

Serket is engineered around three non-negotiable principles:

  • LDAP-Only Telemetry: Serket collects all authorized Active Directory metadata exclusively over LDAP/LDAPS. It never touches SMB, never queries remote RPC endpoints, and never performs remote session scraping on workstations.
  • Low-Footprint by Design: It connects to the Domain Controller using a single authenticated session, issuing paged queries with configurable rate-limiting and random jitter to reduce anomalous query volume.
  • Zero Database Dependencies (No Neo4j): Serket converts objects and Access Control Lists (ACLs) into an in-memory directed graph powered by Python's networkx. Findings and graphs are saved as standalone, portable JSON bundles that can be inspected offline without ever reconnecting to the target directory.
+--------------------+         Single LDAP Session         +--------------------+
|   Target Domain    | <=================================> |   Serket Engine    |
| Controller (LDAP)  |       (Paged, Jitter-Controlled)    |   (Python / CLI)   |
+--------------------+                                     +--------------------+
                                                                     │
                                                                     ▼
                                                           +--------------------+
                                                           |   Portable JSON    |
                                                           |   Result Bundle    |
                                                           +--------------------+
                                                                     │
                                                                     ▼
                                                           +--------------------+
                                                           | Serket Workbench   |
                                                           | (Local Web UI)     |
                                                           +--------------------+
Enter fullscreen mode Exit fullscreen mode

🔍 Core Capabilities & Detection Primitives

Serket transforms raw directory attributes into actionable security intelligence across several critical surfaces:

1. Identity & Structural Graph Analysis

Maps relationships across Domain Users, Security Groups, Computers, Organizational Units (OUs), Containers, and Cross-Forest Domain Trusts.

2. High-Risk ACL & Object Control Primitives

Discovers privilege escalation vectors stemming from misconfigured Discretionary Access Control Lists (DACLs):

  • GenericAll / FullControl over privileged groups or user accounts.
  • WriteDacl / WriteOwner allowing attackers to grant themselves arbitrary permissions.
  • GenericWrite / WriteProperty targeting attributes like servicePrincipalName or scriptPath.
  • ForceChangePassword on sensitive accounts.
  • Self-Membership / AddMember rights on privileged groups.

3. Active Directory Certificate Services (AD CS) Mapping

Audits public-key infrastructure configurations within the domain, identifying vulnerable certificate templates and enrollment rights corresponding to known attack paths (ESC1 through ESC8).

4. LAPS & gMSA Password Exposure

Maps which security principals possess the access rights required to read cleartext Local Administrator Password Solution (LAPS) attributes (ms-Mcs-AdmPwd, msLAPS-Password) or retrieve Group Managed Service Account (gMSA) secrets.

5. Shortest Attack Paths to Tier 0

Serket's graph engine automatically calculates direct and transitive paths from any low-privileged identity to designated Tier 0 assets (Domain Admins, Enterprise Admins, Domain Controllers, and KRBTGT).


🖥️ The Serket Investigation Workbench

Rather than relying on third-party graph visualizers or external databases, Serket includes its own dedicated investigation workbench served locally via FastAPI and Uvicorn:

Serket Workbench Overview

  • Domain Overview & Priority Reachability: Instant visibility into domain posture, object counts, precomputed attack paths to Tier 0 targets, and password policy indicators.
  • OPSEC-Weighted Attack Paths: Interactive Dijkstra path calculation prioritizing low-noise and stealthy edges, complete with MITRE ATT&CK technique mapping.

Attack Paths

  • Interactive Subgraph Explorer & Node Inspector: Bounded, verifiable graph exploration with a detailed slide-out inspector presenting incoming control rights, outgoing permissions, memberships, and object properties without reloading or resizing the canvas.

Subgraph Explorer

  • Observed Attack Surface Grid: Comprehensive categorization across ACL abuse (WriteDACL, GenericAll), DCSync rights, Kerberoastable SPNs, AS-REP roasting, unconstrained/constrained/RBCD delegations, AD CS ESC1 certificate templates, and LAPS readability.

Observed Attack Surface

  • Telemetry & Coverage Engineering: Direct audit measurement tracking LDAP search operations, paged responses, collection duration, entries per second, and documented relationship coverage.

Telemetry & Coverage

  • In-Browser SKQL Query Console: Real-time graph query execution drawer directly over the loaded domain model with zero Active Directory traffic.

SKQL Query Console

  • Universal Fuzzy Search & Dual-Language: Instant lookup across SIDs, sAMAccountNames, Common Names, and SPNs, with seamless English and Spanish localization.

🚀 Quickstart & Operator Workflow

Installation

Serket can be installed cleanly via pipx, pip, or Docker:

# Recommended installation via pipx
pipx install git+https://github.com/araizcorp/Serket.git
serket --help
Enter fullscreen mode Exit fullscreen mode

1. Collect Active Directory Metadata

Connect to the domain controller using valid domain credentials over LDAP:

serket collect \
  -d corp.internal \
  -u "svc_scanner" \
  -p "AuditorSecret2026!" \
  -dc "dc01.corp.internal" \
  --output "audit_corp_2026.json"
Enter fullscreen mode Exit fullscreen mode

2. Fast CLI Pathfinding

Discover shortest attack paths from an unprivileged compromised account to Tier 0 directly in the terminal:

serket find \
  --bundle "audit_corp_2026.json" \
  --from "CORP\jdoe" \
  --to "TIER-0"
Enter fullscreen mode Exit fullscreen mode

3. Launch the Local Investigation Workbench

Spawn the local web interface to interactively explore attack chains:

serket view --bundle "audit_corp_2026.json" --port 8771
Enter fullscreen mode Exit fullscreen mode

Open http://127.0.0.1:8771 in your browser to begin the investigation.


🌐 The AraizCorp Security Engineering Ecosystem

Serket serves as the foundational graph engine for AraizCorp's broader security assessment suite:

  • Keyring: Offline credential correlation engine that maps harvested password hashes and credential reuse directly onto Serket's attack graphs.
  • Ledger: Temporal differential auditor that compares two Serket snapshots taken before and after remediation, providing mathematical verification that vulnerabilities were resolved.
  • Aegis: Defensive control auditor mapping recommended Sigma, EDR, and SIEM detection rules along discovered attack paths.
  • Portico: External identity exposure mapper analyzing hybrid identity perimeters (Azure AD, ADFS, Okta).

🤝 Open Source & Community Engagement

Serket is maintained by AraizCorp LLC as a dual-use security utility intended exclusively for authorized red teaming, purple teaming, and internal defensive posture auditing.

Give it a star on GitHub, try it on your next Active Directory assessment, and let us know your feedback!

Top comments (0)