sqlninja – Blind SQL Injection Exploit Framework June 10, 2008
Posted by y2h4ck in Ethical Hacking, General Hacking, Pentesting, Web Hacking.Tags: Ethical Hacking, exploits, General Hacking, Hacking, mssql hacking, pen-test, penetration testing, Pentesting, sql, sql injection, sqlninja, Web Hacking
trackback
Sqlninja é uma ferramenta criada para explorar vulnerabilidades de SQL injection em aplicações web que utilizam-se do Microsoft SQL Server em seu back-end.
Seu principal objetivo é prover acesso remoto no servidor Database vulnerável. Pode ser utilizado por penetration testers para ajudar automatizar o processo de intrusão em um servidor DB quando uma vulnerabilidade de SQL Injection é localizada.
A ferramenta é distribuida sob a GPLv2 e classificada no SecurityHacks’ Top 15 Free SQL Injection Scanners, e pode trazer bons resultados durante um pen-test :)
Features
A documentação completa pode ser encontrada no Tarball e também aqui. Abaixo segue uma pequena lista das principais funcionalidades do Sqlninja:
- 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
- DNS-tunneled pseudo-shell, when no TCP/UDP ports are available for a direct/reverse shell, but the DB server can resolve external hostnames (check the documentation for details about how this works)
- Evasion techniques to confuse a few IDS/IPS/WAF
- Integration with Metasploit3, to obtain a graphical access to the remote DB server through a VNC server injection
Sqlninja é escrito em perl e pode ser executado em qualquer Unix com o interpretador perl e foi testado com sucesso em:
- Linux
- FreeBSD
- Mac OS X
Segue abaixo um DEMO de um pen-test em uma aplicação vulnerável, usando o sqlninja para obter acesso ao DB Server.
http://sqlninja.sourceforge.net/sqlninjademo1.html
Good Hacking 4 All.



















Comments»
No comments yet — be the first.