Skip to content

jSQL Injection is a Java application for automatic SQL database injection.

License

Notifications You must be signed in to change notification settings

forsaken-x2x/jsql-injection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

jSQL Injection is a lightweight application used to find database information from a distant server.

It is free, open source and it works cross-platform on Windows, Linux and Mac OS X with Java from version 8 to 15.

Kali Linux logo jSQL Injection is also part of the official penetration testing distribution Kali Linux and is included in various other distributions like Pentest Box, Parrot Security OS, ArchStrike and BlackArch Linux.

Twitter Follow
Java 8 to 15 JUnit 5 Maven 3.1 GitHub
Github Actions Travis
Sonar Codecov Codacy Codebeat badge
Sonar Violations (long format) Total alerts

Features

  • Automatic injection of 23 kinds of databases: Access, CockroachDB, CUBRID, DB2, Derby, Firebird, H2, Hana, HSQLDB, Informix, Ingres, MaxDB, Mckoi, MySQL, Neo4j, NuoDB, Oracle, PostgreSQL, SQLite, SQL Server, Sybase, Teradata and Vertica
  • Multiple injection strategies: Normal, Error, Blind and Time
  • SQL and tampering sandboxes
  • Injection of list of targets
  • Read and write files on host using injection
  • Creation and visualization of Web shell and SQL shell
  • Bruteforce of password hash
  • Search for administration pages
  • Text hashing, encoding and decoding
  • Authentication Basic, Digest, NTLM, Kerberos
  • Proxy connection HTTP, SOCKS4 and SOCKS5

Install Java 8 or either up to Java 15, then download the latest release and double-click on the file jsql-injection-v0.82.jar to launch the software.
You can also type java -jar jsql-injection-v0.82.jar in your terminal to start the program.
If you are using Kali Linux then get the latest release using command sudo apt-get -f install jsql, or make a system full upgrade with apt update then apt full-upgrade.

Continuous integration

This software is developed using open source libraries like Spring, Spock and Hibernate and is tested using a continuous integration platform like Travis CI and Github Actions. The non regression tests run against dockerized and in memory databases and GUI is tested on VNC screen in the cloud on the CI platform, then quality checks are stored on quality code platforms like Sonar and Codecov.

+---+ +-----------------------------------------------------------------------+
|   | |                         JUNIT TEST FRAMEWORK                          |
|   | +-----------------|-------------------------------------|---------------+
| D | +-----------------v-------------------+  +--------------v---------------+
| O | |          INJECTION MODEL            <--+             GUI              |
| C | +-----------------|-------------------+  +------------------------------+
| K | +-----------------v-----------------------------------------------------+
| E | |                              SPRING API                               |
| R | +---|---------|----------|----------|------|------|-------|--------|----+
|   | +---v---------v----------v----------v------v------v-------v--------v----+
|   | | MYSQL | POSTGRES | SQL SERVER | CUBRID | H2 | DERBY | HSQLDB | SQLITE |
+---+ +-----------------------------------------------------------------------+

Use the sample scripts to test injection on your local environment. First install a development environment like EasyPHP, then download the test-bed PHP scripts and place them into www/.

<?php
# http://127.0.0.1/mysql/strategy/get-normal.php?id=0

$link = mysqli_connect('localhost', 'root', '', 'my_database');

$result = $link->query("SELECT col1, col2 FROM my_table where id=$_GET[id]");

while ($row = $result->fetch_array($result, MYSQLI_NUM))
    echo join(',', $row);

Screenshots and [video]

Database SQL Engine Tamper Batch scan Admin page Web shell SQL shell File Upload Bruteforce Coder

Full Path Disclosure, Injection strategies: dios routedQuery, WAF detection.

In progress

Custom rows load.

Since latest release

Preferences for threads User-Agent and CSRF, Stacked query, New databases: Altibase C-treeACE Exasol FrontBase InterSystems-IRIS MimerSQL MonetDB Presto.

Change log

v0.82 Tampering options, Refactoring for Cloud and multithreading

v0.81 Test all parameters including JSON, Parse forms and Csrf tokens, Databases: CockroachDB Mckoi Neo4j NuoDB Hana and Vertica, Translation complete: Russian, Chinese

v0.79 Error Strategies for MySQL and PostgreSQL compatible with Order/Group By, Wider range of Characters Insertion including multibyte %bf

v0.78 SQL Engine, MySQL Error strategy: DOUBLE, Translations: es pt de it nl id, 18 Database flavors including Access

v0.76 Translation: cz, 17 Database flavors including SQLite

v0.75 URI injection point, Source code mavenification, Upgrade to Java 7

v0.73 Authentication: Basic Digest Negotiate NTLM and Kerberos, Database flavor selection

v0.7 Scan multiple URLs, Github Issue reporter, 16 Database flavors including Cubrid Derby H2 HSQLDB MariaDB and Teradata

alpha-v0.6 Speed x2: No more hex encoding, 10 Database flavors including MySQL Oracle SQLServer PostgreSQL DB2 Firebird Informix Ingres MaxDb and Sybase, JUnit tests, Log4j, GUI translation

0.5 SQL Shell, File Uploader

0.4 Admin page finder, Bruteforce hashes like MD5 and MySQL, Encode and decode string with methods like Base64, Hex and MD5

0.3 File injection, Web Shell with integrated CLI, Persistence of application parameters, Update checker

0.2 Strategy Time, Multi-thread control: Start Pause Resume and Stop, Log URL calls

0.0-0.1 Method GET POST Header and Cookie, Strategies Normal Error and Blind, Best strategy selection, Progression bars, Simple evasion, Proxy settings, MySQL only

Disclaimer

Attacking web-server is illegal without prior mutual consent. The end user is responsible and obeys all applicable laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program.

About

jSQL Injection is a Java application for automatic SQL database injection.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 96.6%
  • Groovy 1.6%
  • PHP 1.3%
  • Shell 0.3%
  • HTML 0.1%
  • JavaScript 0.1%