Introduction

When you enumerate Active Directory, you’re asking the domain controller questions: who are the users, which groups do they belong to, where can they log in. Almost every tool you’ve met asks those questions over LDAP, the Lightweight Directory Access Protocol. BloodHound, PowerView, ldapsearch, they all speak LDAP.

Defenders know this. LDAP enumeration is one of the most watched activities on a mature network, and running the default collectors will get you flagged fast.

But LDAP isn’t the only way in. There’s a second door into the exact same data: Active Directory Web Services, or ADWS. It’s quieter, defenders watch it less, and it’s the whole reason a tool like SOAPHound exists. This post is about what ADWS is, why it matters to both sides, and how you’d see it in your own lab.

Authorized testing only

Everything below is for engagements you’re contracted for or labs you own. Enumerating a domain you don’t have written permission to test is unauthorized access. Practice on your own AD lab or on GOAD.

What ADWS Actually Is

ADWS is a Windows service that has shipped on every domain controller since Server 2008 R2. Its job is to let management tools reach Active Directory over a web-style protocol instead of raw LDAP. When you run the PowerShell ActiveDirectory module (Get-ADUser, Get-ADComputer), you’re using ADWS, not LDAP directly. It’s a normal, built-in, expected part of the environment.

Here’s the key idea. ADWS doesn’t store any data of its own. When a request comes in, the service translates it into an LDAP query and runs that query locally against the directory, then wraps the answer back up and sends it to you. In other words, ADWS is a translator sitting in front of LDAP.

That translation step is the whole story:

  • The protocol on the wire is SOAP (a verbose, XML-based web protocol) carried over a Microsoft framing called NetTCP.
  • It listens on TCP port 9389, not the LDAP ports 389 and 636.
  • Because the service turns your request into an LDAP query on the domain controller itself, the LDAP query looks like it came from the DC, not from your machine.

That last point is the one that matters. Here’s the whole flow side by side:

flowchart TB
    subgraph LDAP["Direct LDAP (the watched door)"]
        A1["Attacker host"] -->|"LDAP query<br/>port 389 / 636"| D1["Domain Controller"]
        D1 -.->|"log shows<br/>client = attacker host"| L1["Defender sees<br/>the real source"]
    end
    subgraph ADWS["ADWS (the quiet door)"]
        A2["Attacker host"] -->|"SOAP request<br/>port 9389"| S2["ADWS service<br/>on the DC"]
        S2 -->|"runs LDAP query<br/>locally on the DC"| D2["Directory"]
        D2 -.->|"log shows<br/>client = ::1 (localhost)"| L2["Defender sees<br/>only the DC"]
    end

The directory data that comes back is identical. What changes is the port on the wire and whose name ends up in the log.

Why Attackers Reach for the Other Door

Put yourself on the defender’s side for a second. You want to catch someone mapping out your domain. The obvious place to look is LDAP: the client-side LDAP ETW provider, server-side query logging, the network traffic of a tool pulling thousands of objects. Years of detection engineering point at LDAP.

Now an attacker comes in over ADWS instead. Three things change:

  1. The port is different. Your network rules are tuned for 389 and 636. Traffic to 9389 is management traffic, and plenty of it is legitimate, so it blends in.
  2. The LDAP query looks local. When the DC logs the underlying LDAP query (Event 1644), the client address shows up as [::1], localhost, because ADWS ran the query on the box itself. You can’t point at the attacker’s workstation, because from the directory’s point of view the query never left the DC.
  3. It’s fewer, bigger requests. A tool like SOAPHound asks for everything at once and builds a cache, instead of the chatty, signatured query patterns the default collectors use.

This is why your CRTP and CRTO notes call SOAPHound the stealthy option: same BloodHound data, collected through a door the defenders historically weren’t watching.

This is not invisible, just quieter

“Stealthier than LDAP” is not “undetectable.” Defenders have caught up, and the detection section below is real. ADWS buys you a quieter collection, not a free pass. Treat the stealth as a head start, not a guarantee.

See It in the Lab

Let’s make this concrete in GOAD. The goal: collect the same AD data two ways and watch the difference. I ran this against GOAD with a standard domain user; nothing here needs admin.

The loud way, for comparison (LDAP). The default SharpHound collection is the baseline every detection is tuned against:

# Standard LDAP-based collection: the noisy baseline
SharpHound.exe -c Group,LocalGroup,Session,ACL

The quiet way (ADWS). SOAPHound is a .NET collector that pulls AD data over ADWS instead of LDAP. It works in two steps: first build a cache of the directory, then dump that cache into BloodHound-compatible JSON.

# Step 1: build a local cache of the directory over ADWS (port 9389)
SOAPHound.exe --buildcache -c C:\temp\cache.txt
 
# Step 2: turn the cache into BloodHound JSON
SOAPHound.exe -c C:\temp\cache.txt --bhdump -o C:\temp\bh

You now have a C:\temp\bh folder of JSON files you can drag straight into the BloodHound UI, the same graph you’d get from SharpHound, collected over the other door.

If you’re operating from Linux rather than a domain-joined Windows box, the equivalent tool is SoaPy, which speaks ADWS from a Unix host. The flags differ from SOAPHound, so check its README and run it in your lab before you rely on it.

What success looks like

After step 1, you should see SOAPHound report the object counts it cached (users, computers, groups). After step 2, C:\temp\bh holds a set of .json files. Load them into BloodHound and you’ll see the full graph with no SharpHound collection having ever run.

Catching It From the Blue Side

The localhost trick makes attribution hard, but ADWS collection is not a dead end for defenders. You catch it by correlating signals instead of looking for one smoking gun:

  • Watch TCP 9389 from the wrong hosts. ADWS traffic is normal from admin workstations and management servers. A connection to 9389 from a random user’s laptop or a host that has no business doing AD management is the anomaly. Build your baseline of who should talk to 9389, then alert on everything else.
  • Turn on Directory Service diagnostic logging for Event 1644. This logs the expensive and inefficient LDAP queries the DC runs, including the ones ADWS runs on an attacker’s behalf. Huntress published a Sigma rule that keys on SOAPHound’s distinctive query shape (the (!(name=FALSE))-style filter paired with attributes like msDS-Behavior-Version, gPCFileSysPath, and gPLink). The client will read as localhost, but the query content still gives the tool away.
  • Audit sensitive objects with SACLs. System Access Control Lists on your crown-jewel objects generate access events regardless of which protocol did the reading, so they catch collection that slips the network and query layers.

The theme across all three: ADWS changed where to look, not whether you can look. Once you know 9389 and Event 1644 exist, the quiet door isn’t so quiet.

Takeaways

  • ADWS is a built-in Windows service on every DC that answers directory requests over SOAP on TCP 9389 by translating them into local LDAP queries.
  • Attackers use it (via SOAPHound on Windows, SoaPy on Linux) because the traffic is on an unwatched port and the underlying LDAP query looks like it came from the DC itself.
  • It’s quieter, not invisible: baseline who should reach 9389, enable Event 1644 logging, and audit sensitive objects with SACLs, and the second door is covered.

If you only ever watch LDAP, you’re guarding one door of two. Now you know the other one.


Lab: GOAD (Game of Active Directory) on Server 2019 DCs, collected with a standard domain user. SOAPHound and SharpHound run from a domain-joined Windows 10 host.