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