3 :Inyección

Injection se refiere a la posibilidad de que un atacante inyecte código malicioso o comandos en una aplicación, explotando así posibles debilidades en la gestión de entrada de datos.

Para prevenir este tipo de vulnerabilidades, es esencial validar y sanitizar adecuadamente todas las entradas de datos, utilizando parámetros de consulta parametrizados en consultas SQL, y evitando la construcción de comandos del sistema operativo basados en entradas no confiables.

Algunas de las inyecciones más comunes son:

  • SQL

  • NoSQL

  • Comando OS

  • Mapeo relacional de objetos (ORM)

  • LDAP y lenguaje de expresión (EL)

  • Inyección de biblioteca de navegación de gráficos de objetos (OGNL)

La revisión del código fuente es el mejor método para detectar si las aplicaciones son vulnerables a las inyecciones. Se puede realizar pruebas automatizadas de todos los parámetros, encabezados, URL, cookies, entradas de datos JSON, SOAP y XML.

Lista de Mapeados CWEs

CWE-20 Improper Input Validationarrow-up-right

CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')arrow-up-right

CWE-75 Failure to Sanitize Special Elements into a Different Plane (Special Element Injection)arrow-up-right

CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection')arrow-up-right

CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')arrow-up-right

CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')arrow-up-right

CWE-80 Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)arrow-up-right

CWE-83 Improper Neutralization of Script in Attributes in a Web Pagearrow-up-right

CWE-87 Improper Neutralization of Alternate XSS Syntaxarrow-up-right

CWE-88 Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')arrow-up-right

CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')arrow-up-right

CWE-90 Improper Neutralization of Special Elements used in an LDAP Query ('LDAP Injection')arrow-up-right

CWE-91 XML Injection (aka Blind XPath Injection)arrow-up-right

CWE-93 Improper Neutralization of CRLF Sequences ('CRLF Injection')arrow-up-right

CWE-94 Improper Control of Generation of Code ('Code Injection')arrow-up-right

CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')arrow-up-right

CWE-96 Improper Neutralization of Directives in Statically Saved Code ('Static Code Injection')arrow-up-right

CWE-97 Improper Neutralization of Server-Side Includes (SSI) Within a Web Pagearrow-up-right

CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion')arrow-up-right

CWE-99 Improper Control of Resource Identifiers ('Resource Injection')arrow-up-right

CWE-100 Deprecated: Was catch-all for input validation issuesarrow-up-right

CWE-113 Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')arrow-up-right

CWE-116 Improper Encoding or Escaping of Outputarrow-up-right

CWE-138 Improper Neutralization of Special Elementsarrow-up-right

CWE-184 Incomplete List of Disallowed Inputsarrow-up-right

CWE-470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')arrow-up-right

CWE-471 Modification of Assumed-Immutable Data (MAID)arrow-up-right

CWE-564 SQL Injection: Hibernatearrow-up-right

CWE-610 Externally Controlled Reference to a Resource in Another Spherearrow-up-right

CWE-643 Improper Neutralization of Data within XPath Expressions ('XPath Injection')arrow-up-right

CWE-644 Improper Neutralization of HTTP Headers for Scripting Syntaxarrow-up-right

CWE-652 Improper Neutralization of Data within XQuery Expressions ('XQuery Injection')arrow-up-right

CWE-917 Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')arrow-up-right

Recursos

Última actualización