guaiguaiguan
驱动中牛
驱动中牛
  • 注册日期2003-10-11
  • 最后登录2011-01-12
  • 粉丝0
  • 关注0
  • 积分14分
  • 威望556点
  • 贡献值0点
  • 好评度490点
  • 原创分0分
  • 专家分0分
阅读:1934回复:19

养了几天熊猫,有几分心得

楼主#
更多 发布于:2007-01-25 20:21
  知道最近熊猫比较火爆,赶紧从网上下了一个,美中不足的是熊猫感染的exe文件,无法正常执行。倒是在我的硬盘里面塞了一大堆 desktop_.ini文件,让我不胜其烦。
    说实在熊猫采用的技术虽然很一般,但是很有效,要不金山、瑞星、江民的专杀工具的扩展名怎么改扩展名运行。那些所谓神乎其神的工具只要让熊猫先一运行,熊猫立马把后来者干掉,看来这些工具并没有空手夺白刃的高招,浪得虚名。
    熊猫的杀进程方法比较拙劣,居然是postmessage WM_QUIT,结果害得我自己的程序还没启动就被它干死了,因为我的窗口标题中包含“进程”两个字,这是熊猫忌讳的。不过熊猫好像没有调用terminateprocess,因为我挂接的openprocess从来没有被激活。
    不过用它来测试程序,挺好玩的。只要控制住它不让它操作文件,不让它访问网络,以及注册表操作,就可以用来测试很多东西。比如从内核到应用的各种hook。
    好东西,不敢独享,奉献出来供大家测试。谁能帮帮忙把壳给去了。
附件名称/大小 下载次数 最后更新
熊猫烧香.rar (163KB)  37 2007-01-25 20:21
guaiguaiguan
驱动中牛
驱动中牛
  • 注册日期2003-10-11
  • 最后登录2011-01-12
  • 粉丝0
  • 关注0
  • 积分14分
  • 威望556点
  • 贡献值0点
  • 好评度490点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2007-01-25 22:22
***
guaiguaiguan
驱动中牛
驱动中牛
  • 注册日期2003-10-11
  • 最后登录2011-01-12
  • 粉丝0
  • 关注0
  • 积分14分
  • 威望556点
  • 贡献值0点
  • 好评度490点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2007-01-25 22:25
已经有分析了,51VC和熊猫基本类似,只是一个感染EXE(只是所谓的感染。。。这种方式老V看到会笑的),一个弹IE而已
http://www.cnbeta.com/modules.php?name=News&file=article&mode=flat&sid=21465
这个文章,我已经看了,跟厂商说法一样,我想知道更详细的,最好又脱壳代码。比如说熊猫是怎么得到窗口标题的,是通过enumwindows吗?不是,因为这个函数拦截时没有调用。那么又是通过什么办法?
guaiguaiguan
驱动中牛
驱动中牛
  • 注册日期2003-10-11
  • 最后登录2011-01-12
  • 粉丝0
  • 关注0
  • 积分14分
  • 威望556点
  • 贡献值0点
  • 好评度490点
  • 原创分0分
  • 专家分0分
地板#
发布于:2007-01-26 08:38
多谢WQXNETQIQI,原来是这样干的。怪不得我想尝试通过拦截enumwindows阻止它没有效果,然而使用postmessage反而很有效。跨进程的窗口消息操作都是可疑的。
居然通过这种方式遍历窗口
The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window. This function does not perform a case-sensitive search.

Syntax

HWND FindWindowEx(          HWND hwndParent,
    HWND hwndChildAfter,
    LPCTSTR lpszClass,
    LPCTSTR lpszWindow
);
Parameters

hwndParent
[in] Handle to the parent window whose child windows are to be searched.
If hwndParent is NULL, the function uses the desktop window as the parent window. The function searches among windows that are child windows of the desktop.

Microsoft? Windows? 2000 and Windows XP: If hwndParent is HWND_MESSAGE, the function searches all message-only windows.

hwndChildAfter
[in] Handle to a child window. The search begins with the next child window in the Z order. The child window must be a direct child window of hwndParent, not just a descendant window.
If hwndChildAfter is NULL, the search begins with the first child window of hwndParent.

Note that if both hwndParent and hwndChildAfter are NULL, the function searches all top-level and message-only windows.

lpszClass
[in]
Pointer to a null-terminated string that specifies the class name or a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be placed in the low-order word of lpszClass; the high-order word must be zero.

If lpszClass is a string, it specifies the window class name. The class name can be any name registered with RegisterClass or RegisterClassEx, or any of the predefined control-class names, or it can be MAKEINTATOM(0x800). In this latter case, 0x8000 is the atom for a menu class. For more information, see the Remarks section of this topic.

lpszWindow
[in] Pointer to a null-terminated string that specifies the window name (the window's title). If this parameter is NULL, all window names match.
Return Value

If the function succeeds, the return value is a handle to the window that has the specified class and window names.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.




Remarks

If the lpszWindow parameter is not NULL, FindWindowEx calls the GetWindowText function to retrieve the window name for comparison. For a description of a potential problem that can arise, see the Remarks section of GetWindowText.

An application can call this function in the following way.

FindWindowEx( NULL, NULL, MAKEINTATOM(0x8000), NULL );  
0x8000 is the atom for a menu class. When an application calls this function, the function checks whether a context menu is being displayed that the application created.

Windows 95 or later: FindWindowExW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.
guaiguaiguan
驱动中牛
驱动中牛
  • 注册日期2003-10-11
  • 最后登录2011-01-12
  • 粉丝0
  • 关注0
  • 积分14分
  • 威望556点
  • 贡献值0点
  • 好评度490点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2007-01-26 20:22
Win32K.sys NtUserSetWindowsHook系列函数如果只是拒绝比较简单,但是如果希望停下来和用户交互,可没有那么容易了。由于上下文切换,往往有去无回,等不上上层应用的应答,系统就崩掉了。
guaiguaiguan
驱动中牛
驱动中牛
  • 注册日期2003-10-11
  • 最后登录2011-01-12
  • 粉丝0
  • 关注0
  • 积分14分
  • 威望556点
  • 贡献值0点
  • 好评度490点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2007-01-27 09:23
给段代码瞧瞧,怎么处理的。我总是在hook Win32K.sys代码中keWaitFor*一个事件,如果只是简单返回一个拒绝的操作状态码,不会出问题,但是这个hook函数的确用户上层用户或者上层应用来确认。但是等到KeWait*返回上层应用或者用户应答结果时,这个等待时间可可能是一周的时间,但是等不到哪个时间系统就死掉了。死的时候softice无法跟踪断点猜测是进程堆栈切换的问题,采用哪个切换进程堆栈的函数,没有效果。而nt*.exe输出函数的 hook却没有任何问题。
游客

返回顶部