473,661 Members | 2,522 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL Injection Attack Discussion

1,287 Recognized Expert Top Contributor
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 deleted.
See SQL Injection Attack.

Admin Edit.
This discussion was split off from the original thread, which can be found at Force .DefaultValue to be a string.
Jun 4 '09 #1
16 4425
NeoPa
32,568 Recognized Expert Moderator MVP
I see you're developing mind-reading abilities too now Chip.

I was thinking about bringing that into the thread. Now you've found the link I will add it to my frequently used list. This is certainly something that bears repeating.
Jun 4 '09 #2
FishVal
2,653 Recognized Expert Specialist
@ChipR
Did anybody perform it successfully in Access?
Jun 4 '09 #3
NeoPa
32,568 Recognized Expert Moderator MVP
@FishVal
Are you asking if it's possible to hack into an Access database, or whether anyone has managed to protect an Access database using the techniques suggested?

PS. I will move this to a new thread to avoid swamping the original with this (quite important) discussion.
Jun 4 '09 #4
NeoPa
32,568 Recognized Expert Moderator MVP
@FishVal
I've done some checking (assuming you're asking if it's possible to hack in that way) and it appears that Access's syntax checking seems to block any attempts I try, but remember this is most often used via a web interface. In that case (using an Access database simply as a Back-End, it is very likely possible as the syntax checking would not be active.
Jun 4 '09 #5
FishVal
2,653 Recognized Expert Specialist
I have a strong feeling that Access back-end cannot execute multiple SQL commands.

P.S. Human beings has many problem that other animals don't have, but at least tail curvature by no means threatens us. :D
Jun 4 '09 #6
NeoPa
32,568 Recognized Expert Moderator MVP
@FishVal
It wouldn't need to necessarily (although you may well be right).

If some Access SQL were looking for a matching name in an authority table with :
Expand|Select|Wrap|Line Numbers
  1. SELECT 9 AS [AuthLevel]
  2. FROM [tblSecurity]
  3. WHERE [Password]='%ValueHere%'
Assume now that the value entered (to replace %ValueHere%) were :
Expand|Select|Wrap|Line Numbers
  1. ' OR 'A'='A
The real life code would be a little more complicated, but this illustrates the point succinctly I feel.
Jun 4 '09 #7
NeoPa
32,568 Recognized Expert Moderator MVP
@FishVal
At the time humans were losing their tails into those vestigial stubs we now have, do you think they weren't worried?!!?
Jun 4 '09 #8
NeoPa
32,568 Recognized Expert Moderator MVP
OK. I managed to break into a very basic system.

Assume a table :
Table=[tblSecurity]
Expand|Select|Wrap|Line Numbers
  1. AuthID    AutoNumber  (PK)
  2. AuthName  Text        (Account name)
  3. AuthPW    Text        (password)
  4. AuthCode  Numeric     (payload)
Data is as follows :
Expand|Select|Wrap|Line Numbers
  1. AuthID  AuthName  AuthPW  AuthCode
  2.   1     NeoPa     Ooops     90
  3.   2     Admin     Secret    99
  4.   3     Other     LowLevel   1
Next I ran some code in the immediate window to simulate checking a name and password passed via InputBox() :
Expand|Select|Wrap|Line Numbers
  1. strN=InputBox("Enter Name:") : _
  2. strP=InputBox("Enter PW:") : _
  3. ?DLookup("[AuthCode]", _
  4.          "[tblSecurity]", _
  5.          "[AuthName]='" & strN & "' AND " & _
  6.          "[AuthPW]='" & strP & "'")
The data I entered for strN & strP were as follows :
Expand|Select|Wrap|Line Numbers
  1. Admin
  2. ' OR 'A'='A
The result, of course, was 99. A full break-in at the highest authority level.
Jun 4 '09 #9
FishVal
2,653 Recognized Expert Specialist
At the time humans were losing their tails into those vestigial stubs we now have, do you think they weren't worried?!!?
Doctors say - there is much stuff in human body which could and should be cut out. Medical purveyed humor ... I hope.
Jun 4 '09 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

6
1306
by: Sati | last post by:
Hi All, Does anyone know how to clean a asp application from a virus that converts labels with the word 'Insurance' into link button to a web page. It also injects text in the textbox when the textbox.text has any reference to this 'insurance' word. I am using custom controls on custom page. This injection seems to be occurring after the pre-render event.
1
1495
by: sati | last post by:
Thanks.. Since my last post, I have identified a few more facts on this case. This code injection occurs in the client browser. The Web server seems to be sending correct page. So far, I have identified just one user machine that seems to be infected. Even in the client machine, if we look at the html source code, this injection code does not exist. If this is true than I have no way of knowing how the page is getting
5
2337
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!
4
2188
by: ss | last post by:
hi, can anybody gives me a sample code where the sql injection attack is validated. how can i do that in business logic layer and pass the error to the presentation tier I want the sample code
2
10682
sashi
by: sashi | last post by:
hi everyone, Below is a simple function that will give you some protection against an SQL Injection attempt. what is SQL injection? SQL injection is a security vulnerability that occurs in the database layer of an application. Its source is the incorrect escaping of variables embedded in SQL statements. It is in fact an instance of a more general class of vulnerabilities that can occur whenever one programming or scripting language is...
1
2886
by: Doug | last post by:
Hi, I have a question on sql injection attacks. I am building a tool that will be used exclusively by our other developers and will generate stored procs for them dynamically based off input from them. I wanted to add a "parser" functionality where based off the table and where clause they choose, the app will parse the query to see if it's valid. So I'm building a query something like this to run:
29
2104
by: sinbuzz | last post by:
Hi, I'm curious about the best way to avoid SQL Injection attacks against my web server. Currently I'm on IIS. I might be willing to switch to something like Apache but I'm not sure if SQL Injection is is a generic enough of an attack to cause me worries once I make the
16
2233
by: shank | last post by:
- - - - - - - - - IIS Log File Entry - - - - - - - - - - - - - - - - GET /sresult.asp title=(Your%20Love%20Keeps%20Lifting%20Me)%20Higher%20And%20Higher&artist=Michael%20McDonald&type=%25&category=%25&column=t_asc%3Cscript%20src= http://www.advabnr.com/b.js%3E%3C/script%3E 80 - 76.16.112.66 HTTP/1.1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - My table was evidently hit with SQL Injection. I searched the IIS logs...
2
11178
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 organised into tables, which contain records/rows of fields. A field contains the actual data used by the program. Relational Database Management Systems (RDBMS or sometimes just DBMS) allow users the ability to access and manipulate data within...
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8855
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8758
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8545
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7364
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.