SlideShare una empresa de Scribd logo
1 de 73
Descargar para leer sin conexión
Sobreviviendo al exterior con tu IPS
Carlos Brendel
Sobreviviendo al exterior con tu IPS
Carlos Brendel
• Ingeniero de Telecomunicaciones
por la Universidad Politécnica de
Valencia (UPV).
• Estudiando el Máster de
Ciberseguridad en la universidad
Oberta de Cataluña (UOC).
• Técnico analista en el SOC de
Telefónica.
Qué es un IPS?
Sobreviviendo al exterior con tu IPS
Intrusion Prevention System
• Sistema que cursa y monitoriza tráfico.
• Procesa los paquetes en busca de
actividad maliciosa, aceptándolos o
bloqueándolos en función del
resultado.
• Basado en firmas o anomalías.
AB
GIF FW
Cómo redactar una firma?
Sobreviviendo al exterior con tu IPS
Redacción básica de firmas
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [SID]... )
Definición parámetros de la conexión:
- Origen
- Destino
- Puertos
- Protocolo
- Cabeceras
- Payload
Definición acción a tomar:
- Pass
- Alert
- Drop
- Reject
Sobreviviendo al exterior con tu IPS
Redacción básica de firmas
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…;
[SID]; )
- Content Modifiers
- Sticky buffer
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Sobreviviendo al exterior con tu IPS
Redacción básica de firmas
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…;
[SID]; )
Ejemplos:
- alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS
(msg:"GET a recurso megasecreto!";
content: "GET"; http_method;
content: "recursomegasecreto"; http_uri;
http_referer; pcre: "/cuevasdelsmalosllamadosw+/i";
sid:2;)
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Sobreviviendo al exterior con tu IPS
Redacción básica de firmas
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; )
Ejemplos:
- alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"GET a recurso megasecreto!";
content: "GET"; http_method; content: "recursomegasecreto"; http_uri; http_referer; pcre:
"/cuevasdelsmalosllamadosw+/i"; sid:2;)
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Entorno
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Entorno
- IPTABLES
- SURICATA
Dejad que os cuente una historia...
Basado en hechos reales
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Cambios:
• High -> Critical
• plugin -> Multipart parser
• malicious a -> a malicious
Cuánto tardó en publicarse el exploit?
Sobreviviendo al exterior con tu IPS
Cuánto tardaron en publicar firmas?
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Mientras tanto en internet...
CVE-2017-5638
Sobreviviendo al exterior con tu IPS
CVE-2017-5638
Definición CVE: "The Jakarta Multipart parser in Apache Struts 2 2.3.x before 2.3.32
and 2.5.x before 2.5.10.1 has incorrect exception handling and error-message
generation during file-upload attempts, which allows remote attackers to execute
arbitrary commands via a crafted Content-Type, Content-Disposition, or Content-
Length HTTP header, as exploited in the wild in March 2017 with a Content-Type
header containing a #cmd= string. " - https://cve.mitre.org
Sobreviviendo al exterior con tu IPS
CVE-2017-5638
Definición CVE: "The Jakarta Multipart parser in Apache Struts 2 2.3.x before 2.3.32 and 2.5.x before
2.5.10.1 has incorrect exception handling and error-message generation during file-upload attempts,
which allows remote attackers to execute arbitrary commands via a crafted Content-Type, Content-
Disposition, or Content-Length HTTP header, as exploited in the wild in March 2017 with a Content-
Type header containing a #cmd= string. " - https://cve.mitre.org
Traducción al mundo real: Tras el error provocado por un "Content-Type" no
válido, la expresión no se escapa y se utiliza por la función
"LocalizedTextUtil.findText" para generar el mensaje de error. Pero esta función
interpreta como OGNL (Object-Graph Navigation Language, cosas de Java...)
todo código entre %{...}
GIF GIRL!
Sobreviviendo al exterior con tu IPS
CVE-2017-5638
Definición CVE: "The Jakarta Multipart parser in Apache Struts 2 2.3.x before 2.3.32 and 2.5.x before
2.5.10.1 has incorrect exception handling and error-message generation during file-upload attempts,
which allows remote attackers to execute arbitrary commands via a crafted Content-Type, Content-
Disposition, or Content-Length HTTP header, as exploited in the wild in March 2017 with a Content-
Type header containing a #cmd= string. " - https://cve.mitre.org
Traducción al mundo real: Tras el error provocado por un "Content-Type" no
válido, la expresión no se escapa y se utiliza por la función
"LocalizedTextUtil.findText" para generar el mensaje de error. Pero esta función
interpreta como OGNL (Object-Graph Navigation Language, cosas de Java...)
todo código entre %{...}
GIF GIRL!
Sobreviviendo al exterior con tu IPS
Análisis exploit
Sobreviviendo al exterior con tu IPS
Análisis exploit
Sobreviviendo al exterior con tu IPS
Análisis exploit
Sobreviviendo al exterior con tu IPS
Análisis exploit
Sobreviviendo al exterior con tu IPS
Análisis exploit
Sobreviviendo al exterior con tu IPS
Análisis exploit
Sobreviviendo al exterior con tu IPS
Análisis exploit
Sobreviviendo al exterior con tu IPS
Análisis exploit
Sobreviviendo al exterior con tu IPS
POC
Redacción de la firma
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…;
[SID]; )
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Sobreviviendo al exterior con tu IPS
CVE-2017-5638
Definición CVE: "The Jakarta Multipart parser in Apache Struts 2 2.3.x before 2.3.32
and 2.5.x before 2.5.10.1 has incorrect exception handling and error-message
generation during file-upload attempts, which allows remote attackers to execute
arbitrary commands via a crafted Content-Type, Content-Disposition, or Content-
Length HTTP header, as exploited in the wild in March 2017 with a Content-Type
header containing a #cmd= string. " - https://cve.mitre.org
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…;
[SID]; )
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; )
Primera firma:
- drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS
(msg:"Detectado exploit Apache Struts – CVE-2017-5638!";
content: "GET"; http_method;
http_content_type; content: "#cmd=";
sid:3;)
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; )
Primera firma:
- drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS
(msg:"Detectado exploit Apache Struts – CVE-2017-5638!";
content: "GET"; http_method;
http_content_type; content: "#cmd=";
sid:3;)
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
¿?
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; )
Primera firma:
- drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS
(msg:"Detectado exploit Apache Struts – CVE-2017-5638!";
content: "GET"; http_method;
http_content_type; content: "#cmd=";
sid:3;)
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; )
Primera firma:
- drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS
(msg:"Detectado exploit Apache Struts – CVE-2017-5638!";
content: "GET"; http_method;
http_content_type; content: "#cmd=";
sid:3;)
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Redacción de la firma_buena
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…;
[SID]; )
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…;
[SID]; )
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; )
Segunda firma:
- drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS
(msg:"Detectado exploit Apache Struts – CVE-2017-5638!";
content: "GET"; http_method;
http_content_type; content: "java.lang.ProcessBuilder"; nocase;
sid:4;)
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; )
Segunda firma:
- drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS
(msg:"Detectado exploit Apache Struts – CVE-2017-5638!";
content: "GET"; http_method;
http_content_type; content: "java.lang.ProcessBuilder"; nocase;
sid:4;)
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
¿?
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; )
Segunda firma:
- drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS
(msg:"Detectado exploit Apache Struts – CVE-2017-5638!";
content: "GET"; http_method;
http_content_type; content: "java.lang.ProcessBuilder";
sid:4;)
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Redacción de la firma_buena_final
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…;
[SID]; )
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; )
Tercera firma:
- drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS
(msg:"Detectado exploit Apache Struts – CVE-2017-5638!";
content: "GET"; http_method;
http_content_type; pcre: "/%{(#[^}]+}/"; content: "ognl"; nocase;
sid:5;)
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
Sobreviviendo al exterior con tu IPS
Redacción de firma
[ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT]
( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; )
Tercera firma:
- drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS
(msg:"Detectado exploit Apache Struts – CVE-2017-5638!";
content: "GET"; http_method;
http_content_type; pcre: "/%{(#[^}]+}/"; content: "ognl"; nocase;
sid:5;)
http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
CASO REAL
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
Sobreviviendo al exterior con tu IPS
kworker.conf
kworker
CONCLUSIÓN
Sobreviviendo al exterior con tu IPS
Step By Step
• Entender en qué consiste la vulnerabilidad
• Entender cómo funciona el exploit de la PoC
• Montar pequeño laboratorio
• Let the fun begin!
Sobreviviendo al exterior con tu IPS
Step By Step
• Entender en qué consiste la vulnerabilidad
• Entender cómo funciona el exploit de la PoC
• Montar pequeño laboratorio
• Let the fun begin!
Sobreviviendo al exterior con tu IPS
Máquina utilizada
CVE-2017-5638
https://mega.nz/#!HjRRWTYZ!tEPSChwUkZ8PNHs6mUkR_ICfxIyjkKjGrGQN-nnYFt0
debian:debian
root:debian
Muchas gracias!
ClicGIF looney toonsk to
add text

