Google 的 cleardot.gif 如何使用通用 URL 跟踪电子邮件收件人?

Google 的 cleardot.gif 如何使用通用 URL 跟踪电子邮件收件人?

一些人和公司在电子邮件中嵌入超链接图像,以便跟踪哪些收件人阅读了电子邮件以及何时阅读。当收件人打开电子邮件并且他们的电子邮件客户端向服务器请求嵌入的图像时,发件人会收到该日志。通常,图像的 URL 是唯一的,这样图像服务器就可以准确地知道刚刚打开了哪封电子邮件。然而,在许多情况下,URL 并不是唯一的。我在至少两个发件人的几封电子邮件中看到了以下行:

<img class="" src="https://mail.google.com/mail/u/0/images/cleardot.gif">

我已将上面的字符串解码为纯 HTML。在电子邮件中,它通常采用 quoted-printable 格式,因此 = 字符会变成 =3D。

这个超链接图片如何追踪收件人?它显然可以获取您的 IP 地址和您打开它的时间,但这似乎没什么用。我不明白为什么有人会在没有唯一 URL 的情况下包含此图片。

答案1

用户标识(或跟踪)无需编码在 GET URL 中。在某些情况下,可以从“Referer:”标头 URL 收集一些信息。尽管在许多情况下,这些信息来自 cookie。

在网络浏览器中打开的电子邮件

在我的情况下,当我打开 URL

https://mail.google.com/mail/u/0/images/cleardot.gif

在 Firefox 中,浏览器会发送 11 个 cookie!其中大多数包含相对较长的编码或随机字符串。以下是列表 --- cookie 所在的 URL 和 cookie 名称:

  • https://mail.google.com/mail--- GXGXSP(仅包含一个字母)
  • *.google.com--- APISID,,,,,,HSIDNIDOGPOGPCPREFSID
  • https://*.google.com--- SAPISIDSSID

本次测试使用我使用 Google 帐户的配置文件进行。我还测试了一个没有任何 Cookie 的隐私浏览配置文件。我打开了URL,http://www.google.com/然后cleardot.gif我的浏览器很高兴地发送了两个 Cookie:NIDPREF

在邮件客户端中打开的电子邮件

大多数带有 GUI 的邮件客户端都使用现有的 HTML 渲染核心。例如,Thunderbird 使用 Gecko(与 Firefox 中的核心相同)。当必须通过 HTTP/HTTPS 访问资源(例如图像)时,cookie 的发送方式与 Web 浏览器中的发送方式相同。

我检查了 Thunderbird 中有哪些 cookie,并且有以下 cookie:

  • *.google.com--- NIDPREF

这两种 cookie 也存在于 Firefox 中,根据 Google 的描述,它们用于存储用户偏好和广告相关跟踪。这两种 cookie 都适用于未登录 Google 帐户的用户。

Thunderbird 和 Firefox 并不共享同一套 cookie。您在 Firefox 中登录 Google 帐户不能简单地与 Thunderbird 中的电子邮件显示相关联。

概括

Google 可以使用嵌入的图像来获取您所建议的信息,并通过 cookie 来获取更多信息:

  • IP 地址和地理位置
  • 电子邮件显示时间
  • 客户端软件的类型和平台
  • 将事件分配给用户(通过使用 cookies)
  • 当电子邮件显示在网络浏览器中时,或当用户点击电子邮件中的特殊链接在网络浏览器中打开它时,将事件分配给 Google 用户

看起来,跟踪图像是为了收集统计数据,而不是为了跟踪单个 Google 用户的行为。

这是Google 使用的某些 Cookie 的说明,来自第三方的另一份描述:Google 使用的主要 Cookie

答案2

查看 Christopher Heng 的图像保护脚本。该链接将帮助回答这个问题并教您如何构建一个。

CHImageGuard PHP 脚本

编辑 2021 年 7 月 11 日 以下是以下代码生成的电子邮件。非常感谢上面的链接教我如何操作!请注意,我尊重他的请求,在对该答案投反对票之前不要重新分发。

{Email} en43/PM/请勿发送资源

grepotrax.webege[电子邮件保护]通过 srv41.000webhost.com 2013 年 11 月 29 日上午 5:10 发给我

警告:

http://en43.grepolis.com/game/index?login=1&p=3430151&ts=1385719773 查看 en43/PM./Do Not Send 资源traffic.forum.png 72.89.191.58

{END Email} 是使用此代码生成的。我在上面链接中学习了如何制作

<?php
$agent=@$HTTP_USER_AGENT;
$ip=@$_SERVER['REMOTE_ADDR'];
date_default_timezone_set('America/New_York');
$date = date('m/d/Y H:i:s ', time());       // Human Readable
$unix = time();   // based on seconds since standard epoch of 1/1/1970
// ---------------- CONFIGURABLE SECTION -----------------
// Where is this image guard script placed in grepolis forum?
//-------------------------------------------------------------------
 $ig_name = "IG.19.12";
 $world = "us19";
 $tab  = "Res";
 $thread = "Resource Requests";
 $forum = ($world ."/" . $tab . "/" . $thread);
