Password cracking.

Slides:



Advertisements
Similar presentations
Module XIV SQL Injection
Advertisements

Password Cracking With Rainbow Tables
Use of a One-Way Hash without a Salt
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
1 Counter-measures Threat Monitoring Cryptography as a security tool Encryption Digital Signature Key distribution.
NAVY Research Group Department of Computer Science Faculty of Electrical Engineering and Computer Science VŠB-TUO 17. listopadu Ostrava-Poruba.
Hash functions a hash function produces a fingerprint of some file/message/data h = H(M)  condenses a variable-length message M  to a fixed-sized fingerprint.
Chapter 4  Hash Functions 1 Overview  Cryptographic hash functions are functions that: o Map an arbitrary-length (but finite) input to a fixed-size output.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
1 Day 04- Cryptography Acknowledgements to Dr. Ola Flygt of Växjö University, Sweden for providing the original slides.
Presentation on Black Hat Windows 2000 Security Conference Analysis of Microsoft Office password protection system, and survey.
1 Message Authentication and Hash Functions Authentication Requirements Authentication Functions Message Authentication Codes Hash Functions Security of.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptanalysis. The Speaker  Chuck Easttom  
History and Background Part 1: Basic Concepts and Monoalphabetic Substitution CSCI 5857: Encoding and Encryption.
Nothing is Safe 1. Overview  Why Passwords?  Current Events  Password Security & Cracking  Tools  Demonstrations Linux GPU Windows  Conclusions.
NAVY Research Group Department of Computer Science Faculty of Electrical Engineering and Computer Science VŠB-TUO 17. listopadu Ostrava-Poruba.
Password Management. Password Protection Virtually all multiuser systems require that a user provide not only a name or identifier (ID) but also a password.
Time-Memory tradeoffs in password cracking 1. Basic Attacks Dictionary attack: –What if password is chosen well? Brute Force (online version): –Try all.
Hash Functions A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value h = H(M) Principal object is.
Slides by Kent Seamons and Tim van der Horst Last Updated: Nov 30, 2011.
Dan Johnson. What is a hashing function? Fingerprint for a given piece of data Typically generated by a mathematical algorithm Produces a fixed length.
CIS 450 – Network Security Chapter 8 – Password Security.
Passwords. Outline Objective Authentication How/Where Passwords are Used Why Password Development is Important Guidelines for Developing Passwords Summary.
Brute Force Password Cracking and its Role in Penetration Testing Andrew Keener and Uche Iheadindu.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
RADIUS Shared Secret Security Amplification A practical approach to improved security draft-funk-radiusext-shared-secret-amp-00.txt.
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 2 – Cryptographic.
Password authentication Basic idea –User has a secret password –System checks password to authenticate user Issues –How is password stored? –How does system.
Dr. Reuven Aviv, Nov 2008 Conventional Encryption 1 Conventional Encryption & Message Confidentiality Acknowledgements for slides Henric Johnson Blekinge.
6fb52297e004844aa81be d50cc3545bc Hashing!. Hashing  Group Activity 1:  Take the message you were given, and create your own version of hashing.  You.
Lecture 8 Overview. Secure Hash Algorithm (SHA) SHA SHA SHA – SHA-224, SHA-256, SHA-384, SHA-512 SHA-1 A message composed of b bits.
Mitch Parks, GSEC/GCWN ITS Desktop Security Analyst
How Safe are They?. Overview Passwords Cracking Attack Avenues On-line Off-line Counter Measures.
Slides by Kent Seamons and Tim van der Horst Last Updated: Nov 30, 2011.
Every computer along the path of your data can see what you send and receive. USERNAMES and PASSWORDS  Username can be assigned to you eg. Student ID.
Password Security. Overview What are passwords, why are they used? Different types of attacks Bad password practices to avoid Good password practices.
What do you know about password? By Guang Ling Oct. 8 th,
CNIT 124: Advanced Ethical Hacking Ch 9: Password Attacks.
Identification Authentication. 2 Authentication Allows an entity (a user or a system) to prove its identity to another entity Typically, the entity whose.
Chapter 1 – Introduction Part 4 1. Message Authentication Codes Allows for Alice and Bob to have data integrity, if they share a secret key. Given a message.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 9 1COMP9321, 15s2, Week.
PZAPR Parallel Zip Archive Password Recovery CSCI High Perf Sci Computing Univ. of Colorado Spring 2011 Neelam Agrawal Rodney Beede Yogesh Virkar.
Hash Functions Ramki Thurimella. 2 What is a hash function? Also known as message digest or fingerprint Compression: A function that maps arbitrarily.
Password. On a Unix system without Shadow Suite, user information including passwords is stored in the /etc/passwd file. Each line in /etc/passwd is a.
"Using An Enhanced Dictionary to Facilitate Auditing Techniques Related to Brute Force SSH and FTP Attacks" Ryan McDougall St. Cloud State University
SCSC 455 Computer Security Chapter 3 User Security.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
But first… some key terms…  Hash – Output string from a cryptographic hashing function that is hopefully impossible to go backwards to original input.
1 Cryptography Troy Latchman Byungchil Kim. 2 Fundamentals We know that the medium we use to transmit data is insecure, e.g. can be sniffed. We know that.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
CSCI 530 Lab Passwords. Overview Authentication Passwords Hashing Breaking Passwords Dictionary Hybrid Brute-Force Rainbow Tables Detection.
 Encryption provides confidentiality  Information is unreadable to anyone without knowledge of the key  Hashing provides integrity  Verify the integrity.
