当前位置:网站首页>Vulhub vulnerability recurrence 72_ uWSGI
Vulhub vulnerability recurrence 72_ uWSGI
2022-07-06 05:19:00 【Revenge_ scan】
One 、 CVE-2018-7490_ uWSGI PHP Directory traversal vulnerability
Preface
uWSGI Is a Web Application server , It has achieved WSGI、uwsgi and http Such agreement , And support to run various languages through plug-ins .
Vulnerability Details
uWSGI 2.0.17 Previous PHP plug-in unit , There is no right way to deal with `DOCUMENT_ROOT` testing , So that users can pass `..%2f` To cross directories , Read or run `DOCUMENT_ROOT` Files outside the directory .
Vulnerability environment
shooting range :192.168.4.10_Ubuntu
Run flawed uWSGI The server :
#docker-compose up -d
After completion of operation , visit `http://your-ip:8080/` You can see phpinfo Information , explain uwsgi-php The server has run successfully .

Loophole recurrence
visit `http://your-ip:8080/..%2f..%2f..%2f..%2f..%2fetc/passwd`, Successfully read file :

Two 、 uWSGI Unauthorized access vulnerability
Preface
uWSGI Is a Web Application server , It has achieved WSGI、uwsgi and http Such agreement , And support to run various languages through plug-ins , Usually used to run Python WEB application .uwsgi In addition to the name of the application container , It and Fastcgi Something like that , It's also the front end server A communication standard with the back-end application container . at present nginx,apache Also support uwsgi The protocol forwards requests by proxy .
Vulnerability Details
uWSGI Support through magic variables (Magic Variables) Dynamically configure the backend Web application . If its port is exposed , An attacker can construct uwsgi Data packets , And specify magic variables `UWSGI_FILE`, Application `exec://` The protocol executes arbitrary commands .
Reference link :
- https://github.com/wofeiwo/webcgi-exploits/blob/master/python/uwsgi-rce-zh.md
- https://xz.aliyun.com/t/3512
- https://uwsgi-docs.readthedocs.io/en/latest/Vars.html
Vulnerability environment
Execute the following command to start nginx+uwsgi Environmental Science :
#docker-compose up -d
After the environment starts , visit `http://your-ip:8080` You can view one Web application , Its uwsgi Exposure to the 8000 port .
Loophole recurrence
Use [poc.py](poc.py), Carry out orders `python poc.py -u your-ip:8000 -c "touch /tmp/success"`:

perform `docker-compose exec web bash` Into the container , so `/tmp/success` Has successfully executed :

边栏推荐
- Codeforces Round #804 (Div. 2)
- Mongodb basic knowledge summary
- Three methods of Oracle two table Association update
- 關於Unity Inspector上的一些常用技巧,一般用於編輯器擴展或者其他
- 04. 项目博客之日志
- EditorUtility. The role and application of setdirty in untiy
- Easy to understand I2C protocol
- 集合详解之 Map + 面试题
- MySQL time processing
- UCF (2022 summer team competition I)
猜你喜欢

Codeforces Round #804 (Div. 2)

F12 solve the problem that web pages cannot be copied

February 12 relativelayout

Graduation design game mall

pix2pix:使用条件对抗网络的图像到图像转换

Cuda11.1 online installation

idea一键导包

Review of double pointer problems

【torch】|torch.nn.utils.clip_grad_norm_

Codeforces Round #804 (Div. 2) Editorial(A-B)
随机推荐
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
03. 开发博客项目之登录
[untitled]
[lgr-109] Luogu may race II & windy round 6
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Drive development - the first helloddk
从0到1建设智能灰度数据体系:以vivo游戏中心为例
Pagoda configuration mongodb
Three methods of Oracle two table Association update
MySQL advanced learning summary 9: create index, delete index, descending index, and hide index
Hyperledger Fabric2. Some basic concepts of X (1)
In 2022, we must enter the big factory as soon as possible
Ora-01779: the column corresponding to the non key value saving table cannot be modified
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Sliding window problem review
JS quick start (II)
趋势前沿 | 达摩院语音 AI 最新技术大全
Pix2pix: image to image conversion using conditional countermeasure networks
Compilation et connexion de shader dans games202 - webgl (comprendre la direction)
SQLite queries the maximum value and returns the whole row of data