PHP Security for Deployers
PHP Security for Deployers
If you're a Developer
READ THIS and then work with your SysAdmins to step through any and all the layers of security designed to protect your apps.
Example:
Traffic must first pass through a SPI firewall (ensure that ONLY necessary ports/protocols are permitted; ensure that EGRESS BLOCKING is in place so that if your system IS compromised it will be very difficult for the attacker to send data back or attack someone else via the Network Layer. (Need reference; "traditional" SPI-based firewall security).
Traffic may then pass through an in-line IPS (Intrusion Prevention System) to filter out network-based attacks against the OS, web platform, or PHP framework itself
Traffic may then pass through a WAF (Web Application Firewall) such as ModSecurity or a commercial WAF to defeat basic script-based attacks
Traffic may then pass through an additional layer of security such as PHP-IDS to identify other attacks or concerns.
By the time traffic has passed through all the layers above, you've achieved a significant measure of mitigation HOWEVER you still need to follow all the best practices to "harden" PHP, perhaps by using suhosin.
Ditto for all other layers. Your SysAdmin should ensure that the OS and web server (iis, apache) are also hardened. See the NSA's security configuration guides to get started.
The rest is up to you, the developer. Write secure code. How difficult could THAT be? All it takes is a little work...
If you're a Tester
Note that PHP-IDS and ModSecuritycan also be useful tools for testing/discovering vulnerabilities in your code. See Ryan Barnett's excellent presentation to the Boulder OWASP chapter regarding using ModSecurity to identify app vulns on an ongoing basis.
Grab the OWASP LiveCD here(owasp.org) or here(appseclive.org) and review the great information in the OWASP Testing Project
If you're a SysAdmin
BE PATIENT. NOBODY was born with a visceral understanding of how to write secure code,
相关文档:
今天是一个值得纪念的日子,终于把别的事情都干掉了,可以一心一意的学习我最爱的PHP了,小欢呼一下.耶~~
首先.结合自己的思考,有了几个关于1+1=2的表示方法,具体罗列如下:
首先是一种很简单的表示方法:
<?php
$a =1+1;
echo "1+1=".$a;
?>
//这种方法用的并不多,只是为了加深对变量 ......
(1)、yum安装mysql
//yum安装
yum -y install mysql mysql_server
//在服务清单中添加mysql服务
chkconfig --add mysqld
//服务启动
service mysqld start
//初始化mysql数据库
/usr/bin/mysql_secure_installation
(2)、安装apache
yum -y install httpd
service httpd start
添加iptables允许访 ......
<?php
/*
$Id: PHPZip.php
*/
class PHPZip {
var $datasec = array();
var $ctrl_dir = array();
var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
var $old_offset = 0;
& ......
本教程采用的是xampp自带的tomcat插件来完成整合的,所以,要想完成整合,第一步不需下载xampp,及其tomcat插件~
1.打开xampp官网 点此xampp官网打开
&n ......
无意间看到以前发的帖子.回忆起那些PHP的日日夜夜
http://www.phpfans.net/ask/discuss2/343326196.html
<?
class gzg//钙中钙类
{
var $x;//属性
function gzg()//构造函数,默认不吃钙中钙
&n ......