SESSION SECURITY

SESSION HIJACKING

What kind of session identifier does the application employ? Answer options (without quotation marks): "URL parameter", "URL argument", "body argument", "cookie" or "proprietary solution"
#
root@htb:~$ IP=10.129.235.124
root@htb:~$ printf "%s\t%s\n\n" "$IP" "xss.htb.net csrf.htb.net oredirect.htb.net minilab.htb.net" | sudo tee -a /etc/hosts

root@htb:~$ BROWSER > http://xss.htb.net/
 Email: heavycat106
 Password: rocknrol
 
root@htb:~$ BROWSER > http://xss.htb.net/ > F12 > Storage > Cookies
 http://xss.htb.net/
 Name: auth-session
 Value: s%3Ac0m4nIkY17kFNu66H7cagVDcN5lH9ibG.yGcm8fEAhExhH5PFttYLOMw1FavpeBn0dwddeUXAJiU
 
root@htb:~$ BROWSER > New Private Window > http://xss.htb.net/ > F12 > Storage > Cookies
 http://xss.htb.net/
 Name: auth-session
 Value: s%3Ac0m4nIkY17kFNu66H7cagVDcN5lH9ibG.yGcm8fEAhExhH5PFttYLOMw1FavpeBn0dwddeUXAJiU

 * reload the page to bypass the login page
 * ANSWER: cookie

SESSION FIXATION

If the HttpOnly flag was set, would the application still be vulnerable to session fixation? Answer Format: Yes or No
Yes
 * Setting the HttpOnly flag on cookies prevents JavaScript from accessing 
   the cookie, but it does not mitigate session fixation. Session fixation 
   occurs when an attacker sets a user's session ID before the user logs in, 
   allowing them to hijack the session once the user authenticates. 
   To prevent session fixation, the application should regenerate the 
   session ID after the user logs in and ensure that session IDs are securely 
   managed.

OBTAINING SESSION IDENTIFIERS W/O USER INTERACTION

If xss.htb.net was an intranet application, would an attacker still be able to capture cookies via sniffing traffic if he/she got access to the company's VPN? Suppose that any user connected to the VPN can interact with xss.htb.net. Answer format: Yes or No
Yes
 * If the attacker has access to the company's VPN and can interact with the
   intranet application (xss.htb.net), they may be able to sniff traffic 
   within the VPN network. This could allow them to capture cookies or 
   other sensitive data, unless the traffic is encrypted (e.g., via SSL/TLS). 
   However, if SSL encryption is properly implemented (HTTPS), the attacker 
   would not be able to directly sniff the content of the traffic. But, 
   if SSL is not used or the attacker can perform a man-in-the-middle (MITM) 
   attack, they could capture cookies or other sensitive information.

CROSS-SITE SCRIPTING (XSS)

If xss.htb.net was utilizing SSL encryption, would an attacker still be able to capture cookies through XSS? Answer format: Yes or No

CROSS-SITE REQUEST FORGERY (CSRF/XSRF)

If the update-profile request was GET-based and no anti-CSRF protections existed, would you still be able to update Ela Stienen's profile through CSRF? Answer format: Yes or No

CROSS-SITE REQUEST FORGERY (GET-BASED)

If csrf.htb.net was utilizing SSL encryption, would an attacker still be able to alter Julie Rogers' profile through CSRF? Answer format: Yes or No

CROSS-SITE REQUEST FORGERY (POST-BASED)

If csrf.htb.net was utilizing secure cookies, would an attacker still be able to leak Julie Roger's CSRF token? Answer format: Yes or No

XSS & CSRF CHAINING

Same Origin Policy cannot prevent an attacker from changing the visibility of @goldenpeacock467's profile. Answer Format: Yes or No

EXPLOITING WEAK CSRF TOKENS

Our malicious page included a user-triggered event handler (onclick). To evade what kind of security measure did we do that? Answer options (without quotation marks): "Same-Origin Policy", "Popup Blockers", "XSS Filters"

OPEN REDIRECT

If the request to complete.html was GET-based, would you still be able to obtain the token via exploiting the open redirect vulnerability? Answer format: Yes or No

Last updated