background image

Configuring Your Target Machines

273

That takes care of the entire configuration required on the SQL backend 

for the web application. Save and exit Management Studio.

All that remains is to create the website to interact with the database you 

created. Let’s do that now:

1.

Download the vulnerable web application from 

http://www.nostarch.com/

metasploit.htm 

and extract the contents of the archive to 

C:\Inetpub\wwwroot\.

2.

Open your browser and point to 

http://<youripaddress>/Default.aspx

. You 

should see a log-in form, as shown in Figure A-5.

3.

Enter bogus credentials to verify that the SQL query is being executed 
properly. To test some basic SQL injection to identify whether the web 
application is functioning properly, enter a single quote (

'

) in the user-

name field, and enter anything as the password (doesn’t matter). The 
application should produce a yellow page with a SQL-related error.

4.

Click the back arrow on your browser and enter 

OR 1=1--

 and something 

(doesn’t matter) in the password field. You should see a “You have success-
fully logged on” message.

If you have gotten this far, everything is set up properly, and you are 

ready to plunge in.

Figure A-5: Sample attack website

Updating Back|Track

As with any operating system, make sure you’re running the latest version of 
Back|Track and its tools. When logging into Back|Track (

root

/

toor

), issue the 

following commands:

root@bt:~# 

apt-get update && apt-get upgrade && apt-get dist-upgrade