Rui Wang†, XiaoFeng Wang† and Zhuowei Li‡
†Indiana
University at Bloomington, ‡Center for Software Excellence, Microsoft
{wang63,xw7}@indiana.edu, zhuowei.li@microsoft.com
Abstract
Remote error analysis aims at timely detection and remedy of software vulnerabilities through analyzing runtime errors that occur on the client. This objective can only be achieved by offering users effective protection of their private information and minimizing the performance impact of the analysis on their systems without undermining the amount of information the server can access for understanding errors. To this end, we propose in the paper a new technique for privacy-aware remote analysis, called Panalyst. Panalyst includes a client component and a server component. Once a runtime exception happens to an application, Panalyst client sends the server an initial error report that includes only public information regarding the error, such as the length of the packet that triggers the exception. Using an input built from the report, Panalyst server performs a taint analysis and symbolic execution on the application, and adjusts the input by querying the client about the information upon which the execution of the application depends. The client agrees to answer only when the reply does not give away too much user information. In this way, an input that reproduces the error can be gradually built on the server under the client’s consent. Our experimental study of this technique demonstrates that it exposes a very small amount of user information, introduces negligible overheads to the client and enables the server to effectively analyze an error.
1 Introduction
Remote analysis of program runtime errors enables timely discovery and patching of software bugs, and has therefore become an important means to improve software security and reliability. As an example, Microsoft is reported to fix 29 percent of all Windows XP bugs within Service Pack 1 through its Windows Error Reporting (WER) utility [20]. Remote error analysis is typically achieved by running an error reporting tool on a client system, which gathers data related to an application’s runtime exception (such as a crash) and transmits them to a server for diagnosis of the underlying software flaws. This paradigm has been widely adopted by software manufacturers. For example, Microsoft relies on WER to collect data should a crash happen to an application. Similar tools developed by the third party are also extensively used. An example is BugToaster [27], a free crash analysis tool that queries a central database using the attributes extracted from a crash to seek a potential fix. These tools, once complemented by automatic analysis mechanisms [44, 34] on the server side, will also contribute to quick detection and remedy of critical security flaws that can be exploited to launch a large-scale cyber attack such as Worm epidemic [47, 30].
The primary concern of remote error analysis is its privacy impact. An error report may include private user information such as a user’s name and the data she submitted to a website [9]. To reduce information leaks, error reporting systems usually only collect a small amount of information related to an error, for example, a snippet of the memory around a corrupted pointer. This treatment, however, does not sufficiently address the privacy concern, as the snippet may still carry confidential data. Moreover, it can also make an error report less informative for the purpose of rapid detection of the causal bugs, some of which could be security critical. To mitigate this problem, prior research proposes to instrument an application to log its runtime operations and submit the sanitized log once an exception happens [25, 36]. Such approaches affect the performance of an application even when it works normally, and require nontrivial changes to the application’s code: for example, Scrash [25] needs to do source-code transformation, which makes it unsuitable for debugging commodity software. In addition, these approaches still cannot ensure that sufficient information is gathered for a quick identification of critical security flaws. Alternatively, one can analyze a vulnerable program directly on the client [29]. This involves intensive debugging operations such as replaying the input that causes a crash and analyzing an executable at the instruction level [29], which could be too intrusive to the user’s normal operations to be acceptable for a practical deployment. Another problem is that such an analysis consumes a large amount of computing resources. For example, instruction-level tracing of program execution usually produces an execution trace of hundreds of megabytes [23]. This can hardly be afforded by the client with limited resources, such as Pocket PC or PDA.
We believe that a good remote analyzer should help the user effectively control the information to be used in an error diagnosis, and avoid expensive operations on the client side and modification of an application’s source or binary code. On the other hand, it is also expected to offer sufficient information for automatic detection and remedy of critical security flaws. To this end, we propose Panalyst, a new technique for privacy-aware remote analysis of the crashes triggered by network inputs. Panalyst aims at automatically generating a new input on the server side to accurately reproduce a crash that happens on the client, using the information disclosed according to the user’s privacy policies. This is achieved through collaboration between its client component and server component. When an application crashes, Panalyst client identifies the packet that triggers the exception and generates an initial error report containing nothing but the public attributes of the packet, such as its length. Taking the report as a “taint” source, Panalyst server performs an instruction-level taint analysis of the vulnerable application. During this process, the server may ask the client questions related to the content of the packet, for example, whether a tainted branching condition is true. The client answers the questions only if the amount of information leaked by its answer is permitted by the privacy policies. The client’s answers are used by the server to build a new packet that causes the same exception to the application, and determine the property of the underlying bug, particularly whether it is security critical.
Panalyst client measures the information leaks associated with individual questions using entropy. Our privacy policies use this measure to define the maximal amount of information that can be revealed for individual fields of an application-level protocol. This treatment enables the user to effectively control her information during error reporting. Panalyst client does not perform any intensive debugging operations and therefore incurs only negligible overheads. It works on commodity applications without modifying their code. These properties make a practical deployment of our technique plausible. In the meantime, our approach can effectively analyze a vulnerable application and capture the bugs that are exploitable by malicious inputs. Panalyst can be used by software manufacturers to demonstrate their “due diligence” in preserving their customers’ privacy, and by a third party to facilitate collaborative diagnosis of vulnerable software.
We sketch the contributions of this paper as follows:
·
Novel framework
for remote error analysis. We propose a
new framework for remote error analysis. The framework minimizes the impact of
an analysis to the client’s performance and resources, lets the user maintain a
full control of her information, and in the meantime provides her the
convenience to contribute to the analysis the maximal amount of information she
is willing to reveal. On the server side, our approach interleaves the
construction of an accurate input for triggering an error, which is achieved
through interactions with the client, and the analysis of the bug that causes
the error. This feature allows our analyzer to make full use of the information
provided by the client: even if such information is insufficient for reproducing
the error, it helps discover part of input attributes, which can be fed into
other debugging mechanisms such as fuzz testing [35] to identify the bug.
·
Automatic
control of information leaks. We
present our design of new privacy policies to define the maximal amount of
information that can be leaked for individual fields of an application-level
protocol. We also developed a new technique to enforce such policies, which
automatically evaluates the information leaks caused by responding to a
question and then makes decision on whether to submit the answer in accordance
with the policies.
·
Implementation
and evaluations. We implemented a prototype system of
Panalyst and evaluated it using real applications. Our experimental study shows
that Panalyst can accurately restore the causal input of an error without
leaking out too much user information. Moreover, our technique has been
demonstrated to introduce nothing but negligible overheads to the client.
The rest of the paper is organized as follows. Section 2 formally models the problem of remote error analysis. Section 3 elaborates the design of Panalyst. Section 4 describes the implementation of our prototype system. Section 5 reports an empirical study of our technique using the prototype. Section 6 discusses the limitations of our current design. Section 7 presents the related prior research, and Section 8 concludes the paper and envisions the future research.
2 Problem Description
We formally model the problem of remote error analysis as follows. Let P : S × IS be a program that maps an initial process state s ∈ S→and an input i ∈ I to an end state. A state here describes the data in memory, disk and register that are related to the process of P . A subset of S, Eb, contains all possible states the process can end at after an input exploits a bug b.
Once P terminates at an error state, the client runs an error reporting program G : IR to generate a
→
report r ∈ R for analyzing P on the server. The report must be created under the constraints of the computing resources the client is able or willing to commit. Specifically, Ct : {G}× I × R →� measures the delay experienced by the user during report generation, Cs × R →� measures the storage overhead, and : C{n G}× I × R −→ � measures the bandwidth
: {G}× I
used for transmitting the report. To produce and submit a report r ∈ R, the computation time, storage consumption and bandwidth usage must be bounded by certain thresholds: formally, (Ct(G, i, r) ≤ Tht) ∧ (Cs(G, i, r) ≤Ths) ∧(Cw(G, i, r) ≤ Thw), where Tht, Ths and Thw represent the thresholds for time, storage space and bandwidth respectively. In addition, r is allowed to be submitted only when the amount of information it carries is acceptable to the user. This is enforced using a function
L : R × I →� that quantifies the information leaked out by r, and a threshold Thl. Formally, we require L(r, i) ≤ Thl.
The server runs an analyzer D : RI to diagnose
→
the vulnerable program P . D constructs a new input using r to exploit the same bug that causes the error on the client. Formally, given P (i) ∈ Eb and r = G(i), the analyzer identifies another input i� from r such that P (i�) ∈ Eb. This is also subject to resource constraints. Specifically, let C�: {D}×R×I →� be a function that
t
measures the computation time for running D and Cs�:
{D}× R × I →� that measures the storage overhead. We have: (Ct�(D, r, i�) ≤ Th�t) ∧ (Cs�(D, r, i�) ≤ Th�s), where Th�t and Th�s are the server’s thresholds for time and space respectively.
A solution to the above problem is expected to achieve three objectives:
• Low client overheads.
A practical
solution should work effectively under very small Th