GithubHelp home page GithubHelp logo

ellen2015 / uthenticode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trailofbits/uthenticode

0.0 0.0 0.0 470 KB

A cross-platform library for verifying Authenticode signatures

Home Page: https://trailofbits.github.io/uthenticode/

License: MIT License

Shell 1.50% C++ 85.63% Makefile 1.56% CMake 9.95% Dockerfile 1.36%

uthenticode's Introduction

uthenticode

Build Status

uthenticode (stylized as μthenticode) is a small cross-platform library for verifying Authenticode digital signatures.

Read our blog post on verifying Windows binaries without Windows!

What?

Authenticode is Microsoft's code signing technology, designed to allow signing and verification of programs.

μthenticode is a cross-platform reimplementation of the verification side of Authenticode. It doesn't attempt to provide the signing side.

Why?

Because the official APIs (namely, the Wintrust API) for interacting with Authenticode signatures are baked deeply into Windows, making it difficult to verify signed Windows executables on non-Windows hosts.

Other available solutions are deficient:

  • WINE implements most of Wintrust, but is a massive (and arguably non-native) dependency for a single task.
  • osslsigncode can add signatures and check timestamps, but is CLI-focused.

Beware!

μthenticode is not identical to the Wintrust API. Crucially, it cannot perform full-chain verifications of Authenticode signatures, as it lacks access to the Trusted Publishers store.

You should use μthenticode to verify the embedded chain. You should not assume that a "verified" binary from μthenticode's perspective will run on an unmodified Windows system.

Building

μthenticode depends on pe-parse and OpenSSL 1.1.0.

pe-parse (and OpenSSL, if you don't already have it) can be installed via vcpkg:

$ vcpkg install pe-parse

The rest of the build is standard CMake:

$ mkdir build && cd build
$ cmake ..
$ cmake --build .
# the default install prefix is the build directory;
# use CMAKE_INSTALL_PREFIX to modify it
$ cmake --build . --target install

If you have doxygen installed, you can build μthenticode's documentation with the top-level Makefile:

$ make doc

Pre-built (master) documentation is hosted here.

You can build the (gtest-based) unit tests with -DBUILD_TESTS=1.

Usage

μthenticode's public API is documented in uthenticode.h and in the Doxygen documentation (see above).

The svcli utility also provides a small example of using μthenticode's APIs. You can build it by passing -DBUILD_SVCLI=1 to cmake:

$ cmake -DBUILD_SVCLI=1 ..
$ cmake --build .
$ ./src/svcli/svcli /path/to/some.exe

Resources

The following resources were essential to uthenticode's development:

uthenticode's People

Contributors

woodruffw avatar hugmyndakassi avatar ekilmer avatar pkdawson avatar arcz avatar trofi avatar thomas1664 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.