Docsity

Lecture Notes on Security in Distributed System | 22C 196, Study notes of Computer Science

Partial preview of the text

Download Lecture Notes on Security in Distributed System | 22C 196 and more Study notes Computer Science in PDF only on Docsity!

Fast Dictionary Attack

22C:196 Security in Distributed System

Dat Tien Nguyen

Mar 29 2007

Quick notes

• First, I’m very sorry for my

English

• If you have any questions or

comments, feel free to ask.

• Hopefully I won’t make you

fall asleep

Dictionary Attack

Definition

• (1) A method used to

break systems by testing all

possible passwords

beginning with words that

have a higher possibility of

being used

(from webopedia)

Example

• Break Uday’s password

• What dictionary should we

try?

  • English dictionary
  • India dictionary
  • His girl friends list
  • Do you want to try Vietnamese dictionary?

Some naïve improvement

• Use a large dictionary or

more dictionaries

• Use string manipulation in

the dictionary

  • “password”
  • Its backward: “drowssap”
  • Number-letter replacement: “p4ssw0rd”
  • Capitalization: “PasSwoRd”

Advanced improvement

• Rainbow Table

• Markovian/Deterministic

Finite Automata Dictionary

My presentation

• [1] Philippe Oechslin,

Making a faster

Cryptanalytic Time-

Memory Trade-Off

• [NS05] or [2] A. Narayanan

and V. Shmatikov, Fast

Dictionary Attacks on

Passwords Using Time-

Space Tradeoff

• Fun facts about

RaibowCrack

The original method

• Try to generate all possible

ciphertexts by encrypting

P 0 with all |N| possible

keys.

• The ciphertexts are

organized in a chains so

that only the first and the

last elements of a chain will

be stored

The original method (cont.)

• The chains are created by

using a reduction function

R which creates a key from

a cipher text.

• R(Sk(P 0 )) is written as f(k)

The original method (cont.)

  • m chains of length t are created. Their first and last elements are stored.
  • Given a cipher text C. Find the key: - Generate a chain of keys starting with R(C) and up to length t - If there is a key in the chain that matches a last key from the table, C should be in this key chain - Using the first key of the chain to generate the whole chain and the expected key is the one comes just before R(C)

Disadvantages

  • Chains starting at different keys collide and merge Æ reduce the number of distinct keys covered by a table
  • Finding a matching endpoint does not imply that the key in the table (false alarm) - The key maybe in a chain that have the same endpoint but is not in the table - The chain containing key is in the table, but merge with other chains Æ search through all chains that have the same endpoint until the key is found.

Some improvement (cont.)

  • Advantages of using distinguished endpoints - Loop detection - Merge detection
  • Disadvantages:
    • The length of chains are not fixed
      • False alarm cases
    • What happens if the chain starting with R(C) contains loop itself?
    • What happens if the chains starting with R(C) contains the chain in the table?

Rainbow Table

• Use successive reduction

function for each point in

the chain.

Rainbow Table (cont.)

• Classical table vs. Rainbow table

Rainbow Table (cont.)

• To look up a key:

  • Apply Rn-1 to the ciphertext
  • Look up the result in the endpoints of table
  • If we don’t find, apply R (^) n- and f (^) n-1 to see if the key was in the second last column
  • So on and so forth

Hybrid Markovian/DFA

dictionary

Why use Markov models?

• The fact that the

passwords are generated

by people, which are

unlikely to be uniformly

distributed in the space of

alphabet sequences

Why use Markov models?

• Markov models are

commonly used in Natural

Language Processing

  • It defines a probability distribution over sequences of symbols
  • Used to generate “random, yet pronounceable” pwds in LANL in the late 1980s
  • Very effective at guessing passwords generated by users

Markovian filtering

• Zero-order Markov model

  • Each character is generated according to the underlying probability distribution and independently of the previous generated characters
  • P(α) = ΠxЄαv(x)

Markovian dictionary (cont.)

  • The models can drastically reduce the size of the plausible pwd space - Ex: consider 8-character sequence - If θ = 85% (means 85 percents of sequences are ignored) - The size if only 1/7 of the key space - The zero-order dictionary contains 90% of the dictionary - The first-order dictionary can even do better (more than 95%)

Markovian dictionary (cont.)

• The distribution of letter

frequencies used in

Markovian filtering is

language-specific

• Two ways to deal with

unknown languages

  • Combine the keyspaces for two or more languages
  • Come up with a distribution that works reasonably well for multiple languages

Filtering using Finite Automaton

  • A search space that contains only alphabetic sequences is unlikely to have a good coverage of the plausible pwd space - Human often mix upper-lower characters and numbers - System requires users to put special characters to their pwds
  • Even that the distribution of resulting pwds is not random - Numbers are likely in the end - The first character is more likely to be upper - Pwd contains mostly lower chars

Filtering using Finite Automaton

  • Deterministic finite automata are ideal for expressing such properties
  • Specify a set of common regular expression - All lower case - One upper case followed by all lower case - …
  • Dictionary = the set of sequences matching the Markovian filtering and accepted by at least one DFA corresponding to the regular expression

Indexing Algorithms (cont.)

• Some changes

  • Modified dictionary:
  • Discretize the probability distribution - μ(x) = log v(x) and λ = logθ
  • Discretize the value of μ to the nearest multiple of μ 0 - If μ 0 is large, the memory is low, but the accuracy is low as well

IA for Zero-order Markovian dic

• “Partial dictionaries”:

• For any string prefix α:

“Partial Dic” = {all sequences β: αβ

satisfies the Markovian property}

• Note that Dv,θ,l,θ’,l’ is well-defined

because:

ΠxЄαβv(x) = ΠxЄαv(x)ΠxЄβv(x) =

θ’ΠxЄβv(x)

IA for Zero-order Markovian dic

  • The recursive algorithm to compute the size of a partial dictionary

partial_size1(current_length, level) { if level >= threshold: return 0 if total_length = current_length: return 1 sum = 0 for each char in alphabet sum = sum + partial_size1(current_length+1, level+mu(char)) return sum }

IA for Zero-order Markovian dic

  • Function takes an index as input and returns the corresponding key get_key1(current_length, index, level) { if total_length = current_length: return "" sum = 0 for each char in alphabet new_level = level + mu(char) // looked up from precomputed array size = partial_size1[current_length+1][new_level] if sum + size > index // ’|’ refers to string concatenation return char | get_key1(current_length+1,index-sum, new_level) sum = sum + size // control cannot reach here print "index larger than keyspace size"; exit }