What is JS?
- Client-side, it runs on the computer of the client (victim)
- Object-oriented (Programming term)
- Scripting language, this means cross-site scripting is also possible
What does a JS file contain?
Besides the regular cross site scripting sinks (locations where our XSS attack vector is reflected in the JS) we can also find several other juicy secrets in there that we can use.
These secrets can contain but are not limited to:
- New endpoints, one time i found a whole list of endpoints in the comments
- Hidden parameters
- API keys, sometimes they are supposed to be public though, so be careful with these. Verify the impact before you report! https://github.com/streaak/keyhacks
- Business logic, which we might be able to abuse like client side calculations of prizes
Using BURP SUITE