How to use SQLMap on Windows for finding SQL Injection flaws on your website

How to use SQLMap on Windows for finding SQL Injection flaws on your website . . .


As a (sort-of-mediocre) web developer, I find security of the site as #1 priority. However with limited knowledge on the subject, it was near-impossible to look for any sort of  security flaw without scrolling through forums for days.
After hours of googling, I discovered an excellent tool to automatically uncover SQL injection exploits in my website without the requirement of intricate SQL knowledge.
sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester and a broad range of switches lasting from database fingerprinting, over data fetching from the database, to accessing the underlying file system and executing commands on the operating system via out-of-band connections
SQLMap is coded in Python programming language and runs natively in Linux operating system, however it should run as nice on Windows machines , however we first need to download and install the Python libraries to the machine for it to run.
Anyway, back to your site, one thing you will need to find are URL’s like this http://yoursite.com/users/user.php?id=3 or http://yoursite.com/gallery/albums.php?aid=532
These parameters (in red) query the database, and if not coded/sanitized correctly, can be vulnerable to sql injection. Users can basically access your database and do things such as access passwords, emails, names etc.
So you’ve found your URL on your site as shown above? Lets see if it is vulnerable to sql injections…..
Step 1 – Download & Install Python 2.7.5
Python 2.7 installed on your Windows machine.
Ensure that version 2.7.5 is installed which can be downloaded from here - http://www.python.org/download/
Choose either the normal Windows installer, or the Windows x86-64 installer.
Run through the install accepting the defaults. If all went well, then all of the Python files should be installed to C:\Python27\
Step 2 – Download SQLMap
SQLMap downloaded on your Windows machine
The latest and greatest version is available on the SQLMap home page – click here - https://github.com/sqlmapproject/sqlmap/zipball/master or here http://sqlmap.org/ (and click download .zip on the left!)
Unzip the .zip and put the folder into the C:\ drive (just for ease of access). The folder may be named something like “sqlmapproject-sqlmap-dbb0d7f” so rename this to something like “sqlmap“. For the purpose of this guide, I will be renaming this folder to “sqlmap“.
Step 3 – Run Command Prompt as Administrator
You can do this multiple ways, but just to explain in a way that everyone can easily do, go to Start > All Programs > Accessories and you will see the Command Prompt icon. BUT WAIT! Don’t just click it!
Ensure that you right-click on the Command Prompt icon and Run As Administrator. Normally, command prompt is set with restrictions meaning certain system tools will not run, so running as administrator enables command prompt to have full access to the system.
Step 4 – Run SQLMap
With the above prerequisites completed, we can now start.
- In the command prompt window, CD into the directory where SQLMap is contained
1
- Type in the following: python sqlmap.py -u “http://yoursite.com/users/users.php?id=3 (replace the red with what you have!)
2
- Hit enter and it will start scanning. If you find that you encounter something like this (in grey) then your site IS vulnerable to SQL injections. Uh-oh!
4
- Let SQLMap run through and at the end it will dump all the necessary information into a files (readable in notepad) in the directory where it resides (for example C:\sqlmap\output\yoursite\).
Below are what I got from the above test:
sqlmap identified the following injection points with a total of 63 HTTP(s) requests:

Place: GET
Parameter: id
Type: boolean-based blind
Title: AND boolean-based blind – WHERE or HAVING clause
Payload: id=8 AND 6220=6220
Type: UNION query
Title: MySQL UNION query (NULL) – 17 columns
Payload: id=-6714 UNION ALL SELECT NULL,NULL,CONCAT(0×7178667171,0x73486f79746764616f74,0x717a666671),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL#

web application technology: PHP 5.3.19, Apache 2.2.23
back-end DBMS: MySQL >= 5.0.0
Now, if you’re using a wordpress plugin, disable it and remove it immediately as your site can be easily found using google dorks. Notify the author / developer asap!.

47 comments


I Like What You Guys Judi Bola Are Up Also. Such Intelligent Work And Reporting!
Judi Bola Carry On The Excellent Works Guys I Have Incorporated You Guys To My Blogroll. I Think It Will Improve The Value Of My Website :) Judi Bola

Reply


I Do Not Even Know How Judi Bola I Ended Up Here,
Judi Bola But I Thought This Post Was Good. I Do Not Know Who You Are But Definitely You Are Going To A Famous Blogger If You Are Not Already ;)Judi Bola Cheers!

