Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

The Internet Dog

Operating Systems Security:


User Authentication
Ozalp Babaoglu

© The New Yorker, 5 July 1993


ALMA MATER STUDIORUM – UNIVERSITA’ DI BOLOGNA
 
© Babaoglu 2001-2018 Sicurezza !2

Introduction User Authentication

■ Authenticating humans can be based on


■ When you first make contact with a service (login, email, social
1. Something you know (password, PIN)
network, etc.) you need to identify yourself and then
authenticate this identity to prove who you claim to be
2. Something you have (security token)
3. Something you do
■ Authentication is the basis for performing Authorization
4. Something you are (biometrics)
■ Authentication of humans is different from authentication of 5. Where you are
messages or machines ■ Options 2, 3 and 4 usually require special hardware support
■ Humans are not good at remembering or computing
■ Option 1 is by far the most common

© Babaoglu 2001-2018 Sicurezza !3 © Babaoglu 2001-2018 Sicurezza !4


Password-based authentication Password-based authentication

■ Leaves no trace of security breaches


■ An attacker can always try to guess a password
■ Impossible to prove your innocence if someone misuses your
■ Let P be the probability of successfully guessing a
account
■ There is always the possibility that passwords can be guessed password during an interval of T units of time
■ Poor appreciation of security among users ■ Let G be the guess rate (guesses per unit of time) and N be
■ Short passwords the password space
■ Trivial, easily-guessed passwords ■ P ≥ (G×T)/N
■ There is also the possibility that passwords can be “captured”
■ General strategies for reducing P:
■ intruder overlooking your shoulder while entering password

● Reduce T — limit validity of passwords
login spoofing
■ network sniffing
● Increase N — enforce long, complex passwords
■ Possibility of on-line or off-line attacks ● Reduce G

© Babaoglu 2001-2018 Sicurezza !5 © Babaoglu 2001-2018 Sicurezza !6

Password-based authentication Password-based authentication

■ On-line attack: the system itself is used to verify the


correctness of guesses
● Usually unavoidable if the system has to be physically or remotely ■ Off-line attacks: verify the correctness of password guesses
accessible
on a system different from the one being targeted
■ Defenses:
■ Based on pre-constructed lists of potential passwords
● Slow down rate of guesses (decreases G)
■ Need access to passwords in some stored form
● Limit number of incorrect attempts (3 wrong PINs, the phone blocks,
Bancomat eats your card)
● Report date/time/location of last successful login at the next login

© Babaoglu 2001-2018 Sicurezza !7 © Babaoglu 2001-2018 Sicurezza !8


Password-based authentication Dictionary Attack

■ Obtain a copy of the file containing encrypted passwords


■ How to save passwords
(digests)
● as clear text in a file protected by the operating system’s access
■ Obtain a file containing lists of common words (dictionary)
control mechanisms — subject to abuse by privileged users,
administrators ■ For each word w in the dictionary, compute its digest using
■ Password encryption f(w) and compare it to the digests in the password file
● can be based on a one-way hash function f() ■ All matching entries correspond to users who have set their
● the password file contains digests of the passwords and not the password to w
clear text ■ Can be much more sophisticated by transforming w in
● at login, compute the digest of the supplied password by the user common ways (backwards, 2-letter permutations, etc.)
and compare it to the value stored in the file
■ Can be mechanized through easily-available programs such
● Password file in Unix/Linux: /etc/passwd
as crack
© Babaoglu 2001-2018 Sicurezza !9 © Babaoglu 2001-2018 Sicurezza !10

Dictionary Attack Dictionary Attack

List of common words Password file


Achille
Adriano
Africa
Defenses:
root:ikgjioe9043jb:0:0:...
Afrodite
Agnese
rossi:wsfl4i4gjio:500:500:... ■ Limit access to the password file through OS
Agrigento bianchi:sdiweo38d:501:501:...
Alberto franchi:bwjk2lks4df:502:502:... ■ Artificially slow down the performance of the one-way hash
Aldo
neri:osdtrkl9dfb:503:503:...
Alessandro
Alessio orsi:gi5ikwsdvo:504:504:... function that is used (Unix applies DES 25 times to an all-zero
Ambrogio
America
tamburini:lkqweoibve4s:505:505:... block with the password as the key)
gallo:osdtrkl9dfb:506:506:...
Amilcare
Anastasia
■ “Salting” of passwords to prevent global attacks
Ancona
Andrea f(Achille) = plltuwxkbgp ■ “Shadow” passwords: separate encrypted passwords from
Anna
Annibale
Anselmo
f(Annibale) = osdtrkl9dfb other information typically contained in the password file (e.g.,
Antonino
Antonio Conclude that users neri and gallo real name of user, office location, telephone number, etc.)
Aosta
... are both using the password “Annibale”
© Babaoglu 2001-2018 Sicurezza !11 © Babaoglu 2001-2018 Sicurezza !12
Salting Salting