Más contenido relacionado

La actualidad más candente

Alberto García de Dios - Virus, el arte no debería ser negocio [Rooted CON 2011]
Alberto García de Dios - Virus, el arte no debería ser negocio [Rooted CON 2011]Alberto García de Dios - Virus, el arte no debería ser negocio [Rooted CON 2011]
Alberto García de Dios - Virus, el arte no debería ser negocio [Rooted CON 2011]
RootedCON
 
Javier Rodríguez & David Sánchez - ¿Otra vez tú, Tovarich? [rooted2018]
Javier Rodríguez & David Sánchez - ¿Otra vez tú, Tovarich? [rooted2018]Javier Rodríguez & David Sánchez - ¿Otra vez tú, Tovarich? [rooted2018]
Javier Rodríguez & David Sánchez - ¿Otra vez tú, Tovarich? [rooted2018]
RootedCON
 
José Selvi - Unprivileged Network Post-Exploitation [RootedCON 2011]
José Selvi - Unprivileged Network Post-Exploitation [RootedCON 2011]José Selvi - Unprivileged Network Post-Exploitation [RootedCON 2011]
José Selvi - Unprivileged Network Post-Exploitation [RootedCON 2011]
RootedCON
 
David López Paz - Global Warfare [RootedCON 2011]
David López Paz - Global Warfare [RootedCON 2011]David López Paz - Global Warfare [RootedCON 2011]
David López Paz - Global Warfare [RootedCON 2011]
RootedCON
 

