80After CMS V4 鸡肋上传漏洞 - 脚本漏洞

admin 2021年4月3日19:39:01评论63 views字数 4023阅读13分24秒阅读模式

    By:小A

    官方网址:http://www.reaft.com/

    Cms下载地址:http://www.reaft.com/html/1/200.html

    界面做的还不错,搜索了一下好像用的人很少,开始。

    首先看目录下 UpLoad.html 文件上传,调用了的是 UpLoad.asp。

UpLoad.asp:

文件<a href="http://cn-sec.com/archives/tag/%e4%b8%8a%e4%bc%a0">上传</a>

dim upload
set upload = new AnUpLoad
upload.Exe = "*"
upload.MaxSize = 4 * 1024 * 1024 '4M
upload.GetData()
if upload.ErrorID>0 then
        response.Write upload.Description
else
        postMess("images/operate_02.jpg")
        dim savpath
        savepath = "/upload/"&year(date())&"/"&month(date())&"/"
        for each f in upload.files(-1)
                dim file
                set file = upload.files(f)
                if not(file is nothing) then
                        if file.saveToFile(savepath,0,true) then
                                postMess("images/operate_01.jpg")
                                postValue = postValue&""&savepath&file.filename&"|"
                                response.write ("")
                        end if
                end if
                set file = nothing
        next
end if
set upload = nothing
%>

    然后在来看看:UpLoad_Class.vbs.asp。

UpLoad_Class.vbs.asp:

'=========================================================
'类名: AnUpLoad(艾恩无组件上传类)
'=========================================================
C省略N行代码
        Public Function GetWH()
                '本函数代码参考网络
                On Error Resume Next
                mvarExtend = lcase(mvarExtend)
                if instr("|jpg|jpeg|bmp|png|gif|asa|","|" & mvarExtend & "|")
                Dim m_binItem
                Set m_binItem =server.CreateObject("ADODB.Stream")
                m_binItem.Mode = 3
                m_binItem.Type = 1
                m_binItem.Open
                Dim Info
                Set Info = server.CreateObject("ADODB.Recordset")
                Info.Fields.Append "value", 205, -1
                Info.Open
                Info.AddNew
                Info("value").AppendChunk (mvarValue)
                m_binItem.Write (Info("value"))
                Info("value").AppendChunk (Null)
                Info.Update
                Info.Close
                Set Info = Nothing
                select case lcase(mvarExtend)
                case "jpg","jpeg"
                        m_binItem.Position=3
                        do while not m_binItem.EOS
                                do
                                        intTemp = Ascb(m_binItem.Read(1))
                                loop while intTemp = 255 and not m_binItem.EOS
                                if intTemp 195 then
                                        m_binItem.read(Bin2Val(m_binItem.Read(2))-2)
                                else
                                        Exit do
                                end if
                                do
                                        intTemp = Ascb(m_binItem.Read(1))
                                loop while intTemp
                        loop
                        m_binItem.Read(3)
                        mvarHeight = Bin2Val(m_binItem.Read(2))
                        mvarWidth = Bin2Val(m_binItem.Read(2))
                case "gif"
                        if Lcase(strFext)"gif" then strFext="gif"
                        m_binItem.Position=6
                        mvarWidth = BinVal2(m_binItem.Read(2))
                        mvarHeight = BinVal2(m_binItem.Read(2))
                case "png"
                        if Lcase(strFext)"png" then strFext="png"
                        m_binItem.Position=18
                        mvarWidth = Bin2Val(m_binItem.Read(2))
                        m_binItem.Read(2)
                        mvarHeight = Bin2Val(m_binItem.Read(2))
                case "bmp"
                        if Lcase(strFext)"bmp" then strFext="bmp"
                        m_binItem.Position=18
                        mvarWidth = BinVal2(m_binItem.Read(4))
                        mvarHeight = BinVal2(m_binItem.Read(4))
            case "asa"
                        if Lcase(strFext)"asa" then strFext="asa"
                        m_binItem.Position=18
                        mvarWidth = BinVal2(m_binItem.Read(2))
                        mvarHeight = BinVal2(m_binItem.Read(2))
                end select
                m_binItem.Close
                If err then
                        mException=Err.Description
                End If
        End Function

    看红色部分,其他就不解释了。

    直接上传asa拿shell。

    还有就是上传可能会提示登录,直接伪造session就可以通过了。(站长评论:什么、?伪造 Session???……我了个擦,这要是能伪造,那岂不、、、小A同学可能是看错了,当成了cookie ……)

    验证代码在 admin.asp。

admin.asp:

if session("username")="" and session("password")="" then
session("Errortxt")="登录超时,请重新登陆"
response.Redirect("login.asp")
response.end
end if
%>

    其他就不多说了!

    重新编辑了一下,第一次发贴,格式不对,请见谅。

    这个应该算是一个漏洞吧,不知道是不是作者故意加上的,在上传扩展名,检查那里,居然加了个asa,无意间发现的。

文章来源于lcx.cc:80After CMS V4 鸡肋上传漏洞 - 脚本漏洞

相关推荐: 【牛人视频】自制最强的二进制算法机器

文章来源于lcx.cc:【牛人视频】自制最强的二进制算法机器相关推荐: 使用Dos、Cmd 添加用户并加入到超级管理员组使用Dos、Cmd 添加用户并加入到超级管理员组:     为系统添加一个名为“ceshi”密码为“741852”的普通账号:net use…

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年4月3日19:39:01
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   80After CMS V4 鸡肋上传漏洞 - 脚本漏洞http://cn-sec.com/archives/324162.html

发表评论

匿名网友 填写信息