1 / 12

Automatic and Precise Client-Side Protection against CSRF Attacks

Automatic and Precise Client-Side Protection against CSRF Attacks. Road Map. Background / Example Problem of Current Countermeasures Main Ideas Evaluation the Assumption. Background. CSRF: Cross Site Request Forgery

bern
Download Presentation

Automatic and Precise Client-Side Protection against CSRF Attacks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Automatic and Precise Client-Side Protection against CSRF Attacks

  2. Road Map • Background / Example • Problem of Current Countermeasures • Main Ideas • Evaluation the Assumption

  3. Background • CSRF: Cross Site Request Forgery • Two domains A and B. Content of origin B initiate requests to origin A, and the browser will treat these requests as being part of the ongoing session with A. • The problem is: if the session with A is authenticated session, B can initiate privileges requests to A, without the user being involved.

  4. Example <html> <body> <form action=”https://mdsec.net/auth/390/NewUserStep2.ashx” method=”POST”>Chapter 13 Attacking Users: Other Techniques 505 <input type=”hidden” name=”realname” value=”daf”> <input type=”hidden” name=”username” value=”daf”> <input type=”hidden” name=”userrole” value=”admin”> <input type=”hidden” name=”password” value=”letmein1”> <input type=”hidden” name=”confirmpassword” value=”letmein1”> </form> <script> document.forms[0].submit(); </script> </body> </html> POST /auth/390/NewUserStep2.ashx HTTP/1.1 Host: mdsec.net Cookie: SessionId=8299BE6B260193DA076383A2385B07B9 Content-Type: application/x-www-form-urlencoded Content-Length: 83 realname=daf&username=daf& userrole=admin&password=letmein1& confirmpassword=letmein1

  5. Problem of Current Countermeasures • Server-Side: • Require server-side modifications on source code level and it may take a very long time. • Client-Side: • Too strict • Server-Proxy: • Have not published

  6. Main Idea • Except expected request, client-side state is stripped from all cross-origin requests. • Expected Request: A cross-origin request from A to B is expected if B previously delegated to A. • B delegates to A if • B issues a POST request, or • B redirects to A with parameters Conclusion: When origin A trying to send request to origin B, client-side state is stripped, Unless, B trust A.

  7. Main Idea • Two reasons: • Non-malicious collaboration scenarios follow this pattern. • It is hard for attacker to bypass the countermeasure.

  8. Filtering Algorithm

  9. Evaluating the Trusted-Delegation Assumption • Assumption: An origin won’t be attacked by a “trusted” origin. • Origin A trust origin B only if A post message to B or A redirect to B with parameters. • 10 out of 23 hundred origins are left unprotected by the countermeasure.

  10. Redirecting Search Engines http://www.google.com.hk/url?sa=t&rct=j&q=books&source=web&cd=3&ved=0CFAQFjAC&url=http%3A%2F%2Fwww.bookdepository.co.uk%2F&ei=Y_2RT7LLApKQ8wSn8bDvAw&usg=AFQjCNF8hAxvKCjeraYiftw74cony0jTkQ GET Redirect [Trust] http://www.bookdepository.com/

  11. URL shorteners http://www.malicious.com/2012/04/20/world/meast/bahrain-f1-explainer/index.html?hpt=wo_c2 https://bitly.com/ http://bit.ly/IFLzqI Redirect http://www.malicious.com/2012/04/20/world/meast/bahrain-f1-explainer/index.html?hpt=wo_c2

  12. Questions

More Related