SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
Cleartext & PtH Still Live…
$ whoami /all
• Will Hunt
• Associate Director @ NotSoSecure
• 9+ years in InfoSec
• Blackhat USA trainer
• Pentester, formerly digital forensics, trainer of both
• @Stealthsploit / stealthsploit.com
Clear Text Creds
• Windows historically stored cleartext creds in RAM
• Win 8.1 / 2012 R2+ disabled lsass.exe clear text storage
by default
• Backported (2871997) to 7/8/2008 R2/2012 as a reg key
• Backported and set to 1 (clear text enabled) by default
• Let’s change that!
• reg add
HKLMSYSTEMCurrentControlSetControlSecurityProviders
WDigest /v UseLogonCredential /t REG_DWORD /d 1
Clear Text Conclusion
• Win 7 / 2008R2 / 8 / 2012 / 8.1 / 2012R2
• Adding requires lock, removing requires signout
• Meterpreter mimikatz and kiwi work
• mimikatz often only detects kerberos, not wdigest
• Win 10 (inc Enterprise without Cred Guard)
• Signout required for add or delete
• Only meterpreter kiwi works – wdigest
• Win 2016 (without Cred Guard)
• Adding requires lock, removing requires reboot
• Only meterpreter kiwi works – wdigest
PtH
Hashes in Memory
• Hashes are stored in RAM
– Registry
– At logon in lsass.exe
– RDP (disconnect instead of log off)
• 8.1 / 2012 R2+ Restricted Admin Mode
– RunAs
– Services running under user accounts
• Not network logons (e.g. file share)
– Challenge / response  hash never gets there
Pass The Hash
• Authenticate via SMB using hash
• 8.1 / 2012 R2+ (2871997)
• Prevents network/remote interactive logons using local
accounts (excluding RID 500)
• Protected Users Group – No hashes left in RAM as users can’t
authenticate with NTLM (AES kerb auth only). Reduced TGT
lifespan
• Restricted Admin Mode – did this help elsewhere? ;-)
• 10 Ent / 2016 implemented Credential Guard
2871997 Counter Attack
• “Prevents network/remote interactive logons using local
accouts (excluding RID 500)”
• Other local admins still may be able to write to registry!
• Thanks MS, I’ll just change that (again)…
• reg add
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows
CurrentVersionPoliciesSystem /v
LocalAccountTokenFilterPolicy /t REG_DWORD /d 1
RID 500 Caveat
• “Admin Approval Mode”
• https://technet.microsoft.com/en-
us/library/dd835564(v=ws.10).aspx#BKMK_BuiltInAdmin
• Sysadmin’s “get out of jail free” for RID 500
• HKLMSOFTWAREMicrosoftWindowsCurrentVersi
onPoliciesSystemFilterAdministratorToken
• Key often set via GPO – domain users can enum
systems that do/don’t have the key set
• RID 500 still often present in enterprises even
though disabled by default!
RID 500 Caveat
• So… can anyone spot a trend emerging?
• reg add
HKLMSOFTWAREMicrosoftWindowsCurrentVersi
onPoliciesSystem /v FilterAdministratorToken /t
REG_DWORD /d 1
• Disabled by default – if enabled (and set to 1) RID
500 gets UAC protection
At least this one’s for the blue team!
Remember Restricted Admin?
• 8.1 / 2012 R2 improvements mitigated some vectors…
• Also introduced new ones!
• “Restricted Admin mode provides a method of
interactively logging on to a remote host server without
transmitting your credentials to the server.”*
• Enabled for admins only (hint is in the name)
• No creds are left on remote box so network auth must be
used (Kerberos / NTLM)
*https://technet.microsoft.com/en-us/library/security/2871997.aspx
Registry or Group Policy
• reg add
HKEY_LOCAL_MACHINESystemCurrentControlSetControl
Lsa /v DisableRestrictedAdmin /t REG_DWORD /d 0
• reg add
HKEY_LOCAL_MACHINESystemCurrentControlSetControl
Lsa /v DisableRestrictedAdminOutboundCreds /t
REG_DWORD /d 0
Registry or Group Policy
• Both not present by default (need to be created)
• DisableRestrictedAdmin
• Simple enables or disables Restricted Admin mode
• 0 = doesn’t exist (default) = enabled
• 1 = disabled
• DisableRestrictedAdminOutboundCreds
• Whether user is able to authenticate to remote resources
(from RDP RA session) using local machine account
• 0 = doesn’t exist (default) = enabled
• 1 = disabled
RDP PtH
• Otherwise…
RDP PtH
• 2871997 was backported  RDP PtH on Win7+ *
• freerdp-x11
• xfreerdp /u:will /d:mydomain /pth:<nthash>
/v:<remoteIP>
• Kali 1.1.0 / freerdp-x11
• freerdp-x11 updated and functionality removed
• Tricky to compile old client on Kali rolling
* https://blogs.technet.microsoft.com/kfalde/2015/01/10/restricted-admin-mode-for-
rdp-in-windows-7-2008-r2/
PtH Conclusion
• Remote UAC Protection now enabled
• 2871997 (Protected Users / Restricted Admin)
• HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurr
entVersionPoliciesSystem /v LocalAccountTokenFilterPolicy
/t REG_DWORD /d 1
• Backported to earlier versions
• Win 8.1 / 2012 R2+
• PtH still works
• mimikatz can also pth
• sekurlsa::pth /user:stealthsploit /domain:mydomain.local
/ntlm:7dfa0531d73101ca080c7379a9bff1c7 /run:cmd.exe
• RDP PtH
• If backported works on Win 7+
Protected Users?
• What about the protected users?
• No hashes left in RAM, AES kerberos auth only, all good?
• Nope!
• Classic ticket steal
• DA is a protected user
• Remotely logs into
compromised server
• Attacker has temporary
access to TGT
• Reduced TGT lifespan
now 4 hours
• Attacker dumps NTDS.dit
with TGT
• Attacker establishes domain
persistence
tl;dr
• #Tryharder Microsoft
• Clear text still accessible (if not already by default)
• PtH still possible (if not already by default)
• RDP PtH is possible
• Typical variables in play
• Admin access
• Write access to registry
Thank you ☺
Questions?

