Evaluation of Password Hashing Schemes in Open Source Web
Total Page:16
File Type:pdf, Size:1020Kb
Evaluation of Password Hashing Schemes in Open Source Web Platforms Christoforos Ntantogian, Stefanos Malliaros, Christos Xenakis Department of Digital Systems, University of Piraeus, Piraeus, Greece {dadoyan, stefmal, xenakis}@unipi.gr Abstract: Nowadays, the majority of web platforms in the Internet originate either from CMS to easily deploy websites or by web applications frameworks that allow developers to design and implement web applications. Considering the fact that CMS are intended to be plug and play solutions and their main aim is to allow even non-developers to deploy websites, we argue that the default hashing schemes are not modified when deployed in the Internet. Also, recent studies suggest that even developers do not use appropriate hash functions to protect passwords, since they may not have adequate security expertise. Therefore, the default settings of CMS and web applications frameworks play an important role in the security of password storage. This paper evaluates the default hashing schemes of popular CMS and web application frameworks. First, we formulate the cost time of password guessing attacks and next we investigate the default hashing schemes of popular CMS and web applications frameworks. We also apply our framework to perform a comparative analysis of the cost time between the various CMS and web application frameworks. Finally, considering that intensive hash functions consume computational resources, we analyze hashing schemes from a different perspective. That is, we investigate if it is feasible and under what conditions to perform slow rate denial of service attacks from concurrent login attempts. Through our study we have derived a set of critical observations. The conjecture is that that the security status of the hashing schemes calls for changes with new security recommendations and updates to the default security settings. Keywords: Passwords, CMS, Web application frameworks, Guessing attacks, Hashing schemes 1 Introduction Several corporates [1] have become victims of security breaches, resulting in the disclosure of billions of passwords. One of the most significant data breaches during 2016 disclosed a database containing 1 billion users’ authentication details [2], and was put on sale for 300.000 dollars [3], while one of the biggest data breaches during 2017 included 145.5 million users’ details. Hackers take advantage of the computing power of graphics processing units (GPU) and specialized hardware to crack the users’ passwords. Although the price of top tier graphics cards is relatively high (e.g., 2999$ for an NVIDIA TITAN V [4]), hackers can also rent cloud infrastructure including dedicated GPUs for a monthly or pay-as-you-go price (e.g. Google rents a GPU for maximum 2.55$ per hour [5]), making password guessing attacks easier and faster to perform. To counteract the increasing efficiency of such attacks, key derivation functions such as PBKDF2 and BCRYPT use repeated iterations of the employed hash function to slow down the execution time of password hashing, and subsequently increase the effort required by an attacker to perform password guessing attacks. Moreover, memory hard functions (MHF), such as SCRYPT, use the physical memory as much as possible to significantly increase the costs required to crack a password. While there is a significant body of research that analyze the security of hash functions or propose new password cracking techniques, we have pinpointed 1 that the security of the default hashing schemes in Content Management Systems (CMS) and web application frameworks has been neglected. Nowadays, the majority of web platforms originate either from CMS to easily deploy websites or by web applications frameworks that allow developers to design and implement web applications. WordPress alone stands for 31.3% of all websites in the internet. Considering the fact that CMS are intended to be plug and play solutions and their main aim is to allow even non-developers to deploy websites, we argue that the default settings including the hash functions are not modified. Also, recent studies [6] suggest that even developers do not use appropriate hash functions to protect passwords, since they may not have adequate security expertise. Therefore, the default settings of CMS and web applications frameworks play an important role in the security of password storage. This paper evaluates the security of the default hashing schemes of popular CMS and web application frameworks. To this end, we propose a simple framework that allows us to quantify the cost time for password cracking. The proposed framework takes into account all parameters that influence password guessing attacks and considers both brute force and dictionary attacks. To put our framework into a practical context and derive numerical results, we use as input the default hashing schemes of popular CMS and web applications frameworks. For this reason, first we identify and analyze the default hashing schemes of CMS and web applications frameworks. We have discovered that many CMS use outdated hash functions, arbitrary number of hash iterations, lack of password policies and salt. For example, the popular WordPress still uses MD5 with low number of hash iterations. Subsequently, we apply our cost analysis framework to perform a comparative analysis between the CMS and application frameworks which allows us to deduce a set of critical observations. Next, considering that intensive hash functions consume computational resources, we analyze hashing schemes from a different perspective. That is, we investigate if it is feasible and under what conditions to perform slow rate denial of service attacks from concurrent login attempts. Lastly, we propose security practices and alternative solutions to enhance the overall security of passwords. Overall, the contributions of this paper are the following: • We propose a framework to estimate the cost time of brute force and dictionary password guessing attacks. • We pinpoint the default hashing schemes of the most commonly used CMS and web application frameworks and we derive a set of critical observations. • We apply our framework to the CMS and web application frameworks that allows us to perform a comparative analysis by quantifying the cost time of cracking a password. • We investigate the feasibility of slow rate denial of service attacks based on intensive hash functions. • Finally, we discuss and propose best practices and alternative solutions to improve the security of password storage. The rest of this paper is organized as follows. Section 2 presents the required background knowledge and the related work while section 3 analyzes the various hashing schemes. Section 4 proposes a cost time analysis framework for brute force and dictionary attacks, while section 5 evaluates the default hashing schemes of CMS and web application frameworks. Section 0 performs a comparative analysis of the cost time of CMS and web applications frameworks, while section 7 examines the feasibility of denial of service attacks based on intensive hashing schemes. Section 8 discuss recommendations and possible solutions, and, lastly, section 9 contains the conclusions. 2 2 Background and Related Work 2.1 Password guessing attacks Password guessing (also known as password cracking) is an attack in which an adversary attempts to guess the users’ password. We distinguish two password guessing attacks categories: i) Online and ii) Offline. In online attacks, an attacker can try to login to a website by selecting frequently used passwords. After a number of unsuccessful attempts, the IP address or the username that the attacker is trying to login can be locked. On the other hand, in an offline attack, the scenario is that an attacker has in her possession a database of users’ password hash values and she can attempt to crack each user’s password offline by comparing the hashes of likely password guesses with the stolen hash value. Because the attacker can check each guess offline it is no longer possible to lockout the adversary after several incorrect guesses. In this paper we consider offline attacks. Moreover, we can classify password guessing attacks to three categories: i) brute force ii) dictionary and iii) rainbow tables. In a brute force attack, the adversary tries every possible password combination considering two parameters; a) the password length; and b) the character set. On the other hand, in a dictionary attack, the adversary uses passwords from a list, which are likely to be used as passwords by users. There are four types of dictionary attacks: i) pure ii) Probabilistic Context Free Grammar (PCFG) based [7], iii) Markov model based [8] and iv) mangling rules [9]. In the pure dictionary, the attacker simply uses a set of predefined words as candidate passwords. In the second type, PCFG theories are used to construct a dictionary containing modified passwords with assigned probabilities. In the third type, Markov-based models are applied to create candidate passwords based on the probability distribution over sequences of characters. In the fourth type (i.e., mangling rules), the attacker creates password variations from a dictionary by applying various modifications rules, such as “add the symbol ! at the end of the password”. Finally, the third category of guessing attacks is rainbow tables, in which the attacker uses a precomputed list to reverse the hash value. In this paper, the term password guessing (or cracking), unless stated otherwise, refers specifically to