Hybrid'Monitoring'of'' A/acker'Knowledge ' Frédéric'Besson,'Nataliia'Bielova ,' Thomas'Jensen' INRIA' ' IEEE'Computer'Security'Founda@ons'2016' June'29,'2016' '
Informa@on'flow'control'' Quan=ta=ve' Noninterference' A/acker’s'knowledge' Informa=on'Flow' Secret'input'does' What'informa@on'about' How'much'informa@on' not'flow'into' the'secret'is'flown'to'the' (in'bits)'about'secret'a' public'output' output'in'concrete' program'leaks'to'the' program'execu@on?' output?' 2'
Informa@on'flow'control'' Quan=ta=ve' Noninterference' A/acker’s'knowledge' Informa=on'Flow' Secret'input'does' What'informa@on'about' How'much'informa@on' not'flow'into' the'secret'is'flown'to'the' (in'bits)'about'secret'a' public'output' output'in'concrete' program'leaks'to'the' program'execu@on?' output?' 3'
A'program'which'is'not'secure' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 else l = x; output l [l=1,' x=0 ]' [l=1,' x=1 ]' h1=0 � h2=0' 1' 1' 0' set'of' secure 'execu@ons'' set'of' insecure 'execu@ons'' star@ng'with'l=1,'x=1' star@ng'with'l=1,'x=0' ' ' 4'
Security'Defini@on' • TINI:'Termina=onHInsensi=ve'Noninterference' ! Program'P'is'TINI'if'for'all'lowZequivalence'classes:' [l'='1]' [l'='0]' � ' 1' 1' secure 'execu@ons'' secure 'execu@ons'' 5'
What'does'an'a^acker'learn?' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 else l = x; output l [l=1,'x=0]' h1=0 � h2=0' 0' 1' insecure 'execu@ons'' ' 6'
What'does'an'a^acker'learn?' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 else l = x; output l [l=1,'x=0]' h1=0 � h2=0' 0' 1' h1=0 � h2=0' a^acker'knows'' insecure 'execu@ons'' values'of'both'secrets' ' 7'
What'does'an'a^acker'learn?' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 else l = x; output l [l=1,'x=0]' h1=0 � h2=0' 0' 1' h1=0 � h2=0' h1=1 � h2=1 a^acker'knows'' a^acker'knows'' insecure 'execu@ons'' values'of'both'secrets' some'informa=on' ' about'secrets' 8'
A'program'which'is'secure' l = 0; [l'='0]' if h = 1 then skip else h=0' h'='1' 0' x = 5; while x > 0 do x = x-1; l = x; output l secure 'execu@ons'' • Does'any'dynamic/hybrid'monitor'accept'all' execu=ons'of'this'program?' 9'
A'program'which'is'secure' Dynamic'[h=0]' Hybrid'[h=1]' … … l = 0; branch'taken' if h = 1 then skip branch'taken' sta@c'analysis'' else block'execu@on' … ' x = 5; due'to'low' block'execu@on'since' while x > 0 do assignment'in' l 'could'be'modified' x = x-1; l = x; high'context' in'elseZbranch' output l • Dynamic'monitors'block'too'early'' ! [Zdancewic'’02,'Aus@n'and'Flanagan'’10]'' • Hybrid'monitors'block'due'to'imprecision'of'sta=c'analysis' ! [Le'Guernic'‘07,'Russo'and'Sabelfeld'’10,'Besson'et'al'‘13]' 10'
Challenges' • How'to'track'a/acker’s'knowledge?' • How'to'make'a'monitor'accept'more'secure' execu=ons?' Answer:'' Hybrid'monitoring'of'a/acker’s'knowledge' 11'
Hybrid'monitor' Dynamic'+'Sta=c'analysis' • Dynamic'analysis'monitors'one'execu@on' • Sta@c'analysis'is'called'onZtheZfly'for'nonZexecuted' branches' • Two'sets'of'rules:'one'for'dynamic'+'one'for'sta@c' 12'
Hybrid'monitor' (P,#! ," .)#⇓##(!’ ," .’) • !,#!’:#Env#∪#{·}# • .,#.’#:#Var#→#K## K## labeling with knowledge • Env## for dynamic analysis • ·## for static analysis 13'
Expressive'knowledge'domain' .:#Var#→#K • .(x)# splits'the'ini@al'environments'in'equivalence'classes' w.r.t.'the'possible'values'of' x ⊤#( unknown value ) [l'='0]' .(x)#: ' 1 ' 0 insecure 'execu@ons'' ' 14'
Expressive'knowledge'domain' .:#Var#→#K K#≜#Env#→#Value#∪#{⊤,#⊥} • .(x)(!)#=#B## if the program terminates then x# has value B • .(x)(!)#=#⊤ no information ( x# can have any value) • .(x)(!)#=#⊥# the program certainly does not terminate on !# ' 15'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' else l = x; output l 16'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' else l = x; output l .( x ):# ' .( l ):# ' 0 0 17'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' else l = x; output l .( x ):# ' .( l ):# ' 0 0 18'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' sta=c'analysis' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' else l = x; output l The'result'of'sta=c'analysis'' only'applies'to'environments' where'h1=1' .( x ):# ' .( l ):# ' 0 0 19'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' sta=c'analysis' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' else l = x; output l .( x ):# ' .( l ):# ' 1 0 0 20'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' else l = x; output l .( x ):# ' .( l ):# ' 1 0 0 21'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' sta=c'analysis' else l = x; output l The'result'of'sta=c'analysis'' only'applies'to'environments' where'h2=0' .( x ):# ' .( l ):# ' 1 0 0 22'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' sta=c'analysis' else l = x; output l The'new'knowledge'in'these'' environments'comes'from'the'' knowledge'of'x' .( x ):# ' .( l ):# ' 1 0 0 23'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' sta=c'analysis' else l = x; output l The'new'knowledge'in'these'' environments'comes'from'the'' knowledge'of'x' .( x ):# ' .( l ):# ' 1 0 0 24'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' sta=c'analysis' else l = x; output l The'new'knowledge'in'these'' environments'comes'from'the'' knowledge'of'x' 1 .( x ):# ' .( l ):# ' 1 0 0 25'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' else l = x; output l The'knowledge'in'current'' execu=on'applies'to'environments'' where'h2=1' 1 .( x ):# ' .( l ):# ' 1 0 0 26'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' else l = x; output l The'knowledge'in'current'' execu=on'applies'to'environments'' where'h2=1' .( x ):# ' .( l ):# ' 1 1 0 0 27'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' else l = x; output l .( x ):# ' .( l ):# ' 1 1 0 0 28'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' else l = x; output l .( x ):# ' .( l ):# ' 1 1 0 0 29'
REAL'KNOWLEDGE' [h1'='0,'h2'='1]' [l'='0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 0' 1' else l = x; output l REAL'KNOWLEDGE' ='' APPROXIMATED'KNOWLEDGE'' .( x ):# ' .( l ):# ' 1 1 0 0 30'
Implementa@on' • Symbolic'representa@on'of'knowledge' K � #⊂#D(E×G)#×#E proposi=onal'formulas' program'expressions' • (f,#e)#∈#E×G# returns'the'value'of' e# when #f# holds'in' !: ! if##⟦f⟧ !# then#⟦e⟧ !# else#⊤ • ɸ #∈#E# specifies'when'the'knowledge'is' ⊥ ! if##⟦ ɸ ⟧ !# then#⊥# ' 31'
Result'1:'Correctness'guarantee' • Hybrid'monitor'overZapproximates'a^acker’s'knowledge' [public'='0]' APPROXIMATED'' REAL'' 0' 1' KNOWLEDGE' KNOWLEDGE' h1=1 � h2=1 h1= 1 insecure 'execu@ons'' ' 32'
Result'2:'Precision' [h1=0,'h2=1,'l=0,'x=0]' if h1 = 1 then x = 1 else skip; if h2 = 1 then l = 1 else l = x; output l [l='0,'x=0]' 0' 1' APPROXIMATED'' REAL'' KNOWLEDGE' KNOWLEDGE' h1 = 1 � h2 = 1 h1 = 1 � h2 = 1 insecure 'execu@ons'' ' 33'
Result'3:'Enforcement'of' noninterference' [h=1,'x=1,'y=0]' if h = 1 then l = x + y; ACCEPTED' else l = x - y; output l [x=1,'y=0]' APPROXIMATED'' REAL'' 1' KNOWLEDGE' KNOWLEDGE' no knowledge no knowledge 1 secure 'execu@ons'' 34'
Result'4:'Provably'more'' permissive'monitor' l = 0; [l'='0]' if h = 1 then skip else h'='0' h'='1' 0' x = 5; while x > 0 do x = x-1; l = x; output l secure 'execu@ons'' Our'monitor'combined'with'inlined'dynamic'monitor' accepts'all'execu=ons'of'this'secure'program' (More'details'in'the'paper)' 35'
Conclusions' • Hybrid'monitor'tracks'a/acker’s'knowledge'' ! more'precise'than'[Besson'et'al.'CSF’13]' ! modeled'and'proved'correct' ! enforces'noninterference'(TINI)' ! has'running'prototype'' • Combina=on'with'another'monitor' ! proved'sound'(TINI)'' ! proved'more'permissive'than'previous'monitors' 36'
Postdoc'posi@on' • Informa=on'flow'control' • Security'monitors'and'type'systems' • Soundness'and'permissiveness' • Star@ng'date:'flexible,'Nov'2016'–'Jun'2017' • Dura@on:'1'year' • Loca@on:'INRIA'Sophia'An@polis'(Nice,'France)' 37'
Conclusions' • Hybrid'monitor'tracks'a/acker’s'knowledge'' ! more'precise'than'[Besson'et'al.’13]' ! modeled'and'proved'correct' ! enforces'noninterference'(TINI)' ! has'running'prototype'' • Combina=on'with'another'monitor' ! proved'sound'(TINI)'' ! proved'more'permissive' 38'
Recommend
More recommend