Contenu connexe

Tendances

XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEThe Linux Foundation
 
[若渴計畫] Black Hat 2017之過去閱讀相關整理
[若渴計畫] Black Hat 2017之過去閱讀相關整理[若渴計畫] Black Hat 2017之過去閱讀相關整理
[若渴計畫] Black Hat 2017之過去閱讀相關整理Aj MaChInE
 
XPDS16: XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ct...
XPDS16:  XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ct...XPDS16:  XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ct...
XPDS16: XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ct...The Linux Foundation
 
CSF18 - BitLocker Deep Dive - Sami Laiho
CSF18 - BitLocker Deep Dive - Sami LaihoCSF18 - BitLocker Deep Dive - Sami Laiho
CSF18 - BitLocker Deep Dive - Sami LaihoNCCOMMS
 
Nagios Conference 2011 - Mike Guthrie - Distributed Monitoring With Nagios
Nagios Conference 2011 - Mike Guthrie - Distributed Monitoring With NagiosNagios Conference 2011 - Mike Guthrie - Distributed Monitoring With Nagios
Nagios Conference 2011 - Mike Guthrie - Distributed Monitoring With NagiosNagios
 
OSMC 2012 | Zabbix 2.0: Even Better by Rihards Olups
OSMC 2012 | Zabbix 2.0: Even Better by Rihards OlupsOSMC 2012 | Zabbix 2.0: Even Better by Rihards Olups
OSMC 2012 | Zabbix 2.0: Even Better by Rihards OlupsNETWAYS
 
Up is Down, Black is White: Using SCCM for Wrong and Right
Up is Down, Black is White: Using SCCM for Wrong and RightUp is Down, Black is White: Using SCCM for Wrong and Right
Up is Down, Black is White: Using SCCM for Wrong and Rightenigma0x3
 

Tendances (7)

XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
 
[若渴計畫] Black Hat 2017之過去閱讀相關整理
[若渴計畫] Black Hat 2017之過去閱讀相關整理[若渴計畫] Black Hat 2017之過去閱讀相關整理
[若渴計畫] Black Hat 2017之過去閱讀相關整理
 
XPDS16: XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ct...
XPDS16:  XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ct...XPDS16:  XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ct...
XPDS16: XSM-Flask, current limitations and Ongoing work. - Anshul Makkar, Ct...
 
CSF18 - BitLocker Deep Dive - Sami Laiho
CSF18 - BitLocker Deep Dive - Sami LaihoCSF18 - BitLocker Deep Dive - Sami Laiho
CSF18 - BitLocker Deep Dive - Sami Laiho
 
Nagios Conference 2011 - Mike Guthrie - Distributed Monitoring With Nagios
Nagios Conference 2011 - Mike Guthrie - Distributed Monitoring With NagiosNagios Conference 2011 - Mike Guthrie - Distributed Monitoring With Nagios
Nagios Conference 2011 - Mike Guthrie - Distributed Monitoring With Nagios
 
