SlideShare a Scribd company logo
Mimikatz
A TOOL TO PLAY WITH WINDOW SECURITY
DOWNLOAD: HTTPS://GITHUB.COM/GENTILKIWI/MIMIKATZ
RISHABH SHARMA
Mimikatz Overview
 Written in C language
 For both Windows x86/x64 architecture
 Develop by Benjamin Delpy
 Tool use to gather credential in plain text from
Window memory
 Mostly use in Red Team Assessment
Mimikatz Capabilities
 Extract plain text password, hashes and Kerberos tickets from memory
 Use to build Golden Ticket
 Use to build Silver Ticket
 Use to build Trust Ticket
Authentication Techniques:
 Use for Pass-the-Hash
 Use for Over-Pass-he-Hash
 Use for Pass-the-Tickets
Why Need Mimikatz?
 Scenario1: We assume that local administrator logged into the system and then log off
from the system. Now attacker logged into the system as a normal user. By some way, the
attacker escalates the permission to admin level. By using Mimikatz attacker may able to
get the admin clear text or NTLM hash, etc. The attacker uses that credential for further
exploitation.
 Scenario 2: We assume that a domain administrator logged into the system remotely let
say by SSH, SMB, RDP, etc. Now attacker logged into the system as a normal user. By
some way, the attacker escalates the permission to local admin level, which is the
minimum requirement of Mimikatz. By using Mimikatz attacker may able to get the
domain admin clear text or NTLM hash. The attacker uses that credential for further
exploitation like to access domain controller.
 Note: Attacker may use the authentication techniques available in Mimikatz for further
exploitation
Mimikatz Modules
 Standard
 Privilege
 Crypto
 Sekurlsa
 Kerberos
 Lsadump
 Vault
 Token
 Event
 Ts
 Process
 Service
 Net
 Misc
 Library mimilib
 Driver mimidrv
Sekurlsa Module to Dump Password
 This module is used to extracts passwords, keys, pin codes, tickets and hashes from the
memory of LSASS (Local Security Authority Subsystem Service).
 For running Sekurlsa module, Mimikatz need some rights:
 Administrator Right to get debug privilege via privilege::debug
or
 SYSTEM account, via post exploitation tools. If Mimikatz executed by SYSTEM account, then
privilege::debug is not needed. We directly run the sekurlsa::logonpasswords. We can use
PsExec.exe –s cmd.exe to run CMD by SYSTEM account.
 Note: The system account and the administrator account (Administrators group) have the
same file privileges, but they have different functions.
Sekurlsa Module Commands
 Command to check user is in administrator group or not.
Net localgroup administrators
 Command to check Mimikatz debug privilege
Mimikatz# privilege::debug
 Command to extract passwords, hashes, keys, pin codes and tickets from the memory of LSASS.
Mimikatz# sekurlsa::logonpasswords
 Command to run cmd.exe by SYSTEM account.
PsExec.exe/PsExec64.exe –s –i cmd.exe
 Command to get clear text password from offline memory dump.
Mimikatz # sekurlsa::minidump lsass.dmp
Mimikatz # sekurlsa::logonPasswords full
Run Mimikatz without
Administrator Privilege
 First command is to check
username.
 Second command is to
check if user exist in
administrator group or not.
 In “debug” and
“logonpasswords”
commands, we got the
errors because Mimikatz
was not running by
Administrator privileges.
Run Mimikatz with
Administrator Privilege
 Mimikatz executed by
Administrator privileges.
 In the second command,
when we executed the
“logonpasswords”
command before the
“debug” command, we got
an error because Mimikatz
had executed by
Administrator privileges not
by SYSTEM privileges.
Local Security Authority Subsystem Service (LSASS)
 LSASS (Local Security Authority Subsystem Service) is a Windows Based Service which provides the user with
the functionality of SSO (Single Sign-On).
 LSASS responsibilities:
 To verify user credentials.
 Handle the password change.
 Create access token.
 Authenticate users for accessing resources or services or applications.
 Check for user rights.
 LSASS supports Kerberos (kerberos.dll), NTLM (msv1_0.dll) or Digest Authentication (wdigest.dll). After a
