Anatomy of a SQL Injection Attack

Bear with me on this one. Most web­sites (like this one) these days rely on a data­base to hold infor­ma­tion and gen­er­ate the pages you see in your browser on the fly when you request them. All of the pop­u­lar data­bases in use accept com­mands in a com­puter lan­guage called SQL. A post­ing like the one you are read­ing is basi­cally a line or two of SQL that reads the words out of a data­base and con­verts them into HTML for your browser to dis­play. When some­one uses a SQL injec­tion to attack a site they basi­cally add SQL state­ments to URLs or fill them into form fields. If the site doesn’t check URLs for cor­rect for­mat or doesn’t closely eval­u­ate what peo­ple type into text boxes that SQL code can be sent directly to the data­base. The code could then write infor­ma­tion to the data­base or read infor­ma­tion out of it, infor­ma­tion you don’t want any­one to know about like credit card num­bers. Recently Rafal Los, an HP secu­rity spe­cial­ist, was test­ing a site for vul­ner­a­bil­ity to SQL injec­tions and in the process dis­cov­ered the site had already been suc­cess­fully attacked. The site was send­ing a Tro­jan to every vis­i­tor, totally with­out the knowl­edge of the owners.

Creative Commons License
This work, unless oth­er­wise expressly stated, is licensed under a Cre­ative Com­mons Attribution-Share Alike 3.0 United States License.
This entry was posted in Security and tagged , , , . Bookmark the permalink.

Comments are closed.