SQL injection with Havij : Step by step guide - Hackercool Magazine (2024)

Posted on August 23, 2013August 5, 2023 by kanishka10 20 Comments

NOTE : This is strictly for educative purposes.

Havij is an automated SQL injection tool. To say in the own words of its creators,

” Havij is an automated SQL Injection tool that helps penetration testers to find and exploit SQL Injection vulnerabilities on a web page.It can take advantage of a vulnerable web application. By using this software, user can perform back-end database fingerprinting, retrieve DBMS login names and password hashes, dump tables and columns, fetch data from the database, execute SQL statements against the server, and even access the underlying file system and execute operating system shell commands.“

It is available both in free and commercial versions. Today we are going to see how to dump the contents of a database using Havij. For this I am going to use the free version. First download Havij from here and install it. Then open it and enter the vulnerable page url in the target column ( for this tut I am using my own vulnerable webpage ).

SQL injection with Havij : Step by step guide - Hackercool Magazine (1)

Set the database option to ‘auto detect‘ and hit analyze. This should show you the current database name as shown below.

SQL injection with Havij : Step by step guide - Hackercool Magazine (2)

Click on the “info” tab. This will show you information about the victim’s system. We can see information like Host IP address, web server version etc.

SQL injection with Havij : Step by step guide - Hackercool Magazine (3)

Click on the “Tables” tab.

SQL injection with Havij : Step by step guide - Hackercool Magazine (4)

Click on “Get DBs” option. This will list all the databases as shown below.

SQL injection with Havij : Step by step guide - Hackercool Magazine (5)

To get tables in a specific database, select the database and click on Get Tables”. This will list all the tables present in the selected database. I selected database “shunya”here.

SQL injection with Havij : Step by step guide - Hackercool Magazine (6)

We can see that there is on table ‘users’ in our database ‘shunya’ .To get columns , select the table ‘ users’ and click on “Get Columns”.

SQL injection with Havij : Step by step guide - Hackercool Magazine (7)

This will list all the columns in the table. We can see that we have five columns in the table ‘users’.all the columns. It’s time to dump the values of columns. Select the columns whose data we want to dump and click on Get data”. Here I selected all the columns.

SQL injection with Havij : Step by step guide - Hackercool Magazine (8)

We got all the data including usernames and passwords. But passwords seem to be encrypted. No problem. Click on the password hashes and copy them. Then click on MD5″ tab and paste the password. Click on “Start”. Havij automatically decrypts the password for us. Decrypt all passwords in the similar manner.

SQL injection with Havij : Step by step guide - Hackercool Magazine (9)

Click on “Find admin”. This option finds the adminpage of the website automatically. When it finds the admin page, you can try the username and passwords to get access to the website. Hope this was helpful.

SQL injection with Havij : Step by step guide - Hackercool Magazine (10)

Follow Us

  1. August 30, 2013

    Nice Effort
    But I would say it is better to do it manually
    so that you know what is happening behind

  2. August 30, 2013

    I totally agree with your opinion, my friend.

  3. SQL injection with Havij : Step by step guide - Hackercool Magazine (17)kayle

    August 4, 2016

    please i need a real site to download the HAVIJ SQL INJECTOR that is password free

    1. SQL injection with Havij : Step by step guide - Hackercool Magazine (18)kanishka10

      August 6, 2016

      @kayle, a link is provided in the forums for this.

  4. SQL injection with Havij : Step by step guide - Hackercool Magazine (19)kayle kayler

    August 6, 2016

    the site here is not working with my windows10 and others i got via google research all are encrypted and with passwords and without loader in the software……

    1. SQL injection with Havij : Step by step guide - Hackercool Magazine (20)kanishka10

      August 9, 2016

      @kayle kayler, the alternative download link for the tool is provided in the forums section of this website.

  5. SQL injection with Havij : Step by step guide - Hackercool Magazine (21)kayle kayler

    August 9, 2016

    the address i saw there was not helpful, pls i need an address that will help me get the file downloaded pls

  6. SQL injection with Havij : Step by step guide - Hackercool Magazine (22)kanishka10

    August 10, 2016

    @Mahesh, this tool doesn’t depend on the language used by the website. Maybe the site isn’t vulnerable.

  7. SQL injection with Havij : Step by step guide - Hackercool Magazine (23)charles

    September 24, 2016

    thnx for the step by step guide and havij
    searched everywhere for it finally got it

    1. SQL injection with Havij : Step by step guide - Hackercool Magazine (24)kanishka10

      September 24, 2016

      @Charles, Happy it helped you

    2. SQL injection with Havij : Step by step guide - Hackercool Magazine (25)Yoosuph

      November 8, 2016

      hello Charles
      i also have problems finding the setup. can u please upload and share the link.
      my email is [emailprotected].

      thanks

  8. SQL injection with Havij : Step by step guide - Hackercool Magazine (26)rhohit

    September 24, 2016

    i found database as well as tables but as i try to get columns nothing happens.Help

    1. SQL injection with Havij : Step by step guide - Hackercool Magazine (27)kanishka10

      January 7, 2017

      rRohit, Did you try a different table?

  9. SQL injection with Havij : Step by step guide - Hackercool Magazine (28)Rgccevo

    November 28, 2016

    I found a few vulnerble sites.. ik can see the database.. when i click get tables i can see the tables, but when i select a few boxes and click “get colums” not hing is happening. On al sites i try i have this problem.. whats the reisonderdelen bevind this?

    1. SQL injection with Havij : Step by step guide - Hackercool Magazine (29)kanishka10

      January 23, 2017

      @Rgccevo, I hope you have prior permission to test these sites. Coming to your problem, first make sure that table has some columns. If that tsble has columns, what actually is the program saying.

  10. SQL injection with Havij : Step by step guide - Hackercool Magazine (30)Viruz

    July 10, 2017

    Will i be arrested if I hack website using havij

    1. SQL injection with Havij : Step by step guide - Hackercool Magazine (31)kanishka10

      August 1, 2017

      Dear Viruz, not only Havij, if you use any hacking tool on a website or network without their prior permission, its called malicious hacking and is a punishable offence. Laws vary for nation to nation but I think imprisonment is common in all nations. My sincere suggestion to you will be not to try out any hacking on sites which you have no permission.

  11. SQL injection with Havij : Step by step guide - Hackercool Magazine (32)asadaur

    August 27, 2020

    how to this ( /about.php?id=1 )
    of other sites.

    1. SQL injection with Havij : Step by step guide - Hackercool Magazine (33)kanishka10

      August 27, 2020

      This is only possible if the site is vulnerable to sql injection. First make sure if the site is vulnerable

  12. SQL injection with Havij : Step by step guide - Hackercool Magazine (34)cyber 8

    December 25, 2021

    what is the login password of havij zip

Comments are closed.

SQL injection with Havij : Step by step guide - Hackercool Magazine (2024)

References

Top Articles
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 6334

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.