VerDiff: Cross-version vulnerability detection via PoC-based data-flow signatures.
401
Efficient Analysis for Detecting Affected Range of Versions for Vulnerabilities
Early Warning System for Vulnerabilities
Verdiff is a framework for analyzing vulnerabilities across program versions. It generates vulnerability signatures from program execution traces (via dynamic analysis) and checks for their presence in different versions of a programβs source code.
The project is containerized with Docker but can also be built and run locally.
Run Verdiff in three simple steps using Docker:
docker pull sakibanwar/verdiff
docker run -it sakibanwar/verdiff
/root/claims/run.sh
This will automatically execute all CVEs.
.
βββ Dockerfile
βββ install.sh
βββ artifact/
β βββ CWEs/
β β βββ CWE-119/
β β β βββ CVE-2017-14261_bento4/
β β β βββ info.json
β β β βββ *poc*
β β β βββ run.sh
β β β βββ README.md
β β β βββ run_verdiff.sh
β β βββ CWE-125/
β β βββ CWE-190/
β β βββ CWE-476/
β β βββ CWE-787/
β βββ data/ # Source code for bento4, jasper, zziplib (various versions)
β βββ src/ # Verdiff source code
βββ claims/
β βββ run.sh # Runs all CVEs in artifact
β βββ claims1/ # Expected results
You have two ways to set up Verdiff:
docker pull sakibanwar/verdiff
# Build the Docker image
./install.sh
# Run container
docker run -it verdiff
This script installs dependencies and builds the docker image locally.
The artifact/ directory contains vulnerability case studies organized by CWE and CVE.
Each CVE directory contains:
info.json β Metadata (program name, vulnerable version, source code location, etc.)poc β Proof-of-concept input that triggers the vulnerability.run.sh β Script to analyze vulnerability behavior (two modes: data flow and non-data flow).README.md β Description of the vulnerability, affected versions, and references.run_verdiff.sh β Script to process data flow log, generate a vulnerability signature and match it against all versions provided in source code location as mentioned in info.json.VerDiff is a generalized tool and a subset of the dataset is presented here for quick start. As can be noticed, the CVEs spread across 3 projects and 5 different CWEs.
| CWE | Meaning | CVEs in Repository |
|---|---|---|
| CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer | CVE-2017-14261 (bento4) |
| CWE-125 | Out-of-bounds Read | CVE-2017-5978 (zziplib) |
| CWE-190 | Integer Overflow or Wraparound | CVE-2016-10251 (jasper) |
| CWE-476 | NULL Pointer Dereference | CVE-2017-14640 (bento4) |
| CWE-787 | Out-of-bounds Write | CVE-2017-14644 (bento4) |
run.shData Flow Mode
info.json if not specified).Non Data Flow Mode
result_version.run_verdiff.shartifact/data/ contains source code in tar format of:
The script claims/run.sh automatically extracts the tars into predefined folders for analysis.
The core implementation of Verdiff is in:
artifact/src/
This is where the analysis logic and signature matching are implemented.
The claims/ directory contains scripts for running all CVEs in artifact/:
claims/run.sh β Runs every CVE experiment.claims/claims1/ β Contains expected results for validation and comparison.artifact/CWEs/.../CVE-*.run.sh in data flow mode to collect logs of the vulnerable execution.run_verdiff.sh to run Verdiff for that CVE.artifact/data/) to detect signature presence and outputs the final result in a CSV format in the CVE directory.claims/run.sh to automate experiments across all CVEs and compare results against claims1/.
# Step 1: Run Analysis either for all or choose from option
/root/claims/run.sh
# Step 2: Run non-dataflow mode to establish ground truth for version-xxx of targeted CVE
/root/artifact/CWE-*/CVE-*/run.sh false version-xxx
artifact/data/.claims/claims1/.Content type
Image
Digest
sha256:2cdf17f64β¦
Size
1.1 GB
Last updated
about 1 year ago
docker pull sakibanwar/verdiff