Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

ptrace

A static-library proxy based on ptrace (X86-only)

Documentation

Running

  1. Run without the proxy:
task run:no-proxy
  1. Run with the proxy:
task run:proxy

Static Library Interception

Using /proc/[PID]/maps and libelf, it's possible to calculate a symbol's address in memory (Note: this should even work with ASLR). Once a symbol's address is known, ptrace can be used to insert debugging trap/breakpoint instruction inside of the target function. Then, whenever the target function is called, the process emits a SIGTRAP which is easily detected by the parent. See Eli Bendersky's website for more information.