可以使用多种技术来防止 CSRF/XSRF。
其中一项技术是在客户端向服务器发送的每个请求中使用客户端 session 唯一的 token ;正在服务器端验证。如果请求 token 与服务器端的 token 匹配,则允许该请求进入应用程序,如果不匹配则不允许进入。因此,CSRF 攻击将会被检测到。虽然我很清楚该技术背后的想法,但我不确定 URL 重写如何帮助防止 CSRF 攻击?安全专家可以解释一下吗?
最佳答案
这是一个简短的story那谈到了 URL 重写。它说:
We could mitigate much of the risk of these vulnerabilities by frequently changing our URLs — not once every 200 years but once every 10 minutes. Attackers would no longer be able to exploit application vulnerabilities by mass e-mailing poisoned hyperlinks because the links would be broken and invalid by the time the messages reached their intended victims.
我认为(文章也同意)这是防止此问题发生的总体方法的一个方面。微软也有一个不错的article就是讲这个的。
关于security - 如何使用 URL 重写来防止跨站请求伪造 (XSRF/CSRF) 攻击?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1213246/