Note that there are some explanatory texts on larger screens.

plurals
  1. POIs it possible to perform an CSRF attack on WCF service with webHttpBinding?
    primarykey
    data
    text
    <p>We are using WCF service with <code>webHttpBinding</code> binding to expose endpoint to clients. Service is hosted by IIS (.svc). Client is JavaScript generated automatically using <code>enableWebScript</code> behavior. All methods are using POST.</p> <p>Is it possible to make an CSRF attack to this service?</p> <p>I considered the following options:</p> <ul> <li>AJAX - not possible, because cross site requests are not allowed (I am assuming that our site isn't prone to XSS)</li> <li>HTML Form submit - not possible, because service requires certain HTTP headers which can't be set using HTML form</li> </ul> <p>Is there any other option? Flash, Silverlight, web sockets or something else?</p> <p>Valid request looks like this:</p> <pre><code>POST http://site/Service.svc/ServiceMethod HTTP/1.1 Host: site User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: cs,en-us;q=0.8,en;q=0.5,pl;q=0.3 Accept-Encoding: gzip, deflate Connection: keep-alive X-Requested-With: XMLHttpRequest Content-Type: application/json; charset=utf-8 Referer: http://site/ Content-Length: 33 Cookie: cookies, session id, etc. Pragma: no-cache Cache-Control: no-cache {"param1":11,"param2":"123"} </code></pre> <p>To be clear: I am trying to secure my service. Not perform an attack. I am considering adding an "authentication token" to every call, but first I would like to know if it is worth the effort.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload