Hackkali linuxweb hacking

jSQL Injection tool for scanning and exploiting SQL injection in Kali Linux

jSQL Injection usage guide: a multifunctional tool for scanning and exploiting SQL injection in Kali Linux

jSQL Injection is a multipurpose penetration testing tool. Its main function is to find and exploit SQL-injection vulnerabilities.

It is also able to:

  • explore databases from remote host
  • search for admin pages,
  • read files from remote host using injection,
  • create a web shell to remote host and open a terminal
  • create a SQL shell to remote host and open a terminal
  • upload a file to host
  • brute-force hashes
  • encode or decode a string
  • test multiple URLs for SQL injection

To detect and exploit SQL injections, I usually prefer sqlmap. It is a command-line utility, it can do a lot of things, it uses all possible SQL injection methods, tries to bypass server protection, can create shells and much more.

It is also cross-platform, reliable and very effective.

Since sqlmap is extremely powerful and flexible, for the command-line program it means a huge number of different options.

For beginners this may seem too complicated.

JSQL Injection has an excellent graphical interface. The program is written in Java, it is cross-platform and very undemanding to resources. By the way, the executable file is only 2.14 megabytes.

But start in order – with the search for candidates for hacking. It will not be superfluous to recall that hacking is a criminal offense. Therefore, do not do anything that violates the law. Ideal (from the point of view of legality) is the use for training a vulnerable script on localhost or one of the specialized environments. Please, consider the articles:

1. Search for sites vulnerable to SQL injection

One of the ways to find vulnerable web sites is to use Google dorks. This table is borrowed from the site blackmoreops.com:

Google dorksGoogle dorksGoogle dorks

Open sites one by one from the search results and try to add a quote to a variable in the query string.

For example, the site address:


Then I try so:

jSQL Injection tool for scanning and exploiting SQL injection in Kali Linux
jSQL Injection tool for scanning and exploiting SQL injection in Kali Linux

If you receive any SQL error message, then the site is likely to be vulnerable to SQL injection.

1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1

In addition, often vulnerable sites in response to a quote character, do not display anything, or the behavior of the site gives grounds for assuming insufficient data filtering.

It is definitely not worth looking for SQL injection in popular CMSs.

Even if they are found there, they are almost always difficult to exploit.

If you read this guide, then it is for sure (yet) not your level.

Popular CMSs can become vulnerable due to vulnerable plugins (especially self-written ones).

However, again, this is not our level yet.

2. Installing jSQL Injection

jSQL Injection is already preinstalled in Kali Linux.

But the version there could be outdated is already available.

To check the latest release number visit the release page: https://github.com/ron190/jsql-injection/releases

To launch pre-installed jSQL Injection type in your console:


If you need, you can download the latest release:

1wget https://github.com/`curl -s https://github.com/ron190/jsql-injection/releases | grep -E -o '/ron190/jsql-injection/releases/download/v[0-9]{1,2}.[0-9]{1,2}/jsql-injection-v[0-9]{1,2}.[0-9]{1,2}.jar' | head -n 1`

Once the file is downloaded, start the tool like this:

1java -jar ./jsql-injection-v*.jar

The main window of the program looks like this:

Installing jSQL Injection
Installing jSQL Injection

By the way, this is one of those programs for pentesting that work fine in Windows.

To run in Windows, download the latest version from the official website: https://github.com/ron190/jsql-injection/releases

Run the downloaded file with a double click (you need to have a Java virtual machine).

3. Scanning a web site for SQL injection with jSQL

Working with the program is extremely simple. Just enter the address of the site and press ENTER.

The following screenshot shows that the site is vulnerable to three types of SQL injections at once.

web site for SQL injection
web site for SQL injection

We already got names of available databases.

Click on a database to explore its tables. You can see the contents of each table. Click on a table; wait for a list of columns appears:

web site for SQL injection

Select columns of interest:

web site for SQL injection

Click the table name by right button of your mouse and select ‘Load’:

web site for SQL injection

The content of the table will appear:

web site for SQL injection

Usually, tables with named administratorusers are the most interesting, because the can contain credentials.

If you are lucky and you found the administrator’s credentials, it is still not enough.

We still need to find an admin page where to enter these credentials.

4. Searching for admin pages with jSQL Injection

To do this, go to the next tab. Here we are met by a list of possible addresses. You can select one or more pages to check:

jSQL Injection
jSQL Injection

Convenience is that you do not need to use other programs.

Unfortunately, negligent programmers, who store passwords in clear test, are not very numerous. Quite often in the password line we see something like