La actualidad más candente (20)

Alfonso Muñoz - Reviving Homograph attacks using (deep learning) steroids [ro...
Alfonso Muñoz - Reviving Homograph attacks using (deep learning) steroids [ro...Alfonso Muñoz - Reviving Homograph attacks using (deep learning) steroids [ro...
Alfonso Muñoz - Reviving Homograph attacks using (deep learning) steroids [ro...
 
CPMX5 - Hacking like a boss por Roberto Salgado
CPMX5 - Hacking like a boss por Roberto SalgadoCPMX5 - Hacking like a boss por Roberto Salgado
CPMX5 - Hacking like a boss por Roberto Salgado
 
Rubén Rodenas & Rubén Garrote - TLOTA - The lord of the ATMs [rooted2017]
Rubén Rodenas & Rubén Garrote - TLOTA - The lord of the ATMs [rooted2017]Rubén Rodenas & Rubén Garrote - TLOTA - The lord of the ATMs [rooted2017]
Rubén Rodenas & Rubén Garrote - TLOTA - The lord of the ATMs [rooted2017]
 
Javier Marcos - Detección de amenazas a escala con osquery [rooted2019]
Javier Marcos - Detección de amenazas a escala con osquery [rooted2019]Javier Marcos - Detección de amenazas a escala con osquery [rooted2019]
Javier Marcos - Detección de amenazas a escala con osquery [rooted2019]
 
Alberto García de Dios - Virus, el arte no debería ser negocio [Rooted CON 2011]
Alberto García de Dios - Virus, el arte no debería ser negocio [Rooted CON 2011]Alberto García de Dios - Virus, el arte no debería ser negocio [Rooted CON 2011]
Alberto García de Dios - Virus, el arte no debería ser negocio [Rooted CON 2011]
 
Javier Rodríguez & David Sánchez - ¿Otra vez tú, Tovarich? [rooted2018]
Javier Rodríguez & David Sánchez - ¿Otra vez tú, Tovarich? [rooted2018]Javier Rodríguez & David Sánchez - ¿Otra vez tú, Tovarich? [rooted2018]
Javier Rodríguez & David Sánchez - ¿Otra vez tú, Tovarich? [rooted2018]
 
Pablo Gonzalez & Fran Ramirez - Hidden Networks: Controlas todas las redes de...
Pablo Gonzalez & Fran Ramirez - Hidden Networks: Controlas todas las redes de...Pablo Gonzalez & Fran Ramirez - Hidden Networks: Controlas todas las redes de...
Pablo Gonzalez & Fran Ramirez - Hidden Networks: Controlas todas las redes de...
 
Marcos Fuentes - De cero a DFIR (Forense) [rooted2018]
Marcos Fuentes - De cero a DFIR (Forense) [rooted2018]Marcos Fuentes - De cero a DFIR (Forense) [rooted2018]
Marcos Fuentes - De cero a DFIR (Forense) [rooted2018]
 
Yago Jesus & David Reguera - Deteccion de intrusos en UNIX [rootedvlc2019]
Yago Jesus & David Reguera - Deteccion de intrusos en UNIX [rootedvlc2019]Yago Jesus & David Reguera - Deteccion de intrusos en UNIX [rootedvlc2019]
Yago Jesus & David Reguera - Deteccion de intrusos en UNIX [rootedvlc2019]
 
José Selvi - Unprivileged Network Post-Exploitation [RootedCON 2011]
José Selvi - Unprivileged Network Post-Exploitation [RootedCON 2011]José Selvi - Unprivileged Network Post-Exploitation [RootedCON 2011]
José Selvi - Unprivileged Network Post-Exploitation [RootedCON 2011]
 
Oscar Juarez - Iniciación al análisis de malware [rooted2018]
Oscar Juarez - Iniciación al análisis de malware [rooted2018]Oscar Juarez - Iniciación al análisis de malware [rooted2018]
Oscar Juarez - Iniciación al análisis de malware [rooted2018]
 
Mariano Palomo - Taller de reversing en sistemas Windows aplicado a CTFs [ro...
Mariano Palomo  - Taller de reversing en sistemas Windows aplicado a CTFs [ro...Mariano Palomo  - Taller de reversing en sistemas Windows aplicado a CTFs [ro...
Mariano Palomo - Taller de reversing en sistemas Windows aplicado a CTFs [ro...
 
I Know Your P4$$w0rd (And If I Don't, I Will Guess It...)
I Know Your P4$$w0rd (And If I Don't, I Will Guess It...)I Know Your P4$$w0rd (And If I Don't, I Will Guess It...)
I Know Your P4$$w0rd (And If I Don't, I Will Guess It...)
 
Pentesting 101 por Paulino Calderon
Pentesting 101 por Paulino CalderonPentesting 101 por Paulino Calderon
Pentesting 101 por Paulino Calderon
 
Lorenzo Martínez - Linux DFIR: My Way! [rooted2019]
Lorenzo Martínez - Linux DFIR: My Way! [rooted2019]Lorenzo Martínez - Linux DFIR: My Way! [rooted2019]
Lorenzo Martínez - Linux DFIR: My Way! [rooted2019]
 
Abraham Pasamar & Carlos Fernández - Purple brain, purple brain ... [rooted2019]
Abraham Pasamar & Carlos Fernández - Purple brain, purple brain ... [rooted2019]Abraham Pasamar & Carlos Fernández - Purple brain, purple brain ... [rooted2019]
Abraham Pasamar & Carlos Fernández - Purple brain, purple brain ... [rooted2019]
 
OWASP IoTGoat - Enseñando a desarrolladores IoT a crear productos seguros - P...
OWASP IoTGoat - Enseñando a desarrolladores IoT a crear productos seguros - P...OWASP IoTGoat - Enseñando a desarrolladores IoT a crear productos seguros - P...
OWASP IoTGoat - Enseñando a desarrolladores IoT a crear productos seguros - P...
 
Juan Antonio Calles & Patricia Rada - Biohacking: Almacenando información en ...
Juan Antonio Calles & Patricia Rada - Biohacking: Almacenando información en ...Juan Antonio Calles & Patricia Rada - Biohacking: Almacenando información en ...
Juan Antonio Calles & Patricia Rada - Biohacking: Almacenando información en ...
 
David López Paz - Global Warfare [RootedCON 2011]
David López Paz - Global Warfare [RootedCON 2011]David López Paz - Global Warfare [RootedCON 2011]
David López Paz - Global Warfare [RootedCON 2011]
 
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]
 

Similar a Carlos Brendel - Sobreviviendo al exterior con tu IPS [rooted2018]

Ponencia sql avanzado y automatizado
Ponencia sql avanzado y automatizadoPonencia sql avanzado y automatizado
Ponencia sql avanzado y automatizado
n3xasec
 
Pentest - El Arte de la Guerra
Pentest - El Arte de la GuerraPentest - El Arte de la Guerra
Pentest - El Arte de la Guerra
Luis Cortes Zavala
 

Similar a Carlos Brendel - Sobreviviendo al exterior con tu IPS [rooted2018] (20)

Extendiendo la seguridad en Elastix con Snort IDS/IPS
Extendiendo la seguridad en Elastix con Snort IDS/IPSExtendiendo la seguridad en Elastix con Snort IDS/IPS
Extendiendo la seguridad en Elastix con Snort IDS/IPS
 
Ponencia sql avanzado y automatizado
Ponencia sql avanzado y automatizadoPonencia sql avanzado y automatizado
Ponencia sql avanzado y automatizado
 
Extendiendo la Seguridad de Elastix con Snort
Extendiendo la Seguridad de Elastix con SnortExtendiendo la Seguridad de Elastix con Snort
Extendiendo la Seguridad de Elastix con Snort
 
Webinar CISOBeat - Detectar Ataques de Red Utilizando SNORT
Webinar CISOBeat - Detectar Ataques de Red Utilizando SNORTWebinar CISOBeat - Detectar Ataques de Red Utilizando SNORT
Webinar CISOBeat - Detectar Ataques de Red Utilizando SNORT
 
¿Cómo detectar ataques de red utilizando Snort? | CISObeat
¿Cómo detectar ataques de red utilizando Snort? | CISObeat¿Cómo detectar ataques de red utilizando Snort? | CISObeat
¿Cómo detectar ataques de red utilizando Snort? | CISObeat
 
Taller cybersecurity 2016
Taller cybersecurity 2016Taller cybersecurity 2016
Taller cybersecurity 2016
 
NcN_CSUC_CSIRT
NcN_CSUC_CSIRTNcN_CSUC_CSIRT
NcN_CSUC_CSIRT
 
CERT/CSIRT's tools: Con las manos en la masa
CERT/CSIRT's tools: Con las manos en la masaCERT/CSIRT's tools: Con las manos en la masa
CERT/CSIRT's tools: Con las manos en la masa
 
Tu banca móvil, en forma simple y ¿segura? Estado de la seguridad en apps móv...
Tu banca móvil, en forma simple y ¿segura? Estado de la seguridad en apps móv...Tu banca móvil, en forma simple y ¿segura? Estado de la seguridad en apps móv...
Tu banca móvil, en forma simple y ¿segura? Estado de la seguridad en apps móv...
 
PRESENTACION bajo costo.pptx
PRESENTACION bajo costo.pptxPRESENTACION bajo costo.pptx
PRESENTACION bajo costo.pptx
 
Conferencia arquitectura de Ciberdefensa APT
Conferencia arquitectura de Ciberdefensa APTConferencia arquitectura de Ciberdefensa APT
Conferencia arquitectura de Ciberdefensa APT
 
Present3
Present3Present3
Present3
 
Elio Rojano - VoIP2DAY 2016 | Que hace tu Asterisk cuando no miras
Elio Rojano - VoIP2DAY 2016 | Que hace tu Asterisk cuando no mirasElio Rojano - VoIP2DAY 2016 | Que hace tu Asterisk cuando no miras
Elio Rojano - VoIP2DAY 2016 | Que hace tu Asterisk cuando no miras
 
Qué hace tu Asterisk cuando no miras
Qué hace tu Asterisk cuando no mirasQué hace tu Asterisk cuando no miras
Qué hace tu Asterisk cuando no miras
 
Pentest - El Arte de la Guerra
Pentest - El Arte de la GuerraPentest - El Arte de la Guerra
Pentest - El Arte de la Guerra
 
Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)
Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)
Virus, el arte de algunos - Alberto García de Dios (/Rooted CON 2011)
 
Lw2010 Pedro Valera
Lw2010 Pedro ValeraLw2010 Pedro Valera
Lw2010 Pedro Valera
 
Lw2010 - Uso De La Programacion En Linux Para La Seguridad En Redes
Lw2010 - Uso De La Programacion En Linux Para La Seguridad En RedesLw2010 - Uso De La Programacion En Linux Para La Seguridad En Redes
Lw2010 - Uso De La Programacion En Linux Para La Seguridad En Redes
 
Seguridad
SeguridadSeguridad
Seguridad
 
Ethical hacking en Plataformas de Voz Sobre IP (Elastix)
Ethical hacking en Plataformas de Voz Sobre IP (Elastix)Ethical hacking en Plataformas de Voz Sobre IP (Elastix)
Ethical hacking en Plataformas de Voz Sobre IP (Elastix)
 

Más de RootedCON

Más de RootedCON (20)

Rooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro Villaverde
Rooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro VillaverdeRooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro Villaverde
Rooted2020 A clockwork pentester - Jose Carlos Moral & Alvaro Villaverde
 
rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...
rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...
rooted2020 Sandbox fingerprinting -_evadiendo_entornos_de_analisis_-_victor_c...
 
Rooted2020 hunting malware-using_process_behavior-roberto_amado
Rooted2020 hunting malware-using_process_behavior-roberto_amadoRooted2020 hunting malware-using_process_behavior-roberto_amado
Rooted2020 hunting malware-using_process_behavior-roberto_amado
 
Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_
Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_
Rooted2020 compliance as-code_-_guillermo_obispo_-_jose_mariaperez_-_
 
Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...
Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...
Rooted2020 the day i_ruled_the_world_deceiving_software_developers_through_op...
 
Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...
Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...
Rooted2020 si la-empresa_ha_ocultado_el_ciberataque,_como_se_ha_enterado_el_r...
 
Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...
Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...
Rooted2020 wordpress-another_terror_story_-_manuel_garcia_-_jacinto_sergio_ca...
 
Rooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguer
Rooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguerRooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguer
Rooted2020 Atacando comunicaciones-de_voz_cifradas_-_jose_luis_verdeguer
 
rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...
rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...
rooted2020-Rootkit necurs no_es_un_bug,_es_una_feature_-_roberto_santos_-_jav...
 
Rooted2020 stefano maccaglia--_the_enemy_of_my_enemy
Rooted2020 stefano maccaglia--_the_enemy_of_my_enemyRooted2020 stefano maccaglia--_the_enemy_of_my_enemy
Rooted2020 stefano maccaglia--_the_enemy_of_my_enemy
 
Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...
Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...
Rooted2020 taller de-reversing_de_binarios_escritos_en_golang_-_mariano_palom...
 
Rooted2020 virtual pwned-network_-_manel_molina
Rooted2020 virtual pwned-network_-_manel_molinaRooted2020 virtual pwned-network_-_manel_molina
Rooted2020 virtual pwned-network_-_manel_molina
 
Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...
Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...
Rooted2020 van a-mear_sangre_como_hacer_que_los_malos_lo_paguen_muy_caro_-_an...
 
Rooted2020 todo a-siem_-_marta_lopez
Rooted2020 todo a-siem_-_marta_lopezRooted2020 todo a-siem_-_marta_lopez
Rooted2020 todo a-siem_-_marta_lopez
 
Rooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valero
Rooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valeroRooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valero
Rooted2020 roapt evil-mass_storage_-_tu-ya_aqui_-_david_reguera_-_abel_valero
 
Rooted2020 live coding--_jesus_jara
Rooted2020 live coding--_jesus_jaraRooted2020 live coding--_jesus_jara
Rooted2020 live coding--_jesus_jara
 
Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...
Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...
Rooted2020 legalidad de-la_prueba_tecnologica_indiciaria_cuando_tu_papi_es_un...
 
Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...
Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...
Rooted2020 hackeando el-mundo_exterior_a_traves_de_bluetooth_low-energy_ble_-...
 
Rooted2020 evading deep-learning_malware_detectors_-_javier_yuste
Rooted2020 evading deep-learning_malware_detectors_-_javier_yusteRooted2020 evading deep-learning_malware_detectors_-_javier_yuste
Rooted2020 evading deep-learning_malware_detectors_-_javier_yuste
 
Rooted2020 encontrando 0days-en_2020_-_antonio_morales
Rooted2020 encontrando 0days-en_2020_-_antonio_moralesRooted2020 encontrando 0days-en_2020_-_antonio_morales
Rooted2020 encontrando 0days-en_2020_-_antonio_morales
 

Último

redes informaticas en una oficina administrativa
redes informaticas en una oficina administrativaredes informaticas en una oficina administrativa
redes informaticas en una oficina administrativa
nicho110
 

Último (12)

PROYECTO FINAL. Tutorial para publicar en SlideShare.pptx
PROYECTO FINAL. Tutorial para publicar en SlideShare.pptxPROYECTO FINAL. Tutorial para publicar en SlideShare.pptx
PROYECTO FINAL. Tutorial para publicar en SlideShare.pptx
 
EVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptx
EVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptxEVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptx
EVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptx
 
Avances tecnológicos del siglo XXI 10-07 eyvana
Avances tecnológicos del siglo XXI 10-07 eyvanaAvances tecnológicos del siglo XXI 10-07 eyvana
Avances tecnológicos del siglo XXI 10-07 eyvana
 
EL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptx
EL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptxEL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptx
EL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptx
 
Buenos_Aires_Meetup_Redis_20240430_.pptx
Buenos_Aires_Meetup_Redis_20240430_.pptxBuenos_Aires_Meetup_Redis_20240430_.pptx
Buenos_Aires_Meetup_Redis_20240430_.pptx
 
investigación de los Avances tecnológicos del siglo XXI
investigación de los Avances tecnológicos del siglo XXIinvestigación de los Avances tecnológicos del siglo XXI
investigación de los Avances tecnológicos del siglo XXI
 
Innovaciones tecnologicas en el siglo 21
Innovaciones tecnologicas en el siglo 21Innovaciones tecnologicas en el siglo 21
Innovaciones tecnologicas en el siglo 21
 
Avances tecnológicos del siglo XXI y ejemplos de estos
Avances tecnológicos del siglo XXI y ejemplos de estosAvances tecnológicos del siglo XXI y ejemplos de estos
Avances tecnológicos del siglo XXI y ejemplos de estos
 
How to use Redis with MuleSoft. A quick start presentation.
How to use Redis with MuleSoft. A quick start presentation.How to use Redis with MuleSoft. A quick start presentation.
How to use Redis with MuleSoft. A quick start presentation.
 
redes informaticas en una oficina administrativa
redes informaticas en una oficina administrativaredes informaticas en una oficina administrativa
redes informaticas en una oficina administrativa
 
Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...
Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...
Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...
 
pruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITpruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNIT
 

Carlos Brendel - Sobreviviendo al exterior con tu IPS [rooted2018]

  • 1. Sobreviviendo al exterior con tu IPS Carlos Brendel
  • 2. Sobreviviendo al exterior con tu IPS Carlos Brendel • Ingeniero de Telecomunicaciones por la Universidad Politécnica de Valencia (UPV). • Estudiando el Máster de Ciberseguridad en la universidad Oberta de Cataluña (UOC). • Técnico analista en el SOC de Telefónica.
  • 3. Qué es un IPS?
  • 4. Sobreviviendo al exterior con tu IPS Intrusion Prevention System • Sistema que cursa y monitoriza tráfico. • Procesa los paquetes en busca de actividad maliciosa, aceptándolos o bloqueándolos en función del resultado. • Basado en firmas o anomalías. AB GIF FW
  • 6. Sobreviviendo al exterior con tu IPS Redacción básica de firmas [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [SID]... ) Definición parámetros de la conexión: - Origen - Destino - Puertos - Protocolo - Cabeceras - Payload Definición acción a tomar: - Pass - Alert - Drop - Reject
  • 7. Sobreviviendo al exterior con tu IPS Redacción básica de firmas [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) - Content Modifiers - Sticky buffer http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 8. Sobreviviendo al exterior con tu IPS Redacción básica de firmas [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) Ejemplos: - alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"GET a recurso megasecreto!"; content: "GET"; http_method; content: "recursomegasecreto"; http_uri; http_referer; pcre: "/cuevasdelsmalosllamadosw+/i"; sid:2;) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 9. Sobreviviendo al exterior con tu IPS Redacción básica de firmas [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) Ejemplos: - alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"GET a recurso megasecreto!"; content: "GET"; http_method; content: "recursomegasecreto"; http_uri; http_referer; pcre: "/cuevasdelsmalosllamadosw+/i"; sid:2;) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 12. Sobreviviendo al exterior con tu IPS Entorno - IPTABLES - SURICATA
  • 13. Dejad que os cuente una historia... Basado en hechos reales
  • 18. Sobreviviendo al exterior con tu IPS Cambios: • High -> Critical • plugin -> Multipart parser • malicious a -> a malicious
  • 19. Cuánto tardó en publicarse el exploit?
  • 21. Cuánto tardaron en publicar firmas?
  • 26. Mientras tanto en internet...
  • 28. Sobreviviendo al exterior con tu IPS CVE-2017-5638 Definición CVE: "The Jakarta Multipart parser in Apache Struts 2 2.3.x before 2.3.32 and 2.5.x before 2.5.10.1 has incorrect exception handling and error-message generation during file-upload attempts, which allows remote attackers to execute arbitrary commands via a crafted Content-Type, Content-Disposition, or Content- Length HTTP header, as exploited in the wild in March 2017 with a Content-Type header containing a #cmd= string. " - https://cve.mitre.org
  • 29. Sobreviviendo al exterior con tu IPS CVE-2017-5638 Definición CVE: "The Jakarta Multipart parser in Apache Struts 2 2.3.x before 2.3.32 and 2.5.x before 2.5.10.1 has incorrect exception handling and error-message generation during file-upload attempts, which allows remote attackers to execute arbitrary commands via a crafted Content-Type, Content- Disposition, or Content-Length HTTP header, as exploited in the wild in March 2017 with a Content- Type header containing a #cmd= string. " - https://cve.mitre.org Traducción al mundo real: Tras el error provocado por un "Content-Type" no válido, la expresión no se escapa y se utiliza por la función "LocalizedTextUtil.findText" para generar el mensaje de error. Pero esta función interpreta como OGNL (Object-Graph Navigation Language, cosas de Java...) todo código entre %{...} GIF GIRL!
  • 30. Sobreviviendo al exterior con tu IPS CVE-2017-5638 Definición CVE: "The Jakarta Multipart parser in Apache Struts 2 2.3.x before 2.3.32 and 2.5.x before 2.5.10.1 has incorrect exception handling and error-message generation during file-upload attempts, which allows remote attackers to execute arbitrary commands via a crafted Content-Type, Content- Disposition, or Content-Length HTTP header, as exploited in the wild in March 2017 with a Content- Type header containing a #cmd= string. " - https://cve.mitre.org Traducción al mundo real: Tras el error provocado por un "Content-Type" no válido, la expresión no se escapa y se utiliza por la función "LocalizedTextUtil.findText" para generar el mensaje de error. Pero esta función interpreta como OGNL (Object-Graph Navigation Language, cosas de Java...) todo código entre %{...} GIF GIRL!
  • 31. Sobreviviendo al exterior con tu IPS Análisis exploit
  • 32. Sobreviviendo al exterior con tu IPS Análisis exploit
  • 33. Sobreviviendo al exterior con tu IPS Análisis exploit
  • 34. Sobreviviendo al exterior con tu IPS Análisis exploit
  • 35. Sobreviviendo al exterior con tu IPS Análisis exploit
  • 36. Sobreviviendo al exterior con tu IPS Análisis exploit
  • 37. Sobreviviendo al exterior con tu IPS Análisis exploit
  • 38. Sobreviviendo al exterior con tu IPS Análisis exploit
  • 39. Sobreviviendo al exterior con tu IPS POC
  • 41. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 42. Sobreviviendo al exterior con tu IPS CVE-2017-5638 Definición CVE: "The Jakarta Multipart parser in Apache Struts 2 2.3.x before 2.3.32 and 2.5.x before 2.5.10.1 has incorrect exception handling and error-message generation during file-upload attempts, which allows remote attackers to execute arbitrary commands via a crafted Content-Type, Content-Disposition, or Content- Length HTTP header, as exploited in the wild in March 2017 with a Content-Type header containing a #cmd= string. " - https://cve.mitre.org
  • 43. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 44. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) Primera firma: - drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"Detectado exploit Apache Struts – CVE-2017-5638!"; content: "GET"; http_method; http_content_type; content: "#cmd="; sid:3;) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 45. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) Primera firma: - drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"Detectado exploit Apache Struts – CVE-2017-5638!"; content: "GET"; http_method; http_content_type; content: "#cmd="; sid:3;) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html ¿?
  • 47. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) Primera firma: - drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"Detectado exploit Apache Struts – CVE-2017-5638!"; content: "GET"; http_method; http_content_type; content: "#cmd="; sid:3;) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 49. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) Primera firma: - drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"Detectado exploit Apache Struts – CVE-2017-5638!"; content: "GET"; http_method; http_content_type; content: "#cmd="; sid:3;) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 50. Redacción de la firma_buena
  • 51. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 52. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 53. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) Segunda firma: - drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"Detectado exploit Apache Struts – CVE-2017-5638!"; content: "GET"; http_method; http_content_type; content: "java.lang.ProcessBuilder"; nocase; sid:4;) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 54. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) Segunda firma: - drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"Detectado exploit Apache Struts – CVE-2017-5638!"; content: "GET"; http_method; http_content_type; content: "java.lang.ProcessBuilder"; nocase; sid:4;) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html ¿?
  • 56. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) Segunda firma: - drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"Detectado exploit Apache Struts – CVE-2017-5638!"; content: "GET"; http_method; http_content_type; content: "java.lang.ProcessBuilder"; sid:4;) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 57. Redacción de la firma_buena_final
  • 58. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 61. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) Tercera firma: - drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"Detectado exploit Apache Struts – CVE-2017-5638!"; content: "GET"; http_method; http_content_type; pcre: "/%{(#[^}]+}/"; content: "ognl"; nocase; sid:5;) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 62. Sobreviviendo al exterior con tu IPS Redacción de firma [ACTION] [PROTOCOL] [SOURCE] [SPORT] [DIRECTION] [DESTINATION] [DPORT] ( [MSG]; [CONTENT]; [MODIFIER]; [STICKY BUFFER]; [CONTENT1]; [CONTENT2];…; [SID]; ) Tercera firma: - drop tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"Detectado exploit Apache Struts – CVE-2017-5638!"; content: "GET"; http_method; http_content_type; pcre: "/%{(#[^}]+}/"; content: "ognl"; nocase; sid:5;) http://suricata.readthedocs.io/en/latest/rules/http-keywords.html
  • 68. Sobreviviendo al exterior con tu IPS kworker.conf kworker
  • 70. Sobreviviendo al exterior con tu IPS Step By Step • Entender en qué consiste la vulnerabilidad • Entender cómo funciona el exploit de la PoC • Montar pequeño laboratorio • Let the fun begin!
  • 71. Sobreviviendo al exterior con tu IPS Step By Step • Entender en qué consiste la vulnerabilidad • Entender cómo funciona el exploit de la PoC • Montar pequeño laboratorio • Let the fun begin!
  • 72. Sobreviviendo al exterior con tu IPS Máquina utilizada CVE-2017-5638 https://mega.nz/#!HjRRWTYZ!tEPSChwUkZ8PNHs6mUkR_ICfxIyjkKjGrGQN-nnYFt0 debian:debian root:debian
  • 73. Muchas gracias! ClicGIF looney toonsk to add text