user’s authentication, his credentials are stored in the memory of the system. This is done so that the
security packages can access it. Depending on the package, the password is stored as a hash value,
encrypted or even in plaintext.
 Note: Every process has memory.
What is Single Sign-On (SSO)
 Single sign-on (SSO) is a session and user authentication service that permits a user to use
one set of login credentials (e.g., username and password) to access multiple
applications/services/resources.
 A user login into the Windows system with the entry of his username and password. After
this, all resources/applications/services the users have rights are accessible without having
to enter the credentials anymore. This concept is referred to as Single-Sign-On and is
implemented in Windows with LSASS.
 The LSASS service authenticates the end user for all the applications the user has been
given rights to and eliminates further prompts when the user switches applications during
the same session.
How Mimikatz Returns Plain Text Credentials?
 The problem is that password encryption is implemented using the standard Win32
functions LsaProtectMemory and LsaUnprotectMemory, which are used to
encrypt/decrypt a certain area of memory.
 Mimikatz allows you to obtain the encrypted data from the memory, decrypt them using
LsaUnprotectMemory function and display all accounts of users authorized in the system
and their passwords (decrypted, in plain text!).
Mimikatz Sekurlsa Flow Diagram
Windows Login
(Username and
Password)
Credentials stored in LSASS process memory (Store password using reversible encryption using the
standard Win32 functions LsaProtectMemory and LsaUnprotectMemory, which are used to
encrypt/decrypt a certain area of memory)
Mimikatz (Obtain encrypted data from memory)
Mimikatz decryption (Decrypt them using LsaUnprotectMemory function
and display all accounts of users authorized in the system and their
passwords decrypted, in plain text)
Other Ways To Dump LSASS Memory
 By using Task manager
 By using Sysinternal tool, Procdump.exe
 By using PowerShell script OutMiniDump.ps1
 By using Dumpert (Available on GitHub)
 By Executing a native comsvcs.dll DLL found in Windowssystem32 with rundll32
Sekurlsa Module Login Operation
The juicy information that we get by dumping the LSASS memory can be used further by
using the below techniques to login into the system.
 Pass-The-Hash
 Over-Pass-The-Hash
 Pass-The Tickets
Pass-The-Hash
 Pass-The-Hash is a technique that is used to gain access to the system by using NTLM
hash of the user in that system.
 Mimikatz can perform pass-the-hash operation by starting the process by fake cleartext
password and then replace NTLM of the fake password with real NTLM hash of the user.
Why Mimikatz use fake password?
To understand the reason of fake password, first understand the process of window authentication.
Window Authentication Process:
 The user provides their username, password, and domain name (If AD authentication) at the interactive
window logon screen of a client.
 The window client system change the cleartext password to NTLM hash and discards the cleartext
password.
 The client send the username in cleartext to the domain controller (If AD authentication) or locally to
the authentication package (LSA).
 The domain controller/local system generate 16-byte random number challenge or nonce and send it
back to client.
 The client encrypts this challenge with the hash of the user's password that is mentioned in step 2 and
return the response to the domain controller/local system.
Why Mimikatz use fake password?
 Domain controller/local system have the three values for authentication:
 Username in cleartext
 Challenge sent to the client
 Response received from the client
 The domain controller/local system uses the username to retrieve the NTLM hash of the user's
password from Active directory/Security Account Manager database (SAM).
 It uses the password hash to encrypt the challenge and compare the results with the response that
received from the client.
 If they are identical, authentication is successful.
Why Mimikatz use fake password?
Mimikatz use fake password when user/attacker only have NTLM hash of the user and
cracking the hash to get cleartext password is very time consuming when Window allows to
use NTLM hash by pass-the-hash technique for login.
Mimikatz use fake cleartext password and that cleartext password change to NTLM hash as
mentioned in step 2 , when challenge received from the domain controller/local system for
encryption, the Mimikatz replace the fake NTLM hash with the original user NTLM hash for
encryption of challenge as mentioned in step 5.
Ways to Capture NTLM Hashes
 Sniff SMB challenge-response over the network
 By using Responder
 Capture NTLM hash through capture SMB & word UNC injector
 Capture NTLM hash through capture SMB & spoof NBNS
 Capture NTLM hash with Office [DOT] XML Documents
 From SAM file
