<s>
In	O
computing	O
,	O
SQL	B-Language
injection	I-Language
is	O
a	O
code	O
injection	O
technique	O
used	O
to	O
attack	O
data-driven	O
applications	O
,	O
in	O
which	O
malicious	O
SQL	B-Language
statements	O
are	O
inserted	O
into	O
an	O
entry	O
field	O
for	O
execution	O
(	O
e.g.	O
</s>
<s>
SQL	B-Language
injection	I-Language
must	O
exploit	O
a	O
security	O
vulnerability	O
in	O
an	O
application	O
's	O
software	O
,	O
for	O
example	O
,	O
when	O
user	O
input	O
is	O
either	O
incorrectly	O
filtered	O
for	O
string	B-Language
literal	I-Language
escape	O
characters	O
embedded	O
in	O
SQL	B-Language
statements	O
or	O
user	O
input	O
is	O
not	O
strongly	O
typed	O
and	O
unexpectedly	O
executed	O
.	O
</s>
<s>
SQL	B-Language
injection	I-Language
is	O
mostly	O
known	O
as	O
an	O
attack	O
vector	O
for	O
websites	O
but	O
can	O
be	O
used	O
to	O
attack	O
any	O
type	O
of	O
SQL	B-Language
database	I-Language
.	O
</s>
<s>
SQL	B-Language
injection	I-Language
attacks	I-Language
allow	O
attackers	O
to	O
spoof	O
identity	O
,	O
tamper	O
with	O
existing	O
data	O
,	O
cause	O
repudiation	O
issues	O
such	O
as	O
voiding	O
transactions	O
or	O
changing	O
balances	O
,	O
allow	O
the	O
complete	O
disclosure	O
of	O
all	O
data	O
on	O
the	O
system	O
,	O
destroy	O
the	O
data	O
or	O
make	O
it	O
otherwise	O
unavailable	O
,	O
and	O
become	O
administrators	O
of	O
the	O
database	O
server	O
.	O
</s>
<s>
The	O
first	O
public	O
discussions	O
of	O
SQL	B-Language
injection	I-Language
started	O
appearing	O
around	O
1998	O
;	O
for	O
example	O
,	O
a	O
1998	O
article	O
in	O
Phrack	O
Magazine	O
.	O
</s>
<s>
SQL	B-Language
injection	I-Language
(	O
SQLI	B-Language
)	O
was	O
considered	O
one	O
of	O
the	O
top	O
10	O
web	O
application	O
vulnerabilities	O
of	O
2007	O
and	O
2010	O
by	O
the	O
Open	O
Web	O
Application	O
Security	O
Project	O
.	O
</s>
<s>
In	O
2013	O
,	O
SQLI	B-Language
was	O
rated	O
the	O
number	O
one	O
attack	O
on	O
the	O
OWASP	O
top	O
ten	O
.	O
</s>
<s>
There	O
are	O
four	O
main	O
sub-classes	O
of	O
SQL	B-Language
injection	I-Language
:	O
</s>
<s>
The	O
Storm	O
Worm	O
is	O
one	O
representation	O
of	O
Compounded	O
SQLI	B-Language
.	O
</s>
<s>
This	O
classification	O
represents	O
the	O
state	O
of	O
SQLI	B-Language
,	O
respecting	O
its	O
evolution	O
until	O
2010	O
—	O
further	O
refinement	O
is	O
underway	O
.	O
</s>
<s>
This	O
form	O
of	O
injection	O
relies	O
on	O
the	O
fact	O
that	O
SQL	B-Language
statements	O
consist	O
of	O
both	O
data	O
used	O
by	O
the	O
SQL	B-Language
statement	O
and	O
commands	O
that	O
control	O
how	O
the	O
SQL	B-Language
statement	O
is	O
executed	O
.	O
</s>
<s>
For	O
example	O
,	O
in	O
the	O
SQL	B-Language
statement	O
the	O
string	O
''	O
is	O
data	O
and	O
the	O
fragment	O
is	O
an	O
example	O
of	O
a	O
command	O
(	O
the	O
value	O
is	O
also	O
data	O
in	O
this	O
example	O
)	O
.	O
</s>
<s>
SQL	B-Language
injection	I-Language
occurs	O
when	O
specially	O
crafted	O
user	O
input	O
is	O
processed	O
by	O
the	O
receiving	O
program	O
in	O
a	O
way	O
that	O
allows	O
the	O
input	O
to	O
exit	O
a	O
data	O
context	O
and	O
enter	O
a	O
command	O
context	O
.	O
</s>
<s>
This	O
allows	O
the	O
attacker	O
to	O
alter	O
the	O
structure	O
of	O
the	O
SQL	B-Language
statement	O
which	O
is	O
executed	O
.	O
</s>
<s>
The	O
user	O
entered	O
the	O
string	O
''	O
(	O
without	O
the	O
apostrophes	O
)	O
in	O
a	O
web	O
form	O
text	O
entry	O
field	O
,	O
and	O
the	O
program	O
used	O
string	O
concatenation	O
statements	O
to	O
form	O
the	O
above	O
SQL	B-Language
statement	O
from	O
the	O
three	O
fragments	O
,	O
the	O
user	O
input	O
of	O
''	O
,	O
and	O
.	O
</s>
<s>
Many	O
databases	B-Application
will	O
ignore	O
the	O
text	O
after	O
the	O
'	O
--	O
 '	O
string	O
as	O
this	O
denotes	O
a	O
comment	O
.	O
</s>
<s>
The	O
structure	O
of	O
the	O
SQL	B-Language
command	O
is	O
now	O
and	O
this	O
will	O
select	O
all	O
person	O
rows	O
rather	O
than	O
just	O
those	O
named	O
'	O
susan	O
 '	O
whose	O
age	O
is	O
2	O
.	O
</s>
<s>
Imagine	O
a	O
program	O
creates	O
a	O
SQL	B-Language
statement	O
using	O
the	O
following	O
string	O
assignment	O
command	O
:	O
</s>
<s>
This	O
SQL	B-Language
code	O
is	O
designed	O
to	O
pull	O
up	O
the	O
records	O
of	O
the	O
specified	O
username	O
from	O
its	O
table	B-Application
of	O
users	O
.	O
</s>
<s>
However	O
,	O
if	O
the	O
"	O
userName	O
"	O
variable	O
is	O
crafted	O
in	O
a	O
specific	O
way	O
by	O
a	O
malicious	O
user	O
,	O
the	O
SQL	B-Language
statement	O
may	O
do	O
more	O
than	O
the	O
code	O
author	O
intended	O
.	O
</s>
<s>
or	O
using	O
comments	O
to	O
even	O
block	O
the	O
rest	O
of	O
the	O
query	O
(	O
there	O
are	O
three	O
types	O
of	O
SQL	B-Language
comments	O
)	O
.	O
</s>
<s>
renders	O
one	O
of	O
the	O
following	O
SQL	B-Language
statements	O
by	O
the	O
parent	O
language	O
:	O
</s>
<s>
The	O
following	O
value	O
of	O
"	O
userName	O
"	O
in	O
the	O
statement	O
below	O
would	O
cause	O
the	O
deletion	O
of	O
the	O
"	O
users	O
"	O
table	B-Application
as	O
well	O
as	O
the	O
selection	O
of	O
all	O
data	O
from	O
the	O
"	O
userinfo	O
"	O
table	B-Application
(	O
in	O
essence	O
revealing	O
the	O
information	O
of	O
every	O
user	O
)	O
,	O
using	O
an	O
API	B-General_Concept
that	O
allows	O
multiple	O
statements	O
:	O
</s>
<s>
This	O
input	O
renders	O
the	O
final	O
SQL	B-Language
statement	O
as	O
follows	O
and	O
specified	O
:	O
</s>
<s>
While	O
most	O
SQL	B-Application
server	I-Application
implementations	O
allow	O
multiple	O
statements	O
to	O
be	O
executed	O
with	O
one	O
call	O
in	O
this	O
way	O
,	O
some	O
SQL	B-Language
APIs	B-General_Concept
such	O
as	O
PHP	B-Application
's	O
mysql_query( )	O
function	O
do	O
not	O
allow	O
this	O
for	O
security	O
reasons	O
.	O
</s>
<s>
Blind	O
SQL	B-Language
injection	I-Language
is	O
used	O
when	O
a	O
web	O
application	O
is	O
vulnerable	O
to	O
an	O
SQL	B-Language
injection	I-Language
but	O
the	O
results	O
of	O
the	O
injection	O
are	O
not	O
visible	O
to	O
the	O
attacker	O
.	O
</s>
<s>
The	O
page	O
with	O
the	O
vulnerability	O
may	O
not	O
be	O
one	O
that	O
displays	O
data	O
but	O
will	O
display	O
differently	O
depending	O
on	O
the	O
results	O
of	O
a	O
logical	O
statement	O
injected	O
into	O
the	O
legitimate	O
SQL	B-Language
statement	O
called	O
for	O
that	O
page	O
.	O
</s>
<s>
One	O
type	O
of	O
blind	O
SQL	B-Language
injection	I-Language
forces	O
the	O
database	O
to	O
evaluate	O
a	O
logical	O
statement	O
on	O
an	O
ordinary	O
application	O
screen	O
.	O
</s>
<s>
As	O
an	O
example	O
,	O
a	O
book	O
review	O
website	O
uses	O
a	O
query	B-Protocol
string	I-Protocol
to	O
determine	O
which	O
book	O
review	O
to	O
display	O
.	O
</s>
<s>
from	O
which	O
it	O
would	O
populate	O
the	O
review	O
page	O
with	O
data	O
from	O
the	O
review	O
with	O
ID	O
5	O
,	O
stored	O
in	O
the	O
table	B-Application
bookreviews	O
.	O
</s>
<s>
The	O
query	O
happens	O
completely	O
on	O
the	O
server	O
;	O
the	O
user	O
does	O
not	O
know	O
the	O
names	O
of	O
the	O
database	O
,	O
table	B-Application
,	O
or	O
fields	O
,	O
nor	O
does	O
the	O
user	O
know	O
the	O
query	B-Protocol
string	I-Protocol
.	O
</s>
<s>
If	O
the	O
original	O
review	O
loads	O
with	O
the	O
"	O
1	O
=	O
1	O
"	O
URL	O
and	O
a	O
blank	O
or	O
error	O
page	O
is	O
returned	O
from	O
the	O
"	O
1	O
=	O
2	O
"	O
URL	O
,	O
and	O
the	O
returned	O
page	O
has	O
not	O
been	O
created	O
to	O
alert	O
the	O
user	O
the	O
input	O
is	O
invalid	O
,	O
or	O
in	O
other	O
words	O
,	O
has	O
been	O
caught	O
by	O
an	O
input	O
test	O
script	O
,	O
the	O
site	O
is	O
likely	O
vulnerable	O
to	O
an	O
SQL	B-Language
injection	I-Language
attack	I-Language
as	O
the	O
query	O
will	O
likely	O
have	O
passed	O
through	O
successfully	O
in	O
both	O
cases	O
.	O
</s>
<s>
-	O
1	O
)	O
=	O
4	O
,	O
which	O
would	O
show	O
the	O
book	O
review	O
on	O
a	O
server	O
running	O
MySQL	B-Application
4	O
and	O
a	O
blank	O
or	O
error	O
page	O
otherwise	O
.	O
</s>
<s>
The	O
hacker	O
can	O
continue	O
to	O
use	O
code	O
within	O
query	B-Protocol
strings	I-Protocol
to	O
achieve	O
their	O
goal	O
directly	O
,	O
or	O
to	O
glean	O
more	O
information	O
from	O
the	O
server	O
in	O
hopes	O
of	O
discovering	O
another	O
avenue	O
of	O
attack	O
.	O
</s>
<s>
Second	O
order	O
SQL	B-Language
injection	I-Language
occurs	O
when	O
submitted	O
values	O
contain	O
malicious	O
commands	O
that	O
are	O
stored	O
rather	O
than	O
executed	O
immediately	O
.	O
</s>
<s>
In	O
some	O
cases	O
,	O
the	O
application	O
may	O
correctly	O
encode	O
an	O
SQL	B-Language
statement	O
and	O
store	O
it	O
as	O
valid	O
SQL	B-Language
.	O
</s>
<s>
Then	O
,	O
another	O
part	O
of	O
that	O
application	O
without	O
controls	O
to	O
protect	O
against	O
SQL	B-Language
injection	I-Language
might	O
execute	O
that	O
stored	O
SQL	B-Language
statement	O
.	O
</s>
<s>
Automated	O
web	O
application	O
security	O
scanners	O
would	O
not	O
easily	O
detect	O
this	O
type	O
of	O
SQL	B-Language
injection	I-Language
and	O
may	O
need	O
to	O
be	O
manually	O
instructed	O
where	O
to	O
check	O
for	O
evidence	O
that	O
it	O
is	O
being	O
attempted	O
.	O
</s>
<s>
An	O
SQL	B-Language
injection	I-Language
is	O
a	O
well	O
known	O
attack	O
and	O
easily	O
prevented	O
by	O
simple	O
measures	O
.	O
</s>
<s>
After	O
an	O
apparent	O
SQL	B-Language
injection	I-Language
attack	I-Language
on	O
TalkTalk	O
in	O
2015	O
,	O
the	O
BBC	O
reported	O
that	O
security	O
experts	O
were	O
stunned	O
that	O
such	O
a	O
large	O
company	O
would	O
be	O
vulnerable	O
to	O
it	O
.	O
</s>
<s>
Developers	O
can	O
use	O
ORM	O
frameworks	O
such	O
as	O
Hibernate	B-Library
to	O
create	O
database	B-Application
queries	I-Application
in	O
a	O
safe	O
and	O
developer-friendly	O
way	O
.	O
</s>
<s>
Since	O
database	B-Application
queries	I-Application
are	O
no	O
longer	O
constructed	O
as	O
strings	O
,	O
there	O
is	O
no	O
danger	O
of	O
an	O
injection	O
vulnerability	O
.	O
</s>
<s>
While	O
WAF	O
products	O
such	O
as	O
ModSecurity	O
CRS	O
cannot	O
prevent	O
SQL	B-Language
injection	I-Language
vulnerabilities	O
from	O
creeping	O
into	O
a	O
codebase	O
,	O
they	O
can	O
make	O
discovery	O
and	O
exploitation	O
significantly	O
more	O
challenging	O
to	O
an	O
attacker	O
.	O
</s>
<s>
With	O
most	O
development	O
platforms	O
,	O
parameterized	B-Language
statements	I-Language
that	O
work	O
with	O
parameters	O
can	O
be	O
used	O
(	O
sometimes	O
called	O
placeholders	O
or	O
bind	B-Language
variables	I-Language
)	O
instead	O
of	O
embedding	O
user	O
input	O
in	O
the	O
statement	O
.	O
</s>
<s>
A	O
placeholder	O
can	O
only	O
store	O
a	O
value	O
of	O
the	O
given	O
type	O
and	O
not	O
an	O
arbitrary	O
SQL	B-Language
fragment	O
.	O
</s>
<s>
Hence	O
the	O
SQL	B-Language
injection	I-Language
would	O
simply	O
be	O
treated	O
as	O
a	O
strange	O
(	O
and	O
probably	O
invalid	O
)	O
parameter	O
value	O
.	O
</s>
<s>
In	O
many	O
cases	O
,	O
the	O
SQL	B-Language
statement	O
is	O
fixed	O
,	O
and	O
each	O
parameter	O
is	O
a	O
scalar	O
,	O
not	O
a	O
table	B-Application
.	O
</s>
<s>
Using	O
object-relational	B-General_Concept
mapping	I-General_Concept
libraries	O
avoids	O
the	O
need	O
to	O
write	O
SQL	B-Language
code	O
.	O
</s>
<s>
The	O
ORM	O
library	O
in	O
effect	O
will	O
generate	O
parameterized	O
SQL	B-Language
statements	O
from	O
object-oriented	O
code	O
.	O
</s>
<s>
A	O
popular	O
,	O
though	O
error-prone	O
,	O
way	O
to	O
prevent	O
injections	O
is	O
to	O
attempt	O
to	O
escape	O
all	O
characters	O
that	O
have	O
a	O
special	O
meaning	O
in	O
SQL	B-Language
.	O
</s>
<s>
The	O
manual	O
for	O
an	O
SQL	B-Language
DBMS	O
explains	O
which	O
characters	O
have	O
a	O
special	O
meaning	O
,	O
which	O
allows	O
creating	O
a	O
comprehensive	O
blacklist	O
of	O
characters	O
that	O
need	O
translation	O
.	O
</s>
<s>
For	O
instance	O
,	O
every	O
occurrence	O
of	O
a	O
single	O
quote	O
( 	O
 '	O
)	O
in	O
a	O
parameter	O
must	O
be	O
replaced	O
by	O
two	O
single	O
quotes	O
(''	O
)	O
to	O
form	O
a	O
valid	O
SQL	B-Language
string	B-Language
literal	I-Language
.	O
</s>
<s>
For	O
example	O
,	O
in	O
PHP	B-Application
it	O
is	O
usual	O
to	O
escape	O
parameters	O
using	O
the	O
function	O
mysqli_real_escape_string( )	O
;	O
before	O
sending	O
the	O
SQL	B-Language
query	O
:	O
</s>
<s>
This	O
function	O
is	O
normally	O
used	O
to	O
make	O
data	O
safe	O
before	O
sending	O
a	O
query	O
to	O
MySQL	B-Application
.	O
</s>
<s>
PHP	B-Application
has	O
similar	O
functions	O
for	O
other	O
database	B-Application
systems	I-Application
such	O
as	O
pg_escape_string( )	O
for	O
PostgreSQL	B-Application
.	O
</s>
<s>
The	O
function	O
addslashes(string $str )	O
works	O
for	O
escaping	O
characters	O
,	O
and	O
is	O
used	O
especially	O
for	O
querying	O
on	O
databases	B-Application
that	O
do	O
not	O
have	O
escaping	O
functions	O
in	O
PHP	B-Application
.	O
</s>
<s>
It	O
returns	O
a	O
string	O
with	O
backslashes	O
before	O
characters	O
that	O
need	O
to	O
be	O
escaped	O
in	O
database	B-Application
queries	I-Application
,	O
etc	O
.	O
</s>
<s>
Routinely	O
passing	O
escaped	O
strings	O
to	O
SQL	B-Language
is	O
error	O
prone	O
because	O
it	O
is	O
easy	O
to	O
forget	O
to	O
escape	O
a	O
given	O
string	O
.	O
</s>
<s>
Limiting	O
the	O
permissions	O
on	O
the	O
database	O
login	O
used	O
by	O
the	O
web	O
application	O
to	O
only	O
what	O
is	O
needed	O
may	O
help	O
reduce	O
the	O
effectiveness	O
of	O
any	O
SQL	B-Language
injection	I-Language
attacks	I-Language
that	O
exploit	O
any	O
bugs	O
in	O
the	O
web	O
application	O
.	O
</s>
<s>
For	O
example	O
,	O
on	O
Microsoft	B-Application
SQL	I-Application
Server	I-Application
,	O
a	O
database	O
logon	O
could	O
be	O
restricted	O
from	O
selecting	O
on	O
some	O
of	O
the	O
system	O
tables	O
which	O
would	O
limit	O
exploits	O
that	O
try	O
to	O
insert	O
JavaScript	B-Language
into	O
all	O
the	O
text	O
columns	O
in	O
the	O
database	O
.	O
</s>
<s>
In	O
February	O
2002	O
,	O
Jeremiah	O
Jacks	O
discovered	O
that	O
Guess.com	O
was	O
vulnerable	O
to	O
an	O
SQL	B-Language
injection	I-Language
attack	I-Language
,	O
permitting	O
anyone	O
able	O
to	O
construct	O
a	O
properly-crafted	O
URL	O
to	O
pull	O
down	O
200,000	O
+	O
names	O
,	O
credit	O
card	O
numbers	O
and	O
expiration	O
dates	O
in	O
the	O
site	O
's	O
customer	O
database	O
.	O
</s>
<s>
On	O
November	O
1	O
,	O
2005	O
,	O
a	O
teenaged	O
hacker	O
used	O
SQL	B-Language
injection	I-Language
to	O
break	O
into	O
the	O
site	O
of	O
a	O
Taiwanese	O
information	O
security	O
magazine	O
from	O
the	O
Tech	O
Target	O
group	O
and	O
steal	O
customers	O
 '	O