By Collin Donaldson Man in the Middle Attack: Password Sniffing and Cracking.
MIGHTY CRACKER Chris Bugg Chris Hamm Jon Wright Nick Baum We could consider using the Mighty Cracker Logo located in the Network Folder.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Cryptographic Hash Function
CS 465 PasswordS Last Updated: Nov 7, 2017.
Crypto 101 & Password Cracking
ICS 454 Principles of Cryptography
PHP: Security issues FdSc Module 109 Server side scripting and
Encryption and Decryption
Kiran Subramanyam Password Cracking 1.
Storing Information Each memory cell stores a set number of bits (usually 8 bits, or one byte) (byte addressable)
ICS 454 Principles of Cryptography
Elections Choose wisely, this is your chance to prove if election by popular vote works or not.
Exercise: Hashing, Password security, And File Integrity
Presentation transcript:

Password cracking

Password cracking From the cryptanalysis and computer security point of view, password cracking is the process of recovering passwords from data that have been stored in or transmitted by a computer system The purpose of password cracking might be Help a user to recover a forgotten password Gain unauthorized access to a system Preventive measurement of password strength

Password strength Is a measure of the effectiveness of a password in resisting guessing and brute-force attacks There are two factors to consider in determining password strength The average number of guesses the attacker must test to find the correct password Length of the password Size of the character and/or symbol set The ease with which an attacker can check the validity of each guessed password How is the password stored and used

Password strength A way to reduce this risk is to store only a cryptographic hash of each password instead of the plain-text password

Hash functions A cryptographic hash function is a hash function which is considered practically impossible to invert Invert means to recreate the input data from its hash value alone The input data is often called the message, and the hash value is often called the message digest or simply the digest

Hash function Digest Hash function Message password passwOrd MD5 5f4dcc3b5aa765d61d8327deb882cf99 505162a3e704d0d0fa2197e0c1dada38

Hash function The ideal cryptographic hash function properties are: It is easy to compute the hash value for a given message It is infeasible to generate a message that has a given hash It is infeasible to modify a message without changing the hash It is infeasible to find two different messages with the same hash A minor change in the input message causes significantly different hash

Hash function Algorithm Output size [bits] Max message size Operations MD5 128 264 − 1 add mod 232, and, or, xor, rot SHA-1 160 SHA-256 256 add mod 232, and, or, xor, shr, rot SHA3-512 512 ∞ and, xor, not, rot

Password cracking – Brute force Ordinary desktop computers can test over a hundred million passwords per second using password cracking tools that run on a CPU And billions of passwords per second using GPU-based password cracking tools A user-selected eight-characters long password with numbers, mixed case, and symbols, reaches an estimated 30-bit strength 230 is only one billion permutations and would take an average of 35 minutes to crack

Password cracking – Brute force Numerals 0123456789 Length Combinations Home PC Work station Botnet 2 100 Instant 3 1000 4 10,000 5 100,000 6 1 Million 7 10 Million 8 100 Million 10 Seconds 9 1000 Million 1½ Mins

Password cracking – Brute force Upper Case Alpha ABCDEFGHIJKLMNOPQRSTUVWXYZ Lower Case Alpha abcdefghijklmnopqrstuvwxyz Length Combinations Home PC Work station Botnet 2 676 Instant 3 17,576 4 456,976 5 11.8 Million 6 308.9 Million 30 Secs 3 Secs 7 8 Billion 13 Mins 1¼ Mins 8 Secs 8 200 Billion 348 Mins 35 Mins 3½ Mins 9 5.4 Trillion 6¼ Days 15 Hours 1½ Hours 10 141 Trillion 163 Days 16 Days 39¼ Hours 12 95 Quadrillion 302 Years 30 Years 3 Years 15 1.6 Sextillion 5 Million years 531,855 Years 53,185 Years 20 19.9 Octillion 63.1 Trillion years 6.3 Trillion years 631 Billion years

Password cracking – Brute force Mixed Alpha, Numerals & Symbols 0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz <SP>!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ Length Combinations Home PC Work station Botnet 2 9,216 Instant 3 884,736 4 85 Million 8½ Secs 5 8 Billion 13½ Mins 1¼ Mins 8 Secs 6 782 Billion 22 Hours 2 Hours 13 Mins 7 75 Trillion 87 Days 8½ Days 20 Hours 8 7.2 Quadrillion 23 Years 2¼ Years 83½ Days

Password cracking – Brute force

Password cracking – Dictionary attack A dictionary attack uses a targeted technique of successively trying all the words in an exhaustive list called a dictionary (pre-arranged list of words) In contrast with a brute force attack, where a large proportion key space is searched systematically, a dictionary attack tries only those possibilities which are most likely to succeed Dictionary attacks succeed because many people chooses short passwords (7 characters or fewer), such as single words found in dictionaries or simple, easily predicted variations on words, such as appending a digit

