summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorjvoisin2022-03-20 20:11:28 +0100
committerjvoisin2022-03-20 20:20:34 +0100
commit4cbb83008e0e2a50099a615d2d9a68724c790b93 (patch)
treea8dad53854f2ef3a508e05f3dfa30e98abf7c0a2 /README.md
parentf22a086826f0d2259d3af5bc2b1258743f99eee2 (diff)
Revert the readme, and improve the "Thanks" section
Diffstat (limited to '')
-rw-r--r--README.md136
1 files changed, 125 insertions, 11 deletions
diff --git a/README.md b/README.md
index 3b305cb..96efa95 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,135 @@
1![CI for PHP versions](https://github.com/sektioneins/snuffleupagus/actions/workflows/builds.yml/badge.svg) 1<h1 align="center">
2![CI for Linux distributions](https://github.com/sektioneins/snuffleupagus/actions/workflows/distributions.yml/badge.svg) 2 <br>
3![CI for CodeQL Analysis](https://github.com/sektioneins/snuffleupagus/actions/workflows/codeql-analysis.yml/badge.svg) 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>
4 11
5<p align="center"> 12<p align="center">
6 <img src="https://github.com/sektioneins/snuffleupagus/blob/master/doc/source/_static/sp.png" alt="Snuffleupagus logo" width="200"> 13 <a href="https://github.com/jvoisin/snuffleupagus/actions/workflows/distributions_php7.yml">
14 <img src="https://github.com/jvoisin/snuffleupagus/actions/workflows/distributions_php7.yml/badge.svg"
15 alt="Testing PHP7 on various Linux distributions" />
16 </a>
17 <a href="https://github.com/jvoisin/snuffleupagus/actions/workflows/distributions_php8.yml">
18 <img src="https://github.com/jvoisin/snuffleupagus/actions/workflows/distributions_php8.yml/badge.svg"
19 alt="Testing PHP8 on various Linux distributions" />
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 <a href="https://github.com/jvoisin/snuffleupagus">
46 <img src="https://github.com/jvoisin/snuffleupagus/actions/workflows/codeql-analysis.yml/badge.svg"
47 alt="CodeQL">
48 </a>
49</p>
7 50
8 # Snuffleupagus fork with Suhosin-NG patches 51<p align="center">
9 52 <a href="#key-features">Key Features</a> •
53 <a href="#download">Download</a> •
54 <a href="#examples">Examples</a> •
55 <a href="https://snuffleupagus.readthedocs.io/">Documentation</a> •
56 <a href="https://github.com/jvoisin/snuffleupagus/blob/master/LICENSE">License</a> •
57 <a href="#thanks">Thanks</a>
10</p> 58</p>
11 59
60Snuffleupagus is a [PHP 7+ and 8+](https://secure.php.net/) module designed to
61drastically raise the cost of attacks against websites, by killing entire bug
62classes. It also provides a powerful virtual-patching system, allowing
63administrator to fix specific vulnerabilities and audit suspicious behaviours
64without having to touch the PHP code.
65
66## Key Features
67
68* No [noticeable performance impact](https://dustri.org/b/snuffleupagus-030-dentalium-elephantinum.html)
69* Powerful yet simple to write virtual-patching rules
70* Killing several classes of vulnerabilities
71 * [Unserialize-based](https://www.owasp.org/images/9/9e/Utilizing-Code-Reuse-Or-Return-Oriented-Programming-In-PHP-Application-Exploits.pdf) code execution
72 * [`mail`-based]( https://blog.ripstech.com/2016/roundcube-command-execution-via-email/ ) code execution
73 * Cookie-stealing [XSS]( https://en.wikipedia.org/wiki/Cross-site_scripting )
74 * File-upload based code execution
75 * Weak PRNG
76 * [XXE]( https://en.wikipedia.org/wiki/XML_external_entity_attack )
77* Several hardening features
78 * Automatic `secure` and `samesite` flag for cookies
79 * Bundled set of rules to detect post-compromissions behaviours
80 * Global [strict mode]( https://secure.php.net/manual/en/migration70.new-features.php#migration70.new-features.scalar-type-declarations) and type-juggling prevention
81 * Whitelisting of [stream wrappers](https://secure.php.net/manual/en/intro.stream.php)
82 * Preventing writeable files execution
83 * Whitelist/blacklist for `eval`
84 * Enforcing TLS certificate validation when using [curl](https://secure.php.net/manual/en/book.curl.php)
85 * Request dumping capability
86* A relatively sane code base:
87 * A [comprehensive](https://coveralls.io/github/jvoisin/snuffleupagus?branch=master) test suite close to 100% coverage
88 * Every commit is tested on [several distributions](https://gitlab.com/jvoisin/snuffleupagus/pipelines)
89 * An `clang-format`-enforced code style
90 * A [comprehensive documentation](https://snuffleupagus.rtfd.io)
91 * Usage of [coverity](https://scan.coverity.com/projects/jvoisin-snuffleupagus)
92
93## Download
94
95We've got a [download
96page](https://snuffleupagus.readthedocs.io/download.html), where you can find
97packages for your distribution, but you can of course just `git clone` this
98repo, or check the releases on [github](https://github.com/jvoisin/snuffleupagus/releases).
99
100## Examples
101
102We're providing [various example rules](https://github.com/jvoisin/snuffleupagus/tree/master/config),
103that are looking like this:
104
105```python
106# Harden the `chmod` function
107sp.disable_function.function("chmod").param("mode").value_r("^[0-9]{2}[67]$").drop();
108
109# Mitigate command injection in `system`
110sp.disable_function.function("system").param("command").value_r("[$|;&`\\n]").drop();
111```
112
113Upon violation of a rule, you should see lines like this in your logs:
114
115```python
116[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.
117```
118
119## Documentation
12 120
13## About Snuffleupagus 121We've got a [comprehensive website](https://snuffleupagus.readthedocs.io/) with
122all the documentation that you could possibly wish for. You can of course
123[build it yourself](https://github.com/jvoisin/snuffleupagus/tree/master/doc).
14 124
15Snuffleupagus 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. 125## Thanks
16 126
17## About Suhosin-NG 127Many thanks to:
18 128
19![suhosin-ng logo](https://github.com/sektioneins/suhosin-ng/blob/master/logo/suhosin-ng-logo.svg) 129- The [Suhosin project](https://suhosin.org) for being a __huge__ source of inspiration
130- [NBS System](https://www.nbs-system.com) for initially sponsoring the development
131- [Suhosin-ng](https://github.com/sektioneins/suhosin-ng) for their
132 experimentations and [contributions](https://github.com/jvoisin/snuffleupagus/commits?author=bef),
133 as well as [NLNet](https://nlnet.nl/project/Suhosin-NG/) for sponsoring it
134- All [our contributors](https://github.com/jvoisin/snuffleupagus/graphs/contributors)
20 135
21The [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).