CVE-2014-0195漏洞分析

Watching the industry respond to the Heartbleed vulnerability has been fascinating. 
This bug had widespread impact with thousands of servers left vulnerable, numerous private keys compromised, and companies quick to jump on the bandwagon to gain a marketing advantage. All this activity rekindled the conversation around the security offered
by open source projects and the lack of financial support provided to the projects used in critical infrastructure.

While all this is going on, researchers are upping their efforts to review OpenSSL source code to find additional vulnerabilities.  This left us wondering: “What will we find next?”  Well, it didn’t take long for another critical OpenSSL vulnerability to show
up in the queues at the Zero Day Initiative.  Jüri Aedla is credited for the original discovery of this vulnerability. He recently made news by successfully compromising Mozilla Firefox during this year’s Pwn2Own contest.  We enjoy analyzing his work and knew
immediately it would be an exciting case.

Let’s discuss the vulnerability itself:

The issue exists wholly within ssl/d1_both.c and occurs when handling Datagram Transport Layer Security (DTLS) fragments.  DTLS has a fragmentation mechanism to break up large messages for UDP. Each fragment contains a 3-byte length field, which should be the
same for all fragments in a message. OpenSSL incorrectly assumes that all DTLS fragments specify the same message size.  Specifically, it trusts that the message length specified within the header of the first fragment will be invariant across all fragments. 
Here is an example packet that demonstrates the issue:

Another quick observation is that the Wireshark protocol decoder highlights the mismatch of the length values in the DTLS fragments as a protocol error.  Unfortunately, OpenSSL did not recognize this as an error condition.

The relevant source code is below (as of this commit):

1. Read first fragment header.

2. Check if it is a fragment.  Fragment Length of 1 < Length of 2.

3. Allocate space for new message based on length in header, as it’s the first fragment.

4. Allocate a 2-byte buffer for the whole message.

5. Read in the 1-byte from the first fragment.

6. Read second fragment header.

7. Check if it is a fragment.  Fragment Length of 986 < Length of 987.

8. Read in the 986-bytes second fragment into a 2-byte buffer.

Just sending this single UDP packet results in the application segfaulting and causing a denial-of-service condition, but more malicious things are possible.  As the length field is 3-bytes wide, it is theoretically possible to write up to 2^24 bytes of data
to the process using this vulnerability.  An attacker could leverage this issue to corrupt adjacent metadata, and possibly execute code in the context of the process using OpenSSL.

The OpenSSL code does some sanity checking on the length fields in the DTLS fragments but, unfortunately, the check occurs too late and could be bypassed.  The developers even left a prophetic comment in the code about what would happen if the validation failed.

So, why is this vulnerability interesting beyond just the technical aspects?

According to the commit logs, Robin Seggelmann introduced this vulnerability into the OpenSSL code base four years ago. Yes, Robin Seggelmann is also responsible for introducing the Heartbleed vulnerability.  Two big vulnerabilities introduced by the same developer.
Seggelmann is not completely to blame, of course. OpenSSL is an open source project. The ‘many eyes’ that look at this code failed to catch this bug, but a new breed of individuals are looking at this code…especially at Seggelmann’s code.  This code is now
known for having vulnerabilities. There is blood in the water.  For the individuals auditing his code, the Zero Day Initiative will happily handle the work that goes into disclosing those vulnerabilities and reward you for your efforts.

[Note: The team at HP TippingPoint’s DVLabs talks about this vuln and their customer protection here. Be sure to check it
out!]

时间: 2024-10-28 20:59:02

CVE-2014-0195漏洞分析的相关文章

CVE-2014-1767 漏洞分析(2015.1)

CVE-2014-1767 漏洞分析 1. 简介 该漏洞是由于Windows的afd.sys驱动在对系统内存的管理操作中,存在着悬垂指针的问题.在特定情况下攻击者可以通过该悬垂指针造成内存的double free漏洞. 实现对漏洞的有效利用,攻击者利用成功可导致权限提升.afd.sys是内核用来管理socket的模块. 影响的系统包括(32bit & 64 bit):  Windows Server 2003 Windows Vista Windows Server 2008 Windows 7

Java反序列化漏洞分析

相关学习资料 http://www.freebuf.com/vuls/90840.html https://security.tencent.com/index.php/blog/msg/97 http://www.tuicool.com/articles/ZvMbIne http://www.freebuf.com/vuls/86566.html http://sec.chinabyte.com/435/13618435.shtml http://www.myhack58.com/Articl

手游类App安全防破解攻略-先来做个漏洞分析吧

