Authentication Flashcards

1
Q

Authentication defintion

A

RFC-4949: the process of verifying a claim that a system entity or system resource has a certain attribute value

Whatis.com: the process of determining whether someone or something is who or what it is declared to be

NIST: verifying the identity of a user, process, or device, often as a prerequisite to allowing access to resources in an information system.

What is important: these definitions mention authentication of an “actor” that could be anything, even not human (software component, hw element).

Shorthand for authentication is authN or AuthC, while AuthZ is for authorization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Authentication factors

A
  • Knowledge: something only the user knows (code, personal id, static pwd)
    • risk: storage and demonstration/transmission (you need to show that you know it, so it can be stolen while you show it, and it’s stored somewhere)
  • Ownership: something only the user posses ( often called authenticator) e.g. smart card, smartphone, token
    • risk: authenticator can be infected with malware, or manufactured in a country that requires govt control.
  • Inherence: something the user is (biometric characterstics)
    • Risk: counterfeiting and privacy: cannot be replaced when “compromised”. For this reason they should be used only in very secure environments, tipically for local authentication, as a way to unlock a secret or a device.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Digital authentication model (NIST SP800.63B)

A
  • Actor that wants to use system === applicant
  • if applicant possesses authenticator can provided it to CSP, if can get one (e.g. smartcard)
  • CSP: component that issue or enrol user credential and authenticator
    • and verify and store associated attributes
  • The actor becomes a subscriber once they have an authenticator.
  • The Relying Party is an application that checks through the verifier if the user is valid.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

User authentication flow

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Password-based authentication

A
  • secret = user password
  • client sends password in cleartext
  • server verifies the proof:
    • 1: knows all passwords in clear text (f = i(identity control))
    • 2: knows all passwords digests (f(proof) = HUID)
  • pro:
    • very simple if user remembers password
  • cons:
    • user-side password storage (post-it, password manager)
    • guessable password
    • serverside password storage in clear text is dangerous
    • pwd sniffing, DB attacks (sql inj), guessing, duplication (many services one password), aging of algorithms, pwd capture via server spoofing and phishing
    • MITM attacks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Password best practices

A
  • alphabetic characters (uppercase + lowercase) + digits +special characters
  • long (at least 8 characters)
  • never use dictionary words
  • frequently changed (but not too frequently!)
  • don’t use them :-)
    • but use of at least one password (or PIN or access code or …) is unavoidable, unless we use biometric techniques
  • storing passwords:
    • server-side
      • never in cleartext
      • encrypted password (the server must known the key)
      • store digest of the password
        • dictionary attack still work
        • rainblow table can make dictionary attack faster
    • client-side
      • should be only in the user’s head
      • too many password: use an encrypted file
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Dictionary attack

A

When possible: known hash algorithm and password hash values.

Pre-computation: for each word in the dictionary store in the DB hash(word)

Attack: check hash value of unknown password against DB

Pre-computation is key, because creating the DB could take more than the password lifetime.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Rainblow table

A

Space-time tradeoff technique to store (and lookup) an exhaustive hash table (less space, more time).

Makes exhaustive attack feasible for certain password sets.

Example for 12 digits password:

  • exhaustive = 1012 rows
  • rainbow = 109 rows, each representing 1000 pwd
  • reduction function: r: h => p
    • gives a possible password starting from an hash
  • pre-computation:
    • for(109 distinct P)
      • for(p=P, n=0; n<1000; n++)
        • k = h(p); p = r(k);
      • store(DB, P, p) //chain head and tail
  • attack:
    • HP= hash of a passowrd
    • for(k = HP; n=0; n < 1000; n++)
      • p = r(k)
      • if p is key of one of the rows => chain found
      • k = h(p)
    • exit(“not found”);
  • mitigation: using of salts the attacker cannot pre-compute the rainbow table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Rainbow table fusion

A

The reduction function is going from a hash to one possible password, there could be two different hashes that generates the same password.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Password salting

A
  • Adds a level of randomness to the password to make dictionary pre-computation unfeasible.
  • hashed password = hash(pwd || salt)
  • verifier strores for each user an hashed password and a salt.
    • if someone gets the db they also get the salt, but they will have to calculate the inverse of the passwords from scratch
  • two users with the same password will have a different password digest.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

passwords in MySQL

A

