Gamma, Tim and Gerasimenko, Natalia (2024) React Security Labs. Other thesis, OST Ostschweizer Fachhochschule.
FS 2024-BA-EP-Gerasimenko-Gamma-React Security Labs.pdf - Supplemental Material
Download (17MB)
Abstract
Introduction
In the field of web development, ensuring security is crucial.
This project, React Security Labs, under the School of Computer Science at OST Eastern Switzerland University of Applied Sciences and Compass Security, focuses on enhancing web security education.
The aim is to create practical, hands-on labs on the Hacking Lab platform that simulate common security vulnerabilities within a React application. Those vulnerabilities will be implemented into a Swiss-themed webshop.
Approach
The project began with research, particularly focusing on the most common web vulnerabilities in React and the selection of relevant vulnerabilities. Afterwards, the requirements were defined, and the React frontend of the webshop was developed. The Flask backend could be reused from a different webshop. The security vulnerabilities were integrated, based on the research on the most common React-specific vulnerabilities. Step-by-step solutions were developed to demonstrate how exploits could occur if prevention mechanisms are not used. Docker was used for containerization and delivered as a zip file to Compass Security AG, which maintains labs on the Hacking Lab platform. This setup allows for starting and stopping the vulnerable webshop within the labs.
Result
The project successfully developed a functional React-based cheese-themed webshop incorporating various React security labs. These labs cover a range of common vulnerabilities, including three different Cross-Site Scripting (XSS) scenarios and Cross-Site Request Forgery (CSRF). The CSRF lab demonstrates a CSRF attack scenario if no protection mechanisms are used. Since React does not have built-in CSRF protection (unlike e.g. Angular), a solution was provided on how CSRF protection can be implemented using React and Flask. Additionally, a vulnerable setup lab was included to demonstrate the risks associated with not regularly updating application dependencies. Also, a comparison was made between security mechanisms in React, Angular, and Vue.
The React Security Labs project achieved its goal of creating challenges that allow users to see and exploit the most common React-specific web vulnerabilities. Additionally, research showed that most websites use reasonably up-to-date versions of React, similar to Angular and Vue websites. While React offers protection against XSS, it does not provide built-in protection against CSRF. Therefore, it is vital to adhere to security best practices to achieve the most secure React application.
Item Type: | Thesis (Other) |
---|---|
Subjects: | Topics > Security Technologies > Programming Languages > Java Script Technologies > Frameworks and Libraries > React Metatags > ITA (Institute for Internet Technologies and Applications) |
Divisions: | Bachelor of Science FHO in Informatik > Bachelor Thesis |
Depositing User: | OST Deposit User |
Contributors: | Contribution Name Email Thesis advisor Brunschwiler, Cyrill UNSPECIFIED Expert Risch, Thomas UNSPECIFIED Proofreader Loch, Frieder UNSPECIFIED |
Date Deposited: | 04 Oct 2024 05:49 |
Last Modified: | 04 Oct 2024 05:49 |
URI: | https://eprints.ost.ch/id/eprint/1228 |