SlideShare uma empresa Scribd logo
1 de 12
Baixar para ler offline
Manuel Carrasco Moñino




Seguridad de Aplicaciones Web

                              HotelSearch.com
                                   Enero-2010




manolo@apache.org
Servidores Web

   Servidores Web son los principales objetivos
       Porque es el servicio mas utilizado
       Porque los FW no bloquean el puerto 80/443
   Vulnerabilidades
       Servidor: bugs, configuracion, exploits
       Aplicaciones: mal desarrolladas, con prisas,
        desarrolladores sin conocimientos de sistemas.
   Normalmente la seguridad se delega a:
       FW + Detect. Intrusos (nivel 3, logs ...)
       SSL
Peligro: El Servidor Web

   Bugs y agujeros configuracion
       Punto de entrada para ataque interno
       Permisos usuario web
   Prevencion
       Minimos privilegios
       Chroot
       Monitorizacion (quien, cuando)
       Actualización frecuente (no suficiente)
Peligro: Aplicaciones

   Defectos de aplicacion
       XSS, html incrustado
       Inyección SQL
       Buffer overflow
       DOS
   Prevencion
       Concienciar desarrolladores
       Validaciones en aplicacion
       Detectores
       HA, monitorización
Peligro: Usuario

   Robar informacion sensible
       Passwords
       Tarjetas
       Cookies
   Prevencion
       Https
       Concienciar al usuario
Filtro: mod_security
   Opensource, Sourceforge (no apache)
   Nivel de aplicacion:
       http/ftp/https
       GET, POST …
       Request, Response
   Deteccion y prevencion
   Reglas y patrones
   Sin intervención de desarrolladores
   Actualizacion de reglas: modsecurity.org
Funcionalidades: mod_security

   Peticiones
       Expresiones regulares en Query String
       Análisis de la petición POST
   Respuestas
       Analiza y modifica mensajes de servidor
   Normalización (anti evasion)
       Parámetros
       Url, nulos, //, ..,
Configuracion: mod_security

<IfModule mod_security.c>
  SecRuleEngine On
  SecAuditEngine RelevantOnly
  SecAuditLog /var/log/apache2/audit_log
  SecDebugLog /var/log/apache2/modsec_debug_log
  SecDebugLogLevel 3
  SecRequestBodyAccess On
  SecDefaultAction "phase:2,pass,log,auditlog"
  SecRule REQUEST_METHOD "!^(?:GET|POST|HEAD)$" 
     "phase:1,t:none,deny,status:500"
  SecRule REQUEST_URI "login_failed.php"  
     log,exec:/usr/bin/manolo_mod_security.sh
  SecRule ARGS:mypar !whatever deny
  SecRule ARGS:mynum ^[^d]+$ deny
</IfModule>
Reglas: mod_security
   Patron
   SecRule VARIABLES OPERATOR [ACTIONS]
   SecRule REQUEST_URI "attack"    
    "phase:1,t:none,t:urlDecode,t:lowercase,t:normalisePath"
   SecRule ARGS "drop[[:space:]]table" deny,log

   Elementos
        Headers, ENV, Cookies, QS, Variables html, Xpath ...
   Acciones
        Deny, status:nnn, allow, redirect:url, log, nolog,
         exec:cmd, pass, pause:n
   Bloques
        Directorios/Virtualhosts
Fases: mod_security
Recomendacion: mod_security

   Politica recomendada:
       Accept por defecto, denegar lo peligroso
       Utilizar reglas de modsecurity.org (actualizables)
   Arquitectura
       FW
       Proxy: mod_security + mod_proxy
       Frontends
Appliances

   ModSecurity Console
       Comercial (Breach)
       Consola gráfica
       Alto rendimiento
       Alta disponibilidad
   Version trial / organizaciones

Mais conteúdo relacionado

Mais procurados

Vulnerabilidades en sitios web(español)
Vulnerabilidades en sitios web(español)Vulnerabilidades en sitios web(español)
Vulnerabilidades en sitios web(español)Miguel de la Cruz
 
TALLER VIRUS Y ERRORES
TALLER VIRUS Y ERRORES TALLER VIRUS Y ERRORES
TALLER VIRUS Y ERRORES Jorge Moreno
 
