SlideShare a Scribd company logo
CNIT 124:
Advanced Ethical
Hacking
Ch 9: Password Attacks
Topics
• Password Management
• Online Password Attacks
• Offline Password Attacks
• Dumping Passwords from RAM
Password Management
Password Alternatives
• Biometrics
• Two-factor
authentication
• Digital
certificates
Common Password Errors
• Short passwords
• Using dictionary words
• Re-using passwords
– Attackers know that a stolen password can
often be re-used elsewhere
Password Reset
• A weak spot
for cloud
services,
especially
free ones
Online Password Attacks
Multiple Logins
• Scripts try to login with passwords from a
list
• Can be blocked by lockout policies
– After five failed logins, must wait an hour
• Brute-forcing is possible
– Trying every combination of characters
– Impractical except for very short passwords
Wordlists
• Usernames
– Look at valid account names, try to deduce
the pattern
– CCSF uses first letter of first name, then last
name, then 2 digits, like psmith01
– Find a list of real usernames, or use a list of
common names
Password Lists
• Packetstorm
• For special
purposes
• Openwall has
more general
ones, but
they cost
money
– Link Ch 9d
Targeting Wordlists
• Use information about the targeted
person
• Such as a Facebook page
• Generate passwords from clues
– TaylorSwift13!
Cewl
• Included in Kali
• Creates wordlist from URL, reading words from
pages
Crunch
• Generates a wordlist from characters you
specify (included in Kali)
Hydra
• Online password cracker
• Can use wordlists or pattens
Offline Password Attacks
Getting the Hashes
• Most operating systems and Web services
now hash passwords
– Although some use plaintext, and most use
weak hashing techniques
• Windows stores hashes in an encrypted C:
WindowsSAM file, but the key is
available in the SYSTEM file
Two Ways to Strengthen Hashes
• Salting
– Add random bytes before hashing
– Store them with the hash
– This prevents attackers from pre-computing
'Rainbow Tables" of hashes
• Stretching
– Many rounds, typically 5000, of hashing
– Slows down attackers
SAM and SYSTEM Files
Unavailable when Windows is Running
Win 7 Backup Files
• Also unavailable when system is running
• Win XP had C:WindowsRepair but it
seems to be gone now
Reg.exe
• Works on Windows 7
– Link Ch 8i
SAM is Encrypted
• 128-bit RC4
Key is in SYSTEM
• apt-get install bkhive FAILS on Kali 2
• Must install old versions of bkhive and
samdump2 (link Ch 8l)
Extracting Hashes
• LM Hash on the left (now obsolete)
• NT hash on the right (designed in 1991)
Linux Boot Disk
• You can gather hashes by booting the
target system from a LiveCD or USB
• Copy the files while Windows is not
running
Cracking Windows Passwords
• Hashcat tests 500,000 passwords in a few
seconds
– Because algorithm is 1 round of MD4
– Proj X16 in CNIT 123
Kali's Password Hashes
• 5000 rounds of SHA-512 with a salt
• Mac OS X is the same
Cracking Kali Hashes
• Can only try 500 words in a few seconds
John the Ripper & Hashcat
• Cracks many types of hashes
– Auto-detects the algorithm
– Can perform brute force, or dictionary, or
modified dictionary attacks
• Hashcat is newer and claims to be faster
• oclHashcat
– Designed to run in parallel on many GPUs
CloudCracker
• Moxie
Marlinspike's
service
• Runs on AWS
machines
Cheap!
Mimikatz Gets Clear Passwords from
RAM
Stolen Password Lists
• Lists of millions of real stolen passwords are
now available
• The rockyou list is included in Kali
– in /usr/share/wordlists
– Link Ch 9e
Passphrases are Vulnerable
• Hashed with MD5 (link Ch 9g)
• Link Ch 9h
Dumping Passwords from RAM
Plaintext Passwords
• Windows stores the password of the
currently logged-on user in RAM with
"reversible encryption"
• It can be recovered with Windows
Credential Editor or mimikatz
• No matter how long or complex it is
Analysis of Stolen Data Dumped by
TEAMGHOSTSHELL on Aug 25, 2012
CNIT 124: Ch 9: Password Attacks
CNIT 124: Ch 9: Password Attacks
Password Storage:

