summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBeF2022-01-11 18:45:33 +0100
committerGitHub2022-01-11 18:45:33 +0100
commit065a2f8a28df032a9bc2d16db1ce4d3d5700fc34 (patch)
treecd0b5716936ae46d4c33e16bbb98014af8071ccc /README.md
parent046e39bd4a41cc2c509d975dc6cbf9ca6e49dfbc (diff)
Update README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md125
1 files changed, 8 insertions, 117 deletions
diff --git a/README.md b/README.md
index 58f0940..1dffc37 100644
--- a/README.md
+++ b/README.md
@@ -1,125 +1,16 @@
1<h1 align="center">
2 <br>
3 <a href="https://snuffleupagus.readthedocs.io/">
4 <img src="https://github.com/jvoisin/snuffleupagus/raw/master/doc/source/_static/sp.png" alt="Snuffleupagus' logo" width="200"></a>
5 <br>
6 Snuffleupagus
7 <br>
8</h1>
9
10<h4 align="center">Security module for php7 and php8 - Killing bugclasses and virtual-patching the rest!</h4>
11
12<p align="center"> 1<p align="center">
13 <a href="https://github.com/jvoisin/snuffleupagus/actions?query=workflow%3A%22CI+for+linux+distributions%22"> 2 <img src="https://github.com/sektioneins/snuffleupagus/blob/master/doc/source/_static/sp.png" alt="Snuffleupagus logo" width="200">
14 <img src="https://github.com/jvoisin/snuffleupagus/workflows/CI%20for%20linux%20distributions/badge.svg"
15 alt="github actions testing _all_ distributions" />
16 </a>
17 <a href="https://github.com/jvoisin/snuffleupagus/actions?query=workflow%3A%22CI+for+php+versions%22">
18 <img src="https://github.com/jvoisin/snuffleupagus/workflows/CI%20for%20php%20versions/badge.svg"
19 alt="github actions testing _all_ php versions" />
20 </a>
21 <a href="https://scan.coverity.com/projects/jvoisin-snuffleupagus">
22 <img src="https://scan.coverity.com/projects/13821/badge.svg?flat=1"
23 alt="Coverity">
24 </a>
25 <a href="https://bestpractices.coreinfrastructure.org/projects/1267">
26 <img src="https://bestpractices.coreinfrastructure.org/projects/1267/badge"
27 alt="CII Best Practises">
28 </a>
29 <a href="http://snuffleupagus.readthedocs.io/?badge=latest">
30 <img src="https://readthedocs.org/projects/snuffleupagus/badge/?version=latest"
31 alt="readthedocs.org">
32 </a>
33 <a href="https://coveralls.io/github/jvoisin/snuffleupagus?branch=master">
34 <img src="https://coveralls.io/repos/github/jvoisin/snuffleupagus/badge.svg?branch=master"
35 alt="coveralls">
36 </a>
37 <a href="https://twitter.com/sp_php">
38 <img src="https://img.shields.io/badge/twitter-follow-blue.svg"
39 alt="twitter">
40 </a>
41 <a href="https://repology.org/project/php:snuffleupagus/versions">
42 <img src="https://repology.org/badge/tiny-repos/php:snuffleupagus.svg"
43 alt="Packaging status">
44 </a>
45</p>
46 3
47<p align="center"> 4 # Snuffleupagus fork with Suhosin-NG patches
48 <a href="#key-features">Key Features</a> • 5
49 <a href="#download">Download</a> •
50 <a href="#examples">Examples</a> •
51 <a href="https://snuffleupagus.readthedocs.io/">Documentation</a> •
52 <a href="https://github.com/jvoisin/snuffleupagus/blob/master/LICENSE">License</a> •
53 <a href="#thanks">Thanks</a>
54</p> 6</p>
55 7
56Snuffleupagus is a [PHP 7+ and 8+](https://secure.php.net/) module designed to 8## About Snuffleupagus
57drastically raise the cost of attacks against websites, by killing entire bug
58classes. It also provides a powerful virtual-patching system, allowing
59administrator to fix specific vulnerabilities and audit suspicious behaviours
60without having to touch the PHP code.
61
62## Key Features
63
64* No [noticeable performance impact](https://dustri.org/b/snuffleupagus-030-dentalium-elephantinum.html)
65* Powerful yet simple to write virtual-patching rules
66* Killing several classes of vulnerabilities
67 * [Unserialize-based](https://www.owasp.org/images/9/9e/Utilizing-Code-Reuse-Or-Return-Oriented-Programming-In-PHP-Application-Exploits.pdf) code execution
68 * [`mail`-based]( https://blog.ripstech.com/2016/roundcube-command-execution-via-email/ ) code execution
69 * Cookie-stealing [XSS]( https://en.wikipedia.org/wiki/Cross-site_scripting )
70 * File-upload based code execution
71 * Weak PRNG
72 * [XXE]( https://en.wikipedia.org/wiki/XML_external_entity_attack )
73* Several hardening features
74 * Automatic `secure` and `samesite` flag for cookies
75 * Bundled set of rules to detect post-compromissions behaviours
76 * Global [strict mode]( https://secure.php.net/manual/en/migration70.new-features.php#migration70.new-features.scalar-type-declarations) and type-juggling prevention
77 * Whitelisting of [stream wrappers](https://secure.php.net/manual/en/intro.stream.php)
78 * Preventing writeable files execution
79 * Whitelist/blacklist for `eval`
80 * Enforcing TLS certificate validation when using [curl](https://secure.php.net/manual/en/book.curl.php)
81 * Request dumping capability
82* A relatively sane code base:
83 * A [comprehensive](https://coveralls.io/github/jvoisin/snuffleupagus?branch=master) test suite close to 100% coverage
84 * Every commit is tested on [several distributions](https://gitlab.com/jvoisin/snuffleupagus/pipelines)
85 * An `clang-format`-enforced code style
86 * A [comprehensive documentation](https://snuffleupagus.rtfd.io)
87 * Usage of [coverity](https://scan.coverity.com/projects/jvoisin-snuffleupagus)
88
89## Download
90
91We've got a [download
92page](https://snuffleupagus.readthedocs.io/download.html), where you can find
93packages for your distribution, but you can of course just `git clone` this
94repo, or check the releases on [github](https://github.com/jvoisin/snuffleupagus/releases).
95
96## Examples
97
98We're providing [various example rules](https://github.com/jvoisin/snuffleupagus/tree/master/config),
99that are looking like this:
100
101```python
102# Harden the `chmod` function
103sp.disable_function.function("chmod").param("mode").value_r("^[0-9]{2}[67]$").drop();
104
105# Mitigate command injection in `system`
106sp.disable_function.function("system").param("command").value_r("[$|;&`\\n]").drop();
107```
108
109Upon violation of a rule, you should see lines like this in your logs:
110
111```python
112[snuffleupagus][0.0.0.0][disabled_function][drop] The execution has been aborted in /var/www/index.php:2, because the return value (0) of the function 'strpos' matched a rule.
113```
114 9
115## Documentation 10Snuffleupagus is a marvellous security module for PHP 7 and PHP 8. This repository is a fork of the [original Snuffleupagus repository](https://github.com/jvoisin/snuffleupagus) used for **development and testing** of **new and experimental features**. It can be seen as the **beta version** of the Snuffleupagus PHP extension, showcasing new ideas, with the aim to eventually be ported back upstream to the original repository.
116 11
117We've got a [comprehensive website](https://snuffleupagus.readthedocs.io/) with 12## About Suhosin-NG
118all the documentation that you could possibly wish for. You can of course
119[build it yourself](https://github.com/jvoisin/snuffleupagus/tree/master/doc).
120 13
121## Thanks 14![suhosin-ng logo](https://github.com/sektioneins/suhosin-ng/blob/master/logo/suhosin-ng-logo.svg)
122 15
123Many thanks to the [Suhosin project](https://suhosin.org) for being a __huge__ 16The [Suhosin-NG project](https://github.com/sektioneins/suhosin-ng) is an effort to advance PHP hardening by providing patches to Snuffleupagus, documentation and its own [set of tools](https://github.com/sektioneins/sng-tools).
124source of inspiration, and to all [our
125contributors](https://github.com/jvoisin/snuffleupagus/graphs/contributors).