Pass-The-Hash Commands
Mimikatz# privilege::debug
Mimikatz# sekurlsa::pth /user:IEUser /domain:IEWIN7 /ntlm:fc525c9683e8fe067095ba2ddc971889
Pass-The-Hash Commands
Arguments:
 /user - the username you want to impersonate, keep in mind that Administrator is not the only name
for this well-known account.
 /domain - the fully qualified domain name - without domain or in case of local user/admin, use
computer or server name, workgroup or whatever.
 /rc4 or /ntlm - optional - the RC4 key / NTLM hash of the user's password.
 /aes128 - optional - the AES128 key derived from the user's password and the realm of the domain.
 /aes256 - optional - the AES256 key derived from the user's password and the realm of the domain.
 /run - optional - the command line to run - default is: cmd to have a shell.
Thank You

More Related Content

What's hot

Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find Them
Ross Wolf
 
Not a Security Boundary
Not a Security BoundaryNot a Security Boundary
Not a Security Boundary
Will Schroeder
 
I Have the Power(View)
I Have the Power(View)I Have the Power(View)
I Have the Power(View)
Will Schroeder
 
Red Team Revenge - Attacking Microsoft ATA
Red Team Revenge - Attacking Microsoft ATARed Team Revenge - Attacking Microsoft ATA
Red Team Revenge - Attacking Microsoft ATA
Nikhil Mittal
 
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
Will Schroeder
 
Passwords#14 - mimikatz
Passwords#14 - mimikatzPasswords#14 - mimikatz
Passwords#14 - mimikatz
Benjamin Delpy
 
Windows Threat Hunting
Windows Threat HuntingWindows Threat Hunting
Windows Threat Hunting
GIBIN JOHN
 
Hunting Lateral Movement in Windows Infrastructure
Hunting Lateral Movement in Windows InfrastructureHunting Lateral Movement in Windows Infrastructure
Hunting Lateral Movement in Windows Infrastructure
Sergey Soldatov
 
ReCertifying Active Directory
ReCertifying Active DirectoryReCertifying Active Directory
ReCertifying Active Directory
Will Schroeder
 
Hunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentationHunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentation
OlehLevytskyi1
 
Troopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can YouTroopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can You
Douglas Bienstock
 
Attacker's Perspective of Active Directory
Attacker's Perspective of Active DirectoryAttacker's Perspective of Active Directory
Attacker's Perspective of Active Directory
Sunny Neo
 
Windows attacks - AT is the new black
Windows attacks - AT is the new blackWindows attacks - AT is the new black
Windows attacks - AT is the new black
Chris Gates
 
Introduction to red team operations
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operations
Sunny Neo
 
Defending Your "Gold"
Defending Your "Gold"Defending Your "Gold"
Defending Your "Gold"
Will Schroeder
 
DerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting RevisitedDerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting Revisited
Will Schroeder
 
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
DirkjanMollema
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
Jason Lang
 
Derbycon - Passing the Torch
Derbycon - Passing the TorchDerbycon - Passing the Torch
Derbycon - Passing the Torch
Will Schroeder
 
Detection Rules Coverage
Detection Rules CoverageDetection Rules Coverage
Detection Rules Coverage
Sunny Neo
 

What's hot (20)

Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find Them
 
Not a Security Boundary
Not a Security BoundaryNot a Security Boundary
Not a Security Boundary
 
I Have the Power(View)
I Have the Power(View)I Have the Power(View)
I Have the Power(View)
 
Red Team Revenge - Attacking Microsoft ATA
Red Team Revenge - Attacking Microsoft ATARed Team Revenge - Attacking Microsoft ATA
Red Team Revenge - Attacking Microsoft ATA
 
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
 
Passwords#14 - mimikatz
Passwords#14 - mimikatzPasswords#14 - mimikatz
Passwords#14 - mimikatz
 
Windows Threat Hunting
Windows Threat HuntingWindows Threat Hunting
Windows Threat Hunting
 
Hunting Lateral Movement in Windows Infrastructure
Hunting Lateral Movement in Windows InfrastructureHunting Lateral Movement in Windows Infrastructure
Hunting Lateral Movement in Windows Infrastructure
 
ReCertifying Active Directory
ReCertifying Active DirectoryReCertifying Active Directory
ReCertifying Active Directory
 
Hunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentationHunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentation
 
Troopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can YouTroopers 19 - I am AD FS and So Can You
Troopers 19 - I am AD FS and So Can You
 
Attacker's Perspective of Active Directory
Attacker's Perspective of Active DirectoryAttacker's Perspective of Active Directory
Attacker's Perspective of Active Directory
 
Windows attacks - AT is the new black
Windows attacks - AT is the new blackWindows attacks - AT is the new black
Windows attacks - AT is the new black
 
Introduction to red team operations
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operations
 
Defending Your "Gold"
Defending Your "Gold"Defending Your "Gold"
Defending Your "Gold"
 
DerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting RevisitedDerbyCon 2019 - Kerberoasting Revisited
DerbyCon 2019 - Kerberoasting Revisited
 
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
I'm in your cloud... reading everyone's email. Hacking Azure AD via Active Di...
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
 
Derbycon - Passing the Torch
Derbycon - Passing the TorchDerbycon - Passing the Torch
Derbycon - Passing the Torch
 
Detection Rules Coverage
Detection Rules CoverageDetection Rules Coverage
Detection Rules Coverage
 

Similar to Mimikatz

Module 8 System Hacking
Module 8   System HackingModule 8   System Hacking
Module 8 System Hackingleminhvuong
 
_Hackercool - September 2021.pdf
_Hackercool - September 2021.pdf_Hackercool - September 2021.pdf
_Hackercool - September 2021.pdf
ssuser5e1b13
 
Windows post exploitation
Windows post exploitationWindows post exploitation
Windows post exploitation
yarden hanan
 
Mitre Attack - Credential Dumping - updated.pptx
Mitre Attack - Credential Dumping - updated.pptxMitre Attack - Credential Dumping - updated.pptx
Mitre Attack - Credential Dumping - updated.pptx
waizuq
 
Understanding Windows Lateral Movements
Understanding Windows Lateral MovementsUnderstanding Windows Lateral Movements
Understanding Windows Lateral Movements
Daniel López Jiménez
 
Tips to Remediate your Vulnerability Management Program
Tips to Remediate your Vulnerability Management ProgramTips to Remediate your Vulnerability Management Program
Tips to Remediate your Vulnerability Management Program
BeyondTrust
 
Understanding Active Directory Enumeration
Understanding Active Directory EnumerationUnderstanding Active Directory Enumeration
Understanding Active Directory Enumeration
Daniel López Jiménez
 
Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018
Paula Januszkiewicz
 
Creds extraction
Creds extractionCreds extraction
Creds extraction
Ilan Mindel
 
2600 v03 n02 (february 1986)
2600 v03 n02 (february 1986)2600 v03 n02 (february 1986)
2600 v03 n02 (february 1986)
Felipe Prado
 
Windows 10 CredentialGuard vs Mimikatz - SEC599
Windows 10 CredentialGuard vs Mimikatz - SEC599Windows 10 CredentialGuard vs Mimikatz - SEC599
Windows 10 CredentialGuard vs Mimikatz - SEC599
Erik Van Buggenhout
 
Microsoft (Data Protection Solutions)
Microsoft (Data Protection Solutions)Microsoft (Data Protection Solutions)
Microsoft (Data Protection Solutions)Vinayak Hegde
 
DEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
DEF CON 23 - Sean - metcalf - red vs blue ad attack and defenseDEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
DEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
Felipe Prado
 
Kerberos, NTLM and LM-Hash
Kerberos, NTLM and LM-HashKerberos, NTLM and LM-Hash
Kerberos, NTLM and LM-Hash
Ankit Mehta
 
A Critical Analysis of Microsoft Data Protection Solutions
A Critical Analysis of Microsoft Data Protection SolutionsA Critical Analysis of Microsoft Data Protection Solutions
A Critical Analysis of Microsoft Data Protection Solutions
John Rhoton
 
Module 4 Enumeration
Module 4   EnumerationModule 4   Enumeration
Module 4 Enumerationleminhvuong
 
CHAPTER 26 WINDOWS SECURITY 26.1 FUNDAMENTAL
CHAPTER 26  WINDOWS SECURITY  26.1  FUNDAMENTAL CHAPTER 26  WINDOWS SECURITY  26.1  FUNDAMENTAL
CHAPTER 26 WINDOWS SECURITY 26.1 FUNDAMENTAL
EstelaJeffery653
 
