nerdexam
CompTIA

220-1102 · Question #665

Which of the following attacks can a hacker use to execute code on a user's computer when the user visits a specially prepared, malicious website?

The correct answer is C. XSS. Cross-site scripting (XSS) (Option C) allows attackers to inject malicious scripts into web pages viewed by users. When the user visits the compromised site, the script runs in the user's browser, potentially allowing the attacker to steal data or perform unauthorized actions. XS

Security

Question

Which of the following attacks can a hacker use to execute code on a user's computer when the user visits a specially prepared, malicious website?

Options

  • ADoS
  • BSpoofing
  • CXSS
  • DSQL injection

How the community answered

(16 responses)
  • B
    6% (1)
  • C
    94% (15)

Explanation

Cross-site scripting (XSS) (Option C) allows attackers to inject malicious scripts into web pages viewed by users. When the user visits the compromised site, the script runs in the user's browser, potentially allowing the attacker to steal data or perform unauthorized actions. XSS is a common vulnerability in web applications that allows code execution.

Topics

#XSS#Web security#Client-side scripting#Malicious code

Community Discussion

No community discussion yet for this question.

Full 220-1102 Practice