自刨自吃,闲云野鹤,眼净心净,天宽地宽。
Posts tagged security
PHP Security / Sessions / Session Fixation
0July 1, 2007
Session Fixation 会话固定攻击 Session security is a sophisticated topic, and it’s no surprise that sessions are a frequent target of attack. Most session attacks involve impersonation, where the attacker attempts to gain access to another user’s session. 会话安全是一个老生常谈的话题了,会话作为一个常见的攻击目标一点也不稀奇。绝大多数的会话攻击都用的是会话伪装,攻击者要试图用这种方法访问另外一个用户的会话。 The most crucial piece of information for an attacker is the session identifier, because this is required [...]
PHP Security / Databases and SQL / SQL Injection
0June 19, 2007
SQL Injection SQL 注入 SQL injection attacks are extremely simple to defend against, but many applications are still vulnerable. Consider the following SQL statement: SQL 注入攻击很容易就能防范,但是很多程序在这方面还是很脆弱的。看下面的 SQL 语句: 123456789<?php $sql = "INSERT INTO users (reg_username, reg_password, [...]
PHP Security / Databases and SQL / Exposed Access Credentials
0June 18, 2007
Exposed Access Credentials 连接信息泄漏 Most PHP applications interact with a database. This usually involves connecting to a database server and using access credentials to authenticate: 绝大多数的 PHP 程序都要和数据库交互。这个交互过程通常都是首先连接到数据数据库,然后通过连接信息认证。 123456<?php $host = 'example.org'; $username = 'myuser'; $password = 'mypass'; $db = mysql_connect($host, $username, $password); ?> This could be an example of a file called db.inc that [...]
PHP Security / Form Processing / Cross-Site Request Forgeries
0June 8, 2007
Cross-Site Request Forgeries 跨站点请求伪造 Despite the similarities in name, cross-site request forgeries (CSRF) are an almost opposite style of attack. Whereas XSS attacks exploit the trust a user has in a Web site, CSRF attacks exploit the trust a Web site has in a user. CSRF attacks are more dangerous, less popular (which means fewer [...]
PHP Security / Form Processing / Cross-Site Scripting
0June 6, 2007
Cross-Site Scripting 跨站点脚本 The media has helped make cross-site scripting (XSS) a familiar term, and the attention is deserved. It is one of the most common security vulnerabilities in Web applications, and many popular open source PHP applications suffer from constant XSS vulnerabilities. 媒体使得跨站点脚本(XSS)成为一个常见词汇,对跨站点脚本多加小心是值得的。这是在 Web 应用程序里最常见的安全隐患之一,而且很多流行的开源 PHP 程序里也有一定量的 XSS 隐患。 XSS attacks have the following [...]
PHP Security / Form Processing / Spoofed HTTP Requests
0June 5, 2007
Spoofed HTTP Requests HTTP 请求欺骗 A more powerful, although less convenient approach is to spoof an HTTP request. In the example form just discussed, where the user chooses a color, the resulting HTTP request looks like the following (assuming a choice of red): HTTP 请求欺骗非常的强大,而且还很方便。在上面讨论到的那个让用户选择颜色示例中,结果生成的 HTTP 请求看起来是这个样子的(假设用户选择了红色): 123456POST /process.php HTTP/1.1 Host: example.org Content-Type: application/x-www-form-urlencoded Content-Length: [...]
PHP Security / Form Processing / Spoofed Form Submissions
0June 3, 2007
Spoofed Form Submissions 表单提交欺骗 In order to appreciate the necessity of data filtering, consider the following form located (hypothetically speaking) at http://example.org/form.html: 为了说明数据过滤得必要性,请看下面的这个位于(假设)http://example.org/form.html 的表单: 1234567<form action="/process.php" method="post"> <select name="color"> <option value="red">red</option> <option value="green">green</option> <option value="blue">blue</option> </select> <input type="submit" /> Imagine a potential attacker who saves this HTML and modifies it as follows: [...]
PHP Security / Overview / Error Reporting
0May 24, 2007
Error Reporting 错误报告 In versions of PHP prior to PHP 5, released 13 Jul 2004, error reporting is pretty simplistic. Aside from careful programming, it relies mostly upon a few specific PHP configuration directives: 在 2004 年 7 月 13号发布的 PHP 5 和之间的版本里,错误报告功能都简单的过分。如果不考虑仔细编程的话,这个功能只能依靠几个特定的 PHP 配置选项。 error_reporting This directive sets the level of error reporting desired. [...]
PHP Security / Overview / Data Filtering
0May 17, 2007
Data Filtering 数据过滤 As stated previously, data filtering is the cornerstone of Web application security, and this is independent of programming language or platform. It involves the mechanism by which you determine the validity of data that is entering and exiting the application, and a good software design can help developers to: 正如前面所说,数据过滤是 Web 程序安全的奠基石,这个规则和 [...]
PHP Security / Overview / Register Globals
0March 26, 2007
Register Globals Register Globals The register_globals directive is disabled by default in PHP versions 4.2.0 and greater. While it does not represent a security vulnerability, it is a security risk. Therefore, you should always develop and deploy applications with register_globals disabled. 在 PHP 4.2.0 以及更高版本里,register_globals 选项默认就是禁用的。虽然这个选项并不意味就着是安全漏洞,不过它确实是一个安全隐患。因此,你在开发、部署程序的时候应该总是禁用 register_globals 选项。 Why is it a security risk? Good [...]
Recent Comments