FUCHSIA: Data-Driven Debugging for Functional Side Channels Saeid Tizpaz-Niari* , Pavol Cerny, Ashutosh Trivedi *University of Colorado Boulder
Functional Case Motivation Side Channels Studies
Functional Case Motivation Side Channels Studies
https://www.eclipse.org/jetty/
V1 … m m b a b b b b b c c c c c d d d d d e e e e e f f f f f m m m m m m m … y y y y y y p c c p c p p a a d d d d a e s e e e s e s f f f f f f m y p a s s 0.5 (s) 0.5 (s) 0.5 (s) 1.0 (s) 1.0 (s) 1.5 (s) V2 a b c d e m y p a s s a a b b c c d d e e f f 1.0 (s) 0.5 (s) 0.5 (s) ? V3 5
- Time does not exist in the syntax or semantic - Large applications with dynamic features
Data-Driven Di ff erential Debugging: Program Analysis + ML 7
V3 jetty.security… jetty.security… StringEquals_bblock_5 StringEquals_bblock_106 jetty.security… jetty.security… StringEquals_bblock_5 StringEquals_bblock_106 Secret Guess password aa1234 password pa12cd password … Secret=‘pass’ mypass a1b2c3 Time Time Guess=‘a’ Guess=‘abcdefgh’ Guess=‘abcd’ Guess=‘abcde’ Guess=‘abc’ Guess=‘ab’ Guess=‘b’ mypass mypa … … Time Time Time Time Public Input (Guess) Public Input (Guess) Public Input (Guess) Public Input (Guess) Public Input (Guess) Public Input 8
V3 jetty.security… jetty.security… StringEquals_bblock_5 StringEquals_bblock_106 jetty.security… jetty.security… StringEquals_bblock_5 StringEquals_bblock_106 Secret Guess password aa1234 password pa12cd password … Secret=‘pass’ mypass a1b2c3 Time Time Guess=‘a’ Guess=‘abcdefgh’ Guess=‘abcd’ Guess=‘abcde’ Guess=‘abc’ Guess=‘ab’ Guess=‘b’ mypass mypa … … Time Time Time Time Public Input (Guess) Public Input (Guess) Public Input (Guess) Public Input (Guess) Public Input (Guess) Public Input 9
Functional Case Motivation Side Channels Studies
Secret Input Secret Input Secret Input Secret Input Secret Input Output Output Output Output Output “1010” “1010” “1010” “110” 1025 24 5 5 3 “110” Public Input Public Input Public Input Public Input Public Input “1000” “101” “10” “1” “0” Time Time Time Time Time 40 32 4 2 2 Time secret = “1010” secret = “110” p1 p2 … pN Public Input 11
Attacker’s Local Observations Attacker’s Remote Observations s%2=1 | s%2=0 Time (ms) Time (ms) s%2=1 s%2=1 6 6 5 5 4 4 s%2=0 s%2=0 3 3 2 2 1 1 p1 p2 … pN p1 p2 … pN Public Input Public Input s%2=0 s%2=1 s%2=1 Time (ms) Time (ms) 6 6 5 5 4 4 s%2=0 s%2=0 3 3 2 2 1 1 p1 p2 … pN p1 p2 … pN Public Input Public Input 12
Point-wise Noninterference: Nilizadeh et al., ICSE’19 P1 P2 Time Time Public Input Public Input “011” “1010” “1010” “1111” “1111” “011” “0” “1” “011” “1111” Functional Noninterference: Tizpaz-Niari et al., NDSS’20 Time Time Public Input Public Input 13
Clustering: Distinguishable Functional Observations
dist ( f 0 , f 4 ) > ϵ f 20 f 8 f 4 Time Time f 0 p1 p2 … pN p1 p2 … pN Public Input Public Input ( f 0 , f 8 ) in the same cluster ! ( f 0 , f 20 ) in the same cluster ! ( f 0 , f 4 ) in the same cluster ! 15
Classification: Root Cause of Timing Side Channels
Secret Public “110” “0” “110” “1” Instrumented Program “110” “00” … … BasicBlock_13 Basic_Block_18 “0110” “0” “0110” “1” BasicBlock_13 Basic_Block_18 “0110” “00” … … Secret = “0110” Secret = “0110” Secret = “110” Secret = “110” BasicBlock_13 Basic_Block_18 BasicBlock_13 Basic_Block_18 Public 1 “01” 2 1 2 “111” 3 3 1 3 “1101” 1 4 4 4 … … … … min(3,y) 1 * y min(4,y) 1 * y 17
Secret Public “110” “0” “110” “1” Instrumented Program “110” “00” … … BasicBlock_13 Basic_Block_18 “0110” “0” “0110” “1” BasicBlock_13 Basic_Block_18 “0110” “00” … … Secret = “0110” Secret = “0110” Secret = “110” Secret = “110” Secret Basic_Block_18 BasicBlock_13 … Label BasicBlock_13 Basic_Block_18 BasicBlock_13 Basic_Block_18 “1” min(1,y) y … Public “10” min(2,y) y … 1 “01” 2 1 2 “110” min(3,y) y … “111” 3 3 1 3 “1101” “1101” min(4,y) y … 1 4 4 4 “0110” min(4,y) y … … … … … …. … … … min(3,y) 1 * y min(4,y) 1 * y 18
Functional Case Motivation Side Channels Studies
Regular Expressions in Java (#Methods: 620)
Regex Library java.util.regex.Pattern. java.util.regex.Patter call_bblock_10 n. Slice_bblock_3964 java.util.regex.Pattern. java.util.regex.Patter call_bblock_10 n. Slice_bblock_3964 Secret Guess “abc123” “aa123” “abc123” “mypa" “abc123” … “mypass” “aa123” “mypass” “mypa” Time (micro-s) Time (micro-s) … … Public Input Public Input 21
Regex Library java.util.regex.Pattern. java.util.regex.Patter call_bblock_10 n. Slice_bblock_3964 java.util.regex.Pattern. java.util.regex.Patter call_bblock_10 n. Slice_bblock_3964 Secret Guess “abc123” “aa123” “abc123” “mypa" “abc123” … “mypass” “aa123” “mypass” “mypa” Time (micro-s) Time (micro-s) … … Public Input Public Input 22
iControl-SOAP (User Credential) #Method: 41,541 Java X (Crypto) #Method: 63 SnapBuddy (Social Network) #Method: 3,071 Stegosaurus (Message Service) #Method: 273
Thank you for your attention! Saeid.Tizpazniari@colorado.edu
Recommend
More recommend