Skip to content

Obfuscation

Your Name edited this page Mar 6, 2026 · 2 revisions

LDAP Obfuscation

Overview

PowerView.py can obfuscate LDAP queries and related parameters to vary observable patterns while preserving query intent. This feature transforms LDAP filters, distinguished names, and attribute lists using multiple techniques, making queries less predictable and harder to signature.

Enabling Obfuscation

Via CLI

Pass the --obfuscate flag when launching PowerView:

powerview range.net/lowpriv:Password123@192.168.86.192 --obfuscate

Via Web UI

Toggle the Obfuscate option in the Settings panel.

What Gets Obfuscated

Obfuscation is applied to three components of LDAP queries:

Component Description
Filter Transforms attribute names, operators, and values within LDAP search filters
DN Mutates the search base distinguishedName
Attributes Mutates the requested attribute list

Techniques Used

PowerView.py applies the following obfuscation techniques:

  • OID attribute encoding - Attribute names are replaced with their OID equivalents, with spacing and zero-padding variations
  • Random casing - Attribute names and values are randomly uppercased and lowercased
  • Numeric/SID zero-prepend - Numeric and SID values are prepended with leading zeros
  • Hex-encoding - Eligible values are hex-encoded where supported
  • Context-aware spacing - Whitespace is inserted in valid positions within filters and DNs
  • Equality to approximation operator substitution - The = operator is replaced with ~= (approximate match) where applicable
  • Wildcard expansion - Values are split with wildcard characters (e.g., admin becomes a*dmin)
  • ANR attribute randomization - Ambiguous Name Resolution attributes are randomly selected from the set of valid ANR attributes
  • DN hex escaping - Characters in distinguished names are hex-escaped with random casing
  • Attribute list OID aliasing - Requested attributes are replaced with OID aliases and randomly cased

Important Notes

  • Results returned by obfuscated queries are functionally equivalent to non-obfuscated queries. However, approximation operator substitution and wildcard expansion techniques can broaden the result set, potentially returning additional matches beyond what a standard query would produce.

  • Strict LDAP server configurations may reject heavily obfuscated queries. If you encounter errors or unexpected failures with obfuscation enabled, consider disabling it or testing against the target server incrementally.

Credits

The LDAP obfuscation implementation is inspired by:

  • ldapx - LDAP query obfuscation library
  • MaLDAPtive - DEF CON 32 talk on LDAP filter obfuscation and detection

Getting Started

Use Cases

Available Modules

LDAP Operations
GPO
Computer Enumeration
ADCS
Exchange
Domain Trust
Service Accounts
Shadow Credentials
Misc

Web UI

Usage
API Documentation

Integrations

Sponsor

Clone this wiki locally