C++ proxy/intercept prototypes
ld-preload
: a shared-library proxy based onLD_PRELOAD
ld-preload-template
: a shared-library proxy based onLD_PRELOAD
with C++ templatesptrace
: a static-library proxy based onptrace
(X86-only)dynamorio
: a static-library proxy based on DynamoRIOqbdi
: a static-library proxy based on QuarkslaB Dynamic binary Instrumentation (QBDI)eigen
: a proxy for intercepting Eigen static library calls based on QuarkslaB Dynamic binary Instrumentation (QBDI) (X86-only)
This repository contains Docker images for x86-64 (amd64
) and ARM v8 64 bit (arm64-v8
) in order
to simulate running the proxies in a variety of environments including servers, desktops, and
mobile/embedded systems. You will likely need to setup QEMU
for development unless you're using Docker Desktop on non-Linux systems.
- Install Docker
- Build:
docker build . -f amd64.dockerfile -t cpp-proxy:amd64
# Or
docker build . -f arm64-v8.dockerfile -t cpp-proxy:arm64-v8
- Run:
# Note: CAP_SYS_PTRACE is required for process_vm_readv and QBDIPreload to work
docker run -it --cap-add CAP_SYS_PTRACE -v "$(pwd):/home/dev/cpp-proxy" --name cpp-proxy-amd64 cpp-proxy:amd64
# Or
docker run -it --cap-add CAP_SYS_PTRACE -v "$(pwd):/home/dev/cpp-proxy" --name cpp-proxy-arm64-v8 cpp-proxy:arm64-v8
- Notes:
- The default user (
dev
) has password-less sudo setup and uses Zsh - The
/home/dev/cpp-proxy
directory in the container is mapped to the repository root directory on the host, but you will probably need to chown it (eg:sudo chown dev:dev /home/dev -R
)