当前位置:网站首页>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 :
边栏推荐
- Pointer classic written test questions
- C进阶-数据的存储(上)
- RT thread analysis - object container implementation and function
- Raspberry pie 3.5-inch white screen display connection
- Nacos TC setup of highly available Seata (02)
- Set detailed map + interview questions
- 关于Unity Inspector上的一些常用技巧,一般用于编辑器扩展或者其他
- Configuration file converted from Excel to Lua
- 指針經典筆試題
- Ora-01779: the column corresponding to the non key value saving table cannot be modified
猜你喜欢
Yolov5 tensorrt acceleration
Fluent implements a loadingbutton with loading animation
Check the useful photo lossless magnification software on Apple computer
Please wait while Jenkins is getting ready to work
Codeforces Round #804 (Div. 2)
【LeetCode】18、四数之和
Using stopwatch to count code time
nacos-高可用seata之TC搭建(02)
Microblogging hot search stock selection strategy
Easy to understand I2C protocol
随机推荐
Nacos TC setup of highly available Seata (02)
Yolov5 tensorrt acceleration
驱动开发——第一个HelloDDK
Modbus protocol communication exception
Acwing week 58
Select knowledge points of structure
Sliding window problem review
Leetcode dynamic planning day 16
C AES encrypts strings
Set detailed map + interview questions
Figure database ongdb release v-1.0.3
Oracle deletes duplicate data, leaving only one
Raspberry pie 3.5-inch white screen display connection
【torch】|torch.nn.utils.clip_grad_norm_
Mysql高级篇学习总结9:创建索引、删除索引、降序索引、隐藏索引
【torch】|torch. nn. utils. clip_ grad_ norm_
05. 博客项目之安全
Unity Vector3. Use and calculation principle of reflect
Huawei od computer test question 2
Idea one key guide package