web site development security

28 篇文章 1 订阅
18 篇文章 0 订阅
web site security包含以下几个方面:

* XSS

Cross-site scripting (XSS) is a type of web application security risk that enables attackers to inject client-side script into Web pages.


solution
content filtering: HTML entity encoding, JavaScript escaping, CSS escaping, and URL (or percent) encoding
validating untrusted HTML input

http://anti-hacker.blogspot.com/2008/01/xsscross-site-script.html


* SQL injection

it input SQL statements in a web form to attack security.
for example....
solution:
1. Parameterized statements
parameterized statements can be used that work with parameters  instead of embedding user input in the statement.
2. Using object-relational mapping libraries avoids the need to write SQL code. The ORM library in effect will generate parameterized SQL statements from object-oriented code.
3. Escaping. escape characters that have a special meaning in SQL


* http header injection

* File path traversal
* XPath injection
* HTTP PUT enabled
* Cleartext submission of password
* XML injection
* Open redirection
* Cookie scoped to parent domain
* Cookie without HttpOnly flag set
* Password field with autocomplete enabled
* Referer-dependent response
* Cross-domain POST
* Cross-domain Referer leakage
* Cross-domain script include
* TRACE method is enabled
* Email addresses disclosed
* Private IP addresses disclosed
* Robots.txt file
* ASP.NET debugging enabled
* ASP.NET ViewState without MAC enabled
* Flash cross-domain policy
* Silverlight cross-domain policy




XSS, SQL Injection, HTTP Header Injection, DORK Report for April 2, 2011
http://xss.cx/examples/dork/favicon.ico/4.2.2011.favicon.ico.dork.report.html


PHP security
http://www.php.net/manual/en/security.intro.php

http://bbs.phpchina.com/thread-180424-1-1.html

* 关闭注册全局变量 

* set magic_quotes_gpc = on to protect sql injection

* set expose_php = Off to hide php version info in header 

* 关闭危险函数 set disable_functions

* php_self var



http://www.chhua.com/web-note1413
http://www.php5.idv.tw/html.php?mod=article&do=show&shid=69
http://www.php5.idv.tw/modules.php?mod=books&act=show&shid=2475




php_self的安全性
http://www.5idev.com/p-php_server_php_self.shtml
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值