1 / 3

A Web Application Example

A Web Application Example. SQL Injection!. <%@ LANGUAGE="VBSCRIPT" %> <% Dim oCONv, oRSu Set oCONv = Server.CreateObject("ADODB.Connection") oCONv.Open "DRIVER={SQLServer};SERVER=aeneas;UID=sa;PWD=;DATABASE=paper"

gili
Télécharger la présentation

A Web Application Example

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Web Application Example

  2. SQL Injection! <%@ LANGUAGE="VBSCRIPT" %> <% Dim oCONv, oRSu Set oCONv = Server.CreateObject("ADODB.Connection") oCONv.Open "DRIVER={SQLServer};SERVER=aeneas;UID=sa;PWD=;DATABASE=paper" Set oRSu = oCONv.Execute("SELECT * FROM tblUsers WHERE username = '" & Request.Querystring("UserID") & "' AND password = '" & Request.Querystring("Password") & "'") if not oRSu.EOF then Session("UserID") = oRSu ("username") Response.Redirect "loginsucceeded.asp" else Response.Redirect "loginfailed.asp" end if %>

  3. SELECT * FROM tblUsers WHERE username = 'foo' AND password = 'bar' http://server/login.asp?userid='%20or%201=1-- SELECT * FROM tblUsers WHERE username = '' or 1=1--

More Related