zwimer / DrShadowStack

A software defined dynamic shadow stack utilizing dynamorio
http://www.zwimer.com/DrShadowStack/
GNU General Public License v3.0
5 stars 0 forks source link

Program freezes on target call to execve #101

Closed zwimer closed 6 years ago

zwimer commented 6 years ago

I noticed that dr_client_main is called again. Variables are cleared when this happens, but file descriptors are not necessarily removed!

zwimer commented 6 years ago

dr_client_main is re-called on exec. Variables are cleared.

zwimer commented 6 years ago

Changed the socket path and fd stuff away from command line arguments an to environment variables. These can be changed after the first dr_client_main

zwimer commented 6 years ago

Hooked syscall execve before execution, inserted file descriptor number into the environment to be used as socket connection so it doesn't attempt to connect again to the same socket, causing it to hang as it is never accepted. Done