Reino: Input Validation and Representation

Los problemas de validación y representación de entradas están causados por metacaracteres, codificaciones alternativas y representaciones numéricas. Los problemas de seguridad surgen de entradas en las que se confía. Estos problemas incluyen: «desbordamientos de búfer», ataques de «scripts de sitios», "SQL injection" y muchas otras acciones.

Hadoop Job Manipulation

Abstract
El elemento Job enviado a un clúster de Hadoop se puede manipular en un entorno hostil.
Explanation
Los errores de manipulación de tareas de Hadoop se producen cuando:

- Los datos entran en un programa desde un origen que no es de confianza.

- Los datos se utilizan para especificar un valor deJobConf que controla la tarea de un cliente.

Los clústeres de Hadoop son un entorno hostil. Si no se establecen correctamente las configuraciones de seguridad que protegen frente al acceso no autorizado a HDFS en equipos de clúster, es posible que se produzca un ataque. Esto conlleva la posibilidad de que se manipule cualquier dato proporcionado por el clúster de Hadoop.

Ejemplo 1: el siguiente código muestra un envío de Job en una aplicación de cliente típica que obtiene entradas de la línea de comandos en un equipo maestro de clúster de Hadoop:


public void run(String args[]) throws IOException {

String inputDir = args[0];
String outputDir = args[1];

// Untrusted command line argument
int numOfReducers = Integer.parseInt(args[3]);
Class mapper = getClassByName(args[4]);
Class reducer = getClassByName(args[5]);

Configuration defaults = new Configuration();
JobConf job = new JobConf(defaults, OptimizedDataJoinJob.class);
job.setNumMapTasks(1);
// An attacker may set random values that exceed the range of acceptable number of reducers
job.setNumReduceTasks(numOfReducers);

return job;
}
Ejemplo 2: el siguiente código muestra un caso en el que un usuario malintencionado controla la tarea en ejecución que se va a anular a través de los argumentos de la línea de comandos:


public static void main(String[] args) throws Exception {

JobID id = JobID.forName(args[0]);
JobConf conf = new JobConf(WordCount.class);
// configure this JobConf instance
...
JobClient.runJob(conf);
RunningJob job = JobClient.getJob(id);
job.killJob();

}
References
[1] Standards Mapping - DISA Control Correlation Identifier Version 2 CCI-002754
[2] Standards Mapping - General Data Protection Regulation (GDPR) Indirect Access to Sensitive Data
[3] Standards Mapping - NIST Special Publication 800-53 Revision 4 SI-10 Information Input Validation (P1)
[4] Standards Mapping - NIST Special Publication 800-53 Revision 5 SI-10 Information Input Validation
[5] Standards Mapping - OWASP Mobile 2024 M4 Insufficient Input/Output Validation
[6] Standards Mapping - OWASP Top 10 2004 A1 Unvalidated Input
[7] Standards Mapping - Payment Card Industry Data Security Standard Version 3.0 Requirement 6.5.1
[8] Standards Mapping - Payment Card Industry Data Security Standard Version 3.1 Requirement 6.5.1
[9] Standards Mapping - Payment Card Industry Data Security Standard Version 3.2 Requirement 6.5.1
[10] Standards Mapping - Payment Card Industry Data Security Standard Version 3.2.1 Requirement 6.5.1
[11] Standards Mapping - Payment Card Industry Data Security Standard Version 4.0 Requirement 6.2.4
[12] Standards Mapping - Payment Card Industry Software Security Framework 1.0 Control Objective 4.2 - Critical Asset Protection
[13] Standards Mapping - Payment Card Industry Software Security Framework 1.1 Control Objective 4.2 - Critical Asset Protection, Control Objective B.3.1 - Terminal Software Attack Mitigation, Control Objective B.3.1.1 - Terminal Software Attack Mitigation
[14] Standards Mapping - Payment Card Industry Software Security Framework 1.2 Control Objective 4.2 - Critical Asset Protection, Control Objective B.3.1 - Terminal Software Attack Mitigation, Control Objective B.3.1.1 - Terminal Software Attack Mitigation, Control Objective C.3.2 - Web Software Attack Mitigation
[15] Standards Mapping - Security Technical Implementation Guide Version 4.2 APSC-DV-002560 CAT I
[16] Standards Mapping - Security Technical Implementation Guide Version 4.3 APSC-DV-002560 CAT I
[17] Standards Mapping - Security Technical Implementation Guide Version 4.4 APSC-DV-002560 CAT I
[18] Standards Mapping - Security Technical Implementation Guide Version 4.5 APSC-DV-002560 CAT I
[19] Standards Mapping - Security Technical Implementation Guide Version 4.6 APSC-DV-002560 CAT I
[20] Standards Mapping - Security Technical Implementation Guide Version 4.7 APSC-DV-002560 CAT I
[21] Standards Mapping - Security Technical Implementation Guide Version 4.8 APSC-DV-002560 CAT I
[22] Standards Mapping - Security Technical Implementation Guide Version 4.9 APSC-DV-002560 CAT I
[23] Standards Mapping - Security Technical Implementation Guide Version 4.10 APSC-DV-002560 CAT I
[24] Standards Mapping - Security Technical Implementation Guide Version 4.11 APSC-DV-002560 CAT I
[25] Standards Mapping - Security Technical Implementation Guide Version 4.1 APSC-DV-002560 CAT I
[26] Standards Mapping - Security Technical Implementation Guide Version 5.1 APSC-DV-002560 CAT I
[27] Standards Mapping - Security Technical Implementation Guide Version 5.2 APSC-DV-002560 CAT I
[28] Standards Mapping - Security Technical Implementation Guide Version 5.3 APSC-DV-002530 CAT II, APSC-DV-002560 CAT I
[29] Standards Mapping - Security Technical Implementation Guide Version 6.1 APSC-DV-002530 CAT II, APSC-DV-002560 CAT I
[30] Standards Mapping - Web Application Security Consortium Version 2.00 Improper Input Handling (WASC-20)
desc.dataflow.java.hadoop_job_manipulation