This project simulates a blog with an XSS (Cross-Site Scripting) vulnerability. The blog includes a commenting feature that allows storing and displaying unfiltered HTML code. This creates an opportunity for attackers to inject malicious code into comments, which can then be displayed to other users. Within the ./db/comments.json
file, there is already a malicious comment stored, designed to steal users' cookies and send them to a "Hacker Server". The logic for the Hacker Server can be found in the ./XSSHackerServer
directory.
The project comprises two main components:
- Blog: The blog displays comments and stores them in a JSON file.
- Hacker Server: The server designed to receive stolen cookies and store them in a file.
To run the project:
- Clone the repository.
- Navigate to the project directory.
- Start the blog page.
- Interact with the blog by leaving comments and observing the XSS vulnerability.
- Test the login functionality and observe the stolen cookies in the
./XSSHackerServer/db/cookies.json
file.
This project is licensed under the MIT License. See the LICENSE file for more information.