Chinaunix

标题: 大家帮我看看我是否中了 LKM Trojan木马 [打印本页]

作者: lues    时间: 2005-02-18 14:10
标题: 大家帮我看看我是否中了 LKM Trojan木马
我装了chkrootkit\r\n在用第一次的时候有如下报告:\r\n\r\n\r\n
  1. Checking `lkm\'... You have     3 process hidden for readdir command           #是否有可能中了Trojan\r\nYou have     3 process hidden for ps command\r\nWarning: Possible LKM Trojan installed\r\nChecking `sniffer\'... eth0: PF_PACKET(/usr/local/bin/snort) #我本机装了snort
复制代码
\r\n\r\n我第一次以后的报告就一切正常,没有出现Warning: Possible LKM Trojan installed提示,报告如下:\r\n\r\n
  1. Checking `lkm\'... nothing detected\r\nChecking `sniffer\'... eth0: PF_PACKET(/usr/local/bin/snort)\r\n
复制代码
\r\n\r\n这两次的报告不一样,搞得我稀里糊涂的,一个报告说有木马,一个报告说没有\r\n请问我是不是有可能中了Trojan,如果中了,该怎么清除
作者: lues    时间: 2005-02-21 11:01
标题: 大家帮我看看我是否中了 LKM Trojan木马
偶按照你的办法,第一步就出错了\r\n
  1. \r\n[root@game 2.4]# cat System.map-2.4.21-20.ELsmp | grep sys_call_table c0302c30 D sys_call_table \r\ngrep: c0302c30cat: System.map-2.4.21-20.ELsmp: 没有那个文件或目录\r\ngrep: D: 没有那个文件或目录\r\ngrep: sys_call_table: 没有那个文件或目录\r\n: 没有那个文件或目录
复制代码
\r\n\r\n我现在在http://www.s0ftpj.org/en/site.ht ... 看我的机器有没有lkm 但是在编译的时候出错了,我的操作系统是rhel as 3.0\r\n内核是操作系统默认的2.4.21-20.ELsmp,编译出错信息如下:\r\n\r\n
  1. Have you compiled IPv6 support in your kernel ? [y/n] n\r\n \r\n        --------------------------------\r\n        |  kstat  Linux 2.4.x version  |\r\n        |  by FuSyS  [email]fusys@s0ftpj.org[/email]  |\r\n        |    [url]http://www.s0ftpj.org/[/url]    |\r\n        | please look at README_FIRST. |\r\n        | If you still have _not_ it\'s |\r\n        | a good time to press Ctrl-C  |\r\n        |    Else just press RETURN.   |\r\n        --------------------------------\r\n \r\n \r\n \r\nCompiling kstat on game...\r\n \r\ngcc -O2 -Wall -Werror -I./include/ -I/usr/src/linux/include -c ./src/procex.c \r\ncc1: warnings being treated as errors\r\nIn file included from ./src/procex.c:23:\r\n/usr/include/linux/proc_fs.h:50: warning: `struct file\' declared inside parameter list\r\n/usr/include/linux/proc_fs.h:50: warning: its scope is only this definition or declaration, which is probably not what you want.\r\n/usr/include/linux/proc_fs.h:70: parse error before `atomic_t\'\r\n/usr/include/linux/proc_fs.h:70: warning: no semicolon at end of struct or union\r\n/usr/include/linux/proc_fs.h:73: parse error before `}\'\r\n/usr/include/linux/proc_fs.h:199: warning: `struct tty_driver\' declared inside parameter list\r\n/usr/include/linux/proc_fs.h:200: warning: `struct tty_driver\' declared inside parameter list\r\n/usr/include/linux/proc_fs.h:203: parse error before `void\'\r\n./src/procex.c: In function `get_kstat_proc_syms\':\r\n./src/procex.c:52: `proc_net\' undeclared (first use in this function)\r\n./src/procex.c:52: (Each undeclared identifier is reported only once\r\n./src/procex.c:52: for each function it appears in.)\r\n./src/procex.c:53: warning: implicit declaration of function `sprintf\'\r\n./src/procex.c:53: invalid use of undefined type `struct proc_dir_entry\'\r\n./src/procex.c:54: invalid use of undefined type `struct proc_dir_entry\'\r\n./src/procex.c:55: invalid use of undefined type `struct proc_dir_entry\'\r\n./src/procex.c:56: invalid use of undefined type `struct proc_dir_entry\'\r\n./src/procex.c:57: dereferencing pointer to incomplete type\r\n./src/procex.c:59: dereferencing pointer to incomplete type\r\n./src/procex.c:61: warning: implicit declaration of function `strcmp\'\r\n./src/procex.c:61: dereferencing pointer to incomplete type\r\n./src/procex.c:62: dereferencing pointer to incomplete type\r\n./src/procex.c:64: dereferencing pointer to incomplete type\r\n./src/procex.c:50: warning: `s\' might be used uninitialized in this function\r\nmake: *** [kstat] Error 1\r\n
