- Run the legit app
rm -rf node_modules && npm i && npm start
- Open [http://localhost:3000/app] (or http://your-macine-name:3000/app), singup and see the balance
- Go to [https://plnkr.co/edit/Vo8wUmFueGYZH3RyUr93]
- If you are using remote machine, fork it and change localhost in the form action to your machine name
- Switch back to the legit user session and click the "check" button
- Note that 1000 were transferred to the hacker account:
- Refresh the app and see that 1000 were deducted
- Login to the hacker account (user: [email protected], pass: 11111) from incognito (or another machine) and see that it has 1000 more
- In
client.tsx
uncomment[XSRF_HEADER_NAME]: cookie.parse(document.cookie)['XSRF-TOKEN']
- In
server.js
uncomment the call toif(validateCsrf(req, res)) {
-- OR -- - Add "sameSite: 'Strict'" to the cookie SESSIONID definition (uncomment it in
server.js
).