nerdexam
CompTIA

SY0-501 · Question #244

A security analyst receives an alert from a WAF with the following payload: var data= "<test test test>" ++ <../../../../../../etc/passwd>" Which of the following types of attacks is this?

The correct answer is D. JavaScript data insertion. The payload contains JavaScript variable assignment with embedded data including a path traversal string, indicating a JavaScript data insertion attack detected by the WAF.

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

Question

A security analyst receives an alert from a WAF with the following payload:

var data= "<test test test>" ++ <../../../../../../etc/passwd>" Which of the following types of attacks is this?

Options

  • ACross-site request forgery
  • BBuffer overflow
  • CSQL injection
  • DJavaScript data insertion
  • EFirewall evasion scipt

How the community answered

(48 responses)
  • A
    4% (2)
  • B
    2% (1)
  • C
    15% (7)
  • D
    73% (35)
  • E
    6% (3)

Why each option

The payload contains JavaScript variable assignment with embedded data including a path traversal string, indicating a JavaScript data insertion attack detected by the WAF.

ACross-site request forgery

Cross-site request forgery (CSRF) involves tricking a user's browser into making unauthorized requests to another site, not injecting JavaScript variable assignments with malicious payloads.

BBuffer overflow

Buffer overflow attacks attempt to overwrite memory by sending more data than a buffer can hold, typically targeting compiled applications rather than injecting JavaScript variable declarations.

CSQL injection

SQL injection involves inserting malicious SQL statements into database queries (e.g., using SQL keywords like SELECT, UNION, DROP), which is not present in this JavaScript-based payload.

DJavaScript data insertionCorrect

The payload begins with 'var data=' which is a JavaScript variable declaration, and it attempts to insert malicious data (including a path traversal string to /etc/passwd) through JavaScript. This is a JavaScript data insertion attack where an attacker embeds malicious content within JavaScript variables, potentially exploiting how the application processes or renders this data.

EFirewall evasion scipt

Firewall evasion scripts are designed to bypass firewall rules or detection mechanisms, whereas this payload is a direct injection attempt that was actually detected and alerted on by the WAF.

Concept tested: Identifying JavaScript-based injection attack payloads in WAF alerts

Source: https://owasp.org/www-community/attacks/xss/

Topics

#JavaScript injection#WAF#web application attacks#XSS

Community Discussion

No community discussion yet for this question.

Full SY0-501 Practice