digininja/DVWA

httponly

dinahwaitat opened this issue · 10 comments

hello i am try with the reflected xss on the low level mode but when i try to submit the java script with the document.cookie i noticed that not all cookies appears ,, so i found that the httponly flag is activated in the cookies were there is php id session even i am working with the low level mode ,, i am using kali and installed dvwa recently and manually by git clone ,, btw i tried with firefox and chromium the same problem

What mode were you in when the cookie was set?

i am not sure but i think it was impossible

how can i work at low level mode with httponly flag false as it suppose to be

thank you so much ,, and there is anything i have to do before retry ?

thank u for your effort i have three question:

  1. do u think my problem in this section within dvwapage.inc.php :
    // Valid security levels
    $security_levels = array('low', 'medium', 'high', 'impossible');
    if( !isset( $_COOKIE[ 'security' ] ) || !in_array( $_COOKIE[ 'security' ], $security_levels ) ) {
    // Set security cookie to impossible if no cookie exists
    if( in_array( $_DVWA[ 'default_security_level' ], $security_levels) ) {
    dvwaSecurityLevelSet( $_DVWA[ 'default_security_level' ] );
    } else {
    dvwaSecurityLevelSet( 'impossible' ); // maybe here ?

     }
    
  2. and this is where u want me to set httponly true 👍
    session_set_cookie_params([
    'lifetime' => $maxlifetime,
    'path' => '/',
    'domain' => $domain,
    'secure' => $secure,
    'httponly' => $httponly, // here right ?
    'samesite' => $samesite
    ]);

  3. when this issue will be solved please ,, again and again thank u so much

This should now be fixed with the update 7671c3a. You will need to update your repo to test it.

Any problems, let me know.

Fairly sure this is fixed now.