I'm on a course and there is a bank application which I need to attack by getting users visit my site which instantly transfers X amount of money to my balance.
Their transaction form posts the recipient, the amount, and the a CSRF token at api/transfer.
I've already managed to get the user's CSRF token (based on this tutorial):
function jsonApi(json)
{
var token = json["token"];
console.log(token);
}
</script>
<script src="someUrl.com/api/getcsrf?api_key=xyz&nojsoncallback=0&format=json"></script>
The above url returns:
jsonApi({
"token": "a-token"
})
So I have every required data to perform the transfer, but now I don't know how could I finish the task.
There is a form at someUrl.com/account for transfering money, and there is a POST method at someUrl.com/api/transfer.
Feel free to ask because there is a high chance that I have some useful extra information.