Authenticate Me
Total Page:16
File Type:pdf, Size:1020Kb
Authenticate Me The importance of passwords Nima khademi Thesis submitted for the degree of Master in Information security 60 credits Department of Informatics Faculty of mathematics and natural sciences UNIVERSITY OF OSLO Spring 2021 Authenticate Me The importance of passwords Nima khademi © 2021 Nima khademi Authenticate Me http://www.duo.uio.no/ Printed: Reprosentralen, University of Oslo Abstract Authentication is the process of verifying that an individual, entity, or web- site is who it claims to be. Authentication in the context of web applications is commonly performed by submitting a username or ID and one or more items of private information that only a given user should know. Passwords have become the universal remote control of our digital authentication, yet they are taken lightly by the users. In this essay, I want to examine how password policies correlate to different attacks. Understanding how different password policies can have different impacts on security with regards to being too strict or loose with its requirements. i ii Contents 1 Introduction 1 1.1 Brief History . 2 1.2 Motivation . 2 1.3 Problem Statement . 3 1.4 Structure of Thesis . 3 1.5 Research Method . 4 2 Background 5 2.1 Authentication Cycle . 5 2.1.1 Web Application . 5 2.1.2 Linux(Unix) . 6 2.1.3 Microsoft Windows . 8 2.2 Storing Passwords . 9 2.2.1 Plaintext . 9 2.2.2 Encrypted Passwords . 9 2.2.3 Hashed Passwords . 10 2.2.4 Multiple Iteration Hashes . 12 2.2.5 Salted Hashes . 13 2.2.6 Dynamically allocated salt . 13 2.3 Password cracking methods . 13 2.3.1 Brute Force . 14 2.3.2 Dictionary Attack . 16 2.3.3 Hybrid Attack . 16 2.3.4 Lookup Tables . 17 2.3.5 Rainbow Tables . 17 2.4 Obtaining Passwords . 17 2.4.1 Shoulder Surfing . 18 2.4.2 Keylogger . 18 2.4.3 Phishing Attack . 18 2.4.4 MITM (Man In The Middle) . 18 2.5 Common Safety Measures . 19 2.5.1 Creating Passwords . 19 2.5.2 Password Manager . 20 2.5.3 Enable Multifactor Authentication . 21 2.5.4 Protect Your Email . 22 2.6 Personal identification number (PIN) . 22 2.6.1 Patterns . 23 iii 3 Password Policy 25 3.1 Policy Criteria . 26 3.1.1 Password length . 27 3.1.2 Special characters . 27 3.1.3 Numerical characters . 27 3.1.4 Reusing passwords . 27 3.1.5 Time . 27 3.1.6 Uppercase/Lowercase . 28 3.1.7 Positional . 28 3.1.8 Login attempts . 28 3.1.9 Slowdowns . 28 3.1.10 Strength barometer . 28 3.1.11 Dictionary . 28 3.2 Policy examples . 28 3.3 Threats . 29 3.3.1 Brute force attack . 29 3.3.2 Offline attacks . 30 3.3.3 Known passwords . 30 3.4 Security vs Usability . 30 4 Password alternatives 41 4.1 Something the individual possesses . 42 4.1.1 Yubikey . 42 4.1.2 Cautions . 46 4.1.3 Beyond identity . 46 4.1.3.1 Making SSO more secure . 47 4.1.4 General pros and cons . 50 4.2 Something the individual is . 51 4.2.1 Taking biometrics to the next level with Windows Hello 51 4.2.2 General pros and cons . 52 4.3 Something the individual does . 53 4.3.1 Keystrokes . 53 4.3.2 Draw a secret . 54 5 Data analysis 57 5.1 Findings . 57 5.2 Q&A . 58 5.2.1 What are the characteristics of the passwords that are cracked first? . 58 5.2.2 What are your thoughts about the basic16 policy? . 59 5.2.3 Do you think basic16 presents the most difficult challenge in cracking passwords? . 60 5.2.4 To what extent do the criteria in a policy matter for your approach with regard to cracking passwords? And How do you alter your approach based on the criteria? More specifically, does the basic16 policy compared to the comprehensive8 policy change the way you start cracking passwords? . 60 iv 5.2.5 How do you calculate password entropy, is the Shannon calculation recommended? And how does this change your approach to cracking passwords? . 61 5.2.6 Do you see the “forgot password” function often used in exploitation? . 62 5.2.7 What alternatives do you see as the future of authen- tication? . 62 5.3 Experiment . 63 5.3.1 Results . 65 5.4 Discussion . 69 6 Conclusion 73 7 Future work 75 8 Terminology and Glossary 77 8.1 Password Strength . 77 8.2 Password characters . 77 8.3 Entropy . 77 8.4 Character classes . 78 v vi List of Figures 2.1 Web authentication process . 6 2.2 Entry from passwd file . 7 2.3 Entry from shadow file . 7 2.4 Linux authentication process . 8 2.5 Windows authentication process . 9 2.6 Symmetric key encryption . 10 2.7 Asymmetric key encryption . 10 2.8 Hash authentication process . 11 2.9 One way hash . 12 2.10 Different value hashes . 12 2.11 Multiple iteration hashing . 13 2.12 Salted hashing . 13 2.13 Main In The Middle Attack . 19 3.1 User experience . 32 3.2 User experience . 34 3.3 Character positions . 35 4.1 Biometric modalities . 42 4.2 Example of different Yubikeys . 43 4.3 Kerberos workflow overview . 48 4.4 Hierarchical chain of trust . 49 4.5 Mesh chain of trust . 49 4.6 Beyond identity flow . 50 4.7 4 step plan for Windows Hello . 52 5.1 Result of password analysis basic12 vs basic16 . 65 5.2 Result of password analysis basic12 starting with uppercase character and ending with a digit . 66 5.3 Result of password analysis basic12 starting with uppercase character or containing an uppercase character . 67 5.4 Result of password analysis basic12 ending with a digit or contain a digit . 68 5.5 Result of password analysis basic12 contain a special character 69 8.1 How to Calculate Password Entropy . 78 vii viii List of Tables 2.1 Hybrid dictionary . 17 2.2 Factors . 21 3.1 Attack resistance . 34 3.2 Policy A . 36 3.3 Policy B . 36 3.4 Policy used at UiO . 38 ix x Chapter 1 Introduction Computer security is often associated with three main areas. Confiden- tiality, is about ensuring resources are not read by others (read access), In- tegrity, which is about ensuring resources are not edited/changed by others (write access), and Availability, which is about ensuring the resources are accessible. This is often abbreviated to the CIA model. In the authentica- tion process still, the most common way is by providing a username and password. This can be seen as a two-step process • Identification - who you are (username) • Authentication - proving you are who you claim to be (password) Proving user identity is usually done by using one or more of the fol- lowing four means, something the individual knows (e.g. password, PIN, answers to pre-arranged questions), something the individual possesses (token, e.g. smart-card, electronic key-card, physical key), something the individual is (static biometrics, e.g. fingerprint, retina, face), and something the individual does (dynamic biometrics, e.g. voice pattern, handwriting, typing rhythm). Of these four means, passwords are the most used. Passwords are there- fore an important personal security entity that needs to be chosen with some prerequisites in mind. There are many attempts to set password poli- cies to help users pick a more secure password. Policies that set rules for how many characters a password can have, some minimum requirements for characters both special and regular to be included, and so on. Yet pass- word cracking is still a major problem. In these big data times, we have a vast amount of different data that can help us understand the different ways passwords are being used by regular users. How users react to poli- cies that differentiate between the level of security that is taken into con- sideration. The key for system administrators is to find a.