This is a hash. You can decipher it with brute force. And … jSQL Injection has a built-in brute-force.

5. Brute-forcing hashes using jSQL Injection

Undoubted convenience is that you do not need to look for other programs. There is support for many of the most popular hashes.

This is not the best solution. To brute-force on maximum speed use Hashcat.

However, of course, when there is no other program at hand or there is no time to learn Hashcat, jSQL Injection with the built-in brute force function will be very useful.

hashes using jSQL Injection
hashes using jSQL Injection

There are settings: you can specify what characters are in the password, the length range of the password.

6. Operations with files after detection of SQL injections

In addition to database operations – reading and modifying them, in the case of detecting SQL injections, the following file operations are possible:

  • reading files on the server
  • uploading new files to the server
  • unloading shells to the server

And all this is implemented in jSQL Injection!

There are restrictions – the SQL server must have enough privileges. Good system administrators disables it option and access to the file system cannot be obtained.

The presence of file privileges is easy enough to verify. Go to one of the tabs (reading files, creating a shell, uploading a new file) and try one of the specified operations.

Still very important remark – we need to know the exact absolute path to the file with which we will work – otherwise it will not work.

Look at the following screenshot:

detection of SQL injections
detection of SQL injections

Any response to a file operation is answered by us: No FILE privilege, and nothing can be done about it.

If instead you have another error:

1Problem writing into [folder_name]

This means that you have incorrectly specified the absolute path to which the file should be written.

In order to assume the absolute path, you need, at a minimum, to know the operating system on which the server is running.

To do this, switch to the Network tab.

Such a record (Win64 string) gives us reason to assume that we are dealing with Windows OS:

12345678Keep-Alive: timeout=5, max=99Server: Apache/2.4.17 (Win64) PHP/7.0.0RC6Connection: Keep-AliveMethod: HTTP/1.1 200 OKContent-Length: 353Date: Fri, 11 Dec 2015 11:48:31 GMTX-Powered-By: PHP/7.0.0RC6Content-Type: text/html; charset=UTF-8

Here we have some kind of Unix (*BSD, Linux):

12345678Transfer-Encoding: chunkedDate: Fri, 11 Dec 2015 11:57:02 GMTMethod: HTTP/1.1 200 OKKeep-Alive: timeout=3, max=100Connection: keep-aliveContent-Type: text/htmlX-Powered-By: PHP/5.3.29Server: Apache/2.2.31 (Unix)

And here we have CentOS:

12345678910111213Method: HTTP/1.1 200 OKExpires: Thu, 19 Nov 1981 08:52:00 GMTSet-Cookie: PHPSESSID=9p60gtunrv7g41iurr814h9rd0; path=/Connection: keep-aliveX-Cache-Lookup: MISS from t1.hoster.ru:6666Server: Apache/2.2.15 (CentOS)X-Powered-By: PHP/5.4.37X-Cache: MISS from t1.hoster.ruCache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0Pragma: no-cacheDate: Fri, 11 Dec 2015 12:08:54 GMTTransfer-Encoding: chunkedContent-Type: text/html; charset=WINDOWS-1251

In Windows, the typical folder for sites is C:\Server\data\htdocs\.

But, in fact, if someone thought of making a server on Windows, then, very likely, this person has not heard anything about file permissions.

Therefore, the attempt starts directly from the C:/Windows/ folder:

As you can see, everything went fine from the first time.

Conclusion on jSQL Injection
Conclusion on jSQL Injection

But here I myself have doubts about the jSQL Injection shells themselves.

If there are file privileges, then you can download anything with the web interface.

7. Mass check of sites on SQL-injection

And even this function is in jSQL Injection. Everything is extremely simple – insert a list of sites (you can import from a file), select the ones you want to check and click the button to start the operation.

exploiting SQL injection in Kali Linux
exploiting SQL injection in Kali Linux

Conclusion on jSQL Injection

jSQL Injection is a good, powerful tool for searching and post-exploiting vulnerable to SQL injection web sites.

Its undoubted advantages: ease of use, built-in related functions. jSQL Injection can become a novice’s best friend when analyzing websites.

Like all tools with a graphical interface, it cannot be automated in scripts.

Nevertheless, some automation is possible in this program as well, thanks to the built-in function of mass web site scanning.

The jSQL Injection program is much easier to use than sqlmap.

But sqlmap supports more types of SQL injection, has options for working with file-based firewalls and some other functions.

Outcome: jSQL Injection is the best friend of a beginner hacker.

kali linux hack wifi | How To Hack WPA/WPA2 Wi-Fi

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button