From 49dbcc77b7cd8eeeaaba7d68a298d36d07885e26 Mon Sep 17 00:00:00 2001 From: tardc Date: Wed, 22 Apr 2020 19:04:42 +0800 Subject: [PATCH] Update README.md --- ThinkPHP/ThinkPHP2.1_RCE/README.md | 12 ++++++------ ThinkPHP/ThinkPHP2.1_RCE/README.zh_CN.md | 19 +++++++++++++++++++ ThinkPHP/ThinkPHP5_RCE/README.md | 10 +++++----- ThinkPHP/ThinkPHP5_RCE/README.zh_CN.md | 13 +++++++++++++ 4 files changed, 43 insertions(+), 11 deletions(-) create mode 100644 ThinkPHP/ThinkPHP2.1_RCE/README.zh_CN.md create mode 100644 ThinkPHP/ThinkPHP5_RCE/README.zh_CN.md diff --git a/ThinkPHP/ThinkPHP2.1_RCE/README.md b/ThinkPHP/ThinkPHP2.1_RCE/README.md index 46c2894..c8788c7 100644 --- a/ThinkPHP/ThinkPHP2.1_RCE/README.md +++ b/ThinkPHP/ThinkPHP2.1_RCE/README.md @@ -1,18 +1,18 @@ -# ThinkPHP 2.1 远程代码执行 +# ThinkPHP 2.1 Remote Code Execution Vulnerability -ThinkPHP 诞生于 2006 年,是一个国产开源的 PHP 开发框架,其借鉴了 Struts 框架的 Action 对象,同时也使用面向对象的开发结构和 MVC 模式。ThinkPHP 可在 Windows 和 Linux 等操作系统运行,支持 MySql、Sqlite 和 PostgreSQL 等多种数据库以及 PDO 扩展,是一款跨平台,跨版本以及简单易用的 PHP 框架。 +ThinkPHP was born in 2006, is a open source PHP development framework, which draws on the Action object of the Struts framework, and also uses the object-oriented development structure and MVC model. ThinkPHP can run on operating systems such as Windows and Linux. It supports multiple databases such as MySql, Sqlite, and PostgreSQL, and PDO extensions. It is a cross-platform, cross-version, and easy-to-use PHP framework. -ThinkPHP 2.1 版本中,使用 `preg_replace` 的 `/e` 模式匹配路由: +In ThinkPHP version 2.1, `/e` pattern of `preg_replace` is used to match routes: ```php $res = preg_replace('@(\w+)'.$depr.'([^'.$depr.'\/]+)@e', '$var[\'\\1\']="\\2";', implode($depr,$paths)); ``` -这是个非常危险的参数,如果用了这个参数,`preg_replace` 的第二个参数就会被当做 PHP 代码执行。 +This is a very dangerous parameter. If this parameter is used, the second parameter of `preg_replace` will be executed as PHP code. -**影响版本**:ThinkPHP 2.1 +**Affected version**: ThinkPHP 2.1 -**[FOFA](https://fofa.so/result?qbase64=YXBwPSJUaGlua1BIUCI%3D) 查询规则**:app="ThinkPHP" +**[FOFA](https://fofa.so/result?qbase64=YXBwPSJUaGlua1BIUCI%3D) query rule**: app="ThinkPHP" # Demo diff --git a/ThinkPHP/ThinkPHP2.1_RCE/README.zh_CN.md b/ThinkPHP/ThinkPHP2.1_RCE/README.zh_CN.md new file mode 100644 index 0000000..46c2894 --- /dev/null +++ b/ThinkPHP/ThinkPHP2.1_RCE/README.zh_CN.md @@ -0,0 +1,19 @@ +# ThinkPHP 2.1 远程代码执行 + +ThinkPHP 诞生于 2006 年,是一个国产开源的 PHP 开发框架,其借鉴了 Struts 框架的 Action 对象,同时也使用面向对象的开发结构和 MVC 模式。ThinkPHP 可在 Windows 和 Linux 等操作系统运行,支持 MySql、Sqlite 和 PostgreSQL 等多种数据库以及 PDO 扩展,是一款跨平台,跨版本以及简单易用的 PHP 框架。 + +ThinkPHP 2.1 版本中,使用 `preg_replace` 的 `/e` 模式匹配路由: + +```php +$res = preg_replace('@(\w+)'.$depr.'([^'.$depr.'\/]+)@e', '$var[\'\\1\']="\\2";', implode($depr,$paths)); +``` + +这是个非常危险的参数,如果用了这个参数,`preg_replace` 的第二个参数就会被当做 PHP 代码执行。 + +**影响版本**:ThinkPHP 2.1 + +**[FOFA](https://fofa.so/result?qbase64=YXBwPSJUaGlua1BIUCI%3D) 查询规则**:app="ThinkPHP" + +# Demo + +![](thinkphp_2.1.gif) \ No newline at end of file diff --git a/ThinkPHP/ThinkPHP5_RCE/README.md b/ThinkPHP/ThinkPHP5_RCE/README.md index 4c3e8ff..9fce122 100644 --- a/ThinkPHP/ThinkPHP5_RCE/README.md +++ b/ThinkPHP/ThinkPHP5_RCE/README.md @@ -1,12 +1,12 @@ -# ThinkPHP 5.x 远程代码执行漏洞 +# ThinkPHP 5.x Remote Code Execution Vulnerability -ThinkPHP 诞生于 2006 年,是一个国产开源的 PHP 开发框架,其借鉴了 Struts 框架的 Action 对象,同时也使用面向对象的开发结构和 MVC 模式。ThinkPHP 可在 Windows 和 Linux 等操作系统运行,支持 MySQL、Sqlite 和 PostgreSQL 等多种数据库以及 PDO 扩展,是一款跨平台、跨版本以及简单易用的 PHP 框架。 +ThinkPHP was born in 2006, is a open source PHP development framework, which draws on the Action object of the Struts framework, and also uses the object-oriented development structure and MVC model. ThinkPHP can run on operating systems such as Windows and Linux. It supports multiple databases such as MySql, Sqlite, and PostgreSQL, and PDO extensions. It is a cross-platform, cross-version, and easy-to-use PHP framework. -在 ThinkPHP 5 中,由于框架对控制器名没有进行足够的检测,会导致在没有开启强制路由的情况下的远程代码执行漏洞。 +In ThinkPHP 5, because the framework does not perform sufficient detection on the controller name, it will lead to remote code execution without enabling mandatory routing. -**影响版本**:ThinkPHP 5.x +**Affected version**: ThinkPHP 5.x -**[FOFA](https://fofa.so/result?qbase64=YXBwPSJUaGlua1BIUCI%3D) 查询规则**:app="ThinkPHP" +**[FOFA](https://fofa.so/result?qbase64=YXBwPSJUaGlua1BIUCI%3D) query rule**: app="ThinkPHP" # Demo diff --git a/ThinkPHP/ThinkPHP5_RCE/README.zh_CN.md b/ThinkPHP/ThinkPHP5_RCE/README.zh_CN.md new file mode 100644 index 0000000..4c3e8ff --- /dev/null +++ b/ThinkPHP/ThinkPHP5_RCE/README.zh_CN.md @@ -0,0 +1,13 @@ +# ThinkPHP 5.x 远程代码执行漏洞 + +ThinkPHP 诞生于 2006 年,是一个国产开源的 PHP 开发框架,其借鉴了 Struts 框架的 Action 对象,同时也使用面向对象的开发结构和 MVC 模式。ThinkPHP 可在 Windows 和 Linux 等操作系统运行,支持 MySQL、Sqlite 和 PostgreSQL 等多种数据库以及 PDO 扩展,是一款跨平台、跨版本以及简单易用的 PHP 框架。 + +在 ThinkPHP 5 中,由于框架对控制器名没有进行足够的检测,会导致在没有开启强制路由的情况下的远程代码执行漏洞。 + +**影响版本**:ThinkPHP 5.x + +**[FOFA](https://fofa.so/result?qbase64=YXBwPSJUaGlua1BIUCI%3D) 查询规则**:app="ThinkPHP" + +# Demo + +![](thinkphp_5.gif) \ No newline at end of file