### 简要描述: YiDacms最新版漏洞大礼包 ### 详细说明: 易达CMS 企业建站系统 当前最新版本是:YidaCms X3.2(20140718)版 这里我们主要看看后台比较严重的漏洞 关于xss和sql注入我们就不多讲了,后台的SQL注入很多都没有用全局过滤,导致sql注入 首先来看看第一处目录遍历,任意文件读取,拿shell: 文件/Yidacms/admin/admin_fso.asp: ``` ElseIf action = ("Edit") then'读取文件 Dim FileAll FilePath = Trim(Request.Form("ThisDir")) FileName = Trim(Request.Form("FileId")) FilePath1 = Server.MapPath(""&webpath&"template/") & FilePath & "\" & FileName If Fso.FileExists(FilePath1) then Set FileOpen = Fso.OpenTextFile (FilePath1,1) FileAll = FileOpen.ReadAll FileOpen.close If IsReplace then FileAll = Replace(FileAll,"textarea","\\textarea\\") Else Response.write "<script>alert('发生错误,文件已经被删除或者损坏!');location.replace('admin_fso.asp');</script>" End If ``` 这里在读取文件时,没有任何过滤处理,直接拼接文件路径,然后直接读取,显示 这里我们读取inc/db.asp文件,敏感信息都在这里了: [<img src="https://images.seebug.org/upload/201408/271637207246f387b354f01488c4f87c8f7072b3.png" alt="100.png" width="600"...
### 简要描述: YiDacms最新版漏洞大礼包 ### 详细说明: 易达CMS 企业建站系统 当前最新版本是:YidaCms X3.2(20140718)版 这里我们主要看看后台比较严重的漏洞 关于xss和sql注入我们就不多讲了,后台的SQL注入很多都没有用全局过滤,导致sql注入 首先来看看第一处目录遍历,任意文件读取,拿shell: 文件/Yidacms/admin/admin_fso.asp: ``` ElseIf action = ("Edit") then'读取文件 Dim FileAll FilePath = Trim(Request.Form("ThisDir")) FileName = Trim(Request.Form("FileId")) FilePath1 = Server.MapPath(""&webpath&"template/") & FilePath & "\" & FileName If Fso.FileExists(FilePath1) then Set FileOpen = Fso.OpenTextFile (FilePath1,1) FileAll = FileOpen.ReadAll FileOpen.close If IsReplace then FileAll = Replace(FileAll,"textarea","\\textarea\\") Else Response.write "<script>alert('发生错误,文件已经被删除或者损坏!');location.replace('admin_fso.asp');</script>" End If ``` 这里在读取文件时,没有任何过滤处理,直接拼接文件路径,然后直接读取,显示 这里我们读取inc/db.asp文件,敏感信息都在这里了: [<img src="https://images.seebug.org/upload/201408/271637207246f387b354f01488c4f87c8f7072b3.png" alt="100.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201408/271637207246f387b354f01488c4f87c8f7072b3.png) 这里读取到了口令 正好这列修改文件是需要口令,那么我么修改文件后,加入我们的后门shell 即可拿到shell 第二处目录遍历 http://10.65.40.6/Yidacms/admin/admin_upload.asp?action=Open&Dir=\..\ 修改Dir即可遍历全站文件 [<img src="https://images.seebug.org/upload/201408/271656238780151999e6d8982fe5150c213e9176.png" alt="101.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201408/271656238780151999e6d8982fe5150c213e9176.png) 第三处任意文件删除 文件:/Yidacms/admin/admin_login.asp ``` Sub DelAll() Dim FolderId,FileId,ThisDir,FileNum,FolderNum,FilePath,FolderPath FolderId = Split(Request.Form("FolderId"),",") FileId = Split(Request.Form("FileId"),",") ThisDir = trim(Request.Form("ThisDir")) FileNum=0 FolderNum=0 If Ubound(FolderId) <> -1 then'删除文件夹 For i = 0 to Ubound(FolderId) FolderPath = Server.MapPath(""&webpath&"uploadimg/") & ThisDir & "\" & trim(FolderId(i)) If Fso.FolderExists(FolderPath) then Fso.DeleteFolder FolderPath,true FolderNum = FolderNum + 1 End If Next End If If Ubound(FileId) <> -1 then'删除文件 For j = 0 to Ubound(FileId) FilePath = Server.MapPath(""&webpath&"uploadimg/") & ThisDir & "\" & trim(FileId(j)) response.write(FilePath) If Fso.FileExists(FilePath) then Fso.DeleteFile FilePath,true FileNum = FileNum + 1 response.write(FilePath) End If Next End If Response.write "<script>alert('\n恭喜,删除成功\n\n"& FolderNum &" 个文件夹被删除\n"& FileNum &" 个文件被删除');window.location.href=('"& Replace(Request.ServerVariables("HTTP_REFERER"),"\","\\") &"')</script>" End Sub ``` 删除文件时,直接拼接路径,导致任意文件删除: [<img src="https://images.seebug.org/upload/201408/27173100f110bda4c6796ec1dc977a8fd9e641c8.png" alt="102.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201408/27173100f110bda4c6796ec1dc977a8fd9e641c8.png) 第三处修改上传类型,上传任意文件拿shell 全局——条件设置 [<img src="https://images.seebug.org/upload/201408/271732145be2309f96108498acf51e29ec0d429f.png" alt="103.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201408/271732145be2309f96108498acf51e29ec0d429f.png) 这里不允许直接设置asp,我们添加cer类型即可 [<img src="https://images.seebug.org/upload/201408/271737163814d2546da8fa950b74174e33e489e2.png" alt="104.png" width="600" onerror="javascript:errimg(this);">](https://images.seebug.org/upload/201408/271737163814d2546da8fa950b74174e33e489e2.png) 等等还有其他很多问题。。。。。。 ### 漏洞证明: 见详细说明