Files
metasploit-gs/modules/auxiliary/admin/mssql/mssql_sql.rb
T
HD Moore cd2968a32a Updated mssql_sql and backend mixin, can handle most column types and is somewhat usable as a mssql client
git-svn-id: file:///home/svn/framework3/trunk@7159 4d416f70-5f16-0410-b530-b9f4589650da
2009-10-14 17:41:12 +00:00

47 lines
1.2 KiB
Ruby

##
# $Id$
##
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##
require 'msf/core'
class Metasploit3 < Msf::Auxiliary
include Msf::Exploit::Remote::MSSQL
def initialize(info = {})
super(update_info(info,
'Name' => 'Microsoft SQL Server Generic Query',
'Description' => %q{
This module will allow for simple SQL statements to be executed against a
MSSQL/MSDE instance given the appropiate credentials.
},
'Author' => [ 'tebo <tebo [at] attackresearch [dot] com>' ],
'License' => MSF_LICENSE,
'Version' => '$Revision$',
'References' =>
[
[ 'URL', 'www.attackresearch.com' ],
[ 'URL', 'http://msdn.microsoft.com/en-us/library/cc448435(PROT.10).aspx'],
]
))
register_options(
[
OptString.new('SQL', [ false, 'The SQL query to execute', 'select @@version']),
], self.class)
end
def run
mssql_query(datastore['SQL'], true) if mssql_login_datastore
disconnect
end
end