Example: confidence

Active Directory Security

Active Directory Security :The Good, the Bad, & the UGLYSean Metcalf (@Pyrotek3)s e a n [@] Metcalf [@Pyrotek3 | Founder Trimarc, a Security company. Microsoft Certified Master (MCM) Directory Services Microsoft MVP Speaker: BSides, Shakacon, Black Hat, DEF CON, DerbyCon Security Consultant / Security Researcher Own & Operate (Microsoft platform Security info)Sean Metcalf [@Pyrotek3 | Founder Trimarc, a Security company. Microsoft Certified Master (MCM) Directory Services Microsoft MVP Speaker: BSides, Shakacon, Black Hat, DEF CON, DerbyCon, Sp4rkCon* Security Consultant / Security Researcher Own & Operate (Microsoft platform Security info)Sean Metcalf [@Pyrotek3 | The Good, the Bad, and the UGLY Macros, OLE, and PowerShell Oh My!]]]

Active Directory Security: The Good, the Bad, & the UGLY Sean Metcalf (@Pyrotek3) s e a n [@] TrimarcSecurity.com www.ADSecurity.org TrimarcSecurity.com

Tags:

  Security, Directory, Active, Active directory security

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Active Directory Security

1 Active Directory Security :The Good, the Bad, & the UGLYSean Metcalf (@Pyrotek3)s e a n [@] Metcalf [@Pyrotek3 | Founder Trimarc, a Security company. Microsoft Certified Master (MCM) Directory Services Microsoft MVP Speaker: BSides, Shakacon, Black Hat, DEF CON, DerbyCon Security Consultant / Security Researcher Own & Operate (Microsoft platform Security info)Sean Metcalf [@Pyrotek3 | Founder Trimarc, a Security company. Microsoft Certified Master (MCM) Directory Services Microsoft MVP Speaker: BSides, Shakacon, Black Hat, DEF CON, DerbyCon, Sp4rkCon* Security Consultant / Security Researcher Own & Operate (Microsoft platform Security info)Sean Metcalf [@Pyrotek3 | The Good, the Bad, and the UGLY Macros, OLE, and PowerShell Oh My!]]]

2 PS without & 06fu$c@t10n AD Security Issues & Attack Impact Kerberos Delegation Security SPN Scanning & Kerberoasting Best AD DefensesSean Metcalf [@Pyrotek3 | The Current State of Active DirectorySean Metcalf [@Pyrotek3 | Current State of Active Directory :The Good, the Bad, & the UGLYSean Metcalf [@Pyrotek3 | Good Better awareness of the importance of AD Security . AD Security more thoroughly tested. Less Domain Admins. Less credentials in Group Policy Preferences. More local Admin passwords are automatically rotated (LAPS). PowerShell Security improvements (v5).Sean Metcalf [@Pyrotek3 | BAD Too many Domain Admins still administer AD from their regular workstation.]]]]

3 Privilege escalation from regular user is still too easy. Lots of legacy cruft reduces Security . Not enough (PowerShell) logging deployed. Too many blind spots (poor visibility).Sean Metcalf [@Pyrotek3 | U G L Y Email + Doc with Macro = Breach Email + OLE = Breach Why are macros still enabled? 2016: cybersecurity spending = ~$80B what improved? Attack detection hasn t improved. Less breaches or less breach publicity?Sean Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | PowerWare MS Office Macro -> Metcalf [@Pyrotek3 | Office Macros (VBA) Many organizations are compromised by a single Word/Excel document. Office Macro = Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | OLE OLE Package ( ) Windows to Windows 10.]]]]]]

4 Office 2003 to 2016 support. Disable in Outlook via regkey(ShowOLEP ackageOBJto 0 ).Sean Metcalf [@Pyrotek3 | @networksecurity/oleoutlook-bypass-almos t-every-corporate- Security -control-with- a-point-n-click-gui-37f4cbc107d0 PowerShell Module Logging PowerShell version 3 and up. Enable via Group Policy: Computer Configuration\Policies\Administrative Template\Windows Components\Windows PowerShell. Logging enhanced in PowerShell v4. PowerShell v5 has compelling logging Metcalf [@Pyrotek3 | v5 Security Enhancements Script block logging Enable today System-wide transcripts Test & Configure Constrained PowerShell enforced when application whitelisting enabled (AppLocker/Device Guard) Antimalware Integration (AMSI in Win 10) Management Framework (WMF) version 5 available for download: Metcalf [@Pyrotek3 | Vendors Supporting Win10 Protection Version : ?]]]

5 ? Micro: ?? : ??? : ??? : ?? : ?? : ?? : ?? : ?? : ?? 2017 Trimarc Security , LLC. ( )Last Updated: March 2017 PowerShell without Metcalf [@Pyrotek3 | PowerShell from .Net PowerShell = Applications can run PowerShell code PowerShell ps= () Ben Ten s Not PowerShell Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | Constrained Language Mode? Sean Metcalf [@Pyrotek3 | v5 Security Log Data?Sean Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | PS w/o Discover PowerShell in non-standard processes. Get-Process modules like * * Sean Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | PS w/o Metcalf [@Pyrotek3 | Custom EXEs Hosting PowerShell Send PowerShell & PowerShell Operational logs to SIEM.]]]]]]]]]]]

