Title: Frontend Typosquatting
Category: Insecure Deserialization
Difficulty: ⭐⭐⭐⭐⭐ (5/6)
This challenge involves identifying a typographical error in the naming of a frontend library used by the Juice Shop, which could potentially be exploited by a malicious actor.
- Web Browser: Used to access the application's frontend and view third-party library licensing information.
- npm Repository: Checked the legitimacy of the libraries listed in the Juice Shop's frontend.
Navigated to http://localhost:3000/3rdpartylicenses.txt
on the Juice Shop application to review the licensing and dependency information of third-party libraries included in the frontend built with Angular.
Reviewed each library mentioned in the 3rdpartylicenses.txt
:
-
Library Review: Each library name and version listed in the license file was verified against the npm repository to confirm their authenticity and check for any known vulnerabilities or mismatches.
-
Spotting the Typo: Noticed an unusual spelling for what should have been "angular2-qrcode" but was listed as "anuglar2-qrcode." This prompted a further investigation.
Searched for "anuglar2-qrcode" on npm to verify if it was a legitimate package:
- npm Search: The search confirmed that the library "anuglar2-qrcode" was indeed a typo and potentially a typosquatted package, intended to deceive users by mimicking the name of a well-known package.
Reported the typo and the potential security risk associated with the typosquatted package to the Juice Shop team via the contact page within the application.
The typographical error in the library name was a crucial discovery that led to identifying a potential security threat. By carefully reviewing and cross-referencing the third-party libraries with npm, the malicious or mistaken inclusion of a typosquatted package was successfully identified and reported.
- Thorough Validation: Ensure that all third-party dependencies are thoroughly validated against reputable sources before inclusion in the project.
- Automated Scanning: Implement automated tools to scan and flag any discrepancies in library names, versions, and checksums.