sqlsus
sqlsus is an open source MySQL injection and takeover tool written in Perl. It allows retrieving database structure, injecting SQL queries, downloading files, and controlling backdoors via a command line interface.
Description
sqlsus is designed for MySQL injection and database takeover scenarios. It provides a command line interface that mimics a MySQL console output where relevant, enabling users to interact with vulnerable MySQL databases. The tool supports complex SQL query injection, database structure retrieval, and cloning databases.
Use cases include penetration testing of web applications backed by MySQL, where SQL injection vulnerabilities are suspected. Testers can generate a configuration file, edit it with target details, and launch scans to explore and exploit the database. Additional features like crawling for writable directories, file downloads from the web server, and backdoor uploads make it versatile for deeper exploitation.
The tool requires a configuration file specifying the target, after which an interactive session is started for further commands.
How It Works
sqlsus operates via a Perl-based command line interface that connects to vulnerable MySQL databases over HTTP or similar web interfaces. It generates a configuration file for target specification, then creates an interactive session mimicking MySQL console output. Techniques include SQL injection for structure dumping, query execution, file operations via LOAD_FILE or similar, directory crawling for writable paths, backdoor deployment, and database cloning through injected queries.
Installation
sudo apt install sqlsusFlags
Examples
sqlsus -g sqlsus.cfgnano sqlsus.cfgsqlsus sqlsus.cfgstartsqlsus sqlsus.cfg; startroot@kali:~# sqlsus -g sqlsus.cfg