SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Finding Your Way to Domain Admin
Access and Even So, the Game Isn't
Over Yet
Keith Lee
#whoami
• Keith Lee
• Singapore
• Senior Consultant at SpiderLabs APAC
• Loves to write tools
• Twitter: @keith55
• Github: https://github.com/milo2012
• Blog: https://milo2012.wordpress.com
Overview
• We do a number of internal network penetration tests as part of our
day to day
• There are a bunch of awesome tools and techniques for capturing
and cracking credentials but we wanted to fill the gap from after
cracking a low privilege password hash from
NetBIOS/LLMNR/WPAD attacks etc. to compromising the entire
Domain as well as help with a few tricky issues that we as
penetration testers face
• Developed a tool, Portia to help with this.
Portia
• Portia aims to automate a number of techniques commonly performed
on internal network penetration tests after a low privileged account has
been compromised
• Functionalities of Portia
• Privilege escalation
• Lateral movement
• Convenience modules
How does the name ‘Portia’ comes about ?
• Portia is a genus of jumping spider that feeds on other spiders -
known for their intelligent hunting behaviour and problem solving
capabilities usually only found in larger animals
Portia
Typical Network Environment
Basic Idea of How Portia Works
• Scans the network for NetBIOS hosts and Domain Controllers
• Checks if the credentials provided is valid or not
• Enumerates users in Domain Admin group
• Checks the SYSVOL/Group Policy Preferences (GPP) items for passwords
• Is the DC vulnerable to MS14-068 ?
• Checks which hosts the account have ‘admin’ access on
• Dumps plaintext credentials, hashes and checks ‘Impersonation’ tokens
• Collects the hashes/credentials and move on to next target in network.
• Auto-elevate the permissions if an ‘Impersonation’ token belong to Domain Admin is found
• Comprising the Domain Controller and run other convenient modules
Portia Basic Workflow
Starts with the “low-hanging
fruit”
Storing passwords in SYSVOL or Group Policy Preference
(GPP)
• Any authenticated domain user account is able to access it
• Passwords are encrypted using known AES 32-byte key.
• Locations in Group Policy Preferences where passwords were saved
• Drive Maps
• Local Users and Groups
• Scheduled Tasks
• Services
• Data Sources
Group Policy Preference Items
Storing passwords in SYSVOL or Group Policy Preference
(GPP)
• MS Patch - MS14-025 (KB2962486)
• Unable to create new GPO preferences that rely on saved
passwords
• Doesn’t remove the old insecure passwords
• Have they disabled or removed the old account that was used in
GPO previously?
Portia - Attacking SYSVOL
MS14-068 (KB3011780) Vulnerability in Microsoft Windows
Kerberos KDC
• An attacker will be able to use an unprivileged domain user account
and elevate the privileges to that of a domain administrator account.
• A Privilege Attribute Certificate (PAC) can be forged that would be
accepted by the KDC as legitimate. Can create a fake PAC claiming
the regular user is a member of the domain administrators group.
• Thus, if a domain controller is vulnerable to MS14-068, an attacker
having normal domain user privileges, he/she would be able to have
domain admin privileges
MS14-068 - Current Tools
• Responder - FindSMB2UPTime.py
• Impacket - goldenPac.py
Portia - Attacking MS14-068
Portia - Attacking MS14-068
Assuming no passwords in SYSVOL and
MS14-068 is not exploitable - what’s
next?
Impersonate Token
• What is Impersonate Token?
• When a user logs into a system a delegation token is created which is converted to
an impersonation token once the user logs out.
• The impersonation token has the same rights and properties as the delegation
token.
• The delegation and impersonation tokens, once created remains on the system until
it is rebooted.
• If a Domain Administrator impersonate token is found can use Mimikatz or add to
the Domain Admin group to dump credentials on DC
Portia - Impersonate Tokens
Token Impersonation
Portia - Impersonate Tokens
Portia - Impersonate Tokens
• If no impersonate token is found, the Portia runs Mimikatz as well as
dumps local password hashes
• If there are any new passwords/hashes they are added to the
database and and the process starts again
• The new passwords will be tested against every host until there are
no new passwords
Shared Local Administrator Passwords
• IT administrators uses a default Operating System (OS) image (with the software
installed) and roll out to new users. The OS is configured with a default password.
• In order for the IT staff to support the workstations/servers, it’s easy to use a single
default local administrator password.
• From an offensive perspective you can exploit this to move from compromising one
host in the network to compromising 100 hosts in the network
• Portia detects if multiple machines are using the same local administrator password
• Does not matter if the machines are connected to the domain
No Admin Access?
• Various local privilege escalation techniques
• Hot Potato
• Windows Update
• Automatic updater of untrusted certificates
• Unquoted Service Paths
• https://gallery.technet.microsoft.com/scriptcenter/Windows-Unquoted-Service-190f0341
• wmic service get name,displayname,pathname,startmode |findstr /i "auto" |findstr /i /v "c:windows" |findstr /i /v
"""'
• Weak file permissions for windows services, unprotected exe / registries
• https://github.com/pentestmonkey/windows-privesc-check
No Admin Access
• If the option ‘Allow users to connect remotely by using Remote
Desktop Services’ is enabled in Group Policy, you will be able to
login remotely into the host
No Admin Access?
• UAC Bypass
• https://github.com/hfiref0x/UACME
• Using Eventvwr.exe and registry Hijacking
• https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/
• Using App Path
• https://enigma0x3.net/2017/03/14/bypassing-uac-using-app-paths/
• Using SDCLT.exe
• https://enigma0x3.net/2017/03/17/fileless-uac-bypass-using-sdclt-exe/
Portia - Hunting for Correct Credentials to access SMB
Shares/Folders
• $ python portia.py -d CORP -u milo -p Password1 -M shares
Portia - Current Modules
• Bitlocker Keys
• KeePass Databases
• KeePass Passwords
• TrueCrypt Master Keys
• Wireless Passwords
• WinvNC, Ultravnc
• Putty
• WinSCP
• Browser Credentials (Firefox/Chrome)
• Filezilla sitemanager.xml
• Apache HTTPd.conf
• Unattend.xml, Sysprep.xml, Sysprep.inf
• Passwords stored in documents labelled
*password*
• IIS Credentials (ApplicationHost.config)
• PAN numbers in files/memory
Portia - Find Interesting Files
Portia - Find Interesting Files
Portia - Dumping Browser Credentials
• Uses various Powershell scripts
• First checks for Firefox or Chrome
• Checks the current logged in user and checks whether we have
the hash or password belonging to the user
• Powershell script that runs in the user session that dumps the
credentials to a file
Portia - Dumping Browser Credentials
Portia - Searching for PAN on Disk and In-Memory
• Useful tools for searching for disks and memory for PAN numbers
• https://github.com/jksdua/credit-card-finder (Disk)
• https://github.com/Shellntel/scripts/blob/master/mem_scraper.ps1 (Memory)
• Portia uses modified versions of these tools
• Portia enumerates the list of installed applications on the hosts where we have admin access on
• Portia enumerates the processes running on the hosts where we have admin access on
• Portia produces a table mapping which processes/programs are running on which hosts and what
processes are common. This will allow an attacker to find interesting ‘processes’ to dump and find
PAN numbers.
Portia - Searching for PAN on Disk and In-Memory
Other Modules - Keepass
Other Modules - Truecrypt
Portia - Analysing Hashes
• Currently has some basic analysis of hashes
• Blank hash
• Accounts using the same hash
• Future improvements
• Checking for password reuse between local admin account and
domain admin
Portia - Analysing Hashes
Future Enhancements
• Microsoft SQL Support
• Finds passwords/hashes that grant access to the database
• Dump a sample of each table (i.e. first five or so records)
• Sensitive info (e.g. PAN)
• Docker Image
• Easy setup
• Add MS08-067 and MS17-010
Demo Time
Remediations
• Shared Local Administrator Account
• Local Administrator Password Solution (LAPS)
• Randomly generate passwords that are automatically changed on managed machines.
• Effectively mitigate PtH attacks that rely on identical local account passwords.
• Enforced password protection during transport via encryption using the Kerberos
version 5 protocol.
• Use access control lists (ACLs) to protect passwords in Active Directory and easily
implement a detailed security model.
Remediations
• Impersonation Token
• For high privilege accounts (accounts in Domain
Admin group), tick the box “Account is sensitive
and cannot be delegated”
Remediations
• Mimikatz
• Install Hotfix KB 2871997
• Disable Windows Digest
• reg add
HKLMSYSTEMCurrentControlSetControlSecurityProvidersW
Digest /v UseLogonCredential /t REG_DWORD /d 0
github.com/milo2012/portia/

Weitere ähnliche Inhalte

Was ist angesagt?

Hunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows EnvironmentHunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows EnvironmentTeymur Kheirkhabarov
 
Sticky Keys to the Kingdom
Sticky Keys to the KingdomSticky Keys to the Kingdom
Sticky Keys to the KingdomDennis Maldonado
 
Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkEC-Council
 
Owning computers without shell access 2
Owning computers without shell access 2Owning computers without shell access 2
Owning computers without shell access 2Royce Davis
 
Owning computers without shell access dark
Owning computers without shell access darkOwning computers without shell access dark
Owning computers without shell access darkRoyce Davis
 
BlueHat v17 || Corrupting Memory in Microsoft Office Protected-View Sandbox
BlueHat v17 || Corrupting Memory in Microsoft Office Protected-View Sandbox BlueHat v17 || Corrupting Memory in Microsoft Office Protected-View Sandbox
BlueHat v17 || Corrupting Memory in Microsoft Office Protected-View Sandbox BlueHat Security Conference
 
Privilege escalation from 1 to 0 Workshop
Privilege escalation from 1 to 0 Workshop Privilege escalation from 1 to 0 Workshop
Privilege escalation from 1 to 0 Workshop Hossam .M Hamed
 
Outlook and Exchange for the bad guys
Outlook and Exchange for the bad guysOutlook and Exchange for the bad guys
Outlook and Exchange for the bad guysNick Landers
 
The Dark Side of PowerShell by George Dobrea
The Dark Side of PowerShell by George DobreaThe Dark Side of PowerShell by George Dobrea
The Dark Side of PowerShell by George DobreaEC-Council
 
PowerShell for Practical Purple Teaming
PowerShell for Practical Purple TeamingPowerShell for Practical Purple Teaming
PowerShell for Practical Purple TeamingNikhil Mittal
 
Evading Microsoft ATA for Active Directory Domination
Evading Microsoft ATA for Active Directory DominationEvading Microsoft ATA for Active Directory Domination
Evading Microsoft ATA for Active Directory DominationNikhil Mittal
 
Zumasys Citrix Top 10 Tips and Tricks
Zumasys Citrix Top 10 Tips and TricksZumasys Citrix Top 10 Tips and Tricks
Zumasys Citrix Top 10 Tips and TricksFrank A. Petillo, Sr.
 
Pwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellPwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellBeau Bullock
 
Breaking Vaults - Stealing Lastpass Protected Secrets by Martin Vigo
Breaking Vaults - Stealing Lastpass Protected Secrets by Martin VigoBreaking Vaults - Stealing Lastpass Protected Secrets by Martin Vigo
Breaking Vaults - Stealing Lastpass Protected Secrets by Martin VigoShakacon
 
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...Shakacon
 
BlueHat v17 || Scaling Incident Response - 5 Keys to Successful Defense at S...
 BlueHat v17 || Scaling Incident Response - 5 Keys to Successful Defense at S... BlueHat v17 || Scaling Incident Response - 5 Keys to Successful Defense at S...
BlueHat v17 || Scaling Incident Response - 5 Keys to Successful Defense at S...BlueHat Security Conference
 
ColdFusion for Penetration Testers
ColdFusion for Penetration TestersColdFusion for Penetration Testers
ColdFusion for Penetration TestersChris Gates
 
Not a Security Boundary: Bypassing User Account Control
Not a Security Boundary: Bypassing User Account ControlNot a Security Boundary: Bypassing User Account Control
Not a Security Boundary: Bypassing User Account Controlenigma0x3
 
BSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysBSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysJoff Thyer
 

Was ist angesagt? (20)

Hunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows EnvironmentHunting for Privilege Escalation in Windows Environment
Hunting for Privilege Escalation in Windows Environment
 
Sticky Keys to the Kingdom
Sticky Keys to the KingdomSticky Keys to the Kingdom
Sticky Keys to the Kingdom
 
Lateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your NetworkLateral Movement: How attackers quietly traverse your Network
Lateral Movement: How attackers quietly traverse your Network
 
Owning computers without shell access 2
Owning computers without shell access 2Owning computers without shell access 2
Owning computers without shell access 2
 
Owning computers without shell access dark
Owning computers without shell access darkOwning computers without shell access dark
Owning computers without shell access dark
 
BlueHat v17 || Corrupting Memory in Microsoft Office Protected-View Sandbox
BlueHat v17 || Corrupting Memory in Microsoft Office Protected-View Sandbox BlueHat v17 || Corrupting Memory in Microsoft Office Protected-View Sandbox
BlueHat v17 || Corrupting Memory in Microsoft Office Protected-View Sandbox
 
Privilege escalation from 1 to 0 Workshop
Privilege escalation from 1 to 0 Workshop Privilege escalation from 1 to 0 Workshop
Privilege escalation from 1 to 0 Workshop
 
Outlook and Exchange for the bad guys
Outlook and Exchange for the bad guysOutlook and Exchange for the bad guys
Outlook and Exchange for the bad guys
 
The Dark Side of PowerShell by George Dobrea
The Dark Side of PowerShell by George DobreaThe Dark Side of PowerShell by George Dobrea
The Dark Side of PowerShell by George Dobrea
 
PowerShell for Practical Purple Teaming
PowerShell for Practical Purple TeamingPowerShell for Practical Purple Teaming
PowerShell for Practical Purple Teaming
 
Evading Microsoft ATA for Active Directory Domination
Evading Microsoft ATA for Active Directory DominationEvading Microsoft ATA for Active Directory Domination
Evading Microsoft ATA for Active Directory Domination
 
Zumasys Citrix Top 10 Tips and Tricks
Zumasys Citrix Top 10 Tips and TricksZumasys Citrix Top 10 Tips and Tricks
Zumasys Citrix Top 10 Tips and Tricks
 
Pwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellPwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShell
 
Breaking Vaults - Stealing Lastpass Protected Secrets by Martin Vigo
Breaking Vaults - Stealing Lastpass Protected Secrets by Martin VigoBreaking Vaults - Stealing Lastpass Protected Secrets by Martin Vigo
Breaking Vaults - Stealing Lastpass Protected Secrets by Martin Vigo
 
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
Red vs Blue- Modern Atice Directory Attacks, Detection & Protection by Sean M...
 
Linux Hardening - nullhyd
Linux Hardening - nullhydLinux Hardening - nullhyd
Linux Hardening - nullhyd
 
BlueHat v17 || Scaling Incident Response - 5 Keys to Successful Defense at S...
 BlueHat v17 || Scaling Incident Response - 5 Keys to Successful Defense at S... BlueHat v17 || Scaling Incident Response - 5 Keys to Successful Defense at S...
BlueHat v17 || Scaling Incident Response - 5 Keys to Successful Defense at S...
 
ColdFusion for Penetration Testers
ColdFusion for Penetration TestersColdFusion for Penetration Testers
ColdFusion for Penetration Testers
 
Not a Security Boundary: Bypassing User Account Control
Not a Security Boundary: Bypassing User Account ControlNot a Security Boundary: Bypassing User Account Control
Not a Security Boundary: Bypassing User Account Control
 
BSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad GuysBSIDES-PR Keynote Hunting for Bad Guys
BSIDES-PR Keynote Hunting for Bad Guys
 

Ähnlich wie Заполучили права администратора домена? Игра еще не окончена

Defcon 25 Packet Hacking Village - Finding Your Way to Domain Access
Defcon 25 Packet Hacking Village - Finding Your Way to Domain AccessDefcon 25 Packet Hacking Village - Finding Your Way to Domain Access
Defcon 25 Packet Hacking Village - Finding Your Way to Domain Accesseightbit
 
Pentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionPentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionBeau Bullock
 
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Michael Pirnat
 
Ch 8: Desktop and Server OS Vulnerabilites
Ch 8: Desktop and Server OS VulnerabilitesCh 8: Desktop and Server OS Vulnerabilites
Ch 8: Desktop and Server OS VulnerabilitesSam Bowne
 
Protecting Windows Passwords and Preventing Windows Computer / Password Attacks
Protecting Windows Passwords and Preventing Windows Computer / Password AttacksProtecting Windows Passwords and Preventing Windows Computer / Password Attacks
Protecting Windows Passwords and Preventing Windows Computer / Password AttacksZoho Corporation
 
Tckhjhhjbbggujvg Day13-Post-Exploitation.pptx
Tckhjhhjbbggujvg Day13-Post-Exploitation.pptxTckhjhhjbbggujvg Day13-Post-Exploitation.pptx
Tckhjhhjbbggujvg Day13-Post-Exploitation.pptxAlfredObia1
 
Secure360 - Extracting Password from Windows
Secure360 - Extracting Password from WindowsSecure360 - Extracting Password from Windows
Secure360 - Extracting Password from WindowsScott Sutherland
 
Securing the cloud and your assets
Securing the cloud and your assetsSecuring the cloud and your assets
Securing the cloud and your assetsMarcus Dempsey
 
Topic 2 - Ransomware Techniques.pptx
Topic 2 - Ransomware Techniques.pptxTopic 2 - Ransomware Techniques.pptx
Topic 2 - Ransomware Techniques.pptxMorningstar90
 
Extracting Credentials From Windows
Extracting Credentials From WindowsExtracting Credentials From Windows
Extracting Credentials From WindowsNetSPI
 
H4CK1N6 - Web Application Security
H4CK1N6 - Web Application SecurityH4CK1N6 - Web Application Security
H4CK1N6 - Web Application SecurityOliver Hader
 
MS LAPS protection: portal for secure access to local admin passwords
MS LAPS protection: portal for secure access to local admin passwordsMS LAPS protection: portal for secure access to local admin passwords
MS LAPS protection: portal for secure access to local admin passwordsNikolay Klendar
 
Defcon - Veil-Pillage
Defcon - Veil-PillageDefcon - Veil-Pillage
Defcon - Veil-PillageVeilFramework
 
Bsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicatedBsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicatedOctavio Paguaga
 
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
 
How to Test for The OWASP Top Ten
 How to Test for The OWASP Top Ten How to Test for The OWASP Top Ten
How to Test for The OWASP Top TenSecurity Innovation
 
Website Hacking and Preventive Measures
Website Hacking and Preventive MeasuresWebsite Hacking and Preventive Measures
Website Hacking and Preventive MeasuresShubham Takode
 
Pentest Apocalypse
Pentest ApocalypsePentest Apocalypse
Pentest ApocalypseBeau Bullock
 

Ähnlich wie Заполучили права администратора домена? Игра еще не окончена (20)

Defcon 25 Packet Hacking Village - Finding Your Way to Domain Access
Defcon 25 Packet Hacking Village - Finding Your Way to Domain AccessDefcon 25 Packet Hacking Village - Finding Your Way to Domain Access
Defcon 25 Packet Hacking Village - Finding Your Way to Domain Access
 
Pentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionPentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 Edition
 
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
 
Ch 8: Desktop and Server OS Vulnerabilites
Ch 8: Desktop and Server OS VulnerabilitesCh 8: Desktop and Server OS Vulnerabilites
Ch 8: Desktop and Server OS Vulnerabilites
 
Protecting Windows Passwords and Preventing Windows Computer / Password Attacks
Protecting Windows Passwords and Preventing Windows Computer / Password AttacksProtecting Windows Passwords and Preventing Windows Computer / Password Attacks
Protecting Windows Passwords and Preventing Windows Computer / Password Attacks
 
Tckhjhhjbbggujvg Day13-Post-Exploitation.pptx
Tckhjhhjbbggujvg Day13-Post-Exploitation.pptxTckhjhhjbbggujvg Day13-Post-Exploitation.pptx
Tckhjhhjbbggujvg Day13-Post-Exploitation.pptx
 
Secure360 - Extracting Password from Windows
Secure360 - Extracting Password from WindowsSecure360 - Extracting Password from Windows
Secure360 - Extracting Password from Windows
 
Securing the cloud and your assets
Securing the cloud and your assetsSecuring the cloud and your assets
Securing the cloud and your assets
 
Ranger BSides-FINAL
Ranger BSides-FINALRanger BSides-FINAL
Ranger BSides-FINAL
 
Topic 2 - Ransomware Techniques.pptx
Topic 2 - Ransomware Techniques.pptxTopic 2 - Ransomware Techniques.pptx
Topic 2 - Ransomware Techniques.pptx
 
Extracting Credentials From Windows
Extracting Credentials From WindowsExtracting Credentials From Windows
Extracting Credentials From Windows
 
H4CK1N6 - Web Application Security
H4CK1N6 - Web Application SecurityH4CK1N6 - Web Application Security
H4CK1N6 - Web Application Security
 
MS LAPS protection: portal for secure access to local admin passwords
MS LAPS protection: portal for secure access to local admin passwordsMS LAPS protection: portal for secure access to local admin passwords
MS LAPS protection: portal for secure access to local admin passwords
 
Defcon - Veil-Pillage
Defcon - Veil-PillageDefcon - Veil-Pillage
Defcon - Veil-Pillage
 
Bsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicatedBsidesnova- Pentesting Methodology - Making bits less complicated
Bsidesnova- Pentesting Methodology - Making bits less complicated
 
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
 
Dakotacon 2017
Dakotacon 2017Dakotacon 2017
Dakotacon 2017
 
How to Test for The OWASP Top Ten
 How to Test for The OWASP Top Ten How to Test for The OWASP Top Ten
How to Test for The OWASP Top Ten
 
Website Hacking and Preventive Measures
Website Hacking and Preventive MeasuresWebsite Hacking and Preventive Measures
Website Hacking and Preventive Measures
 
Pentest Apocalypse
Pentest ApocalypsePentest Apocalypse
Pentest Apocalypse
 

Mehr von Positive Hack Days

Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release NotesИнструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release NotesPositive Hack Days
 
Как мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows DockerКак мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows DockerPositive Hack Days
 
Типовая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive TechnologiesТиповая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive TechnologiesPositive Hack Days
 
Аналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + QlikАналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + QlikPositive Hack Days
 
Использование анализатора кода SonarQube
Использование анализатора кода SonarQubeИспользование анализатора кода SonarQube
Использование анализатора кода SonarQubePositive Hack Days
 
Развитие сообщества Open DevOps Community
Развитие сообщества Open DevOps CommunityРазвитие сообщества Open DevOps Community
Развитие сообщества Open DevOps CommunityPositive Hack Days
 
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...Positive Hack Days
 
Автоматизация построения правил для Approof
Автоматизация построения правил для ApproofАвтоматизация построения правил для Approof
Автоматизация построения правил для ApproofPositive Hack Days
 
Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Positive Hack Days
 
Формальные методы защиты приложений
Формальные методы защиты приложенийФормальные методы защиты приложений
Формальные методы защиты приложенийPositive Hack Days
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложенийPositive Hack Days
 
Теоретические основы Application Security
Теоретические основы Application SecurityТеоретические основы Application Security
Теоретические основы Application SecurityPositive Hack Days
 
От экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 летОт экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 летPositive Hack Days
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиPositive Hack Days
 
Требования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПОТребования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПОPositive Hack Days
 
Формальная верификация кода на языке Си
Формальная верификация кода на языке СиФормальная верификация кода на языке Си
Формальная верификация кода на языке СиPositive Hack Days
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CorePositive Hack Days
 
SOC для КИИ: израильский опыт
SOC для КИИ: израильский опытSOC для КИИ: израильский опыт
SOC для КИИ: израильский опытPositive Hack Days
 
Honeywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services CenterHoneywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services CenterPositive Hack Days
 
Credential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атакиCredential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атакиPositive Hack Days
 

Mehr von Positive Hack Days (20)

Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release NotesИнструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release Notes
 
Как мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows DockerКак мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows Docker
 
Типовая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive TechnologiesТиповая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive Technologies
 
Аналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + QlikАналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + Qlik
 
Использование анализатора кода SonarQube
Использование анализатора кода SonarQubeИспользование анализатора кода SonarQube
Использование анализатора кода SonarQube
 
Развитие сообщества Open DevOps Community
Развитие сообщества Open DevOps CommunityРазвитие сообщества Open DevOps Community
Развитие сообщества Open DevOps Community
 
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
 
Автоматизация построения правил для Approof
Автоматизация построения правил для ApproofАвтоматизация построения правил для Approof
Автоматизация построения правил для Approof
 
Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»
 
Формальные методы защиты приложений
Формальные методы защиты приложенийФормальные методы защиты приложений
Формальные методы защиты приложений
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложений
 
Теоретические основы Application Security
Теоретические основы Application SecurityТеоретические основы Application Security
Теоретические основы Application Security
 
От экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 летОт экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 лет
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на грабли
 
Требования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПОТребования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПО
 
Формальная верификация кода на языке Си
Формальная верификация кода на языке СиФормальная верификация кода на языке Си
Формальная верификация кода на языке Си
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
 
SOC для КИИ: израильский опыт
SOC для КИИ: израильский опытSOC для КИИ: израильский опыт
SOC для КИИ: израильский опыт
 
Honeywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services CenterHoneywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services Center
 
Credential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атакиCredential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атаки
 

Kürzlich hochgeladen

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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Kürzlich hochgeladen (20)

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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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)
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Заполучили права администратора домена? Игра еще не окончена

  • 1. Finding Your Way to Domain Admin Access and Even So, the Game Isn't Over Yet Keith Lee
  • 2. #whoami • Keith Lee • Singapore • Senior Consultant at SpiderLabs APAC • Loves to write tools • Twitter: @keith55 • Github: https://github.com/milo2012 • Blog: https://milo2012.wordpress.com
  • 3.
  • 4. Overview • We do a number of internal network penetration tests as part of our day to day • There are a bunch of awesome tools and techniques for capturing and cracking credentials but we wanted to fill the gap from after cracking a low privilege password hash from NetBIOS/LLMNR/WPAD attacks etc. to compromising the entire Domain as well as help with a few tricky issues that we as penetration testers face • Developed a tool, Portia to help with this.
  • 5. Portia • Portia aims to automate a number of techniques commonly performed on internal network penetration tests after a low privileged account has been compromised • Functionalities of Portia • Privilege escalation • Lateral movement • Convenience modules
  • 6. How does the name ‘Portia’ comes about ? • Portia is a genus of jumping spider that feeds on other spiders - known for their intelligent hunting behaviour and problem solving capabilities usually only found in larger animals
  • 9. Basic Idea of How Portia Works • Scans the network for NetBIOS hosts and Domain Controllers • Checks if the credentials provided is valid or not • Enumerates users in Domain Admin group • Checks the SYSVOL/Group Policy Preferences (GPP) items for passwords • Is the DC vulnerable to MS14-068 ? • Checks which hosts the account have ‘admin’ access on • Dumps plaintext credentials, hashes and checks ‘Impersonation’ tokens • Collects the hashes/credentials and move on to next target in network. • Auto-elevate the permissions if an ‘Impersonation’ token belong to Domain Admin is found • Comprising the Domain Controller and run other convenient modules
  • 11. Starts with the “low-hanging fruit”
  • 12. Storing passwords in SYSVOL or Group Policy Preference (GPP) • Any authenticated domain user account is able to access it • Passwords are encrypted using known AES 32-byte key. • Locations in Group Policy Preferences where passwords were saved • Drive Maps • Local Users and Groups • Scheduled Tasks • Services • Data Sources
  • 14. Storing passwords in SYSVOL or Group Policy Preference (GPP) • MS Patch - MS14-025 (KB2962486) • Unable to create new GPO preferences that rely on saved passwords • Doesn’t remove the old insecure passwords • Have they disabled or removed the old account that was used in GPO previously?
  • 16. MS14-068 (KB3011780) Vulnerability in Microsoft Windows Kerberos KDC • An attacker will be able to use an unprivileged domain user account and elevate the privileges to that of a domain administrator account. • A Privilege Attribute Certificate (PAC) can be forged that would be accepted by the KDC as legitimate. Can create a fake PAC claiming the regular user is a member of the domain administrators group. • Thus, if a domain controller is vulnerable to MS14-068, an attacker having normal domain user privileges, he/she would be able to have domain admin privileges
  • 17. MS14-068 - Current Tools • Responder - FindSMB2UPTime.py • Impacket - goldenPac.py
  • 18. Portia - Attacking MS14-068
  • 19. Portia - Attacking MS14-068
  • 20. Assuming no passwords in SYSVOL and MS14-068 is not exploitable - what’s next?
  • 21. Impersonate Token • What is Impersonate Token? • When a user logs into a system a delegation token is created which is converted to an impersonation token once the user logs out. • The impersonation token has the same rights and properties as the delegation token. • The delegation and impersonation tokens, once created remains on the system until it is rebooted. • If a Domain Administrator impersonate token is found can use Mimikatz or add to the Domain Admin group to dump credentials on DC
  • 25. Portia - Impersonate Tokens • If no impersonate token is found, the Portia runs Mimikatz as well as dumps local password hashes • If there are any new passwords/hashes they are added to the database and and the process starts again • The new passwords will be tested against every host until there are no new passwords
  • 26. Shared Local Administrator Passwords • IT administrators uses a default Operating System (OS) image (with the software installed) and roll out to new users. The OS is configured with a default password. • In order for the IT staff to support the workstations/servers, it’s easy to use a single default local administrator password. • From an offensive perspective you can exploit this to move from compromising one host in the network to compromising 100 hosts in the network • Portia detects if multiple machines are using the same local administrator password • Does not matter if the machines are connected to the domain
  • 27. No Admin Access? • Various local privilege escalation techniques • Hot Potato • Windows Update • Automatic updater of untrusted certificates • Unquoted Service Paths • https://gallery.technet.microsoft.com/scriptcenter/Windows-Unquoted-Service-190f0341 • wmic service get name,displayname,pathname,startmode |findstr /i "auto" |findstr /i /v "c:windows" |findstr /i /v """' • Weak file permissions for windows services, unprotected exe / registries • https://github.com/pentestmonkey/windows-privesc-check
  • 28. No Admin Access • If the option ‘Allow users to connect remotely by using Remote Desktop Services’ is enabled in Group Policy, you will be able to login remotely into the host
  • 29. No Admin Access? • UAC Bypass • https://github.com/hfiref0x/UACME • Using Eventvwr.exe and registry Hijacking • https://enigma0x3.net/2016/08/15/fileless-uac-bypass-using-eventvwr-exe-and-registry-hijacking/ • Using App Path • https://enigma0x3.net/2017/03/14/bypassing-uac-using-app-paths/ • Using SDCLT.exe • https://enigma0x3.net/2017/03/17/fileless-uac-bypass-using-sdclt-exe/
  • 30. Portia - Hunting for Correct Credentials to access SMB Shares/Folders • $ python portia.py -d CORP -u milo -p Password1 -M shares
  • 31. Portia - Current Modules • Bitlocker Keys • KeePass Databases • KeePass Passwords • TrueCrypt Master Keys • Wireless Passwords • WinvNC, Ultravnc • Putty • WinSCP • Browser Credentials (Firefox/Chrome) • Filezilla sitemanager.xml • Apache HTTPd.conf • Unattend.xml, Sysprep.xml, Sysprep.inf • Passwords stored in documents labelled *password* • IIS Credentials (ApplicationHost.config) • PAN numbers in files/memory
  • 32. Portia - Find Interesting Files
  • 33. Portia - Find Interesting Files
  • 34. Portia - Dumping Browser Credentials • Uses various Powershell scripts • First checks for Firefox or Chrome • Checks the current logged in user and checks whether we have the hash or password belonging to the user • Powershell script that runs in the user session that dumps the credentials to a file
  • 35. Portia - Dumping Browser Credentials
  • 36. Portia - Searching for PAN on Disk and In-Memory • Useful tools for searching for disks and memory for PAN numbers • https://github.com/jksdua/credit-card-finder (Disk) • https://github.com/Shellntel/scripts/blob/master/mem_scraper.ps1 (Memory) • Portia uses modified versions of these tools • Portia enumerates the list of installed applications on the hosts where we have admin access on • Portia enumerates the processes running on the hosts where we have admin access on • Portia produces a table mapping which processes/programs are running on which hosts and what processes are common. This will allow an attacker to find interesting ‘processes’ to dump and find PAN numbers.
  • 37. Portia - Searching for PAN on Disk and In-Memory
  • 38. Other Modules - Keepass
  • 39. Other Modules - Truecrypt
  • 40. Portia - Analysing Hashes • Currently has some basic analysis of hashes • Blank hash • Accounts using the same hash • Future improvements • Checking for password reuse between local admin account and domain admin
  • 42. Future Enhancements • Microsoft SQL Support • Finds passwords/hashes that grant access to the database • Dump a sample of each table (i.e. first five or so records) • Sensitive info (e.g. PAN) • Docker Image • Easy setup • Add MS08-067 and MS17-010
  • 44. Remediations • Shared Local Administrator Account • Local Administrator Password Solution (LAPS) • Randomly generate passwords that are automatically changed on managed machines. • Effectively mitigate PtH attacks that rely on identical local account passwords. • Enforced password protection during transport via encryption using the Kerberos version 5 protocol. • Use access control lists (ACLs) to protect passwords in Active Directory and easily implement a detailed security model.
  • 45. Remediations • Impersonation Token • For high privilege accounts (accounts in Domain Admin group), tick the box “Account is sensitive and cannot be delegated”
  • 46. Remediations • Mimikatz • Install Hotfix KB 2871997 • Disable Windows Digest • reg add HKLMSYSTEMCurrentControlSetControlSecurityProvidersW Digest /v UseLogonCredential /t REG_DWORD /d 0

Hinweis der Redaktion

  1. Here are some photos taken in Singapore that I would like to share with you. If you have never been to Singapore, I strongly welcome you to visit Singapore if you have the time
  2. Privilege escalation means that you are just a normal domain user and you are trying to escalate the privilege to that of a Domain Admin Lateral movements means that you have compromised one host in the network and you are trying to move to other targets and compromise them and finally compromising the Domain Controllers
  3. If the domain controller is vulnerable to MS14-068, we can automatically elevate our privileges to that of a Domain Admin
  4. Starts off with running a scan against the list of target IP address/subnet/file containing list of IPs Checks if the
  5. The left side shows screenshot of the places where GPP passwords are saved. The right side shows whats the encrypted password in the SYSVOL folder looks like
  6. Checks the SYSVOL folder for any credentials Tests the account credentials if found Checks if the account belong to the local administrator group of any hosts if it is a Domain Admin account Follow by dumping passwords/hashes/impersonate tokens and then move to the next target is the host is compromised.
  7. It is an old vulnerability but from time to time, you can still find this issue during penetration tests. An attacker can forge a PAC that can be accepted by the KDC as legitimate The attacker can create a fake PAC claiming that the regular user is a member of the DA group.