Download - Seguridad en Servicios Web
![Page 1: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/1.jpg)
KAMBAN
WEB SERVICESIng. Saúl Mamani Mamani
Ingeniero Informático
Seguridad en .NET
WSDLXML
UDDIWCFSOAP
![Page 2: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/2.jpg)
• Introducción•Servicios Web •Arquitectura de los Servicios Web•Creación de Servicios Web .NET•Tipos de Ataque•Técnicas Defensivas •Conclusiones
![Page 3: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/3.jpg)
¿Te has imaginado alguna vezprogramar una método en unlenguaje X, y re utilizarlodesde cualquier lenguaje deprogramación, en
(Aplicación de Escritorio,Aplicación Web, o Aplicación Móvil),
(Windows, Linux, etc.)?
![Page 4: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/4.jpg)
Justamente este milagro es lo que nos ofrecen los Servicios
Web
![Page 5: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/5.jpg)
Un Servicio Web (Web Service) esuna aplicación (conjunto defunciones o métodos) que residen enun servidor y que utiliza estándares,tales como, SOAP, WSDL, XML,UDDI. Para intercambiar datos einformación entre aplicacionesindependientemente del lenguaje deprogramación en el que esténdesarrollados y de la plataformadonde se ejecuten
Los archivos de servicios web tienen extensión .asmx
![Page 6: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/6.jpg)
AplicaciónMonolítica
![Page 7: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/7.jpg)
Arquitectura Cliente-Servidor en TresCapas (MVC)
![Page 8: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/8.jpg)
Arquitectura Orientadas a Servicios (n-capas)
![Page 9: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/9.jpg)
¿Cómo se comunicanlos diferentescomponentes?¿Cómo interactúa
con diferentesplataformas?
¿Cómo se invocanlos diferentesservicios?
![Page 10: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/10.jpg)
¿Cómo se comunican los diferentes componentes?
SOAP
-Simple Object Access Protocol-Evolución de XML – RPC , (Microsoft,IBM)-Transparencia de Datos,independencia de la plataforma-Middleware (RPC, RMI, CORBA, etc)-Medio de comunicación entre losdiferentes componentes (HTTP(S) enTCP 80-443, SMTP)-Define cómo se establece elintercambio de información (XML)
Servicios Web RESTFull para dispositivos móviles
![Page 11: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/11.jpg)
¿Cómo se comunican los diferentes componentes?
WSDL
-Web Service DefinitionLanguage-API (Interfaz Pública) basadoen XML-Define que métodos estándisponibles en un Servicio Web.-Cómo invocar los diferentesmétodos.-Qué resultado devuelve unmétodo dentro un Servicio Web.
![Page 12: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/12.jpg)
¿Cómo se comunican los diferentes componentes?
XML
-eXtensible MarkupLanguage-Es un lenguaje deetiquetado cuya funciónprincipal es la de generardocumentos (Datos eInformación).-Texto plano, cualquierlenguaje de programación osistema operativo lo puedeleer
![Page 13: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/13.jpg)
¿Cómo se comunican los diferentes componentes?
UDDI
-Universal DescriptionDiscovery and Integration-Permite la publicación deServicios Web- Cuyo objetivo es seraccedido por los mensajesSOAP y dar paso adocumentos WSDL-Integrado en WindowsServer
![Page 14: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/14.jpg)
![Page 15: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/15.jpg)
![Page 16: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/16.jpg)
Varitas Mágicas y por lo tanto Misteriosas
Clase: *.cs
Servicio:*.asmx
![Page 17: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/17.jpg)
![Page 18: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/18.jpg)
UDDI:
![Page 19: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/19.jpg)
WSDL:
![Page 20: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/20.jpg)
WSDL -XML:
![Page 21: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/21.jpg)
Consumo del ServicioWeb
![Page 22: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/22.jpg)
Consumo del ServicioWeb
![Page 23: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/23.jpg)
http://www.gerentedenegocios.com/whmcs/knowledgebase.php?action=displayarticle&id=3
http://www.service-repository.com/
http://www.xmethods.com/ve2/index.po
![Page 24: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/24.jpg)
Aplicación Local(Escritorio – Móvil)
Cliente Cliente
Servidor ApliccionesIIS
Apache
Tomcat, etc
Servidor de Base de Datos
Red
Red
SOAPWSDL
XMLUDDI
Ataque
![Page 25: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/25.jpg)
AplicaciónWeb(Web-App)
Cliente Cliente
Servidor AplicacionesIIS
Apache
Tomcat, etc
Servidor de Base de Datos
Red
Red
Servidor Frontal
Red
Movil
SOAPWSDLXMLUDDI
Ataque
Ataque
![Page 26: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/26.jpg)
DDoS
FingerPriting
Xphat Injection
MiMt
SQL Injection
XSS
Xploints
XML Injection
Robo de Sesiones
Footpriting
![Page 27: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/27.jpg)
Recolectar información,analizarla y clasificarla paraidentificar los recursostecnológicos utilizados por unobjetivo determinado.
https://w3dt.net//tools/httpreconHTTPRecon
https://www.owasp.org/index.php/Main_Page
http://tools.whois.net/
![Page 28: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/28.jpg)
- Descubrir WSDL.
Descripción, Ubicación y forma de Autenticación de un WS. <service >
- Los Mensajes de Error, siempre muestran información vulnerable
.wsdl
![Page 29: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/29.jpg)
wsScannerhttp://www.blueinfy.com/tools.html
Anubishttp://www.flu-project.com/p/anubis.html
![Page 30: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/30.jpg)
¿Cómo nos protegemos?
![Page 31: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/31.jpg)
Utilizar el fichero robots.txt
Para que ningún buscador indexe donde seencuentren los ficheros wsdl, *.asmx
![Page 32: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/32.jpg)
Deshabilitar la documentación del WSDL
Dentro del archivo Web.config en .NET
![Page 33: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/33.jpg)
Mostrar Mensajes de Error Genéricos
Maneje excepciones a la hora de programar sus Servicios Web
![Page 34: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/34.jpg)
Utilizar Autenticación
![Page 35: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/35.jpg)
Solicitar un recurso alservidor web una grancantidad de veces, de talforma que, el servidor nopueda atender lassolicitudes de los clienteslegítimos.Solicitar Recursos
Muy Pesados (Tamaño y peso) mediante URL.
Buscar deficiencias en la programación que induzcan a errores no controlados (Exploits)
![Page 36: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/36.jpg)
El cliente envía varias Flags SYN en lacabecera, con la dirección de origenfalsificada. Al ser el cliente o la IP falsa,nunca llega la respuesta ACK. (consumenrecursos del servidor)
![Page 37: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/37.jpg)
Envió masivo de paquetes (ping), queimplican una respuesta por parte de lavictima (pong) con el mismo contenido queel paquete de origen. (consumen el ancho debanda de la victima)
![Page 38: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/38.jpg)
Amplifica considerablemente los efectos de un ataque ICMP
VICTIMA
INTERMEDIARIO -VICTIMA
ATACANTE
![Page 39: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/39.jpg)
Ataque de Negación de Servicios Distribuido, utilizando una BotNet(Robot Net). Muy difícil de rastrear al atacante.
![Page 40: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/40.jpg)
Ping de la muerte:
LOIC (Low Orbit Ion Cannon):http://anonopsibero.blogspot.com/p/loic-y-otro-software.html#.U2P60IF5Oa8
Hping3(Linux):
hping3 -q -n -S -i u4000 -p www.infocaloruro.org
![Page 41: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/41.jpg)
¿Cómo nos protegemos?
![Page 42: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/42.jpg)
Del lado del Servidor:- Mantener actualizado el servidor, y los Firewalls con
las últimas revisiones de seguridadhttp://www.microsoft.com/es-es/security
- Balanceo de Carga en Servidores (Windows server -> NLBMgr.exe)
- Proteja la pila del protocolo TCP/IP en su servidor Windows Server
![Page 43: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/43.jpg)
Del lado da la Aplicación:- Mantener actualizado los navegadores para
evitar instalar componentes no deseados que convierta nuestra página en un zombi.
- Limpiar las entradas de datos de las Aplicaciones Web (Validación de datos)
- Utilice Códigos de Seguridad en Formularios de entrada de datos (CAPCHA), para evitar exploit.
![Page 44: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/44.jpg)
Xpath es un lenguajeque permite recuperarinformación de undocumento XML.Un atacante podríadescubrir la estructura deldocumento XML, eincluso acceder a losdatos.
Xpath fue creada para su uso con elestándar XSTL
![Page 45: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/45.jpg)
Por ejemplo, podríamos usar una sentenciaOR.
![Page 46: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/46.jpg)
Por ejemplo, podríamos usar una sentenciaOR.
![Page 47: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/47.jpg)
Por ejemplo, podríamos usar una sentenciaOR.
![Page 48: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/48.jpg)
Xpath BlindExplorer.https://code.google.com/p/xpath-blind-explorer/downloads/list
![Page 49: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/49.jpg)
¿Cómo nos protegemos?
![Page 50: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/50.jpg)
Validación
Validación Validació
n
Validación
Validación Validació
n Validación
Validación
Validación
Validación
Validación
Validación
Validación
Validación
Validación
Validación
![Page 51: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/51.jpg)
Valide los datos, tanto en el Cliente como en el Servidor
Los componentes de validación de Visual Studio,validan los datos en el cliente (Java Script) y en elServidor (C#, VB)
![Page 52: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/52.jpg)
Limpie los datos de entrada, en el servidor
Válido también para SQL Injection, XSS, XMLInjection, entre otros.
Elimine posibles ataques con una Expresión Regular
![Page 53: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/53.jpg)
- Utilice Ajax para enviar datos de formularios
- Evítese e enviar datos por la URL (Método GET)
- No confíe en los datos ingresado por el cliente (Pruebas de Software Caja
Válido también para SQL Injection, XSS, XMLInjection, entre otros.
![Page 54: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/54.jpg)
La nueva plataforma que utiliza .NETFramework(Windows Comunication Fundation)*.svc
![Page 55: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/55.jpg)
- Entendamos como funcionan los Servicios Web
- Conocer que tipo de ataques se pueden realizar
- Para saber cómo defendernos- Mantener actualizados nuestros sistemas- Adoptar buenas políticas de programación-
![Page 56: Seguridad en Servicios Web](https://reader034.vdocuments.pub/reader034/viewer/2022042615/55adf0871a28aba52c8b4831/html5/thumbnails/56.jpg)
GRACIAS
KAMBAN
Ing. Saúl Mamani Mamani
Ingeniero Informático
@kanito777
WSDLXML
UDDIWCFSOAP
DAS