Web Security: CSRF
- 19Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
19 questions
- 1Cross-site request forgery, or CSRF, is considered the_____big web attack, often lesser-known than others.
Hint
Think about its ranking in the list of major web attacks mentioned.
Answer
third
- 2Web browsers are described as fairly_____things because they will run code without judging its maliciousness.
Hint
Consider the inherent characteristic of browsers that allows them to execute code without questioning its intent.
Answer
trusting
- 3In the early days of the web, before online banking, the worst malicious code could do was typically to put a_____somewhere.
Hint
Think about the limited scope of malicious actions in the web's early, less complex environment.
Answer
comment
- 4When data is sent in a URL, like_____
youtube.com/watch?v=..., it is typically part of arequest, designed for fetching data.Hint
This type of request often has parameters visible in the browser's address bar.
Answer
GET
- 5A POST request is commonly used when a user interacts with a_____and clicks a 'go' button, bundling data without displaying it in the address bar.
Hint
This method is associated with submitting user input, often through interactive elements.
Answer
form
- 6POST requests are primarily intended for_____things, like making a comment or transferring money, actions that happen once.
Hint
Consider the effect of a POST request on server-side data or state.
Answer
writing
- 7The primary reason POST requests are used for actions like posting comments is to ensure that the same action isn't performed_____when a user refreshes the page.
Hint
Think about the unintended consequence of repeating an action if it were tied to a URL.
Answer
twice
- 8A poorly designed online bank form that allows money transfers with a POST request is vulnerable if it doesn't check where the_____is coming from.
Hint
The vulnerability arises when the server doesn't verify the origin of the action being requested.
Answer
request
- 9Modern web technologies allow actions to happen_____in the background, making it harder for users to notice malicious requests.
Hint
This refers to operations that don't visibly reload the entire page or require explicit user interaction.
Answer
silently
- 10A malicious website can embed an invisible form that automatically sends a request to a vulnerable site when the user_____the malicious page.
Hint
This attack vector doesn't even require the user to click a button on the malicious site.
Answer
loads
- 11A 'delete your account' button that uses a simple GET request like_____
/delete?confirm=truecan be exploited if the target site doesn't verify theof the request.Hint
Consider what critical piece of information the server is lacking about the request's source.
Answer
origin
- 12The Referer header in HTTP was designed to help prevent CSRF by indicating the_____from which a request originated.
Hint
This header tells the server which webpage initiated the current request.
Answer
site
- 13The problem with relying solely on the Referer header is that it isn't always_____, sometimes due to privacy tools or ad blockers.
Hint
Consider why this header might be missing in some user requests.
Answer
sent
- 14The recommended way to circumvent the unreliability of the Referer header for CSRF protection is to use a_____key, also known as a nonce.
Hint
This security measure involves a unique, temporary identifier.
Answer
one-time
- 15A one-time key for CSRF protection works by generating a_____code each time a form is created and then verifying that code when the form is submitted.
Hint
The effectiveness of this key depends on its distinctiveness for each instance.
Answer
unique
- 16For a one-time key to be effective against CSRF, the malicious blog cannot know what this_____is because it changes per user and per request.
Hint
This unique identifier is unknown to unauthorized parties.
Answer
token
- 17If a token for CSRF protection is copied and used later, or for a different person, the server will deem it_____and reject the request.
Hint
The server's response indicates a mismatch or invalidity.
Answer
wrong
- 18Cross-site scripting (XSS) and SQL injection are generally well-known among web developers, but_____often goes under the radar.
Hint
This is the third major web attack mentioned, which many developers are less familiar with.
Answer
CSRF
- 19If a website or web form handles permanent actions like deleting an account, posting a comment, or transferring money, it's a significant security hole if it's not using a_____for CSRF protection.
Hint
This specific security measure is crucial for protecting against cross-site request forgery.
Answer
token

Ask anything
We've read this whole study set, so questions about it get the best answers.