An adversary corrupts or modifies the content of XML schema information passed between a client and server for the purpose of undermining the security of the target. XML Schemas provide the structure and content definitions for XML documents. Schema poisoning is the ability to manipulate a schema either by replacing or modifying it to compromise the programs that process documents that use this schema.
Description
Attack Execution Flow
Step 1
Explore[Determine if XML schema is local or remote] Because this attack differs slightly if the target uses remote XML schemas versus local schemas, the adversary first needs to determine which of the two are used.
[Determina se lo schema XML è locale o remoto] Poiché questo attacco differisce leggermente se l'obiettivo utilizza schemi XML remoti rispetto a quelli locali, l'avversario deve prima determinare quale dei due viene utilizzato.
Step 2
Experiment[Gain access to XML schema] The adversary gains access to the XML schema so that they can modify the contents.
For a local scenario, the adversary needs access to the machine that the schema is located on and needs to gain permissions to alter the contents of the file.
For a remote scenario, the adversary needs to be able to sniff HTTP traffic that contains an XML schema.
[Ottenere accesso allo schema XML] L'avversario ottiene l'accesso allo schema XML in modo da poter modificare i contenuti.
In uno scenario locale, l'avversario necessita di accesso alla macchina su cui si trova lo schema e deve ottenere i permessi per modificare il contenuto del file.
In uno scenario remoto, l'avversario deve essere in grado di intercettare il traffico HTTP che contiene uno schema XML.
Attack Techniques
-
For a local scenario, the adversary needs access to the machine that the schema is located on and needs to gain permissions to alter the contents of the file.
-
For a remote scenario, the adversary needs to be able to sniff HTTP traffic that contains an XML schema.IT: Per uno scenario locale, l'avversario necessita di accedere alla macchina su cui si trova lo schema e di ottenere i permessi per modificare il contenuto del file.
Step 3
Exploit[Poison XML schema] Once the adversary gains access to the XML schema, they will alter it to achieve a desired effect. Locally, they can simply modify the file. For remote schemas, the adversary will alter the schema in transit by performing an adversary in the middle attack.
Cause a denial of service by modifying the schema so that it does not contain required information for subsequent processing. For example, the unaltered schema may require a @name attribute in all submitted documents. If the adversary removes this attribute from the schema then documents created using the new grammar may lack this field, which may cause the processing application to enter an unexpected state or record incomplete data.
Manipulation of the data types described in the schema may affect the results of calculations. For example, a float field could be changed to an int field.
Change the encoding defined in the schema for certain fields allowing the contents to bypass filters that scan for dangerous strings. For example, the modified schema might use a URL encoding instead of ASCII, and a filter that catches a semicolon (;) might fail to detect its URL encoding (%3B).
[Poison XML schema] Una volta che l’adversary ottiene accesso allo schema XML, lo modificherà per ottenere l’effetto desiderato. Localmente, può semplicemente modificare il file. Per gli schemi remoti, l’adversary altererà lo schema in transito eseguendo un attacco man-in-the-middle.
Indurre un denial of service modificando lo schema in modo che non contenga le informazioni richieste per l’elaborazione successiva. Ad esempio, lo schema originale potrebbe richiedere un attributo @name in tutti i documenti inviati. Se l’adversary rimuove questo attributo dallo schema, i documenti creati con la nuova grammatica potrebbero mancare di questo campo, causando lo stato inatteso dell’applicazione di elaborazione o la registrazione di dati incompleti.
La manipolazione dei tipi di dati descritti nello schema può influenzare i risultati dei calcoli. Ad esempio, un campo float potrebbe essere modificato in un campo int.
Modificare la codifica definita nello schema per alcuni campi, consentendo ai contenuti di bypassare i filtri che cercano stringhe pericolose. Ad esempio, lo schema modificato potrebbe utilizzare una codifica URL invece di ASCII, e un filtro che rileva un punto e virgola (;) potrebbe non rilevare la sua codifica URL (%3B).
Attack Techniques
-
Cause a denial of service by modifying the schema so that it does not contain required information for subsequent processing. For example, the unaltered schema may require a @name attribute in all submitted documents. If the adversary removes this attribute from the schema then documents created using the new grammar may lack this field, which may cause the processing application to enter an unexpected state or record incomplete data.
-
Change the encoding defined in the schema for certain fields allowing the contents to bypass filters that scan for dangerous strings. For example, the modified schema might use a URL encoding instead of ASCII, and a filter that catches a semicolon (;) might fail to detect its URL encoding (%3B).IT: Causare un denial of service modificando lo schema in modo che non contenga le informazioni richieste per l'elaborazione successiva. Ad esempio, lo schema non modificato potrebbe richiedere un attributo @name in tutti i documenti inviati. Se l'attaccante rimuove questo attributo dallo schema, i documenti creati utilizzando la nuova grammatica potrebbero mancare di questo campo, il che potrebbe causare al sistema di elaborazione di entrare in uno stato inaspettato o di registrare dati incompleti.
-
Manipulation of the data types described in the schema may affect the results of calculations. For example, a float field could be changed to an int field.IT: Causare un denial of service modificando lo schema in modo che non contenga le informazioni richieste per l'elaborazione successiva. Ad esempio, lo schema non modificato potrebbe richiedere un attributo @name in tutti i documenti inviati. Se l'attaccante rimuove questo attributo dallo schema, i documenti creati utilizzando la nuova grammatica potrebbero mancare di questo campo, il che potrebbe causare al sistema di elaborazione di entrare in uno stato inaspettato o di registrare dati incompleti.