snuffleupagus

Security module for php7 - Killing bugclasses and virtual-patching the rest!

Github星跟踪图

Snuffleupagus is a PHP 7+ module designed to
drastically raise the cost of attacks against websites, by killing entire bug
classes. It also provides a powerful virtual-patching system, allowing
administrator to fix specific vulnerabilities and audit suspicious behaviours
without having to touch the PHP code.

Key Features

  • No noticeable performance impact
  • Powerful yet simple to write virtual-patching rules
  • Killing several classes of vulnerabilities
  • Several hardening features
    • Automatic secure and samesite flag for cookies
    • Bundled set of rules to detect post-compromissions behaviours
    • Global strict mode and type-juggling prevention
    • Whitelisting of stream wrappers
    • Preventing writeable files execution
    • Whitelist/blacklist for eval
    • Enforcing TLS certificate validation when using curl
    • Request dumping capability
  • A relatively sane code base:

Download

We've got a download
page
, where you can find
packages for your distribution, but you can of course just git clone this
repo, or check the releases on github.

Examples

We're providing various example rules,
that are looking like this:

# Harden the `chmod` function
sp.disable_function.function("chmod").param("mode").value_r("^[0-9]{2}[67]$").drop();

# Mitigate command injection in `system`
sp.disable_function.function("system").param("command").value_r("[$, ;&`\\n]").drop();

Upon violation of a rule, you should see lines like this in your logs:

[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.

Documentation

We've got a comprehensive website with
all the documentation that you could possibly wish for. You can of course
build it yourself.

Thanks

Many thanks to the Suhosin project for being a huge
source of inspiration, and to all our
contributors
.

主要指标

概览
名称与所有者jvoisin/snuffleupagus
主编程语言PHP
编程语言Makefile (语言数: 7)
平台
许可证GNU Lesser General Public License v3.0
所有者活动
创建于2017-09-20 08:06:45
推送于2025-06-25 17:39:11
最后一次提交2025-06-25 11:37:23
发布数20
最新版本名称v0.11.0 (发布于 2024-09-06 14:35:50)
第一版名称v0.1.0 (发布于 2017-12-21 16:29:03)
用户参与
星数811
关注者数36
派生数93
提交数1.1k
已启用问题?
问题数282
打开的问题数15
拉请求数193
打开的拉请求数0
关闭的拉请求数35
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?