mailing list archives
Re: PHP Nuke <= 7.8 Multiple SQL Injections
From: Paul Laudanski <zx () castlecops com>
Date: Fri, 16 Sep 2005 18:28:19 -0400 (EDT)
On Fri, 16 Sep 2005, Matthias Jim Knopf wrote:
What do you gain from that? In what way would you think your advice did
You did neither issue a "addslashes()" as appropriate for SQL-commands,
nor did you explain, why a variable set by a POST or a COOKIE could be
worse than anything you could give any URL by appending '?name=...' or
'&name=...' (->GET vars)
If you read the code and original advisory, there is filtering already in
place within the PHP-Nuke framework that monitors HTTP GETs. As such,
this 'exploit' makes use of variables which should only be passed via HTTP
GETs and not POSTs nor cookies.
Proper data sanitization for this is simply to retrieve what is expected:
$name = $_GET['name'];
The function you specify like http://php.net/addslashes is neither here
nor there. Why use that function for a variable in POST or cookies when
it is clearly expected to be returned via GET alone?
register_globals off !
If you desire to filter $_POST['name'] and/or $_COOKIE['name'] go for it.
I can tell you that those values are never to be expected in PHP-Nuke so
you are just adding extra overhead.
Paul Laudanski, Microsoft MVP Windows-Security
________ Information from Computer Cops, L.L.C. ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
part000.txt - is OK