Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

File download vulnerability

2025-03-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

1 cause of loophole

The reason for downloading arbitrary vulnerabilities is that general websites provide the function of downloading files, but there is no filtering when obtaining files to download files, which leads to vulnerabilities.

The site download address is similar to the https://www.test.com/upload/xiazai.php?file=/wenjian/123.doc format site may exist, because the file name is passed in as a parameter. If the download address is in http://www.test.com/upload/wenjian/123.doc format and the file name is passed in without parameters, there is no file download vulnerability.

2 vulnerability exploitation

You can't know what level of directory it is during the download process, so you can try it one by one with. /.. /. Download vulnerabilities to download some website source files for analysis, layer by layer analysis, and finally find relevant sensitive files through vulnerabilities to download, such as database connection files, phpinfo files, database files, server accounts and password files and so on.

3 vulnerability repair methods

1. Filter the parameters downloaded by the incoming file name. You can use whitelist or blacklist

2. Will. Filter, so that you cannot use the function of returning to the parent directory.. /

3. Access permissions can be set in open_basedir

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 225

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report