The "where to store JWTs" debate is complicated and not without nuance. It's important to realize that there is no 100% secure answer.
That is to say, whatever answer you give, there are associated weaknesses that you must be aware of.
A lot of people will argue that if your app is vulnerable to XSS, cookies with HttpOnly are at least protected from JavaScript, while Session/Local Storage are designed to be accessed by JavaScript.
This might seem like cookies have a big advantage, but what this really means is that cookies cannot be stolen. However, since the browser automatically adds cookies to requests, any XSS attack could send valid requests and steal the data from them. So yes, while you don't get the actual session token, you can still use it, which is ultimately what an attacker wants to do anyway.
Moreover, if you rely on cookies, your app needs to protect itself against CSRF. This has become easier with SameSite cookie attributes, but they are not without their limitations ().
If you use Session/Local Storage and set session tokens via a non-Cookie header (e.g. Authorization), CSRF is impossible. It's important to note that if your app is vulnerable to XSS, all your CSRF protections will fail regardless of how you store session tokens.
Finally, people suggesting Session Storage over Local Storage face the issue that Session Storage is per-tab not per-site. If you store a session token in Session Storage, then right-click a link in your app and "Open in new tab", you will be logged out in that new tab.
This is not me arguing for / against a particular method. As I said at the start, there is no 100% secure solution. This is a brain dump of some of the weaknesses each has so people can make more educated decisions. 🤷portswigger.net/web-security/c…
• • •
Missing some Tweet in this thread? You can try to
force a refresh
10 Burp extensions I actually use... BUT none of them are in the top 30 most popular in the BApp Store!
I get tired of seeing the same extensions come up in "top 10" lists. Here are some hidden gems you might not have tried... yet. In no particular order.
🧵👇
Authentication Token Obtain and Replace (ATOR)
Session expiration is the bane of automation. If a session token expires mid scan, you're left with incomplete results. ATOR detects expired tokens, re-authenticates, and updates requests with the fresh token. Perfect for non-cookie session tokens!
SAML Raider
If you've never tested an API that uses SAML, you're lucky. If you have, you know how frustrating of an experience it can be. SAML Raider is a must have, allowing you to edit, sign, and manipulate SAML messages directly within Burp.
I often get asked what tools I use for web app pentesting, and people are surprised when I say it's 99% Burp Suite Pro. Here's why...
🧵👇
It's called a "Suite" for a reason. It has a lot of features baked in: interception, scanning, fuzzing, analysis, plus extensions that make most external tools redundant.
Need to brute-force parameters, fuzz and detect interesting responses, or send large numbers of payloads? Intruder is powerful, fast, and fully customizable. It handles most use cases where you'd otherwise use wfuzz or ffuf.
OK, I have no idea how long this series of tweets will be, but I've heard from several people associated or previously associated with NCC. While I've verified the association, bear in mind that a lot of this is from single sources.
Since February, NCC NA has tried to diversify its customer base more and has slashed its day rates to remain competitive. NCC Group also started an initiative to create a new center in Manila, where they can offshore cheap scan work.
Round 2 of the layoffs started on Wednesday, August 2nd. Another short-notice North American all-hands meeting was called with the new COO. Prior to this meeting occurring, employees become aware that several people are being called by senior leadership and let go.