1. Home
  2. Explore
  3. Computer Science
  4. Web Security: CSRF

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Web Security: CSRF

  • 19Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: CSRF Basics
Cross-site request forgery, or CSRF, is considered the
big web attack, often lesser-known than others.

19 questions

  1. 1
    Cross-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

  2. 2
    Web 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

  3. 3
    In 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

  4. 4
    When data is sent in a URL, like youtube.com/watch?v=..., it is typically part of a
    _____
    request, designed for fetching data.
    Hint

    This type of request often has parameters visible in the browser's address bar.

    Answer

    GET

  5. 5
    A 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

  6. 6
    POST 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

  7. 7
    The 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

  8. 8
    A 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

  9. 9
    Modern 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

  10. 10
    A 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

  11. 11
    A 'delete your account' button that uses a simple GET request like /delete?confirm=true can be exploited if the target site doesn't verify the
    _____
    of the request.
    Hint

    Consider what critical piece of information the server is lacking about the request's source.

    Answer

    origin

  12. 12
    The 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

  13. 13
    The 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

  14. 14
    The 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

  15. 15
    A 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

  16. 16
    For 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

  17. 17
    If 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

  18. 18
    Cross-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

  19. 19
    If 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

1 of 19
Question 1 of 19

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent