CTF #nullcon 2012: Programación 4
En este reto nos encontramos con un problema de sustitución.
Estos son los datos que se nos dan:
Ciphertext: 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 05 09 07 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 06 09 06 20 05 05 14 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 20 23 05 12 22 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 06 09 06 20 05 05 14 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 20 23 05 12 22 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 05 09 07 08 20 00 05 09 07 20 05 05 14 00 06 09 22 05 00 06 09 22 05 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 05 09 07 08 20 00 20 23 05 14 20 25 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 20 23 05 14 20 25 00 05 09 07 08 20 00 05 09 07 20 05 05 14 00 06 09 22 05 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 06 20 05 05 14 00 26 05 18 15 00 14 09 14 05 20 05 05 14 00 14 09 14 05 00 20 23 05 14 20 25 06 15 21 18 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 06 09 06 20 05 05 14 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 05 09 07 08 20 00 05 09 07 20 05 05 14 00 06 09 22 05 00 06 09 22 05 00 26 05 18 15 00 06 09 06 20 05 05 14 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 05 09 07 08 20 00 20 23 05 14 20 25 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 14 09 14 05 20 05 05 14 00 14 09 14 05 00 20 23 05 14 20 25 06 15 21 18 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 06 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 06 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 06 09 06 20 05 05 14 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 05 09 07 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 14 09 14 05 20 05 05 14 00 14 09 14 05 00 20 23 05 14 20 25 06 15 21 18 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 20 23 05 12 22 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 05 09 07 20 05 05 14 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 05 09 07 08 20 00 14 09 14 05 00 05 09 07 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 05 09 07 08 20 00 20 23 05 14 20 25 00 26 05 18 15 00 20 23 05 14 20 25 00 05 09 07 08 20 00 14 09 14 05 00 05 09 07 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 05 09 07 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 05 09 07 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 14 09 14 05 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 How we Obfuscated: Plain Text = nullcon After charset Substitution = 14 21 12 12 03 15 14 Literal Substitution = fouteen twentyone twelve twelve three fifteen fouteen After charset Substitution = 06 15 21 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 20 23 05 12 22 05 00 20 23 05 12 22 05 00 20 08 18 05 05 00 06 09 06 20 05 05 14 00 06 15 21 20 05 05 14 charset = 00 means " ", 01 = "a", 02="b".... 26="z", 30 = "0", 31="1" .... 39="9" Reiterate till you find meaning text
Tenemos el texto a descifrar (primer bloque de datos), luego tenemos el método usado para cifrar dicho texto y por último tenemos la correspondencia de caractares. Y dice que iteremos hasta encontrar un texto con sentido.
Lo primero que hice fue crearme una cadena de caracteres, en la que de acuerdo con los datos dados, cada carácter esté en la posición que se corresponda.
subs_string = " abcdefghijklmnopqrstuvwxyz@@@0123456789"
Como vemos, el primer carácter (posición 0) es el espacio en blanco, luego desde la posición 1 a la 26 tenemos el alfabeto (inglés) y los números empezando en la posición 30 de la cadena. Las ‘@’ entre las letras y los números son mero relleno, esas posiciones (27, 28 y 29) nunca serán accedidas. Podríamos haber usado cualquier otro carácter.
Otra estructura de datos que uso es un map, para poder traducir de letras a números. Esto lo fui rellenando a mano a medida que iba ejecutando iteraciones, porque si te fijas hay varios números que están mal deletreados (suponiendo que esto es inglés).
El script con el que solucioné este reto es el siguiente:
#!/usr/bin/env ruby ciphered_text = "06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 05 09 07 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 06 09 06 20 05 05 14 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 20 23 05 12 22 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 06 09 06 20 05 05 14 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 20 23 05 12 22 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 05 09 07 08 20 00 05 09 07 20 05 05 14 00 06 09 22 05 00 06 09 22 05 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 05 09 07 08 20 00 20 23 05 14 20 25 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 20 23 05 14 20 25 00 05 09 07 08 20 00 05 09 07 20 05 05 14 00 06 09 22 05 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 06 20 05 05 14 00 26 05 18 15 00 14 09 14 05 20 05 05 14 00 14 09 14 05 00 20 23 05 14 20 25 06 15 21 18 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 06 09 06 20 05 05 14 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 05 09 07 08 20 00 05 09 07 20 05 05 14 00 06 09 22 05 00 06 09 22 05 00 26 05 18 15 00 06 09 06 20 05 05 14 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 05 09 07 08 20 00 20 23 05 14 20 25 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 14 09 14 05 20 05 05 14 00 14 09 14 05 00 20 23 05 14 20 25 06 15 21 18 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 06 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 06 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 06 09 06 20 05 05 14 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 05 09 07 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 14 09 14 05 20 05 05 14 00 14 09 14 05 00 20 23 05 14 20 25 06 15 21 18 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 20 23 05 12 22 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 05 09 07 20 05 05 14 00 26 05 18 15 00 06 15 21 20 05 05 14 00 14 09 14 05 00 06 15 21 20 05 05 14 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 05 09 07 08 20 00 14 09 14 05 00 05 09 07 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 05 09 07 08 20 00 20 23 05 14 20 25 00 26 05 18 15 00 20 23 05 14 20 25 00 05 09 07 08 20 00 14 09 14 05 00 05 09 07 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 05 09 07 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 19 09 24 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 05 09 07 20 05 05 14 00 26 05 18 15 00 20 23 05 14 20 25 00 20 23 05 14 20 25 20 08 18 05 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 20 23 05 14 20 25 00 20 23 05 14 20 25 06 09 22 05 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 20 23 05 14 20 25 19 09 24 00 06 09 22 05 00 05 09 07 20 05 05 14 00 06 09 06 20 05 05 14 00 26 05 18 15 00 14 09 14 05 20 05 05 14 00 06 09 22 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 06 09 22 05 00 14 09 14 05 00 19 05 22 05 14 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 14 09 14 05 00 20 23 05 14 20 25 20 23 15 00 06 09 22 05 00 26 05 18 15 00 19 09 24 00 06 09 06 20 05 05 14 00 20 23 05 14 20 25 15 14 05 00 20 23 05 14 20 25 00 06 09 22 05 00 06 09 22 05 00 06 15 21 20 05 05 14".split() subs_string = " abcdefghijklmnopqrstuvwxyz@@@0123456789" first_pass = "" ciphered_text.each do |i| first_pass += subs_string[i.to_i] end puts first_pass mymap = {} mymap['fouteen'] = 14 mymap['nine'] = 9 mymap['five'] = 5 mymap['twenty'] = 20 mymap['zero'] = 0 mymap['six'] = 6 mymap['twentytwo'] = 22 mymap['fifteen'] = 15 mymap['twentyone'] = 21 mymap['eigteen'] = 18 mymap['twentythree'] = 23 mymap['twentyfive'] = 25 mymap['twelve'] = 12 mymap['twentysix'] = 26 mymap['eight'] = 8 mymap['seven'] = 7 mymap['nineteen'] = 19 mymap['twentyfour'] = 24 mymap['four'] = 4 mymap['three'] = 3 mymap['two'] = 2 mymap['six'] = 6 mymap['one'] = 1 mymap['sixteen'] = 16 mymap['thirtyeight'] = 38 mymap['thirtyfour'] = 34 second_pass = "" first_pass.split.each do |i| second_pass += subs_string[mymap[i]] end puts second_pass third_pass = "" second_pass.split.each do |i| third_pass += subs_string[mymap[i]] end puts third_pass
Lo ideal sería ejecutar un bucle, pero decía el objecto mymap lo iba construyendo a en cada iteración. Y luego también tendrías que saber cuando parar, es decir, saber en que iteración el texto obtenido es legible y con sentido. Como ves sólo se necesitan 3 iteraciones para llegar a nuestra solución. El script, una vez ejecutado, imprime una línea por cada paso, siendo la última línea y por lo tanto nuestro flag:
sedulously eschew obfuscatory hyperverbosity and prolixity 84 roedy green
Buscar
Entradas Recientes
- Posts
- Reemplazando la bateria del AirTag
- OpenExpo Europe décima edición, 18 de mayo: El Epicentro de la Innovación y la Transformación Digital
- Docker Init
- Kubernetes para profesionales
- Agenda: OpenExpo Europe 2022 llega el 30 de junio en formato presencial
- Libro 'Manual de la Resilencia', de Alejandro Corletti, toda una referencia para la gestión de la seguridad en nuestros sistemas
- Mujeres hackers en ElevenPaths Radio
- Creando certificados X.509 caducados
- Generador de imágenes Docker para infosec