XSS Attack

XSS Attack

Assessment

Quiz

Professional Development

Medium

Created by

Phat Dam

Used 2+ times

FREE Resource

Student preview

quiz-placeholder

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Lily is learning about web security and encounters various types of attacks. She wonders which of the following attacks is not a Front End attack.

Directory Access

Cross-Site Request Forgery

Denial of Service (DoS) Attack

Using Content Security Policy

Answer explanation

Directory Access is a back-end attack that targets server resources, while the other options, like Cross-Site Request Forgery and Denial of Service, are front-end attacks affecting user interactions and service availability.

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Avery was learning about web security and came across a term that described a type of attack where malicious scripts are injected into web pages viewed by other users. What does XSS Attack stand for?

Cross Server Scripting

Cross-Site Scripting

Cross Service Scripting

Cross Secure Scripting

Answer explanation

XSS stands for Cross-Site Scripting, a type of attack where attackers inject malicious scripts into web pages. This allows them to execute scripts in the context of another user's session, compromising security.

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

During a school project, Scarlett discovered that a website used by her classmates, including Benjamin and Avery, had a vulnerability. This vulnerability allowed malicious code to be permanently stored on the server. Each time her classmates accessed the website, they unknowingly received the harmful code. What type of XSS attack is this?

DOM-based XSS

Reflected XSS

Stored XSS

Redirected XSS

Answer explanation

The vulnerability described allows harmful code to be stored on the server, affecting all users who access the site. This is characteristic of Stored XSS, where the malicious script is saved and executed whenever the page is loaded.

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

During a class project, Olivia clicks on a link sent by her classmate David, which leads her to a webpage that displays a message. The message contains a script that steals her session cookies. What type of XSS occurs when malicious code is delivered to the user in an HTTP response, often through a URL parameter or a form, without being stored permanently on the server?

Stored XSS

Reflected XSS

DOM-based XSS

Injected XSS

Answer explanation

Reflected XSS occurs when malicious code is delivered via an HTTP response, often through a URL parameter, and is executed immediately without being stored on the server. This matches Olivia's scenario.

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

While working on a group project, Mason noticed that the web application they were using to collaborate was behaving strangely. He discovered that a malicious script was executing within the DOM document of the webpage itself, affecting their work. What type of XSS attack is this?

DOM-based XSS

Stored XSS

Reflected XSS

Session-based XSS

Answer explanation

Mason encountered a script executing within the DOM, indicating that the attack manipulated the client-side code. This is characteristic of DOM-based XSS, where the attack occurs in the browser rather than through server responses.

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

During a web development class, Rohan was experimenting with a new feature on his website. He noticed that when he manipulated the Document Object Model (DOM) using JavaScript, certain actions triggered unexpected behaviors without any server interaction. Among the types of XSS, which one is often harder to detect because it occurs entirely on the client side and does not require any interaction with the server?

Stored XSS

Reflected XSS

DOM-based XSS

Server-side XSS

Answer explanation

DOM-based XSS occurs entirely on the client side, manipulating the DOM without server interaction, making it harder to detect. This aligns with Rohan's experience of unexpected behaviors while using JavaScript.

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Media Image

Based on the code snippet below, what type of XSS attack could occur when Ethan inputs a malicious script in the search bar?

Stored XSS

Reflected XSS

DOM-based XSS

  1. Server-side XSS

Answer explanation

DOM-based XSS occurs when the client-side script manipulates the DOM based on user input. If Ethan inputs a malicious script in the search bar, it can be executed in the browser, making it a DOM-based XSS attack.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?