473,232 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,232 software developers and data experts.

SQL attack via IIS?

I am seeing log entries that have SQL statements embedded in the actual
forms.
Jul 19 '05 #1
2 1216
It is a old hack... E.g.

Let us say you have a "dynamic SQL" which goes something like

formID = Request.Form("ID")
sSQL = "SELECT * from myTable WHERE Id=" & formID

conn.Execute(sSQL)

Just imagine someone enters this: "5; DELETE FROM myTable"

the final SQL will be

SELECT * from myTable WHERE Id=5; DELETE FROM myTable

which is a valid SQL statement. The user should still need to know the table
names, but it is possible that the hacker might be able to delete system
tables.

To get around this, use stored procedures when possible, with parameters. At
the least, validate the input. Hope that helps.

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"Kevin Hill" <no****@nospam.com> wrote in message
news:IFmKb.28029$i55.13481@fed1read06...
I am seeing log entries that have SQL statements embedded in the actual
forms.

Jul 19 '05 #2
-----Original Message-----
It is a old hack... E.g.

Let us say you have a "dynamic SQL" which goes something like
formID = Request.Form("ID")
sSQL = "SELECT * from myTable WHERE Id=" & formID

conn.Execute(sSQL)

Just imagine someone enters this: "5; DELETE FROM myTable"

the final SQL will be

SELECT * from myTable WHERE Id=5; DELETE FROM myTable

which is a valid SQL statement. The user should still need to know the tablenames, but it is possible that the hacker might be able to delete systemtables.

To get around this, use stored procedures when possible, with parameters. Atthe least, validate the input. Hope that helps.

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"Kevin Hill" <no****@nospam.com> wrote in message
news:IFmKb.28029$i55.13481@fed1read06...
I am seeing log entries that have SQL statements embedded in the actual forms.

.


Check this link out
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=23

Mike
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: opt_inf_env | last post by:
Hello, I have started to study sessions and as I understood it works in the following way: Let us consider two files first.php and second.php. By clicking on a link in the file first.php user...
5
by: TCORDON | last post by:
What is the best way to protect a site against it? Does anyone have a RegEx to help validate user input? TIA!
9
by: HK | last post by:
My website emails me when it raises an exception. I'm getting about 10 emails per day that look similar to this, but in each, the IP address and port, and the email-looking stuff, are different. ...
0
by: candra | last post by:
Learn What Hackers Know? -General Hacking Information -Password Security -Scanning, Fingerprinting And Similar Techniques -How Hackers Attack Numerous Internet Services -How Hackers Attack Web...
6
by: K. | last post by:
Hello all! Can you write me some code which let me sleep calm during the night and what should I do to prevent some attackers from using curl function? In Poland there is a big portal which...
4
by: PI | last post by:
Hi, I was just wondering if anybody has noticed that some pages on the php manual site seem to be odd: sites such as http://uk3.php.net/manual/en/function.next.php...
4
by: sakthikumarb | last post by:
Hi, There is any wmi event for deniel of service attack.if not,there is any other procedure to get a event for Denial of Service attack . Thanks in advance, Regards, Sakthi
2
Frinavale
by: Frinavale | last post by:
SQL Injection Attack A database is a collection of information organised in such a way that allows computer programs to access data (even large amounts) quickly and easily. Data within a database is...
16
by: ChipR | last post by:
Since we're talking about filters, make sure you also use a filter for semicolons (at the minimum) on any input that is going directly into an SQL statement to prevent your entire database from being...
15
by: learner247 | last post by:
Hi, I am learning csharp and have a question: My question is about handling a receiving socket. I use the backgroundworker class for multithreading. In the doWork event there is a while...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.