User Authentication
User Authentication
CONTENT
✓ USER AUTHENTICATION
✓ MEANS OF USER AUTHENTICATION
✓ PASSWORD –BASED AUTHENTICATION
✓ PASSWORD VULNERABILITIES
✓ USE OF HASHED PASSWORDS-IN UNIX
✓ PASSWORD CRACKING TECHNIQUES
✓ USING BETTER PASSWORDS
✓ PASSWORS FILE ACCESS CONTROL
✓ TOKEN BASED AUTHENTICATION
✓ BIOMETRIC AUTHENTICATION
✓ REMOTE USER AUTHENTICATION
✓ SECURITY ISSUES FOR USER AUTHENTICATION.
About the topic…….
Answers to
A personal a
A password, identification prearranged
number, set of
questions.
• Fingerprint,
Recognition
by
• Retina,
• Face.
• Voice pattern,
Recognition
by
• Handwriting characteristics,
• Typing rhythm.
Biometric
Token-Based Authentication.
Password-Based Authentication.
Authentication.
1.Password-Based Authentication.
->It is a widely used line of defense against intruders.
->Virtually all multiuser systems not only require the user
name or identifier (ID) but also the password.
Salt Password
Slow hash
function
Password file
b) Verifying a password
select
Slow hash
Password file
function
compare
Use of Hashed Passwords
UNIX Implementations…
• Each user selects a password of up to eight printable
characters in length. This is converted into a 56-bit value
that serves as the key input to an encryption routine.
• The hash routine, known as crypt(3), is based on DES.
• A 12-bit salt value is used.
• The modified DES algorithm is executed with a data input
consisting of a 64-bit block of zeros.
• The output of the algorithm then serves as input for a
second encryption. This process is repeated for a total of 25
encryptions.
• The resulting 64-bit output is then translated into an 11-
character sequence. The modification of the DES algorithm
converts it into a one-way hash function.
• The crypt(3) routine is designed to discourage guessing
attacks.
UNIX Implementation
• original scheme
– 8 character password form 56-bit key
– 12-bit salt used to modify DES encryption into a
one-way hash function
– 0 value repeatedly encrypted 25 times
– output translated to 11 character sequence
• now regarded as woefully insecure
– e.g. supercomputer, 50 million tests, 80 min
• sometimes still used for compatibility
• Since the original development of UNIX, most implementations have
relied on the following password scheme. Each user selects a password
of up to eight printable characters in length. This is converted into a 56-
bit value (using 7-bit ASCII) that serves as the key input to an encryption
routine. The hash routine, known as crypt(3), is based on DES. A 12-bit
salt value is used. The modified DES algorithm is executed with a data
input consisting of a 64-bit block of zeros. The output of the algorithm
then serves as input for a second encryption. This process is repeated
for a total of 25 encryptions. The resulting 64-bit output is then
translated into an 11-character sequence. The modification of the DES
algorithm converts it into a one-way hash function, designed to
discourage guessing attacks. Software implementations of DES are slow
compared to hardware versions, and the use of 25 iterations multiplies
the time required by 25. This particular implementation is now
considered woefully inadequate. . [PERR03] reports the results of a
dictionary attack using a supercomputer. The attack was able to process
over 50 million password guesses in about 80 minutes. Further, the
results showed that for about $10,000 anyone should be able to do the
same in a few months using one uniprocessor machine. Despite its
known weaknesses, this UNIX scheme is still often required for
compatibility with existing account management software or in multi-
vendor environments.
Improved Implementations
• have other, stronger, hash/salt variants
• many systems now use MD5
– with 48-bit salt
– password length is unlimited
– is hashed with 1000 times inner loop
– produces 128-bit hash
• OpenBSD uses Blowfish block cipher based
hash algorithm called Bcrypt
– uses 128-bit salt to create 192-bit hash value
• There are other, much stronger, hash/salt schemes available for UNIX.
FreeBSD is an open source UNIX implementation that is widely used.
The recommended hash function for many UNIX systems, including
Linux, Solaris, and FreeBSD, is based on the MD5 secure hash
algorithm (which is similar to, but not as secure as SHA-1). The MD5
crypt routine uses a salt of up to 48 bits and effectively has no
limitations on password length. It produces a 128-bit hash value. It is
also far slower than crypt(3). To achieve the slowdown, MD5 crypt
uses an inner loop with 1000 iterations. Probably the most secure
version of the UNIX hash/salt scheme was developed for OpenBSD,
another widely used open source UNIX. This scheme, reported in
[PROV99], uses a hash function based on the Blowfish symmetric
block cipher. The hash function, called Bcrypt,is quite slow to execute.
Bcrypt allows passwords of up to 55 characters in length and requires
a random salt value of 128 bits, to produce a 192-bit hash value.
Bcrypt also includes a cost variable; an increase in the cost variable
causes a corresponding increase in the time required to perform a
Bcyrpt hash. The cost assigned to a new password is configurable, so
that administrators can assign a higher cost to privileged users.
• The traditional approach to password guessing, or password cracking as
it is called, is to develop a large dictionary of possible passwords and to
try each of these against the password file. This means that each
password must be hashed using each available salt value and then
compared to stored hash values. If no match is found, then the cracking
program tries variations on all the words in its dictionary of likely
passwords. Such variations include backward spelling of words,
additional numbers or special characters, or sequence of characters, An
alternative is to trade off space for time by precomputing potential hash
values. In this approach the attacker generates a large dictionary of
possible passwords. For each password, the attacker generates the hash
values associated with each possible salt value. The result is a mammoth
table of hash values known as a rainbow table. For example, [OECH03]
showed that using 1.4 GB of data, he could crack 99.9% of all
alphanumeric Windows password hashes in 13.8 seconds. This approach
can be countered by using a sufficiently large salt value and a sufficiently
large hash length. Both the FreeBSD and OpenBSD approaches should be
secure from this attack for the foreseeable future.
Proactive Password Checking
• rule enforcement plus user advice, e.g.
– 8+ chars, upper/lower/numeric/punctuation
– may not suffice
• password cracker
– time and space issues
• Markov Model
– generates guessable passwords
– hence reject any password it might generate
• Bloom Filter
– use to build table based on dictionary using hashes
– check desired password against this table
▪ Now look at possible approaches to proactive password checking.
▪ The first approach is a simple system for rule enforcement coupled
with advice to the user, e.g:
▪ All passwords must be at least eight characters long.
▪ In the first eight characters, the passwords must include at least one
each of uppercase, lowercase, numeric digits, and punctuation marks.
▪ Another method is to compile a large dictionary of possible
“bad”passwords. When a user selects a password, the system runs a
Password Cracker to make sure that it is not on the disapproved list.
This still consumes significant time and space.
▪ Use a Markov Model for the generation of guessable passwords, and
reject any passwords likely to be generated by the model .
▪ Use a Bloom filter, which is a set of k independent hash functions
which map a password into a set of hash values in the range 0 … N–1.
These are used to set bits in a lookup table of size N. When a new
password is presented to the checker, its k hash values are calculated.
If all the corresponding bits of the hash table are equal to 1, then the
password is rejected. All passwords in the dictionary will be rejected.
But there will also be some other “false positives”
Countermeasures
• stop unauthorized access to password file
• intrusion detection measures
• account lockout mechanisms
• policies against using common passwords but
rather hard to guess passwords
• training & enforcement of policies
• automatic workstation logout
• encrypted network links
Countermeasures
• Countermeasures Found in Each Layer Security
countermeasures are the controls used to protect
the confidentiality, integrity, and availability of data
and information systems. There is a wide array of
security controls available at every layer of the stack.
Overall security can be greatly enhanced by adding
additional security measures, removing unneeded
services, hardening systems, and limiting access
Countermeasures
• Countermeasures against the listed vulnerabilities include
controls to: prevent unauthorized access to the password
file, intrusion detection measures to identify a
compromise, rapid re-issuance of passwords should the
password file be compromised; account lockout
mechanism which locks out access to the account after a
number of failed login attempts; policies to inhibit the
selection by users of common passwords; training in and
enforcement of password policies that make passwords
difficult to guess; automatically logging the workstation
out after a period of inactivity; a policy that forbids the
same or similar password on particular network devices;
encrypted communications links.
• A widely used password security technique is the use of hashed passwords and a salt
value. This scheme is found on virtually all UNIX variants as well as on a number of other
operating systems. The procedure shown here in Figure 3.1a from the text is used. To load
a new password into the system, the user selects or is assigned a password.This password
is combined with a fixed-length salt value (so the same user password can create multiple
hash values, depending on which salt is used. to make attacks harder). In older
implementations, the salt is related to the time the password is assigned to the user.
Newer implementations use a pseudorandom or random number. The password and salt
serve as inputs to a hashing algorithm to produce a fixed-length hash code. The hash
algorithm is designed to be slow to execute to thwart attacks. The hashed password is
then stored, together with a plaintext copy of the salt, in the password file for the
corresponding user ID. The hashed-password method has been shown to be secure
against a variety of cryptanalytic attacks. When a user attempts to log on to a system, the
user provides an ID and a password (as shown in Figure 3.1b). The operating system uses
the ID to index into the password file and retrieve the plaintext salt and the encrypted
password. The salt and user-supplied password are used as input to the encryption
routine. If the result matches the stored value, the password is accepted. There are two
threats to this password scheme. First, a user can gain access on a machine using a guest
account or by some other means and then run a password guessing program, called a
password cracker, on that machine. In addition, if an opponent is able to obtain a copy of
the password file, then a cracker program can be run on another machine at leisure. This
enables the opponent to run through millions of possible passwords in a reasonable
period.
Password File Access Control
• can block offline guessing attacks by denying
access to encrypted passwords
– make available only to privileged users
– often using a separate shadow password file
• still have vulnerabilities
– exploit O/S bug
– accident with permissions making it readable
– users with same password on other systems
– access from unprotected backup media
– sniff passwords in unprotected network traffic
• One way to thwart a password attack is to deny the
opponent access to the password file. If the hashed password
portion of the file is accessible only by a privileged user, then
the opponent cannot read it without already knowing the
password of a privileged user. Often, the hashed passwords
are kept in a separate file from the user IDs, referred to as a
shadow password file. Special attention is paid to making the
shadow password file protected from unauthorized access.
Although password file protection is certainly worthwhile,
there remain vulnerabilities: a hacker may be able to exploit
a software vulnerability in the operating system to bypass the
access control system long enough to extract the password
file; an accident of protection might render the password file
readable; some users may use the same password on other
less protected or compromised machines; a lack of or
weakness in physical security (e.g. of backups) may provide
opportunities for a hacker to access a copy of the file;
passwords may be captured by sniffing network traffic.
2.Token-based authentication.
Drawbacks are….
➢ One of the most recent and most advanced eID deployments is the German
eID card neuer Personalausweis [POLL12]. The card has human-readable data
printed on its surface, including the following:
➢ Personal data: Such as name, date of birth, and address; this is the type of
printed information found on passports and driver’s licenses.
iris
hand
retina
signature
cost
face finger
voice
accuracy
Biometric Accuracy
• can plot characteristic curve
• pick threshold balancing error rates
• In any biometric scheme, some physical characteristic of the individual is
mapped into a digital representation. For each individual, a single digital
representation, or template, is stored in the computer. When the user is to be
authenticated, the system compares the stored template to the presented template.
Given the complexities of physical characteristics, we cannot expect that there
will be an exact match between the two templates. Rather, the system uses an
algorithm to generate a matching score (typically a single number) that quantifies
the similarity between the input and the stored template. Figure 3.8 illustrates the
dilemma posed to the system. If a single user is tested by the system numerous
times, the matching score swill vary, with a probability density function typically
forming a bell curve, as shown. On average, any other individual should have a
much lower matching score but again will exhibit a bell-shaped probability
density function .The difficulty is that the range of matching scores produced by
two individuals, one genuine and one an imposter, compared to a given reference
template, are likely to overlap. In Figure 3.8 a threshold value is selected so that
if the presented value is s>=t then a match is assumed, and for s< t, a mismatch is
assumed. The shaded part to the right of t indicates a range of values for which a
false match is possible, and the shaded part to the left indicates a range of values
for which a false nonmatch is possible. The area of each shaded part represents to
probability of a false match or nonmatch, respectively. By moving the threshold,
left or right, the probabilities can be altered, but note that an decrease in false
match rate necessarily results in an increase in false nonmatch rate, and vice
versa.
Remote User Authentication
• authentication over network more complex
– problems of eavesdropping, replay
• generally use challenge-response
– user sends identity
– host responds with random number
– user computes f(r,h(P)) and sends back
– host compares value from user with own
computed value, if match user authenticated
• protects against a number of attacks
Remote User Authentication
73
Authentication Security Issues
• client attacks
• host attacks
• eavesdropping
• replay
• trojan horse
• denial-of-service
Eavesdropping
Adversary attempts to
learn the password by
some sort of attack that
involves the physical Host Attacks
Denial-of-Service proximity of user and
adversary Directed at the user file
Attempts to disable a at the host where
user authentication passwords, token
service by flooding the passcodes, or biometric
service with numerous templates are stored
authentication attempts
75
Client attacks are those in which an adversary attempts to achieve user
authentication without access to the remote host or to the intervening communications
path. The adversary attempts to masquerade as a legitimate user. For a password-based
system, the adversary may attempt to guess the likely user password. Multiple guesses
may be made. At the extreme, the adversary sequences through all possible passwords in
an exhaustive attempt to succeed. One way to thwart such an attack is to select a
password that is both lengthy and unpredictable. In effect , such a password has large
entropy; that is, many bits are required to represent the password. Another
countermeasure is to limit the number of attempts that can be made in a given time
period from a given source.
.
A token can generate a high-entropy passcode from a low-entropy PIN or password, thwarting
exhaustive searches. The adversary may be able to guess or acquire the PIN or password but
must additionally acquire the physical token to succeed.
Host attacks are directed at the user file at the host where passwords, token
passcodes, or biometric templates are stored. Section 3.2 discusses the security
considerations with respect to passwords. For tokens, there is the additional
defense of using one-time passcodes, so that passcodes are not stored in a host
passcode file. Biometric features of a user are difficult to secure because they are
physical features of the user. For a static feature, biometric device authentication
adds a measure of protection. For a dynamic feature, a challenge-response
protocol enhances security.
Eavesdropping in the context of passwords refers to an adversary’s attempt to
Learn the password by observing the user, finding a written copy of the password,
or some similar attack that involves the physical proximity of user and adversary.
Another form of eavesdropping is keystroke logging (keylogging), in which malicious
hardware or software is installed so that the attacker can capture the user’s keystrokes
for later analysis. A system that relies on multiple factors (e.g., password plus token or
password plus biometric) is resistant to this type of attack. For a token, an analogous
threat is theft of the token or physical copying of the token. Again, a multifactor
protocol resists this type of attack better than a pure token protocol. The analogous
threat for a biometric protocol is copying or imitating the biometric parameter so as to
generate the desired template. Dynamic biometrics are less susceptible to such attacks. For
static biometrics, device authentication is a useful countermeasure.
Replay attacks involve an adversary repeating a previously captured
user response. The most common countermeasure to such attacks is the challenge-
response
protocol.
86
Questions……
1. Write a short note on user authentication and
characterization of user authentication.
2. Define user authentication as per IRC and explain
the types of user authentication.
3. Write short note on the following:
-memory cards and smart cards.
-purpose of salt value.
4. Explain loading and verifying hash password with
neat diagram.
Difference between Authentication and Authorization.
• In authentication process, the identity of users are checked
for providing the access to the system. While in authorization
process, person’s or user’s authorities are checked for
accessing the resources. Authentication is done before the
authorization process, whereas authorization process is done
after the authentication process.
• Authorization is a security mechanism to determine access
levels or user /client privileges related to system resources
including files, services, computer programs , data and
application features.
S.NO Authentication Authorization
In authentication process, the identity of users are While in authorization process, person’s or user’s authorities
1. checked for providing the access to the system. are checked for accessing the resources.
3. It is done before the authorization process. While this process is done after the authentication process.
4. It needs usually user’s login details. While it needs user’s privilege or security levels.