ENSOFT Research · DARPA STAC · 2015–2019

Space/Time Analysis for Cybersecurity

DARPA’s STAC program set out to find vulnerabilities in how Java software spends time and memory: small inputs that drive a loop into extreme resource consumption, and differences in running time or memory use that leak a secret. Fully automated detection amounts to solving the halting problem. The team’s answer was RULER, an intelligence-amplifying system on Atlas that pairs automated analysis with a human analyst, tested across seven DARPA engagements.

Tree of JDK subsystems from the STAC report: SUBSYSTEM contains JAVACORE_SUBSYSTEM, which contains the others, such as IO_SUBSYSTEM with the network, database, serialization, and log subsystems under it.
Figure 8 · JDK subsystems hierarchyRULER

Vulnerabilities in Space and Time

ACTime · Space

Algorithmic Complexity

An execution path with high time or space complexity that a relatively small input can trigger. The cost comes from a loop the input controls, so the analysis has to know every loop: what ends it, what bounds it, what it calls, and whether external input reaches it.

SCTime · Space

Side Channel

A set of execution paths tied to a secret, where variations in running time or memory use along those paths let an attacker infer the secret. Finding one means reasoning about the paths that depend on the secret and what each of them costs.

DARPA I2O · AFRLThe two axes of STAC

Scale and Speed

STAC measured progress on two axes. Scale meant analyses that handle network services of hundreds of thousands of lines and systems of millions or tens of millions. Speed meant the rate at which a human analyst, helped by automated tools, works through that code. The program targeted the software the U.S. government, military, and economy depend on.

Thousands → MillionsLines of code per hour: the analyst’s rate the program set out to reach, up from thousands.

RULER

Resource Usage vuLnerability identifiERAtlas · Eclipse

Intelligence Amplification

RULER runs as a set of Eclipse plug-ins on Atlas and divides the work between machine and analyst. Automation characterizes every loop and branch in the bytecode and points to suspicious code. The analyst forms a hypothesis, tests it against graphs of only the relevant behavior, and confirms it by fuzzing only the code in question. The report names the approach after Frederick Brooks’s thesis that intelligence amplification beats AI: a machine and a mind can beat a mind-imitating machine working by itself.

Figure 1 · RULER system architectureExecutive Summary →

Flow diagram of RULER from the STAC report: bytecode is turned into a Jimple project, mapped into Atlas graphs, analyzed by app-agnostic and interactive automation, and refined by a human through hypotheses that dynamic analysis validates into a vulnerability report.
Full automationSections 4–4.2

Discover Suspicious Program Segments

Catalogs record 65 attributes for every loop, 44 characteristics for every branch, and the lambda loops that Java 8 lambda expressions form. Projected Control Graphs group a method’s paths into the behaviors relevant to AC and SC, taint analysis marks what external input reaches, and JDK subsystem tags show which APIs each loop touches.

Figures 1–8 · Table 1Read →

Human-on-loop static analysisSection 4.3

Gather Corroborating Evidence

The analyst tests a hypothesis with a Dashboard of sixteen properties and smells, a PCG Builder that computes interprocedural PCGs across chosen events, a builder that keeps the loops calling into a subsystem, a decompiler view beside the Jimple, a Filter View, and eighteen Smart Views.

Figures 9–13Read →

Human-on-loop dynamic analysisSections 4.4–5

Targeted Dynamic Analysis

The Mockingbird framework extracts the suspicious code with Atlas analyzers, and its Object Mocker builds the test harness automatically, so the AFL fuzzer, through Kelinci, drives just that code with binary inputs to show whether the vulnerability can be exploited. The chapter closes with the analysts’ workflows for AC and SC questions in time and space.

Mockingbird · AFL · KelinciRead →

Inside RULER

Screenshot of the Loop Catalog View: a table with one row per loop header and columns such as loop ID, project, package, type, method, container, terminating conditions, nesting depth, and monotonicity.
Figure 2Section 4.2.1

Loop Catalog

One row per loop and one column per characteristic. Sorting a column ranks the loops, and a selection drives Atlas Smart Views.

