This work is concerned with the field of static program analysis — in
particular with analyses aimed to guarantee certain security properties
of programs, like confidentiality and integrity. Our approach uses so called
dependence graphs to capture the program behavior as well as the
information flow between the individual program points. Using this
technique, we can guarantee for example that a program does not reveal
any information about a secret password.
In particular we focus on techniques that improve the dependence
graph computation —the basis for many advanced security analyses.
We incorporated the presented algorithms and improvements into our
analysis tool Joana and published its source code as open source. Several
collaborations with other researchers and publications using Joana
demonstrate the relevance of these improvements for practical research.
This work consists essentially of three parts. Part 1 deals with improvements
in the computation of the dependence graph, Part 2 introduces a
new approach to the analysis of incomplete programs and Part 3 shows
current use cases of Joana on concrete examples.
In the first part we describe the algorithms used to compute a dependence
graph, with special attention to the problems and challenges
that arise when analyzing object-oriented languages such as Java. For
example we present an analysis that improves the precision of detected
control flow by incorporating the effects of exceptions. The main improvement
concerns the way side effects —caused by communication
over methods boundaries— are modelled. Dependence graphs capture
side effects —memory locations read or changed by a method— in the
form of additional nodes called parameter nodes. We show that the
structure and computation of these nodes have a huge impact on both
the precision and scalability of the entire analysis. The so-called parameter
model describes the algorithms used to compute these nodes. We explain
the weakness of the old parameter model based on object-trees and present
our improvements in form of a new model using object-graphs. The new
graph structure merges redundant information of multiple nodes into a
single node and thus reduces the number of overall parameter nodes
significantly — which in turn speeds up the analysis without sacrificing
the precision of the resulting dependence graph. These changes are
already visible when analyzing smaller programs with a few thousand
lines of code: We achieve on average a 8 times faster runtime while
the precision of the result remains intact and is usually even enhanced.
The differences are even more pronounced for larger programs. Some of
our test cases and all tested programs larger than 20,000 lines of code
could only be analyzed with the object-graph parameter model. Due to
these enhancements Joana is now able to analyze much larger programs
and also profits from enhanced precision with smaller programs.
In the second part we tackle the problem that security analyses based
on dependence graphs previously required a whole program in order to
compute. For example, it was impossible to preprocess or analyze program
parts like library code without knowledge of the application code using
it. We discovered a monotonicity property in the current analysis that
allows us to reuse analysis results from a program part at a given usage
point to conservatively approximate the expected results at another point
without the need to reanalyze the program part. Due to monotonicity
we are able to make valid statements about the security properties of a
program part in general, without knowledge of its usage points. It also
allows us to preprocess program parts in form of a modular dependence
graph in a way that can be adjusted later on to a concrete usage point.
We define the monotonicity property in detail and outline a proof of
its correctness. Based on this observation, we develop an approach to
preprocess program parts with modular dependence graphs. As the
precise computation of modular dependence graphs can become very
costly, we developed an algorithm based on so-called access paths to
improve scalability. Finally, we sketch a proof showing the presented
algorithm in fact always computes a conservative approximation of
the modular graph and therefore any security analysis performed on a
modular graph remains sound.
The third part contains successful applications of Joana. We present
the results of a cooperation with Ralf Küsters from the University of
Trier. We explain how our security tool Joana is used in general and also
how —in combination with other security tools and techniques— we
were able to proof cryptographic security properties for Java programs
—a task previously not possible for tools based purely on information
flow control. These applications show how the usability improvements
of Joana —developed in the context of this work— considerably reduce
the effort required to setup the analysis. We also explain how our
precision enhancements were crucial for the successful analysis of these
applications.
| Related KIT institutions | Institute for Program Structures and Data Organisation (IPD) Competence Center for Applied Security Technology (KASTEL) |
|---|---|
| Language | English |
| KITopen ID | 1000068211 |
| Keywords | information flow control, program analysis, static analysis, security, java, program dependence graph, noninterference |
| Publisher | Karlsruher Institut für Technologie (KIT) |
| Size | XV, 316 p. |
| Faculty | Department of Informatics (INFORMATIK) |
| Institute | Institute for Program Structures and Data Organisation (IPD) |
| Exam date | Nov 14, 2016 |
| Supervisor | G. Snelting |
| Referenced in | OpenAlex |
| Project | KASTEL_IoE (BMFTR, 16KIS0346) |