53
SpanDex: Secure Password Tracking for Android Landon P. Cox, Peter Gilbert, Geoffrey Lawler, Valen3n Pistol, Ali Razeen, Sai Cheemalapa3, and Bi Wu Duke University

SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

SpanDex:  Secure  Password  Tracking  for  Android  

Landon  P.  Cox,  Peter  Gilbert,  Geoffrey  Lawler,  Valen3n  Pistol,  Ali  Razeen,  Sai  Cheemalapa3,  

and  Bi  Wu  

Duke  University  

Page 2: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2
Page 3: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

•••••••••  

[email protected]  

Page 4: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

imo.com   mint.com   Real  Sync  FriendCaster  

Yahoo!   BoA   DropBox  Facebook  

Page 5: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Where  do  your  passwords  go?  

Page 6: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Phishing  apps  

Malware Genome Project (NCSU) http://www.malgenomeproject.org!

Sends  passwords  to    hCp://erofolio.no-­‐ip.biz/login.php  

Fake  NetFlix  app  From  Malware  Genome  Project  

Page 7: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Phishing  apps  

https://blog.malwarebytes.org/mobile-2/2013/10/trojan-looks-to-wrob-android-users/!http://securelist.com/blog/research/57301/the-android-trojan-svpeng-now-capable-of-mobile-phishing/!

Wroba  (Korean  malware)   Svpeng  (Russian  malware)  

Page 8: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

•••••••••  

[email protected]  

“Let’s  use  taint  tracking!”  

Page 9: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

•  

[email protected]  

1.   Tag  password  as  entered  

General  approach  

Page 10: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

••  

[email protected]  

1.   Tag  password  as  entered  

General  approach  

Page 11: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

•••  

[email protected]  

1.   Tag  password  as  entered  

General  approach  

Page 12: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

••••  

[email protected]  

1.   Tag  password  as  entered  

General  approach  

Page 13: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

•••••  

[email protected]  

1.   Tag  password  as  entered  

General  approach  

ScreenPass  [MobiSys  ‘13]  Spoof-­‐resistant  UI  for  entering  passwords  

Page 14: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

•••••  

[email protected]  

PASS1!

1.   Tag  password  as  entered  2.   Track  tags  as  app  runs  3.   Inspect  output  tags  

!"

General  approach  

TaintDroid  [OSDI  ‘10]  tracks  how  data  flows  through  Android  apps  

Page 15: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Taint-­‐tracking  basics  

c ← a op b taint(c) ← taint(a)  ∪  taint(b)

Each  variable  has  a  label/tag;  Labels  reflect  data  dependencies  

Page 16: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Taint-­‐tracking  basics  

c ← a op b taint(c) ← taint(a)  ∪  taint(b)

Operabons/bytecodes  propagate  taint  between  

variables’  labels  

Page 17: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Taint-­‐tracking  basics  

c ← a op b taint(c) ← taint(a)  ∪  taint(b)

setTaint(a,t)

c = a + b taint(c) ← {t}  ∪  {}  =  {t}

taint(a) ← {t}

c = a + b

Explicit  flow  Directly  transfers  informa3on  from  source  to  des3na3on  

Page 18: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Taint-­‐tracking  basics  

c ← a op b taint(c) ← taint(a)  ∪  taint(b)

setTaint(a,t)

c = a + b taint(c) ← {t}  ∪  {}  =  {t}

taint(a) ← {t}

if (c  ==  0) s = 1 ???

c = a + b

Implicit  flow  Informa3on  transferred  via  

control  flow  

Page 19: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Tracking  implicit  flows  is  (really)  hard.  

Page 20: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Taint  the  PC  

if (s  ==  0) { x = a } else { y = b } output x output y

taint(PCcurr) ← taint(s)  ∪  taint(PCprev)

taint(x) ← taint(a)  ∪  taint(PCcurr)

taint(PCcurr) ← taint(PCprev)

Tainbng  the  PC  captures    Informabon  flow  into  x  

Page 21: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Taint  the  PC  

if (s  ==  0) { x = a } else { y = b } output x output y

taint(PCcurr) ← taint(s)  ∪  taint(PCprev)

taint(x) ← taint(a)  ∪  taint(PCcurr)

taint(PCcurr) ← taint(PCprev)

Problem:  y  contains  same  secret  informabon  as  x,  even  though  it  wasn’t  updated  

Page 22: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Bigger  problem:  overtainbng  