OSMC 2012 | Zabbix 2.0: Even Better by Rihards Olups
OSMC 2012 | Zabbix 2.0: Even Better by Rihards OlupsOSMC 2012 | Zabbix 2.0: Even Better by Rihards Olups
OSMC 2012 | Zabbix 2.0: Even Better by Rihards Olups
 
Up is Down, Black is White: Using SCCM for Wrong and Right
Up is Down, Black is White: Using SCCM for Wrong and RightUp is Down, Black is White: Using SCCM for Wrong and Right
Up is Down, Black is White: Using SCCM for Wrong and Right
 

Similaire à Cleartext and PtH still alive

10 Tips for AIX Security
10 Tips for AIX Security10 Tips for AIX Security
10 Tips for AIX SecurityHelpSystems
 
Sticky Keys to the Kingdom
Sticky Keys to the KingdomSticky Keys to the Kingdom
Sticky Keys to the KingdomDennis Maldonado
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiYossi Sassi
 
Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI securityDenis Gundarev
 
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....Denis Gundarev
 
CSF18 - The Night is Dark and Full of Hackers - Sami Laiho
CSF18 - The Night is Dark and Full of Hackers - Sami LaihoCSF18 - The Night is Dark and Full of Hackers - Sami Laiho
CSF18 - The Night is Dark and Full of Hackers - Sami LaihoNCCOMMS
 
Pentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionPentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionBeau Bullock
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidMatthew Johnson
 
DFIR Austin Training (Feb 2020): Remote Access & Deploying Agents
DFIR Austin Training (Feb 2020): Remote Access & Deploying AgentsDFIR Austin Training (Feb 2020): Remote Access & Deploying Agents
DFIR Austin Training (Feb 2020): Remote Access & Deploying AgentsChristopher Gerritz
 
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...DataStax
 
Errant GTIDs breaking replication @ Percona Live 2019
Errant GTIDs breaking replication @ Percona Live 2019Errant GTIDs breaking replication @ Percona Live 2019
Errant GTIDs breaking replication @ Percona Live 2019Dieter Adriaenssens
 
Defcon - Veil-Pillage
Defcon - Veil-PillageDefcon - Veil-Pillage
Defcon - Veil-PillageVeilFramework
 
Got Problems? Let's Do a Health Check
Got Problems? Let's Do a Health CheckGot Problems? Let's Do a Health Check
Got Problems? Let's Do a Health CheckLuis Guirigay
 
Issuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vaultIssuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vaultOlinData
 
Derbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active DirectoryDerbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active DirectoryWill Schroeder
 
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 20161049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016panagenda
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsDerek Downey
 
MCSA Installing & Configuring Windows Server 2012 70-410
MCSA Installing & Configuring Windows Server 2012 70-410MCSA Installing & Configuring Windows Server 2012 70-410
MCSA Installing & Configuring Windows Server 2012 70-410omardabbas
 

Similaire à Cleartext and PtH still alive (20)

10 Tips for AIX Security
10 Tips for AIX Security10 Tips for AIX Security
10 Tips for AIX Security
 
