<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
---
name: detecting-dcsync-attacks
description: >-
  Detect DCSync attacks by monitoring Directory Replication Service (DRS) requests from non-DC sources, analyzing Event ID 4662 with replication GUIDs.
domain: cybersecurity
subdomain: active-directory-security
tags:
  - dcsync
  - replication
  - credential-theft
  - detection
version: "1.0"
author: defconxt
license: AGPL-3.0
metadata:
  mitre-attack: ["T1003.006"]
  frameworks: ["MITRE ATT&CK", "NIST 800-53"]
  tools: ["sigma", "splunk", "elastic"]
---

# Detecting Dcsync Attacks

## Overview

Detect DCSync attacks by monitoring Directory Replication Service (DRS) requests from non-DC sources, analyzing Event ID 4662 with replication GUIDs.

## Prerequisites

| Tool / Requirement | Details |
|---|---|
| `sigma` | Security tooling |
| `splunk` | Security tooling |
| `elastic` | Security tooling |
| SIEM with DC event logs, Event ID 4662 collection, baseline of legitimate DCs | Environment requirement |

## Quick Reference

```bash
# Quick start commands
node scripts/agent.js --help
wevtutil qe Security /q:"*[System[EventID=4662]]" /f:text
```

## Workflow

### Step 1: Configure Replication Monitoring

```bash
wevtutil qe Security /q:"*[System[EventID=4662]]" /f:text
```

### Step 2: Deploy DCSync Detection Rules

```bash
sigma convert -t splunk rules/dcsync_detection.yml
```

### Step 3: Analyze Non-DC Replication

```bash
node scripts/agent.js detect --dc-ip 10.0.0.1 --domain corp.local
```

## Detection

```yaml
title: Dcsync Attacks Detection
id: 1354f8e6-3162-4c47-8bde-a9035e3734b1
status: experimental
description: Detects suspicious activity related to detecting dcsync attacks techniques in active directory security context
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    CommandLine: "*detecting*dcsync*"
  condition: selection
level: medium
tags:
  - attack.t1003.006
  - attack.credential_access
falsepositives:
  - Authorized Active Directory administration using approved management tools
```


**Detection Opportunities**

| Indicator | Source | Detection Logic |
|---|---|---|
| Dcsync Attacks Detection | windows/process_creation | Sigma rule (medium) |
| ATT&CK Coverage | MITRE ATT&CK | T1003.006 |

## Verification

- **Verify detection coverage**: `node scripts/agent.js detect --dc-ip 10.0.0.1 --domain corp.local`
- **Test with simulated DCSync**: `node scripts/agent.js simulate --domain corp.local`

## References

- MITRE ATT&CK: T1003.006
- Frameworks: MITRE ATT&CK, NIST 800-53
- Tools: sigma, splunk, elastic
