当前位置:网站首页>File upload parsing vulnerability
File upload parsing vulnerability
2022-07-16 05:57:00 【Zigzag rise】
Apache Parsing vulnerabilities :
form : test.php.qwe.asd , Any not belonging to Apache Resolve the names in the blacklist and not in the whitelist
principle :Apache The rule of parsing files is to judge parsing from right to left , If the suffix is unrecognized file resolution , Just to the left . such as test.php.qwe.asd ,".qwe" and ".asd" These two suffixes are apache Unrecognized parsing ,apache It will test.php.qwe.asd It can be interpreted as php.
Conditions :apache adopt mod_php To run the script , Its 2.4.0-2.4.29 in apache Newline parsing vulnerability , In parsing php when
xxx.php\x0A Will be in accordance with PHP The suffix is parsed , This leads to bypassing some of the server's security policies
www.xxx.com/test.php.qwe.asd
With moudel Way to connect , The configuration file httpd.conf in LoadModule rewrite_module
modules/mod_rewrite.so Remove the previous comment , Search for keywords : AllowOverride , And change the following parameters from None All changed All.
Nginx Parsing vulnerabilities :
form : Any file name / Any file name .php
Add one after any file name / Any file name .php The parsing vulnerability of , For example, the original file name is test.jpg, Can be added as test.jpg/x.php Conduct parsing attacks .
principle :Nginx < 0.8.37 The default is CGI The way to support PHP Analytic , The common practice is to Nginx Through regular matching settings in the configuration file SCRIPT_FILENAME . When accessing www.xx.com/phpinfo.jpg/1.php This URL when ,
$fastcgi_script_name Will be set to phpinfo.jpg/1.php , And then it's constructed as SCRIPT_FILENAME Pass to PHPCGI, however PHP Why do you accept such parameters , And will phpinfo.jpg As PHP File parsing ? This is to say
fix_pathinfo This option . If this option is turned on , Then it will trigger in PHP The following logic in : PHP Will think
SCRIPT_FILENAME yes phpinfo.jpg , and 1.php yes PATH_INFO , So it will phpinfo.jpg As PHP File to parse .
Form of loopholes :
www.xxxx.com/UploadFiles/image/1.jpg/1.php
www.xxxx.com/UploadFiles/image/1.jpg.php
www.xxxx.com/UploadFiles/image/1.jpg/ \0.php form : Any file name %00.php
For lower versions Nginx You can add... After any file name %00.php Conduct parsing attacks .(Nginx edition <=0.8.37 Empty Byte Code Execution Vulnerability )
IIS 6.0 Parsing vulnerabilities
1. Directory resolution :
form :www.xxx.com/xx.asp/xx.jpg
principle : The server defaults to .asp The files in the directory are parsed into asp file .
https://www.cnblogs.com/milantgh/p/4347520.html
2. File parsing
form : www.xxx.com/xx.asp;.jpg
principle : The server does not parse by default ; After the number , therefore xx.asp;.jpg It's interpreted as asp The file .
IIS6.0 The default executable is in addition to asp There are also three kinds of :
/test.asa
/test.cer
/test.cdxIIS 7.0/7.5 Parsing vulnerabilities
form : Any file name / Any file name .php
principle :IIS7.0/7.5 It's right php When parsing, there is a similar to Nginx The parsing vulnerability of , For any file name, just in URL Append the string after it / Any file name .php Will follow php The way to analyze
because php In profile , Open the cgi.fix_pathinfo , And this is not nginx perhaps iis7.5 Its own loopholes .
边栏推荐
- North tour project notes
- [BJDCTF2020]Cookie is so stable
- Network security emergency response - basic skills
- Tree structure tool -treeutil use
- Oracle learning
- Notes on network communication security -- OSPF theory and experiment
- Mysql 主从服务器配置实验 centos7
- 基础设施 NFTScan 正式发布 Solana 网络 NFT 浏览器
- 网络安全应急响应-常用工具
- 2. Memory leak and memory overflow
猜你喜欢

Network security emergency response malicious code analysis technology
![[an Xun cup 2019]easy_ web](/img/9d/f2c6fda2a96f4ac649dd553c9c2c55.png)
[an Xun cup 2019]easy_ web
![[prettier] the code automatically formatted by prettier does not take effect](/img/5a/c56f4d2d4c7a9bdef0bda5a90ec190.png)
[prettier] the code automatically formatted by prettier does not take effect

如何解决数据流转「不可能三角」难题?

Notes on network communication security -- static routing and experiment

SNMP started

Notes on network communication security -- OSPF theory and experiment

Some small problems encountered in using Baidu lightweight server LS

Intranet penetration notes - Sticky Keys and system command information collection

暑期沉淀web学习——php基础
随机推荐
使用百度轻量服务器LS遇到的一些小问题
Collect form data
38.js-- prototype exercise cases (face-to-face examination questions for proofreading)
El button display and disable
Test MySQL master-slave synchronization under win10
[安洵杯 2019]easy_web
Analysis, capture and simulation attack of Sniffer Pro on ARP Protocol
基础设施 NFTScan 正式发布 Solana 网络 NFT 浏览器
Find a value of tree data
40.js -- the same name identifier promotion problem
Network security emergency response - electronic data forensics technology
[Anshi Cup 2019] Easy Web
网络通信安全部分笔记——OSPF理论及实验
ES6 -- object
C3&H5&ES6
ramda. JS API quick check
PHP+JMeter模拟测试高并发场景。附代码。
Idea send email
unity实验-重力撞墙
BUUCTF 来首歌吧