Reply

Christmas is celebrated as Birthday of Jesus. We know that
Happy Christmas 2015 is just few days away. We have provided Happy Christmas 2015 Images , Happy Christmas 2015 HD Images and Happy Christmas 2015 Photos on our website. But religious people love to share Happy Christmas 2015 Photos and Happy Christmas 2015 sayings. Everyone does not have high speed internet. So we have also provided Happy Christmas 2015 SMS
and Happy Christmas 2015 Messages. You can send these to everyone. Here is complete collection of Happy Christmas 2015 wallpapers and Happy Christmas 2015 hd wallpapers.You can send it to your loved once. People who use online wishes, they can send Merry Christmas 2015 e-cards .

Reply

Happy New Year 2016 is just few days away. People are going to celebrate
new year's eve 2016 using diffrent ways. We have provided you with Happy New Year 2016 Wishes and Happy New Year 2016 Quotes. You can also download Happy New Year 2016 Images on our site. Don't forget to share Happy New Year 2016 SMS.

Reply

We can play with the color of the blouse and adapt it to the style and workplace of each person. We cannot say the
mirror image replica designer handbags is complete the same Avcılar Halı Temizleme
as the authentic designer handbags, the high
quality mirror image replica handbags can be
more than 98 similarity or more,since we pay great attention to the quality, sell
and manufacture only the high quality replica handbags. Beylikdüzü Demirdöküm Servisi
The trademark logo plate is prominently displayed on the
front of the Prada bags are adored and loved A-list celebrities the likes of Victoria Beckham
and Kate Beckinsale. Avcılar Halı Temizleme

Also visit my homepage: Arnavutköy Demirdöküm Servisi

Reply

Our website has provided you with Happy Birthday Images for free download. You can also use these Happy Birthday Wishes to wish your friends in diffrent way. We have shared some Best Birthday Wishes Quotes so that youcan share it with your friends. You can also get some time to share Happy Birthday Messages of our site. If you get some time, dont forget to see Happy Birthday Cards and Funny Birthday Wishes For Friend . You can also check Engineer Spotted .

Reply

Tour de Francia 2016 is a good website. You can also check Engineer Spotted . Independence Day USA is one of the greatest event in history. We have provided 4th of july info on our website for free. You can find facts about Fourth of july and also known as You can also get Happy Fourth of july . Apart from this, you can get Independence Day 2016 Images and Happy Independence Day 2016 Pictures . You can also get info about 4th of July fireworks , 4th of July Parade and 4th of July Celebrations. You can get info about Wimbledon 2016 Schedule , Wimbledon 2016 TV Schedule , Wimbledon 2016 Results and Wimbledon 2016 Winners . You can get info about Eid Mubarak 2016 Wallpapers.You can get info about Eid Mubarak 2016 Wallpapers. This is the main page of Eid Ul Adha 2016 and Eid al Adha 2016 .Check these Eid Mubarak 2016 Greetings and Eid ul Adha Greetings.

Reply

Thanks a lot for sharing this great article. Want to know about the new member of the samsung note family,then just have a look at Galaxy Note 7

Reply

us open tennis 2016 is one of the biggest event of the us history.
You can find us open tennis results on our website for free.
us open 2016 will start soon at the eng od august month.
Rio Olympics 2016 Mascots are great way to express feelings towards game lovers.
You can easily find Rio Olympics 2016 Schedule on our website.
You can also find Happy Birthday wishes.
You can find Premier League information on our site.
You can also find Premier League TableB
I know you cant wait to see the us open tennis schedule.

Reply

Feel free to check out the Yom Kippur 2016 information on our site as well as day of atonement

You can also find out homemade halloween costumes ideas, homemade halloween costumes as well as halloween costumes ideas .

Reply

Feel free to grab the new year 2017 as well as new year 2017 wishes from our website

Apart from this, you can also share the happy new year 2017 images and happy new year images with your friends.

some poeple love to celebrate the happy new year 2017 on the eve of happy new year

Dont forget to share these merry christmas images and happy merry christmas images on you facebook and other sites.

Grab these happy merry christmas wishes for free of cost. Friends share merry christmas wishes with each other. come on our site and enjoy it

Reply

Post a Comment