Update 2016/02: We were asked by a lot if this still works. Shortly after our disclosure, this issue has been patched. ------ The Background - The Past Gaining access to HttpOnly cookie was first attempted by means of XST, Cross Site Tracing vulnerability. Soon after the popularity of XST, the TRACE method has been disabled by most web servers. Later, browsers' implementation of XMLHttpRequest also blocked "TRACE" method (i.e. xmlhttp.open('TRACE', url, true) ]. Later, a flawed implementation in Firefox's XMLHttpRequest which can be used to access set-cookie response header was fixed. JS Debugger pointing out "TRACE" method as invalid arugment JS Debugger pointing out "TRACE" method as illegal value A Sla.ckers.org forum member, LeverOne, posted ways to access HttpOnly cookie through the use of Java API and applet. I reproduced his techniques. When the first method was tried, the Java Runtime did no
The Background We have been seeing authentication session ID appeared in URL Query String/REST URI and page body. The use of session ID in Query String is to enable session tracking for web browsers which disable or do not support browser-based cookie mechanism. This is commonly seen in Java web applications and cookieless mechanism in ASP.net web applications . From what we have seen so far, the session ID in page body is used as anti Cross Site Request Forgery token or anti-cache parameter though it is not very common. The Problem It should be noted that even though developers use the "HttpOnly" session cookie, the above-mentioned leakages of session ID in URL and page body nullify the effectiveness of "HttpOnly" flag. This no doubt leads attackers to gain access to the HttpOnly session cookie via an Cross Site Scripting (XSS) vulnerability as JavaScript can read anything in the page body and URL information.
This framework is makes security simple to achieve. Out of all non-default settings, the little following can be set to achieve higher security settings. Fortify session cookie security. config/session.php 'secure' => true, 'expire_on_close' => true, 'http_only' => true, 'same_site' => "strict", Use env call to credentials. Do not use hard-coded values. /config/database.php
Comments
Post a Comment