Giter VIP home page Giter VIP logo

llvm-abom's Introduction

LLVM, with ABOM Support

This repository contains a fork of the LLVM project with support for Automatic Bill of Materials, or ABOM. ABOM is a system for automatically generating a novel form of bills of materials for software projects. The ABOM system is described in the following paper: Automatic Bill of Materials.

Getting Started

Consult the Getting Started with LLVM page for information on building and running LLVM from the source contained in this repository.

Generating an ABOM

To generate an ABOM when compiling using clang, use the -fabom flag, e.g.:

clang -fabom -o hello hello.c

Note that you must also use a linker that supports ABOM, such as lld within this project. If lld is not the default linker on your system, you can specify it using the -fuse-ld flag:

clang -fabom -fuse-ld=lld -o hello hello.c

Calculating an ABOM Hash

ABOM hashes are simply SHAKE128(36) hashes of source code files.

For conveinence, ABOM hashes can be generated using the llvm-abom-hash tool:

llvm-abom-hash hello.c

This will output the hash as a hex string, e.g.:

d43f65e61

Check Binary for an ABOM Hash

To query a binary for an ABOM hash, use the llvm-abom-check tool:

llvm-abom-check hello d43f65e61

This will output whether the binary contains the specified ABOM hash:

Present: hello contains d43f65e61

Examining an ABOM

To examine an ABOM contained within a binary, leverage the llvm-readobj tool:

llvm-readobj --abom hello

This will output information about the ABOM header:

File: hello
Format: elf64-x86-64
Arch: x86_64
AddressSize: 64bit
LoadName: <Not found>

ABOM version: 1
ABOM num filters: 0
ABOM model: 0
ABOM blob size: 1

Acknowledgements

Thank you to:

  • The LLVM Project for providing the base compiler, linker, and toolchain.
  • Ed Warnicke and Bharathi Seshadri for the understanding of LLVM internals provided by llvm-omnibor.
  • Tongda Xu, et al. for the Arithmetic Coding implementation provided by YAECL.

Citation

If you use this software in your research, please cite the following paper:

@misc{boucher2023automatic,
      title={Automatic Bill of Materials}, 
      author={Nicholas Boucher and Ross Anderson},
      year={2023},
      eprint={2310.09742},
      archivePrefix={arXiv},
      primaryClass={cs.CR}
}

llvm-abom's People

Contributors

nickboucher avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.