To see how csrf attack works.
- NodeJS (to run the server).
- Clone this repo.
- You need two terminals, one opened on the
site-1, and the other forsite-2folders. - On each terminal, type
node server.jsto run the servers, Change the ports if it's used by other apps. - Go to the browser, run the site one using "localhost:5000".
- See the site-2 terminal, you will see that "SOMEONE REQUESTED", but you didn't!
On the site-1, see the tag, it's src attribute makes the request to the site-2, without a permission from the user.