当前位置:网站首页>File download vulnerability & file read vulnerability & file delete vulnerability
File download vulnerability & file read vulnerability & file delete vulnerability
2022-06-22 13:14:00 【Boring knowledge】
File download

File download vulnerability
What is file download vulnerability
First, the file download vulnerability , In fact, the website platform provides the function of downloading files , There is no restriction on the download of this website on the website platform , Then some indiscriminate molecules will take advantage of this shortcoming to download some sensitive files and some important files
There are two formats for file downloading
Direct download 【 There is no loophole 】
www.baidu.com/1.zip
Analytic Download 【 There may be loopholes 】
www.baidu.com?file=1.zip
explain
Direct download :
The connection is
1.zip-------------www.baidu.com/1.zip
The connection is
2.zip-------------www.baidu.com/2.zip
Download :
/1.zip
/
/
www.baidu.com?file= ——————2.zip
\
\
\3.zip
www.baidu.com?file= It's like a robot that gives you what you want
I want to 1.zip
www.baidu.com?file=1.zip
I want to 2.zip
www.baidu.com?file=2.zip
I want to 3.zip
www.baidu.com?file=3.zip
He will help you find whatever you ask him for , That's what it means
If he didn't 1.zip Then he'll return it to you
Causes of loopholes :
There are functions to read files
The path to read the file is controllable by the user and is not verified or the verification is not strict
Output file content
Loophole damage :
Download any file from the server , Such as script code 、 Service and system configuration files, etc , Further use the obtained information for greater harm .
Further code auditing can be done with the available code , Get more exploitable
Case study
http://67.202.70.133/files/readfile.php?file=…/configurtion.php
http://67.202.70.133/
File read vulnerability
File read function
- fopen
- file_get_contents
- fread
- fgets
- fgetss
- file
- fpassthru
- parse_ini_file
- readfile
<?php
$filename = $_GET['file'];
if(isset($filename)) {
readfile($filename);
}
File deletion vulnerability
<?php
header("Content-Type:text/html;charset=utf-8");
$filename = $_GET['file'];
if(file_exists($filename)){
unlink($filename);
echo "<script>alert(' Delete successful ')</script>";
}else{
echo "<script>alert(' Delete failed ')</script>";
}
边栏推荐
- Parallels Desktop 17.1.4pd虚拟机
- 助力金融信息化创新,巨杉数据库近期持续中标50余家金融客户
- Application of motion capture system in positioning and mapping of mobile robot in underground tunnel
- 769. Max Chunks To Make Sorted
- Tis tutorial 04 client
- think php环境搭建笔记
- SAP development keys application SSCR keys application
- 257. Binary Tree Paths
- Jushan database won two honors of China's information innovation industry in 2022 by AI media consulting
- 476. Number Complement
猜你喜欢
随机推荐
leetcode 968.监控二叉树
Help financial informatization innovation, Jushan database has won more than 50 financial customers recently
Sap-abap- how to transfer material master data, supplier master data, work orders, purchase orders and other information to external systems in real time - implicit enhancement.
Fluentd is easy to get started. Combined with the rainbow plug-in market, log collection is faster
Sequoiadb distributed database may 2022 issue
257. Binary Tree Paths
How to improve customer conversion rate on the official website
windows系统安装多个mysql版本(不用卸载原版本),新旧版本兼容。
MySQL_数据处理之查询
In C # development, the third-party components lambdaparser, dynamicexpresso and z.expressions are used to dynamically parse / evaluate string expressions
MySQL_ Addition, deletion and modification of data processing
关于 GIN 的路由树
leetcode 第 297 場周賽
假如,程序员面试的时候说真话
6月《中国数据库行业分析报告》发布!智能风起,列存更生
Redis
leetcode 85. 最大矩形
Universaldependencies dependency label interpretation
Under Xinchuang: when the domestic database stars shine
重磅直播|BizDevOps:数字化转型浪潮下的技术破局之路








