nerdexam
EC-Council

312-50V9 · Question #103

A security analyst in an insurance company is assigned to test a new web application that will be used by clients to help them choose and apply for an insurance plan. The analyst discovers that the…

The correct answer is C. Cross-site scripting. The analyst injected a VBScript-based IMG tag into a search field, and the browser executed it as a script, confirming a Cross-Site Scripting (XSS) vulnerability.

Hacking Web Applications

Question

A security analyst in an insurance company is assigned to test a new web application that will be used by clients to help them choose and apply for an insurance plan. The analyst discovers that the application is developed in ASP scripting language and it uses MSSQL as a database backend. The analyst locates the application's search form and introduces the following code in the search input field:

IMG SRC=vbscript:msgbox("Vulnerable");> originalAttribute="SRC" originalPath="vbscript:msgbox ("Vulnerable");>" When the analyst submits the form, the browser returns a pop-up window that says "Vulnerable". Which web applications vulnerability did the analyst discover?

Options

  • ACross-site request forgery
  • BCommand injection
  • CCross-site scripting
  • DSQL injection

How the community answered

(30 responses)
  • A
    7% (2)
  • B
    17% (5)
  • C
    73% (22)
  • D
    3% (1)

Why each option

The analyst injected a VBScript-based IMG tag into a search field, and the browser executed it as a script, confirming a Cross-Site Scripting (XSS) vulnerability.

ACross-site request forgery

Cross-site request forgery tricks an authenticated user's browser into sending an unintended request to a server - it does not involve injecting executable script into an input field.

BCommand injection

Command injection targets server-side OS command execution by injecting shell metacharacters, not client-side script execution in the browser.

CCross-site scriptingCorrect

Cross-site scripting occurs when an attacker injects client-side script code into a web page that is then executed by the victim's browser. The payload 'IMG SRC=vbscript:msgbox()' is a classic XSS vector that abuses the VBScript protocol handler in older IE-based browsers. The resulting pop-up confirms that the browser interpreted and executed the injected script rather than treating it as plain text.

DSQL injection

SQL injection targets backend database queries by inserting SQL syntax into input fields, not JavaScript or VBScript that executes in the browser.

Concept tested: Cross-site scripting (XSS) via script injection

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

Topics

#cross-site scripting#XSS#ASP#web application testing

Community Discussion

No community discussion yet for this question.

Full 312-50V9 Practice