Everhart, Glenn (FUSA) From: John Daniele [JDaniele@KPMG.CA] Sent: Saturday, May 15, 1999 6:53 PM To: BUGTRAQ@NETSPACE.ORG Subject: Re: Clarification: LD_PRELOAD issue /* * rollover.c * * using ptrace() to intercept and modify the return value of a system call * * John Daniele * jdaniele@kpmg.ca * VOX: (416) 777-3759 * */ #include #include int main(void) { int ret, x, y; pid_t procid; if(procid = fork()) { for(;;) { x = ptrace(PTRACE_PEEKUSR, procid, 44, 0); if(x == 13) { y = ptrace(PTRACE_PEEKUSR, procid, EBX, 0); ptrace(PTRACE_POKEDATA, procid, y, 2175984000); } ptrace(PTRACE_SYSCALL, procid, 1, 0); } } ptrace(PTRACE_TRACEME, 0, 1, 0); execl("/bin/date", "/bin/date", NULL, (char *)0); }