Skip to content

A large collection of 32bit and 64bit PE files useful for verifying the correctness of bin2bin transformations

Notifications You must be signed in to change notification settings

backengineering/bintests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binary Rewriting Test Suite

This repository comprises a set of PE executable files encompassing a diverse array of code. Its primary goal is to facilitate testing the accuracy of bin2bin transformations. We are focused on assessing the effectiveness of our binary rewriting capabilities, particularly when applied to substantially large binaries exceeding 200MB which may have various "odd" behaviors. For now this repo will only contain x86 executables.

Usage

Any PE files under 32bit/ and 64bit/ can be executed on the commandline. They will output text, you can compare this text with the transformed version of the binary to see if they match.

SEH Tests

All tests under the seh/ folder are 64bit PE executable files. These tests do not print anything out if successful, instead the exit code should be checked to make sure it is zero. If it is non-zero then the SEH test has failed.

Why?

Most research papers on the topic of binary rewriting usually targets ELF files. Majority of these papers use the binutils that gnu ships. We are building software to protect windows executable files and I couldnt find a large repo with pre-compiled test bins ready to use. That is why this exists. This is also used by our CI workflows to test our code as we write it. Very useful!

Test List

The test bins consist of tests from the following projects:

This also contains all sorts of misc tests aimed at breaking disassembly (recursive functions, functions that call each other, noreturn functions, all sorts of jump tables).

Compile Options & Binary Information

Most bins will be compiled with /O2, /GL, and /LTCG. However not all bins will be compiled with these options. Real world bins will have a wide range of optimization/compiler options so we try to replicate this by not having every single binary use /O2, /GL, etc. Its important to note this because code compiled with /GL you cannot assume volitile registers are really volitile. The compiler can do some non-abi stuff with functions inside of the binary.

About

A large collection of 32bit and 64bit PE files useful for verifying the correctness of bin2bin transformations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published