■ When user U chooses a password P, the system associates ■ When user U wants to authenticate herself to the system, she
with user U two quantities S and Q identifies herself as U and provides her password P:
■ S, called the salt, is a random number generated by the ■ the system reads S and Q associated with user U
system when the user sets her password ■ concatenates S with P and applies f to obtain Q*
■ Q is the digest obtained through f(P | S) where f is a one-way ■ compares Q* with Q
hash function ■ if Q* = Q then authentication succeeds, otherwise fails
■ Only S and Q (not P) are stored in the password file along with ■ If an attacker is able to read the password file, it obtains S and
the user name U Q but is not able to derive P from them

© Babaoglu 2001-2018 Sicurezza !13 © Babaoglu 2001-2018 Sicurezza !14

Salting (Lack of) Salting

■ The same password has different encrypted forms (digests) ■ The use of a (randomly-generated) salt which is different for
depending on the salt each user and each site makes it difficult to obtain the
■ Salting of passwords prevents global attacks exploiting the passwords for multiple users or multiple sites simultaneously
fact that many users use the same password for multiple ■ (June 2012) LinkedIn and eHarmony don't take the security of
services or systems their members seriously:
■ In Unix, the salt (12 bits long) is used to slightly change the “… both companies' disastrous password breaches of the past two
days, which exposed an estimated 8 million passwords. LinkedIn and
DES internal function (E-Box) and is stored as a 2-character eHarmony encrypted, or “hashed” the passwords of registered users,
string in the password file but neither salted the hashes with extra data

© Babaoglu 2001-2018 Sicurezza !15 © Babaoglu 2001-2018 Sicurezza !16


(Lack of) Salting Unix Shadow Passwords
■ In standard Unix, the file /etc/passwd is readable by everyone
because it contains information (name, last name, login shell, home
directory, etc.) in addition to passwords
■ Why you should always salt your password hashes? ■ Which makes it an easy target for dictionary attacks
It's very difficult to reverse a hash, such as by running ■ More recent versions of Unix implement a shadow password
“5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8” through some mechanism where passwords are removed from /etc/passwd
sort of formula to produce “password”. But no one needs to. If you
and are stored in a separate file /etc/shadow, readable only by
know that “password” will always result in the SHA-1 hash
“5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8”, all you have to root
do is look for the latter in a list of password hashes to know that ■ Example of a /etc/passwd file with shadow passwords
“password” is a valid password. mezzina:x:501:501:Leonardo Mezzina:/home/mezzina:/bin/bash
trotter:x:502:503:Guido Trotter:/home/trotter:/bin/bash
hughes:x:503:504:Dino Hughes:/home/hughes:/bin/bash
acerbett:x:504:505:Stefano Acerbetti:/home/acerbett:/bin/bash

© Babaoglu 2001-2018 Sicurezza !17 © Babaoglu 2001-2018 Sicurezza !18

Advice for system administrators Advice for system administrators

■ Always set passwords explicitly and never leave default values ■ Force users to choose strong passwords when they create
■ Educate users on the importance of choosing non trivial their accounts or change their passwords
passwords ■ Impose a minimum password length (at least 8 characters)
■ Periodically run cracking software on own system to reveal ■ Require mixed format (at least some non-alpha characters)
presence of weak passwords ■ Reject passwords that can be obtained from simple transformations of
common words (dictionary)
■ Require remote users to use one-shot passwords or other
secure techniques (disable telnet, ftp) ■ Use “password aging” (must be used within reason)

© Babaoglu 2001-2018 Sicurezza !19 © Babaoglu 2001-2018 Sicurezza !20


Advice for system administrators Advice for system administrators

© Babaoglu 2001-2018 Sicurezza !21 © Babaoglu 2001-2018 Sicurezza !22

Login spoofing Login spoofing

■ The attacker writes a program (textual or graphic) that


