312-39 practice question 8 of 35

An attacker, in an attempt to exploit the vulnerability in the dynamically generated welcome page, inserted code at the end of the company’s URL as…

Choose your answer, then check it against the explanation and the full breakdown below.

An attacker, in an attempt to exploit the vulnerability in the dynamically generated welcome page, inserted code at the end of the company’s URL as follows: http://technosoft.com.com/alert("WARNING: The application has encountered an error");. Identify the attack demonstrated in the above scenario.
Answer options
Question 8 of 35

Question breakdown

Tests
Identify web application attacks from indicators in URLs
Difficulty
Easy

Key idea: Cross-site scripting injects script code into a dynamically generated page through user-controlled input, such as URL parameters, that the page reflects back to the user.

How to reach the answer

  1. Clue: 'dynamically generated welcome page' plus code appended to the URL.
  2. A welcome page that echoes a username or parameter from the URL is the classic reflected XSS target.
  3. The script payload appears to have been stripped from the question text, but the scenario still matches reflected XSS.
  4. There is no database query manipulation (SQLi), resource exhaustion (DoS) or session token abuse described.

Each option

  • ACorrect. Appending script code to the URL of a page that reflects input dynamically is reflected cross-site scripting.
  • BIncorrect. SQL injection targets backend database queries with SQL syntax, not page output rendered in the browser.
  • CIncorrect. DoS aims to exhaust resources, and a single crafted URL injecting code is not a DoS indicator.
  • DIncorrect. Session attacks involve hijacking or fixing session IDs, which the scenario does not mention.

Common trap: Any 'code inserted in URL' scenario tempts candidates to pick SQL injection, but a reflected welcome page signals script injection.

In practice: Analysts look for encoded , javascript: or event-handler strings in web server and WAF logs to detect XSS attempts.

Remember: Code in a URL that is reflected into a dynamic page is XSS; SQL syntax aimed at a database is SQLi.

Drafted with AI assistance and checked against the answer key.

Keep practicing

Take the free 312-39 practice test

Ten exam-style questions with answers and explanations, plus the exam facts and study guides.

Start the free practice test

More questions

Other 312-39 practice questions

Scroll to Top