All Projects → sektioneins → Pcc

sektioneins / Pcc

Licence: bsd-3-clause
PHP Secure Configuration Checker

Projects that are alternatives of or similar to Pcc

Smac3
Sequential Model-based Algorithm Configuration
Stars: ✭ 564 (-27.97%)
Mutual labels:  configuration
Xxl Conf
A lightweight distributed configuration management platform. (分布式配置管理平台XXL-CONF)
Stars: ✭ 619 (-20.95%)
Mutual labels:  configuration
Apollo
Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
Stars: ✭ 26,052 (+3227.2%)
Mutual labels:  configuration
Poco
The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
Stars: ✭ 5,762 (+635.89%)
Mutual labels:  configuration
Torus Cli
A secure, shared workspace for secrets
Stars: ✭ 611 (-21.97%)
Mutual labels:  configuration
Intellij Jvm Options Explained
Common JVM options used with Intellij and what they do
Stars: ✭ 636 (-18.77%)
Mutual labels:  configuration
Bulletinboard
General-purpose contextual cards for iOS
Stars: ✭ 5,173 (+560.66%)
Mutual labels:  configuration
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (-3.07%)
Mutual labels:  configuration
Steeltoe
Steeltoe .NET Core Components: CircuitBreaker, Configuration, Connectors, Discovery, Logging, Management, and Security
Stars: ✭ 612 (-21.84%)
Mutual labels:  configuration
Ipban
IPBan Monitors failed logins and bad behavior and bans ip addresses on Windows and Linux. Highly configurable, lean and powerful. Learn more at -->
Stars: ✭ 652 (-16.73%)
Mutual labels:  configuration
Go Config
A dynamic config framework
Stars: ✭ 595 (-24.01%)
Mutual labels:  configuration
Konfig
Composable, observable and performant config handling for Go for the distributed processing era
Stars: ✭ 597 (-23.75%)
Mutual labels:  configuration
Ohai
Ohai profiles your system and emits JSON
Stars: ✭ 641 (-18.14%)
Mutual labels:  configuration
Goconfig
Package goconfig is a fully functional and comments-support configuration file (.ini) parser.
Stars: ✭ 568 (-27.46%)
Mutual labels:  configuration
Spring Cloud Consul
Spring Cloud Consul
Stars: ✭ 703 (-10.22%)
Mutual labels:  configuration
Anti Ddos
🔒 Anti DDOS | Bash Script Project 🔒
Stars: ✭ 561 (-28.35%)
Mutual labels:  configuration
Environs
simplified environment variable parsing
Stars: ✭ 631 (-19.41%)
Mutual labels:  configuration
V2ray Examples
v2ray-core 的模板们
Stars: ✭ 778 (-0.64%)
Mutual labels:  configuration
Array To Xml
A simple class to convert an array to xml
Stars: ✭ 744 (-4.98%)
Mutual labels:  configuration
Ini Parser
Read/Write an INI file the easy way!
Stars: ✭ 643 (-17.88%)
Mutual labels:  configuration

Build Status

PHP Secure Configuration Checker

Check current PHP configuration for potential security flaws.

Simply access this file from your webserver or run on CLI.

Author

This software was written by Ben Fuhrmannek, SektionEins GmbH, in an effort to automate php.ini checks and spend more time on cheerful tasks.

Idea

  • one single file for easy distribution
  • simple tests for each security related ini entry
  • a few other tests - not too complicated though
  • compatible with PHP >= 5.4, or if possible >= 5.0
  • NO complicated/overengineered code, e.g. no classes/interfaces, test-frameworks, libraries, ... -> It is supposed to be obvious on first glance - even for novices - how this tool works and what it does!
  • NO (or very few) dependencies

Usage / Installation

  • CLI: Simply call php phpconfigcheck.php. That's it. Add -a to see hidden results as well, -h for HTML output and -j for JSON output.

  • WEB: Copy this script to any directory accessible by your webserver, e.g. your document root. See also 'Safeguards' below.

    The output in non-CLI mode is HTML by default. This behaviour can be changed by setting the environment variable PCC_OUTPUT_TYPE=text or PCC_OUTPUT_TYPE=json.

    Some test cases are hidden by default, specifically skipped, ok and unknown/untested. To show all results, use phpconfigcheck.php?showall=1. This does not apply to JSON output, which returns all results by default.

    To control the output format in WEB mode use phpconfigcheck.php?format=..., where the value of format maybe one of text, html or json. For example: phpconfigcheck.php?format=text. The format parameter takes precedence over PCC_OUTPUT_TYPE.

Safeguards

Most of the time it is a good idea to keep security related issues such as your PHP configuration to yourself. The following safeguards have been implemented:

  • mtime check: This script stops working in non-CLI mode after two days. Re-arming the check can be done by touch phpconfigcheck.php or by copying the script to your server again (e.g. via SCP). This check can be disabled by setting the environment variable: PCC_DISABLE_MTIME=1, e.g. SetEnv PCC_DISABLE_MTIME 1 in apache's .htaccess.

  • source IP check: By default only localhost (127.0.0.1 and ::1) can access this script. Other hosts may be added by setting PCC_ALLOW_IP to a your IP address or a wildcard pattern, e.g. SetEnv PCC_ALLOW_IP 10.0.0.* in .htaccess. You may also choose to access your webserver via SSH Port forwarding, e.g. ssh -D or ssh -L.

Troubleshooting

  • disabled functions: This scripts needs a few functions to work properly, such as ini_get() and stat(). If one of these functions is blacklisted (or not whitelisted) then execution will fail or produce invalid output. In these cases it is possible to temporarily put Suhosin in simulation mode and omit disable_functions. To be on the safe side, relaxed security configuration can be done with .htaccess in a separate directory. Also, this script may be called from command line with your webserver's configuration, e.g. php -n -c /etc/.../php.ini phpconfigcheck.php.

  • CLI: Older PHP versions don't known about SAPI name 'cli' and use CGI style output even on cli. Workaround: PCC_OUTPUT_TYPE=text /opt/php/php-5.1.6/bin/php phpconfigcheck.php

WARNING

This tool will only support you setting up a secure PHP environment. Nothing else. Your setup, software or any related configuration may still be vulnerable, even if this tool's output suggests otherwise.

Notes

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].