πŸ›‘οΈSecurity Controls Enumeration

πŸ“‹ Overview

After gaining initial access to an Active Directory environment, understanding the defensive security controls in place is crucial for planning effective enumeration and attack strategies. Security controls can significantly impact tool selection, exploitation techniques, and post-exploitation activities. Organizations implement varying levels of protection, and these controls may not be applied uniformly across all systems.

🎯 Why Enumerate Security Controls?

πŸ” Strategic Planning

  • Tool Selection: Choose appropriate enumeration tools based on security restrictions

  • Attack Path Planning: Identify potential bypasses and alternative techniques

  • Risk Assessment: Understand detection capabilities and defensive posture

  • Stealth Operations: Avoid triggering security controls during enumeration

⚠️ Common Variations

  • Inconsistent Policies: Different protection levels across machine types

  • Legacy Systems: Older systems may have fewer protections

  • Department Differences: Varying security standards between business units

  • Administrative Oversight: Gaps in security policy implementation


πŸ›‘οΈ Windows Defender Enumeration

πŸ“ Overview

Windows Defender (Microsoft Defender) has significantly improved and by default blocks many penetration testing tools like PowerView. Understanding its current status helps inform tool selection and evasion strategies.

πŸ” Checking Defender Status

πŸ“Š Example Output Analysis

🎯 Critical Parameters Interpretation

Parameter

Value

Impact

Evasion Strategy

RealTimeProtectionEnabled

True

High - Active scanning

Use obfuscated scripts, living-off-land techniques

BehaviorMonitorEnabled

False

Medium - Behavioral analysis disabled

Can use more aggressive techniques

OnAccessProtectionEnabled

False

Low - File access not monitored

Direct file manipulation possible

AMServiceEnabled

True

High - Core protection active

Require AV evasion techniques

πŸ”§ Additional Defender Checks


πŸ”’ AppLocker Enumeration

πŸ“ Overview

AppLocker is Microsoft's application whitelisting solution that controls which applications, scripts, and files users can execute. It provides granular control over executables, scripts, Windows Installer files, DLLs, packaged apps, and packed app installers.

πŸ” Enumerating AppLocker Policies

πŸ“Š Example AppLocker Policy Analysis

🎯 AppLocker Bypass Strategies

πŸšͺ Common PowerShell Bypass Locations

πŸ“‚ Writable Directory Identification

πŸ”§ AppLocker Analysis Script


πŸ” PowerShell Constrained Language Mode

πŸ“ Overview

PowerShell Constrained Language Mode restricts many PowerShell features needed for effective post-exploitation, including COM objects, approved .NET types only, XAML-based workflows, PowerShell classes, and advanced scripting capabilities.

πŸ” Checking Language Mode

πŸ“Š Language Mode Impact Analysis

Mode

Capabilities

Restrictions

Bypass Difficulty

FullLanguage

Complete PowerShell functionality

None

N/A

ConstrainedLanguage

Basic cmdlets, limited .NET

No COM, limited types, no Add-Type

Medium

RestrictedLanguage

Very basic functionality

Most features blocked

High

NoLanguage

PowerShell completely disabled

Everything blocked

Very High

🎯 Constrained Language Mode Detection

πŸ”§ Testing Specific Restrictions


πŸ”‘ LAPS (Local Administrator Password Solution)

πŸ“ Overview

Microsoft LAPS randomizes and rotates local administrator passwords on Windows hosts to prevent lateral movement using shared local admin credentials. Understanding LAPS deployment helps identify potential privilege escalation paths and lateral movement opportunities.

πŸ› οΈ LAPS Enumeration Tools

πŸ” Finding LAPS Delegated Groups

🎯 LAPS Extended Rights Enumeration

πŸ’Ž Retrieving LAPS Passwords

πŸ”§ Manual LAPS Enumeration (Without LAPSToolkit)

🎯 LAPS Attack Strategies

πŸ” Targeting LAPS Admins

πŸŽͺ Computer Account Hijacking


πŸ”§ Additional Security Controls

πŸ›‘οΈ Windows Firewall

πŸ•΅οΈ Event Log Monitoring

πŸ”’ BitLocker


πŸ“Š Complete Security Controls Assessment Script

πŸš€ Comprehensive Enumeration Script


🎯 Key Attack Implications

πŸ“‹ Security Control Impact Matrix

Control

High Impact

Medium Impact

Low Impact

Windows Defender

Real-time scanning active

Behavior monitoring enabled

On-access protection disabled

AppLocker

PowerShell/cmd blocked

Script execution restricted

Default rules only

Constrained Language

NoLanguage/Restricted

ConstrainedLanguage

FullLanguage

LAPS

Fully deployed

Partial deployment

Not deployed

πŸš€ Adaptation Strategies

πŸ›‘οΈ High Security Environment

πŸ”§ Medium Security Environment

🎯 Low Security Environment


⚑ Quick Reference Commands

πŸ” Rapid Assessment

πŸ› οΈ Bypass Testing


πŸ”‘ Key Takeaways

βœ… Essential Enumeration Points

  • Always check security controls before deploying tools or techniques

  • Understand the defensive landscape to plan effective attack paths

  • Look for inconsistencies in security policy implementation

  • Test bypass techniques systematically when restrictions are found

⚠️ Critical Considerations

  • Not all systems are equal - security controls may vary by host type

  • Legacy systems often have fewer protections than modern workstations

  • Administrative workstations typically have stronger controls

  • Server systems may have different security postures than endpoints

🎯 Strategic Planning

  1. Enumerate all security controls on initial access

  2. Identify gaps and inconsistencies in defensive coverage

  3. Adapt tool selection based on control presence

  4. Plan alternative techniques for restricted environments

  5. Document findings for reporting and future reference


Understanding security controls is essential for effective Active Directory enumeration - know your restrictions before you engage, and always have a plan B when controls block your primary approach.

Last updated