# Synacktiv: Simulated AD LDAP/SMB Services Enable GPO Exploitation (GPOddity, OUned, modified scapy)

> Synacktiv describes Python/scapy implementations of authenticated SMB and LDAP servers that let an attacker impersonate legitimate Active Directory services to domain clients. This makes two GPO attack paths practical: GPOddity (rewriting a GPC's gPCFileSysPath so clients fetch poisoned GPT files from an attacker SMB server) and OUned (poisoning gPLink on OUs, Sites or Domains so clients fetch a malicious GPC over LDAP and GPT files over SMB).

- **Author:** Threadlinqs Team
- **Published:** 2026-12-04T10:40:16Z
- **Last updated:** 2026-12-04T10:40:16Z
- **Canonical:** https://intel.threadlinqs.com/threat/TL-2026-7488
- **Card image:** https://intel.threadlinqs.com/og/threat/TL-2026-7488.png
- **ID:** TL-2026-7488
- **Severity:** MEDIUM
- **Category:** THREAT_INTEL
- **Status:** MONITORING
- **Detections:** 9 (1 shown free below) · **IOCs:** 14 (1 shown free below)

## Description

This entry documents an offensive technique and its public tooling, as described in the Synacktiv publication "Simulating legitimate Active Directory services on the network: the case of GPO exploitation" (Quentin Roland, 2026-08-31). No in-the-wild exploitation, threat-actor attribution, CVE for the technique itself, or CVSS score is stated in the sources; severity is an analyst estimate.

Background: a Group Policy Object consists of a Group Policy Container (GPC), an LDAP object holding GPO metadata whose gPCFileSysPath attribute points to an SMB location, and a Group Policy Template (GPT), a share (by default on the DC SYSVOL) holding the configuration files. The gPLink attribute on containers (OUs, Sites, Domains) lists the GPCs applied to objects below them.

Path 1 - GPOddity (released September 2023): an attacker with write access to a GPC changes gPCFileSysPath to point at an attacker-controlled SMB server and serves malicious GPT content such as Scheduled Tasks. The write access can be obtained through NTLM relay to LDAP (for example with ntlmrelayx granting GPO write rights). Path 2 - OUned (released April 2024): a principal with write permission on gPLink (WriteGPLink) adds an entry pointing to a GPC hosted on an attacker-controlled LDAP server, which serves a malicious GPC over LDAP and a malicious GPT over SMB.

The new contribution is the simulation of authenticated services. Earlier approaches used a modified impacket SMB server or forwarding to a dummy domain controller and had limitations (including AES salt mismatches). The modified scapy fork multiplexes an authenticated SMB server and an LDAP server. SMB multiplexing is required because user GPO retrieval uses two sessions over one TCP connection: the user session fetches GPT.INI and the machine-account session fetches the configuration files. The SMB server validates domain identity via Kerberos or Netlogon, and Secure Negotiate requires a signed packet exchange, so anonymous servers are refused. The LDAP server is driven by a JSON data file, supports add/delete/modify/search, uses SPNEGO, requires a Kerberos service account key (AES256 in the example) and can require integrity or confidentiality, adapting to the client's choice by default. Substring and extensible filters are not implemented. The scapy changes are not merged upstream.

Context: after MS16-072 (CVE-2016-3223), user GPOs are retrieved in the computer's security context, although the user still authenticates to fetch GPT.INI. The article cites CVE-2026-54121 (Certighost, ADCS) only as an example needing simulated LDAP/SMB services and does not analyze it, so it is not listed as a CVE of this threat. The article gives no mitigation or detection guidance; the remediation below is derived from the described preconditions and from third-party references (BloodHound WriteGPLink edge, Tenable GPO Execution Sanity indicator).

## MITRE ATT&CK

- T1484.001 Group Policy Modification
- T1484.001 Group Policy Modification
- T1557 Adversary-in-the-Middle
- T1557.001 Name Resolution Poisoning and SMB Relay
- T1053.005 Scheduled Task
- T1053.005 Scheduled Task
- T1222.001 Windows Permissions
- T1078.002 Domain Accounts
- T1136.002 Domain Account
- T1059.003 Windows Command Shell
- T1059.001 PowerShell
- T1069.002 Domain Groups
- T1053.005 Scheduled Task

## Free detection (Splunk SPL, Microsoft KQL, Sigma)

**GPOddity - GPC gPCFileSysPath Repointed Away From Domain SYSVOL (Exploitation)** (`TL-2026-7488-SPL-001`)

Fires when a groupPolicyContainer object has its gPCFileSysPath attribute changed (Directory Service Change, Event ID 5136) to a UNC path whose host differs from the domain DNS name or that is not a SYSVOL Policies path. This is the core GPOddity / TL-2026-7488 behaviour: clients are redirected to fetch GPT content (for example an immediate ScheduledTasks.xml running as SYSTEM) from an attacker-controlled, simulated SMB server. Requires Audit Directory Service Changes and a SACL on GPC objects.

- **Languages:** Splunk SPL, Microsoft KQL, Sigma
- **ATT&CK:** T1484.001, T1222.001
- **Data sources:** XmlWinEventLog:Security (EventCode 5136), SecurityEvent (EventID 5136), Windows Security log - Directory Service Changes
- **Severity:** high
- **Confidence:** high

### Splunk SPL

````spl
index=wineventlog sourcetype="XmlWinEventLog:Security" EventCode=5136 ObjectClass="groupPolicyContainer" AttributeLDAPDisplayName="gPCFileSysPath" OperationType="%%14674"
| eval dn_dc=replace(ObjectDN,"(?i)^.*?,(DC=.+)$","\1")
| eval domain_dns=lower(replace(replace(dn_dc,"(?i)DC=",""),",","."))
| eval unc_host=lower(replace(AttributeValue,"^..([^\\\\]+).*$","\1"))
```Core GPOddity indicator: UNC host differs from the domain DNS name or the path is not a SYSVOL policies path```
| where unc_host!=domain_dns OR NOT match(AttributeValue,"(?i)^..[^\\\\]+.sysvol.[^\\\\]+.policies.")
| stats count min(_time) as first_seen max(_time) as last_seen values(AttributeValue) as new_gpcfilesyspath values(unc_host) as unc_host by SubjectUserName SubjectDomainName ObjectDN Computer
| convert ctime(first_seen) ctime(last_seen)
````

### Microsoft KQL

```kql
SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID == 5136
| extend ObjectClass = extract(@'Name="ObjectClass">([^<]*)<', 1, EventData),
    AttrName = extract(@'Name="AttributeLDAPDisplayName">([^<]*)<', 1, EventData),
    OpType = extract(@'Name="OperationType">([^<]*)<', 1, EventData),
    ObjectDN = extract(@'Name="ObjectDN">([^<]*)<', 1, EventData),
    AttrValue = extract(@'Name="AttributeValue">([^<]*)<', 1, EventData)
| where ObjectClass =~ 'groupPolicyContainer' and AttrName =~ 'gPCFileSysPath' and OpType == '%%14674'
| extend DomainDns = replace_string(replace_string(tolower(replace_regex(ObjectDN, @'(?i)^.*?,(DC=.+)$', @'\1')), 'dc=', ''), ',', '.'),
    UncHost = tolower(extract(@'^..([^\\]+)', 1, AttrValue))
| where UncHost != DomainDns or not(AttrValue matches regex @'(?i)^..[^\\]+.sysvol.[^\\]+.policies.')
| project TimeGenerated, Computer, SubjectUserName, SubjectDomainName, ObjectDN, AttrValue, UncHost, DomainDns
```

### Sigma

```yaml
title: GPOddity - GPC gPCFileSysPath Modified To Non-SYSVOL UNC Path
id: 3f6b1c52-8d7a-4e0b-9a21-5c4d7e8f1a01
status: experimental
description: Detects a Directory Service Change (Event ID 5136) that sets the gPCFileSysPath attribute of a groupPolicyContainer to a UNC path that is not a SYSVOL Policies path. GPOddity rewrites this attribute so domain clients fetch a poisoned Group Policy Template from an attacker-controlled SMB server.
references:
    - https://www.synacktiv.com/en/publications/simulating-legitimate-active-directory-services-on-the-network-the-case-of-gpo.html
    - https://github.com/synacktiv/GPOddity
author: Threadlinqs Team
date: 2026-12-04
tags:
    - attack.defense_evasion
    - attack.privilege_escalation
    - attack.t1484.001
    - attack.t1222.001
    - attack.tool.gpoddity
logsource:
    product: windows
    service: security
detection:
    selection:
        EventID: 5136
        ObjectClass: groupPolicyContainer
        AttributeLDAPDisplayName: gPCFileSysPath
        OperationType: '%%14674'
    filter_sysvol:
        AttributeValue|re: '(?i)^..[^\\]+.sysvol.[^\\]+.policies.'
    condition: selection and not filter_sysvol
falsepositives:
    - Administrators migrating SYSVOL to a DFS namespace or a new domain name
    - GPO backup/restore or migration tooling that rewrites gPCFileSysPath
level: high
```

**Known false positives:**

- SYSVOL/domain migration or DFS namespace changes that legitimately rewrite gPCFileSysPath
- GPO backup/restore or migration tooling run by Group Policy administrators

**Tuning notes:** Enable Audit Directory Service Changes (DS Access) and add a SACL for Write Property on groupPolicyContainer objects, otherwise Event 5136 is not generated. Allowlist change-managed GPO migration accounts via SubjectUserName. The SPL/KQL compare the UNC host with the domain DNS name derived from ObjectDN; in multi-domain forests or DFS-namespace setups add the extra legitimate hostnames. The Sigma rule cannot do that comparison and only checks for a non-SYSVOL path, so a path like \\attacker\sysvol\... is only caught by the SPL/KQL forms. Alert immediately: the attacker normally reverts the value on exit, so a short-lived add followed by a delete of the same attribute is a strong signal.

### 8 more detection rules (Splunk SPL, Microsoft KQL, Sigma), unlock with TL Creds

- GPC Security Descriptor Modified - ntlmrelayx write_gpo_dacl / GPOddity Relay Path (Exploitation) (locked: unlock with TL Creds)
- Task Scheduler SYSTEM Child Shell With Account/Group Manipulation Or Encoded Payload (GPO Immediate Task Execution) (locked: unlock with TL Creds)
- OUned - Machine Account Created With LDAP SPN To Simulate A Directory Service (C2 / Lateral Movement) (locked: unlock with TL Creds)
- Netlogon Secure Channel Rejections Consistent With Rogue SMB Server (GPOddity Session-Key Request) (locked: unlock with TL Creds)
- Group Policy Client Caches [indicator] Preference File (Poisoned GPT Delivery) (locked: unlock with TL Creds)
- Synacktiv GPO Attack Tooling Execution - GPOddity, OUned.py, GroupPolicyBackdoor, ntlmrelayx To LDAP (C2 / Lateral Movement) (locked: unlock with TL Creds)
- GPO-Delivered Immediate Scheduled Task Created As SYSTEM By Machine Account (GPOddity [indicator] Payload) (locked: unlock with TL Creds)
- OUned - gPLink On OU/Site/Domain Linking To A Non-Standard GPC Location (C2 / Lateral Movement) (locked: unlock with TL Creds)

Sign up free to unlock the detection rules: https://threadlinqs.com/?modal=signup

## Sample indicators (1 of 14)

Defanged, TLP:CLEAR.

- URL: `hxxps://github[.]com/synacktiv/OUned`

Full set of 14 indicators unlocks with TL Creds: https://threadlinqs.com/tl-creds

## Sources

- [Simulating legitimate Active Directory services on the network: the case of GPO exploitation](https://www.synacktiv.com/en/publications/simulating-legitimate-active-directory-services-on-the-network-the-case-of-gpo.html)
- [GPOddity: exploiting Active Directory GPOs through NTLM relaying and more](https://synacktiv.com/en/publications/gpoddity-exploiting-active-directory-gpos-through-ntlm-relaying-and-more)
- [GPOddity repository (Synacktiv)](https://github.com/synacktiv/GPOddity)
- [OUned repository (Synacktiv)](https://github.com/synacktiv/OUned)
- [GroupPolicyBackdoor repository (Synacktiv)](https://github.com/synacktiv/GroupPolicyBackdoor)
- [scapy upstream repository](https://github.com/secdev/scapy)
- [Turning your Active Directory into the attacker's C2 (Roland, Becard slides)](https://www.synacktiv.com/sites/default/files/2025-08/roland_becard_turning-your-active-directory-into-the-attackers-c2_slides.pdf)
- [ARP Around and Find Out: Hijacking GPO UNC Paths for Code Execution and NTLM Relay (TrustedSec)](https://trustedsec.com/blog/arp-around-and-find-out-hijacking-gpo-unc-paths-for-code-execution-and-ntlm-relay)
- [BloodHound WriteGPLink edge](https://bloodhound.specterops.io/resources/edges/write-gp-link)
- [Tenable Identity Exposure: GPO Execution Sanity](https://tenable.com/indicators/ioe/ad/C-GPO-EXEC-SANITY)

## Full data

The other 8 detection rules (Splunk SPL / Microsoft KQL / Sigma) unlock with TL Creds; a free account includes daily creds: https://threadlinqs.com/?modal=signup
Indicator values unlock with TL Creds, at a lower price on Red and Purple; AI agents can query rules and IOCs through the Threadlinqs MCP server (Purple and Gold in full, 2 calls a day on a free account): https://intel.threadlinqs.com/mcp

Canonical: https://intel.threadlinqs.com/threat/TL-2026-7488
