Global Azure Lima 2024 - Integración de Datos con Microsoft Fabric
Pablo Caro & Jaime Sánchez - I know your P4$$w0rd (and if I don’t, I will guess it) [rooted2019]
1. I KNOW YOUR P4$$W0RD
(AND IF I DON’T, I WILL GUESS IT…)
2. • Infographic Style
QUIENES
SOMOS???
PABLO CARO
MARTÍN
- Ingeniero Informático
por la Universidad de
Granada
- OSCP, OSCE and all-
around nerd.
- Actualmente
trabajando en Red Team
de Telefónica
JAIME SÁNCHEZ
Hacker – Security Expert
– Occasional Rockstar
- Ingeniero Informático
+ MBA. CISA, CISM,
CISSP y muchas más…
- Speaker habitual en
conferencias como
RootedCon, Blackhat,
Defcon, Shmoocon,
Derbycon etc.
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
3. ¿POR QUÉ?
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
4. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
5. 2013 2014 2016 2017
3 billion accounts
Yahoo admitted in
2017 that the
previously reported
data breach in 2013
actually affected all
three billion accounts,
exposing the names,
birth dates, phone
numbers and
passwords of users
whose accounts were
encrypted with what
was weak security.
412 million
That breach also
affected over 15
million "deleted"
accounts that had not
been purged.
An additional 62
million accounts from
Cams.com and seven
million from
Penthouse.com were
stolen.
146 million
The company added
that 209,000 U.S.
credit card numbers
were exposed.
Earlier this year,
Equifax found an
additional 2.4 million
U.S. consumers whose
names and partial
driver’s license
information were
stolen.
EquifaxFriend FinderYahooYahoo
500 million
Data included names,
email addresses,
telephone numbers,
birth dates, encrypted
passwords and,,
security questions. The
U.S. charged four
Russians, including
two Russian Federal
Security Service (FSB)
officers with the crime,
according to the U.S.
Department of Justice.
2019
500 million
An investigation
recently revealed
"unauthorized access"
since 2014 to
information relating to
reservations at
Marriott's Starwood
properties.
Marriot
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
TOP 5 LEAKS
6. * Más info en https://en.wikipedia.org/wiki/List_of_data_breaches
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
7. 1990s a 2000s:
- No había apenas generación de reglas
- Los datos públicos eran mucho más pequeños
- Poco intercambio de estrategias y técnicas de cracking
- Comunidad dispersa
- Lanmanager -> LM hashes y Windows NT -> MD4 NTLM
- Uso fundamentalmente de CPU
- Aparecen las rainbow tables
- Pasamos de Cracker Jack a John the Ripper / l0pthCrack
2007+ a 2019:
- Equipos de password cracking conocidos
- Muchas más herramientas y de código abierto
- Gran cantidad de diccionarios, como Rockyou, Linkedin, Yahoo etc.
- Soporte de mayor cantidad de hashes
- Uso mayoritario de GPUs
- Alquiler de instancias cloud, no es necesario hardware propio
- Hashcat power J
- Contramedidas como Autenticación Multifactor (MFA)
John the
Ripper
Rainbow
Tables
MagnumRipper
– Jumbo Repo
KoreLogic
Rule sets
Hashcat
Public
Datasets
Dictionaries
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
UN POCO DE HISTORIA …
* Niels Provos and David Mazieres, “A Future-Adaptable Password Scheme” The OpenBSD Project, 1999
Late 1990s: crypt(3)
speed comparision
8. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
HAVEIBEENPWNED vs SPYCLOUD
9. Encoding = transforma los datos en un esquema conocido públicamente para su uso
Hashing = función criptográfica unidireccional imposible de revertir (debería)
Cifrado = asignación de datos de entrada y datos de salida reversibles con una clave BASICS J
EN EL PEOR CASO, FUERZA BRUTA A TODO EL
ESPACIO POSIBLE DE CARACTERES:
?b?b?b?b?b?b?b?b?b?b …
TIPOS DE ATAQUE
- Dictionary/Wordlist Attack - Brute-Force Attack
- Rule Attack - Hybrid Attack
- Mask Attack
Keyspace: charset ^ length (?a?a?a?a = 85.828.704)
Hashrate: función de hash / potencia de hardware (bcrypt / GTX1080 = 13.094 H/s)
Cracking time: 85.828.704 / 13.094 H / s = 6.554 segundos (1h 49m 14s)
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
10. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
CPU vs GPU
De forma MUY simplificada
- GPU contiene más ALU’s (Arithmetic Logic Units) que una CPU
- la CPU contiene una serie de cores optimizados para procesamiento en serie
- La GPU supone un incremento en la capacidad para realizar operaciones aritméticas de forma paralela
- La CPU contiene pocos núcleos muy completos y la GPU miles de núcleos muy sencillos
Xeon E5-2620 v3, 6@2.4Ghz x 2 CPUs = 12 cores
205 MH/s (9 caracteres, unos 108 años)
Nvidia GeForce GTX Titan X 3,072@1Ghz x 8 GPUs = 24,576 cores
169904 MH/s (9 caracteres, unos 48 días)
11. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
BENCHMARKS GPU
1050: 6536.1 MH/s
1060: 11560.2 MH/s
980 TI: 16023.0 MH/s
1070: 18394.9 MH/s
R9 290: 20504.5 MH/s
1080: 24809.8 MH/s
1080 TI: 30963.5 MH/s
2080: 37085.5 MH/s
2080 TI: 50053.3 MH/s
TITAN RTX: 64019.6 MH/s
Sagitta Brutalis: 8 x 1080 FE21,169.00 USD
2080 TI GTX 1080 TI R9 290 GTX 980 TI GTX 1070
¿ Founders Edition ?
12. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
x8
13. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
14. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
POR EJEMPLO …
- minúsculas abcdefghijklmnopqrstuvwxyz
- mayúsculas ABCDEFGHIJKLMNOPQRSTUVWXYZ
- números 0123456789
- caracteres especiales ?!"#$%&'()*+,-./:;<=>?@[]^_`{|} ~
m@4#J%CN5P Contraseña generada por password manager (10 caracteres)
Combinaciones posibles60.510.648.114.517.017.120
Utilizando una instancia p3.16xl con 450.000.000.000 hashes / segundo
4 años 266 días 23 horas 47 minutos
Supondría un coste de
347.740,33 $
16. DEMO TIME
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
17. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
18. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
19. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
20. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
21. 86,03 %
SIN REGLAS
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
Mejora de 10,44%
> 75 hits
Kaonashi866M
Kaonashi14M
2,35 % 2,6 %
Kaonashi14M
11,69 % 10,47 %
CON REGLAS + BEST64
22. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
24. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
• Contraseña media
• La longitud media
• Conocimientos de una persona
• Diferencias entre hombres y mujeres
• Símbolos más utilizados
• Uso de números
• Generación de estos números
• Uso de contraseñas
ESTADÍSTICAS
25. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
REGLA 20/60/20
20% FÁCIL 60% MODERADA 20% DIFÍCIL
• El 20% de las contraseñas son fáciles y se recuperan con diccionarios de propósito general, contraseñas comunes o
máscaras sencillas.
• El 60% de las contraseñas tienen una dificultad moderada, y son ligeras variaciones/mutaciones del 20% anterior
• El 20% restante son difíciles de recuperar, ya que son complejas, con una longitud superior a lo habitual o con ciertas
características únicas
27. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
ASCII: single byte encoding. Todas las combinaciones correspondente a ASCII Latin/English
UTF-8: one to four byte encoding
Base code Character Code Espacio de caracteres: d0 80 - d4 bf
Árabe: d880-ddbf Bengalí: e0a680-e0adbf Chino: e4b880-e4bbbf Japonés: e38180-e3869f
Built-in Charsets: alemán, francés, portugués, castellano, catalán, inglés, griego, italiano, lituano, eslovaco etc..
?b = 256 byte = 0x00 - 0xff
Por ejemplo, para una contraseña de 6 caracteres con un carácter extranjero que desconocemos:
--hex-charset -1 d0d1d2d3d4 -2
808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacada
eafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf -i ?1?2?1?2?1?2?1?2?1?2?1?2?1?2?1?2
28. κυνηγός
( cazador )
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
κυνηγός
κυνηγος
kynhgos
kinigos
Romanización mediante el uso del alfabeto latino
(transliteración lengua escrita/ transcripción lengua hablada)
UTF-8
ASCII Greek - aka Greeklish -
Ψυχή
( alma )
Psixi
Psihi
Psyxh
Psyhi
Diferentes estilos de escritura (permutaciones)
52 hits
China continental
Taiwán
Hong Kong
CHINO
GRIEGO CLÁSICO
29. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
30. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
31. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
COMPLICADO???
Pinyin: Transcripción fonética del chino mandarín
Zhùyīn Fúhào: sistema nacional fonético de la República de China
33. OTRAS ALTERNATIVAS MENOS CONOCIDAS
- Aspell
- Twitter global feed
- Pastebin
- Wikipedia
- Reddit
- IMDB
- Corpus
- etc.
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
47. Hay que pensar un poco…
Cuanto antes se crackeen los hashes, MEJOR
1. Menos comprobaciones = Mayor hashrate
2. ¡A lo mejor acabo con todos!
Objetivo 1: Afinar máscaras
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
48. ?l?l?l?l?l?l?l?l 1,88% 208.827.064.576
?d?d?d?d?d?d 1,56% 1.000.000
?l?l?l?l?l?l 1,42% 308.915.776
?d?d?d?d?d?d?d?d 1,01% 100.000.000
?l?l?l?l?l?l?l 0,97% 8.031.810.176
?l?l?l?l?l?l?d?d 0,68% 30.891.577.600
?l?l?l?l?l?l?l?l?l 0,60% 5.429.503.678.976
?d?d?d?d?d?d?d 0,56% 10.000.000
?l?l?l?l?l?l?l?l?l?l 0,51% 141.167.095.653.376
?l?l?l?l?l?l?l?d 0,40% 80.318.101.760
9,60% 146.925.087.802.240 < 1 hora
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
Máscaras más probables
¡Público!
49. Hay que pensar un poco…
Cuanto antes se crackeen los hashes, MEJOR
1. Menos comprobaciones = Mayor hashrate
2. ¡A lo mejor acabo con todos!
Objetivo 1: Afinar máscaras
Objetivo 2: Llevar el caso medio lo más al principio posible
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
50. Qqmrxj974 vs Daniel123
Cadenas de Markov
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
A
B
C
0.5
0.4
0.9
0.05
0.75
0.2
0.1
0.05
0.05
51. Hay que pensar un poco más…
… pensar como UN USUARIO
bananaBananaB4n4n4B4n4n4!
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
52. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
REGLAS DE MUTACIÓN
53. Reglas de mutación
banana à c sa4 $! à B4n4n4!
belzebu à se3 o64 $! à b3lz3b4!
Password à sa@ ss5 so0 $1 $2 $3 à P@55w0rd123
Reglas “estándar”
best64 d3ad0ne T0XlC dive
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
54. Extracción reglas de mutación
¿Cómo?
1. Análisis estático de mutaciones
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
55. Análisis estático de mutaciones
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
lower_endswith[‘123’] = 0
lower_endswith[‘1!’] = 0
lower_startswith[‘!’] = 0
upper_endswith[‘$’] = 0
capitalized_endswith[‘123’] = 0
…
56. Análisis estático de mutaciones
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
lower_endswith[‘123’] = 1
lower_endswith[‘1!’] = 0
lower_startswith[‘!’] = 0
upper_endswith[‘$’] = 0
capitalized_endswith[‘123’] = 0
…
potato123
57. Análisis estático de mutaciones
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
lower_endswith[‘123’] = 1
lower_endswith[‘1!’] = 0
lower_startswith[‘!’] = 0
upper_endswith[‘$’] = 0
capitalized_endswith[‘123’] = 1
…
potato123
Daniel123
58. Análisis estático de mutaciones
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
lower_endswith[‘123’] = 1
lower_endswith[‘1!’] = 0
lower_startswith[‘!’] = 0
upper_endswith[‘$’] = 1
capitalized_endswith[‘123’] = 1
…
potato123
Daniel123
HEEMAN$
59. Análisis estático de mutaciones
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
lower_endswith[‘123’] = 6
lower_endswith[‘1!’] = 4
lower_startswith[‘!’] = 2
upper_endswith[‘$’] = 2
capitalized_endswith[‘123’] = 3
…
potato123
Daniel123
HEEMAN$
!qwerty
PASSS$
roberto1!
Alehop123
alohomora1!
indios1!
amigo123
asdf123
iamumber1!
guitar123
Dramaking123
ap0calypse
kaka123
!aaaaa
R0c0s0!
kitty123
…
60. Análisis estático de mutaciones
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
lower_endswith[‘123’] = 6
lower_endswith[‘1!’] = 4
lower_startswith[‘!’] = 2
upper_endswith[‘$’] = 2
capitalized_endswith[‘123’] = 3
…
potato123
Daniel123
HEEMAN$
!qwerty
PASSS$
roberto1!
Alehop123
alohomora1!
indios1!
amigo123
asdf123
iamumber1!
guitar123
Dramaking123
ap0calypse
kaka123
!aaaaa
R0c0s0!
kitty123
…
61. Extracción reglas de mutación
¿Cómo?
1. Análisis estático de mutaciones
2. PACK
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
62. PACK ( /iphelix/PACK )
rulegen.py
Contraseña à Palabra parecida à Reglas
Problema: Lo intenta demasiado… O con
poca vista.
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
63. PACK lo intenta demasiado
Oportunid@d
P@$$w0rd
cachivach3
destacamento à o93 à destacame3to
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
opportunist à T0 D2 o8d o9@ $d à
Pasador à sa@ ss$ ,3 o4w so0 $d à
cachivache à o93 à
64. Extracción reglas de mutación
¿Cómo?
1. Análisis estático de mutaciones
2. PACK
3.¡Cracking!
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
65. Reglas por cracking
Diccionario + MUCHAS reglas
--debug-mode 4
Contar, ordenar y listo
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
66. Reglas específicas
Reglas para contraseñas
vs
Reglas para palabras
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
¡en
!
67. Resultados
yubaba64: Análisis estático. Palabras.
Openwall/all.txt: + 4.4 % vs best64
Wikipedia: - 0.3 % vs best64
Rockyou: - 12.2 % vs best64
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
68. Resultados
yubaba64: Análisis estático. Palabras.
haku: Cracking. Palabras.
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
Wikipedia ES: + 29.6 % vs d3ad0ne
Wikipedia EN: + 25.7 % vs d3ad0ne
69. Resultados
yubaba64: Análisis estático. Palabras.
haku: Cracking. Palabras.
kamaji: Cracking. Contraseñas.
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
Rockyou: + 9.8 % vs d3ad0ne
Kaonashi14M: + 12.91 % vs d3ad0ne
70. Resultados
yubaba64: Análisis estático. Palabras.
haku: Cracking. Palabras.
kamaji: Cracking. Contraseñas.
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
¡Público!
71. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
72. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
ÚLTIMO 20%
73. Último 20%...
• Ataques de Combinación
Diccionario + Diccionario [+ diccionario…]
•Ataques Híbridos
Diccionario + Máscara / Máscara + Diccionario
•Reglas aleatorias
hashcat -g
•PRINCE
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
75. PRINCE
PRobability INfinite Chained Elements
• Cada línea es un elemento
• Se combinan elementos de distintas longitudes para formar
passwords
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
76. PRINCE
PRobability INfinite Chained Elements
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
Longitud 3:
1 + 1 + 1
1 + 2
2 + 1
3
Longitud 4:
1 + 1 + 1 + 1
1 + 1 + 2
1 + 3
2 + 1 + 1
2 + 2
3 + 1
4
Longitud 5:
1 + 1 + 1 + 1 + 1
1 + 1 + 1 + 2
1 + 1 + 3
1 + 4
2 + 1 + 1 + 1
2 + 1 + 2
…
77. Un encuentro fortuito
“The Unreasonable
Effectiveness of Recurrent
Neural Networks“
https://karpathy.github.io/2015/05/21/rnn-effectiveness/
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
78. Oficio hecho ladrón,con agua ciencia.
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
En cautelas y al amor, el
diente de dolor.
Primo anda la mujer
y al río nos llene.
Buena
verdad, o
m
ucha
sierra.
79. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
80. Y si le enseñas passwords…
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
Kaonashi1M*
123qwer1988
acd143x
beatnow12
sonipop27
koanley
rffsmczwynsc
lizaea6
Wartof
Cumcdfif123
rainboys1
Kaonashi > 14
alex2321131108
lerka29aitas12
12109913513mul
x1xjvtyjxrj1993
maksimovasasova
vaditavidenton
1q12336idesung
w1f7d8948fd669
1234567890489d
ZodovaN18321uak
Español
campilleto
parbondalista
rablanzano
alevaconear
desargavar
desrepositar
corrosamente
trastofacazo
arregrica
tapalero
“RootedCON”
+ mutaciones
$RootedCON(
euCoN
detooR
eedcon
RooONe
R1oOetodCON
9ootedCO
DRooteNCON
RooONe
rootercon
81. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
¿FUNCIONA DE VERDAD?
82. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
106.083
15.622
90.461
29.461
Kaonashi FULL
866 M
Kaonashi1MResultados
83. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
84. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
¡NO ME CRACKEES!
85. Blue Team
• Usar hashes LENTOS (bcrypt, scrypt…)
• Usar hashes con salt
• Obligar al uso de MFA
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
86. Usuarios
• Usar MFA
• Usar contraseñas largas y aleatorias
(gestor de contraseñas)
• correct horse battery staple
I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)
87. I KNOW YOUR P4$$W0RD (AND IF I DON’T, I WILL GUESS IT…)