kingcms5.0/5.1漏洞

来源:互联网 发布:python 驼峰命名 编辑:程序博客网 时间:2024/04/24 05:08

这个漏洞不晓得应不应该出现在这。希望大家尽快修复吧,免得被挂马了再亡羊补牢。

1。kingcms 5.0 fckeditor的默认路径在 admin/system/editor/FCKeditor/editor/fckeditor.Html

把本地的马命名为 hx.asp;jpg 注意看 jpg前面没有点了..

OK了..其实以后做站结合fckeditor这类的编辑器..最好加个验证..只有管理才能访问..这样或者比较好吧

2。编辑器路径:/admin/system/editor/

利用方式:访问http://www.xxx.com/admin/system/editor/FCKeditor/editor/filemanager/connectors/asp/connector.asp?Command=CreateFolder&Type=Image&CurrentFolder=/qing.asp&NewFolderName=qing.asp后在/up_files/image/目录下创建一个明文qing.asp的文件夹。

     然后访问http://www.xxx.com/admin/system/editor/FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=../../connectors/asp/connector.asp,选择刚创建的qing.asp文件夹并上传图片木马,可以上传包含一句话内容的图片,然后使用一句话客户端连接。

     3。该系统后台也是比较脆弱的,若能成功登陆后台拿webshell比较简单,后台中有个webftp的功能,可以上传任意文件。默认数据库地址为/db/King#Content#Management#System.mdb,下载的时候将#替换成%23后下载。





有很多存在FCKEDITOR编辑器的基本存在该漏洞 与其说是KINGCMS的漏洞不如说是FCKEDITOR的漏洞

临时解决方案:

1。更改后台路径admin 为其他目录。
方法:修改admin目录名称为任意名称,防止他人猜测后台,但注意请在安装过程完毕后修改

2。FCKeditor编辑器路径做更改
方法:打开page/system目录下的config.asp文件。
找到:const king_fckeditor_path = "FCKeditor"   必须修改,修改后请同时修改admin/system/editor  目录下FCKeditor名称为这里设置的名称

3。修改默认数据库的名字为任意其他名字,加上几个数字也可以。之后修改:page/system/conn.asp。    里面的数据库链接名字


fckeditor的修改版解决方案:
修改/editor/filemanager/browser/default/connectors/asp中的commands.asp文件,如下:


在代码:


   ' Get the uploaded file name.
   sFileName = oUploader.File( "NewFile" ).Name
   sExtension = oUploader.File( "NewFile" ).Ext

后加入如下语句:


                 '添加开始   限制上传类型代码

                 sFileName = Mid(sFileName,1,Instr(sFileName,".")-1)
                 Dim FilterArray
                 Dim fix
                 Dim fixstar
                    fixstar=false
                 FilterArray=Split("BMP|JPG|JPEG|GIF|PNG|RAR|ZIP|SWF|WAV|MID|WMA","|") '允许上传类型
                 For fix=0 to UBound(FilterArray)
                      if UCase(sExtension)=FilterArray(fix) Then
                         fixstar=true
                         Exit For
                      Else
                         fixstar=false
                      End if
                 Next
                      if fixstar=false Then    '如果不在上传类型中,则弹出窗口
                         sErrorNumber = "202"
                      Else
                         sFileName=sFileName&"."&sExtension

                 '添加结束

'下面的为文件原语句
sOriginalFileName = sFileName
Dim iCounter
.......... '省略部分代码

if oUploader.ErrNum > 0 Then sErrorNumber = "202"
Exit Do
End if
Loop

End if '在此加入IF结束语句


End if
Set oUploader = Nothing 'End

 

原创粉丝点击