Password cracking – Dictionary attack To speed up the attack it is useful to pre-compute a list of hashes as a key from the dictionary The pre-computed dictionary (Rainbow table) need only be generated once (password hashes can be looked up almost instantly at any time to find the corresponding password)

Password cracking – Dictionary attack Rainbow tables Character Set Length Table Size ABCDEFGHIJKLMNOPQRSTUVWXYZ 14 0.6 GB ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 3 GB ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+= 24 GB ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_+=~`[]{}|\:;"'<>,.?/ 64 GB

Demo - Tools Hosted web application (DVWA) Kali linux – Hashcat Password dictionary

Demo If you remember the SQL Injection tutorial, we have obtained a list of usernames and passwords form the DVWA application username: admin, password: 5f4dcc3b5aa765d61d8327deb882cf99 username: gordonb, password: e99a18c428cb38d5f260853678922e03 username: 1337, password: 8d3533d75ae2c3966d7e0d4fcc69216b username: pablo, password: 0d107d09f5bbe40cade3de5c71e9e9b7 username: smithy, password: 5f4dcc3b5aa765d61d8327deb882cf99

Demo – brute force Start Kali linux Open terminal and get hashcat help root@kali:~# hashcat –help Hashcat usage hashc at [options] hashfile [mask|wordfiles|directories] See available options --hash-type=NUM 0 = MD5 100 = SHA1 200 = MySQL

Demo – brute force --attack-mode=NUM --threads=NUM 0 = Straight 1 = Combination 2 = Toggle-Case 3 = Brute-force 4 = Permutation 5 = Table-Lookup --threads=NUM --pw-min=NUM , --pw-max=NUM

Demo – brute force --custom-charset1=CS (usable in mask ?1?2?3) ?l = abcdefghijklmnopqrstuvwxyz ?u = ABCDEFGHIJKLMNOPQRSTUVWXYZ ?d = 0123456789 ?s = !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ ?a = ?l?u?d?s e.g. --custom-charset1=?l?d --outfile=FILE

Demo – brute force Before we begin the attack itself, start CPU meter conky root@kali:~# conky Create input text file with password hashes root@kali:~# gedit /root/Desktop/hashes.txt

Demo – brute force Hashcat example 1 hashcat --hash-type=0 --attack-mode=3 --threads=32 /root/Desktop/hashes.txt ?l?l?l --outfile=/root/Desktop/hashes_cracked.txt --hash-type=0 means that source hashes are of MD5 type --attack-mode=3 means brute force attack threads=32 means that brute force will use 32 threads /root/Desktop/hashes.txt is source files with hashes ?l?l?l means password mask (we are looking for 3 characters long password consisting of lowercase letters) --outfile=/root/Desktop/hashes_cracked.txt is output file

Demo – brute force Hashcat example 2 hashcat –m 0 –a 3 –n 32 /root/Desktop/hashes.txt --custom-charset1=?l?d ?l?l?l?d?d?1 –o /root/Desktop/hashes_cracked.txt --custom-charset1=?l?d defines custom charset (?1) consisting of lower case characters (?l) and numbers (?d) l?l?l?d?d?1 this mask means that we are looking for passwords consisting of 3 lower case letters (3x?l) followed by 2 numbers (2x?d) and the last character (1x?1) is from set defined by --custom-charset1

Demo – brute force Hashcat example 2

Demo – brute force Hashcat example 3 hashcat –m 0 –a 3 –n 32 /root/Desktop/hashes.txt -–pw-min=7 ?l?l?l?l?l?l?l –o /root/Desktop/hashes_cracked.txt -–pw-min=7 means that we will start with 7 characters long passwords (we will skip 1-6 characters long passwords) ?l?l?l?l?l?l?l – this mask means that we are looking for passwords consisting of 7 lower case letters

Demo – brute force Hashcat example 3

Demo – dictionary attack We will use the rockyou.txt dictionary root@kali:~# cp /root/rockyou.txt /root/Desktop/dic.txt root@kali:~# vim /root/Desktop/dic.txt To close vim type :q<ENTER>

Demo – dictionary attack Hashcat example 4 hashcat –m 0 –a 0 /root/Desktop/hashes.txt /root/Desktop/dic.txt –o /root/Desktop/hashes_cracked.txt –a 0 means that we will do straight (dictionary) attack /root/Desktop/dic.txt is text file containing word list using by dictionary attack

Demo – dictionary attack Hashcat example 4

References DVWA - http://www.dvwa.co.uk/ http://www.sha1-online.com/ http://scrapmaker.com/view/dictionaries/rockyou.txt HACKING EXPOSED (ISBN: 978-0-07-161375-0) Penetration testing (ISBN-10: 1-59327-564-1) Principles of Computer Security (ISBN: 978-0-07-174857-5)

Warning Hacking is illegal because it is getting into a system another person owns. If you wanted to do legal hacking then you would have to own the system.