diff options
| author | Ben Fuhrmannek | 2020-06-15 11:51:16 +0200 |
|---|---|---|
| committer | Ben Fuhrmannek | 2020-06-15 11:51:16 +0200 |
| commit | 7ac1e3866ef4f146c6c93a5ca13b9aebb14e936a (patch) | |
| tree | ce57745314d905ff06119788acb56c11dcb3aede /doc/source | |
| parent | f742d9f88bf788e38bbe832f1b75e39784f024bc (diff) | |
| parent | 7f9602ebc23582195d63eb35f1de1961297f2e00 (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'doc/source')
| -rw-r--r-- | doc/source/config.rst | 39 | ||||
| -rw-r--r-- | doc/source/debug.rst | 4 | ||||
| -rw-r--r-- | doc/source/download.rst | 8 | ||||
| -rw-r--r-- | doc/source/faq.rst | 112 | ||||
| -rw-r--r-- | doc/source/features.rst | 4 | ||||
| -rw-r--r-- | doc/source/installation.rst | 4 | ||||
| -rw-r--r-- | doc/source/papers.rst | 69 |
7 files changed, 158 insertions, 82 deletions
diff --git a/doc/source/config.rst b/doc/source/config.rst index 89e063f..91e085c 100644 --- a/doc/source/config.rst +++ b/doc/source/config.rst | |||
| @@ -81,6 +81,24 @@ This configuration variable contains parameters that are used by multiple featur | |||
| 81 | - ``cookie_env_var``: A environment variable used as part of cookies encryption. | 81 | - ``cookie_env_var``: A environment variable used as part of cookies encryption. |
| 82 | See the :ref:`relevant documentation <config_cookie-encryption>` | 82 | See the :ref:`relevant documentation <config_cookie-encryption>` |
| 83 | 83 | ||
| 84 | log_media | ||
| 85 | ^^^^^^^^^ | ||
| 86 | |||
| 87 | This configuration variable allows to specify how logs should be written, | ||
| 88 | either via ``php`` or ``syslog``. | ||
| 89 | |||
| 90 | :: | ||
| 91 | |||
| 92 | sp.log_media("php"); | ||
| 93 | sp.log_media("syslog"); | ||
| 94 | |||
| 95 | The default value for ``sp.log_media`` is ``php``, to respect the `principle of | ||
| 96 | least astonishment | ||
| 97 | <https://en.wikipedia.org/wiki/Principle_of_least_astonishment>`__. But since | ||
| 98 | it's `possible to modify php's logging system via php | ||
| 99 | <https://www.php.net/manual/en/errorfunc.configuration.php>`__, it's | ||
| 100 | heavily recommended to use the ``syslog`` option instead. | ||
| 101 | |||
| 84 | 102 | ||
| 85 | Bugclass-killer features | 103 | Bugclass-killer features |
| 86 | ------------------------ | 104 | ------------------------ |
| @@ -181,8 +199,8 @@ argument and various information about it in the environment: | |||
| 181 | 199 | ||
| 182 | This feature can be used, for example, to check if an uploaded file contains php | 200 | This feature can be used, for example, to check if an uploaded file contains php |
| 183 | code, using `vld <https://derickrethans.nl/projects.html#vld>`_, | 201 | code, using `vld <https://derickrethans.nl/projects.html#vld>`_, |
| 184 | via `a python script <https://github.com/nbs-system/snuffleupagus/tree/master/scripts/upload_validation.py>`__, | 202 | via `a python script <https://github.com/jvoisin/snuffleupagus/tree/master/scripts/upload_validation.py>`__, |
| 185 | or `a php one <https://github.com/nbs-system/snuffleupagus/tree/master/scripts/upload_validation.php>`__. | 203 | or `a php one <https://github.com/jvoisin/snuffleupagus/tree/master/scripts/upload_validation.php>`__. |
| 186 | 204 | ||
| 187 | The upload will be **allowed** if the script returns the value ``0``. Every other | 205 | The upload will be **allowed** if the script returns the value ``0``. Every other |
| 188 | value will prevent the file from being uploaded. | 206 | value will prevent the file from being uploaded. |
| @@ -236,8 +254,11 @@ blacklisted, it'll be allowed. | |||
| 236 | Virtual-patching | 254 | Virtual-patching |
| 237 | ---------------- | 255 | ---------------- |
| 238 | 256 | ||
| 239 | Snuffleupagus provides virtual-patching via the ``disable_function`` directive, allowing you to stop or control dangerous behaviours. | 257 | Snuffleupagus provides virtual-patching via the ``disable_function`` directive, |
| 240 | In the situation where you have a call to ``system()`` that lacks proper user-input validation, this could cause issues as it would lead to an **RCE**. The virtual-patching would allow this to be prevented. | 258 | allowing you to stop or control dangerous behaviours. In the situation where |
| 259 | you have a call to ``system()`` that lacks proper user-input validation, this | ||
| 260 | could cause issues as it would lead to an **RCE**. The virtual-patching would | ||
| 261 | allow this to be prevented. | ||
| 241 | 262 | ||
| 242 | :: | 263 | :: |
| 243 | 264 | ||
| @@ -287,8 +308,14 @@ The ``type`` must be one of the following values: | |||
| 287 | Actions | 308 | Actions |
| 288 | ^^^^^^^ | 309 | ^^^^^^^ |
| 289 | 310 | ||
| 311 | Every rule *must* have one action. | ||
| 312 | |||
| 290 | - ``allow()``: **allow** the request if the rule matches | 313 | - ``allow()``: **allow** the request if the rule matches |
| 291 | - ``drop()``: **drop** the request if the rule matches | 314 | - ``drop()``: **drop** the request if the rule matches |
| 315 | |||
| 316 | Modifications | ||
| 317 | ^^^^^^^^^^^^^ | ||
| 318 | |||
| 292 | - ``dump(directory)``: dump the request in the ``directory`` if it matches the rule | 319 | - ``dump(directory)``: dump the request in the ``directory`` if it matches the rule |
| 293 | - ``simulation()``: enabled the simulation mode | 320 | - ``simulation()``: enabled the simulation mode |
| 294 | 321 | ||
| @@ -324,7 +351,7 @@ For clarity, the presence of the ``allow`` or ``drop`` action is **mandatory**. | |||
| 324 | because it'll match the deny first. | 351 | because it'll match the deny first. |
| 325 | 352 | ||
| 326 | If you're paranoid, we're providing a `php script | 353 | If you're paranoid, we're providing a `php script |
| 327 | <https://github.com/nbs-system/snuffleupagus/blob/master/scripts/generate_rules.php>`__ | 354 | <https://github.com/jvoisin/snuffleupagus/blob/master/scripts/generate_rules.php>`__ |
| 328 | to automatically generate hash of files containing dangerous functions, and | 355 | to automatically generate hash of files containing dangerous functions, and |
| 329 | blacklisting them everywhere else. | 356 | blacklisting them everywhere else. |
| 330 | 357 | ||
| @@ -340,7 +367,7 @@ It's currently not possible to: | |||
| 340 | things like this, odds are that you're doing something wrong anyway. | 367 | things like this, odds are that you're doing something wrong anyway. |
| 341 | - Hooks on ``echo`` and on ``print`` are equivalent: there is no way to hook one | 368 | - Hooks on ``echo`` and on ``print`` are equivalent: there is no way to hook one |
| 342 | without hooking the other, at least | 369 | without hooking the other, at least |
| 343 | `for now <https://github.com/nbs-system/snuffleupagus/issues/190>`__). | 370 | `for now <https://github.com/jvoisin/snuffleupagus/issues/190>`__). |
| 344 | This is why hooked ``print`` will be displayed as ``echo`` in the logs. | 371 | This is why hooked ``print`` will be displayed as ``echo`` in the logs. |
| 345 | - Hook `strlen`, since in latest PHP versions, this function is usually | 372 | - Hook `strlen`, since in latest PHP versions, this function is usually |
| 346 | optimized away by the compiled. | 373 | optimized away by the compiled. |
diff --git a/doc/source/debug.rst b/doc/source/debug.rst index b339366..b2a1f28 100644 --- a/doc/source/debug.rst +++ b/doc/source/debug.rst | |||
| @@ -18,7 +18,7 @@ We're using `php qa <https://qa.php.net/>`__ tests format for our testsuite, | |||
| 18 | it is automatically run when you're building snuffleupagus. | 18 | it is automatically run when you're building snuffleupagus. |
| 19 | 19 | ||
| 20 | If it happens to have unexpected failures (Since we're using `TDD <https://en.wikipedia.org/wiki/Test-driven_development>`__ as much | 20 | If it happens to have unexpected failures (Since we're using `TDD <https://en.wikipedia.org/wiki/Test-driven_development>`__ as much |
| 21 | as we can, we do have some expected failures), please do `open an issue <https://github.com/nbs-system/snuffleupagus/issues/new>`__ | 21 | as we can, we do have some expected failures), please do `open an issue <https://github.com/jvoisin/snuffleupagus/issues/new>`__ |
| 22 | on our bugtracker, and attach the generated ``.diff`` and ``.out`` files to it, | 22 | on our bugtracker, and attach the generated ``.diff`` and ``.out`` files to it, |
| 23 | so we can see what's happening. | 23 | so we can see what's happening. |
| 24 | 24 | ||
| @@ -27,7 +27,7 @@ Snuffleupagus is crashing | |||
| 27 | 27 | ||
| 28 | While we do our very best to make snuffleupagus solid as possible, we're humans, | 28 | While we do our very best to make snuffleupagus solid as possible, we're humans, |
| 29 | and computers are hard, so crashes can happen. If you're encountering one in production, | 29 | and computers are hard, so crashes can happen. If you're encountering one in production, |
| 30 | please try to launch the `testsuite <https://github.com/nbs-system/snuffleupagus/blob/master/CONTRIBUTING.md#3-get-the-test-suite-running>`__ | 30 | please try to launch the `testsuite <https://github.com/jvoisin/snuffleupagus/blob/master/CONTRIBUTING.md#3-get-the-test-suite-running>`__ |
| 31 | to see if it's failing. If it does, please :ref:`tell us <testsuite_fail>`. | 31 | to see if it's failing. If it does, please :ref:`tell us <testsuite_fail>`. |
| 32 | 32 | ||
| 33 | If the testsuite is passing, odds are that you're encountering an issue tied to your php code, | 33 | If the testsuite is passing, odds are that you're encountering an issue tied to your php code, |
diff --git a/doc/source/download.rst b/doc/source/download.rst index dfe4768..fd61099 100644 --- a/doc/source/download.rst +++ b/doc/source/download.rst | |||
| @@ -4,20 +4,20 @@ Download | |||
| 4 | Arch Linux | 4 | Arch Linux |
| 5 | ---------- | 5 | ---------- |
| 6 | 6 | ||
| 7 | We're providing a `PKGBUILD <https://github.com/nbs-system/snuffleupagus/blob/master/PKGBUILD>`__, | 7 | We're providing a `PKGBUILD <https://github.com/jvoisin/snuffleupagus/blob/master/PKGBUILD>`__, |
| 8 | so you can build a package yourself. | 8 | so you can build a package yourself. |
| 9 | 9 | ||
| 10 | Alpine Linux | 10 | Alpine Linux |
| 11 | ------------ | 11 | ------------ |
| 12 | 12 | ||
| 13 | We're providing a `APKBUILD <https://github.com/nbs-system/snuffleupagus/blob/master/APKBUILD>`__, | 13 | We're providing a `APKBUILD <https://github.com/jvoisin/snuffleupagus/blob/master/APKBUILD>`__, |
| 14 | so you can build a package yourself. | 14 | so you can build a package yourself. |
| 15 | 15 | ||
| 16 | Debian and Ubuntu | 16 | Debian and Ubuntu |
| 17 | ----------------- | 17 | ----------------- |
| 18 | 18 | ||
| 19 | We're currently not providing a Debian/Ubuntu repository, | 19 | We're currently not providing a Debian/Ubuntu repository, |
| 20 | but you can grab the latest release on `github <https://github.com/nbs-system/snuffleupagus/releases>`__, | 20 | but you can grab the latest release on `github <https://github.com/jvoisin/snuffleupagus/releases>`__, |
| 21 | or build your own package by cloning the source code and typing ``make debian``. | 21 | or build your own package by cloning the source code and typing ``make debian``. |
| 22 | 22 | ||
| 23 | Fedora | 23 | Fedora |
| @@ -39,4 +39,4 @@ We're currently using *github* as public code repository. | |||
| 39 | 39 | ||
| 40 | :: | 40 | :: |
| 41 | 41 | ||
| 42 | git clone https://github.com/nbs-system/snuffleupagus | 42 | git clone https://github.com/jvoisin/snuffleupagus |
diff --git a/doc/source/faq.rst b/doc/source/faq.rst index d8ca973..3c09409 100644 --- a/doc/source/faq.rst +++ b/doc/source/faq.rst | |||
| @@ -41,20 +41,20 @@ Who are you and why did you write Snuffleupagus? | |||
| 41 | 41 | ||
| 42 | We're working for `NBS System <https://nbs-system.com/en/>`__, | 42 | We're working for `NBS System <https://nbs-system.com/en/>`__, |
| 43 | a web hosting company (meaning that we're dealing with PHP code all day long), | 43 | a web hosting company (meaning that we're dealing with PHP code all day long), |
| 44 | with a strong focus on security. We do have hardening | 44 | with a strong focus on security. We do have several layers of hardening |
| 45 | (`kernel <https://grsecurity.net/>`_, `WAF <https://naxsi.org>`_, | 45 | (`kernel <https://grsecurity.net/>`_, `WAF <https://naxsi.org>`_, |
| 46 | `IDS <https://en.wikipedia.org/wiki/Intrusion_detection_system>`_, etc) | 46 | `IDS <https://en.wikipedia.org/wiki/Intrusion_detection_system>`_, etc), |
| 47 | below the web stack, but most of the time, when a website is compromised, | 47 | but we had nothing for PHP7. |
| 48 | it can be to send ads, spam, deface it, steal data etc. | 48 | |
| 49 | This is why we need to harden the website itself too, but we can't touch its | 49 | Nowadays, Snuffleupagus is maintained by Julien (jvoisin) Voisin. |
| 50 | source code. | 50 | |
| 51 | 51 | ||
| 52 | Why not Suhosin? | 52 | Why not Suhosin? |
| 53 | """""""""""""""" | 53 | """""""""""""""" |
| 54 | 54 | ||
| 55 | We're huge fans of `Suhosin <https://suhosin.org>`_, unfortunately: | 55 | We're huge fans of `Suhosin <https://suhosin.org>`_, unfortunately: |
| 56 | 56 | ||
| 57 | - it doesn't work very well on PHP 7 | 57 | - it doesn't work very well on PHP7 |
| 58 | - it has some oudated features and misses new ones | 58 | - it has some oudated features and misses new ones |
| 59 | - it doesn't cope very well with our various industrialization needs | 59 | - it doesn't cope very well with our various industrialization needs |
| 60 | - it has some shortcomings by design | 60 | - it has some shortcomings by design |
| @@ -65,18 +65,32 @@ the `system <https://secure.php.net/manual/en/function.system.php#refsect1-funct | |||
| 65 | function to perform various mandatory maintenance tasks). | 65 | function to perform various mandatory maintenance tasks). |
| 66 | 66 | ||
| 67 | This is why we decided to write our own hardening module, in the spirit of Suhosin, | 67 | This is why we decided to write our own hardening module, in the spirit of Suhosin, |
| 68 | via virtual-patching support, and other cool new features. | 68 | with virtual-patching support, as well as other cool new features. |
| 69 | 69 | ||
| 70 | What license is Snuffleupagus under and why? | 70 | |
| 71 | """""""""""""""""""""""""""""""""""""""""""" | 71 | What license is Snuffleupagus released under and why? |
| 72 | """"""""""""""""""""""""""""""""""""""""""""""""""""" | ||
| 72 | 73 | ||
| 73 | Snuffleupagus is licensed under the `LGPL <https://www.gnu.org/copyleft/lesser.html>`_ | 74 | Snuffleupagus is licensed under the `LGPL <https://www.gnu.org/copyleft/lesser.html>`_ |
| 74 | and is developed by the fine people from `NBS System <https://nbs-system.com/>`__. | 75 | was developed by the fine people from `NBS System <https://nbs-system.com/>`__, |
| 76 | and is maintained by Julien (jvoisin) Voisin. | ||
| 75 | 77 | ||
| 76 | We chose the LGPL because we don't care that much how you're using Snuffleupagus, | 78 | We chose the LGPL because we don't care that much how you're using Snuffleupagus, |
| 77 | but we'd like to force people to make their improvements/contributions | 79 | but we'd like to force people to make their improvements/contributions |
| 78 | available to everyone. | 80 | available to everyone. |
| 79 | 81 | ||
| 82 | |||
| 83 | What is the different between SNuffleupaugs and a (WAF) like ModSecurity? | ||
| 84 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | ||
| 85 | |||
| 86 | `ModSecurity <https://modsecurity.org/>`__ and the other `Web Application | ||
| 87 | Firewall (WAF) <https://en.wikipedia.org/wiki/Web_application_firewall>`__ are | ||
| 88 | working by inspecting the http traffic. Snuffleupagus being a PHP module, is | ||
| 89 | operating directly inside your website's code, with a lesser overhead, as well | ||
| 90 | as a better understanding of what is currently happening inside your | ||
| 91 | application. | ||
| 92 | |||
| 93 | |||
| 80 | Should I use Snuffleupagus? | 94 | Should I use Snuffleupagus? |
| 81 | """"""""""""""""""""""""""" | 95 | """"""""""""""""""""""""""" |
| 82 | 96 | ||
| @@ -113,6 +127,18 @@ is still a security issue, and should be treated as such. | |||
| 113 | We don't have the pretension to state that Snuffleupagus will magically solve | 127 | We don't have the pretension to state that Snuffleupagus will magically solve |
| 114 | all your security issues, but we believe that it might definitely help. | 128 | all your security issues, but we believe that it might definitely help. |
| 115 | 129 | ||
| 130 | |||
| 131 | Sounds great, but is it working? | ||
| 132 | """""""""""""""""""""""""""""""" | ||
| 133 | |||
| 134 | We've been using it in production since a couple of years, and it thwarted | ||
| 135 | numerous known and unknown attacks. If you want some evidences, one of the | ||
| 136 | developer published in June 2019 a `blogpost | ||
| 137 | <https://dustri.org/b/snuffleupagus-versus-recent-high-profile-vulnerabilities.html>`__ | ||
| 138 | showcasing how efficient Snuffleupagus was versus *major* web | ||
| 139 | vulnerabilities from 2018/2019. | ||
| 140 | |||
| 141 | |||
| 116 | Why should I send you bugs, security issues and patches? | 142 | Why should I send you bugs, security issues and patches? |
| 117 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""" | 143 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""" |
| 118 | Snuffleupagus is an open-source security software, by reporting (or fixing) | 144 | Snuffleupagus is an open-source security software, by reporting (or fixing) |
| @@ -148,7 +174,7 @@ By checking the logs; Snuffleupagus systematically prefix them with ``[snuffleup | |||
| 148 | 174 | ||
| 149 | Does Snuffleupagus run on Windows? | 175 | Does Snuffleupagus run on Windows? |
| 150 | """""""""""""""""""""""""""""""""" | 176 | """""""""""""""""""""""""""""""""" |
| 151 | No idea, feel free to `try <https://github.com/nbs-system/snuffleupagus/issues/2>`_. | 177 | No idea, feel free to `try <https://github.com/jvoisin/snuffleupagus/issues/2>`_. |
| 152 | 178 | ||
| 153 | 179 | ||
| 154 | Does Snuggleupagus run on `HHVM <http://hhvm.com/>`_? | 180 | Does Snuggleupagus run on `HHVM <http://hhvm.com/>`_? |
| @@ -181,46 +207,13 @@ discuss potential impact of the vulnerability, | |||
| 181 | reference applicable patches or workarounds, | 207 | reference applicable patches or workarounds, |
| 182 | and credit the discoverer. | 208 | and credit the discoverer. |
| 183 | 209 | ||
| 184 | Please send it us a mail to the ``security`` user, | 210 | Please do send a mail to [Julien (jvoisin) Voisin](https://dustri.org) should |
| 185 | on ``nbs-system.com``, using the gpg key | 211 | you find a security issue. |
| 186 | ``498C46FF087EDC36E7EAF9D445414A82A9B22D78``: | ||
| 187 | |||
| 188 | :: | ||
| 189 | |||
| 190 | -----BEGIN PGP PUBLIC KEY BLOCK----- | ||
| 191 | 212 | ||
| 192 | mQENBFnKHhoBCADaOa0MKEqRy0h2ohIzczblzkMQCbU9oD1HwJ1VkYnn7TGW2iKi | ||
| 193 | NISxisExIXpy2Bn/pA27GiV0V/Do3NL6D9r0oOCrGR27muGM0N/dk9UMv7MWw8zv | ||
| 194 | K8cO+Sa28s0cAv7r2ogUJj5YOo8D4wHEpE8424TE89V9+Qg/SaFCxKoELFP0c7wu | ||
| 195 | mtsm0PnL65piZ1EB7lQo2gxg+8AV45MD1Y2rREMKUoZE23X+nXKsmEh9BFEPaU5M | ||
| 196 | 7WQp0NasqeMNoGhwfw9ttVAeLhkEkaTjW1PkNRIb7vrtV9KVb5uKucflfbOnDlzu | ||
| 197 | tQ9U3tYto0mcSCRchAClfEmoSi/0mKyb5N6ZABEBAAG0NVNlY3VyaXR5IHRlYW0g | ||
| 198 | b2YgTkJTIFN5c3RlbSA8c2VjdXJpdHlAbmJzLXN5c3RlbS5jb20+iQE3BBMBCAAh | ||
| 199 | BQJZyh4aAhsDBQsJCAcCBhUICQoLAgQWAgMBAh4BAheAAAoJEEVBSoKpsi14jy0H | ||
| 200 | /1/XB9THhvmG0ow81sld2Zx8qhnNed8VvYDS6mEjpDWNVPxENwDbnakEjisq1Hrb | ||
| 201 | 2UQPYCyQ5dekPNFVwQHIGXkX0eb1Ank+4esBJuEpQ2985tgNhJy5ZX+Imb5C8nZC | ||
| 202 | 90uYSN1UUg559nUsFeElOXSEH6tIXK/TvjsvMYoi2Ukl6lb7PbIU2fjLY9Iqv3QY | ||
| 203 | 32p8/Bl1fVKWbXOk0HDgJ6zA3Kr56QhZOLBkxjOa2XAnnIE76jZxUJ9qPCwWd1vW | ||
| 204 | GFxtx1Y+eZriqHiC9CPe6aBWcIHaTXSu1WBbXrFu8/eCWw243Rxm8l9wgA/a7VWq | ||
| 205 | WBfO45IhJUwh95naRpw8/4a5AQ0EWcoeGgEIAJtzSyyzfn2RX+BsyoRFANUpIgrV | ||
| 206 | /9eohYQVNqK3AFthmq7Kjmt4+hszF5+0wCFmWwYqGnqk1/dsWmqpkXsJldEn6oPJ | ||
| 207 | Bng+Dc67Yki2dR3TroAf95UmI08fhyM7TMXp8m46BPRRMzPNwalEeEm49Oclmfxb | ||
| 208 | JsWWCChWVLWGz2xgPEAv3fPHqus7Rwz/WIl53l/qy1Wf0ewmjRpVEfnEMKBExtBK | ||
| 209 | 4kRxQ40LzUZ1SfpyGc3nMbswhevT7/klqrdJdCnlu67Y/IfRGxGZuNj1n1Dib3Hx | ||
| 210 | zTBHo3Y2R3BB93Ix8dkbLaxLqFbOYVdijCgJklqUWhx7btpQ2xnZyzyCMuUAEQEA | ||
| 211 | AYkBHwQYAQgACQUCWcoeGgIbDAAKCRBFQUqCqbIteFRvB/9u3Mae8n8ELrJKOn+P | ||
| 212 | PEbWjutObIuTplvY4QcbnNb9dsgsKryamp4CFJsA5XuitPpC31GDMXBZO5/LLOuH | ||
| 213 | HoMaXFJdic0NToL/3REhu+aZkNIU6S/iaPRNVhkSV4lwQsvncz+nBaiDUJjyfJm2 | ||
| 214 | kEjVcRTM8yqzcNo/9Gn0ts+XCUqRj7+S1M4Bj3NySoO/w2n+7OLbIAj+wQZcj3Gf | ||
| 215 | 5QhBYaY4YaFxrJE0IZxyXGHw8xhKR6AN+u4TO7LRCW+cWV/sHWir1MXieJoEG8+R | ||
| 216 | W/BhrB0Rz5uxOXMoGCCD2TUiHq7zpuHGnYFVmAnHQZaaQxXve4VrcmznxgpV8lpW | ||
| 217 | mZug | ||
| 218 | =+eIv | ||
| 219 | -----END PGP PUBLIC KEY BLOCK----- | ||
| 220 | 213 | ||
| 221 | I found a bug. How can I report it? | 214 | I found a bug. How can I report it? |
| 222 | """"""""""""""""""""""""""""""""""" | 215 | """"""""""""""""""""""""""""""""""" |
| 223 | We do have an issue tracker on `Github <https://github.com/nbs-system/snuffleupagus/issues>`_. | 216 | We do have an issue tracker on `Github <https://github.com/jvoisin/snuffleupagus/issues>`_. |
| 224 | Please make sure to include as much information as possible when reporting your issue, | 217 | Please make sure to include as much information as possible when reporting your issue, |
| 225 | such as your operating system, your version of PHP 7, your version of Snuffleupagus, | 218 | such as your operating system, your version of PHP 7, your version of Snuffleupagus, |
| 226 | your logs, the problematic php code, the request, a brief description, … long story short, | 219 | your logs, the problematic php code, the request, a brief description, … long story short, |
| @@ -232,12 +225,9 @@ it's not that hard. | |||
| 232 | Where can I find even more help? | 225 | Where can I find even more help? |
| 233 | """""""""""""""""""""""""""""""" | 226 | """""""""""""""""""""""""""""""" |
| 234 | The :doc:`configuration page <config>` might be what you're looking for. | 227 | The :doc:`configuration page <config>` might be what you're looking for. |
| 235 | If you're adventurous, you can also check the `issue tracker <https://github.com/nbs-system/snuffleupagus/issues/?q=is%3Aissue>`_ | 228 | If you're adventurous, you can also check the `issue tracker <https://github.com/jvoisin/snuffleupagus/issues/?q=is%3Aissue>`_ |
| 236 | (make sure to check the `closed issues <https://github.com/nbs-system/snuffleupagus/issues?q=is%3Aissue+is%3Aclosed>`_ too). | 229 | (make sure to check the `closed issues <https://github.com/jvoisin/snuffleupagus/issues?q=is%3Aissue+is%3Aclosed>`_ too). |
| 237 | 230 | ||
| 238 | I need professional support for my company. | ||
| 239 | """"""""""""""""""""""""""""""""""""""""""" | ||
| 240 | Contact `NBS System <https://nbs-system.com>`_. | ||
| 241 | 231 | ||
| 242 | Unimplemented mitigations and abandoned ideas | 232 | Unimplemented mitigations and abandoned ideas |
| 243 | --------------------------------------------- | 233 | --------------------------------------------- |
| @@ -255,3 +245,19 @@ if someone can manage to get better results than us. | |||
| 255 | The possibility of having this natively in PHP has | 245 | The possibility of having this natively in PHP has |
| 256 | `been discussed <https://marc.info/?l=php-internals&m=141692988212413&w=2>`_, | 246 | `been discussed <https://marc.info/?l=php-internals&m=141692988212413&w=2>`_, |
| 257 | but as 2017, nothing has been merged yet. | 247 | but as 2017, nothing has been merged yet. |
| 248 | |||
| 249 | Nop'ing function execution | ||
| 250 | """""""""""""""""""""""""" | ||
| 251 | |||
| 252 | Snuffleupagus can be configured to either *allow* or *drop* the execution of | ||
| 253 | particular functions and optionally *log* and *dump* them, but it doesn't | ||
| 254 | provide any mechanism to *nop* their execution. | ||
| 255 | |||
| 256 | We thought about adding this, but didn't for several reasons: | ||
| 257 | |||
| 258 | - What should the return value of a *nop'ed* function be? | ||
| 259 | - It would add confusion between ``drop``, ``nop`` and ``log``. | ||
| 260 | - Usually, when a specific function is called, either it's a dangerous one | ||
| 261 | and you want to stop the execution immediately, or you want to let it | ||
| 262 | continue and log it. There isn't really any middle-ground, or at least we | ||
| 263 | failed to find any. | ||
diff --git a/doc/source/features.rst b/doc/source/features.rst index 407b9c7..0c23dc1 100644 --- a/doc/source/features.rst +++ b/doc/source/features.rst | |||
| @@ -73,7 +73,7 @@ Like *Suhosin*, we are encrypting the cookies with a secret key, | |||
| 73 | an environment variable (usually the IP of the user) | 73 | an environment variable (usually the IP of the user) |
| 74 | and the user's user-agent. This means that an attacker with an XSS won't be able to use | 74 | and the user's user-agent. This means that an attacker with an XSS won't be able to use |
| 75 | the stolen cookie, since he can't spoof the content of the value of the environment | 75 | the stolen cookie, since he can't spoof the content of the value of the environment |
| 76 | variable for the user. Please do read the :ref:`documentation about this feature <config_cookie-encryption>` | 76 | variable for the user. Please do read the :ref:`documentation about this feature <cookie-encryption-page>` |
| 77 | if you're planning to use it. | 77 | if you're planning to use it. |
| 78 | 78 | ||
| 79 | This feature is roughly the same than the `Suhosin one <https://suhosin.org/stories/configuration.html#transparent-encryption-options>`_. | 79 | This feature is roughly the same than the `Suhosin one <https://suhosin.org/stories/configuration.html#transparent-encryption-options>`_. |
| @@ -444,7 +444,7 @@ or ``is_callable`` with *suspicious* parameters. | |||
| 444 | Some PHP applications are using broad rights when using the ``chmod`` function, | 444 | Some PHP applications are using broad rights when using the ``chmod`` function, |
| 445 | like the infamous ``chmod(777)`` command, effectively making the file writable by everyone. | 445 | like the infamous ``chmod(777)`` command, effectively making the file writable by everyone. |
| 446 | Snuffleupagus is preventing this kind of behaviour by restricting the parameters | 446 | Snuffleupagus is preventing this kind of behaviour by restricting the parameters |
| 447 | than can be passed to ``chmod``. | 447 | that can be passed to ``chmod``. |
| 448 | 448 | ||
| 449 | Arbitrary file inclusion hardening | 449 | Arbitrary file inclusion hardening |
| 450 | """""""""""""""""""""""""""""""""" | 450 | """""""""""""""""""""""""""""""""" |
diff --git a/doc/source/installation.rst b/doc/source/installation.rst index 74d5d4f..a6b0ff8 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | Installation | 1 | Installation |
| 2 | ============ | 2 | ============ |
| 3 | 3 | ||
| 4 | Snuffleupagus is tested against `various PHP 7+ versions <https://travis-ci.org/nbs-system/snuffleupagus/>`_. | 4 | Snuffleupagus is tested against `various PHP 7+ versions <https://travis-ci.org/jvoisin/snuffleupagus/>`_. |
| 5 | 5 | ||
| 6 | Manual installation | 6 | Manual installation |
| 7 | ------------------- | 7 | ------------------- |
| @@ -21,7 +21,7 @@ Quickstart | |||
| 21 | 21 | ||
| 22 | :: | 22 | :: |
| 23 | 23 | ||
| 24 | git clone https://github.com/nbs-system/snuffleupagus | 24 | git clone https://github.com/jvoisin/snuffleupagus |
| 25 | cd snuffleupagus/src | 25 | cd snuffleupagus/src |
| 26 | phpize | 26 | phpize |
| 27 | ./configure --enable-snuffleupagus | 27 | ./configure --enable-snuffleupagus |
diff --git a/doc/source/papers.rst b/doc/source/papers.rst index 5382012..3d5e42a 100644 --- a/doc/source/papers.rst +++ b/doc/source/papers.rst | |||
| @@ -6,30 +6,72 @@ This pages lists various mentions, articles, usages and presentations about Snuf | |||
| 6 | Talks | 6 | Talks |
| 7 | ----- | 7 | ----- |
| 8 | 8 | ||
| 9 | - `BerlinSide0x08 <https://berlinsides.org/?page_id=2168>`_ - `slides <https://github.com/nbs-system/snuffleupagus/blob/master/slides/berlinsides_2017.pdf>`__ - 2017-05-28 | 9 | 2017 |
| 10 | - `Hack.lu 2017 <https://2017.hack.lu/talks/>`_ - `slides <https://github.com/nbs-system/snuffleupagus/blob/master/slides/hacklu_2017.pdf>`__ - `video <https://www.youtube.com/watch?v=RzaRiuJ6MkI>`__ - 2017-10-18 | 10 | """" |
| 11 | - `BlackAlps <https://blackalps.ch/2017program.php>`_ - `slides <https://github.com/nbs-system/snuffleupagus/blob/master/slides/blackalps_2017.pdf>`__ - `video <https://www.youtube.com/watch?v=2GeUnOzDGxc>`__ - 2017-11-16 | ||
| 12 | - `Pass the Salt <https://2018.pass-the-salt.org/schedule/#snuffleupagus>`_ - `slides <https://github.com/nbs-system/snuffleupagus/blob/master/slides/passthesalt_2018.pdf>`__ - `video <https://passthesalt.ubicast.tv/videos/snuffleupagus-killing-bug-classes-and-virtual-patching-the-rest/>`__ - 2018-07-03 | ||
| 13 | - `44con <https://44con.com/44con/44con-2018/44con-2018-talks/>`__ - `slides <https://github.com/nbs-system/snuffleupagus/blob/master/slides/44con_2018.pdf>`__ - 2018-09-12 | ||
| 14 | 11 | ||
| 12 | - `BerlinSide0x08 <https://berlinsides.org/?page_id=2168>`_ - `slides <https://github.com/nbs-system/snuffleupagus/blob/master/slides/berlinsides_2017.pdf>`__ | ||
| 13 | - `Hack.lu 2017 <https://2017.hack.lu/talks/>`_ - `slides <https://github.com/nbs-system/snuffleupagus/blob/master/slides/hacklu_2017.pdf>`__ - `video <https://www.youtube.com/watch?v=RzaRiuJ6MkI>`__ | ||
| 14 | - `BlackAlps <https://blackalps.ch/2017program.php>`_ - `slides <https://github.com/nbs-system/snuffleupagus/blob/master/slides/blackalps_2017.pdf>`__ - `video <https://www.youtube.com/watch?v=2GeUnOzDGxc>`__ | ||
| 15 | |||
| 16 | 2018 | ||
| 17 | """" | ||
| 18 | |||
| 19 | - `Pass the Salt <https://2018.pass-the-salt.org/schedule/#snuffleupagus>`_ - `slides <https://github.com/nbs-system/snuffleupagus/blob/master/slides/passthesalt_2018.pdf>`__ - `video <https://passthesalt.ubicast.tv/videos/snuffleupagus-killing-bug-classes-and-virtual-patching-the-rest/>`__ | ||
| 20 | - `44con <https://44con.com/44con/44con-2018/44con-2018-talks/>`__ - `slides <https://github.com/nbs-system/snuffleupagus/blob/master/slides/44con_2018.pdf>`__ | ||
| 21 | |||
| 22 | 2020 | ||
| 23 | """" | ||
| 24 | - `Modern PHP security - sec4dev 2020, Vienna - Synacktiv <https://www.synacktiv.com/ressources/modern_php_security_sec4dev.pdf>`__ - `sec4dev 2020 <https://sec4dev.io/2020>`__ | ||
| 15 | 25 | ||
| 16 | Mentions | 26 | Mentions |
| 17 | -------- | 27 | -------- |
| 18 | 28 | ||
| 19 | - `Intrinsec's blog - Hack.lu 2017 <https://securite.intrinsec.com/2017/10/20/hack-lu-2017/>`__ (fr) - 2017-10-20 | 29 | 2017 |
| 30 | """" | ||
| 31 | |||
| 32 | - `Habr - PHP-Дайджест № 118 – свежие новости, материалы и инструменты <https://habr.com/en/company/zfort/blog/339630/>`__ (ru) - Habr | ||
| 33 | - `Intrinsec's blog - Hack.lu 2017 <https://securite.intrinsec.com/2017/10/20/hack-lu-2017/>`__ (fr) - Intrinsec's blog | ||
| 20 | - `Paragon Initiative Enterprises Blog - The 2018 Guide to Building Secure PHP Software <https://paragonie.com/blog/2017/12/2018-guide-building-secure-php-software>`__ - 2017-12-12 | 34 | - `Paragon Initiative Enterprises Blog - The 2018 Guide to Building Secure PHP Software <https://paragonie.com/blog/2017/12/2018-guide-building-secure-php-software>`__ - 2017-12-12 |
| 21 | - `PhpStorm's blog - PHP Annotated Monthly <https://blog.jetbrains.com/phpstorm/2018/08/php-annotated-monthly-august-2018/>`__ - 2018-08-31 | 35 | |
| 36 | 2018 | ||
| 37 | """" | ||
| 38 | |||
| 39 | - `Habr - PHP-Дайджест № 138 <https://habr.com/en/company/zfort/blog/422069/>`__ (ru) - Habr | ||
| 40 | - `PhpStorm's blog - PHP Annotated Monthly <https://blog.jetbrains.com/phpstorm/2018/08/php-annotated-monthly-august-2018/>`__ - PhpStorm's blog | ||
| 41 | |||
| 42 | 2019 | ||
| 43 | """" | ||
| 44 | |||
| 45 | - `PhpStorm's blog - PHP Annotated <https://blog.jetbrains.com/phpstorm/2019/07/php-annotated-july-2019/>`__ - PhpStorm's blog | ||
| 46 | - `Habr - PHP-Дайджест № 160 <https://habr.com/ru/post/460022/>`__ (ru) - Habr | ||
| 22 | 47 | ||
| 23 | 48 | ||
| 24 | Articles | 49 | Articles |
| 25 | -------- | 50 | -------- |
| 26 | 51 | ||
| 27 | - `Killing php bug classes at berlinsides <https://dustri.org/b/killing-php-bug-classes-at-berlinsides.html>`_ - 2017-06-05 | 52 | |
| 28 | - `Snuffleu…what? <https://fr33tux.org/post/snuffleupagus/>`_ - 2017-10-07 | 53 | 2017 |
| 29 | - `How to harden AdwCleaner’s web backend using PHP <https://blog.malwarebytes.com/security-world/technology/2017/12/harden-adwcleaner-php-web-backend/>`__ - 2017-12-06 | 54 | """" |
| 30 | - `First release of Snuffleupagus <https://dustri.org/b/first-release-of-snuffleupagus.html>`__ - 2017-12-21 | 55 | |
| 31 | - `Snuffleupagus 0.3.0 - Dentalium elephantinum <https://dustri.org/b/snuffleupagus-030-dentalium-elephantinum.html>`__ - 2018-07-18 | 56 | - `Killing php bug classes at berlinsides <https://dustri.org/b/killing-php-bug-classes-at-berlinsides.html>`__ - dustri.org |
| 32 | - `Snuffleupagus version 0.3.0 - Dentalium elephantinum <https://linuxfr.org/news/snuffleupagus-version-0-3-0-dentalium-elephantinum>`__ (fr) - 2018-07-18 | 57 | - `Snuffleu…what? <https://fr33tux.org/post/snuffleupagus/>`__ - fr33tux.org |
| 58 | - `Behold the Snuffleupagus <https://memze.ro/posts/behold-the-snuffleupagus/>`__ - memze.ro | ||
| 59 | - `How to harden AdwCleaner’s web backend using PHP <https://blog.malwarebytes.com/security-world/technology/2017/12/harden-adwcleaner-php-web-backend/>`__ - Malwarebyte's blog | ||
| 60 | - `First release of Snuffleupagus <https://dustri.org/b/first-release-of-snuffleupagus.html>`__ - dustri.org | ||
| 61 | - `PHP Magazine <http://phpmagazine.net/2017/11/snuffleupagus-experimental-security-module-for-php7.html>`__ - phpmagazine.net | ||
| 62 | |||
| 63 | 2018 | ||
| 64 | """" | ||
| 65 | |||
| 66 | - `Snuffleupagus 0.3.0 - Dentalium elephantinum <https://dustri.org/b/snuffleupagus-030-dentalium-elephantinum.html>`__ - dustri.org | ||
| 67 | - `Snuffleupagus version 0.3.0 - Dentalium elephantinum <https://linuxfr.org/news/snuffleupagus-version-0-3-0-dentalium-elephantinum>`__ (fr) - LinuxFr | ||
| 68 | |||
| 69 | 2019 | ||
| 70 | """" | ||
| 71 | |||
| 72 | - `Проект Snuffleupagus развивает PHP-модуль для блокирования уязвимостей <https://www.opennet.ru/opennews/art.shtml?num=51031>`__ (ru) - opennet.ru | ||
| 73 | - `What the f*ck is a Snuffleupagus? <https://medium.com/@live_the_dream/what-the-f-ck-is-a-snuffleupagus-f838fb64f857>`__ - Living The Dream | ||
| 74 | - `Snuffleupagus: Open source security tool hardens PHP sites against cyber-attacks <https://portswigger.net/daily-swig/snuffleupagus-open-source-security-tool-hardens-php-sites-against-cyber-attacks>`__ - The Daily Swig | ||
| 33 | 75 | ||
| 34 | 76 | ||
| 35 | Papers | 77 | Papers |
| @@ -47,3 +89,4 @@ Notable users | |||
| 47 | - `Oceanet Technology <https://www.oceanet-technology.com/>`__ - a French hosting company | 89 | - `Oceanet Technology <https://www.oceanet-technology.com/>`__ - a French hosting company |
| 48 | - `SwissCenter <https://swisscenter.com>`__ - a Swiss datacenter & web hosting company | 90 | - `SwissCenter <https://swisscenter.com>`__ - a Swiss datacenter & web hosting company |
| 49 | - `Toolslib <https://toolslib.net/>`__ - an `Alexa top 10k <https://www.alexa.com/siteinfo/toolslib.net>`__ website | 91 | - `Toolslib <https://toolslib.net/>`__ - an `Alexa top 10k <https://www.alexa.com/siteinfo/toolslib.net>`__ website |
| 92 | - `cPanel <https://cpanel.net/>`__ - one of the most popular web hosting control panel | ||