if (s  ==  0) { // complex block of code ... }

Condibon  may  reveal  very  lidle  secret  informabon  

Taint  tags  updated  as  if  objects  contain  all  secret  informabon  

Page 23: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Not  much  informabon  transferred    to  a  large  number  of  objects.  

Page 24: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Problem:  overtain3ng  

TaintDroid  (explicit  flows)  

TaintDroid  ++  (explicit  flows,  tainted  PC)  

0

10

20

30

40

50

60

70

linkedin

twitter

tumblr

instagram

linkedin

twitter

tumblr

instagram

Num

ber

of Tai

nte

d O

utp

uts

File Network SSL

TaintDroid++TaintDroid

Page 25: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Problem:  overtain3ng  

TaintDroid  (explicit  flows)  

TaintDroid  ++  (explicit  flows,  tainted  PC)  

0

20

40

60

80

100

linkedin

twitter

tumblr

instagram

linkedin

twitter

tumblr

instagram

Perc

enta

ge

of Tota

l Tai

nte

d O

utp

uts

Official CDN Other

TaintDroid++TaintDroid

Page 26: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Key  observa3on  

if (s  ==  0) { x = a ... } else { y = b ... }

At  most,  reveals  whether  s  is  0  If  OK  to  leak  that  

s!=0,  then  don’t  propagate  taint  

Page 27: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

•  Tracks  implicit  flows  within  Dalvik  VM  – Can  compute  a  useful  upper  bound  on  info  leaks  

•  Leverages  key  properbes  of  passwords  – Short  strings  – Never  displayed  on  screen  – Limited  local  processing  

Our  solu3on:  SpanDex  

Page 28: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

SpanDex  overview  

1.   Inibalize  possibility  set  (p-­‐set)  for  taint  source  –  [32,  126]  for  each  password  character  

2.   Record  operabons  performed  on  tainted  data  –  Opera3ons  recorded  in  Operabon  DAG  (op-­‐DAG)    

3.   Update  p-­‐set  when  involved  in  branch  condibon  –  op-­‐DAG  +  branch  condi3ons  →  CSP  

4.   Guarantee  for  untainted  outputs  –  Leak  at  most  as  much  info  as  reflected  in  p-­‐sets  

–  Allows  for  rich  set  of  policies  for  limi3ng  leaks  

Page 29: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

High-­‐level  example  

// password input ’P’ initPset(c,  PASSWORD) // end password input

if (c  >=  ’A’ && c  <=  ’Z’) lc  =  c  +  32

if (lc  ==  ’p’) output “value was P”

Page 30: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

High-­‐level  example  

// password input ’P’ initPset(c,  PASSWORD) // end password input

if (c  >=  ’A’ && c  <=  ’Z’) lc  =  c  +  32

if (lc  ==  ’p’) output “value was P”

Page 31: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

High-­‐level  example  

// password input ’P’ initPset(c,  PASSWORD) // end password input

if (c  >=  ’A’ && c  <=  ’Z’) lc  =  c  +  32

if (lc  ==  ’p’) output “value was P”

INIT_PSET(c,[32,126])

p-­‐set:  [32,  126]  size:  95  

Page 32: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

High-­‐level  example  

// password input ’P’ initPset(c,  PASSWORD) // end password input

if (c  >=  ’A’ && c  <=  ’Z’) lc  =  c  +  32

if (lc  ==  ’p’) output “value was P”

INIT_PSET(c,[32,126])

LOG_CMP(c>=65, T)

p-­‐set:  [65,  126]  size:  62  

Page 33: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

High-­‐level  example  

// password input ’P’ initPset(c,  PASSWORD) // end password input

if (c  >=  ’A’ && c  <=  ’Z’) lc  =  c  +  32

if (lc  ==  ’p’) output “value was P”

INIT_PSET(c,[32,126])

LOG_CMP(c>=65, T) LOG_CMP(c<=90, T)

p-­‐set:  [65,  90]  size:  26    (uppercase  leCers)  

Page 34: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

High-­‐level  example  

// password input ’P’ initPset(c,  PASSWORD) // end password input

if (c  >=  ’A’ && c  <=  ’Z’) lc  =  c  +  32

if (lc  ==  ’p’) output “value was P”

INIT_PSET(c,[32,126])

LOG_CMP(c>=65, T) LOG_CMP(c<=90, T) LOG_OP(lc=c+32)

p-­‐set:  [65,  90]  size:  26    (uppercase  leCers)  

Page 35: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

High-­‐level  example  

// password input ’P’ initPset(c,  PASSWORD) // end password input

if (c  >=  ’A’ && c  <=  ’Z’) lc  =  c  +  32

if (lc  ==  ’p’) output “value was P”

INIT_PSET(c,[32,126])

LOG_CMP(c>=65, T) LOG_CMP(c<=90, T) LOG_OP(lc=c+32)

LOG_CMP(lc==’p’, T)

p-­‐set:  [80]  size:  1    (‘P’)  

Page 36: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

High-­‐level  example  

// password input ’P’ initPset(c,  PASSWORD) // end password input

if (c  >=  ’A’ && c  <=  ’Z’) lc  =  c  +  32

if (lc  ==  ’p’) output “value was P”

INIT_PSET(c,[32,126])

LOG_CMP(c>=65, T) LOG_CMP(c<=90, T) LOG_OP(lc=c+32)

LOG_CMP(lc==’p’, T)

p-­‐set:  [80]  size:  1    (‘P’)  

Page 37: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Lower-­‐level  example  

V1

V1 label=Root

V0

V0 label=Root

V2

V2 label=N4

V3

V3 label=N3

p-set Secret = 'p'Root

+ 3 RootN1

+ N1 2N2

- 6 N2N3

+ N2 7N4

Dalvik internal heapDalvik internal stack

p-set = [32, 121]

V4

V4 label=null

Domain= 'FB'0000: mov v1, v0 // v0, v1 label=N0

0002: add v2, v1, 3 // v2's label=N1 0004: add v2, v2, 2 // v2's label=N2 0006: sub v3, 6, v2 // v3's label=N3 0008: add v2, v2, 7 // v2's label=N4 000a: const/16 v4, 122 // v4's label=0 000c: if-le v3, v4, 0016 000e: ...

Labels  point  to  op-­‐DAG  nodes  Explicit  flows  

create  new  op-­‐DAG  nodes  

Condibonal  branches  require  solving  CSP  to  

update  p-­‐set(s)  

Page 38: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Lower-­‐level  example  

V1

V1 label=Root

V0

V0 label=Root

V2

V2 label=N4

V3

V3 label=N3

p-set Secret = 'p'Root

+ 3 RootN1

+ N1 2N2

- 6 N2N3

+ N2 7N4

Dalvik internal heapDalvik internal stack

p-set = [32, 121]

V4

V4 label=null

Domain= 'FB'0000: mov v1, v0 // v0, v1 label=N0

0002: add v2, v1, 3 // v2's label=N1 0004: add v2, v2, 2 // v2's label=N2 0006: sub v3, 6, v2 // v3's label=N3 0008: add v2, v2, 7 // v2's label=N4 000a: const/16 v4, 122 // v4's label=0 000c: if-le v3, v4, 0016 000e: ...

CSP  solver  traverses  op-­‐DAG  back  to  root  !    

v0  +  6  -­‐  2  –  3  <=  122  

Page 39: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Other  considera3ons  

•  CSPs  may  hard  to  solve  –  CSP  may  involve  mul3ple  sources  (e.g.,  pw  chars)  –  CSP  may  involve  complex  opera3ons  (e.g.,  bitwise)  – We  see  this  in  crypto  and  string-­‐encoding  libraries  

•  Solubon  –  Define  a  set  of  trusted  run3me  libraries  –  No  CSP-­‐solving  internally  –  Taint  all  trusted-­‐lib  outputs  –  Ban  complex  opera3ons  in  untrusted  code  

•  More  details  in  paper  Constrains  how  apps    operate  on  secret  data    

(e.g.,  must  use  trusted  crypto  lib)  

Page 40: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

SpanDex  evalua3on  

•  What  is  SpanDex’s  run3me  overhead?  •  What  p-­‐sets  do  we  observe  in  real  apps?  

•  How  well  does  SpanDex  protect  passwords?  

Page 41: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

SpanDex  evalua3on  

•  What  is  SpanDex’s  run3me  overhead?  •  How  do  apps  update  p-­‐sets?  •  How  well  does  SpanDex  protect  passwords?  

Page 42: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

ACacker  model  

•••••••••  

[email protected]  Username  

Password  

Large  DB  of  plaintext  passwords  

Adacker  can  leak  username  +  p-­‐set  of  each  pw  character  +  

pw  length  

Assume  target’s  password  is  in  

database  

Page 43: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

ACack  simula3on    

•  Assume  adacker  learns  each  character’s  type    – Lower  case  (a-­‐z)  or  – Upper  case  (A-­‐Z)  or  – Numeric  (0-­‐9)  or  – Special  (!@#$  …)  

•  How  many  guesses  would  adacker  need?  – Assume  online  querying  – Hope  that  number  of  guesses  is  large  

Page 44: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

ACack  simula3on  

•  Dataset  –  DB  of  131  million  unique  passwords  

–  Collected  from  a  variety  of  well  known  leaks  

•  Procedure  –  For  each  password,  P,  in  DB  –  Generate  rule  describing  each  char’s  type  –  Match  set  :=  set  of  passwords  that  match  P’s  length,  char  types  –  Match  set  is  set  of  all  possible  passwords  that  could  be  P  

–  Want  to  know,  for  each  P,  how  large  is  its  match  set?  

Page 45: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Match-­‐set  size  distribu3on  

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1 10 100 1000 10000 100000 1e+06 1e+07

Perc

enta

ge

Matches

Passwords CDF

96%  of  passwords  have  |match  set|  >  

1k  

98%  of  passwords  have  |match  set|  >  

100  

Interesbng  implicabon  of  adacker  model:  longer  passwords  are  less  secure  

Page 46: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Match-­‐set  size  distribu3on  

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1 10 100 1000 10000 100000 1e+06 1e+07

Perc

enta

ge

Matches

Passwords CDF

But  what  if  some  passwords  are  more  likely  than  others?  

What  is  the  expected  number  of  tries  before  a  successful  guess?  

Page 47: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Uniform  password  usage  

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1 10 100 1000 10000 100000 1e+06 1e+07

Perc

enta

ge

Expected number of tries (logscale)

CDF of expected tries>10  tries  for  99%  of  passwords  

>100  tries  for  90%  of  passwords  

Page 48: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Bad  Zipf-­‐like  password  usage  

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

50 100 150 200 250 300 350 400 450

Perc

enta

ge

Expected number of tries

CDF of expected tries

s=1s=0.7878 (rockyou)

s=0.695 (flirtlife)

90%  of  passwords  in  <50  tries  

80%  of  passwords  in  <50  tries  

Page 49: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1 10 100 1000 10000 100000 1e+06

Perc

enta

ge

Expected number of tries (logscale)

CDF of expected tries

s=0.246 (hotmail)s=0.23 (c-bits)

BeCer  Zipf-­‐like  password  usage  

>10  tries  for  99%  of  passwords  

>100  tries  for  85%  of  passwords  

Page 50: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1 10 100 1000 10000 100000 1e+06

Perc

enta

ge

Expected number of tries (logscale)

CDF of expected tries

s=0.246 (hotmail)s=0.23 (c-bits)

BeCer  Zipf-­‐like  password  usage  

Expected  number  of  tries  largely  depends  on  usage  distribubon.  A  wide  range  have  

been  observed  pracbce.  

Page 51: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Related  work  

•  Dynamic  tracking  for  implicit  flows  – Dytan  [Clause  ‘07],  DTA++  [Kang  ‘11]    

•  Quanbfying  revealed  info  – FlowCheck  [McCamant  ‘08]  

•  Process-­‐level  tracking  – Asbestos  [Efstathopoulos  ‘05],  HiStar  [Zeldovich  ‘06],  Flume  [Krohn  ‘07]  

•  Symbolic  execubon  

Page 52: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

SpanDex  

•  p-­‐sets  give  upper  bound  on  implicit  leaks  –  Can  track  in  real-­‐3me    –  Rich  policy  possibili3es  

•  Useful  under  specific  condibons  – We  haven’t  “solved”  the  implicit-­‐flow  problem  

–  Requires  simple  processing  of  secret  data  

•  Future  –  Can  look  at  other  types  (e.g.,  CCNs,  SSNs)  –  Run3me  CSPs  limita3ons  may  be  useful  

Page 53: SpanDex:SecurePassword Tracking)for)Android) · LowerHlevel"example" V1 V1 label=Root V0 V0 label=Root V2 V2 label=N4 V3 V3 label=N3 p-set Secret = 'p' Root N1 + 3 Root N2 + N1 2

Run3me  performance  

•  Runbme  overhead,  no  sensibve  data:  

– 16%  vs  10%  for  TaintDroid  •  Time  to  handle  branch  on  sensibve  data:  – <  0.1ms  for  logs  up  to  100  arith.  Ops  

– Log  length  in  prac3ce:  avg:  2  ops,  max:  93  ops  – Rate  of  tainted  branches:  ~100s/min  – Expect  to  spend  a  few  ms  per  sec  updabng  p-­‐sets  

Summary:  can  track  p-­‐sets  in  real-­‐bme