Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: PHP filter function against SQL injections |
|---|---|
| Date: | Fri, 09 Feb 2007 15:21:10 -0500 |
2. union injection ??
A very key testcase. Union injection requires no special characters if the parameters were assumed to be integers. You should be using mysql_real_escape_string(), btw. The documentation claims that mysql_real_escape_string() is completely effective; what are you willing to bet on that? That have been at least two vulnerabilities already in this function - see http://ilia.ws/archives/103-mysql_real_escape_string-versus-Prepared-Statements.html and http://software.newsforge.com/article.pl?sid=06/06/01/213223&tid=78 (One is from January 2006, one from June, so I doubt they are the same hole.) When you deal in character-set issues on the Internet, you have to rely on multiple devices and layers all being correct; history shows that's a risky assumption. The "industrial strength" to protect against SQL injection is to a) consider the allowable inputs carefully and filter the input and b) use BIND variables (or generally, the prepare and execute methods) See http://ca3.php.net/mysqli for an overview of the mysqli_stmt class and the methods bind_param - binds variables to a prepared statement execute - executes a prepared statement fetch - fetches result from a prepared statement into bound variables prepare - prepares a SQL query and others. Building SQL by concatenation is inherently vulnerable, just don't do it. -- Henry Troup htroup@acm.org
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Vista's personal firewall and AV package, urandom character special device |
|---|---|
| Next by Date: | Re: What fresh hell is this? Laptop lockdown from afar, PCSC Information Services |
| Previous by Thread: | FW: PHP filter function against SQL injections, kevin fielder |
| Next by Thread: | Re: PHP filter function against SQL injections, Henry Troup |
| Indexes: | [Date] [Thread] [Top] [All Lists] |