GWT RPC - Does it do enough to protect against CSRF?

前端 未结 4 1811
野性不改
野性不改 2021-02-05 21:21

UPDATE : GWT 2.3 introduces a better mechanism to fight XSRF attacks. See http://code.google.com/webtoolkit/doc/latest/DevGuideSecurityRpcXsrf.html


4条回答
  •  梦毁少年i
    2021-02-05 22:11

    If this GWT RPC is being used by a browser then it is 100% vulnerable to CSRF. The content-type can be set in the html

    element. X-GWT-Permutation and X-GWT-Module-Base are not on Flash's black list of banned headers. Thus it is possible to conduct a CSRF attack using flash. The only header element you can trust for CSRF protection is the "referer", but this isn't always the best approach. Use token based CSRF protection whenever possible.

    Here are some exploits that i have written which should shed some light on the obscure attack i am describing. A flash exploit for this will look something like this and here is a js/html exploit that changes the content-type.

    My exploit was written for Flex 3.2 and the rules have changed in Flex 4 (Flash 10) Here are the latest rules, most headers can be manipulated for requests POST only.

    Flash script that uses navigateTo() for CSRF: https://github.com/TheRook/CSRF-Request-Builder

提交回复
热议问题