Awful Beyond Belief
Plaintext, obvious, all the same
Plaintext Passwords, Easily Guessed
CNIT 124: Ch 9: Password Attacks
Sparklan Passwords
Beforward Transactions with PII
Plaintext Passwords
Password Storage:

BASE64
Obfuscated, not hashed
Beforward.jp
BASE64 Encoding
Password Storage:

Unsalted MD5 or SHA-1
Real hashing, but very easy to
crack
MIT – MD5 Password Hashes
CNIT 124: Ch 9: Password Attacks
CNIT 124: Ch 9: Password Attacks
MySQL323 Password Hashes
Cracking Hashes with Cain
SHA-1 Hash
Cracked!
MySQL 5 Password Hashes
Wordpress Password Hashes
Relative Space
Cracked!
CNIT 124: Ch 9: Password Attacks
CNIT 124: Ch 9: Password Attacks
Password Hashing Algorithms
Hashing Passwords
• Three essential steps
– One-way hash function
• MD5, SHA-1, SHA-256, etc.
– Salt
• Random characters added to each password
• Prevents rainbow-table attack
– Stretching
• Repeat the hash function many times (typically
5000)
• Make it take 50 ms to calculate the hash
• Minimally slows login
• Makes attack MUCH slower
CNIT 124: Ch 9: Password Attacks
The Right Way
Popular Password Hashes
Type
Projected time to
crack 1,000 hashes*
Hash

Function
Salt

