summaryrefslogtreecommitdiff
path: root/doc/source/features.rst
diff options
context:
space:
mode:
authorxXx-caillou-xXx2018-08-27 13:56:44 +0200
committerjvoisin2018-08-27 11:56:44 +0000
commit096e7faa6a5e21e5416a7c8c484e27acd4636a66 (patch)
tree3dd11a05c4406280238459be917b8f47d22400f7 /doc/source/features.rst
parent6abdd9abca50c92390b94fbebb3e7065d5d532da (diff)
Add whitelist support for php's wrappers
Diffstat (limited to 'doc/source/features.rst')
-rw-r--r--doc/source/features.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/source/features.rst b/doc/source/features.rst
index 60366d4..540e982 100644
--- a/doc/source/features.rst
+++ b/doc/source/features.rst
@@ -344,6 +344,27 @@ Snuffleupagus can prevent the execution of this kind of file. A good practice
344would be to use a different user to run PHP than for administrating the website, 344would be to use a different user to run PHP than for administrating the website,
345and using this feature to lock this up. 345and using this feature to lock this up.
346 346
347.. _stream-wrapper-whitelist-feature:
348
349Whitelist of stream-wrappers
350^^^^^^^^^^^^^^^^^^^^^^^^^^^^
351
352Php comes with a `lot of different <https://secure.php.net/manual/en/wrappers.php>`__
353`stream wrapper <https://secure.php.net/manual/en/intro.stream.php>`__, and most of them
354are enabled by default.
355
356The only way to tighten a bit this exposition surface is to use the
357`allow_url_fopen/allow_url_include <https://secure.php.net/manual/en/features.remote-files.php>`__
358configuration options, but it's `not possible <https://bugs.php.net/bug.php?id=50715>`__
359to deactivate them on an individual basis.
360
361Examples of related vulnerabilities
362"""""""""""""""""""""""""""""""""""
363
364- `RCE via phar:// <https://github.com/orangetw/My-CTF-Web-Challenges#babyh-master-php-2017>`__
365- `Data exfiltration via stream wrapper <https://www.idontplaydarts.com/2011/02/using-php-filter-for-local-file-inclusion/>`__
366- `Inclusion via zip/phar <https://lightless.me/archives/include-file-from-zip-or-phar.html>`__
367
347.. _eval-feature: 368.. _eval-feature:
348 369
349White and blacklist in ``eval`` 370White and blacklist in ``eval``