Beware of the Unexpected: Bimodal Taint Analysis

01/25/2023
by   Yiu Wai Chow, et al.
0

Static analysis is a powerful tool for detecting security vulnerabilities and other programming problems. Global taint tracking, in particular, can spot vulnerabilities arising from complicated data flow across multiple functions. However, precisely identifying which flows are problematic is challenging, and sometimes depends on factors beyond the reach of pure program analysis, such as conventions and informal knowledge. For example, learning that a parameter "name" of an API function "locale" ends up in a file path is surprising and potentially problematic. In contrast, it would be completely unsurprising to find that a parameter "command" passed to an API function "execaCommand" is eventually interpreted as part of an operating-system command. This paper presents Fluffy, a bimodal taint analysis that combines static analysis, which reasons about data flow, with machine learning, which probabilistically determines which flows are potentially problematic. The key idea is to let machine learning models predict from natural language information involved in a taint flow, such as API names, whether the flow is expected or unexpected, and to inform developers only about the latter. We present a general framework and instantiate it with four learned models, which offer different trade-offs between the need to annotate training data and the accuracy of predictions. We implement Fluffy on top of the CodeQL analysis framework and apply it to 250K JavaScript projects. Evaluating on five common vulnerability types, we find that Fluffy achieves an F1 score of 0.85 or more on four of them across a variety of datasets.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/13/2021

Data-Driven Vulnerability Detection and Repair in Java Code

Java platform provides various APIs to facilitate secure coding. However...
research
03/17/2022

Example-Based Vulnerability Detection and Repair in Java Code

The Java libraries JCA and JSSE offer cryptographic APIs to facilitate s...
research
01/31/2019

LEOPARD: Identifying Vulnerable Code for Vulnerability Assessment through Program Metrics

Identifying potentially vulnerable locations in a code base is critical ...
research
11/18/2021

InspectJS: Leveraging Code Similarity and User-Feedback for Effective Taint Specification Inference for JavaScript

Static analysis has established itself as a weapon of choice for detecti...
research
08/27/2022

Improving debris flow evacuation alerts in Taiwan using machine learning

Taiwan has the highest susceptibility to and fatalities from debris flow...
research
12/16/2022

Machine Learning Containers are Bloated and Vulnerable

Today's software is bloated leading to significant resource wastage. Thi...

Please sign up or login with your details

Forgot password? Click here to reset