Skip to content

endeav0r/rnp_trace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

rnp_trace

/***********************
* INTRODUCTION         *
***********************/

rnp_trace is a command line linux tool for tracing the of execution flows
of x86 linux applications easier.

rnp_trace
	1) forks a given executable
	2) loads the structure of ELFs in the forked process
	3) SINGLE_STEPs the forked process
	4) prints information about each instruction, including FUNCTION symbols

/************************
* EXAMPLE               *
************************/

$ echo '#include <stdio.h>'$'\n''int main () { printf("hello world\n"); return 0; }' | gcc -x c - -o hello_world; ./rnpt -is 10000 ./hello_world
entry address: 400410
ELF: /home/endeavor/code/rnp_trace/hello_world
        base_address = 400000
        load_address = 400000
ELF: /usr/lib/libc-2.16.so
        base_address = 0
        load_address = 7f9930a53000
ELF: /usr/lib/ld-2.16.so
        base_address = 0
        load_address = 7f9930dfa000
/usr/lib/ld-2.16.so _dl_runtime_resolve
/usr/lib/ld-2.16.so _dl_fixup
/usr/lib/ld-2.16.so _dl_lookup_symbol_x
/usr/lib/ld-2.16.so do_lookup_x
/usr/lib/ld-2.16.so _dl_name_match_p
/usr/lib/ld-2.16.so check_match.11334
/usr/lib/libc-2.16.so __libc_start_main
/home/endeavor/code/rnp_trace/hello_world __libc_csu_init
/home/endeavor/code/rnp_trace/hello_world _init
/home/endeavor/code/rnp_trace/hello_world main
/usr/lib/ld-2.16.so _dl_runtime_resolve
/usr/lib/ld-2.16.so _dl_fixup
/usr/lib/ld-2.16.so _dl_lookup_symbol_x
/usr/lib/ld-2.16.so do_lookup_x
/usr/lib/ld-2.16.so _dl_name_match_p
/usr/lib/ld-2.16.so check_match.11334
/usr/lib/libc-2.16.so mmap
/usr/lib/libc-2.16.so _IO_setb
/usr/lib/libc-2.16.so _IO_do_write@@GLIBC_2.2.5
/usr/lib/libc-2.16.so _IO_default_xsputn
/usr/lib/libc-2.16.so __overflow
/usr/lib/libc-2.16.so _IO_do_write@@GLIBC_2.2.5
/usr/lib/libc-2.16.so new_do_write
/usr/lib/libc-2.16.so _IO_file_write@@GLIBC_2.2.5
hello world
/usr/lib/libc-2.16.so exit
/usr/lib/libc-2.16.so __run_exit_handlers
/usr/lib/ld-2.16.so _dl_fini
/usr/lib/ld-2.16.so rtld_lock_default_lock_recursive
/usr/lib/ld-2.16.so _dl_sort_fini
/usr/lib/ld-2.16.so rtld_lock_default_unlock_recursive
/home/endeavor/code/rnp_trace/hello_world _fini
/usr/lib/libc-2.16.so _IO_file_setbuf@@GLIBC_2.2.5
/usr/lib/libc-2.16.so _IO_file_sync@@GLIBC_2.2.5
/usr/lib/libc-2.16.so _IO_setb


/********************
* EXAMPLE 2         *
********************/

$ echo '#include <stdio.h>'$'\n''int main () { printf("hello world\n"); return 0; }' | gcc -x c - -o hello_world; ./rnpt -is 10000 ./hello_world | grep hello_world
ELF: /home/endeavor/code/rnp_trace/hello_world
/home/endeavor/code/rnp_trace/hello_world __libc_csu_init
/home/endeavor/code/rnp_trace/hello_world _init
/home/endeavor/code/rnp_trace/hello_world main
/home/endeavor/code/rnp_trace/hello_world _fini


/********************
* EXAMPLE 3         *
********************/

$ echo '#include <stdio.h>'$'\n''int main () { printf("hello world\n"); return 0; }' | gcc -x c - -o hello_world; ./rnpt -is 10000 ./hello_world | grep hello_world
ELF: /home/endeavor/code/rnp_trace/hello_world
/home/endeavor/code/rnp_trace/hello_world __libc_csu_init
/home/endeavor/code/rnp_trace/hello_world _init
/home/endeavor/code/rnp_trace/hello_world main
/home/endeavor/code/rnp_trace/hello_world _fini

About

Command-line execution flow tracing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages