ChinaUnix.net
相关文章推荐:

ptrace 玩转

代码很简单: #include #include ptrace.h> #include #include #include #include int main () {         pid_t child;         long orig_eax;         child = fork();         if (...

by new_learner - C/C++ - 2008-11-04 09:39:10 阅读(2200) 回复(6)

相关讨论

---------------------------------------------------------------- 一个linux病毒:ptrace() 首发:http://lovelaozang.cn 翻译整理:老臧 资料来源:milw0rm、网络 参考文档:《ptrace(): A Linux Virus》 Author: Omni ---------------------------------------------------------------- -[ INDEX ]- 0x00: Introduction 0x01: *Talk* about ptrace() 0x02: Have fun with ptrace() 0x03: Injecting codes -[ 0x01: *...

by laozang - 数据安全 - 2008-10-23 19:38:59 阅读(2181) 回复(6)

能帮我看下这个ptrace的用法吗? #include ptrace.h> #include #include #include #include int main() ...{ pid_t child; long orig_eax; child = fork(); if(child == 0) ...{ ptrace(ptrace_TRACEME, 0, NULL, NULL); execl("/bin/ls", "ls", NULL); } else ...{ wait(NUL...

by iori97king - C/C++ - 2007-05-20 20:42:01 阅读(1908) 回复(5)

运行在Setuid状态的被跟踪程序因使用Exec导致安全漏洞 http://tech.ccidnet.com/pub/article/c239_a6630_p1.html 我的机器是 redhat 6.2 请问,谁有这个补丁文件啊?需要密码才可以下载。5555555 急!!谢谢啦。。 :em02: :em02:

by braverman - Linux论坛 - 2004-11-17 16:08:48 阅读(447) 回复(0)

最近正在看strace的源代码,其中用ptrace来获得进程的系统调用,但是一直没有看清楚如何实时获取系统调用,烦请高手指点。谢谢!

by fslife - Linux论坛 - 2003-05-04 22:49:06 阅读(807) 回复(0)

我想在代码里面增加一段反跟踪的功能,采用了如下代码确实能够达到效果 int main() { if (ptrace(ptrace_TRACEME, 0, 1, 0) < 0) { printf("DEBUGGING... Bye\n"); return 1; } printf("Hello\n"); return 0; } 但是如果代码中含还有system函数,即 int main() { if (ptrace(ptrace_TRACEME, 0, 1, 0) < 0) { printf("DEBUGGING... Bye\n"); return 1; } printf("Hello\n"); system("ls"); printf("Test OK\n"); return 0; } ...

by realhac - C/C++ - 2008-11-04 00:04:23 阅读(2156) 回复(4)

ptrace attach一个进程后,向其写入一段代码,然后detach 为啥ptrace_DETACH后进程状态还是traced? [code] TTY1 [root@localhost tmp]# gcc a.c -o target -ldl [root@localhost tmp]# ./target 80483c8 hhhh hhhh hhhh hhhh [1]+ Stopped ./target [root@localhost tmp]# [/code] [code] TTY2 [root@localhost prog]# ps a PID TTY STAT TIME COMMAND 2629 tty2 Ss+ 0:00 /sbin/mingett...

by rootclown - C/C++ - 2007-04-10 10:03:05 阅读(1214) 回复(1)

请问: ptrace(ptrace_PEEKUSER, pid, 4*EAX, 0) 中,寄存器EAX为什么要乘以4呢??什么意思?? 还有经常看见一个变量后面跟着>;>;24或者16什么的,这个又是什么意思?? 请师兄们不吝赐教!!

by greyzp - C/C++ - 2004-03-11 22:29:03 阅读(854) 回复(0)

编程用ptrace调用另外一个程序,想在某个地址获取处eax的值。 但是好象ptrace只能在某一个系统调用处停止,而不能停止在我想要的地址处。或者说是怎样在指定的地址处设置int 3指令。不知道有什么解决办法没?

by wsgtrsys - 程序开发 - 2006-10-02 15:54:06 阅读(1034) 回复(0)

KERNEL 2.6.13 BUG in function kernel/ptrace.c/access_process_vm file kernel/ptrace.c [CODE] int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write) { struct mm_struct *mm; struct vm_area_struct *vma; //BUG 1 struct page *page; //BUG 2 void *old_buf = buf; mm = get_task_mm(tsk); if (!mm) ...

by 思一克 - 内核/嵌入技术 - 2006-02-24 12:12:04 阅读(1315) 回复(4)