6 Event 800: HostApplicationnot standard Microsoft tool (PowerShell, PowerShell ISE, etc). Event 800: EngineVersion< PowerShell version. (ni.)dllhosted in non-standard processes. Remember that custom EXEs can natively call .Net& Windows APIs directly without PowerShell. Remove PowerShell engine from Windows 8/2012+ (still requires Microsoft .NET Framework for use).Sean Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | Bypasses AVSean Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | Obfuscated EvilRegularObfuscatede$t{r}a+i o=n[s(l;Sean Metcalf [@Pyrotek3 | Obfuscated Evil Deploy PowerShell v5. Enable PowerShell script block logging.)]]]]]]]]]

7 Look at length of PowerShell command Look for lots of brackets { } Look for lots of quotes (single & double) & Look for random function names & many unusual characters not normally in PowerShell Metcalf [@Pyrotek3 | PowerShell Detection Cheatsheet AdjustTokenPrivileges IMAGE_NT_OPTIONAL_HDR64_MAGIC SE_PRIVILEGE_ENABLED LSA_UNICODE_STRING MiniDumpWriteDump PAGE_EXECUTE_READ SECURITY_DELEGATION CreateDelegate TOKEN_ADJUST_PRIVILEGES TOKEN_ALL_ACCESS TOKEN_ASSIGN_PRIMARY TOKEN_DUPLICATE TOKEN_ELEVATION TOKEN_IMPERSONATE TOKEN_INFORMATION_CLASS TOKEN_PRIVILEGES TOKEN_QUERY Metasploit AmsiUtils KerberosRequestorSecurityToken ScriptBlockLogging LogPipelineExecutionDetails ProtectedEventLoggingSean Metcalf [@Pyrotek3 | Security Issues &]]

8 ExploitationSean Metcalf [@Pyrotek3 | Directory s Security Boundary? Forest, not Domain. Older AD forests have multiple domains for Security . Trusts extend boundary & may introduce exploit paths ( ) Have a trust with a DMZ forest? Attackers can enumerate AD data from a trusted Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | DSRM Password with no Management Directory Services Restore Mode (DSRM) Break glass access to DC (RID 500) Console logon w/ DSRM account (Administrator) DSRM pw set when DC is promoted Rarely changed -Password Change Process? Best to synchronize from AD account (2008R2+).Sean Metcalf [@Pyrotek3 | Data with DSRM Account!Sean Metcalf [@Pyrotek3 | AccountsSean Metcalf [@Pyrotek3 | with AD admin rights Domain Admins Enterprise Admins Domain Administrators Custom Delegation at domain/OU level Groups with DC logon rights (default) Account Operators Backup Operators Print Operators Remote Desktop Users (RDP) Server OperatorsSean Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | AD Admin AccountsDiscover Admin Accounts RODC GroupsSean Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | AD Groups with Local Admin RightsAttack of the Machines.]]]]]]]]]]

9 Computers with Admin RightsSean Metcalf [@Pyrotek3 | Metcalf [@Pyrotek3 | Group Policy DelegationSean Metcalf [@Pyrotek3 | OU DelegationSean Metcalf [@Pyrotek3 | OU DelegationSean Metcalf [@Pyrotek3 | Control Rights on the Accounts OUSean Metcalf [@Pyrotek3 | Account with DCSyncRightsKerberos DelegationSean Metcalf [@Pyrotek3 | DelegationImpersonate AnyoneSean Metcalf [@Pyrotek3 | Double Hop IssueSean Metcalf [@Pyrotek3 | Servers Configured with Unconstrained DelegationSean Metcalf [@Pyrotek3 | Unconstrained DelegationSean Metcalf [@Pyrotek3 | Unconstrained DelegationSean Metcalf [@Pyrotek3 | Unconstrained DelegationSean Metcalf [@Pyrotek3 | Unconstrained DelegationSean Metcalf [@Pyrotek3 | Kerberos DelegationSean Metcalf [@Pyrotek3 | Delegation Impersonate authenticated user to allowed services.]]]]]]]]]]]]]]]

10 If Attacker owns Service Account = impersonate user to specific service on Metcalf [@Pyrotek3 | Protocol Transition Less secure than Use Kerberos only . Enables impersonation without prior AD authentication (NTLM/Kerberos).Sean Metcalf [@Pyrotek3 | Control ADSean Metcalf [@Pyrotek3 | Controllers PolicyFull Control on Servers OUDC Silver Ticket for LDAP Service -> DCSyncSean Metcalf [@Pyrotek3 | Redvs. Blue: Modern Active Directory Attacks & DefenseKCD Protocol Transition To DCSYNCSean Metcalf [@Pyrotek3 | All Kerberos DelegationSean Metcalf [@Pyrotek3 | Protocol TransitionConstrainedUnconstrainedConstr ained Protocol TransitionUserAccountControl0x0080000 = Any Service (Kerberos Only), ELSE Specific ServicesUserAccountControl0x1000000 = Any AuthProtocol (Protocol Transition), ELSE Kerberos Onlymsds-AllowedToDelegateTo= List of SPNs for Constrained DelegationKerberos Delegation MitigationsGOOD: Set all AD Admin accounts to: Account is sensitive and cannot be delegated BEST: Add all AD Admin accounts to the Protected Users group (Windows 2012 R2 DFL).]]]]]]


Related search queries