--
You received this message because you are subscribed to the Google Groups "Central New York ColdFusion Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfugcny+u...@googlegroups.com.
To post to this group, send email to cfu...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfugcny.
For more options, visit https://groups.google.com/d/optout.
Good point Kristin. The dreaded HTTP_ prefix ;) But, I am more concerned about the vast array of loopholes in the CSRFVerifyToken functionality.
Having read the information from the link Pete supplied, it seems that this method is almost pointless, in terms of its security gains. If I decide to use it, I will be using CSRFGenerateToken(), in its most basic form, without any arguments. It is kind of pointless using a key or force refresh, because the important part is the SESSION_ID that the token is tied to, and not the token itself. Using a random string makes zero difference, because the attacker can obtain the token easily, by Firebugging the form. So, I will just let the system generate the string for me.
Pete. I understand what you are saying.
But consider this:
1) If the attacker has access to the form's URL, which he/she must have in order to succeed, the attacker could visit the legitimate form by pasting the form's URL into the browser's address bar, assuming that it is a public form.
For forms behind a login, the attacker could create an account and access the form this way.
2) The attacker would then have access to the form and the hidden form field's token. The attacker could then copy the form's HTML and then add it to a page, visited by the victim.
The attacker would then change the form fields 'acct' and 'amount' values, and the value of the submit button. See below:
>form action="http://bank.com/transfer.do" method="POST"<
>input type="hidden" name="acct" value="MARIA"/<
>input type="hidden" name="amount" value="100000"/<
>input type="hidden" name="csrftoken" value="foobar"/<
>input type="submit" value="View my pictures"/<
>/form<
When the victim visits the page and clicks on the form's spoofed submit button, the form will get posted and pass verification.
Pete. Please forgive me, if you find my line of enquiry, frustrating. But, I really need to understand the 'nuts & bolts', so to speak!
I am sure you are right about all of this, because of your extensive experience in this area, but I need to make sure, I have all the bases covered, before implementing this solution.
Thanks for your patience.
Pete. Light bulb moment!
Now, I understand. So, when you create the token, it is tied to the session.
Does, it make that much difference, adding a different key for each form & using the 'forceNew' argument?
Would you recommend this?
Pete
I assume, the 'key' argument works like this:
session.csrfToken = hash(arguments.key, "SHA-512")