module3-systemhacking.pdf
module3-systemhacking.pdfmodule3-systemhacking.pdf
module3-systemhacking.pdf
tehkotak4
 
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
 

Similar to Mimikatz (20)

Module 8 System Hacking
Module 8   System HackingModule 8   System Hacking
Module 8 System Hacking
 
_Hackercool - September 2021.pdf
_Hackercool - September 2021.pdf_Hackercool - September 2021.pdf
_Hackercool - September 2021.pdf
 
Windows post exploitation
Windows post exploitationWindows post exploitation
Windows post exploitation
 
Mitre Attack - Credential Dumping - updated.pptx
Mitre Attack - Credential Dumping - updated.pptxMitre Attack - Credential Dumping - updated.pptx
Mitre Attack - Credential Dumping - updated.pptx
 
Understanding Windows Lateral Movements
Understanding Windows Lateral MovementsUnderstanding Windows Lateral Movements
Understanding Windows Lateral Movements
 
Tips to Remediate your Vulnerability Management Program
Tips to Remediate your Vulnerability Management ProgramTips to Remediate your Vulnerability Management Program
Tips to Remediate your Vulnerability Management Program
 
Understanding Active Directory Enumeration
Understanding Active Directory EnumerationUnderstanding Active Directory Enumeration
Understanding Active Directory Enumeration
 
Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018Gartner Security & Risk Management Summit 2018
Gartner Security & Risk Management Summit 2018
 
Creds extraction
Creds extractionCreds extraction
Creds extraction
 
2600 v03 n02 (february 1986)
2600 v03 n02 (february 1986)2600 v03 n02 (february 1986)
2600 v03 n02 (february 1986)
 
Windows 10 CredentialGuard vs Mimikatz - SEC599
Windows 10 CredentialGuard vs Mimikatz - SEC599Windows 10 CredentialGuard vs Mimikatz - SEC599
Windows 10 CredentialGuard vs Mimikatz - SEC599
 
Microsoft (Data Protection Solutions)
Microsoft (Data Protection Solutions)Microsoft (Data Protection Solutions)
Microsoft (Data Protection Solutions)
 
DEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
DEF CON 23 - Sean - metcalf - red vs blue ad attack and defenseDEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
DEF CON 23 - Sean - metcalf - red vs blue ad attack and defense
 
Kerberos, NTLM and LM-Hash
Kerberos, NTLM and LM-HashKerberos, NTLM and LM-Hash
Kerberos, NTLM and LM-Hash
 
A Critical Analysis of Microsoft Data Protection Solutions
A Critical Analysis of Microsoft Data Protection SolutionsA Critical Analysis of Microsoft Data Protection Solutions
A Critical Analysis of Microsoft Data Protection Solutions
 
Module 4 Enumeration
Module 4   EnumerationModule 4   Enumeration
Module 4 Enumeration
 
Windows network
Windows networkWindows network
Windows network
 
CHAPTER 26 WINDOWS SECURITY 26.1 FUNDAMENTAL
CHAPTER 26  WINDOWS SECURITY  26.1  FUNDAMENTAL CHAPTER 26  WINDOWS SECURITY  26.1  FUNDAMENTAL
CHAPTER 26 WINDOWS SECURITY 26.1 FUNDAMENTAL
 
module3-systemhacking.pdf
module3-systemhacking.pdfmodule3-systemhacking.pdf
module3-systemhacking.pdf
 
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...
 

Recently uploaded

Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 

Recently uploaded (20)

Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 