Screenshot of the Dashboard view: work-item filters on the left, and expandable properties and smells on the right with the System.exit Usage property open.
Figure 9Section 4.3.1

Dashboard

Properties and smells computed on demand, such as recursive functions, System.exit usage, and deeply nested loops.

Screenshot of the PCG Builder with columns for control flow events, containing functions, ancestor functions, and expandable functions, and options for exceptional control flow, human consumer, and extended structure.
Figure 10Section 4.3.2

PCG Builder

Events chosen across several functions become one interprocedural PCG, with ancestor and expandable functions for context.

Screenshot of a Jimple editor above the CFR Decompiler View, which shows the decompiled Java source of the selected method.
Figure 12Section 4.3.4

Decompiler View

The Jimple of the selected method beside its Java source, decompiled with CFR one method at a time.

Results

Seven engagements · 2016–2019Sections 6–7

Accuracy Across the Engagements

The blue teams worked through seven DARPA engagements, live and take-home. The team’s accuracy rose with each set of challenge applications and reached 100% in E5 and E6. E7 required every team to answer every question, and accuracy dipped. The engagements exposed the approach’s weaknesses and pointed to each refinement, and the program manager recommended the IA technology for potential adoption.

Figure 14 · Engagement performanceRead →

Two charts of engagement performance for E2, E4, E5, E6, and E7: accuracy as a line that rises from 69% to 100% in E5 and E6 and dips to 85% in E7, and attempted and correct answers as bars.

AFRL-RI-RS-TR-2019-232 · AD1088526

The Final Report

  1. 1Executive Summary

    The research questions behind RULER and the five categories of program analysis challenge it addresses.

  2. 2–3Introduction and Technical Approach

    The team, the program’s goals in DARPA’s words, and the three analysis guidelines.

  3. 4–4.2Discover Suspicious Program Segments

    The architecture, the four catalogs, the Loop Call Graph, the Projected Control Graph, taint analysis, and subsystem tagging.

  4. 4.3Gather Corroborating Evidence

    The Dashboard, the PCG and Loop Subsystem Interactions Builders, the decompiler view, the Filter View, and the Smart Views.

  5. 4.4–5Targeted Dynamic Analysis and Challenge Applications

    The Mockingbird framework and the analysts’ workflows for AC and SC in time and space.

  6. 6–7Results and Conclusions

    The seven engagements and the case for intelligence amplification in program analysis.

  7. 8–11Publications and Presentations

    A journal paper, a book chapter, seventeen conference papers, eighteen keynotes and invited talks, fourteen tutorials, the references, an appendix on Atlas, and the acronyms.

Report
AFRL-RI-RS-TR-2019-232, final technical report, December 2019
Program
DARPA Space/Time Analysis for Cybersecurity (STAC)
Period
April 2015 – July 2019
Agreement
Cooperative Agreement FA8750-15-2-0080
Sponsors
Air Force Research Laboratory (AFRL/RI), Rome, New York; DARPA I2O, Arlington, Virginia
Author
Suresh Kothari
Performer
Iowa State University, Ames, Iowa, with ENSOFT as subcontractor
Distribution
Approved for Public Release; Distribution Unlimited
Source
DTIC AD1088526

Abstract: The STAC program enabled us to make significant advances. We consider the foremost advance to be intelligence amplifying (IA) technology for detecting AC and SC vulnerabilities. The report describes the challenges encountered and how we have addressed them. Our performance steadily improved with the advances we made with our approach. We achieved top performance on DARPA challenge engagements. We found the take-home and on-site engagements very useful to drive our research. The engagements enabled us to identify the weaknesses in our approach and provided concrete directions to refine our approach.

Selected Papers

ACM ESEC/FSE · 2019Algorithmic Complexity

DISCOVER: Detecting Algorithmic Complexity Vulnerabilities

Presents DISCOVER, a three-phase human-on-the-loop tool suite for detecting Algorithmic Complexity Vulnerabilities (ACVs) in Java source and bytecode through automated loop characterization, suspicious loop filtering, and interactive audit.

Payas Awadhutkar, Ganesh Ram Santhanam, Benjamin Holland, Suresh Kothari10.1145/3338906.3341177

