nerdexam
CompTIA

SY0-501 · Question #450

Which of the following attack types BEST describes a client-side attack that is used to manipulate an HTML iframe with JavaScript code via a web browser?

The correct answer is C. XSS. The attack described, involving client-side manipulation of HTML iframes with JavaScript via a web browser, is characteristic of a Cross-Site Scripting (XSS) attack.

Submitted by stefanr· Mar 4, 2026Threats, vulnerabilities, and mitigations

Question

Which of the following attack types BEST describes a client-side attack that is used to manipulate an HTML iframe with JavaScript code via a web browser?

Options

  • ABuffer overflow
  • BMITM
  • CXSS
  • DSQLi

How the community answered

(50 responses)
  • A
    4% (2)
  • B
    2% (1)
  • C
    84% (42)
  • D
    10% (5)

Why each option

The attack described, involving client-side manipulation of HTML iframes with JavaScript via a web browser, is characteristic of a Cross-Site Scripting (XSS) attack.

ABuffer overflow

Buffer overflow attacks exploit memory vulnerabilities by writing more data to a buffer than it can hold, corrupting adjacent memory, and are not specific to client-side HTML/JavaScript manipulation.

BMITM

Man-in-the-Middle (MITM) attacks involve an attacker intercepting and potentially altering communications between two parties, which is different from directly manipulating a client's web browser content with injected scripts.

CXSSCorrect

Cross-Site Scripting (XSS) is a client-side web application vulnerability that allows attackers to inject malicious scripts, typically JavaScript, into web pages viewed by other users. These injected scripts execute in the victim's browser, enabling manipulation of the Document Object Model (DOM), including HTML elements like iframes, to steal session cookies, deface websites, or redirect users.

DSQLi

SQL Injection (SQLi) is a server-side attack where an attacker injects malicious SQL code into input fields to manipulate or retrieve data from a backend database, not a client-side browser attack manipulating HTML iframes.

Concept tested: Cross-Site Scripting (XSS) attack principles

Source: https://learn.microsoft.com/en-us/azure/security/fundamentals/xss-attacks-prevention

Topics

#XSS#cross-site scripting#client-side attacks#web security

Community Discussion

No community discussion yet for this question.

Full SY0-501 Practice