Bugtraq mailing list archives
Re: Clarification: LD_PRELOAD issue
From: JDaniele () KPMG CA (John Daniele)
Date: Sat, 15 May 1999 18:52:53 -0400
/*
* 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 <unistd.h>
#include <sys/ptrace.h>
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);
}
Current thread:
- Clarification: LD_PRELOAD issue David F. Skoll (May 14)
- Re: Clarification: LD_PRELOAD issue Casper Dik (May 14)
- <Possible follow-ups>
- Re: Clarification: LD_PRELOAD issue John R. LoVerso (May 14)
- Re: Clarification: LD_PRELOAD issue Kragen Sitaker (May 14)
- Re: Clarification: LD_PRELOAD issue John Daniele (May 15)
- Re: Clarification: LD_PRELOAD issue Daniel Brown (May 18)