Sticky Keys to the Kingdom
Sticky Keys to the KingdomSticky Keys to the Kingdom
Sticky Keys to the Kingdom
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
 
Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI security
 
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....
How to hack Citrix (So, You Just Inherited Someone Else's Citrix Environment....
 
CSF18 - The Night is Dark and Full of Hackers - Sami Laiho
CSF18 - The Night is Dark and Full of Hackers - Sami LaihoCSF18 - The Night is Dark and Full of Hackers - Sami Laiho
CSF18 - The Night is Dark and Full of Hackers - Sami Laiho
 
Pentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionPentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 Edition
 
PowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue KidPowerShell - Be A Cool Blue Kid
PowerShell - Be A Cool Blue Kid
 
Dakotacon 2017
Dakotacon 2017Dakotacon 2017
Dakotacon 2017
 
DFIR Austin Training (Feb 2020): Remote Access & Deploying Agents
DFIR Austin Training (Feb 2020): Remote Access & Deploying AgentsDFIR Austin Training (Feb 2020): Remote Access & Deploying Agents
DFIR Austin Training (Feb 2020): Remote Access & Deploying Agents
 
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
DataStax | Best Practices for Securing DataStax Enterprise (Matt Kennedy) | C...
 
Errant GTIDs breaking replication @ Percona Live 2019
Errant GTIDs breaking replication @ Percona Live 2019Errant GTIDs breaking replication @ Percona Live 2019
Errant GTIDs breaking replication @ Percona Live 2019
 
Defcon - Veil-Pillage
Defcon - Veil-PillageDefcon - Veil-Pillage
Defcon - Veil-Pillage
 
Got Problems? Let's Do a Health Check
Got Problems? Let's Do a Health CheckGot Problems? Let's Do a Health Check
Got Problems? Let's Do a Health Check
 
Issuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vaultIssuing temporary credentials for my sql using hashicorp vault
Issuing temporary credentials for my sql using hashicorp vault
 
Derbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active DirectoryDerbycon - The Unintended Risks of Trusting Active Directory
Derbycon - The Unintended Risks of Trusting Active Directory
 
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 20161049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
1049: Best and Worst Practices for Deploying IBM Connections - IBM Connect 2016
 
Fall of a domain | From local admin to Domain user hashes
Fall of a domain | From local admin to Domain user hashesFall of a domain | From local admin to Domain user hashes
Fall of a domain | From local admin to Domain user hashes
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL Secrets
 
MCSA Installing & Configuring Windows Server 2012 70-410
MCSA Installing & Configuring Windows Server 2012 70-410MCSA Installing & Configuring Windows Server 2012 70-410
MCSA Installing & Configuring Windows Server 2012 70-410
 

Plus de camsec

IPv6 for Pentesters
IPv6 for PentestersIPv6 for Pentesters
IPv6 for Pentesterscamsec
 
Custom Rules & Broken Tools (Password Cracking)
Custom Rules & Broken Tools (Password Cracking)Custom Rules & Broken Tools (Password Cracking)
Custom Rules & Broken Tools (Password Cracking)camsec
 
Reversing for beginners 2
Reversing for beginners 2Reversing for beginners 2
Reversing for beginners 2camsec
 
Active Directory Delegation - By @rebootuser
Active Directory Delegation - By @rebootuserActive Directory Delegation - By @rebootuser
Active Directory Delegation - By @rebootusercamsec
 
Working with NIM - By Jordan Hrycaj
Working with NIM - By Jordan HrycajWorking with NIM - By Jordan Hrycaj
Working with NIM - By Jordan Hrycajcamsec
 
Basic ASM by @binaryheadache
Basic ASM by @binaryheadacheBasic ASM by @binaryheadache
Basic ASM by @binaryheadachecamsec
 

Plus de camsec (6)

IPv6 for Pentesters
IPv6 for PentestersIPv6 for Pentesters
IPv6 for Pentesters
 
Custom Rules & Broken Tools (Password Cracking)
Custom Rules & Broken Tools (Password Cracking)Custom Rules & Broken Tools (Password Cracking)
Custom Rules & Broken Tools (Password Cracking)
 
Reversing for beginners 2
Reversing for beginners 2Reversing for beginners 2
Reversing for beginners 2
 
Active Directory Delegation - By @rebootuser
Active Directory Delegation - By @rebootuserActive Directory Delegation - By @rebootuser
Active Directory Delegation - By @rebootuser
 
Working with NIM - By Jordan Hrycaj
Working with NIM - By Jordan HrycajWorking with NIM - By Jordan Hrycaj
Working with NIM - By Jordan Hrycaj
 
Basic ASM by @binaryheadache
Basic ASM by @binaryheadacheBasic ASM by @binaryheadache
Basic ASM by @binaryheadache
 

Dernier

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 

Dernier (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

Cleartext and PtH still alive

  • 1. Cleartext & PtH Still Live…
  • 2. $ whoami /all • Will Hunt • Associate Director @ NotSoSecure • 9+ years in InfoSec • Blackhat USA trainer • Pentester, formerly digital forensics, trainer of both • @Stealthsploit / stealthsploit.com
  • 3. Clear Text Creds • Windows historically stored cleartext creds in RAM • Win 8.1 / 2012 R2+ disabled lsass.exe clear text storage by default • Backported (2871997) to 7/8/2008 R2/2012 as a reg key • Backported and set to 1 (clear text enabled) by default • Let’s change that! • reg add HKLMSYSTEMCurrentControlSetControlSecurityProviders WDigest /v UseLogonCredential /t REG_DWORD /d 1
  • 4. Clear Text Conclusion • Win 7 / 2008R2 / 8 / 2012 / 8.1 / 2012R2 • Adding requires lock, removing requires signout • Meterpreter mimikatz and kiwi work • mimikatz often only detects kerberos, not wdigest • Win 10 (inc Enterprise without Cred Guard) • Signout required for add or delete • Only meterpreter kiwi works – wdigest • Win 2016 (without Cred Guard) • Adding requires lock, removing requires reboot • Only meterpreter kiwi works – wdigest
  • 5. PtH
  • 6. Hashes in Memory • Hashes are stored in RAM – Registry – At logon in lsass.exe – RDP (disconnect instead of log off) • 8.1 / 2012 R2+ Restricted Admin Mode – RunAs – Services running under user accounts • Not network logons (e.g. file share) – Challenge / response  hash never gets there
  • 7. Pass The Hash • Authenticate via SMB using hash • 8.1 / 2012 R2+ (2871997) • Prevents network/remote interactive logons using local accounts (excluding RID 500) • Protected Users Group – No hashes left in RAM as users can’t authenticate with NTLM (AES kerb auth only). Reduced TGT lifespan • Restricted Admin Mode – did this help elsewhere? ;-) • 10 Ent / 2016 implemented Credential Guard
  • 8. 2871997 Counter Attack • “Prevents network/remote interactive logons using local accouts (excluding RID 500)” • Other local admins still may be able to write to registry! • Thanks MS, I’ll just change that (again)… • reg add HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows CurrentVersionPoliciesSystem /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1
  • 9. RID 500 Caveat • “Admin Approval Mode” • https://technet.microsoft.com/en- us/library/dd835564(v=ws.10).aspx#BKMK_BuiltInAdmin • Sysadmin’s “get out of jail free” for RID 500 • HKLMSOFTWAREMicrosoftWindowsCurrentVersi onPoliciesSystemFilterAdministratorToken • Key often set via GPO – domain users can enum systems that do/don’t have the key set • RID 500 still often present in enterprises even though disabled by default!
  • 10. RID 500 Caveat • So… can anyone spot a trend emerging? • reg add HKLMSOFTWAREMicrosoftWindowsCurrentVersi onPoliciesSystem /v FilterAdministratorToken /t REG_DWORD /d 1 • Disabled by default – if enabled (and set to 1) RID 500 gets UAC protection At least this one’s for the blue team!
  • 11. Remember Restricted Admin? • 8.1 / 2012 R2 improvements mitigated some vectors… • Also introduced new ones! • “Restricted Admin mode provides a method of interactively logging on to a remote host server without transmitting your credentials to the server.”* • Enabled for admins only (hint is in the name) • No creds are left on remote box so network auth must be used (Kerberos / NTLM) *https://technet.microsoft.com/en-us/library/security/2871997.aspx
  • 12. Registry or Group Policy • reg add HKEY_LOCAL_MACHINESystemCurrentControlSetControl Lsa /v DisableRestrictedAdmin /t REG_DWORD /d 0 • reg add HKEY_LOCAL_MACHINESystemCurrentControlSetControl Lsa /v DisableRestrictedAdminOutboundCreds /t REG_DWORD /d 0
  • 13. Registry or Group Policy • Both not present by default (need to be created) • DisableRestrictedAdmin • Simple enables or disables Restricted Admin mode • 0 = doesn’t exist (default) = enabled • 1 = disabled • DisableRestrictedAdminOutboundCreds • Whether user is able to authenticate to remote resources (from RDP RA session) using local machine account • 0 = doesn’t exist (default) = enabled • 1 = disabled
  • 15. RDP PtH • 2871997 was backported  RDP PtH on Win7+ * • freerdp-x11 • xfreerdp /u:will /d:mydomain /pth:<nthash> /v:<remoteIP> • Kali 1.1.0 / freerdp-x11 • freerdp-x11 updated and functionality removed • Tricky to compile old client on Kali rolling * https://blogs.technet.microsoft.com/kfalde/2015/01/10/restricted-admin-mode-for- rdp-in-windows-7-2008-r2/
  • 16. PtH Conclusion • Remote UAC Protection now enabled • 2871997 (Protected Users / Restricted Admin) • HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurr entVersionPoliciesSystem /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 • Backported to earlier versions • Win 8.1 / 2012 R2+ • PtH still works • mimikatz can also pth • sekurlsa::pth /user:stealthsploit /domain:mydomain.local /ntlm:7dfa0531d73101ca080c7379a9bff1c7 /run:cmd.exe • RDP PtH • If backported works on Win 7+
  • 17. Protected Users? • What about the protected users? • No hashes left in RAM, AES kerberos auth only, all good? • Nope! • Classic ticket steal • DA is a protected user • Remotely logs into compromised server • Attacker has temporary access to TGT • Reduced TGT lifespan now 4 hours • Attacker dumps NTDS.dit with TGT • Attacker establishes domain persistence
  • 18. tl;dr • #Tryharder Microsoft • Clear text still accessible (if not already by default) • PtH still possible (if not already by default) • RDP PtH is possible • Typical variables in play • Admin access • Write access to registry