Hacking Module 14
Hacking Module 14
2008 Batch-I
Module XIV
SQL Injection
Scenario
Countermeasures
Attacking SQL Servers
Techniques Involved
http://ntsecurity.nu/cgi-
bin/download/sqldict.exe.pl
"SQLdict" is a dictionary
attack tool for SQL Server.
It tests the account
passwords to see if they are
strong enough to resist an
attack.
Hacking Tool: SQLExec
http://phoenix.liu.edu/~mdevi/util/Intro.htm
This tool executes commands on compromised Microsoft SQL Servers using the
xp_cmdshell extended stored procedure.
It uses the default sa account with NULL password.
USAGE: SQLExec www.target.com
Hacking Tool: SQLbf
http://www.cqure.net/tools.jsp?id=10
SQLbf is a SQL Sever Password Auditing tool. This tool should
be used to audit the strength of Microsoft SQL Server
passwords offline. The tool can be used either in Brute Force
mode or in Dictionary attack mode. The performance on a
1GHZ pentium (256MB) machine is around 750,000
attempts/sec.
To be able to perform an audit, one needs the password hashes
that are stored in the sysxlogins table in the master database.
The hashes are easy to retrieve although one needs a privileged
account to do so, like sa. The query to use would be:
select name, password from master..sysxlogins
To perform a dictionary attack on the retrieved hashes:
sqlbf -u hashes.txt -d dictionary.dic -r
out.rep
Hacking Tool: SQLSmack
Source:
Advanced SQL Injection In SQL Server Applications ,
author Chris Anley
Scenario