See which of your colleagues or former colleagues are already on Testing Link: Check out the Contact Finder
Testing Skills » Database Testing » What Is Script Injection ? how we test Script Injections ?

729 Views
  2 Replies

0
Vote Vote
What Is Script Injection ? how we test Script Injections ?
Panna Lal
Panna Lal Picture
3 Posts
back to top
Posted 08-10-2009Reply

What Is Script Injection ? how we test Script Injections ?

Poornima
Poornima Picture
2 Posts
back to top
  Rated 0 | Posted 23-11-2009

SQL Injection is a security exploit in which the attacker injects specially crafted query through a web form input box to gain access into database
Programmers use sequential commands in their program making it easier for attacker to inject code while taking user input

Example see the below code,

var Shipcity;
ShipCity = Request.form ("ShipCity");
var sql = "select * from OrdersTable where ShipCity = '" + ShipCity + "'";

The user is prompted to enter the name of a city. If user enters Bangalore, the query assembled by the script looks similar to the following:
SELECT * FROM OrdersTable WHERE ShipCity = ‘Bangalore'

However, assume that the user enters the following:

Bangalore'; drop table OrdersTable–
In this case, the following query is assembled by the script:

SELECT * FROM OrdersTable WHERE ShipCity = ‘Bangalore';drop table OrdersTable--'

When SQL Server processes this statement, SQL Server will first select all records in OrdersTable where ShipCity is Bangalore. Then, SQL Server will drop OrdersTable.

SQL Injection - Safety measures

The fields which take input from the user are enclosed by a single quote (‘)
To test, enter (‘) as user name. If the following error message is displayed then the website is vulnerable to SQL Injection attack,

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft] [ODBC Microsoft Access Driver] Extra)
in query expression 'Userid='3306' or ('a'='a' AND Password=".

/_booking/login3.asp, line 49



Following to be considered when doing Database Testing,

1. Disabling verbose errors
2. Never trust user inputs. Always validate user input by testing type, length, format, and range
3. Not connecting to database using an admin level account








Seglob111
Seglob111 Picture
2 Posts
back to top
  Rated 0 | Posted 28-09-2010

script injection like sql injection and asp, php injection. it searches the vulnerability of database. it used for vulnerability assessment.it also help in penetration testing. there lots of tools are there where you can find such kind of injection. tools like acuntix, sql scaner, retina etc

------------------------------------------------------------------------------------------------
Earn an Extra $1000 to $1200 per month doing Part Time Data Entry Jobs! Work from home data entry jobs to post simple data submissions on Internet. Make $1 per entry. Easy form filling, data entry and ad posting jobs. No selling, No phone calls, No Marketing. No Investment. Bi-weekly payments. Full Training Provided. Pls visit: [url=http://www.dataentrywork.net/?id=26201] Data-Entry [/url]

0
Vote Vote

Recent Activity in Forums