Hack Forums
[TuT]Simple Method To Grabbing IP Addresses Stealthy[PHP] - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4)
+----- Forum: Hacking Tutorials (https://hackforums.net/forumdisplay.php?fid=47)
+----- Thread: [TuT]Simple Method To Grabbing IP Addresses Stealthy[PHP] (/showthread.php?tid=2113258)



[TuT]Simple Method To Grabbing IP Addresses Stealthy[PHP] - Βαsιχ - Jan 15, 2012



Purpose:Grab IP adresses using PHP logging
Difficulty: Easy
Assumed Knowledge: Copy & Paste/FTP Clients


Okay, let me give you the low down on what this is...

This is a way to get someone's IP adress using a simple PHP logging script. What you are doing is adding 2 files(one ".php" and one ".txt". When you victim visit's the website, their IP will be logged in the ".txt" file. Pretty simple I guess, let's get started.




Ok, to start off make a new file called Index.php . And inside that PHP file add this code:.

Code
<?php
header( 'Location: YOURIMAGEURLHERE' ) ;

$ip=$_SERVER['REMOTE_ADDR'];

$myFile = "ip.txt";
$fh = fopen($myFile, 'a') or die("cannot open file");
$stringData = "$ip\n";
fwrite($fh, $stringData);
fclose($fh);
?>

Now replace "YOURIMAGEURLHERE" with an image you want the page to display. Once changed, save and close the file.




Now make an other file called ip.txt . Leave it empty, because it will be filled out automatically when someone visit's your web site.

Ok, so now you should 2 files. One should be Index.php and and other should be IP.txt.

[IMG]http://i1084.photobucket.com/albums/j407/runefx-virux/1-6.png[/IMG]




Your next step is to upload them to your website.

Make a new directory, it doesn't matter what it is called. Drag and drop the 2 files into that directory.

[IMG]http://i1084.photobucket.com/albums/j407/runefx-virux/2-5.png[/IMG]




Now to get your victim to click the link, your going to go with the picture method.

Go to Dot TK - Renaming The Internet . And type in the url of your website, including the directory the 2 files are in. It should look something like this:

[IMG]http://i1084.photobucket.com/albums/j407/runefx-virux/3-4.png[/IMG]

Once you click NEXT, you should be prompted for you to choose your domain name. Try to choose something more believable. Try to make them think it's a image hosting company.

[IMG]http://i1084.photobucket.com/albums/j407/runefx-virux/4-3.png[/IMG]

So now that you have you .TK url that redirects to your website, your ready to give out your grabber. I'm going to go more in detail on how it will work. And I'm going to give you a little tip.




Most people do not know, but with a .TK link, you can addon to the end of the url, and it will not affect anything. This helps when spoofing a url! Let me give you an example.

[IMG]http://i1084.photobucket.com/albums/j407/runefx-virux/5-3.png[/IMG]

Code
*http://imagedumperzzzz.tk*

IS EQUAL TO

Code
*http://imagedumperzzzz.tk/images/image22242.png*

See what I mean?




Ok, so now your about to send the link to your friend... What do you do once he clicks it? Go back to the ip.txt file I told you to make earlier. The victim's ip should be the one at the bottom. :)

You should go back to the ftp client, and right click the IP.txt file. Click "view/edit", and your victims IP should be right their at the bottom.

[IMG]http://i56.[censored].com/2mw9k40.png[/IMG]

It should look like that, I blocked some numbers to protect the tester's IP.

So have fun grabbing some IP's. What you do with them is not my problem nor my responsiblity.

So here are some Web Hosting company's and domain hosting company's

Free Web Hosting - PHP, MySQL, FTP, Email [That is an okay web hosting company]

CO.CC - Free Domain name registration + Free DNS service. [That is an okay domain hosting company]

Their may be better, you may do some research yourself.




* - Feminist - Jan 15, 2012

or die("cannot open file");

Horrible, horrible, horrible idea right there.


* - Βαsιχ - Jan 15, 2012

(Jan 15, 2012 03:38 PM)scriptkiddy Wrote:  or die("cannot open file");

Horrible, horrible, horrible idea right there.

Why? Thanks for telling me by the way, better that I fix it now than later.


* - OhManLuis - Jan 16, 2012

Good Tut.
Will be using for future reference.


* - Βαsιχ - Jan 18, 2012

Thank you, glad I could help. :) If you have any issues with this just PM me, I'll help you out.


* - Zherk - Jan 18, 2012

thanks for this it helped me a lot.,


* - Matt! - Jan 19, 2012

Thanks Man!
Great Tut
:) :) :) :) :) :):) :) :) :) :) :):) :) :) :) :) :):) :) :) :) :) :):) :) :) :) :) :):) :) :) :) :) :)


* - Βαsιχ - Jan 19, 2012

Glad I could help you guys. :) If you need any more assistance just PM me. :)


* - Βαsιχ - Mar 12, 2013

Grave dig but because it's till an working method and is helpful. :)


* - Gizzmo12 - Mar 12, 2013

Vouch for him very nice :)

legit!

:)


* - 4x4 - Mar 12, 2013

This is an excellent guide, but I have to say there are much easier ways. Thanks for this in-depth contribution nonetheless.