最近有客户机器上发现病毒,所以拿来分析下,
在虚拟机上发现病毒执行后进程项会多出一个IEXPLORE.EXE,无界面,用ProcessExplorer,观察该进程明显没有父进程,(就是在进程树的根部,其他两个是根 syste idle 和 explorer)
其他ie都是explorer启动的,
请问我怎么能确定 这个IEXPLORE.EXE父进程,或启动方式, ,怎么用windbg调试下呢?
楼主要是写过遍历链表的小POC就会发现 Process Explorer 其实也就是分析 UniqueProcessId 和 InheritedFromUniqueProcessId 之间的关系来显示那棵进程树的。下面是我的某小POC的部分输出(请注意 UID 和 IID 的关系):"0x826D73B0" NEXT="0x825B97C0", EPROCESS=0x827BA830, UID=0x00000004, IID=0x00000000. ; System"0x825B97C0" NEXT="0x82640DC8", EPROCESS=0x826432F8, UID=0x0000019C, IID=0x00000004."0x82640DC8" NEXT="0x82666078", EPROCESS=0x824F5DA0, UID=0x00000290, IID=0x0000019C."0x82666078" NEXT="0x826E3890", EPROCESS=0x82517DA0, UID=0x000002AC, IID=0x0000019C."0x826E3890" NEXT="0x8265D3C0", EPROCESS=0x82524A78, UID=0x000002DC, IID=0x000002AC."0x8265D3C0" NEXT="0x826E0C88", EPROCESS=0x825F2550, UID=0x000002E8, IID=0x000002AC."0x826E0C88" NEXT="0x8252A5C0", EPROCESS=0x824FF670, UID=0x00000380, IID=0x000002DC."0x8252A5C0" NEXT="0x82533218", EPROCESS=0x826C4790, UID=0x000003D0, IID=0x000002DC."0x82533218" NEXT="0x826DBA20", EPROCESS=0x8261ADA0, UID=0x00000444, IID=0x000002DC."0x826DBA20" NEXT="0x825A1A88", EPROCESS=0x8263B020, UID=0x00000484, IID=0x000002DC."0x825A1A88" NEXT="0x826A4F80", EPROCESS=0x826BE978, UID=0x000004DC, IID=0x000002DC."0x826A4F80" NEXT="0x826C4C18", EPROCESS=0x825F2DA0, UID=0x000005E8, IID=0x000005A4. ; explorer.exe"0x826C4C18" NEXT="0x8271E168", EPROCESS=0x8252F708, UID=0x00000634, IID=0x000002DC."0x8271E168" NEXT="0x82720D18", EPROCESS=0x825AC978, UID=0x0000064C, IID=0x000002DC."0x82720D18" NEXT="0x826DD078", EPROCESS=0x8253E690, UID=0x0000070C, IID=0x000005E8."0x826DD078" NEXT="0x826DDA20", EPROCESS=0x823D8810, UID=0x0000071C, IID=0x000005E8."0x826DDA20" NEXT="0x8257A200", EPROCESS=0x825BD5D0, UID=0x000000C0, IID=0x000002DC."0x8257A200" NEXT="0x826131D8", EPROCESS=0x823F8020, UID=0x000007A4, IID=0x00000444."0x826131D8" NEXT="0x825EA490", EPROCESS=0x823F3020, UID=0x00000114, IID=0x000002DC."0x825EA490" NEXT="0x823EF758", EPROCESS=0x82588DA0, UID=0x00000468, IID=0x000005E8."0x823EF758" NEXT="0x00000000", EPROCESS=0x825764B8, UID=0x00000704, IID=0x000005E8.为了验证上述猜想,我们可以 DKOM 一下 _EPROCESS。如图:图中,我不但修改了一些进程的 InheritedFromUniqueProcessId,还抹掉了 _SE_AUDIT_PROCESS_CREATION_INFO,所以进程没名字(类似于什么 PEB、SectionObject - PsReferenceProcessFilePointer 里的等等等等名字我一样可以抹去)。最后,不知道您是什么平台,给您一些我代码里的硬编码://// windows 2000//g_HardCode.flags_system_version = WINDOWS_VERSION_5_0;
g_HardCode.offset_eprocess_unique_id = 0x09C;g_HardCode.offset_eprocess_debug_port = 0x120;g_HardCode.offset_eprocess_object_table = 0x128;g_HardCode.offset_eprocess_active_links = 0x0A0;g_HardCode.offset_eprocess_win32_process = 0x214;g_HardCode.offset_eprocess_security_port = 0x22C;g_HardCode.offset_eprocess_priority_class = 0x211;g_HardCode.offset_eprocess_image_file_name = 0x1FC;g_HardCode.offset_eprocess_inherited_unique_id = 0x1C8;g_HardCode.offset_eprocess_win32_window_station = 0x1C4;g_HardCode.offset_eprocess_section_base_address = 0x1B4;
//// windows xp//g_HardCode.flags_system_version = WINDOWS_VERSION_5_1;
g_HardCode.offset_eprocess_unique_id = 0x084;g_HardCode.offset_eprocess_debug_port = 0x0BC;g_HardCode.offset_eprocess_object_table = 0x0C4;g_HardCode.offset_eprocess_active_links = 0x088;g_HardCode.offset_eprocess_win32_process = 0x130;g_HardCode.offset_eprocess_security_port = 0x198;g_HardCode.offset_eprocess_priority_class = 0x254;g_HardCode.offset_eprocess_image_file_name = 0x174;g_HardCode.offset_eprocess_inherited_unique_id = 0x14C;g_HardCode.offset_eprocess_win32_window_station = 0x148;g_HardCode.offset_eprocess_section_base_address = 0x13C;
//// windows 2003//g_HardCode.flags_system_version = WINDOWS_VERSION_5_2;
g_HardCode.offset_eprocess_unique_id = 0x094;g_HardCode.offset_eprocess_debug_port = 0x0CC;g_HardCode.offset_eprocess_object_table = 0x0D4;g_HardCode.offset_eprocess_active_links = 0x098;g_HardCode.offset_eprocess_win32_process = 0x11C;g_HardCode.offset_eprocess_security_port = 0x188;g_HardCode.offset_eprocess_priority_class = 0x24C;g_HardCode.offset_eprocess_image_file_name = 0x164;g_HardCode.offset_eprocess_inherited_unique_id = 0x138;g_HardCode.offset_eprocess_win32_window_station = 0x134;g_HardCode.offset_eprocess_section_base_address = 0x128;
//// windows vista//g_HardCode.flags_system_version = WINDOWS_VERSION_6_0;
g_HardCode.offset_eprocess_unique_id = 0x09C;g_HardCode.offset_eprocess_debug_port = 0x0D4;g_HardCode.offset_eprocess_object_table = 0x0DC;g_HardCode.offset_eprocess_active_links = 0x0A0;g_HardCode.offset_eprocess_win32_process = 0x108;g_HardCode.offset_eprocess_security_port = 0x170;g_HardCode.offset_eprocess_priority_class = 0x234;g_HardCode.offset_eprocess_image_file_name = 0x14C;g_HardCode.offset_eprocess_inherited_unique_id = 0x124;g_HardCode.offset_eprocess_win32_window_station = 0x120;g_HardCode.offset_eprocess_section_base_address = 0x114;至于如何调试(在可调试环境下)或者拦截启动那方法太多了,微软官方的方法是 NotifyRoutine 源代码位于 \ntos\ps\create.c
王宇把“其所以然”讲的很到位,白话解释一下(不知道是否多余:-)),意思是虽然Process Explorer显示没有父进程,但是这不说明什么,病毒随便改改就可以做到这一点。
我想楼主是想知道父进程是谁?或者说是这个奇怪的IE是谁怎么创建的。 建议试一试使用《软件调试》10.3.4节介绍的“自动启动调试器”方法(P238)。也就是修改注册表,以便下一次启动IE时就启动调试器。然后在调试器里执行!peb命令,观察这个进程命令行参数、父进程等信息。
感谢各位关注,今天用张老师说的《软件调试》上的方法,重启以后 进程里都没有发现那个病毒进程和windbg;我手动运行正常的ie时,windbg启动了,正常的。
另外发现有得dll 删除不掉,我怎么调试知道哪些进程在引用它呢?
(好几个病毒 都带个beep.sys,把系统的给替换掉, 这个sys后门 很流行,?)