Soru

Zorluk: OrtaApplication and Software Vulnerabilities

During a security assessment of a web application's user search module, an analyst inspects the backend implementation and observes two main security weaknesses:
1. User input from the search query parameter is directly concatenated into a dynamic database command string without prior validation or parameterization.
2. The raw search input is included verbatim in the application's HTML response page to display the search term without sanitization or output encoding.

Which of the following application vulnerabilities are present in this module? (Select TWO.)

  1. SQL InjectionCevap
  2. Reflected Cross-Site ScriptingCevap
  3. C
    Insecure Direct Object Reference
  4. D
    Buffer Overflow

Cevap

The application suffers from SQL Injection and Reflected Cross-Site Scripting.
SQL Injection occurs because user input is concatenated directly into SQL queries without parameterization, allowing arbitrary command execution on the database. Reflected Cross-Site Scripting occurs because untrusted input is reflected immediately in the HTML output without context-aware encoding, allowing client-side script execution in the victim's browser.

Adım Adım Çözüm

1
Analyze the first implementation flaw.
Directly concatenating untrusted user input into database query strings allows attackers to alter query logic, constituting SQL Injection.
Input parameterization or prepared statements are required to separate code execution from user-supplied data.
2
Analyze the second implementation flaw.
Reflecting raw user input back into the browser's rendered HTML response without output encoding enables malicious scripts to execute in the client context, constituting Reflected Cross-Site Scripting.
Context-aware HTML and JavaScript output encoding is required to render user input safely.
3
Evaluate distractors.
Insecure Direct Object Reference involves unauthorized access via object identifiers, and Buffer Overflow involves memory bounds violations; neither flaw matches the scenario description.
Accurate vulnerability identification ensures proper selection of mitigation controls.

Anahtar Kavram

Identifying application vulnerabilities from data handling and backend code flaws.
Bu soruyu puanla