// Please modify the following or it will not work on your website.
// Where did you actually put your images?
// Make sure that the path you put below ends with
// a directory slash ("/"). The script below assumes it.

// $imagedir = "/put/your/full/image/directory/path/here/" ;
//------------------------------------------------------------------
$imagedir = "http://grepotrax.webege.com/IMAGES/icing-cake2.jpg/,
             http://grepotrax.webege.com/IMAGES/BigG_Bday_cake.jpg/,
             http://grepotrax.webege.com/IMAGES/traffic.message.png/" ;

// What are the websites (hostnames) that can use this image?
// If your site can be accessed with or without the 
// "www" prefix, make sure you put both here. Do not put 
// any trailing slashes ("/") nor any "http://" prefixes.
// Follow the example below.

//------------------------------------------------------------------
$validprefixes = array (
  "www.grepotrax.webege.com",
  "grepotrax.webege.com") ;

//What is the main page of your website? Visitors will be directed here
//if they type "http://www.example.com/chimage.php" in their browser.
//$homepage = "http://www.thesitewizard.com/" ;

//------------------------------------------------------------------
$homepage = "http://grepotrax.webege.com/";
// What is your email address?
// If you want to be informed when someone tries to use
// this script to access an image illegitimately, you
// must uncomment (remove the "//" prefix) from the following
// line and change it to point to your email address.
//------------------------------------------------------------------
// $email = " " ;




function isreferrerokay ( $referrer, $validprefixes )
{
$validreferrer = 0 ;
$authreferrer  = current( $validprefixes );
while ($authreferrer) {
  if (eregi( "^https?://$authreferrer/", $referrer )) {
    $validreferrer = 1 ;
    break ;
  }
  $authreferrer = next( $validprefixes );
}
return $validreferrer ;
}

//----------------------- main program -----------------------

$image = $_GET['image'] ;
$referrer = getenv( "HTTP_REFERER" );
if (isset($_GET['image'])) {

if (empty($referrer) ||
  isreferrerokay( $referrer, $validprefixes )) {

  $imagepath = $imagedir . $image ;

  $imageinfo = getimagesize( $imagepath );
  if ($imageinfo[2] == 1) {
    $imagetype = "gif" ;
  }
  elseif ($imageinfo[2] == 2) {
    $imagetype = "jpeg" ;
  }
  elseif ($imageinfo[2] == 3) {
    $imagetype = "png" ;
  }
  else {
    header( "HTTP/1.0 404 Not Found" );
    exit ;
  }

  header( "Content-type: image/$imagetype" );
  @readfile( $imagepath );

}
else {

  if (isset($email)) {
    mail( $email, "us19/Res/Resource Requests",
       "WARNING:\n\n$referrer\nviewed $forum\n$image\n$ip",
       "From: grepotrax.webege <$email>" );

// test 15-Oct 2013 1.31 WD

// Info to be sent to the table forum_tracker

$query = "INSERT INTO us19_forum_tracker VALUES ('','$unix','$date','$referrer','$ip','$forum','$image','$ig_name','','')";

// Make a MySQL Connection

   mysql_connect("mysql14.000webhost.com", "a8440417_wuzla", "MYPASSWORD") or die(mysql_error());

   mysql_select_db("a8440417_Grepo") or die(mysql_error());

   mysql_query($query);

   mysql_close();
 }
  header( "Content-type: image/png" );
  @readfile( "http://grepotrax.webege.com/IMAGES/traffic.forum.png" );
//OR NEXT LINE IF COLOR IS WRONG
//@readfile( "http://grepotrax.webege.com/IMAGES/traffic.message.png" );
}
}
else {
header( "Location: $homepage" );
}

//FORUM LINK IN IMAGE TAG
[img]http://grepotrax.webege.com/IG.19.12.php?image=traffic.forum.png[/img]
?>

请注意,上述脚本与问题一样古老。这是在我知道我们可以使用隐形框之前 :) 感谢 SITEWIZARD.COM 教我如何在不使用 VPN 的情况下使用图像来跟踪我想要的任何内容。那时我可以使用浏览器历史记录检查 link:visited 状态来查找您是否使用过 facebookcom、walmart.com 或 AARP.com,并根据该信息得出您可能看到的其余内容。这不太酷,就像这个脚本一样,我不想让它如此容易获得,因为它只是冰山一角。

阅读https://superuser.com/editing-help#images看来我被允许使用上面的脚本连接到我在 superuser.com 上设置的图像大小 1px 1px 透明也许。

没有什么可以阻止我收集网站地址、查询地址栏中的任何内容以及访问者的浏览器、IP 地址、他们如何到达这里以及其他大量令人恐惧的东西。

服务器端可以使用 require 语句来确保图像仅在浏览器选项卡中打开 example.com 时才显示。这样一来,我就可以用它来搜索各种东西了。

我可以嵌入 Google 表格来实时显示结果吗?

反对票让我大发雷霆,差点就看到我的信息在 Stack Exchange 系列网站上是多么脆弱。我对任何人都没有威胁,只是不想通过 Stack 攻击来证明自己的观点。每次查看此页面时我都会收到一条短信!

我怎么会来到这里?... 25 次编辑之后

相关内容