generates a fake login window on the screen
■ Waits for the user to login with her credentials General defenses against login spoofing based on mutual
■ Capture the login/password pair and either store it locally or authentication:
send it to a remote site ■ The user authenticates himself to the host
■ On the screen, display “Login incorrect” ■ The host authenticates itself to the user
■ Start the real login program, for example by killing the running ■ Based on cryptographic techniques such as digital signatures
shell and certificates
■ The victim believes to have mistyped her password, and tries
again with the real login program (and succeeds)
© Babaoglu 2001-2018 Sicurezza !23 © Babaoglu 2001-2018 Sicurezza !24
Phishing Phishing

■ “Modern” incarnation of login spoofing


■ Phishers attempt to fraudulently acquire sensitive information
such as passwords and credit card details by masquerading
as a trustworthy person or business
■ Typically carried out using email or instant messaging, but
phone contact has been used as well
■ Social engineering

© Babaoglu 2001-2018 Sicurezza !25 © Babaoglu 2001-2018 Sicurezza !26

Spear-Phishing Phishing — OpenDNS


■ Phishing attack targeted to specific individuals

© Babaoglu 2001-2018 Sicurezza !27 © Babaoglu 2001-2018 Sicurezza !28


Phishing — Google Keyloggers

■ Keyloggers are usually designed as spyware and come in the


form of a Trojan horse, can record your passwords, can detect
when you type digits checking to see if it’s a credit card, bank
account or other information you consider private and
personal
■ Spyware Keyloggers are also used to track your surfing habits
■ Keyloggers are usually software but hardware versions also
exist

© Babaoglu 2001-2018 Sicurezza !29 © Babaoglu 2001-2018 Sicurezza !30

Keyloggers Keylogger Defenses


■ Spyware detection/removal programs
■ Firewall for blocking outgoing network traffic
■ Virtual keyboards

© Babaoglu 2001-2018 Sicurezza !31 © Babaoglu 2001-2018 Sicurezza !32


Packet sniffing Packet sniffing

■ General defenses are based on cryptographic techniques for


■ Packet sniffer is a piece of software that can analyze traffic on obfuscating passwords
the attached network through a promiscuous interface ■ Require that the password is never sent in the clear over the
■ Tries to identify packets containing login/password pairs that network
are transmitted as plaintext by programs such as telnet, ● Challenge-response schemes based on symmetric/asymmetric
rlogin or ftp cryptography
■ Stores the captured login/password pair either locally or send ● Challenge can be implicit (such as real time)
it to a remote site for future use ■ Require that a given password can be used only once
● “One-time” password schemes such as S/Key

© Babaoglu 2001-2018 Sicurezza !33 © Babaoglu 2001-2018 Sicurezza !34

User Authentication based on


Biometrics
“something you are”

■ Known as “biometrics”

■ Desirable properties for a chosen biometric:
Finger print
● Voice print ■ Universality: Every person must posses them
● Retinal patterns ■ Uniqueness: Two different persons must not have the same
● Facial features (distance between eyes, shape of lips, nose, left-right characteristics
symmetry, etc.) ■ Permanence: Characteristic should not be alterable or
■ Typically require hardware support to acquire change over time
■ Chosen biometric should minimize both false negatives and ■ Acquirability: Characteristic easy to acquire and quantify
false positives

© Babaoglu 2001-2018 Sicurezza !35 © Babaoglu 2001-2018 Sicurezza !36


Biometrics — Touch ID Biometrics — Face ID

© Babaoglu 2001-2018 Sicurezza !37 © Babaoglu 2001-2018 Sicurezza !38

Biometrics — RFID “Tattoos” Biometrics — RFID “Tattoos”

© Babaoglu 2001-2018 Sicurezza !39 © Babaoglu 2001-2018 Sicurezza !40


User Authentication based on
Picture Passwords (Windows 8)
“something you do”
Graphical equivalents of passwords

■ Certain human actions can serve to uniquely identify them


■ Keystrokes authentication: keystroke intervals, pressure,
duration, stroke position (where the key is struck)
■ Velocity, acceleration, pressure of pen when writing

© Babaoglu 2001-2018 Sicurezza !41 © Babaoglu 2001-2018 Sicurezza !42

Picture Passwords (Windows 8) Picture Passwords (iOS)

© Babaoglu 2001-2018 Sicurezza !43 © Babaoglu 2001-2018 Sicurezza !44

You might also like