stealth link building

donjuan

Power Member
Joined
Oct 12, 2007
Messages
548
Reaction score
241
So Ive been doing some spying on the competition in one of my niches and found something interesting while checking out where hes been dropping links in comments using the image code below.

Code:
<a href="http://www.website.com" title="keyword here"><img src="http://www.website.com/folder/keywordhere" alt="keyword here" border="0">

Now in the comment there is no visible link just his text comment unless you mouse over the end of his comment there is an invisible image you see the link show up in the status bar and is clickable.

Now Ive tried the same technique and failed..what shows up in the comment when i try the code substituting my website and anchor text of course is my anchor text link (alt text).
This leads me to believe he is using some sort of htaccess code on the folder where he is sourcing the image from since there is no actual image in the folder here-->
Code:
http://www.website.com/folder/keywordhere
and note he is not even referencing to an image file jpg or otherwise.

So maybe someone here with some htaccess skills can fill in the blanks for us all if it really is htaccess related.

Ive spend a couple hours trying to figure it out, couple things Ive noticed while playing with his code is that i can change the name of the image folder and file name to some degree and it still work as long as it starts with the same letter so lets say his folder is called "track" if i substitute website.com/track/keywordhere to website.com/trkk/keywordhere it still drops the invisible image.
 
.htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /image.php [L]
</IfModule>


image.php
Code:
<?php
   # write out pertinent headers to let the browser know
   # that we're delivering a 43-byte GIF image
header("Content-type: image/gif");
header("Content-length: 43");
   # write one-pixel wide tranparent GIF to the output
   # stream
$fp=fopen("php://output","wb");
fwrite($fp,"GIF89a\x01\x00\x01\x00\x80\x00\x00\xFF\xFF",15);
fwrite($fp,"\xFF\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00",12);
fwrite($fp,"\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02",12);
fwrite($fp,"\x44\x01\x00\x3B",4);
fclose($fp);

  # append the hit to a log file
  # you'll probably want to replace this with an INSERT to your
  # favorite database
$ref = $_SERVER['HTTP_REFERER'];
$addr = $_SERVER['REMOTE_ADDR'];
$host = $_SERVER['REMOTE_HOST'];
$brow = $_SERVER['HTTP_USER_AGENT'];
$page=$_GET["page"];
$log=fopen("log.txt","a");
$t=date("r");
fwrite($log,"$t  : page=$page $ref $addr $host $brow \r\n");
fclose($log);
?>


That will redirect any file that doesn't exist to image.php which will output a 1x1 pixel transparent gif & log the hits. Could also be combined with "that which we cannot speak of here".
 
.htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /image.php [L]
</IfModule>
image.php
Code:
<?php
   # write out pertinent headers to let the browser know
   # that we're delivering a 43-byte GIF image
header("Content-type: image/gif");
header("Content-length: 43");
   # write one-pixel wide tranparent GIF to the output
   # stream
$fp=fopen("php://output","wb");
fwrite($fp,"GIF89a\x01\x00\x01\x00\x80\x00\x00\xFF\xFF",15);
fwrite($fp,"\xFF\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00",12);
fwrite($fp,"\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02",12);
fwrite($fp,"\x44\x01\x00\x3B",4);
fclose($fp);

  # append the hit to a log file
  # you'll probably want to replace this with an INSERT to your
  # favorite database
$ref = $_SERVER['HTTP_REFERER'];
$addr = $_SERVER['REMOTE_ADDR'];
$host = $_SERVER['REMOTE_HOST'];
$brow = $_SERVER['HTTP_USER_AGENT'];
$page=$_GET["page"];
$log=fopen("log.txt","a");
$t=date("r");
fwrite($log,"$t  : page=$page $ref $addr $host $brow \r\n");
fclose($log);
?>
That will redirect any file that doesn't exist to image.php which will output a 1x1 pixel transparent gif & log the hits. Could also be combined with "that which we cannot speak of here".

the ideas.... the ideas.... and soon as i try to convert to white hat :rolleyes:
 
Why not just post a 1x1 on photobucket?

Just asking since I'm not clear on the purpose of the htaccess rewrite and php image generation script...
 
Because you've got a keyword in the image name as well. Also, this method gives you more control.

Down the line you can change the image from a 1x1 pixel transparent gif to a huge full page ad and rank in google image results for extra traffic.

You're open to quite a few more options when you keep it local.
 
Thank you unfortunately I cannot get this to work. I put the htaccess and the image.php files in mywebsite.com/img

and used the code
Code:
<a href="http://www.website.com" title="underwater kickboxing"><img src="http://www.website.com/img/keywordhere" alt="underwater kickboxing" border="0">

In my comment i still see a hypertext link for underwater kickboxing

and I shouldnt see any link at all.

.htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /image.php [L]
</IfModule>


image.php
Code:
<?php
   # write out pertinent headers to let the browser know
   # that we're delivering a 43-byte GIF image
header("Content-type: image/gif");
header("Content-length: 43");
   # write one-pixel wide tranparent GIF to the output
   # stream
$fp=fopen("php://output","wb");
fwrite($fp,"GIF89a\x01\x00\x01\x00\x80\x00\x00\xFF\xFF",15);
fwrite($fp,"\xFF\x00\x00\x00\x21\xF9\x04\x01\x00\x00\x00\x00",12);
fwrite($fp,"\x2C\x00\x00\x00\x00\x01\x00\x01\x00\x00\x02\x02",12);
fwrite($fp,"\x44\x01\x00\x3B",4);
fclose($fp);

  # append the hit to a log file
  # you'll probably want to replace this with an INSERT to your
  # favorite database
$ref = $_SERVER['HTTP_REFERER'];
$addr = $_SERVER['REMOTE_ADDR'];
$host = $_SERVER['REMOTE_HOST'];
$brow = $_SERVER['HTTP_USER_AGENT'];
$page=$_GET["page"];
$log=fopen("log.txt","a");
$t=date("r");
fwrite($log,"$t  : page=$page $ref $addr $host $brow \r\n");
fclose($log);
?>


That will redirect any file that doesn't exist to image.php which will output a 1x1 pixel transparent gif & log the hits. Could also be combined with "that which we cannot speak of here".
 
You need to make sure the server has mod_rewrite activated.
Try going to http://www.website.com/img/keywordhere and making sure firefox reports you're looking at a 1x1 gif image.

PM me more details if you want me to take a look.
 
Back
Top