2014年6月初,爱加密高调推出免费自动化App安全检测平台,这是国内首家自动化智能App安全检测平台,也是爱加密推出的一个重磅产品,甚至在目前整个互联网行业,包括移动互联网行业还没有这样智能完善的服务平台出现,其应用方向和行业前景相当乐观.       只需一键,专业简单,让风险漏洞无处遁形 目前来说,移动应用开发者众多,他们可能不知道自己的应用是否安全,是否容易被他人破解进行二次打包.出于此类需求,爱加密推出爱加密免费漏洞分析平台.该平台集成了目前黑客最常用的各种破解方法与思路,模拟黑客攻击

App漏洞分析,爱加密全网首推智能安全检测

2014年6月初,爱加密高调推出免费自动化App安全检测平台,这是国内首家自动化App安全检测平台,也是爱加密推出的一个重磅产品.作为国内首家免费自动化App安全检测平台,在目前整个互联网行业,包括移动互联网行业还没有这样的服务平台出现,行业前景相当乐观. 文章参考:www.ijiami.cn 只需一键,专业简单,让风险漏洞无处遁形 爱加密漏洞分析平台的推出旨在打造一个服务于移动互联网开发者的安全服务平台,同时也给整个移动互联网安全领域带来一份保障.目前移动应用开发者越来越多,他们不知道自己的应

PCMan FTP Server缓冲区溢出漏洞分析与利用

简要介绍 这个软件是台湾国立阳明大学医学系的一个学生在大四的时候写的,这个漏洞是有CVE的(CVE-2013-4730),软件应该还挺普及的,这是一个缓冲区溢出漏洞 具体exp可以点这里 实验用poc(其实这里直接对USER命令溢出都是可以的,即不用知道账号密码即可远程代码执行,USER命令的buf距离返回地址是2000) import socket as s from sys import argv # if(len(argv) != 4): print "USAGE: %s host <

比葫芦娃还可怕的百度全系APP SDK漏洞 - WormHole虫洞漏洞分析报告 (转载)

瘦蛟舞 · 2015/11/02 10:50 作者:瘦蛟舞,蒸米 ”You can’t have a back door in the software because you can’t have a back door that’s only for the good guys.“ - Apple CEO Tim Cook ”你不应该给软件装后门因为你不能保证这个后门只有好人能够使用.” – 苹果CEO 库克 0x00 序 最早接触网络安全的人一定还记得当年RPC冲击波,WebDav等远程攻

【网络安全】Snort漏洞分析规则提取验证全流程讲述

本文以CVE 2014-6034为例进行漏洞分析与验证,包括环境搭建抓包,特征提取验证各个环节. 1.下载软件: ManageEngine OpManager 9 地址:http://manageengine-opmanager.soft32.com/ Kali Linux https://www.kali.org/downloads/ 我下载在是Kali Linux 64 bit ISO 1.0.9a ISO 2.环境搭建 ManageEngine OpManager 9 直接点击安装即可,安

PHPCMS \phpcms\modules\member\index.php 用户登陆SQL注入漏洞分析

catalog 1. 漏洞描述 2. 漏洞触发条件 3. 漏洞影响范围 4. 漏洞代码分析 5. 防御方法 6. 攻防思考 1. 漏洞描述2. 漏洞触发条件 0x1: POC http://localhost/phpcms_v9/index.php?m=member&c=index&a=login dosubmit=1&username=phpcms&password=123456%26username%3d%2527%2bunion%2bselect%2b%25272%2

CVE-2017-7269—IIS 6.0 WebDAV远程代码执行漏洞分析

漏洞描述: 3月27日,在Windows 2003 R2上使用IIS 6.0 爆出了0Day漏洞(CVE-2017-7269),漏洞利用PoC开始流传,但糟糕的是这产品已经停止更新了.网上流传的poc下载链接如下. github地址:https://github.com/edwardz246003/IIS_exploit 结合上面的POC,我们对漏洞的成因及利用过程进行了详细的分析.在分析过程中,对poc的exploit利用技巧感到惊叹,多次使用同一个漏洞函数触发,而同一个漏洞同一段漏洞利用代码

CVE-2016-0143 漏洞分析(2016.4)

CVE-2016-0143漏洞分析 0x00 背景 4月20日,Nils Sommer在exploitdb上爆出了一枚新的Windows内核漏洞PoC.该漏洞影响所有版本的Windows操作系统,攻击者利用成功后可获得权限提升,微软在4月补丁日修复了该漏洞. 0x01 漏洞分析 Nils Sommer并没有说明该漏洞为何种类型的漏洞,咋看崩溃场景会认为是NULL Pointer dereference或者UAF漏洞,粗略分析后,觉得是整数溢出漏洞,但是最后还是将其定义为特殊的NULL Point