Webinar Gratuito "Vulnerabilidades en Aplicaciones Web"
Webinar Gratuito "Vulnerabilidades en Aplicaciones Web"Webinar Gratuito "Vulnerabilidades en Aplicaciones Web"
Webinar Gratuito "Vulnerabilidades en Aplicaciones Web"Alonso Caballero
 
Resuelto power
Resuelto powerResuelto power
Resuelto powerIRMASLOP
 
Errores y virus de la red
Errores y virus de la redErrores y virus de la red
Errores y virus de la rededgarplazas
 
Diagnostico geral zapata, natalia 10 3 nuevo
Diagnostico geral zapata, natalia 10 3 nuevoDiagnostico geral zapata, natalia 10 3 nuevo
Diagnostico geral zapata, natalia 10 3 nuevoAngela Tinoco
 
Curso basicoseguridadweb slideshare4
Curso basicoseguridadweb slideshare4Curso basicoseguridadweb slideshare4
Curso basicoseguridadweb slideshare4tantascosasquenose
 

Mais procurados (12)

Vulnerabilidades en sitios web(español)
Vulnerabilidades en sitios web(español)Vulnerabilidades en sitios web(español)
Vulnerabilidades en sitios web(español)
 
as
asas
as
 
TALLER VIRUS Y ERRORES
TALLER VIRUS Y ERRORES TALLER VIRUS Y ERRORES
TALLER VIRUS Y ERRORES
 
Seguridad web
Seguridad webSeguridad web
Seguridad web
 
Webinar Gratuito "Vulnerabilidades en Aplicaciones Web"
Webinar Gratuito "Vulnerabilidades en Aplicaciones Web"Webinar Gratuito "Vulnerabilidades en Aplicaciones Web"
Webinar Gratuito "Vulnerabilidades en Aplicaciones Web"
 
Resuelto power
Resuelto powerResuelto power
Resuelto power
 
Tipos de malware
Tipos de malwareTipos de malware
Tipos de malware
 
Integracion sen1
Integracion sen1Integracion sen1
Integracion sen1
 
Integracion sen1
Integracion sen1Integracion sen1
Integracion sen1
 
Errores y virus de la red
Errores y virus de la redErrores y virus de la red
Errores y virus de la red
 
Diagnostico geral zapata, natalia 10 3 nuevo
Diagnostico geral zapata, natalia 10 3 nuevoDiagnostico geral zapata, natalia 10 3 nuevo
Diagnostico geral zapata, natalia 10 3 nuevo
 
Curso basicoseguridadweb slideshare4
Curso basicoseguridadweb slideshare4Curso basicoseguridadweb slideshare4
Curso basicoseguridadweb slideshare4
 

Semelhante a Mod security

Seguridad en servidores WEB. Modulo mod_security
Seguridad en servidores WEB. Modulo mod_securitySeguridad en servidores WEB. Modulo mod_security
Seguridad en servidores WEB. Modulo mod_securityseguridadelinux
 
Seguridad en Apache Web Server
Seguridad en Apache Web ServerSeguridad en Apache Web Server
Seguridad en Apache Web ServerChema Alonso
 
Cómo realizar un test de intrusión a una aplicación Web
Cómo realizar un test de intrusión a una aplicación WebCómo realizar un test de intrusión a una aplicación Web
Cómo realizar un test de intrusión a una aplicación WebEduardo Jalon
 
Seguridad en servidores
Seguridad en servidoresSeguridad en servidores
Seguridad en servidoresTaty Millan
 
Los 7 pecados del Desarrollo Web
Los 7 pecados del Desarrollo WebLos 7 pecados del Desarrollo Web
Los 7 pecados del Desarrollo Webacksec
 
Seguridad web para desarrolladores - OWASP
Seguridad web para desarrolladores - OWASPSeguridad web para desarrolladores - OWASP
Seguridad web para desarrolladores - OWASPMarcos Harasimowicz
 
Seguridad en el Desarrollo de Aplicaciones Web PHP
Seguridad en el Desarrollo de Aplicaciones Web PHPSeguridad en el Desarrollo de Aplicaciones Web PHP
Seguridad en el Desarrollo de Aplicaciones Web PHP7th_Sign
 
Desarrollo seguro en NodeJS (OWASP top ten y JWT)
Desarrollo seguro en NodeJS (OWASP top ten y JWT)Desarrollo seguro en NodeJS (OWASP top ten y JWT)
Desarrollo seguro en NodeJS (OWASP top ten y JWT)Raúl Requero García
 
