One of the planned features listed in the Spring Cleaning Campaign (2010)
was a simple Ruby->SQL encoder for the Ronin SQL library,
to replace the overly complex Ronin SQL DSL. This encoder would format
Ruby Integers, Strings, Arrays and Hashes into fragments of proper SQL.
Blind SQL Injection to attempt to locate table_name by brute-force
iteration through table name permutations:
Using the USER_NAME() function in SQL Server to tell us if the user is
running as the administrator:
Creating errors by calling non-existant tables:
Dumping usernames:
Enumerating through database table names:
Finding user supplied tables using the sysObjects table in SQL Server:
Bypassing filter using /**/ instead of spaces:
I cheated a little by leaving off the prefix/suffix tick-marks used in
SQL injections, but you get the general idea.
New SQL fragments are created using the sql[...] syntax, and new SQL
function calls are created with sql.func_name. Note, that you can nest
SQL fragments by using the [sql[...]] or [sql.func_name(....)] syntax.
If Ronin interests you or you like the work we do, consider donating to Ronin
on
GitHub,
Patreon, or
Open Collective
so we can continue building high-quality free and Open Source security tools
and Ruby libraries.