Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Image IP logging, redirect your image to any php code

Basically with this you can post pictures and when they see them some php script will run, and you will store the visitor's ip. So we have 4 files:

.htaccess
PHP Code

<?php 
RewriteEngine on
RewriteRule 
^image.gif$ iplogger.php 

iplogger.php
PHP Code

<?php
$log 
= 'logger.html';
$ip = $_SERVER['REMOTE_ADDR'];
$page = $_SERVER['REQUEST_URI'];
$refer = $_SERVER['HTTP_REFERER'];
$date_time = date("l j F Y  g:ia", time() - date("Z")) ;
$agent = $_SERVER['HTTP_USER_AGENT'];
$fp = fopen("logger.html", "a");
fputs($fp, "
<b>
$date_time</b> <br> <b>IP: </b>$ip<br><b>Page: </b>$page<br><b>Refer: </b>$refer<br><b>Useragent: 

</b>
$agent <br><br>
"
);
flock($fp, 3); 
fclose($fp);
?>

logger.html
(empty)

image.gif

EDIT: Most web hosting websites blocks .htaccess, you need to find some that doesn't!
You could use email tracking pictures do do exactly the same, instead of putting them into an email just put them on your web page
(Mar 31, 2013 11:48 AM)alewisGB Wrote:  You could use email tracking pictures do do exactly the same, instead of putting them into an email just put them on your web page

Yes this is very usefull, but one of the disavantages is that "display" code will not run like alerts, defaces etc, you only can run php code for storing data. Or problably you can but you I haven't found a way to do that, people should focuss on this because every website is vulnerable to this, every single one, I only heard about this recently if we dig up this utilities maybe we can get some gold ;)!
x3 Thanks for sharing this, going to use this for other things too. o/
(Apr 1, 2013 06:11 AM)Misaki Mei Wrote:  x3 Thanks for sharing this, going to use this for other things too. o/

No problem mate ;) People seem to look out for old and usual news instead of looking to new exploits....
I'd recommend you use htmlentities() to filter the data being sent to your script. Just incase.
(Apr 1, 2013 08:02 AM)S.a.b.e.r Wrote:  I'd recommend you use htmlentities() to filter the data being sent to your script. Just incase.

So it's a way to bypass code injection?
(Apr 1, 2013 08:08 AM)rfpd Wrote:  So it's a way to bypass code injection?

Well in you're code, the unsanitized input is saved in an html file. This makes it vulnerable to persistent XSS.
Thanks for the help but it's not really a website it's just a new way to hack no one will notice this, but nevertheless good to know!
Thanks for this, it will be useful someday!! #sp
(Apr 1, 2013 03:35 PM)rfpd Wrote:  Thanks for the help but it's not really a website it's just a new way to hack no one will notice this, but nevertheless good to know!

New? Hack?

This is neither. Not trying to sound like an asshole but this has been known for a while.
[Image: e456a9db6c01.jpg]
Edge of Nowhere
No place in particular.
(Apr 1, 2013 06:03 PM)Edge of Nowhere Wrote:  New? Hack?

This is neither. Not trying to sound like an asshole but this has been known for a while.

Searching if you posted this..Found nothing, at least I know how to share.. Thanks anyways...
Thank you for this! Will try it later ;)
(Apr 2, 2013 10:12 AM)m0resleep Wrote:  Thank you for this! Will try it later ;)

No problem mate ;) more to come! I will try to use this exploit and problably find a 0-day :D!
Thanks, works pretty nice. I can't rep you, but I would. Thanks!


Possibly Related Threads...
Thread / Author Replies Views Last Post
by СlassyFeb 9, 2013 10:53 AM 9 239 Feb 9, 2013 10:53 AM
Last Post: Сlassy
by iSmokeWeedNov 8, 2011 07:15 PM 48 843 Nov 8, 2011 07:15 PM
Last Post: illuzions
by Mx.Jun 22, 2011 11:02 PM 5 439 Jun 22, 2011 11:02 PM
Last Post: mlg33boss