Seguridad En Base De Datos
Seguridad En Base De DatosSeguridad En Base De Datos
Seguridad En Base De DatosWilliam Suárez
 
Seguridad En Base De Datos
Seguridad En Base De DatosSeguridad En Base De Datos
Seguridad En Base De Datosguestb40a1b0
 
Pecha kucha
Pecha kuchaPecha kucha
Pecha kuchaTerrafx9
 
Pecha Kucha Mod_Security Apache2
Pecha Kucha Mod_Security Apache2Pecha Kucha Mod_Security Apache2
Pecha Kucha Mod_Security Apache2Terrafx9
 
Hacking de servidores web OMHE
Hacking de servidores web OMHEHacking de servidores web OMHE
Hacking de servidores web OMHEHéctor López
 
Javier Saez - Una panorámica sobre la seguridad en entornos web [rootedvlc2]
Javier Saez - Una panorámica sobre la seguridad en entornos web [rootedvlc2]Javier Saez - Una panorámica sobre la seguridad en entornos web [rootedvlc2]
Javier Saez - Una panorámica sobre la seguridad en entornos web [rootedvlc2]RootedCON
 

Semelhante a Mod security (20)

Seguridad en servidores WEB. Modulo mod_security
Seguridad en servidores WEB. Modulo mod_securitySeguridad en servidores WEB. Modulo mod_security
Seguridad en servidores WEB. Modulo mod_security
 
Seguridad en Apache Web Server
Seguridad en Apache Web ServerSeguridad en Apache Web Server
Seguridad en Apache Web Server
 
Cómo realizar un test de intrusión a una aplicación Web
Cómo realizar un test de intrusión a una aplicación WebCómo realizar un test de intrusión a una aplicación Web
Cómo realizar un test de intrusión a una aplicación Web
 
WebAttack - Presentación
WebAttack - PresentaciónWebAttack - Presentación
WebAttack - Presentación
 
Seguridad en servidores
Seguridad en servidoresSeguridad en servidores
Seguridad en servidores
 
Los 7 pecados del Desarrollo Web
Los 7 pecados del Desarrollo WebLos 7 pecados del Desarrollo Web
Los 7 pecados del Desarrollo Web
 
Seguridad web para desarrolladores - OWASP
Seguridad web para desarrolladores - OWASPSeguridad web para desarrolladores - OWASP
Seguridad web para desarrolladores - OWASP
 
Seguridad en el Desarrollo de Aplicaciones Web PHP
Seguridad en el Desarrollo de Aplicaciones Web PHPSeguridad en el Desarrollo de Aplicaciones Web PHP
Seguridad en el Desarrollo de Aplicaciones Web PHP
 
Man in the middle aplicado a la seguridad
Man in the middle aplicado a la seguridadMan in the middle aplicado a la seguridad
Man in the middle aplicado a la seguridad
 
Desarrollo seguro en NodeJS (OWASP top ten y JWT)
Desarrollo seguro en NodeJS (OWASP top ten y JWT)Desarrollo seguro en NodeJS (OWASP top ten y JWT)
Desarrollo seguro en NodeJS (OWASP top ten y JWT)
 
Temas owasp
Temas owaspTemas owasp
Temas owasp
 
Web app attacks
Web app attacksWeb app attacks
Web app attacks
 
Seguridad En Base De Datos
Seguridad En Base De DatosSeguridad En Base De Datos
Seguridad En Base De Datos
 
Seguridad En Base De Datos
Seguridad En Base De DatosSeguridad En Base De Datos
Seguridad En Base De Datos
 
Pecha kucha
Pecha kuchaPecha kucha
Pecha kucha
 
Pecha kucha
Pecha kuchaPecha kucha
Pecha kucha
 
Pecha Kucha Mod_Security Apache2
Pecha Kucha Mod_Security Apache2Pecha Kucha Mod_Security Apache2
Pecha Kucha Mod_Security Apache2
 
Hacking de servidores web OMHE
Hacking de servidores web OMHEHacking de servidores web OMHE
Hacking de servidores web OMHE
 
Javier Saez - Una panorámica sobre la seguridad en entornos web [rootedvlc2]
Javier Saez - Una panorámica sobre la seguridad en entornos web [rootedvlc2]Javier Saez - Una panorámica sobre la seguridad en entornos web [rootedvlc2]
Javier Saez - Una panorámica sobre la seguridad en entornos web [rootedvlc2]
 
