[UNIX] Madhater Perlbot Remote Command Execution
From: support@securiteam.comDate: 10/19/02
- Previous message: support@securiteam.com: "[NT] Windows RPC Service DoS (SPIKE)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: support@securiteam.com To: list@securiteam.com Date: 19 Oct 2002 03:36:50 +0200
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.
- - - - - - - - -
Madhater Perlbot Remote Command Execution
------------------------------------------------------------------------
SUMMARY
A security vulnerability in <http://stigmata.gothcafe.com/~madhater/>
Madhater's Perlbot allows remote attackers to cause the product to execute
arbitrary code.
DETAILS
Vulnerable systems:
* Perlbot version 1.0 beta
1. Due to no input filtering and a call to the shell the script could be
used to execute any command it has permission to.
A more detailed explanation:
The script does not limit the characters sent to the shell from user
input. The problem is in this line:
foreach(`/bin/echo "$word" | /usr/local/bin/ispell -a`)
Which allows an attacker to "break out" of the quotes and issue any
command they wish by doing something like anything";cmd. Other abuses
could be issuing commands with `cmd` and $(cmd) or \xxx where xxx is the
octal value of any character. Some form of user input filtering must be
used.
2. Due to no input filtering and a bad open() call when the script
attempts to send email it is possible to execute commands.
A more detailed explanation:
The script attempts to send an email to the user. It takes the user's
email address and passes it to the shell as an argument to the mail
program:
open (MAIL,"| $sendmail $recipient") || die $!;
This means things like hacker@scan-associates.net < /etc/passwd could be
used as an email address to get any file from the system the script has
permission to read. Or command execution is possible with
hacker@scan-associates.net ;cmd. In order to prevent this simply take the
$recipient value out of the shell call.
Fix:
According to the author a fix could be in a new version of the script.
The script's homepage was down at the time of this advisory, so here is
the suggested fix. Replace the following line:
my $word=$';
With:
my $word=$';
$word =~ s/[^\w]//g;
And replace the following line:
open (MAIL,"| $sendmail $recipient") || die $!;
With:
open (MAIL,"| $sendmail -t") || die $!;
Vendor Contact:
07-22-02 - guejez emailed myneid@gothcafe.com and alerted him of this
vulnerability.
07-22-02 - guejez received email confirming vulnerabilities and stating
fixes could be in new version.
ADDITIONAL INFORMATION
The information has been provided by <mailto:guejez@scan-associates.net>
guejez.
========================================
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: "[NT] Windows RPC Service DoS (SPIKE)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
- SUMMARY WAS: OT? Philosophical Question on SA responsibilities
... helpful for managers interested in hiring new administrators. ... Would you
go thru the 14,600 messages in root and admin ... If I was a new SA I would if encountering
a security hole, ... I can see some use for the passwd -s part of the crontab script,
... (SunManagers) - Re: Clarification-Win2k Netstat sockets interpretation
... snip.. ... Before I could manually download every security upate and
servicepack from MS.com but now...they send you a bit of Cop-code that fails to run unless ALL defences
are down ... Are you sure the script from ntsvcfg is benign in addition to being useful?
... You are absolutely correct there HAL, er ah, Sebastian. ... (alt.computer.security) - [UNIX] Perlbot File Disclosure and Remote Command Execution Vulnerabilities
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... Command Execution ...
Due to poor input filtering and a call to the shell it is possible to ... The script
tries to prevent reverse directory transversal by filtering ... (Securiteam) - [NT] Flaw in Windows Script Engine Could Allow Code Execution
... The following security advisory is sent to the securiteam mailing list, and can be
found at the SecuriTeam web site: http://www.securiteam.com ... The Windows Script Engine
provides Windows operating systems with the ... blocked by Outlook Express 6.0 and Outlook
2002 in their default ... (Securiteam) - Re: BUG with RES/SCRIPT/XP-SP2
... I consider JavaScript (known to security people as JavaVirus) as one of the Really
Top ... to have a bad script cause damage to my machine. ... This security feature
is called the "Local Machine Zone Lockdown". ... Tags, and the CDHtmlDialog class
in this forum, and got no response. ... (microsoft.public.vc.mfc)