[UNIX] Directory.php Allows Arbitrary Code Execution
From: support@securiteam.comDate: 03/11/02
- Previous message: support@securiteam.com: "[UNIX] Cobalt Raq XTR Combination Attack (Remote/Local)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: support@securiteam.com To: list@securiteam.com Date: Mon, 11 Mar 2002 13:31:51 +0100 (CET)
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
When was the last time you checked your server's security?
How about a monthly report?
http://www.AutomatedScanning.com - Know that you're safe.
- - - - - - - - -
Directory.php Allows Arbitrary Code Execution
------------------------------------------------------------------------
SUMMARY
<http://www.xenakis.net> Marcus S. Xenakis has developed some quite nice
PHP scripts to support shell commands.
The "directory.php" script is based on the "ls" command and reads the
directory based upon the passed parameter.
A security problem in this script allows viewing of arbitrary directories
on the file system.
Furthermore it allows arbitrary code execution caused by missing filters
for dangerous characters such as ";". This is quite the same as the
<http://www.securiteam.com/unixfocus/6K00B2A3FG.html> Unix Manual PHP
Script bug of the same author, which was discovered and fixed recently.
DETAILS
Marcus S. Xenakis PHP-Scripts very often use simple calls of shell
commands:
exec("ls -la $dir",$lines,$rc);
This is quite easy programming but doesn't deal with dangers that calls of
shell commands can bring.
Impact:
It is possible to execute arbitrary code with the rights of the
HTTP-Daemon
Exploit:
In contrary to the "Unix Manual PHP Script" this script doesn't offer a
form where you can enter the commands. Because of that you have to call
the script directly including the parameter and command you want to
execute.
http://www.example.com/directory.php?dir=%3Bmore%20/etc/passwd
will show you the Password File.
http://www.example.com/directory.php?dir=%3Bps+-aux
will show you all running processes.
Solution:
Implement a filter which filters dangerous characters, especially ";".
Vendor Status:
Vendor has been contacted.
ADDITIONAL INFORMATION
The information has been provided by
<mailto:advisories@it-checkpoint.net> BlueScreen.
========================================
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@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com
====================
====================
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: support@securiteam.com: "[UNIX] Cobalt Raq XTR Combination Attack (Remote/Local)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|