information	O
.	O
</s>
<s>
On	O
March	O
29	O
,	O
2006	O
,	O
a	O
hacker	O
discovered	O
an	O
SQL	B-Language
injection	I-Language
flaw	O
in	O
an	O
official	O
Indian	O
government	O
's	O
tourism	O
site	O
.	O
</s>
<s>
On	O
June	O
29	O
,	O
2007	O
,	O
a	O
computer	O
criminal	O
defaced	O
the	O
Microsoft	O
UK	O
website	O
using	O
SQL	B-Language
injection	I-Language
.	O
</s>
<s>
On	O
September	O
19	O
,	O
2007	O
and	O
January	O
26	O
,	O
2009	O
the	O
Turkish	O
hacker	O
group	O
"	O
m0sted	O
"	O
used	O
SQL	B-Language
injection	I-Language
to	O
exploit	O
Microsoft	O
's	O
SQL	B-Application
Server	I-Application
to	O
hack	O
web	O
servers	O
belonging	O
to	O
McAlester	O
Army	O
Ammunition	O
Plant	O
and	O
the	O
US	O
Army	O
Corps	O
of	O
Engineers	O
respectively	O
.	O
</s>
<s>
In	O
January	O
2008	O
,	O
tens	O
of	O
thousands	O
of	O
PCs	O
were	O
infected	O
by	O
an	O
automated	O
SQL	B-Language
injection	I-Language
attack	I-Language
that	O
exploited	O
a	O
vulnerability	O
in	O
application	O
code	O
that	O
uses	O
Microsoft	B-Application
SQL	I-Application
Server	I-Application
as	O
the	O
database	O
store	O
.	O
</s>
<s>
In	O
July	O
2008	O
,	O
Kaspersky	O
's	O
Malaysian	O
site	O
was	O
hacked	O
by	O
the	O
"	O
m0sted	O
"	O
hacker	O
group	O
using	O
SQL	B-Language
injection	I-Language
.	O
</s>
<s>
In	O
May	O
2008	O
,	O
a	O
server	B-Operating_System
farm	I-Operating_System
inside	O
China	O
used	O
automated	O
queries	O
to	O
Google	B-Application
's	I-Application
search	I-Application
engine	I-Application
to	O
identify	O
SQL	B-Application
server	I-Application
websites	O
which	O
were	O
vulnerable	O
to	O
the	O
attack	O
of	O
an	O
automated	O
SQL	B-Language
injection	I-Language
tool	O
.	O
</s>
<s>
In	O
2008	O
,	O
at	O
least	O
April	O
through	O
August	O
,	O
a	O
sweep	O
of	O
attacks	O
began	O
exploiting	O
the	O
SQL	B-Language
injection	I-Language
vulnerabilities	O
of	O
Microsoft	O
's	O
IIS	B-Application
web	I-Application
server	I-Application
and	O
SQL	B-Application
Server	I-Application
database	I-Application
server	I-Application
.	O
</s>
<s>
The	O
attack	O
does	O
not	O
require	O
guessing	O
the	O
name	O
of	O
a	O
table	B-Application
or	O
column	O
,	O
and	O
corrupts	O
all	O
text	O
columns	O
in	O
all	O
tables	O
in	O
a	O
single	O
request	O
.	O
</s>
<s>
A	O
HTML	O
string	O
that	O
references	O
a	O
malware	O
JavaScript	B-Language
file	O
is	O
appended	O
to	O
each	O
value	O
.	O
</s>
<s>
On	O
August	O
17	O
,	O
2009	O
,	O
the	O
United	O
States	O
Department	O
of	O
Justice	O
charged	O
an	O
American	O
citizen	O
,	O
Albert	O
Gonzalez	O
,	O
and	O
two	O
unnamed	O
Russians	O
with	O
the	O
theft	O
of	O
130	O
million	O
credit	O
card	O
numbers	O
using	O
an	O
SQL	B-Language
injection	I-Language
attack	I-Language
.	O
</s>
<s>
In	O
December	O
2009	O
,	O
an	O
attacker	O
breached	O
a	O
RockYou	O
plaintext	O
database	O
containing	O
the	O
unencrypted	O
usernames	O
and	O
passwords	O
of	O
about	O
32million	O
users	O
using	O
an	O
SQL	B-Language
injection	I-Language
attack	I-Language
.	O
</s>
<s>
In	O
July	O
2010	O
,	O
a	O
South	O
American	O
security	O
researcher	O
who	O
goes	O
by	O
the	O
handle	O
"	O
ChRusso	O
"	O
obtained	O
sensitive	O
user	O
information	O
from	O
popular	O
BitTorrent	B-Protocol
site	O
The	B-Application
Pirate	I-Application
Bay	I-Application
.	O
</s>
<s>
He	O
gained	O
access	O
to	O
the	O
site	O
's	O
administrative	O
control	O
panel	O
and	O
exploited	O
an	O
SQL	B-Language
injection	I-Language
vulnerability	O
that	O
enabled	O
him	O
to	O
collect	O
user	O
account	O
information	O
,	O
including	O
IP	B-Protocol
addresses	I-Protocol
,	O
MD5	B-Algorithm
password	B-Algorithm
hashes	I-Algorithm
and	O
records	O
of	O
which	O
torrents	B-Protocol
individual	O
users	O
have	O
uploaded	O
.	O
</s>
<s>
From	O
July	O
24	O
to	O
26	O
,	O
2010	O
,	O
attackers	O
from	O
Japan	O
and	O
China	O
used	O
an	O
SQL	B-Language
injection	I-Language
to	O
gain	O
access	O
to	O
customers	O
 '	O
