|
Web Application Security
Fwd: PHP Easter Eggs Nov 28 2004 01:21PM Andi McLean (andi_mclean ntlworld com) (6 replies) Re: PHP Easter Eggs Nov 30 2004 04:12AM Serban Gh. Ghita (serban verasys ro) (2 replies) Re: Fwd: PHP Easter Eggs Nov 29 2004 04:17PM Saqib N Ali seagate com (2 replies) Re: Fwd: PHP Easter Eggs Nov 30 2004 08:53AM exon (exon home se) (2 replies) Re: PHP Easter Eggs Nov 30 2004 06:24PM Paul Fierro (pablo nothing com) (2 replies) Re: PHP Easter Eggs Dec 02 2004 04:35AM Jimi Thompson (jimi thompson gmail com) (5 replies) SQL injection (no single quotes used) Dec 09 2004 03:53PM Juan Carlos Calderon (johnccr yahoo com) (5 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) Re: SQL injection (no single quotes used) Dec 15 2004 02:49AM Olivier G. Gaumond (olig monimap com) (1 replies) Re: SQL injection (no single quotes used) Dec 15 2004 04:50PM Juan Carlos (johnccr yahoo com) (1 replies) RE: SQL injection (no single quotes used) Dec 15 2004 11:12PM Brett Moore (brett moore security-assessment com) Re: PHP Easter Eggs Dec 02 2004 04:35AM Jimi Thompson (jimi thompson gmail com) (3 replies) SQL injection (no single quotes used) Dec 09 2004 03:53PM Juan Carlos Calderon (johnccr yahoo com) (5 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) Re: SQL injection (no single quotes used) Dec 15 2004 02:49AM Olivier G. Gaumond (olig monimap com) (1 replies) Re: SQL injection (no single quotes used) Dec 15 2004 04:50PM Juan Carlos (johnccr yahoo com) (1 replies) RE: SQL injection (no single quotes used) Dec 15 2004 11:12PM Brett Moore (brett moore security-assessment com) Re: PHP Easter Eggs Nov 30 2004 06:24PM Paul Fierro (pablo nothing com) (2 replies) Re: PHP Easter Eggs Dec 02 2004 04:35AM Jimi Thompson (jimi thompson gmail com) (5 replies) SQL injection (no single quotes used) Dec 09 2004 03:53PM Juan Carlos Calderon (johnccr yahoo com) (5 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) Re: SQL injection (no single quotes used) Dec 15 2004 02:49AM Olivier G. Gaumond (olig monimap com) (1 replies) Re: SQL injection (no single quotes used) Dec 15 2004 04:50PM Juan Carlos (johnccr yahoo com) (1 replies) RE: SQL injection (no single quotes used) Dec 15 2004 11:12PM Brett Moore (brett moore security-assessment com) Re: PHP Easter Eggs Dec 02 2004 04:35AM Jimi Thompson (jimi thompson gmail com) (3 replies) SQL injection (no single quotes used) Dec 09 2004 03:53PM Juan Carlos Calderon (johnccr yahoo com) (5 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) Re: SQL injection (no single quotes used) Dec 15 2004 02:49AM Olivier G. Gaumond (olig monimap com) (1 replies) Re: SQL injection (no single quotes used) Dec 15 2004 04:50PM Juan Carlos (johnccr yahoo com) (1 replies) RE: SQL injection (no single quotes used) Dec 15 2004 11:12PM Brett Moore (brett moore security-assessment com) Re: Fwd: PHP Easter Eggs Nov 30 2004 08:53AM exon (exon home se) (2 replies) Re: PHP Easter Eggs Nov 30 2004 06:24PM Paul Fierro (pablo nothing com) (2 replies) Re: PHP Easter Eggs Dec 02 2004 04:35AM Jimi Thompson (jimi thompson gmail com) (5 replies) SQL injection (no single quotes used) Dec 09 2004 03:53PM Juan Carlos Calderon (johnccr yahoo com) (5 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) Re: SQL injection (no single quotes used) Dec 15 2004 02:49AM Olivier G. Gaumond (olig monimap com) (1 replies) Re: SQL injection (no single quotes used) Dec 15 2004 04:50PM Juan Carlos (johnccr yahoo com) (1 replies) RE: SQL injection (no single quotes used) Dec 15 2004 11:12PM Brett Moore (brett moore security-assessment com) Re: PHP Easter Eggs Dec 02 2004 04:35AM Jimi Thompson (jimi thompson gmail com) (3 replies) SQL injection (no single quotes used) Dec 09 2004 03:53PM Juan Carlos Calderon (johnccr yahoo com) (5 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) Re: SQL injection (no single quotes used) Dec 15 2004 02:49AM Olivier G. Gaumond (olig monimap com) (1 replies) Re: SQL injection (no single quotes used) Dec 15 2004 04:50PM Juan Carlos (johnccr yahoo com) (1 replies) RE: SQL injection (no single quotes used) Dec 15 2004 11:12PM Brett Moore (brett moore security-assessment com) Re: PHP Easter Eggs Nov 30 2004 06:24PM Paul Fierro (pablo nothing com) (2 replies) Re: PHP Easter Eggs Dec 02 2004 04:35AM Jimi Thompson (jimi thompson gmail com) (5 replies) SQL injection (no single quotes used) Dec 09 2004 03:53PM Juan Carlos Calderon (johnccr yahoo com) (5 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) Re: SQL injection (no single quotes used) Dec 15 2004 02:49AM Olivier G. Gaumond (olig monimap com) (1 replies) Re: SQL injection (no single quotes used) Dec 15 2004 04:50PM Juan Carlos (johnccr yahoo com) (1 replies) RE: SQL injection (no single quotes used) Dec 15 2004 11:12PM Brett Moore (brett moore security-assessment com) Re: PHP Easter Eggs Dec 02 2004 04:35AM Jimi Thompson (jimi thompson gmail com) (3 replies) SQL injection (no single quotes used) Dec 09 2004 03:53PM Juan Carlos Calderon (johnccr yahoo com) (5 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) RE: SQL injection (no single quotes used) Dec 15 2004 10:25AM Mutallip Ablimit (mutax insi co jp) (2 replies) Re: SQL injection (no single quotes used) Dec 15 2004 02:49AM Olivier G. Gaumond (olig monimap com) (1 replies) Re: SQL injection (no single quotes used) Dec 15 2004 04:50PM Juan Carlos (johnccr yahoo com) (1 replies) RE: SQL injection (no single quotes used) Dec 15 2004 11:12PM Brett Moore (brett moore security-assessment com) |
|
|
Privacy Statement |
While in Oracle escaping apostrophe (') character
seems to be enough protection for Sql Injection (I
think is not), this is not true for Sql Server. Here a
little example I think many of you will find useful.
For an on-the-fly query like:
Query = "select field1, field2... from table where id
= '" + FixSQL (FieldValue) + "'"
Where FixSQL will escape single quotes AKA apostrophe,
the following value for "FieldValue" will be
effective:
FieldValue = "(NewLine)GO(NewLine)Desired Sql
Sentence(NewLine)GO"
Final result is:
select field1, field2... from table where id = '
GO
Desired Sql Sentence
GO
'
Here the MS Documentation for GO Keyword:
<snip>
SQL Server utilities interpret GO as a signal that
they should send the current batch of Transact-SQL
statements to SQL Server. The current batch of
statements is composed of all statements entered since
the last GO, or since the start of the ad hoc session
or script if this is the first GO
</snip>
So one sentence become three, sentences one and three
will fail, but sentence two (the one of our interest)
will execute successfully.
Hope you find this interesting
Cheers,
-JC
_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com
[ reply ]