AR
analyzer wrote:
I have read many blogs about this topic, but it is still complicated. Now, if addslashes is exploitable, what function are we going to use to stop sqli attack. They say that if you put bf27 a multi-byte char the addslashes func will not addslashes into that input. Because addslashes can not read multi-bytes chars. What should i do now to stop sqli attack? Should i'm going to use mysql_real_escape_string() ? ?
None of those, magic_quote_gpc() is DEPRECATED and addslashes() does same thing as get_magic_quotes_gpc() automaticly. Hex char is easy to filter and it just depends is in question GET or POST, GET is decoded automaticly while POST doesn't.
I don't know simple answer on that question, you should use htaccess before (but sure not excluding) php and take care on per-case basis.
StRiNg_MaStEr wrote:
i can bypass mysql_real_escape_string() and addslashes too.
best way to protect from SQLi is install latest version of mod_security
only some Pros can bypass it.
Its one hex char.
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
AR
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***