the user table contains user passwords that aren’t salted, just double hashed with SHA1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Strong authN

A
  • Referring to peer authentication.
  • often requested in specifications, but never defined precisely
  • authn techniques can be regarded as strong or weak depending on the attack model
    • internet banking -> ECB def.
    • employees of PSP -> PCI-DSS def.
    • watch out for application specific risks
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

ECB strong auth def.

A
  • procedure based on the use of two or more of knowledge, ownership, inherence authn.
  • elements selected must be independent (breach of one does not leak the other)
  • at least one element should be non-reusable, non-replicable (except for inherence), and impossible to surreptitiously stolen via internet.
  • authN procedure should be disgned to protect confidentiality of the authentication data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

PCI-DSS strong authN def.

A
  • v3.2 requires multi-factor auth for access into card-holder data
    • from trusted or untrusted network
    • by admins
    • exception being direct console access (physical sec)
  • remote access:
    • from untrusted network
    • by users and third-parties maintenance
  • Multi-factor authn is not 2 times the same factor (two passwords)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

CRA

A

Challenge response authentication

possible way to implement strong authentication.

a challenge is sent to the claimant from the verifier, claimant replies with solution computed using secret knowledge; then the verifier compares expected and actual response.

The challenge must be non-repeateable to avoid replay attacks. (usually the challenge is a random nonce0

Function f must be non-invertible, otherwise listeners can easily discover the shared secret by computing f-1(response, challenge)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Symmetric CRA

A
  • here we have a shared secret between the claimant and verifier, typically a password.
  • function f is computed 2 times: from user to make the response, from the verifier to verify match.
  • issues:
    • easiest implementation: using an hash function
    • Kid must be known to verifier
      • may lead to attacks against the table containing the passwords
      • SCRAM solves this problem by using hashed passwords at the Verifier
        • offers also channel binding and mutual authentication
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Mutual authentication with symmetric challenge

A
  • v1: only the initiator provides explicitly its (claimed) identity
    • v2: less messages
18
Q

Attack to the symmetric challenge protocol

A

Here there’s Mike pretending to be Alice. Mike send to Bob the Alice’s identity (A) and Alice’s challenge (𝐶𝐴). Bob

replies with 𝐶𝐵 and 𝑒𝑛𝑐(𝐾𝐴𝐵, 𝐶𝐴 ).

t this point, Mike does not know 𝐾𝐴𝐵 and cannot compute

the response to the challenge. But at this point Mike opens a

new connection with Bob, sending again Alice’s identity (A)

but this time sends the challenge sent from Bob (𝐶𝐵). Bob

replies again with another challenge 𝐶𝐶 and 𝑒𝑛𝑐(𝐾𝐴𝐵 ,𝐶𝐵)

which is the answer to the challenge of the 1st connection.
Mike can finally provide the correct answer.

19
Q

Asymmetric challenge-response systems

A

This time the user does not send his identity, but its X.509 certificate, which is declaring his identity and public key (the claimant has the corresponding private key ID.kPri).

R is a random nonce encrypted using claimant public key.

Claimant will then sent the verifier the original value of R if it’s true who they say they are.

Analysis:

strongest mechanism

does not require secret storage at the verifier

implemented for peer authentication in IPsec, SSH, and TLS.

Fundamental for user authentication in FIDO.

Problems:

  • slow
  • if badly designed could lead to involuntary singature by the Claimant
  • PKI issues (trusted root, name constraint, revocation) avoidable if the Verifier stores kPubID
    • This is the approach followed by SSH: take public key and public it on the server, with a big risk if someone can change the key stored on the server.
20
Q

OTP

A

Users have passwords valid only for one login.

Claimant receives authentication request, that must be replied by using userId; server now requests a specifie password among a list (e.g. no. 48, assuming 49th and 50th have already been used), the user sends the requests password and marks it as used.

The server has the secret used to generate the user’s password, and uses it to verify that the otp was corresponds. This makes password immune to sniffing, ‘cause next time it will be different.

Issues:

  • subject to MITM (faking the verifier), verifier authentication is needed to avoid it.
  • difficult provisioning: lot of passwords to send to subscribers, password set will be empty at some point.
    • untrusted workstaion: use paper sheet or hardware authenticator (crypto token)
    • trusted workstation: automatically comput an ad-hoc application
  • difficult password insertion: sequence of random characters
21
Q

The S/KEY system

A

First OTP definition and implementation by Bell Labs.

  1. user generate secret Sid
  2. user computes N one-time passwords where P1 = h(Sid), P2 = h(P1), …
  3. verifier stores last one (PN), this will be used only indirectly for authentication
  4. when user wants to access the server, verifier asks for PN-1 and gets X from user. h(X) == PN => ok, store X as PN-1

MITM is possible, so needs server authentication.

Pass generation: users inserts a pass phrase, which must be minimum 8 characters long, if disclosed securty is compromised. Pass phrase is then concatenated with server seed (public), so that the same pp can be used for multiple servers.

Passwords are 64-bit, a compromise, but since they have to be inserted by humans it’s fair enough, otherwise it would take too much time.

22
Q

OTP problems

A

uncomfortable: strange passwords.

expensive when based on hardware authenticators

paper based cannot be used by a computer (only by a human)

password provisioning (generator? SMS?)

when time is used to generate OTP, synchronization must be managed (if the attacker makes the user believe it’s 5pm, user will generate code for 5pm)

23
Q

HW authenticator problems

A
  • denial of service: deliberatly making wrong attempts to block accounts
  • social engineering: if authenticator is not physical, it could be possible to call customer support to ask for the initialization of a new authenticator (faking loss of phone)
24
Q

time based otp

A

requires local computation

requires clock sync.

requires time-slot and authentication window

only one authenticato run per time-slot

time attacks against subscriber and verifier

sensitive database at the verifier

25
Q

RSA SecurID TOTP

A
  • Claimant sends to the verifier in clear a tuple = {user, PIN, tokencode(seed,time)}.
  • Login requires knowing a reusable password (PIN) and the OTP password displayed on the device === two factors (owning device, knowing reusable pwd)
    • PIN could be sniffed across the network, solution = variant with a pin pad, then the user will send the tuple = {user, token_code*(seed, time, PIN)}, note that the new function takes into account the PIN.
      • verifier checks againsts the three possible token-code (T-1, T0, T1)
      • each device has two PINs: the one used normally and the duress code, used to generate alarm when user if forced by a criminal.
26
Q

SecurID architecture

A

SecurID provides the hw authenticator, but also a component called ACE (software).

ACE client: installed at the Relying Party (server that uses authN sys)

ACE server: implements verifier

27
Q

Event Based OTP

A
  • TOTP allows only one authentication per timeslot, this is now suitable for every use-case.
  • Event-based: integer counter used as input besides the seed: p(ID, C) = h(C, SID)
    • requires local computation by the subscriber
    • counter incremented by subscriber (by a button for ex.)
    • allows OTP pre-computation
      • double edge sword: can be computed by subscriber and attacker
    • verifier must allow desynchronization (maybe user pushed button unwillingly)
      • done using counter window
        • if none of the passwords in the window match, a reset will be needed.
28
Q

out of band OTP

A
  • OTP generated using a communication channel different than the one used to interact with the system.
  • This mechanism reduces the burden of te user.
  • BUT, at step 5, we need server authenticatio to avoid MITM attacks.
  • OOB channel is frequantly SMS, but the communicaiton protocol is usually weak, thus it would be better using a push mechaing over TLS channel to a registered subscriber device.
    • can be done by using a message inside a notification, that should be then confirmed using the user’s fingerprint.
29
Q

2/Multi Factor AUTHN

A

Use more than one factor: to increase authN strength and to protect authenticator.

PIN is used for authenticator protection:

  • transmitted along with OTP
  • or entered to compute OTP
  • PIN or inherence factor used to unlock the authenticator is very risky if
    • lock mechanism is weak
    • no protection from multiple unlock attempts
    • unlocking valid for a time window
30
Q

Human being authentication

A

Being sure that a system is interacting with a human.

Solutions: CAPTCHA (completely automated public truing test to tell computers and humans apart) or biometric attributes (fingerprint)

31
Q

Biometric systems

A
  • characteristics being used
    • fingerprint
    • voice
    • retinal scan
    • iris scan
    • hands’ blood vein pattern
    • hearth rate
    • hand geometry
32
Q

Problems of biometric systems

A
  • These two parameters can never be 0, since biometric systems are inherently imprecise:
    • FAR (False Acceptance Rate): bad signals accepted / total signals
    • FRR: good signals rejected / tot signals
    • It doesn’t help that some characteristics are inherently variable (due to incidents, blood pressure, atmospheric effects)
  • Other issues:
    • psychological accptance:
      • big brother syndrome: fear by users of personal data collection
      • some technologies are intrusive and could harm (e.g. retina scans could damage some people eyes)
    • privacy: it becomes identification and not authenticaton
    • cannot be changed if it gets copied
    • lack of standard API/SPI: rises dev. costs.
33
Q

OATH

A
  • Enables authentication systems interoperability based on OTP, symmetric or asymmetric challenge.
  • Development of standards for the client-server protocol and data format on the client.
    • has stantards set for HMAC based OTP (HOTP), TOTP, challenge response protocol, protable symmetric key container and dynamic symmetric key provisioning protocol
34
Q

OATH HMAC-based OTP

A

* Event based OTP

  • Define:
    • K: shared secret key (verifier and subscriber)
    • C: counter (monotonic positive integer number);
    • h: cryptographic hash function (default: sha1)
    • sel: function to select 4 bytes from a long byte string
  • Computation:
    • HTOP(K, C) = sel (HMAC - h(K,C)) &0x7ffffff
      • mask used to set MSB = 0 (avoids signed integer issues)
    • N digits (6/8) access code: HOTP - code = HOTP(K,C) mode 10N
35
Q

OATH TOTP

A

Same as HMAC-based OTP, but the counter C becomes the number of intervals TS elapsed since a fixed origin T0 (default: Unix Epoc):

C = (T -T0) / TS

T (default) = is unixtime(now).

TS (default) = is equal to 30s.

Default hash function is SHA1 (may also use SHA-256 or SHA-512)

Default N is equal to 6.

Nice thing: using the same function we can implement both EOTP and TOTP.

Availability of this code from Google has pushed the usage of this standard.

36
Q

FIDO

A
  • Fast IDentity Online
  • Recent standard, that attempts to increase security of authentication:
    • biometric AuthN, (FIDO terminology: passwordless UX)
    • 2-factor AuthN (FIDO term.: 2nd factor UX)
  • Focus: make authentication UX as simple as possible, allowing for biometric authn and MF authn; with privacy (protocols do not provide information that can be used by different online services to track users)
  • Main point: let user exploit any personal device which is capable of asymmetric cryptography (laptop, smartphone), because FIDO will use it to:
    • respondingto an asymmetric challenge
    • digital signature of text
  • fundamental: secure transactions (digital signature of a transaction text)
  • FIDO is implemented in the client and into the server.
37
Q

FIDO Registration

A
  • FIDO uses user’s device with asymmetric crypto. to sign an user up.
    1. user asked to select an available authenticator that matches service’s acceptance policy.
    2. User unlocks the fido authenticator using a fingerprint reader, a button on a second factor device, securely entered PIN or other method.
    3. User’s device creates a new public/private key pair unique for the local device, online service and user’s account.
    4. public key is sent to the online service and associated with user’s account. other info doesn’t leave the local device.
  • Note: user idenity can be fictitious, but this is not important, the only thing that matters is the private key stored on the device, and the public key sent to the web server.
38
Q

FIDO Login

A
  1. Online service challenges the user to login with a previously registered device (that matches service’s acceptance policy)
    • here the user provides username and (reusable) password)
  2. User unlocks the FIDO authenticator using the method used in the registration phase.
  3. Device uses the user’s account identifier provided by service to select the key to sign the service’s challenge: this identifier is retrieved by considering the pair username-password.
  4. client device sends the signed challenge response to the service, that verifies it with the stored public key.

This is a challenge response asymettric protocol that doesn’t require a X509 certificate, cause the public key is stored on the services side.

39
Q
A
40
Q

FIDO security and privacy

A

strong authn (asymm. crypto)

no 3rd party in the protocol

no secret on the server side

biometric data (if used) never leaves the user device

no phishing because authn response can be reused (signature over various data, including RP identity)

no linkability among different services used by the same user or even different accounts on the same service.

41
Q

FIDO 2.0

A

CTAP = Client to Authenticator Protocol

the platform (bound, internal) authenticators are crypto elements (more or less secure) able to store (and use) asymm. keys.