{"id":20267144,"url":"https://github.com/lifting-bits/anvill","last_synced_at":"2025-04-05T03:12:56.500Z","repository":{"id":37493029,"uuid":"216145141","full_name":"lifting-bits/anvill","owner":"lifting-bits","description":"anvill forges beautiful LLVM bitcode out of raw machine code","archived":false,"fork":false,"pushed_at":"2024-09-03T21:03:44.000Z","size":74646,"stargazers_count":349,"open_issues_count":56,"forks_count":39,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-03-29T02:08:29.244Z","etag":null,"topics":["decompiler","llvm","remill"],"latest_commit_sha":null,"homepage":"","language":"LLVM","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lifting-bits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-19T03:46:47.000Z","updated_at":"2025-03-06T15:54:26.000Z","dependencies_parsed_at":"2024-12-29T23:33:44.572Z","dependency_job_id":"55c00546-153a-42a0-8dec-d9e7e9d8e374","html_url":"https://github.com/lifting-bits/anvill","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifting-bits%2Fanvill","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifting-bits%2Fanvill/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifting-bits%2Fanvill/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifting-bits%2Fanvill/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lifting-bits","download_url":"https://codeload.github.com/lifting-bits/anvill/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decompiler","llvm","remill"],"created_at":"2024-11-14T12:13:27.174Z","updated_at":"2025-04-05T03:12:56.478Z","avatar_url":"https://github.com/lifting-bits.png","language":"LLVM","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anvill\n\nAnvill implements simple machine code lifting primitives using Remill.\nThe goal of these components is to produce high quality bitcode,\nwhich can then be further decompiled to C (via Clang ASTs) using\n[Rellic](https://github.com/lifting-bits/rellic.git).\n\nWe define \"high quality bitcode\" as being similar in form to what the\nClang compiler would produce if it were executed on a semantically\nequivalent C function.\n\n\u003c!-- ## Build Status\n\n|       | master |\n| ----- | ------ |\n| Linux | [![Build Status](https://github.com/lifting-bits/anvill/workflows/CI/badge.svg)](https://github.com/lifting-bits/anvill/actions?query=workflow%3ACI)| --\u003e\n\n## Note on Specification Generation\n\nThe main branch of anvill consumes protobuf specifications generated by an in development Ghidra\nplugin that is currently closed source. You can checkout the tag: [binja-final-version](https://github.com/lifting-bits/anvill/tree/binja-final-version) which has an open source specification generation script that uses Binary Ninja. We are hoping to release the Ghidra specification generation plugin soon!\n\n## Getting Help\n\nIf you are experiencing undocumented problems with Anvill then ask for help in the `#binary-lifting` channel of the [Empire Hacking Slack](https://slack.empirehacking.nyc/).\n\n## Supported Platforms\n\nAnvill is supported on Linux platforms and has been tested on Ubuntu 20.04.\n\n## Dependencies\n\nMost of Anvill's dependencies can be provided by the [cxx-common](https://github.com/lifting-bits/cxx-common) repository. Trail of Bits hosts downloadable, pre-built versions of the libraries for select operating systems, which makes it substantially easier to get up and running with Anvill. Nonetheless, the following table represents most of Anvill's dependencies.\n\n| Name                                                       | Version |\n| ---------------------------------------------------------- | ------- |\n| [Git](https://git-scm.com/)                                | Latest  |\n| [CMake](https://cmake.org/)                                | 3.14+   |\n| [Clang](http://clang.llvm.org/)                            | 12.0+   |\n| [Remill](https://github.com/lifting-bits/remill)           | Latest  |\n| [Python](https://www.python.org/)                          | 3.9     |\n| [Ghidra](https://github.com/NationalSecurityAgency/ghidra) | Latest  |\n\n## Getting and Building the Code\n\n### On Linux\nFirst, update aptitude and get install the baseline dependencies.\n\n```shell\ndpkg --add-architecture i386\n\nsudo apt-get update\nsudo apt-get upgrade\n\nsudo apt-get install \\\n     git \\\n     python3.8 \\\n     python3-pip \\\n     wget \\\n     curl \\\n     build-essential \\\n     libtinfo-dev \\\n     lsb-release \\\n     zlib1g-dev \\\n     ccache \\\n     cmake \\\n     libc6-dev:i386 \\\n     'libstdc++-*-dev:i386' \\\n     g++-multilib\n\n# Ubuntu 14.04, 16.04\nsudo apt-get install realpath\n```\n\nAssuming we have [Remill](https://github.com/lifting-bits/remill) properly installed the following steps provide a fresh build of Anvill.\n\n```shell\n# clone anvill repository\ngit clone https://github.com/lifting-bits/anvill.git\n\n# update the git submodules\ngit submodule update --init --recursive\n\n# create a build dir\nmkdir anvill-build \u0026\u0026 cd anvill-build\n\n# configure\nCC=clang cmake ../anvill\n\n# build\nmake -j 5\n\n# install\nsudo make install\n```\n\nOr you can tell CMake where to find the remill installation prefix by passing `-Dremill_DIR=\"\u003cremill_prefix\u003e/lib/cmake/remill\"` during configuration.\n\n### Running tests\n\n1. Configure with the following parameter: `-DANVILL_ENABLE_TESTS=true`\n2. Run the **test** target: `cmake --build build_folder --target test`\n\n### Docker image\n\nTo build via Docker run, specify the architecture, base Ubuntu image and LLVM version. For example, to build Anvill linking against LLVM 14 on Ubuntu 20.04 on AMD64 do:\n\n```shell\nARCH=amd64; UBUNTU_VERSION=20.04; LLVM=14; \\\n   docker build . \\\n   -t anvill-llvm${LLVM}-ubuntu${UBUNTU_VERSION}-${ARCH} \\\n   -f Dockerfile \\\n   --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} \\\n   --build-arg ARCH=${ARCH} \\\n   --build-arg LLVM_VERSION=${LLVM}\n```\n\n## `anvill-specify-bitcode (Currently unsupported)`\n\n`anvill-specify-bitcode` is a tool that produces specifications for all functions\ncontained in an LLVM bitcode module. The purpose of this tool is to enable\nthe creation of a database of specifications for commonly used, often externally-\ndefined functions in binaries (e.g. libc, libc++, libstdc++) in binaries lifted\nby [McSema](https://github.com/lifting-bits/mcsema).\n\nThis tool also exists for enabling function declarations for binary code to be\nwritten in C or C++, and then translated down into the specification form within\na decompiler toolchain.\n\nFinally, this tool exists to enable round-trip testing of LLVM's ISEL lowering\nand code generation for arbitrary functions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifting-bits%2Fanvill","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flifting-bits%2Fanvill","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifting-bits%2Fanvill/lists"}