elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a Git (Primera Parte)


  Mostrar Temas
Páginas: [1]
1  Seguridad Informática / Seguridad / ¿QUIÉN DA CON EL PROBLEMA? en: 14 Diciembre 2012, 19:26 pm
Hola a tod@s:

Viendo los siguientes 2 fragmentos de código, ¿quién es capaz de identificar los posibles problemas o debilidades de seguridad y, si es posible, ofrecer una solución?:

1.

[...]
char *tmp_name;
int tmpfd;
tmp_name = “/tmp/tmpfile.XXXXX”;
if( (tmpfd = open(tmp_name, O_RDWR | O_CREAT)) < 0) lnegra
exit(-1);
[...]
unlink(tmp_name);
/*
** remove the filename so that the file is not left on the
** file system when the program code completes or when
** the file descriptor is closed.
*/
[...]

2,
[...]
String comment = request.getParameter(“comment”);
//Validate input for quotes and SQL especific chars
[...]
// End of SQL validation and begin XSS validation
comment.replaceAll(“<script>”,””);
comment.replaceAll(“</script>”,””);
// Other cleanup operations
[...]
2  Seguridad Informática / Bugs y Exploits / DISEÑO DE EXPLOIT en: 12 Diciembre 2012, 00:39 am
Hola:

¿Alguien me podría ayudar con el siguiente ejercicio?

1.Dado el siguiente código fuente, diseñar un exploit que permita la función “privada”:

#include <string.h>
void privada (void) {
printf("Hola función pública\n");
}
int main(int argc, char * argv [])
{
char buffer [40];
if (argc != 2){
printf("Necesito un argumento %d\n",argc);
exit(-1);
}
strcpy(buffer, argv[1]);
printf("%s\n",buffer);
return (0);
}
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines