Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Vuln-Dev
[Top] [All Lists]

Re: [ECHO_ADV_20$2005] Full path disclosure JAF CMS

Subject: Re: [ECHO_ADV_20$2005] Full path disclosure JAF CMS
Date: Sun, 26 Jun 2005 14:56:07 -0400 (EDT)

Two of these "full path disclosure" error messages suggest a much more
serious problem:

  http://localhost/jaf-cms/index.php?page=forum&category=general&id=3/*

  Warning: fopen(module/files/3/*): failed to open stream: No such
  file or directory in
  /var/www/html/jaf-cms/module/forum/inc/csvfile.php on line 197

The attacker's input - the "id" parameter - is eventually being used
in an fopen call.

Is the input being filtered or cleansed anywhere?  Is this really a
directory traversal problem?  Can the attacker open arbitrary files?

I don't have the tool installed, so I can't verify, but here are some
clues from the source code.

In forum.php in 3.0 Final:

  /* note: no previous mention of $id anywhere until the next line */

  if(isset($id))
  {                                 /* main data base access */
                        $base_comment_file = new csvfile;
                        $base_comment_file->name="module/files/".$id;


In csvfile.php, the cvsfile class is defined with the following
method:

        function open( $mode )
        // opens the data source
        {
                if ( ! $this->handle = fopen( $this->name, $mode ) )
                {
                        return false;
                }

So maybe at least CSV formatted files can be read; maybe arbitrary
files can be modified if any are opened in write mode?

Again, I don't have the tool involved, so I can't prove it for sure.

- Steve

<Prev in Thread] Current Thread [Next in Thread>