blue9057 / apisan

APISan: Sanitizing API Usages through Semantic Cross-Checking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

APISan: Sanitizing API Usages through Semantic Cross-Checking

APISAN is a tool that automatically infers correct API usages from source code without manual effort. The key idea in APISAN is to extract likely correct usage patterns in four different aspects (e.g., causal relation, and semantic relation on arguments) by considering semantic constraints. APISAN is tailored to check various properties with security implications. We applied APISAN to 92 million lines of code, including Linux Kernel, and OpenSSL, found 76 previously unknown bugs, and provided patches for all the bugs.

This repository has analysis tool and LLVM. LLVM related files follow their own license(LICENSE.LLVM), and analysis tool is provided under the terms of the MIT license.

How to use

  • Tested in Ubuntu 14.04
  • Setup
  $ ./setup.sh
  • How to build symbolic database
  $ apisan build [cmds]
  • Run './configure'
  $ apisan build ./configure
  $ apisan build make
  • How to run a checker
  $ apisan check --db=[db] --checker=[checker]
  • Example
  $ cd test/return-value
  $ ../../apisan build make
  $ ../../apisan check --checker=rvchk

Checkers (under analyzer/apisan/check)

  • Return value checker: retval.py
  • Argument checker: argument.py
  • Causality checker: causality.py
  • Condition checker: condition.py
  • Integer overflow checker: intovfl.py
  • Format string bug checker: fsb.py

Authors

Publications

@inproceedings{yun:apisan,
  title        = {{APISan: Sanitizing API Usages through Semantic Cross-checking}},
  author       = {Insu Yun and Changwoo Min and Xujie Si and Yeongjin Jang and Taesoo Kim and Mayur Naik},
  booktitle    = {Proceedings of the 25th USENIX Security Symposium (Security)},
  month        = aug,
  year         = 2016,
  address      = {Austin, TX},
}

About

APISan: Sanitizing API Usages through Semantic Cross-Checking

License:MIT License


Languages

Language:C++ 51.7%Language:C 19.6%Language:LLVM 17.8%Language:Assembly 4.7%Language:Objective-C 2.7%Language:Objective-C++ 0.9%Language:HTML 0.7%Language:Python 0.7%Language:Makefile 0.3%Language:CMake 0.3%Language:OCaml 0.2%Language:Perl 0.1%Language:Shell 0.1%Language:Go 0.1%Language:M4 0.1%Language:AngelScript 0.0%Language:CSS 0.0%Language:Roff 0.0%Language:Cuda 0.0%Language:Batchfile 0.0%Language:JavaScript 0.0%Language:Emacs Lisp 0.0%Language:Vim Script 0.0%Language:C# 0.0%Language:NASL 0.0%Language:Fortran 0.0%Language:AppleScript 0.0%Language:M 0.0%