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.
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)- A7% (2)
- B17% (5)
- C73% (22)
- D3% (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.
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.
Command injection targets server-side OS command execution by injecting shell metacharacters, not client-side script execution in the browser.
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.
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
Community Discussion
No community discussion yet for this question.