Science of Computer Programming · 2018PCG Journal Paper

Projected Control Graph for Computing Relevant Program Behaviors

Defines a mathematical foundation for isolating the program behaviors relevant to a safety or security property and introduces the Projected Control Graph (PCG) to compute that projection directly, avoiding full-program path enumeration. Evaluated on Linux kernel lock verification and on interactive detection of side-channel vulnerabilities in Java bytecode.

Ahmed Tamrawi, Suresh Kothari10.1016/j.scico.2018.04.003

Springer · 2018ICS & Cyber-Physical Systems

Catastrophic Cyber-Physical Malware

Examines how sophisticated cyber-physical malware (such as Industroyer) exploits sensor-driven triggers and application-specific payloads in industrial control systems, telecommunications, and mission-critical software, outlining hypothesis-driven program analysis techniques to counter behavioral explosion.

Suresh Kothari, Ganesh Ram Santhanam, Payas Awadhutkar, Benjamin Holland, Jon Mathews, Ahmed Tamrawi10.1007/978-3-319-97643-3_7

IEEE ICSME DOCGEN Challenge · 2018Best Tool Award

DynaDoc: Automated On-Demand Context-Specific Documentation

An on-demand documentation engine built on Atlas and XCSG that extracts control flow, call, and data-flow graphs alongside issue and commit history from multi-million-line codebases. Demonstrated on Apache POI, where data-flow projections exposed undocumented parameter constraints and uncovered a previously unreported defect.

Ahmed Tamrawi, Sharwan Ram, Payas Awadhutkar, Benjamin Holland, Ganesh Ram Santhanam, Suresh Kothari10.1109/DYSDOC3.2018.00009

ACM/IEEE ICSE Companion · 2018Technical Briefing

Demystifying Cyber-Physical Malware

Synthesizes the mathematical foundations, program analysis techniques, and real-world case studies needed to characterize and verify sophisticated cyber-physical malware whose sensor-driven triggers and domain-specific payloads evade traditional virus and trojan signatures.

Suresh Kothari10.1145/3183440.3183459

ICSE · 2018PCG Toolbox

COMB: Computing Relevant Program Behaviors

Presents COMB, a multi-language interactive program comprehension and verification tool that uses the Projected Control Graph (PCG) abstraction to derive relevant execution behaviors directly without enumerating all program paths. Demonstrated on C and Java case studies including Linux kernel verification.

Benjamin Holland, Payas Awadhutkar, Suresh Kothari, Ahmed Tamrawi, Jon Mathews10.1145/3183440.3183476

Winter Simulation Conference · 201766,609 Linux Locks

Modeling Lessons from Verifying Large Software Systems for Safety and Security

An empirical verification study of 66,609 lock instances across more than 12 million lines of the Linux kernel. High-level behavior models verified 99.3% of the instances—compared to 65.7% for the Linux Driver Verification formal verification tool—exposed flaws in prior verification results, and uncovered seven unsafe locking defects confirmed and fixed by kernel developers.

Suresh Kothari, Payas Awadhutkar, Ahmed Tamrawi, Jon Mathews10.1109/WSC.2017.8247886

APSEC · 2016Path-Sensitive Analysis

Projected Control Graph for Accurate and Efficient Analysis of Safety and Security Vulnerabilities

Introduces the Projected Control Graph (PCG) abstraction to overcome exponential path growth and path-feasibility complexity in path-sensitive analysis. Evaluates CFG-to-PCG reduction across three versions of the Linux kernel (66,609 lock instances), revealing synchronization bugs missed by the Linux Driver Verification (LDV) tool.

Ahmed Tamrawi, Suresh Kothari10.1109/APSEC.2016.026

IEEE ICPC · 2016Invisible Control Flow

Human-Machine Resolution of Invisible Control Flow

Presents an interactive human-machine collaboration approach on Atlas to resolve Invisible Control Flow (ICF) caused by dynamic binding, function pointers, and asynchronous callbacks, uncovering complex synchronization bugs in the Linux kernel.

Suresh Kothari, Ahmed Tamrawi, Jon Mathews10.1109/ICPC.2016.7503727