Chinaunix首页 | 论坛 | 博客
  • 博客访问: 306248
  • 博文数量: 84
  • 博客积分: 5016
  • 博客等级: 大校
  • 技术积分: 900
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-30 20:22
文章分类

全部博文(84)

文章存档

2008年(21)

2007年(63)

我的朋友

分类: WINDOWS

2007-11-23 21:51:17

Usage : knlsc13.exe -f | -l[swamd] | -c[a|m|d] ServiceName
   -f : Find hidden services.
   -l : List specified services.
   -c : Config service start type.
  s w : Select System or Win32 service type. Default is all.
a m d : Select Automatic, Manual or Disabled start type. Default is all.
Example:
>knlsc13.exe -f       : Find hidden services.
>knlsc13.exe -law     : List Automatic Win32 services.
>knlsc13.exe -cd BITS : Config BITS service start type to Disabled.

一、介绍:
    一个查找隐藏服务的小程序。可以显示被hxdef100和ntrootkit122等rootkit隐藏的服务。发现隐藏的服务后,可以使用本程序禁用它。

二、用法:
1,查找隐藏的服务
C:\path>knlsc13.exe -f
2,列出指定类型的服务的属性
C:\path>knlsc13.exe -l[swamd]
s和w参数分别代表"System"和"Win32"服务类型。
a、m和d参数分别代表"自动"、"手动"和"禁用"启动方式。
各个参数可以组合使用。
3,配置指定服务的启动方式
C:\path>knlsc13.exe -c[a|m|d] ServiceName
a、m和d参数的意义同上。
三个参数单独使用,不使用参数则显示ServiceName当前的属性。

三、显示格式:
每个服务的属性按照以下格式显示。
>服务名
        服务显示名
        [类型] [启动方式] [时间戳]
        服务程序全路径
        服务Dll全路径(共享进程的服务才有此项)
注:时间戳表示服务属性最后一次被改变的时间。用本程序改的除外。

四、举例:
C:\path>knlsc13.exe -law        (显示自启动的Win32服务)
Dumping Services Info...OK!
>AudioSrv
        Windows Audio
        [Win32] [Auto] [2004-10-31 01:29:55]
        %SystemRoot%\System32\svchost.exe -k netsvcs
        %SystemRoot%\System32\audiosrv.dll
>Eventlog
        Event Log
        [Win32] [Auto] [2004-02-10 07:00:25]
        %SystemRoot%\system32\services.exe
>PlugPlay
        Plug and Play
        [Win32] [Auto] [2004-02-10 07:04:51]
        %SystemRoot%\system32\services.exe
>RpcSs
        Remote Procedure Call (RPC)
        [Win32] [Auto] [2004-10-31 01:29:55]
        %SystemRoot%\system32\svchost -k rpcss
        %SystemRoot%\system32\rpcss.dll
>SamSs
        Security Accounts Manager
        [Win32] [Auto] [2004-10-31 01:29:55]
        %SystemRoot%\system32\lsass.exe
>Serv-U
        Serv-U FTP 服务器
        [Win32] [Auto] [2004-10-31 01:29:55]
        E:\Program Files\Serv-U\ServUDaemon.exe
>Themes
        Themes
        [Win32] [Auto] [2004-10-31 01:29:55]
        %SystemRoot%\System32\svchost.exe -k netsvcs
        %SystemRoot%\System32\shsvcs.dll
 7 service(s) has been listed.
C:\path>knlsc13.exe -f          (查找隐藏的服务)
Dumping Services Info...OK!
>hxdefdrv
        [Driver] [Manual] [2004-10-31 05:14:29]
        \??\C:\Windows\system32\hxdefdrv.sys
>hxdefsvc
        Hacker Defender 100
        [Win32] [Auto] [2004-10-31 05:14:29]
        C:\Windows\system32\hxdefsvc.exe
 2 hidden service(s) has been found.
C:\path>knlsc13.exe -cd hxdefdrv    (禁用隐藏的服务hxdefdrv)
Dumping Services Info...OK!
The "hxdefdrv" service start type is set to Disabled.
C:\path>knlsc13.exe -cd hxdefsvc    (禁用隐藏的服务hxdefsvc)
Dumping Services Info...OK!
The "hxdefsvc" service start type is set to Disabled.
C:\path>knlsc13.exe -c hxdefsvc     (查看hxdefsvc服务当前的属性)
Dumping Services Info...OK!
>hxdefsvc
        Hacker Defender 100
        [Win32] [Disabled] [2004-10-31 05:14:29]   (已经被禁用)
        C:\Windows\system32\hxdefsvc.exe
C:\path>shutdown -r                (重启系统后,hxdef就失效了)
C:\path>knlsc13.exe -f
Dumping Services Info...OK!
It has not found hidden service.    (没有隐藏的服务)

五、运行环境:
    本程序支持Win2k/XP/2003系统,已在Win2k sp4、WinXP sp1/sp2和Win2003上测试通过。

六、其他:
1,knlsc运行时,将临时生成一个随机命名的sys文件,并增加一个同名的系统服务。如果运行时发生意外,导致服务没有被自动删除,请用SC手动删除。
C:\>sc GetServiceKeyName "Kernel SC"
[SC] GetServiceKeyName SUCCESS  Name = odritwuylp
C:\>sc delete odritwuylp
[SC] DeleteService SUCCESS
2,knlsc查找隐藏服务的原理是,直接解读注册表文件(%SystemRoot%\System32\config\system),历遍全部Service Key,与RegEnumKeyEx()的结果对比。注意,只有同时具有Type,Start和ImagePath三个键值的Service Key才被认为是个服务,否则即使被隐藏也不会显示。
 
 
最终让我们感谢作者:zzzEVAzzz
阅读(2402) | 评论(0) | 转发(0) |
0

上一篇:文字游戏

下一篇:My Active Desktop

给主人留下些什么吧!~~