(# chars)
Stretching

(# rounds)
Drupal 7 1.7 years SHA-512 8 16385
Linux (Debian) 58 days SHA-512 8 5000
Wordpress 3.5.1 17 hours MD5 8 8193
Windows

(all current
versions)
5.4 min MD4 None 1
Joomla 4.6 min MD5 16 1
• Calculation assumes the passwords are found
in a dictionary of 500,000 guesses
• One virtual machine running Kali
• A clusters of GPUs would be much faster

More Related Content

PPT
Wireshark - presentation
PPT
Introduction to SSH
PDF
Linux basic commands with examples
PDF
Practical Malware Analysis: Ch 11: Malware Behavior
PDF
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
PDF
Ch 11: Hacking Wireless Networks
Wireshark - presentation
Introduction to SSH
Linux basic commands with examples
Practical Malware Analysis: Ch 11: Malware Behavior
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
Ch 11: Hacking Wireless Networks

What's hot (20)

PPTX
Linux shell env
PDF
66 pfsense tutorial
PPTX
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
PDF
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
DOCX
Ports and protocols
PPTX
Linux security introduction
PPTX
Intro to Docker November 2013
PPTX
Ddos attacks
PPTX
WLAN Attacks and Protection
PPTX
Ports and protocols
PDF
penetration test using Kali linux ppt
PPTX
Introduction 2 linux
ODP
Web Application Firewall
PDF
Course 102: Lecture 3: Basic Concepts And Commands
PDF
Open Vulnerability Assesment System (OpenVAS)
PPTX
Types Of Firewall Security
PPTX
Wireshark
PPTX
Operating system security
PPTX
Advanced ClearPass Workshop
PDF
CNIT 126 8: Debugging
Linux shell env
66 pfsense tutorial
Practical Malware Analysis: Ch 0: Malware Analysis Primer & 1: Basic Static T...
Practical Malware Analysis Ch 14: Malware-Focused Network Signatures
Ports and protocols
Linux security introduction
Intro to Docker November 2013
Ddos attacks
WLAN Attacks and Protection
Ports and protocols
penetration test using Kali linux ppt
Introduction 2 linux
Web Application Firewall
Course 102: Lecture 3: Basic Concepts And Commands
Open Vulnerability Assesment System (OpenVAS)
Types Of Firewall Security
Wireshark
Operating system security
Advanced ClearPass Workshop
CNIT 126 8: Debugging
Ad

Similar to CNIT 124: Ch 9: Password Attacks (20)

PDF
Defcon 25 Packet Hacking Village - Finding Your Way to Domain Access
PPTX
Share winter 2016 encryption
PDF
Attack All the Layers: What's Working during Pentests (OWASP NYC)
PDF
Attack All the Layers - What's Working in Penetration Testing
PDF
Attack All The Layers - What's Working in Penetration Testing
PPTX
Secure360 - Extracting Password from Windows
PDF
Cloud Data Encryption (Aluhut Edition) - 2019
PPTX
Why internal pen tests are still fun
PPTX
Extracting Credentials From Windows
PPT
14_526_topic07uuuuuuuuuuuuuuuuuuuuuu.ppt
PDF
Crypto Strikes Back! (Google 2009)
PPTX
Host Intrusion Detection like a Boss
PDF
The Google Chubby lock service for loosely-coupled distributed systems
PPTX
PDF
CNIT 126 13: Data Encoding
PDF
Bh eu 05-kaminsky
PDF
Bh eu 05-kaminsky
PPTX
Application and Server Security
PDF
Automatic tool for static analysis
PDF
Practical Malware Analysis Ch13
Defcon 25 Packet Hacking Village - Finding Your Way to Domain Access
Share winter 2016 encryption
Attack All the Layers: What's Working during Pentests (OWASP NYC)
Attack All the Layers - What's Working in Penetration Testing
Attack All The Layers - What's Working in Penetration Testing
Secure360 - Extracting Password from Windows
Cloud Data Encryption (Aluhut Edition) - 2019
Why internal pen tests are still fun
Extracting Credentials From Windows
14_526_topic07uuuuuuuuuuuuuuuuuuuuuu.ppt
Crypto Strikes Back! (Google 2009)
Host Intrusion Detection like a Boss
The Google Chubby lock service for loosely-coupled distributed systems
CNIT 126 13: Data Encoding
Bh eu 05-kaminsky
Bh eu 05-kaminsky
Application and Server Security
Automatic tool for static analysis
Practical Malware Analysis Ch13
Ad

More from Sam Bowne (20)

PDF
Introduction to the Class & CISSP Certification
PDF
Cyberwar
PDF
3: DNS vulnerabilities
PDF
8. Software Development Security
PDF
4 Mapping the Application
PDF
3. Attacking iOS Applications (Part 2)
PDF
12 Elliptic Curves
PDF
11. Diffie-Hellman
PDF
2a Analyzing iOS Apps Part 1
PDF
9 Writing Secure Android Applications
PDF
12 Investigating Windows Systems (Part 2 of 3)
PDF
10 RSA
PDF
12 Investigating Windows Systems (Part 1 of 3
PDF
9. Hard Problems
PDF
8 Android Implementation Issues (Part 1)
PDF
11 Analysis Methodology
PDF
8. Authenticated Encryption
PDF
7. Attacking Android Applications (Part 2)
PDF
7. Attacking Android Applications (Part 1)
PDF
5. Stream Ciphers
Introduction to the Class & CISSP Certification
Cyberwar
3: DNS vulnerabilities
8. Software Development Security
4 Mapping the Application
3. Attacking iOS Applications (Part 2)
12 Elliptic Curves
11. Diffie-Hellman
2a Analyzing iOS Apps Part 1
9 Writing Secure Android Applications
12 Investigating Windows Systems (Part 2 of 3)
10 RSA
12 Investigating Windows Systems (Part 1 of 3
9. Hard Problems
8 Android Implementation Issues (Part 1)
11 Analysis Methodology
8. Authenticated Encryption
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 1)
5. Stream Ciphers

Recently uploaded (20)

PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Hazard Identification & Risk Assessment .pdf
PDF
Trump Administration's workforce development strategy
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Indian roads congress 037 - 2012 Flexible pavement
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
A powerpoint presentation on the Revised K-10 Science Shaping Paper
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Cell Types and Its function , kingdom of life
PDF
Complications of Minimal Access Surgery at WLH
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Computing-Curriculum for Schools in Ghana
SOIL: Factor, Horizon, Process, Classification, Degradation, Conservation
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Chinmaya Tiranga quiz Grand Finale.pdf
Hazard Identification & Risk Assessment .pdf
Trump Administration's workforce development strategy
LDMMIA Reiki Yoga Finals Review Spring Summer
Weekly quiz Compilation Jan -July 25.pdf
Indian roads congress 037 - 2012 Flexible pavement
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
A powerpoint presentation on the Revised K-10 Science Shaping Paper
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Cell Types and Its function , kingdom of life
Complications of Minimal Access Surgery at WLH
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين

CNIT 124: Ch 9: Password Attacks