Mimikatz

  • 1. Mimikatz A TOOL TO PLAY WITH WINDOW SECURITY DOWNLOAD: HTTPS://GITHUB.COM/GENTILKIWI/MIMIKATZ RISHABH SHARMA
  • 2. Mimikatz Overview  Written in C language  For both Windows x86/x64 architecture  Develop by Benjamin Delpy  Tool use to gather credential in plain text from Window memory  Mostly use in Red Team Assessment
  • 3. Mimikatz Capabilities  Extract plain text password, hashes and Kerberos tickets from memory  Use to build Golden Ticket  Use to build Silver Ticket  Use to build Trust Ticket Authentication Techniques:  Use for Pass-the-Hash  Use for Over-Pass-he-Hash  Use for Pass-the-Tickets
  • 4. Why Need Mimikatz?  Scenario1: We assume that local administrator logged into the system and then log off from the system. Now attacker logged into the system as a normal user. By some way, the attacker escalates the permission to admin level. By using Mimikatz attacker may able to get the admin clear text or NTLM hash, etc. The attacker uses that credential for further exploitation.  Scenario 2: We assume that a domain administrator logged into the system remotely let say by SSH, SMB, RDP, etc. Now attacker logged into the system as a normal user. By some way, the attacker escalates the permission to local admin level, which is the minimum requirement of Mimikatz. By using Mimikatz attacker may able to get the domain admin clear text or NTLM hash. The attacker uses that credential for further exploitation like to access domain controller.  Note: Attacker may use the authentication techniques available in Mimikatz for further exploitation
  • 5. Mimikatz Modules  Standard  Privilege  Crypto  Sekurlsa  Kerberos  Lsadump  Vault  Token  Event  Ts  Process  Service  Net  Misc  Library mimilib  Driver mimidrv
  • 6. Sekurlsa Module to Dump Password  This module is used to extracts passwords, keys, pin codes, tickets and hashes from the memory of LSASS (Local Security Authority Subsystem Service).  For running Sekurlsa module, Mimikatz need some rights:  Administrator Right to get debug privilege via privilege::debug or  SYSTEM account, via post exploitation tools. If Mimikatz executed by SYSTEM account, then privilege::debug is not needed. We directly run the sekurlsa::logonpasswords. We can use PsExec.exe –s cmd.exe to run CMD by SYSTEM account.  Note: The system account and the administrator account (Administrators group) have the same file privileges, but they have different functions.
  • 7. Sekurlsa Module Commands  Command to check user is in administrator group or not. Net localgroup administrators  Command to check Mimikatz debug privilege Mimikatz# privilege::debug  Command to extract passwords, hashes, keys, pin codes and tickets from the memory of LSASS. Mimikatz# sekurlsa::logonpasswords  Command to run cmd.exe by SYSTEM account. PsExec.exe/PsExec64.exe –s –i cmd.exe  Command to get clear text password from offline memory dump. Mimikatz # sekurlsa::minidump lsass.dmp Mimikatz # sekurlsa::logonPasswords full
  • 8. Run Mimikatz without Administrator Privilege  First command is to check username.  Second command is to check if user exist in administrator group or not.  In “debug” and “logonpasswords” commands, we got the errors because Mimikatz was not running by Administrator privileges.
  • 9. Run Mimikatz with Administrator Privilege  Mimikatz executed by Administrator privileges.  In the second command, when we executed the “logonpasswords” command before the “debug” command, we got an error because Mimikatz had executed by Administrator privileges not by SYSTEM privileges.
  • 10. Local Security Authority Subsystem Service (LSASS)  LSASS (Local Security Authority Subsystem Service) is a Windows Based Service which provides the user with the functionality of SSO (Single Sign-On).  LSASS responsibilities:  To verify user credentials.  Handle the password change.  Create access token.  Authenticate users for accessing resources or services or applications.  Check for user rights.  LSASS supports Kerberos (kerberos.dll), NTLM (msv1_0.dll) or Digest Authentication (wdigest.dll). After a user’s authentication, his credentials are stored in the memory of the system. This is done so that the security packages can access it. Depending on the package, the password is stored as a hash value, encrypted or even in plaintext.  Note: Every process has memory.
  • 11. What is Single Sign-On (SSO)  Single sign-on (SSO) is a session and user authentication service that permits a user to use one set of login credentials (e.g., username and password) to access multiple applications/services/resources.  A user login into the Windows system with the entry of his username and password. After this, all resources/applications/services the users have rights are accessible without having to enter the credentials anymore. This concept is referred to as Single-Sign-On and is implemented in Windows with LSASS.  The LSASS service authenticates the end user for all the applications the user has been given rights to and eliminates further prompts when the user switches applications during the same session.
  • 12. How Mimikatz Returns Plain Text Credentials?  The problem is that password encryption is implemented using the standard Win32 functions LsaProtectMemory and LsaUnprotectMemory, which are used to encrypt/decrypt a certain area of memory.  Mimikatz allows you to obtain the encrypted data from the memory, decrypt them using LsaUnprotectMemory function and display all accounts of users authorized in the system and their passwords (decrypted, in plain text!).
  • 13. Mimikatz Sekurlsa Flow Diagram Windows Login (Username and Password) Credentials stored in LSASS process memory (Store password using reversible encryption using the standard Win32 functions LsaProtectMemory and LsaUnprotectMemory, which are used to encrypt/decrypt a certain area of memory) Mimikatz (Obtain encrypted data from memory) Mimikatz decryption (Decrypt them using LsaUnprotectMemory function and display all accounts of users authorized in the system and their passwords decrypted, in plain text)
  • 14. Other Ways To Dump LSASS Memory  By using Task manager  By using Sysinternal tool, Procdump.exe  By using PowerShell script OutMiniDump.ps1  By using Dumpert (Available on GitHub)  By Executing a native comsvcs.dll DLL found in Windowssystem32 with rundll32
  • 15. Sekurlsa Module Login Operation The juicy information that we get by dumping the LSASS memory can be used further by using the below techniques to login into the system.  Pass-The-Hash  Over-Pass-The-Hash  Pass-The Tickets
  • 16. Pass-The-Hash  Pass-The-Hash is a technique that is used to gain access to the system by using NTLM hash of the user in that system.  Mimikatz can perform pass-the-hash operation by starting the process by fake cleartext password and then replace NTLM of the fake password with real NTLM hash of the user.
  • 17. Why Mimikatz use fake password? To understand the reason of fake password, first understand the process of window authentication. Window Authentication Process:  The user provides their username, password, and domain name (If AD authentication) at the interactive window logon screen of a client.  The window client system change the cleartext password to NTLM hash and discards the cleartext password.  The client send the username in cleartext to the domain controller (If AD authentication) or locally to the authentication package (LSA).  The domain controller/local system generate 16-byte random number challenge or nonce and send it back to client.  The client encrypts this challenge with the hash of the user's password that is mentioned in step 2 and return the response to the domain controller/local system.
  • 18. Why Mimikatz use fake password?  Domain controller/local system have the three values for authentication:  Username in cleartext  Challenge sent to the client  Response received from the client  The domain controller/local system uses the username to retrieve the NTLM hash of the user's password from Active directory/Security Account Manager database (SAM).  It uses the password hash to encrypt the challenge and compare the results with the response that received from the client.  If they are identical, authentication is successful.
  • 19. Why Mimikatz use fake password? Mimikatz use fake password when user/attacker only have NTLM hash of the user and cracking the hash to get cleartext password is very time consuming when Window allows to use NTLM hash by pass-the-hash technique for login. Mimikatz use fake cleartext password and that cleartext password change to NTLM hash as mentioned in step 2 , when challenge received from the domain controller/local system for encryption, the Mimikatz replace the fake NTLM hash with the original user NTLM hash for encryption of challenge as mentioned in step 5.
  • 20. Ways to Capture NTLM Hashes  Sniff SMB challenge-response over the network  By using Responder  Capture NTLM hash through capture SMB & word UNC injector  Capture NTLM hash through capture SMB & spoof NBNS  Capture NTLM hash with Office [DOT] XML Documents  From SAM file
  • 21. Pass-The-Hash Commands Mimikatz# privilege::debug Mimikatz# sekurlsa::pth /user:IEUser /domain:IEWIN7 /ntlm:fc525c9683e8fe067095ba2ddc971889
  • 22. Pass-The-Hash Commands Arguments:  /user - the username you want to impersonate, keep in mind that Administrator is not the only name for this well-known account.  /domain - the fully qualified domain name - without domain or in case of local user/admin, use computer or server name, workgroup or whatever.  /rc4 or /ntlm - optional - the RC4 key / NTLM hash of the user's password.  /aes128 - optional - the AES128 key derived from the user's password and the realm of the domain.  /aes256 - optional - the AES256 key derived from the user's password and the realm of the domain.  /run - optional - the command line to run - default is: cmd to have a shell.