credit	O
card	O
data	O
from	O
Neo	O
Beat	O
,	O
an	O
Osaka-based	O
company	O
that	O
runs	O
a	O
large	O
online	O
supermarket	O
site	O
.	O
</s>
<s>
On	O
September	O
19	O
during	O
the	O
2010	O
Swedish	O
general	O
election	O
a	O
voter	O
attempted	O
a	O
code	O
injection	O
by	O
hand	O
writing	O
SQL	B-Language
commands	O
as	O
part	O
of	O
a	O
write-in	O
vote	O
.	O
</s>
<s>
On	O
November	O
8	O
,	O
2010	O
the	O
British	O
Royal	O
Navy	O
website	O
was	O
compromised	O
by	O
a	O
Romanian	O
hacker	O
named	O
TinKode	O
using	O
SQL	B-Language
injection	I-Language
.	O
</s>
<s>
On	O
April	O
11	O
,	O
2011	O
,	O
Barracuda	O
Networks	O
was	O
compromised	O
using	O
an	O
SQL	B-Language
injection	I-Language
flaw	O
.	O
</s>
<s>
Over	O
a	O
period	O
of	O
4hours	O
on	O
April	O
27	O
,	O
2011	O
,	O
an	O
automated	O
SQL	B-Language
injection	I-Language
attack	I-Language
occurred	O
on	O
Broadband	O
Reports	O
website	O
that	O
was	O
able	O
to	O
extract	O
8%	O
of	O
the	O
username/password	O
pairs	O
:	O
8,000	O
random	O
accounts	O
of	O
the	O
9,000	O
active	O
and	O
90,000	O
old	O
or	O
inactive	O
accounts	O
.	O
</s>
<s>
On	O
June	O
1	O
,	O
2011	O
,	O
"	O
hacktivists	O
"	O
of	O
the	O
group	O
LulzSec	O
were	O
accused	O
of	O
using	O
SQLI	B-Language
to	O
steal	O
coupons	O
,	O
download	O
keys	O
,	O
and	O
passwords	O
that	O
were	O
stored	O
in	O
plaintext	O
on	O
Sony	O
's	O
website	O
,	O
accessing	O
the	O
personal	O
information	O
of	O
a	O
million	O
users	O
.	O
</s>
<s>
In	O
June	O
2011	O
,	O
PBS	O
was	O
hacked	O
by	O
LulzSec	O
,	O
most	O
likely	O
through	O
use	O
of	O
SQL	B-Language
injection	I-Language
;	O
the	O
full	O
process	O
used	O
by	O
hackers	O
to	O
execute	O
SQL	B-Language
injections	I-Language
was	O
described	O
in	O
this	O
blog	O
.	O
</s>
<s>
In	O
May	O
2012	O
,	O
the	O
website	O
for	O
Wurm	B-Protocol
Online	I-Protocol
,	O
a	O
massively	B-Application
multiplayer	I-Application
online	I-Application
game	I-Application
,	O
was	O
shut	O
down	O
from	O
an	O
SQL	B-Language
injection	I-Language
while	O
the	O
site	O
was	O
being	O
updated	O
.	O
</s>
<s>
In	O
July	O
2012	O
a	O
hacker	O
group	O
was	O
reported	O
to	O
have	O
stolen	O
450,000	O
login	O
credentials	O
from	O
Yahoo	B-Application
!	I-Application
.	O
</s>
<s>
The	O
logins	O
were	O
stored	O
in	O
plain	O
text	O
and	O
were	O
allegedly	O
taken	O
from	O
a	O
Yahoo	B-Application
subdomain	B-Protocol
,	O
Yahoo	B-Application
!	I-Application
</s>
<s>
The	O
group	O
breached	O
Yahoo	B-Application
's	O
security	O
by	O
using	O
a	O
"	O
union-based	O
SQL	B-Language
injection	I-Language
technique	O
"	O
.	O
</s>
<s>
In	O
February	O
2013	O
,	O
a	O
group	O
of	O
Maldivian	O
hackers	O
,	O
hacked	O
the	O
website	O
"	O
UN-Maldives	O
"	O
using	O
SQL	B-Language
Injection	I-Language
.	O
</s>
<s>
On	O
June	O
27	O
,	O
2013	O
,	O
hacker	O
group	O
"	O
RedHack	B-Operating_System
"	O
breached	O
Istanbul	O
Administration	O
Site	O
.	O
</s>
<s>
On	O
November	O
4	O
,	O
2013	O
,	O
hacktivist	O
group	O
"	O
RaptorSwag	O
"	O
allegedly	O
compromised	O
71	O
Chinese	O
government	O
databases	B-Application
using	O
an	O
SQL	B-Language
injection	I-Language
attack	I-Language
on	O
the	O
Chinese	O
Chamber	O
of	O
International	O
Commerce	O
.	O
</s>
<s>
On	O
March	O
7	O
,	O
2014	O
,	O
officials	O
at	O
Johns	O
Hopkins	O
University	O
publicly	O
announced	O
that	O
their	O
Biomedical	O
Engineering	O
Servers	O
had	O
become	O
victim	O
to	O
an	O
SQL	B-Language
injection	I-Language
attack	I-Language
carried	O
out	O
by	O
an	O
Anonymous	O
hacker	O
named	O
"	O
Hooky	O
"	O
and	O
aligned	O
with	O
hacktivist	O
group	O
"	O
RaptorSwag	O
"	O
.	O
</s>
<s>
In	O
August	O
2014	O
,	O
Milwaukee-based	O
computer	O
security	O
company	O
Hold	O
Security	O
disclosed	O
that	O
it	O
uncovered	O
a	O
theft	O
of	O
confidential	O
information	O
from	O
nearly	O
420,000	O
websites	O
through	O
SQL	B-Language
injections	I-Language
.	O
</s>
<s>
In	O
October	O
2015	O
,	O
an	O
SQL	B-Language
injection	I-Language
attack	I-Language
was	O
used	O
to	O
steal	O
the	O
personal	O
details	O
of	O
156,959	O
customers	O
from	O
British	O
telecommunications	O
company	O
TalkTalk	O
's	O
servers	O
,	O
exploiting	O
a	O
vulnerability	O
in	O
a	O
legacy	O
web	O
portal	O
.	O
</s>
<s>
In	O
August	O
2020	O
,	O
an	O
SQL	B-Language
injection	I-Language
attack	I-Language
was	O
used	O
to	O
access	O
information	O
on	O
the	O
romantic	O
interests	O
of	O
many	O
Stanford	O
students	O
,	O
as	O
a	O
result	O
of	O
insecure	O
data	O
sanitization	O
standards	O
on	O
the	O
part	O
of	O
Link	O
,	O
a	O
start-up	O
founded	O
on	O
campus	O
by	O
undergraduate	O
Ishan	O
Gandhi	O
.	O
</s>
<s>
In	O
early	O
2021	O
,	O
70	O
gigabytes	O
of	O
data	O
was	O
exfiltrated	O
from	O
the	O
far-right	O
website	O
Gab	O
through	O
a	O
SQL	B-Language
injection	I-Language
attack	I-Language
.	O
</s>
<s>
A	O
2007	O
xkcd	O
cartoon	O
involved	O
a	O
character	O
Robert	O
 '	O
)	O
;	O
DROP	O
TABLE	B-Application
Students	O
;	O
--	O
named	O
to	O
carry	O
out	O
an	O
SQL	B-Language
injection	I-Language
.	O
</s>
<s>
As	O
a	O
result	O
of	O
this	O
cartoon	O
,	O
SQL	B-Language
injection	I-Language
is	O
sometimes	O
informally	O
referred	O
to	O
as	O
"	O
Bobby	O
Tables	O
"	O
.	O
</s>
<s>
Unauthorized	O
login	O
to	O
websites	O
by	O
means	O
of	O
SQL	B-Language
injection	I-Language
forms	O
the	O
basis	O
of	O
one	O
of	O
the	O
subplots	O
in	O
J.K.	O
Rowling	O
's	O
2012	O
novel	O
The	O
Casual	O
Vacancy	O
.	O
</s>
<s>
In	O
2014	O
,	O
an	O
individual	O
in	O
Poland	O
legally	O
renamed	O
his	O
business	O
to	O
Dariusz	O
Jakubowski	O
x	O
 '	O
;	O
DROP	O
TABLE	B-Application
users	O
;	O
SELECT	O
'	O
1	O
in	O
an	O
attempt	O
to	O
disrupt	O
operation	O
of	O
spammers	O
 '	O
harvesting	B-Application
bots	I-Application
.	O
</s>
<s>
The	O
2015	O
game	O
Hacknet	B-Application
has	O
a	O
hacking	O
program	O
called	O
SQL_MemCorrupt	O
.	O
</s>
<s>
It	O
is	O
described	O
as	O
injecting	O
a	O
table	B-Application
entry	O
that	O
causes	O
a	O
corruption	O
error	O
in	O
an	O
SQL	B-Language
database	I-Language
,	O
then	O
queries	O
said	O
table	B-Application
,	O
causing	O
an	O
SQL	B-Language
database	I-Language
crash	O
and	O
core	O
dump	O
.	O
</s>
