Skip to content

sysadapt is a tool that translates x86-32 ABI Linux syscalls into AMD64 at runtime

License

Notifications You must be signed in to change notification settings

Centurion256/sysadapt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sysadapt

Sysadapt is a tool that translates legacy x86-32 ABI syscalls into AMD64 fast syscalls using ptrace.

Usage

Sysadapt comes with a shared library for invoking legacy syscalls and a sample victim program.

Build with CMake

cmake [-DVERBOSE]

VERBOSE: compile with verbosity. Refer to source code for more information

Run

./build/sysadapt build/call < in.txt

Runner

The victim program provided with sysadapt simply invokes two syscalls: read and write in order to echo Hello, World! from stdin into stdout. However, it uses 32-bit legacy ABI to write from the buffer. This is generally considered to be undefined behaviour, because 32-bit legacy ABI uses EIP, which is a 32-bit register, to access the 64-bit address space. When run under sysadapt, as shown in usage section, the syscall will be dynamically translated into the 64-bit ABI at runtime, and the program will function correctly.

Syscall32 library

The shared library provided with sysadapt contains a variadic syscall32 function which invokes a legacy 32-bit ABI syscall from given arguments. It also includes write32 and read32, which are simple wrappers over syscall32. In general, syscall32 can be used for any 32-bit syscall.

License

This product is distributed under GPLv3 license.

References

If you wish to learn more about how sysadapt operates or x86 syscalls on Linux in general, refer to these documents

About

sysadapt is a tool that translates x86-32 ABI Linux syscalls into AMD64 at runtime

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published