nerdexam
EC-Council

312-50V11 · Question #985

Which of the following web vulnerabilities would an attacker be attempting to exploit if they delivered the following input? <!DOCTYPE blah [ < IENTITY trustme SYSTEM "file:///etc/passwd" > ] >

The correct answer is A. XXE. The payload defines an XML external entity using a SYSTEM identifier pointing to a local file path, which is the textbook signature of an XXE (XML External Entity) injection attack.

Hacking Web Applications

Question

Which of the following web vulnerabilities would an attacker be attempting to exploit if they delivered the following input? <!DOCTYPE blah [ < IENTITY trustme SYSTEM "file:///etc/passwd" > ] >

Options

  • AXXE
  • BSQLi
  • CIDOR
  • DXXS

How the community answered

(54 responses)
  • A
    85% (46)
  • B
    9% (5)
  • C
    2% (1)
  • D
    4% (2)

Why each option

The payload defines an XML external entity using a SYSTEM identifier pointing to a local file path, which is the textbook signature of an XXE (XML External Entity) injection attack.

AXXECorrect

XXE injection exploits XML parsers that resolve external entity references without restriction. The payload <!DOCTYPE blah [<!ENTITY trustme SYSTEM 'file:///etc/passwd'>]> defines an entity that maps to the server's /etc/passwd file; when the entity is referenced in the document body the parser reads and returns the file contents, enabling sensitive data disclosure or server-side request forgery.

BSQLi

SQL injection inserts malicious SQL syntax into database query strings; the payload shown uses XML DOCTYPE and ENTITY declarations which are completely outside the SQL grammar.

CIDOR

IDOR exploits broken access controls by manipulating identifiers such as user IDs in HTTP requests to access unauthorized objects, with no involvement of XML parsing or entity resolution.

DXXS

XSS injects client-side script into pages rendered by other users' browsers; it requires HTML or JavaScript payloads, not XML DOCTYPE declarations with SYSTEM entity references.

Concept tested: XML External Entity (XXE) injection attack identification

Source: https://owasp.org/www-project-top-ten/2017/A4_2017-XML_External_Entities_(XXE)

Topics

#XXE injection#XML external entity#DOCTYPE payload#file disclosure

Community Discussion

No community discussion yet for this question.

Full 312-50V11 Practice