Retrieve an IP address using an image

An IP address is a unique number that enables a computer to communicate over a network. It is needed to send and receive information, much like a postal address is required to receive the regular mail.

Obtain an IP address is not very difficult to do, and I already have show you how to do with the technical Email Tracking.

However, here I will share with you a more sophisticated technique of retrieving a user's IP address using a simple image that contains PHP code inside.

How to retrieve an IP address using an image?

Start by finding a free hosting space where it is possible to host any kind of files. Then create a new file named .htaccess and paste the following code into this file.

AddHandler application/x-httpd-php5 .jpg

The .htaccess code will entrust the implementation of ".jpg" files in PHP

Now create another grabber.jpg file with a text editor and add the following code in it:

<?php
$fh = fopen('ip_list.txt', 'a');
fwrite($fh, $_SERVER['REMOTE_ADDR']."
");
fclose($fh);
$im = imagecreatefromjpeg("ladygaga.jpeg");
header('Content-Type: image/jpeg');
imagejpeg($im);
imagedestroy($im);
?>

imagecreatefromjpeg () returns an image identifier representing the image obtained from the given filename.
imagejpeg () prints or saves an image in jpeg format using the picture image.
imagedestroy () frees any memory associated with image .


Finally, find a true image you want to appear to the victim (in my case, it's ladygaga.jpg). Add the three files (grabber.jpg, ladygaga.jpg and .htaccess) in a single folder and change the permissions to 755 grabber.jpg.

Our image is now ready to use, it only remains to host it and send it to the victim. When it will open the image, its IP address will be added in the ip_list.txt file.

Remember that the best support for this blog is to love and share our articles! ;)

For more news, thank you subscribe to the blog or newsletter to its RSS feed. Please also have a look at TwitterGoogle+ or Facebook for other news.
Previous
Next Post »

2 comments

Click here for comments
The Phoenix
admin
February 10, 2016 at 6:04 PM ×

Hi I Tried this and it didnt work. No file was created with the IP addresses. Went back and created a text file manually and still nothing happened. The image is saved in the public_html folder, along with the other files and I simply browse to it via the URL. Can you tell me what I'm doing wrong? Thanks

Reply
avatar
The Phoenix
admin
February 10, 2016 at 6:23 PM ×

Played around a bit and found that the grabber is working if its renamed in php. Seems the handling code is the problem

Reply
avatar