复制代码
\r\n\r\n请问我该怎么解决?[/code]
作者: ayazero    时间: 2005-02-21 13:16
标题: 大家帮我看看我是否中了 LKM Trojan木马
装对应Linux-`uname -r`的kernel src rpm包\r\n/usr/src/linux目录只是个连接\r\n直接修改Makefile的-I参数后面的参数为 /usr/src/linux-2.4.xx\r\n\r\n现在还是用hunt吧,这个工具去www.linuxforum.net的系统安全版看看
作者: lues    时间: 2005-02-21 13:41
标题: 大家帮我看看我是否中了 LKM Trojan木马
原帖由 \"ayazero\" 发表:\n装对应Linux-`uname -r`的kernel src rpm包\r\n/usr/src/linux目录只是个连接\r\n直接修改Makefile的-I参数后面的参数为 /usr/src/linux-2.4.xx\r\n\r\n现在还是用hunt吧,这个工具去www.linuxforum.net的系统安全版看看
\r\n\r\n改了也不行\r\n\r\n我的uname -r如下\r\n[root@game 2.4]# uname -r\r\n2.4.21-20.ELsmp\r\n但是/usr/src目录下没有2.4.21-20.ELsmp这个目录,我就用2.4.21-20.EL目录代替了但是还是不行\r\n[root@game 2.4]# ls /usr/src\r\ndebug  linux-2.4  linux-2.4.21-20.EL  redhat\r\n\r\n
  1. gcc -O2 -Wall -Werror -I./include/ -I/usr/src/linux-2.4.21-20.EL/include -c ./src/procex.c \r\ncc1: warnings being treated as errors\r\nIn file included from /usr/src/linux-2.4.21-20.EL/include/linux/swap.h:6,\r\n                 from /usr/src/linux-2.4.21-20.EL/include/linux/mm.h:31,\r\n                 from /usr/src/linux-2.4.21-20.EL/include/linux/slab.h:14,\r\n                 from /usr/src/linux-2.4.21-20.EL/include/linux/proc_fs.h:5,\r\n                 from ./src/procex.c:23:\r\n/usr/src/linux-2.4.21-20.EL/include/linux/brlock.h:88: warning: `always_inline\' attribute directive ignored\r\n/usr/src/linux-2.4.21-20.EL/include/linux/brlock.h:101: warning: `always_inline\' attribute directive ignored\r\n/usr/src/linux-2.4.21-20.EL/include/linux/brlock.h:171: warning: `always_inline\' attribute directive ignored\r\n/usr/src/linux-2.4.21-20.EL/include/linux/brlock.h:179: warning: `always_inline\' attribute directive ignored\r\nmake: *** [kstat] Error 1
