Soru

Zorluk: ZorApplication and Software Vulnerabilities

During an application security assessment of an enterprise document ingestion pipeline, an analyst reviews crash logs and source code snippets from a C/C++ processing engine that parses uploaded XML metadata and binary graphics. The analysis reveals two distinct flaws:

1. Submitting a specially crafted payload containing `<!ENTITY xxe SYSTEM "file:///etc/passwd">` causes the engine to return confidential system files in the API response.
2. Submitting an image file with an inflated metadata length field causes the application to write incoming payload bytes past the allocated dynamic memory buffer, leading to process memory corruption and instability.

Which of the following software vulnerabilities are present in this ingestion pipeline? (Select TWO).

  1. XML External Entity (XXE) injection caused by parsing untrusted XML input with enabled external entity resolutionCevap
  2. Heap-based buffer overflow resulting from unchecked memory writes beyond allocated buffer boundaries during metadata parsingCevap
  3. C
    Stored Cross-Site Scripting (XSS) resulting from executing unparameterized SQL queries against the backend database
  4. D
    Broken Object Level Authorization resulting from verifying user identity credentials without granting role permissions

Cevap

The application suffers from an XML External Entity (XXE) vulnerability due to improper XML parser entity resolution, and a heap-based buffer overflow due to missing boundary checks during dynamic memory writing.
The first issue stems from an improperly configured XML parser that processes external entity declarations (`<!ENTITY ... SYSTEM ...>`), leading directly to XML External Entity (XXE) injection and unauthorized local file disclosure. The second issue occurs because the application fails to validate the size of incoming binary data against allocated dynamic memory, causing a heap-based buffer overflow when parsing image metadata.

Adım Adım Çözüm

1
Analyze the first payload vulnerability scenario involving XML parsing.
The payload uses `<!ENTITY xxe SYSTEM ...>` to request local files from the operating system, which is the classic indicator of an XML External Entity (XXE) injection flaw.
XML parsers that do not disable external entity references (DTD processing) allow attackers to exfiltrate files or perform Server-Side Request Forgery.
2
Analyze the second code execution/crash scenario involving memory parsing.
Writing data past the end of a dynamically allocated memory structure based on an untrusted header length field indicates a heap-based buffer overflow.
Without strict bounds checking on dynamic memory operations in C/C++, arbitrary payload bytes overflow memory boundaries, leading to corruption or code execution.
3
Synthesize the findings to select the correct set of vulnerabilities.
XML External Entity (XXE) injection and heap-based buffer overflow are the two confirmed vulnerabilities present in the scenario.
Both findings directly align with input validation and memory safety flaws in software applications.

Anahtar Kavram

Application and Software Vulnerabilities (XXE and Buffer Overflows)
Bu soruyu puanla