Owasp Top10 Spanish
Owasp Top10 SpanishOwasp Top10 Spanish
Owasp Top10 Spanish
 

Mais de Manuel Carrasco Moñino

Present and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspectivePresent and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspectiveManuel Carrasco Moñino
 
Web Components the best marriage for a PWA
Web Components the best marriage for a PWAWeb Components the best marriage for a PWA
Web Components the best marriage for a PWAManuel Carrasco Moñino
 
Intro to Web Components, Polymer & Vaadin Elements
Intro to Web Components, Polymer & Vaadin ElementsIntro to Web Components, Polymer & Vaadin Elements
Intro to Web Components, Polymer & Vaadin ElementsManuel Carrasco Moñino
 
GwtQuery the perfect companion for GWT, GWT.create 2013
GwtQuery the perfect companion for GWT,  GWT.create 2013GwtQuery the perfect companion for GWT,  GWT.create 2013
GwtQuery the perfect companion for GWT, GWT.create 2013Manuel Carrasco Moñino
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTManuel Carrasco Moñino
 
GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011Manuel Carrasco Moñino
 
GWT: Why GWT, GQuery, and RequestFactory
GWT: Why GWT, GQuery, and RequestFactoryGWT: Why GWT, GQuery, and RequestFactory
GWT: Why GWT, GQuery, and RequestFactoryManuel Carrasco Moñino
 

Mais de Manuel Carrasco Moñino (20)

The Java alternative to Javascript
The Java alternative to JavascriptThe Java alternative to Javascript
The Java alternative to Javascript
 
GWT and PWA
GWT and PWAGWT and PWA
GWT and PWA
 
Present and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspectivePresent and Future of GWT from a developer perspective
Present and Future of GWT from a developer perspective
 
GWT Contributor Workshop
GWT Contributor WorkshopGWT Contributor Workshop
GWT Contributor Workshop
 
CRUD with Polymer 2.0
CRUD with Polymer 2.0CRUD with Polymer 2.0
CRUD with Polymer 2.0
 
Web Components and PWA
Web Components and PWAWeb Components and PWA
Web Components and PWA
 
Building Components for Business Apps
Building Components for Business AppsBuilding Components for Business Apps
Building Components for Business Apps
 
Web Components the best marriage for a PWA
Web Components the best marriage for a PWAWeb Components the best marriage for a PWA
Web Components the best marriage for a PWA
 
Intro to Web Components, Polymer & Vaadin Elements
Intro to Web Components, Polymer & Vaadin ElementsIntro to Web Components, Polymer & Vaadin Elements
Intro to Web Components, Polymer & Vaadin Elements
 
Rock GWT UI's with Polymer Elements
Rock GWT UI's with Polymer ElementsRock GWT UI's with Polymer Elements
Rock GWT UI's with Polymer Elements
 
Introducing GWT Polymer (vaadin)
Introducing GWT Polymer (vaadin)Introducing GWT Polymer (vaadin)
Introducing GWT Polymer (vaadin)
 
Speed up your GWT coding with gQuery
Speed up your GWT coding with gQuerySpeed up your GWT coding with gQuery
Speed up your GWT coding with gQuery
 
Vaadin codemotion 2014
Vaadin codemotion 2014Vaadin codemotion 2014
Vaadin codemotion 2014
 
GwtQuery the perfect companion for GWT, GWT.create 2013
GwtQuery the perfect companion for GWT,  GWT.create 2013GwtQuery the perfect companion for GWT,  GWT.create 2013
GwtQuery the perfect companion for GWT, GWT.create 2013
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWT
 
Aprendiendo GWT
Aprendiendo GWTAprendiendo GWT
Aprendiendo GWT
 
GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011GQuery a jQuery clone for Gwt, RivieraDev 2011
GQuery a jQuery clone for Gwt, RivieraDev 2011
 
Apache James/Hupa & GWT
Apache James/Hupa & GWTApache James/Hupa & GWT
Apache James/Hupa & GWT
 
GWT: Why GWT, GQuery, and RequestFactory
GWT: Why GWT, GQuery, and RequestFactoryGWT: Why GWT, GQuery, and RequestFactory
GWT: Why GWT, GQuery, and RequestFactory
 
Gwt IV -mvp
Gwt IV -mvpGwt IV -mvp
Gwt IV -mvp
 

Mod security