复制代码
\r\n\r\nwww.linuxforum.net这个坛子现在好冷亚
作者: ayazero    时间: 2005-02-21 17:06
标题: 大家帮我看看我是否中了 LKM Trojan木马
kstat v24在kernel -2.4.18之后的版本都会编译出错的\r\n\r\n用module_hunter吧
作者: lues    时间: 2005-02-21 19:47
标题: 大家帮我看看我是否中了 LKM Trojan木马
原帖由 \"ayazero\" 发表:\nkstat v24在kernel -2.4.18之后的版本都会编译出错的\r\n\r\n用module_hunter吧
\r\n\r\nhunt这个工具我装了,但是不大会用,能否给两个hunt和module_hunter如何使用的连接,(偶用google搜过了,都是说得比较简单,module_hunter怎么使用都只提了一下)
作者: ayazero    时间: 2005-02-22 10:34
标题: 大家帮我看看我是否中了 LKM Trojan木马
少打了几个字:)不是hunt,那个是会话劫持工具\r\n\r\nmodule_hunter.c编译后是内核模块,insmod之后\r\n\r\ncat /proc/showmodules && dmesg\r\n\r\n在输出的最后可以看到所有被加载到内核的模块,包括被隐藏的LKM rootkit(如果有的话),再看一下lsmod你就知道有没有了
作者: lues    时间: 2005-02-22 13:58
标题: 大家帮我看看我是否中了 LKM Trojan木马
我没有这个模块,是不是要 重新编译内核亚\r\n\r\n
  1. [root@test2 root]# insmod module_hunter.c\r\ninsmod: module_hunter.c: No such file or directory\r\n[root@test2 root]# find / -name \'*module_hunter.c*\'\r\n[root@test2 root]# find / -name \'*module*.c\'\r\n/usr/src/linux-2.4.21-20.EL/arch/arm/nwfpe/fpmodule.c\r\n/usr/src/linux-2.4.21-20.EL/arch/ia64/sn/io/module.c\r\n/usr/src/linux-2.4.21-20.EL/arch/ia64/sn/io/sn1/module.c\r\n/usr/src/linux-2.4.21-20.EL/arch/ia64/sn/io/sn2/module.c\r\n/usr/src/linux-2.4.21-20.EL/drivers/addon/cipe/module.c\r\n/usr/src/linux-2.4.21-20.EL/drivers/isdn/act2000/module.c\r\n/usr/src/linux-2.4.21-20.EL/drivers/isdn/pcbit/module.c\r\n/usr/src/linux-2.4.21-20.EL/drivers/scsi/scsi_module.c\r\n/usr/src/linux-2.4.21-20.EL/kernel/module.c\r\n[root@test2 root]# cat /proc/showmodules && dmesg \r\ncat: /proc/showmodules: 没有那个文件或目录\r\n[root@test2 root]#
复制代码

作者: ayazero    时间: 2005-02-22 17:32
标题: 大家帮我看看我是否中了 LKM Trojan木马
module_hunter.c是c的源文件,不是系统自带的,需要去linuxforum.net上找\r\n\r\n用对应的kernel include<>; 编译过后才是.o(kernel v24)内核模块,才能被insmod,然后才有下文\r\n\r\n看了你贴的那些真不知道说什么好,大概也只有对着客户才有这种耐心
作者: lues    时间: 2005-02-22 17:34
标题: 大家帮我看看我是否中了 LKM Trojan木马
原帖由 \"ayazero\" 发表:\nmodule_hunter.c是c的源文件,不是系统自带的,需要去linuxforum.net上找\r\n\r\n用对应的kernel include<>; 编译过后才是.o(kernel v24)内核模块,才能被insmod,然后才有下文\r\n\r\n看了你贴的那些真不知道说什么好,..........
\r\n\r\n    \r\n不好意思,是我不了解嘛
作者: lues    时间: 2005-02-25 14:37
标题: 大家帮我看看我是否中了 LKM Trojan木马
请问module_hunter.c如何用对应的kernel include<>; 编译?\r\n是把kernel include<>;代码放到module_hunter.c源代码里面吗?\r\n用gcc -o module_hunter.o module_hunter.c就可以了吗?\r\n\r\n不好意思,我没有用过gcc编译过c程序,所以再次请教




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2