Playing with ptrace() for fun and profit

By Nicolas Bareil.

In Proceedings of SSTIC 2006, pages 89-106. June 2006.

Abstract

ptrace is one of the least documented and most obscure syscall available on Linux. The SunOS man page event describes ptrace() as "unique and arcane" and this is partly right.

This report presents the ptrace undocumented features, why theses options are interesting and how to use them when injecting code into processes.

Finally, we present multiple use-cases based on ptrace(), among one showing an evasion attack of the applicative firewall NuFW.

Material

Date: 2010-07-08 13:59:07 CEST