Forging Trusts for Deception in Active Directory
Nikhil Mittal (Pentester Academy)
BruCON 0x0A · Day 2
Overview
In "Forging Trusts for Deception in Active Directory," security researcher Nikhil Mittal, a seasoned red teamer from Pentester Academy, presents a paradigm shift for blue teams: leveraging Active Directory’s inherent capabilities to create sophisticated deception mechanisms. This talk, a self-proclaimed "most blue talk ever" from a red teamer, addresses the critical gap in open-source deception solutions for defenders. Mittal highlights how defenders can actively mislead and detect adversaries by planting strategically crafted decoy objects within their Active Directory environments, turning the tables on attackers who traditionally rely on deception.

Key moments
- 0:00 Introduction: Forging Trusts for Deception in Active Directory
- 6:00 Understanding attacker psychology and enumeration targets
- 16:00 Demo: Detecting enumeration of decoy user objects
- 26:00 Lateral movement deception: Restricted logon for decoy DAs
- 37:00 Deceiving with decoy Active Directory forest trusts
- 40:00 How red teamers identify Active Directory deception
- 48:00 Making decoys more believable for blue teams
- 56:00 Q&A: Risks of restricted Domain Admin accounts
Forging Trusts for Deception in Active Directory
Speakers: Nikhil Mittal, Pentester Academy
Conference: BruCON
YouTube: https://www.youtube.com/watch?v=EEceX5x2JY8
Overview
In "Forging Trusts for Deception in Active Directory," security researcher Nikhil Mittal, a seasoned red teamer from Pentester Academy, presents a paradigm shift for blue teams: leveraging Active Directory’s inherent capabilities to create sophisticated deception mechanisms. This talk, a self-proclaimed "most blue talk ever" from a red teamer, addresses the critical gap in open-source deception solutions for defenders. Mittal highlights how defenders can actively mislead and detect adversaries by planting strategically crafted decoy objects within their Active Directory environments, turning the tables on attackers who traditionally rely on deception.
The core premise of the presentation is to exploit common attacker methodologies and psychological biases, such as the "illusory superiority" and the "lowest hanging fruit" mentality, to trip them up during critical phases of an attack, specifically enumeration and lateral movement. By designing decoy users, computers, groups, and even forest trusts that appear highly desirable but are meticulously monitored, organizations can significantly increase the cost for adversaries in terms of time and effort, leading to earlier detection. This approach emphasizes using built-in Microsoft tools and logging mechanisms, demonstrating that advanced deception doesn't necessarily require expensive, proprietary solutions.
Mittal's work culminates in an open-source PowerShell module, Deploy-Deception, which automates the creation and configuration of these decoy objects. The talk provides a detailed technical deep dive into how specific Active Directory attributes and auditing policies can be manipulated to generate high-fidelity alerts with minimal false positives. This makes the session invaluable for defenders seeking practical, actionable strategies to enhance their Active Directory security posture through proactive deception, offering a powerful counter-narrative to traditional attack-focused methodologies.
Background
▶ Watch: Introduction: Forging Trusts for Deception in Active Directory (0:00)
Deception has long been a potent weapon in the arsenal of both military strategists and red teamers. From ancient battles like Hannibal's tactics to modern cyber operations, misleading the adversary is often more effective than direct confrontation. In the realm of cybersecurity, red teamers routinely employ deception, whether through Human Interface Devices (HIDs), malicious attachments, or carefully crafted jump boxes to evade detection and maintain persistence. Their success often stems from exploiting human psychology and the natural tendency to seek the path of least resistance.
However, blue teams have historically lagged in adopting sophisticated deception techniques. The most common open-source defensive deception involves honey credentials or honey tokens – fake credentials left in memory or on systems, designed to trigger an alert if accessed by an attacker. While effective, this approach is limited, primarily targeting the post-exploitation phase. Mittal argues that this is insufficient, especially given the prevalence of Active Directory attacks. Attackers, often fueled by a sense of "illusory superiority" and the allure of quickly achieving Domain Admin (DA) privileges, tend to gravitate towards the "lowest hanging fruit." Tools like Mimikatz have democratized Active Directory exploitation, making DA a coveted prize even when not strictly necessary for an operation.
The talk posits that defenders should aim to catch attackers much earlier in the kill chain, specifically during the enumeration and initial lateral movement phases. To achieve this, a good decoy must possess several key properties:
- Desirability: It must be attractive enough for an attacker to enumerate and interact with.
- Configurability: Easy to set up and manage without complex dependencies.
- Agentless: No endpoint agents required, as agents themselves can introduce new attack surfaces.
- Low False Positives: Crucially, it should not be triggered by normal administrative activity, which is the most challenging aspect, particularly during enumeration.
The central problem Mittal addresses is how to differentiate genuine adversary enumeration from legitimate network traffic or asset management scans. His solution involves targeting specific, often obscure, Active Directory object properties and rights for auditing, ensuring that only unusual, attacker-driven queries generate alerts, thereby making deception a viable and powerful defensive strategy.
Key Findings
▶ Watch: Demo: Detecting enumeration of decoy user objects (16:00)
Nikhil Mittal's presentation unveils several key findings and contributions to the field of Active Directory deception:
- Feasibility of Forging AD Objects for Deception: The primary finding is that it is entirely possible and practical to create highly convincing decoy objects—users, computers, groups, and even forest trusts—within Active Directory environments using only built-in Microsoft tools and capabilities. This negates the need for expensive third-party deception platforms.
- Leveraging Built-in AD Auditing for High-Fidelity Detection: Mittal demonstrates how Advanced Audit Policy Configuration, specifically the DSXS (Directory Service Access) audit policy (Event ID 4662), can be fine-tuned to log interactions with specific attributes of decoy objects. This allows for granular detection of attacker enumeration attempts that target unusual or obscure properties, significantly reducing false positives compared to broad auditing.
- Targeting Attacker Psychology and Tooling: The research identifies common attacker enumeration patterns and preferences (e.g., searching for users with "password never expires," highly privileged groups, interesting SPNs, or delegation settings). Decoys are designed to appear as these "lowest hanging fruit," drawing attackers in. The talk also differentiates between how various enumeration tools (e.g., Net, WMI, PowerView, AD Explorer) interact with AD, allowing defenders to tailor logging for specific tool types.
- Detection Beyond Enumeration: Beyond initial information gathering, the talk illustrates how deception can detect lateral movement attempts. By creating decoy Domain Admin users with restricted logons (e.g., to non-existent workstations or outright denied), any attempt to use their compromised credentials (even via Pass-the-Hash or Pass-the-Ticket) triggers a 4768 audit failure event, providing immediate alerts.
- The
Deploy-DeceptionPowerShell Module: A significant contribution is the open-source PowerShell moduleDeploy-Deception. This module automates the complex process of creating various decoy objects (users, computers, groups) and configuring their auditing settings, making Active Directory deception accessible to a wider audience of defenders. - Red Team Counter-Deception Strategies: Mittal, from his red team perspective, also outlines how attackers can identify decoys. This includes checking object properties like ObjectSID mismatches, zero lastLogon, lastLogonTimestamp, logonCount, or badPwdCount values, or suspiciously complete attribute sets. He advises red teamers to use WMI for enumeration as it often bypasses common deception tool detections. This dual perspective provides invaluable insights for both offensive and defensive teams.
These findings collectively present a robust, cost-effective, and open-source-centric approach to Active Directory deception, shifting the balance of power back towards defenders.
Technical Deep Dive
▶ Watch: Deceiving with decoy Active Directory forest trusts (37:00)
The technical foundation of Active Directory deception, as presented by Nikhil Mittal, revolves around the meticulous configuration of Active Directory objects and their associated auditing policies. The primary mechanism for detection is the Advanced Audit Policy Configuration, specifically the Directory Service Access policy, which generates Event ID 4662 whenever a directory object is accessed.
To implement this, one must enable the DSXS audit policy. Once enabled, individual objects can be configured with specific System Access Control Lists (SACLs) to trigger an alert when particular rights are exercised against them. Key rights for auditing include:
- Generic Read: Triggers when any property of an object is read. While useful, it can be very verbose.
- Read Control (READ_DAC): Triggers when the Discretionary Access Control List (DACL) of an object is read. This is less verbose than Generic Read and often indicates an attacker seeking to understand an object's permissions.
- Obscure Property Reads: Auditing access to rarely used or obscure properties (e.g.,
x500 unique identifier) significantly reduces false positives. Normal administrative tools or asset management systems typically do not query these attributes, making their access a strong indicator of malicious enumeration.
The Deploy-Deception PowerShell module automates the creation and configuration of these decoys.
Decoy User Objects
Attackers often enumerate user objects for specific attributes:
- Password Never Expires: Users with this flag are attractive as their credentials remain valid indefinitely.
- Trusted for Delegation (constrained/unconstrained): Indicates potential for privilege escalation.
- Interesting Service Principal Names (SPNs): Users with SPNs are vulnerable to Kerberoasting.
- Passwords in Description Field: A common, albeit naive, misconfiguration.
- Membership in High-Privileged Groups: Especially
Domain Admins. - Interesting ACLs: Permissions over other objects.
The Deploy-Deception module can create a user, for instance, named "user manager" with the "password never expires" flag. Auditing can then be set up to log 4662 events only when an obscure property like x500 unique identifier is read. This is crucial because standard tools like net user or WMI-based queries might not trigger these logs, whereas LDAP-based tools like PowerView or AD Explorer, which often enumerate all properties, would. This distinction allows defenders to target more aggressive, deep enumeration attempts. Auditing Read DACL for user objects also provides a high-fidelity alert, as DACL reads are not part of routine administrative tasks.
Decoy Computer Objects
Similar to users, computer objects can be decoys. Attackers look for:
- Older Operating Systems: Suggesting unpatched vulnerabilities.
- Interesting SPNs: For Kerberoasting.
- Delegation Settings: Potential for abuse.
- Membership in High-Privileged Groups: E.g., a computer account in
Domain Controllersgroup.
While one could theoretically use Mimikatz's DCShadow to make a computer appear as a Domain Controller, Mittal notes its instability. The recommendation is to use a real, isolated machine as a decoy to enhance believability. Auditing obscure properties on these computer objects works similarly to user objects.
Decoy Group Objects
Decoy groups can be created and made members of high-privileged groups (e.g., a "Forest Admins" group that is a member of DNS Admins). Auditing can be configured to log 4662 events when:
- An obscure property (e.g.,
x500 unique identifier) is read. - The group's membership is read, or its DACL is accessed.
For example, creating a group ForestAdmins with a slaveuser as a member, and then adding ForestAdmins to DNS Admins would make it attractive. Logging Read DACL on this group provides a clear signal of an attacker investigating its permissions.
Detecting Lateral Movement with Restricted Logons
To detect lateral movement, Mittal proposes creating decoy users, particularly those appearing to be Domain Admins, but with highly restricted logon policies. This can be achieved in two ways:
- Deny Logon: Explicitly denying logon for the decoy user.
- Restrict Logon to Non-Existent Workstation: Configuring the user's
LogonWorkstationsattribute to a machine that does not exist in the domain.
When an attacker compromises the credentials (cleartext, NTLM hash via Pass-the-Hash, or Kerberos ticket via Pass-the-Ticket) of such a decoy DA and attempts to authenticate or access resources, the logon will fail. This failure generates an Event ID 4768 (Kerberos Service Ticket Request Failed) with an audit failure status, clearly indicating the IP address of the attacker's machine and the abused user account. This mechanism is incredibly robust as it prevents any authentication attempt, irrespective of the tool or credential type used.
Master/Slave User Relationships
Another sophisticated technique involves creating a master/slave relationship between two decoy users. A "master" user is granted Full Control over a "slave" user. The slave user's SACL is then configured to log 4662 events specifically when its DACL is written to (Write DACL). This detects attempts by an attacker (using the "master" account's privileges) to modify the "slave" user's permissions, which is a common privilege escalation technique.
Decoy Forest Trusts
For more advanced deception, a decoy forest can be established with a bi-directional trust to the primary domain. This forest would contain decoy users and computers. Crucially, selective authentication is enabled, allowing enumeration of objects within the decoy forest but explicitly denying access to any resources. An attacker enumerating the trusted forest would see a wealth of seemingly legitimate targets. However, any attempt to access a resource (e.g., browsing shares) would result in an access denied error and a logged alert, indicating an attempt to pivot into the decoy environment. This manual setup is highly effective for trapping sophisticated adversaries.
By combining these techniques, defenders can construct a multi-layered deception strategy that targets various stages of an Active Directory attack, from initial reconnaissance to privilege escalation and lateral movement.
Demo / Proof of Concept
▶ Watch: How red teamers identify Active Directory deception (40:00)
While the live demonstrations could not be performed due to technical issues, Nikhil Mittal presented several recorded video demonstrations showcasing the Deploy-Deception module and the effectiveness of his techniques. These demonstrations highlighted the practical application of the technical concepts:
- Decoy User with Obscure Property Auditing:
- A decoy user, "user manager," was created with the "password never expires" flag.
- Auditing was configured to trigger an Event ID 4662 only when the
x500 unique identifierproperty of this user was read. - Demonstrated that basic enumeration tools like
net userdid not trigger the log. - However, when an LDAP-based tool like PowerView or the Active Directory module (which reads all properties) was used to enumerate users, a
4662event was successfully generated, proving the selective detection capability.
- Decoy Group with DACL Read Auditing:
- A decoy group, "forest admins," was created.
- Auditing was enabled to log
4662events specifically when the DACL of this group was read. - The video showed that general group enumeration did not trigger alerts.
- Only when a tool explicitly read all properties, including the DACL, was a
4662event logged, demonstrating a high-fidelity alert for permission reconnaissance.
- Decoy Domain Admin with Restricted Logon:
- A decoy user, "DA_Decoy," was created and added to the
Domain Adminsgroup. - Its logon was restricted either by denying logon entirely or by setting
LogonWorkstationsto a non-existent machine. - The demonstration showed an attacker attempting to log in using the compromised credentials of "DA_Decoy" (both cleartext and via Pass-the-Hash with Mimikatz).
- In both scenarios, the logon failed with an "Access Denied" message, and a 4768 audit failure event was recorded on the Domain Controller, containing the attacker's IP address and the abused account. This proved the efficacy of catching lateral movement attempts.
- Master/Slave User with Write DACL Auditing:
- A "master" user was granted full control over a "slave" user.
- Auditing was configured on the "slave" user to log
4662events when its DACL was written to. - The demo showed that enumeration of the "slave" user did not trigger an alert.
- However, when the "master" user (or an attacker abusing its privileges) attempted to modify the ACL of the "slave" user, a
4662event withRight DACLwas logged, successfully detecting a privilege modification attempt.
- Decoy Forest Trust with Selective Authentication:
- A "trusted" decoy forest (
rat.local) was set up with a bi-directional trust and selective authentication enabled. - The demo showed that an attacker could successfully enumerate users and computers within
rat.local. - However, when the attacker attempted to access a resource (e.g., browse a share) on a machine in
rat.local, access was denied. - This resource access attempt generated an audit log, demonstrating how enumeration is permitted, but resource interaction triggers detection, effectively trapping the attacker within the decoy environment.
These demonstrations collectively provided compelling evidence that Active Directory deception, implemented with careful auditing and strategically placed decoys, can be a highly effective defensive measure.
Defensive Implications
▶ Watch: Q&A: Risks of restricted Domain Admin accounts (56:00)
The insights from this talk offer critical implications for both red and blue teams, fundamentally altering how they approach Active Directory environments.
For Red Teamers (How to Avoid Deception)
Nikhil Mittal, speaking from his red team background, provides crucial advice on identifying and avoiding deception:
- Change Approach: Avoid the "Lowest Hanging Fruit": Red teamers must resist the urge to immediately target obvious, highly privileged accounts or misconfigurations. If something "looks too good to be true" (e.g., 50% of users are Domain Admins in initial enumeration), it likely is a decoy.
- Scrutinize Object Properties: Decoys often have anomalous properties. Red teamers should look for:
- ObjectSID Mismatches: Some commercial deception solutions create objects with ObjectSIDs that don't align with the domain's SID, or have internal inconsistencies.
- Last Logon Timestamps / Logon Counts: Decoy users often have
lastLogon,lastLogonTimestamp,logonCount, andbadPwdCountvalues of zero. A user without any logon activity or password failures is highly suspicious. - Overly Populated Attributes: Real Active Directory objects rarely have all their attributes filled. Decoys might have every field populated to appear legitimate, which can ironically be a giveaway.
- Compare with Known Real Objects: To identify decoys, red teamers should establish a baseline by examining properties of known legitimate objects, such as the Domain Controller (available via the
LOGONSERVERenvironment variable) or their own machine's properties. Inconsistencies suggest deception. - Prefer WMI for Enumeration: Mittal specifically highlights that many commercial and open-source deception tools fail to detect enumeration via WMI (Windows Management Instrumentation). By using WMI-based queries instead of LDAP or SAMR, red teamers can potentially bypass detection mechanisms.
- Avoid Automated Tools: Tools like "GoFetch" that promise automated domain takeover often leave a significant footprint and trigger numerous logs, making detection by a capable blue team almost guaranteed. Manual, stealthy operations are always preferred in red team engagements.
- Question the Need for Domain Admin: The speaker advises against the reflexive pursuit of DA privileges. Often, local admin on critical systems or specific service account access is sufficient, reducing the risk of triggering DA-focused decoys.
For Blue Teamers (How to Improve Deception)
For defenders, the talk offers a roadmap for building more effective and believable deception layers:
- Mimic Real Objects Closely: Whenever possible, base decoys on profiles of actual users or systems, or even use real, isolated machines as decoys. The more realistic a decoy is, the harder it is to spot.
- Populate Logon-Related Attributes: To counter red team detection techniques, blue teams should actively populate
lastLogon,logonCount, andbadPwdCountfor decoy users. This can be achieved by having the decoy user log on at least once, even momentarily to a restricted Domain Controller. While this might create a profile on the DC, the added believability is often worth it. - Fine-Tune Logging: The greatest challenge is avoiding false positives from legitimate asset management or inventory tools. Blue teams must continuously fine-tune their auditing SACLs to ensure that only truly anomalous queries trigger alerts. This requires a deep understanding of their environment's baseline activity.
- Automate Deployment (Future Goals): Mittal's
Deploy-Deceptionmodule is a start, but he envisions further automation for deploying decoy domain and forest objects. - Leverage Virtualization/Containers: An ambitious goal is to use virtualization or containers to dynamically deploy actual decoy forests on demand. This would create highly realistic, ephemeral deception environments that are extremely difficult for attackers to differentiate from real infrastructure.
- Prioritize Built-in Tools Over Expensive Appliances: A core message is that existing Active Directory tools, Group Policy, and logging mechanisms can achieve deception capabilities comparable to, or even surpassing, expensive commercial solutions. Organizations should invest their security budget in skilled red teamers and defenders who can leverage these built-in capabilities, rather than purchasing "yet another appliance with a vulnerable web console."
By adopting these strategies, blue teams can proactively shape the attack landscape, making it more challenging and costly for adversaries to achieve their objectives, thereby enhancing the overall security posture of their Active Directory environment.
Key Takeaways
- Active Directory is a Prime Target for Deception: Built-in Active Directory features, Group Policy, and logging mechanisms offer powerful, cost-effective ways to implement sophisticated deception against adversaries.
- Target Specific Attack Phases: Deception can effectively detect both initial enumeration (information gathering) and subsequent lateral movement attempts within an Active Directory environment.
- Granular Auditing is Key to High-Fidelity Alerts: By configuring DSXS (Event ID 4662) to log access to obscure attributes (e.g.,
x500 unique identifier) or specific rights (e.g.,Read DACL,Write DACL), defenders can generate alerts with significantly reduced false positives. - Decoys Can Prevent Privilege Escalation and Lateral Movement: Creating decoy Domain Admin users with restricted logons (to non-existent workstations or denied entirely) effectively prevents their abuse, even with advanced techniques like Pass-the-Hash, triggering Event ID 4768 audit failures.
- Red Teamers Must Adapt to Counter Deception: Attackers need to evolve their reconnaissance methods, scrutinize object properties (e.g.,
lastLogon,logonCount,badPwdCount,ObjectSID), avoid automated tools, and consider using WMI for enumeration to bypass common deception mechanisms. - Open-Source Solutions Rival Commercial Offerings: Tools like the
Deploy-DeceptionPowerShell module demonstrate that robust Active Directory deception can be achieved without expensive commercial products, empowering organizations to invest in skilled personnel rather than costly appliances.
About the Speaker(s)
Nikhil Mittal is a prominent hacker, speaker, and trainer, currently associated with Pentester Academy, known for its platforms AttackDefense.com and PentesterAcademy.com. He regularly speaks at major security conferences worldwide, including DEF CON, Black Hat, and BruCON. Mittal is the author of several open-source toolkits widely used by red teamers. His primary interests lie in breaking into machines and environments (with permission, of course), developing new attack methodologies, and, more recently, focusing on advanced techniques to avoid detection in Active Directory attacks. His previous work includes research on Microsoft's Advanced Threat Analytics (ATA), which eventually led him to explore deception as a proactive defensive strategy, culminating in this talk on "Forging Trusts for Deception in Active Directory."
Reviews
- Dr. Zero (Offensive Security Researcher) — MUST SEE ★★★★★
- Heather Calloway (CISO) — MUST SEE ★★★★★