41

AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author
Page 2: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Offline Attackson Active Directory

Michael Grafnetter

Security Researcher and Trainer

Page 3: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Presenter bio

Michael Grafnetter

Security Researcher and Trainer

Michael is an expert in Active Directory security. He is the author of the DSInternalsPowerShell module and Thycotic Weak Password Finder, tools used by securityauditors and penetration testers worldwide. In the role of a security consultant,he has performed multiple security audits at large enterprises, mostly financialinstitutions. Michael is a former PowerShell MVP.

Page 4: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Directory Services Internals

Page 5: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

WARNING

The following presentation features demosperformed by professionals, so for your safetyand the protection of those around you, do notattempt to re-enact any activity you are aboutto see.

Page 6: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Database Mounting Tool

Disadvantages

•Read-only

•Hides secret attributes

Page 7: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Dumping AD Secrets

Page 8: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Export Formats

Page 9: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Auditing AD Passwords

Page 10: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Auditing AD Passwords

Page 11: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

AD Group Membership

primaryGroupId

member

Page 12: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Well-Known Global Group RIDs

Domain Admins 512

Domain Users 513

Domain Guests 514

Domain Computers 515

Domain Controllers 516

Cert Publishers 517

Group Policy Creator Owners 520

Page 13: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Offline Group Membership Modification

Page 14: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Forging SID History

Page 15: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Forging SID History

Page 16: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Forging SID History

Page 17: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

SID Filtering?

Page 18: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Offline Password Reset

Page 19: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Password Hash Cloning

Page 20: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

DEMO

Offline AD Database Modification

Page 21: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Replication Metadata

Page 22: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Replication Metadata

Page 23: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Airbus CyberSecurity BTA

Page 24: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

DPAPI-NG (AKA CNG DPAPI)

• NCryptProtectSecret(Descriptor, Data,…)

• NCryptUnprotectSecret(ProtectedBlob,…)

Page 25: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

PFX/PKCS#12 File Protection

Page 26: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

KDS Root Keys

Page 27: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Extracting KDS Root Keys

Page 28: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Ignite 2016 Talk

Page 29: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Credential Roaming

Page 30: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Credential Roaming - Storage

Page 31: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Credential Encryption using DPAPI

Page 32: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

DPAPI Domain Backup Key

Page 33: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Extracting Roamed Credentials

Page 34: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Decrypting Roamed Private Keys

Page 35: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

DEMO

Exctracting and Decrypting Roamed Credentials

Page 36: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Bonus: Bootable Flash Drive

Page 37: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Restore From Media: Motivation

Page 38: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Install From Media (IFM) Backup

Page 39: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

RFM Script

Page 40: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Conclusions

• Virtualization, SAN and Backup admins are AD admins

• Enable BitLocker on DCs

• Deploy read-only domain controllers (RODCs)

• Perform AD security assessments (including password audits)

• Monitor security-related changes in AD

• Regularly change passwords (users, computers, service accounts, krbtgt)

• Plan for disaster recovery

Page 41: AD Offline Attacks - DSInternals · 2018-11-06 · Presenter bio Michael Grafnetter Security Researcher and Trainer Michael is an expert in Active Directory security. He is the author

Questions

Presenter email: [email protected]

Presenter Twitter:

Presenter blog: www.dsinternals.com