Discriminating Traces with Time

Saeid Tizpaz-Niari, Pavol Cerný, Bor-Yuh Evan Chang, Sriram Sankaranarayanan, Ashutosh Trivedi

Abstract

Timing side-channel vulnerabilities pose a significant security risk, allowing attackers to infer sensitive data by measuring program execution duration. Identifying the specific code responsible for these variations is difficult in complex applications. This paper presents DISCRIMINER, a tool that solves the trace-set discrimination problem by identifying Boolean formulas (discriminants) that explain timing differences. Using a combination of k-means clustering and decision tree learning (CART), DISCRIMINER provides developers with interpretable maps of timing leaks. Experimental results on micro-benchmarks and DARPA STAC applications show high accuracy and scalability compared to formal ILP-based methods.

Introduction

In software security, execution time can be a covert channel for data leakage. For instance, if a program processes a secure image significantly slower than a standard one, an observer can infer the nature of the data. These timing side-channels are difficult to debug because traditional profilers focus on single-run performance rather than the variance between multiple runs. The core challenge is the trace-set discrimination problem: given a set of execution traces with varying times, how can we find a simple explanation for why some are slower than others?

Methodology: The DISCRIMINER Approach

The authors propose a framework to automatically generate discriminants from execution traces. While they initially explored a formal method using Integer Linear Programming (ILP) to find maximum likelihood discriminants, they found it lacked scalability for real-world applications.

Instead, DISCRIMINER utilizes a two-step machine learning approach:

  1. Clustering: Execution times from various traces are grouped into discrete "bins" using k-means clustering. This transforms the continuous timing data into categorical labels such as "Fast," "Medium," or "Slow."
Clustered execution times showing distinct timing bins for different traces.
  1. Decision Tree Learning: Using the CART (Classification and Regression Trees) algorithm, the tool trains a model where the features are the presence or frequency of specific method calls. The resulting tree serves as a human-readable discriminant.
A decision tree discriminant identifying specific method calls responsible for timing variations.

As shown in Figure 2, the tree provides a logical flow. For example, if image.OilFilter.filterPixels is called, the execution is classified into a high-timing bin (15.7s), pinpointing the source of the delay.

Evaluation and Results

The tool was evaluated against two primary datasets: micro-benchmarks with intentional timing leaks and three medium-sized Java applications from the DARPA STAC program (SnapBuddy, GabFeed, and TextCrunchr).

DISCRIMINER demonstrated a significant scalability advantage. On large benchmarks, the decision tree approach produced results in 4.2 seconds, whereas the ILP method required over 10 minutes. Furthermore, the models achieved classification accuracies often exceeding 97-99%.

In practical security analysis, the tool successfully identified:

  • Private Key Leaks: In GabFeed, it found that OptimizedMultiplier.standardMultiply calls leaked bits of a 3064-bit private key.
  • Denial-of-Service Vulnerabilities: In TextCrunchr, it identified that Quicksort partitioning (stac.sort.qsPartition) was triggered by specific inputs, leading to worst-case performance.

Conclusion

DISCRIMINER offers a scalable, interpretable solution for identifying timing side-channels without requiring prior knowledge of the codebase. While currently focused on deterministic systems and method-level granularity, future work aims to extend the tool to reactive systems and network-level monitoring to address more complex, distributed vulnerabilities.

Summary updated

BibTeX
@inproceedings{tizpazniari2017discriminating,
  author = {Saeid Tizpaz-Niari and Pavol Cerný and Bor-Yuh Evan Chang and Sriram Sankaranarayanan and Ashutosh Trivedi},
  title = {{Discriminating Traces with Time}},
  booktitle = {TACAS},
  year = {2017},
  url = {https://openreview.net/forum?id=KHlFIl4SUV},
}
Figure