当前位置:网站首页>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>";
}
边栏推荐
猜你喜欢

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.

关于 GIN 的路由树

CVPR 2022 | 针对场景文本检测的视觉语言模型预训练

Jushan database was invited to attend Kunpeng developers' annual event 2022 to jointly build a domestic digital base

Universaldependencies dependency label interpretation

leetcode 第 297 场周赛

The Chinese display of SAP client is garbled

Hurun Research Institute launched the list of potential enterprises of China's meta universe, and Jushan database was selected as the future star enterprise

Sap-mm-migo 311 intra factory transfer inventory

Windows system installs multiple MySQL versions (without uninstalling the original version), and the old and new versions are compatible.
随机推荐
基于can总线的A2L文件解析(1)
SICF批量激活服务节点
SiCf batch activation service node
剑指 Offer II 114. 外星文字典
310. Minimum Height Trees
46. Permutations
Parallels Desktop 17.1.4pd虚拟机
Redis
leetcode 1579. 保证图可完全遍历
Tips of setup in robotframework
2017年度总结
Go language notes
Tis tutorial 01- installation
think php环境搭建笔记
Fluentd is easy to get started. Combined with the rainbow plug-in market, log collection is faster
Recommend a virtual machine software for fast cluster building of M1 chip computers
redis修改密码,及启动、查看等操作
Is the dynamic table of Flink created in this way? I use the flick CDC to read MySQL data, write the flick dynamic table, and send
在C#开发中使用第三方组件LambdaParser、DynamicExpresso、Z.Expressions,实现动态解析/求值字符串表达式
SAP 开发Keys 申请SSCR Keys申请