Tuesday, July 12, 2011

Beauty Of The Baud: Sqlninja- A SQL Injection Tool


Vulnerability on database is really harmful for the web application, the most common type of attack on database is via SQL-injection. You should secure your web application from these harmful attack because database contain relevant information.There are different tools available to find the vulnerability on web application, as discussed before click here to learn more tools.

Like other tools Sqlninja is used to exploit SQL-injectionvulnerability on a web application. Its main goal is to provide a remote access on the vulnerable DB server, even in a very hostile environment. It should be used by penetration testers to help and automate the process of taking over a DB Server when a SQL Injection vulnerability has been discovered.

Sqlninja is written in Perl and should run on any UNIX based platform with a Perl interpreter, as long as all needed modules have been installed. So far it has been successfully tested on:
Requirement 
Since sqlninja is completely written in Perl, there is not much to install, except Perl itself and the following modules, if missing:
  • NetPacket
  • Net-Pcap
  • Net-DNS
  • Net-RawIP
  • IO-Socket-SSL
  • Net-Pcap
You will also need the Metasploit Framework 3 on your box to use the metasploit attack mode, and also a VNC client if you use the VNC payload. 

Features
  • Fingerprint of the remote SQL Server (version, user performing the queries, user privileges, xp_cmdshell availability, DB authentication mode)
  • Bruteforce of 'sa' password (in 2 flavors: dictionary-based and incremental)
  • Privilege escalation to sysadmin group if 'sa' password has been found
  • Creation of a custom xp_cmdshell if the original one has been removed
  • Upload of netcat (or any other executable) using only normal HTTP requests (no FTP/TFTP needed)
  • TCP/UDP portscan from the target SQL Server to the attacking machine, in order to find a port that is allowed by the firewall of the target network and use it for a reverse shell
  • Direct and reverse bindshell, both TCP and UDP

No comments:

Post a Comment