[UNIX] Penguin TraceRoute Allows Remote Command Execution

From: support@securiteam.com
Date: 03/22/02


From: support@securiteam.com
To: list@securiteam.com
Date: Fri, 22 Mar 2002 11:37:05 +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.
- - - - - - - - -

  Penguin TraceRoute Allows Remote Command Execution
------------------------------------------------------------------------

SUMMARY

 <http://www.linux-directory.com/scripts/traceroute.shtml> Penguin
TraceRoute, a Perl based host trace routing program has been found to
contain a vulnerability that would allow remote attackers to cause the
perl script to execute arbitrary commands.

DETAILS

Vulnerable systems:
Penguin TraceRoute version 1.0

This script does not filter out any ; | characters thus allowing anyone to
execute arbitrary commands with the permissions of the running user
(usually 'nobody').

Example:
"127.0.0.1;cat /www/secure/.htpasswd"
Or if the user has write access:
"127.0.0.1;echo I iz 1337>index.html".

Fix:
Open up the perl script in your favorite text editor, find a line that has
"$host = $q->param('host');" Its usually the 13th line down then just add
this line "$host =~ s/[;\*\|'&\$!?#\(\)\[\]\{\}:'"\\]//g;" under it and
that should parse out any unwanted characters.

ADDITIONAL INFORMATION

The information has been provided by <mailto:jenkins@securityfreaks.com>
paul jenkins.

========================================

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.