Top Banner
Hacking the web for fun and profit ¡Y sin ir a la cárcel! Hack & Beers Valencia 18/11/2014
52
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Hacking the web for fun and profit

¡Y sin ir a la cárcel! Hack & Beers Valencia

18/11/2014

Page 2: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

$ whoami

Florencio Cano Gabarda

CEO de SEINHE

Ingeniero Superior en Informática

CISA, CEH, IRCA 27001 Lead Auditor, Perito judicial informático

[email protected]

@florenciocano

www.seinhe.com

Page 3: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

¿Qué vamos a ver?

Cómo hacer dinero hackeando webs…legalmente

Page 4: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

ROADMAP

1. ¿QUÉ ES EL HACKING?

2. ¿QUÉ SE HACKEA?

3. HERRAMIENTAS BÁSICAS

4. MANOS A LA OBRA – OWASP TOP 10

5. EVADIENDO LA CARCEL FOR FUN AND PROFIT

Page 5: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

ROADMAP

1. ¿QUÉ ES EL HACKING?

2. ¿QUÉ SE HACKEA?

3. HERRAMIENTAS BÁSICAS

4. MANOS A LA OBRA – OWASP TOP 10

5. EVADIENDO LA CARCEL FOR FUN AND PROFIT

Page 6: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

¿Qué es el hacking?

Page 7: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

The Fappening

Page 8: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

H.S. Detenido

Page 9: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Definición de la RAE

pirata informático. Traducción recomendada para la voz inglesa hacker, ‘persona con grandes habilidades en el manejo de ordenadores, que utiliza sus conocimientos para acceder ilegalmente a sistemas o redes ajenos’: «Un pirata informático logró jaquear los sistemas de seguridad» (Clarín@ [Arg.] 19.6.05).

Page 10: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Mi definición de hacker

Persona que emplea la inteligencia, la asociación de ideas aparentemente disociadas y el pensamiento lateral para encontrar soluciones elegantes a problemas únicos que no han sido resueltos antes o para resolver problemas conocidos de manera más elegante, más rápida, utilizando menos recursos, etc.

Page 11: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

El hacker informático

• Utiliza los recursos disponibles de manera elegante y óptima

• Identifica problemas de manera ingeniosa y los resuelve utilizando el método más inteligente posible

• Pueden ser problemas de seguridad, hardware, software…

Page 12: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Beneficios para la sociedad

• Identificación de fallos públicamente desconocidos

• Concienciación

• Desarrollo de profesionales

Page 13: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

¡Un aplauso por los auténticos hackers!

Page 14: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

ROADMAP

1. ¿QUÉ ES EL HACKING?

2. ¿QUÉ SE HACKEA?

3. HERRAMIENTAS BÁSICAS

4. MANOS A LA OBRA – OWASP TOP 10

5. EVADIENDO LA CARCEL FOR FUN AND PROFIT

Page 15: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Doom en una impresora

Page 16: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Señales de tráfico

Page 17: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Señales de tráfico

Page 18: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Señales de tráfico

Page 19: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Aviones

Page 20: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

¿El vuelo de desaparecido del Malaysian Airlines?

Page 21: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Cajeros automáticos

Page 22: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Webs

Page 23: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Todas las webs tienen peligro

• Distribuir malware

• Zombies para ataques de DDoS

• Ocultación de la identidad para cometer delitos

• Robo de información sensible

Page 24: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Drupaggedon (CVE-2014-3704)

• Drupal utiliza un API para abstracción de consultas SQL

• Una vulnerabilidad en dicha API permite inyectar SQL

• Dicha API y consultas vulnerables están disponibles sin que el usuario esté autenticado

Page 25: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Drupaggedon (CVE-2014-3704)

• Drupal utiliza un API para abstracción de consultas SQL

• Una vulnerabilidad en dicha API permite inyectar SQL

• Dicha API y consultas vulnerables están disponibles sin que el usuario esté autenticado

Page 26: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

¿Cuántos Drupal hay?

Page 27: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

¿Cómo encuentran los atacantes sitios Drupal?

Page 28: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

¿Cómo encuentran los atacantes sitios Drupal?

Page 29: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

ROADMAP

1. ¿QUÉ ES EL HACKING?

2. ¿QUÉ SE HACKEA?

3. HERRAMIENTAS BÁSICAS

4. MANOS A LA OBRA – OWASP TOP 10

5. EVADIENDO LA CARCEL FOR FUN AND PROFIT

Page 30: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

El protocolo HTTP

http://www.ntu.edu.sg/home/ehchua/programming/webprogramming/HTTP_Basics.html

Page 31: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

ZAP – Zed Attack Proxy

DEMO

Page 32: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Arachni

DEMO

Page 33: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

SQL Map

DEMO

Page 34: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

ROADMAP

1. ¿QUÉ ES EL HACKING?

2. ¿QUÉ SE HACKEA?

3. HERRAMIENTAS BÁSICAS

4. MANOS A LA OBRA – OWASP TOP 10

5. EVADIENDO LA CARCEL FOR FUN AND PROFIT

Page 35: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

OWASP Top 10

• A1. Inyección • A2. Gestión de autenticación y/o sesión vulnerable • A3. Cross-Site Scripting (XSS) • A4. Referencias directas a objetos inseguras • A5. Configuración vulnerable • A6. Divulgación de información sensible • A7. Control de acceso a nivel de función • A8. Cross Site Request Forgery (CSRF) • A9. Componentes con vulnerabilidades conocidas • A10. Redirecciones no validadas

Page 36: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

A1. Inyección

DEMO con SQLmap

Page 37: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

A2. Gestión de autenticación y/o sesión vulnerable

Page 38: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

A3. Cross-Site Scripting (XSS)

DEMO en DVWA

Page 39: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

A4. Referencias directas a objetos inseguras

Page 40: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

A5. Configuración vulnerable

DEMO con dirs3arch

Page 41: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

A6. Divulgación de información sensible

Page 42: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

A6. Divulgación de información sensible

Page 43: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

A7. Control de acceso a nivel de función

Page 44: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

A8. Cross Site Request Forgery (CSRF)

DEMO en DVWA

Page 45: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

A9. Componentes con vulnerabilidades conocidas

Page 46: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

A10. Redirecciones no validadas

Page 47: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

ROADMAP

1. ¿QUÉ ES EL HACKING?

2. ¿QUÉ SE HACKEA?

3. HERRAMIENTAS BÁSICAS

4. MANOS A LA OBRA – OWASP TOP 10

5. EVADIENDO LA CARCEL FOR FUN AND PROFIT

Page 48: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Bugbounties: Bugcrowd

Page 49: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Bugbounties: Bugcrowd

Page 50: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Bugbounties: Bugcrowd

Page 51: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

Bugbounties: Bugcrowd

Page 52: Hacking the web for fun and profit ¡Y sin ir a la cárcel!

¿Preguntas?