1
Software Side-Channel Analysis: Attack Synthesis
Lucas Bang
Dissertation Defense Committee: Tevfik Bultan (chair) ¨ Omer E˘ gecio˘ glu Ben Hardekopf
Software Side-Channel Analysis: Attack Synthesis Lucas Bang - - PowerPoint PPT Presentation
Software Side-Channel Analysis: Attack Synthesis Lucas Bang Dissertation Defense Committee: Tevfik Bultan (chair) Omer E gecio glu Ben Hardekopf 1 Publications during PhD Aydin, Bang , Bultan. [CAV 2015] Automata-Based Model
1
Dissertation Defense Committee: Tevfik Bultan (chair) ¨ Omer E˘ gecio˘ glu Ben Hardekopf
2 - 1
Bang, Aydin, Phan, Pasareanu, Bultan. [FSE 2016] “String Analysis for Side Channels with Segmented Oracles.” Bang, Rosner, Bultan. [Euro S&P 2018] “Online Synthesis of Adaptive Side-Channel Attacks Based On Noisy Observations.” Bang, Aydin, Bultan. [FSE 2015] “Automatically Computing Path Complexity of Programs.” Aydin, Eiers, Bang, Brennan, Gavrilov, Yu, Bultan. [FSE 2018 (accepted)] “Parameterized Model Counting for String and Numeric Constraints.”
Saha, Kadron, Eiers, Bang, Bultan. “Attack Synthesis for Strings via Incremental Model Counting and Meta-Heuristics.” Tsiskaridze, Bang, McMahan, Bultan, Sherwood. “Information Leakage in Arbiter Protocols.” Phan, Bang, Pasareanu, Malacaria, Bultan. [CSF 17] “Synthesis of Adaptive Side-Channel Attacks.” Aydin, Bang, Bultan. [CAV 2015] “Automata-Based Model Counting for String Constraints.”
2 - 2
Bang, Aydin, Phan, Pasareanu, Bultan. [FSE 2016] “String Analysis for Side Channels with Segmented Oracles.” Bang, Rosner, Bultan. [Euro S&P 2018] “Online Synthesis of Adaptive Side-Channel Attacks Based On Noisy Observations.” Bang, Aydin, Bultan. [FSE 2015] “Automatically Computing Path Complexity of Programs.” Aydin, Eiers, Bang, Brennan, Gavrilov, Yu, Bultan. [FSE 2018 (accepted)] “Parameterized Model Counting for String and Numeric Constraints.”
Saha, Kadron, Eiers, Bang, Bultan. “Attack Synthesis for Strings via Incremental Model Counting and Meta-Heuristics.” Tsiskaridze, Bang, McMahan, Bultan, Sherwood. “Information Leakage in Arbiter Protocols.” Phan, Bang, Pasareanu, Malacaria, Bultan. [CSF 17] “Synthesis of Adaptive Side-Channel Attacks.” Aydin, Bang, Bultan. [CAV 2015] “Automata-Based Model Counting for String Constraints.”
2 - 3
Bang, Aydin, Phan, Pasareanu, Bultan. [FSE 2016] “String Analysis for Side Channels with Segmented Oracles.” Bang, Rosner, Bultan. [Euro S&P 2018] “Online Synthesis of Adaptive Side-Channel Attacks Based On Noisy Observations.” Bang, Aydin, Bultan. [FSE 2015] “Automatically Computing Path Complexity of Programs.” Aydin, Eiers, Bang, Brennan, Gavrilov, Yu, Bultan. [FSE 2018 (accepted)] “Parameterized Model Counting for String and Numeric Constraints.”
Saha, Kadron, Eiers, Bang, Bultan. “Attack Synthesis for Strings via Incremental Model Counting and Meta-Heuristics.” Tsiskaridze, Bang, McMahan, Bultan, Sherwood. “Information Leakage in Arbiter Protocols.” Phan, Bang, Pasareanu, Malacaria, Bultan. [CSF 17] “Synthesis of Adaptive Side-Channel Attacks.” Aydin, Bang, Bultan. [CAV 2015] “Automata-Based Model Counting for String Constraints.”
3
4 - 1
4 - 2
4 - 3
4 - 4 Side channel: learn secrets through indirect observation. Time P i z z a s Panama Granada Kuwait
5 - 1
5 - 2
5 - 3
1 private s = getBufferSize();
5 - 4
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, i
5 - 5
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, i s ≤ i ⇒ o = 1
5 - 6
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, i s ≤ i ⇒ o = 1 s > i ⇒ o = 2
5 - 7
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, i s ≤ i ⇒ o = 1 s > i ⇒ o = 2
5 - 8
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, i s ≤ i ⇒ o = 1 s > i ⇒ o = 2
5 - 9
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, i s ≤ i ⇒ o = 1 s > i ⇒ o = 2
5 - 10
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, i s ≤ i ⇒ o = 1 s > i ⇒ o = 2
5 - 11
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, i s ≤ i ⇒ o = 1 s > i ⇒ o = 2
5 - 12
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, i s ≤ i ⇒ o = 1 s > i ⇒ o = 2
5 - 13
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, i
5 - 14
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, 4
5 - 15
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, 4
5 - 16
1 private s = getBufferSize(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 log.write("too large"); // 1 s 7 else 8 some computation; // 2 s 9 return 0; 10 } 1 private s = getBufferSize();
input, 4
Attacker can binary search on s using i and o.
6
7 - 1
Boolean compare(pw, input){ for(int i = 0; i < pw.length(), i++) if(pw[i] != input[i]) return false; return true; }
7 - 2
Boolean compare(pw, input){ for(int i = 0; i < pw.length(), i++) if(pw[i] != input[i]) return false; return true; }
Automated Analysis Synthesized Attack
7 - 3
Boolean compare(pw, input){ for(int i = 0; i < pw.length(), i++) if(pw[i] != input[i]) return false; return true; }
Automated Analysis Synthesized Attack
7 - 4
Boolean compare(pw, input){ for(int i = 0; i < pw.length(), i++) if(pw[i] != input[i]) return false; return true; }
Automated Analysis Synthesized Attack
7 - 5
Boolean compare(pw, input){ for(int i = 0; i < pw.length(), i++) if(pw[i] != input[i]) return false; return true; }
Automated Analysis Synthesized Attack
8 - 1
8 - 2 secret s ∈ S i ∈ I
S
8 - 3 secret s ∈ S i ∈ I
S
8 - 4 secret s ∈ S i ∈ I
S
8 - 5 secret s ∈ S i ∈ I
S
8 - 6 secret s ∈ S i ∈ I
S
8 - 7 secret s ∈ S i ∈ I
Good outcome, very unlikely.
S
8 - 8 secret s ∈ S i ∈ I
Bad outcome, very likely.
S
8 - 9 secret s ∈ S i ∈ I
S
8 - 10 secret s ∈ S i ∈ I s
S
8 - 11 secret s ∈ S i ∈ I s
S
8 - 12 secret s ∈ S i ∈ I s p(s ∈ )
S
8 - 13 secret s ∈ S i ∈ I s p(s ∈ ) =
S
8 - 14 secret s ∈ S i ∈ I
S
8 - 15 secret s ∈ S i ∈ I
Quantify expected information gain measured in bits.
S
8 - 16 secret s ∈ S i ∈ I
Quantify expected information gain measured in bits.
S
8 - 17 secret s ∈ S i ∈ I
Quantify expected information gain measured in bits.
S
8 - 18 secret s ∈ S i ∈ I
Quantify expected information gain measured in bits.
S
8 - 19 secret s ∈ S i ∈ I
Quantify expected information gain measured in bits.
S
8 - 20 secret s ∈ S i ∈ I Quantify expected information gain measured in bits.
i
S
9 - 1
9 - 2
9 - 3
9 - 4
9 - 5
9 - 6
10 - 1
Execute program on symbolic rather than concrete inputs. Maintain path constraints, PCs, φj over symbolic inputs. if(c) then s1; else s2;
For branch instructions: φj(s, i) characterizes the relation between s, i, and oj
10 - 2
Execute program on symbolic rather than concrete inputs. Maintain path constraints, PCs, φj over symbolic inputs. if(c) then s1; else s2;
Maintain path constraints, PCs, φj over symbolic inputs. For branch instructions: φ1 φ2 φ3 φ4 φj(s, i) characterizes the relation between s, i, and oj
11 - 1
11 - 2 φ
φ = #φ (i)
11 - 3 {φj (s, i )}
{#φj (i)} φ
φ = #φ (i)
11 - 4 {φj (s, i )}
{#φj (i)} φ #φ (i) is the number of satisfying solutions (models) for φ (s, i) for a given i.
φ = #φ (i)
11 - 5 {φj (s, i )}
{#φj (i)} φ #φ (i) is the number of satisfying solutions (models) for φ (s, i) for a given i.
|S|
φ = #φ (i)
11 - 6 {φj (s, i )}
{#φj (i)} φ #φ (i) is the number of satisfying solutions (models) for φ (s, i) for a given i.
|S|
φ = #φ (i)
12 - 1 Symbolic Execution Model Counting Information Theory
H(i) is a symbolic expression that measures the expected information an attacker gains when making input i.
12 - 2 Maximize
i∗ Symbolic Execution Model Counting Information Theory
H(i) is a symbolic expression that measures the expected information an attacker gains when making input i. Maximizing H(i) gives an optimal side-channel attack. [IEEE Computer Security Foundations 2017]
13 - 1
Assumes an ideal observation model (i.e. instruction counts). Does not account for actual runtime behavior.
13 - 2
Assumes an ideal observation model (i.e. instruction counts). Does not account for actual runtime behavior.
Automatically, dynamically estimates runtime observations. Uses Bayesian inference and weighted model counting to account for noise.
14 - 1
[IEEE European Security & Privacy 2018]
14 - 2
1 private s = getMaxBytes(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 some computation; // 1 s 7 else 8 log.write("too many bytes");// 2s 9 return 0; 10 }
14 - 3
1 private s = getMaxBytes(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 some computation; // 1 s 7 else 8 log.write("too many bytes");// 2s 9 return 0; 10 }
14 - 4
1 private s = getMaxBytes(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 some computation; // 1 s 7 else 8 log.write("too many bytes");// 2s 9 return 0; 10 }
14 - 5
1 private s = getMaxBytes(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 some computation; // 1 s 7 else 8 log.write("too many bytes");// 2s 9 return 0; 10 }
14 - 6
1 private s = getMaxBytes(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 some computation; // 1 s 7 else 8 log.write("too many bytes");// 2s 9 return 0; 10 }
input, i
14 - 7
1 private s = getMaxBytes(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 some computation; // 1 s 7 else 8 log.write("too many bytes");// 2s 9 return 0; 10 }
input, i
14 - 8
1 private s = getMaxBytes(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 some computation; // 1 s 7 else 8 log.write("too many bytes");// 2s 9 return 0; 10 }
input, i
14 - 9
1 private s = getMaxBytes(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 some computation; // 1 s 7 else 8 log.write("too many bytes");// 2s 9 return 0; 10 }
input, i
14 - 10
1 private s = getMaxBytes(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 some computation; // 1 s 7 else 8 log.write("too many bytes");// 2s 9 return 0; 10 }
input, i
14 - 11
1 private s = getMaxBytes(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 some computation; // 1 s 7 else 8 log.write("too many bytes");// 2s 9 return 0; 10 }
input, i
s ≤ i
14 - 12
1 private s = getMaxBytes(); 2 3 4 public int compare(int i){ 5 if(s <= i) 6 some computation; // 1 s 7 else 8 log.write("too many bytes");// 2s 9 return 0; 10 }
input, i
s ≤ i s > i
15 - 1
15 - 2 s? Attacker Belief
15 - 3 s?
1 8
1 2 3 4 5 6 7 8
Attacker Belief
15 - 4 s?
1 8
1 2 3 4 5 6 7 8
Attacker Belief Input Choice i∗
15 - 5 s? s ≤ i s > i
1 8
1 2 3 4 5 6 7 8
Attacker Belief Input Choice i∗ Observation Noise
15 - 6 s?
1 8
1 2 3 4 5 6 7 8
Attacker Belief Input Choice i∗ Observation Noise = 5 s ≤ 5 s > 5
15 - 7 s?
1 8
1 2 3 4 5 6 7 8
Attacker Belief Input Choice i∗ Observation Noise = 5 s ≤ 5 s > 5
t = 4.12
15 - 8 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
1 3
s ≤ 5 s > 5
t = 4.12
15 - 9 s?
1 8
1 2 3 4 5 6 7 8
Attacker Belief Input Choice i∗ Observation Noise = 5 s ≤ 5 s > 5
15 - 10 s?
1 8
1 2 3 4 5 6 7 8
Attacker Belief Input Choice i∗ Observation Noise = 5
more likely
s ≤ 5 s > 5 t = 2.3
less likely
15 - 11 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
s ≤ 5 s > 5
15 - 12 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
p(s|o, i∗) s ≤ 5 s > 5
15 - 13 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
p(o|s, i) p(s|o, i∗) s ≤ 5 s > 5
15 - 14 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
p(o|s, i) p(s|o, i∗) p(o|s, i) s ≤ 5 s > 5
15 - 15 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
p(o|s, i) p(s|o, i∗) p(o|s, i∗) s ≤ 5 s > 5
15 - 16 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
p(o|s, i) p(s|o, i∗) p(o|s, i∗) s ≤ 5 s > 5
15 - 17 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
p(o|s, i) p(s|o, i∗) p(s|o, i∗) s ≤ 5 s > 5
15 - 18 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
p(o|s, i) p(s|o, i∗) p(s|o, i∗) Bayes’ Rule s ≤ 5 s > 5
15 - 19 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
p(o|s, i) p(s|o, i∗) p(s|o, i∗) Bayes’ Rule s ≤ 5 s > 5
15 - 20 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
p(o|s, i) p(s|o, i∗) p(s|o, i∗) Bayes’ Rule
Model Counting
s ≤ 5 s > 5
15 - 21 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
p(o|s, i) p(s|o, i∗) p(s|o, i∗) Bayes’ Rule
Weighted Model Counting
s ≤ 5 s > 5
15 - 22 s? Attacker Belief Input Choice i∗ Observation Noise = 5
1 8
1 2 3 4 5 6 7 8
p(o|s, i) p(s|o, i∗) p(s|o, i∗) Bayes’ Rule
Weighted Model Counting
max H(i) s ≤ 5 s > 5
16 - 1
16 - 2
16 - 3
16 - 4
16 - 5
16 - 6
Source Code
Symbolic Execution {φj (s, i )} P (s, i )
path constraints
16 - 7
Source Code
Symbolic Execution {φj (s, i )} P (s, i )
path constraints
{wj = (sj, ij )}
PC models(witnesses)
16 - 8
Source Code
Symbolic Execution {φj (s, i )} P (s, i )
path constraints
{wj = (sj, ij )}
PC models(witnesses)
Each PC characterizes an observable program behavior (s, i ) | = φj (s′, i′ ) | = φj
16 - 9
Source Code
Symbolic Execution {φj (s, i )} P (s, i )
path constraints
{wj = (sj, ij )}
PC models(witnesses)
Each PC characterizes an observable program behavior (s, i ) | = φj (s′, i′ ) | = φj P (s, i ) P (s′, i′ )
constraints
16 - 10
Source Code
Symbolic Execution {φj (s, i )} P (s, i )
path constraints
{wj = (sj, ij )}
PC models(witnesses)
Each PC characterizes an observable program behavior (s, i ) | = φj (s′, i′ ) | = φj P (s, i ) P (s′, i′ )
characterizes observationally indistinguishable behaviors φj (s, i ) P (s, i ) is a representative of all behaviors in that class
constraints
16 - 11
16 - 12
16 - 13 Characterize effect of noise on each class of program behaviors using the witness for that behavior.
16 - 14 {wj = (si, ij )}
P (s, i ) HW / OS
Network Characterize effect of noise on each class of program behaviors using the witness for that behavior.
16 - 15 {wj = (si, ij )}
P (s, i ) HW / OS
Network Characterize effect of noise on each class of program behaviors using the witness for that behavior.
16 - 16 {wj = (si, ij )}
P (s, i ) HW / OS
Network Characterize effect of noise on each class of program behaviors using the witness for that behavior.
16 - 17 {wj = (si, ij )}
P (s, i ) HW / OS
Network ×1000 Characterize effect of noise on each class of program behaviors using the witness for that behavior.
16 - 18 {wj = (si, ij )}
P (s, i ) HW / OS
Network ×1000
p(o|sj, ij) Characterize effect of noise on each class of program behaviors using the witness for that behavior.
16 - 19 {wj = (si, ij )}
P (s, i ) HW / OS
Network ×1000
p(o|sj, ij) Characterize effect of noise on each class of program behaviors using the witness for that behavior.
16 - 20 {wj = (si, ij )}
P (s, i ) HW / OS
Network ×1000
p(o|sj, ij) Characterize effect of noise on each class of program behaviors using the witness for that behavior.
n
16 - 21 {wj = (si, ij )}
P (s, i ) HW / OS
Network ×1000
p(o|sj, ij) Characterize effect of noise on each class of program behaviors using the witness for that behavior.
16 - 22 {wj = (si, ij )}
P (s, i ) HW / OS
Network ×1000
p(o|sj, ij) Characterize effect of noise on each class of program behaviors using the witness for that behavior.
−∞
16 - 23 {wj = (si, ij )}
P (s, i ) HW / OS
Network ×1000
p(o|sj, ij) Characterize effect of noise on each class of program behaviors using the witness for that behavior. Observation constraint φ′: Disjunction over path constraints which characterizes inputs that are observationally indistinguishable via side-channel observation.
16 - 24
16 - 25
ˆ p(o|φ) Belief p(s)
16 - 26
i∗
ˆ p(o|φ) Belief p(s)
16 - 27
i∗
ˆ p(o|φ) Belief p(s)
P (s, i ) HW / OS
Network
16 - 28
i∗
ˆ p(o|φ) Belief
P (s, i ) HW / OS
Network p(s|o, i∗)
Bayesian Update
16 - 29
i∗
ˆ p(o|φ) Belief
P (s, i ) HW / OS
Network p(s|o, i∗)
Bayesian Update
16 - 30
i∗
ˆ p(o|φ) Belief
P (s, i ) HW / OS
Network p(s|o, i∗)
Bayesian Update
I(s; φ(s, i)|i) = −
n
p(φ(s, i)|i) log2 p(φ(s, i)|i) Expected info gain given attacker input Observation constraint probabilities
16 - 31
i∗
ˆ p(o|φ) Belief
P (s, i ) HW / OS
Network p(s|o, i∗)
Bayesian Update
I(s; φ(s, i)|i) = −
n
p(φ(s, i)|i) log2 p(φ(s, i)|i) Expected info gain given attacker input Observation constraint probabilities p(φ(s, i)|i) =
p(s)φ(s, i)
16 - 32
i∗
ˆ p(o|φ) Belief
P (s, i ) HW / OS
Network p(s|o, i∗)
Bayesian Update
I(s; φ(s, i)|i) = −
n
p(φ(s, i)|i) log2 p(φ(s, i)|i) Expected info gain given attacker input Observation constraint probabilities p(φ(s, i)|i) =
p(s)φ(s, i) Model Counting
16 - 33
i∗
ˆ p(o|φ) Belief
P (s, i ) HW / OS
Network p(s|o, i∗)
Bayesian Update
I(s; φ(s, i)|i) = −
n
p(φ(s, i)|i) log2 p(φ(s, i)|i) Expected info gain given attacker input Observation constraint probabilities p(φ(s, i)|i) =
p(s)φ(s, i) Model Counting Weighted
16 - 34
i∗
ˆ p(o|φ) Belief
P (s, i ) HW / OS
Network p(s|o, i∗)
Bayesian Update
I(s; φ(s, i)|i) = −
n
p(φ(s, i)|i) log2 p(φ(s, i)|i) Expected info gain given attacker input Observation constraint probabilities p(φ(s, i)|i) =
p(s)φ(s, i) Barvinok
16 - 35
17 NASA Symbolic PathFinder (SPF) Z3 Constraint Solver Python Profiler Client NUC Server Barvinok Mathematica Weighted Symbolic Model Counting Numeric Maximization Symbolic Entropy Computation Intel P (s, i )
18
DB: key = employee ID Some employee IDs have restricted access.
Writes to log file depending on whether IDres ∈ [minID, maxID] From DARPA Space-Time Analysis for Cybersecurity (STAC)
19 - 1 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 2 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 3 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 4 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 5 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 6 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 7 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 8 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 9 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 10 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 11 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 12 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 13 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 14 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 15 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 16 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 17 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 18 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 19 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 20 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 21 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 22 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 23 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 24 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
19 - 25 IDres = 92 1 ≤ ID ≤ 100 ID1 = 64 ID2 = 85
20 ID Range # Employees Offline Analysis Attack time (m) # steps 1-100 1-10000 1-10000 1-10000 3 4 5 10 57s 2m21s 6m30s 42m09s 2m38s 2m43s 3m08s 4m31s 25 45 48 77
21 - 1 Boolean compare(String pw, String input){ for(int i = 0; i < pw.length, i++) if(pw[i] != input[i]) return false; return true; }
21 - 2
Boolean compare(String pw, String input){ for(int i = 0; i < pw.length, i++) if(pw[i] != input[i]) return false; return true; }
21 - 3
Boolean compare(String pw, String input){ for(int i = 0; i < pw.length, i++) if(pw[i] != input[i]) return false; return true; }
21 - 4
Boolean compare(String pw, String input){ for(int i = 0; i < pw.length, i++) if(pw[i] != input[i]) return false; return true; }
21 - 5
Boolean compare(String pw, String input){ for(int i = 0; i < pw.length, i++) if(pw[i] != input[i]) return false; return true; }
21 - 6
Boolean compare(String pw, String input){ for(int i = 0; i < pw.length, i++) if(pw[i] != input[i]) return false; return true; }
21 - 7
Boolean compare(String pw, String input){ for(int i = 0; i < pw.length, i++) if(pw[i] != input[i]) return false; return true; }
21 - 8
Boolean compare(String pw, String input){ for(int i = 0; i < pw.length, i++) if(pw[i] != input[i]) return false; return true; }
21 - 9
Boolean compare(String pw, String input){ for(int i = 0; i < pw.length, i++) if(pw[i] != input[i]) return false; return true; }
String Analysis for Side Channels with Segmented Oracles [IEEE Foundations of Software Engineering 2016]
22 - 1 Attack Synthesis vs. PW Checker
22 - 2
ε fzgk daaz zgap uaak bnza ecjq zmna tzar zmna maau vzsc qyas asvr cmxq csja cnte cwcs ctdo cved cvfo ceyu ciil ciub ciij cimq citz ciqz ciaz ciok cida cijw . . . cigz cisu cisp cine ciqk ciqi ciqz ciqz ciqu ciqz ciqc ciqz ciqe ciqr . . . ciqk ciqd ciqd ciqr ciqz
Phase 0 Phase 1 Phase 2 Phase 3
ciqa ciqa ciqg ciqa
Phase 4 Attack Synthesis vs. PW Checker
22 - 3
ε fzgk daaz zgap uaak bnza ecjq zmna tzar zmna maau vzsc qyas asvr cmxq csja cnte cwcs ctdo cved cvfo ceyu ciil ciub ciij cimq citz ciqz ciaz ciok cida cijw . . . cigz cisu cisp cine ciqk ciqi ciqz ciqz ciqu ciqz ciqc ciqz ciqe ciqr . . . ciqk ciqd ciqd ciqr ciqz
Phase 0 Phase 1 Phase 2 Phase 3
ciqa ciqa ciqg ciqa
Phase 4 Attack Synthesis vs. PW Checker
22 - 4
ε fzgk daaz zgap uaak bnza ecjq zmna tzar zmna maau vzsc qyas asvr cmxq csja cnte cwcs ctdo cved cvfo ceyu ciil ciub ciij cimq citz ciqz ciaz ciok cida cijw . . . cigz cisu cisp cine ciqk ciqi ciqz ciqz ciqu ciqz ciqc ciqz ciqe ciqr . . . ciqk ciqd ciqd ciqr ciqz
Phase 0 Phase 1 Phase 2 Phase 3
ciqa ciqa ciqg ciqa
Phase 4 Attack Synthesis vs. PW Checker
22 - 5
ε fzgk daaz zgap uaak bnza ecjq zmna tzar zmna maau vzsc qyas asvr cmxq csja cnte cwcs ctdo cved cvfo ceyu ciil ciub ciij cimq citz ciqz ciaz ciok cida cijw . . . cigz cisu cisp cine ciqk ciqi ciqz ciqz ciqu ciqz ciqc ciqz ciqe ciqr . . . ciqk ciqd ciqd ciqr ciqz
Phase 0 Phase 1 Phase 2 Phase 3
ciqa ciqa ciqg ciqa
Phase 4 Attack Synthesis vs. PW Checker
22 - 6
ε fzgk daaz zgap uaak bnza ecjq zmna tzar zmna maau vzsc qyas asvr cmxq csja cnte cwcs ctdo cved cvfo ceyu ciil ciub ciij cimq citz ciqz ciaz ciok cida cijw . . . cigz cisu cisp cine ciqk ciqi ciqz ciqz ciqu ciqz ciqc ciqz ciqe ciqr . . . ciqk ciqd ciqd ciqr ciqz
Phase 0 Phase 1 Phase 2 Phase 3
ciqa ciqa ciqg ciqa
Phase 4 Attack Synthesis vs. PW Checker
22 - 7
ε fzgk daaz zgap uaak bnza ecjq zmna tzar zmna maau vzsc qyas asvr cmxq csja cnte cwcs ctdo cved cvfo ceyu ciil ciub ciij cimq citz ciqz ciaz ciok cida cijw . . . cigz cisu cisp cine ciqk ciqi ciqz ciqz ciqu ciqz ciqc ciqz ciqe ciqr . . . ciqk ciqd ciqd ciqr ciqz
Phase 0 Phase 1 Phase 2 Phase 3
ciqa ciqa ciqg ciqa
Phase 4 Attack Synthesis vs. PW Checker
22 - 8 Attack Synthesis vs. PW Checker Offline time: 9m54s Attack time: 19m03s Attack steps: 79
23 - 1
int memcmp(s1, s2, n) CONST VOID *s1; CONST VOID *s2; size t n; { unsigned char u1, u2; for ( ; n−− ; s1++, s2++) { u1 = * (unsigned char *) s1; u2 = * (unsigned char *) s2; if ( u1 != u2) { return (u1-u2); } } return 0; }
23 - 2
int memcmp(s1, s2, n) CONST VOID *s1; CONST VOID *s2; size t n; { unsigned char u1, u2; for ( ; n−− ; s1++, s2++) { u1 = * (unsigned char *) s1; u2 = * (unsigned char *) s2; if ( u1 != u2) { return (u1-u2); } } return 0; }
Xbox OS, HMAC signatures compared with memcmp! Allowed insecure kernel downgrade.
24 - 1
24 - 2
24 - 3
24 - 4
24 - 5
24 - 6
24 - 7
24 - 8
25
STAC–1 STAC–3 STAC–11A STAC–11B STAC–4 STAC–12
Number of Attack Steps Attack Synthesis Time |S|, Secret Domain Size |S|, Secret Domain Size
26
Boolean compare(String pw, String input){ for(int i = 0; i < pw.length, i++) if(pw[i] != input[i]) return false; return true; } “Premature optimization is the root of all evil.” - Donald Knuth
27 Maximize
i ∗ Symbolic Execution Model Counting Entropy
Quantifying side-channel leaks with model counting. Static offline attack synthesis. Dynamic online attack synthesis with noise. QIF and attack synthesis for segment oracles.
28
29
Bang, Aydin, Phan, Pasareanu, Bultan. [FSE 2016] “String Analysis for Side Channels with Segmented Oracles.” Bang, Rosner, Bultan. [Euro S&P 2018] “Online Synthesis of Adaptive Side-Channel Attacks Based On Noisy Observations.” Bang, Aydin, Bultan. [FSE 2015] “Automatically Computing Path Complexity of Programs.” Aydin, Eiers, Bang, Brennan, Gavrilov, Yu, Bultan. [FSE 2018 (accepted)] “Parameterized Model Counting for String and Numeric Constraints.”
Saha, Kadron, Eiers, Bang, Bultan. “Attack Synthesis for Strings via Incremental Model Counting and Meta-Heuristics.” Tsiskaridze, Bang, McMahan, Bultan, Sherwood. “Information Leakage in Arbiter Protocols.” Phan, Bang, Pasareanu, Malacaria, Bultan. [CSF 17] “Synthesis of Adaptive Side-Channel Attacks.” Aydin, Bang, Bultan. [CAV 2015] “Automata-Based Model Counting for String Constraints.”