|
커피향이 나는 *NIX
커피닉스
시스템/네트웍/보안을 다루는 곳
|
|
|
|
| 이전 주제 보기 :: 다음 주제 보기 |
| 글쓴이 |
메시지 |
truefeel 카페 관리자
가입: 2003년 7월 24일 올린 글: 1277 위치: 대한민국
|
올려짐: 2009.12.04 금, 3:18 pm 주제: FreeBSD 7.x, 8.0, root권한획득 취약점과 패치 |
|
|
11월 30일에 FreeBSD서버 local에서 root권한을 획득할 수 있는 취약점이 나왔다.
FreeBDS 7.0, 7.1, 7.2, 얼마전에 나온 8.0등 7.0이상 버전에서 이 문제가 발생한다.
- FreeBSD 'execl()' Local Privilege Escalation Vulnerability
- Re: [Full-disclosure] ** FreeBSD local r00t zeroday
- Re: ** FreeBSD local r00t zeroday
며칠동안 패치가 나오기를 기다렸는데, 드디어 패치가 나왔다.
FreeBSD-SA-09:16.rtld ( Improper environment sanitization in rtld(1) )
http://security.freebsd.org/advisories/FreeBSD-SA-09:16.rtld.asc
위 과정을 따라 그대로 패치만 해주면 된다.
1. 패치 전
| 인용: |
$ id
uid=10??(????????) gid=0(wheel) groups=0(wheel)
$ ./execl_exploit.sh
execl_exploit.sh FreeBSD local r00t zeroday
by Kingcope
November 2009
env.c: In function 'main':
env.c:5: warning: incompatible implicit declaration of built-in function 'malloc'
env.c:9: warning: incompatible implicit declaration of built-in function 'strcpy'
env.c:11: warning: incompatible implicit declaration of built-in function 'execl'
/libexec/ld-elf.so.1: environment corrupt; missing value for
/libexec/ld-elf.so.1: environment corrupt; missing value for
/libexec/ld-elf.so.1: environment corrupt; missing value for
/libexec/ld-elf.so.1: environment corrupt; missing value for
/libexec/ld-elf.so.1: environment corrupt; missing value for
ALEX-ALEX
#
# id
uid=10??(????????) gid=0(wheel) euid=0(root) groups=0(wheel)
|
2. 패치 적용
| 인용: |
# make install
chflags noschg /usr/libexec/ld-elf.so.1
install -s -o root -g wheel -m 555 -C -b -fschg -S ld-elf.so.1 /libexec
install -o root -g wheel -m 444 rtld.1.gz /usr/share/man/man1
/usr/share/man/man1/ld-elf.so.1.1.gz -> /usr/share/man/man1/rtld.1.gz
/usr/share/man/man1/ld.so.1.gz -> /usr/share/man/man1/rtld.1.gz
/usr/libexec/ld-elf.so.1 -> /libexec/ld-elf.so.1
|
3. 패치 후 exploit 테스트
root 권한을 얻을 수 없음을 확인할 수 있다.
| 인용: |
$ ./execl_exploit.sh
execl_exploit.sh FreeBSD local r00t zeroday
by Kingcope
November 2009
env.c: In function 'main':
env.c:5: warning: incompatible implicit declaration of built-in function 'malloc'
env.c:9: warning: incompatible implicit declaration of built-in function 'strcpy'
env.c:11: warning: incompatible implicit declaration of built-in function 'execl'
/libexec/ld-elf.so.1: environment corrupt; missing value for
/libexec/ld-elf.so.1: environment corrupt; aborting
$
$
|
|
|
| 위로 |
|
 |
|
|
새로운 주제를 올릴 수 있습니다 답글을 올릴 수 있습니다 주제를 수정할 수 없습니다 올린 글을 삭제할 수 없습니다 투표를 할 수 없습니다
|
Powered by phpBB © 2001, 2005 phpBB Group
|