Warning: This challenge is still active and therefore should not be resolved using this information.
Aviso: Este reto sigue en activo y por lo tanto no se debería resolver utilizando esta información.

Intro

This crackme is for the crack challenge 6 of canyouhack.it.

In this crackme the goal is to turn on all the lights. Note that a light off to the next, so if we interrupt this, we win.

Tools

Exeinfo (For crackme info)

Delphi Decompiler (For decompile)

 OllyDbg (For debug)

Decompiling

With Delphi Decompiler we can found easy the buttons and his offsets.
Go to the offset 401A64 in OllyDbg and analyze the code.
We view two jumps, one turn ON the light and the other Turn OFF the next light. Patching the call from offset 401A8B we get the serial.

Links


Warning: This challenge is still active and therefore should not be resolved using this information. Aviso: Este reto sigue en
Intro Hoy tenemos un crackme realizado en Visual C++ 6. Es el típico serial asociado a un nombre. El algoritmo
http://youtu.be/mk_rzitZ4CM Lista de reproducción
Intro Es un crackme realizado en ensamblador y en el que el objetivo es remover la NAG de la forma

Warning: This challenge is still active and therefore should not be resolved using this information.
Aviso: Este reto sigue en activo y por lo tanto no se debería resolver utilizando esta información.

Introducción

Realistic Challenge 4: There is a site offering protection against hackers to website owners, the service is far too overpriced and the people running the service don’t know anything about security. Look around their site, and see how protected it is.

Hay un sitio que ofrece protección contra los hackers. El servicio tiene un precio abusivo, echa un vistazo a la web y evalúa su pretección.

Analizando a la víctima

Vemos un escueto menú pero con cosas interesantes.

Pinchamos sobre «Testimonials» y a continuación en «Customer 1»

Vemos que hay solo 3 «customers», vamos a introducir manualmente un 5 haber que pasa.

Ok, nos genera el siguiente error.

Probamos ahora con un enlace interno que nos genera el siguiente error.

http://www.thisislegal.com/newr/src/read.php?customer=../orders.php

Nos llama la atención «../beqref.cuc«. Parece una encriptación simple, probemos a poner eso mismo en el navegador.

http://www.thisislegal.com/newr/src/read.php?customer=../beqref.cuc

 

Nuestras sospechas son acertadas, ahora el error muestra esto.

Explotando a la víctima

Probamos varias cosas y al final conseguimos algo relevante con «order2.php«.

http://www.thisislegal.com/newr/src/read.php?customer=../beqre2.cuc
Tenemos un directorio interesante «secure«, si entramos en el nos salta un Login típico protegido con «.htaccess«. Lo lógico a continuación es hacernos con el archivo «.htpasswd«
http://www.thisislegal.com/newr/src/read.php?customer=../frpher/.ugcnffjq

 

Una vez obtenido el contenido del archivo «.htpasswd» lo siguiente es crackear el password con John the Ripper. Nos logueamos en la carpeta secure y reto superado.

Links

Intro

Hoy tenemos un crackme realizado en Visual C++ 6. Es el típico serial asociado a un nombre.

El algoritmo

Localizamos con Olly la rutina de comprobación del serial y empezamos a analizar. Vemos una serie de Calls que lo único que hacen es comprobar el tamaño de nuestro nombre y serial y si es <5 dígitos nos tira afuera.

saltos_iniciales

Una vez pasada la traba anterior procede con un bucle para el nombre y otro para el serial. Yo he metido deurus y 123456. El bucle del nombre hace xor al los dígitos ascii con un valor incremental a partir de 1. Reconvierte el valor resultante en su caracter correspondiente y lo almacena.

00401576     |.  B9 01000000   MOV ECX,1                         ; ECX = 1
0040157B     |.  33D2          XOR EDX,EDX
0040157D     |.  8B45 E4       MOV EAX,[LOCAL.7]                 ; EAX = Nombre
00401580     |>  8A18          /MOV BL,BYTE PTR DS:[EAX]         ; BL = digito que toque  <--
00401582     |.  32D9          |XOR BL,CL                        ; digito XOR ECX
00401584     |.  8818          |MOV BYTE PTR DS:[EAX],BL         ; sustituye el digito nombre por el resultante del xor
00401586     |.  41            |INC ECX                          ; ECX++
00401587     |.  40            |INC EAX                          ; Siguiente digito
00401588     |.  8038 00       |CMP BYTE PTR DS:[EAX],0
0040158B     |.^ 75 F3         \JNZ SHORT crackme3.00401580      ; Bucle -->

 Ejemplo:

d  e  u  r  u  s
64 65 75 72 75 73

(d)64 xor 1 = 65(e)
(e)65 xor 2 = 67(g)
(u)75 xor 3 = 76(v)
(r)72 xor 4 = 76(v)
(u)75 xor 5 = 70(p)
(s)73 xor 6 = 75(u)

Nombre:    deurus
Resultado: egvvpu

Hace lo mismo con el serial pero con el valor incremental a partir de 0xA (10).

00401593     |.  B9 0A000000    MOV ECX,0A                      ; ECX = A
00401598     |.  33D2           XOR EDX,EDX
0040159A     |.  8B45 F0        MOV EAX,[LOCAL.4]               ; EAX = Serial
0040159D     |>  8A18           /MOV BL,BYTE PTR DS:[EAX]       ; BL = digito que toque  <--
0040159F     |.  32D9           |XOR BL,CL                      ; BL XOR CL
004015A1     |.  8818           |MOV BYTE PTR DS:[EAX],BL       ; sustituye el digito serial por el resultante del xor
004015A3     |.  41             |INC ECX                        ; ECX++
004015A4     |.  40             |INC EAX                        ; Siguiente digito
004015A5     |.  8038 00        |CMP BYTE PTR DS:[EAX],0
004015A8     |.^ 75 F3          \JNZ SHORT crackme3.0040159D    ; Bucle -->

Ejemplo:

1  2  3  4  5  6
31 32 33 34 35 35

(1)31 xor A = 3B(;)
(2)32 xor B = 39(9)
(3)33 xor C = 3F(?)
(4)34 xor D = 39(9)
(5)35 xor E = 3B(;)
(6)36 xor F = 39(9)

Serial:    123456
Resultado: ;9?9;9

A continuación compara «egvvpu» con «;9?9;9» byte a byte.

KeyGen

El KeyGen quedaría así

for(int i = 0; i <= strlen(Nombre); i = i + 1)
                {
                        Serial[i] = (Nombre[i]^(i+1))^(0xA + i);
                }

 Links


Intro Hoy nos enfrentamos a un crackme realizado en Delphi con un algoritmo bastante sencillo. Está empacado con UPX pero
http://youtu.be/b9-GdmIQINQ Lista de reproducción
El reto consiste en dos imágenes (v1.png y v2.png) que, a simple vista, parecen contener ruido aleatorio. Sin embargo, ambas
Intro Hoy tenemos un crackme hecho en ensamblador y que cuenta con tres niveles. En el primero de todos nos

Hemos interceptado un mensaje secreto, pero ninguno de nuestros traductores lo sabe interpretar, ¿sabrías interpretarlo tú? Lo único que hemos encontrado es esto en un foro: шжзклмнпфъ = 1234567890

Mensaje secreto: нж, фн, фф, шън, нф, шшъ, шжз, мф, шъп, фл, пк, шъш, шшм, шшк, шъл, шшл, фл, шъш, шшл, фл, шшн, шшъ, фл, шъм, шшн, шъш, шъз, шшш, фл, пж, шшн, шшл, шшш, шжл

Solución

Parece que el mensaje secreto está encriptado utilizando un alfabeto cifrado que corresponde a números. Según la clave proporcionada (шжзклмнпфъ = 1234567890), cada letra del alfabeto cirílico se sustituye por un número.

Primero, descompondremos la clave dada:
ш = 1
ж = 2
з = 3
к = 4
л = 5
м = 6
н = 7
п = 8
ф = 9
ъ = 0

Ahora, aplicamos esta clave al mensaje secreto:

нж, фн, фф, шън, нф, шшъ, шжз, мф, шъп, фл, пк, шъш, шшм, шшк, шъл, шшл, фл, шъш, шшл, фл, шшн, шшъ, фл, шъм, шшн, шъш, шъз, шшш, фл, пж, шшн, шшл, шшш, шжл

Sustituyendo cada letra según la clave:

нж = 72
фн = 97
фф = 99
шън = 107
нф = 79
шшъ = 110
шжз = 123
мф = 69
шъп = 108
фл = 95
пк = 84
шъш = 101
шшм = 116
шшк = 114
шъл = 105
шшл = 115
фл = 95
шъш = 101
шшл = 115
фл = 95
шшн = 117
шшъ = 110
фл = 95
шъм = 106
шшн = 117
шъш = 101
шъз = 130
шшш = 111
фл = 95
пж = 82
шшн = 117
шшл = 115
шшш = 111
шжл = 125

El mensaje traducido a números es:

72, 97, 99, 107, 79, 110, 123, 69, 108, 95, 84, 101, 116, 114, 105, 115, 95, 101, 115, 95, 117, 110, 95, 106, 117, 101, 130, 111, 95, 82, 117, 115, 111, 125

Este parece ser un mensaje cifrado en números. La secuencia de números se puede interpretar de varias maneras (como ASCII, coordenadas, etc.). Si asumimos que es un texto codificado en ASCII:

Convertimos cada número a su correspondiente carácter ASCII:

72 = H
97 = a
99 = c
107 = k
79 = O
110 = n
123 = {
69 = E
108 = l
95 = _
84 = T
101 = e
116 = t
114 = r
105 = i
115 = s
95 = _
101 = e
115 = s
95 = _
117 = u
110 = n
95 = _
106 = j
117 = u
101 = e
130 = ?
111 = o
95 = _
82 = R
117 = u
115 = s
111 = o
125 = }

Juntando todo:

HackOn{El_Tetris_e_s_u_n_j_u_e?o_Ruso}

La parte «{El_Tetris_e_s_u_n_j_u_e?o_Ruso}» parece un mensaje en español. Probablemente deba ser leído como: HackOn{El_Tetris_es_un_juego_Ruso}

Así, el mensaje secreto es: HackOn{El_Tetris_es_un_juego_Ruso}.


Warning: This challenge is still active and therefore should not be resolved using this information.
 Aviso: Este reto sigue en activo y por lo tanto no se debería resolver utilizando esta información.

Introducción

 Realistic Challenge 1: Your friend tried to purchase some software off a company. But after he paid they decided to increase it’s price by a large amount. They are now refusing to send it him. Get them back by getting their most expensive software a lot cheaper than they intended you to.
Lo que nos dice el enunciado del reto a groso modo es que debemos cambiar el precio del software antes de comprarlo.

Firebug

 Para resolver este reto basta con tener instalado el complemento para Firefox «Firebug«. Abrimos la web y echamos un vistazo con Firebug
Vemos un parámetro oculto que se llama «amount» y que tiene un valor de 100$. Basta con cambiarlo a 00,01$ y ya tenemos resuelto el reto.

Links

Warning: This challenge is still active and therefore should not be resolved using this information.
Aviso: Este reto sigue en activo y por lo tanto no se debería resolver utilizando esta información.

Introducción

Realistic Challenge 4: There is a site offering protection against hackers to website owners, the service is far too overpriced and the people running the service don’t know anything about security. Look around their site, and see how protected it is.

Hay un sitio que ofrece protección contra los hackers. El servicio tiene un precio abusivo, echa un vistazo a la web y evalúa su pretección.

Analizando a la víctima

Vemos un escueto menú pero con cosas interesantes.

Pinchamos sobre «Testimonials» y a continuación en «Customer 1»

Vemos que hay solo 3 «customers», vamos a introducir manualmente un 5 haber que pasa.

Ok, nos genera el siguiente error.

Probamos ahora con un enlace interno que nos genera el siguiente error.

http://www.thisislegal.com/newr/src/read.php?customer=../orders.php

Nos llama la atención «../beqref.cuc«. Parece una encriptación simple, probemos a poner eso mismo en el navegador.

http://www.thisislegal.com/newr/src/read.php?customer=../beqref.cuc

 

Nuestras sospechas son acertadas, ahora el error muestra esto.

Explotando a la víctima

Probamos varias cosas y al final conseguimos algo relevante con «order2.php«.

http://www.thisislegal.com/newr/src/read.php?customer=../beqre2.cuc
Tenemos un directorio interesante «secure«, si entramos en el nos salta un Login típico protegido con «.htaccess«. Lo lógico a continuación es hacernos con el archivo «.htpasswd«
http://www.thisislegal.com/newr/src/read.php?customer=../frpher/.ugcnffjq

 

Una vez obtenido el contenido del archivo «.htpasswd» lo siguiente es crackear el password con John the Ripper. Nos logueamos en la carpeta secure y reto superado.

Links

Se nos entrega un html con un juego que consiste en hacer clic en un botón tantas veces como podamos para ganar al juego. Acompañando al html tenemos un código javascript ofuscado aparentemente con Obfuscator.io

El código javascript ofuscado tiene el siguiente aspecto.

(function(_0x144932, _0xfc69c5) { var _0x187428 = _0x588c,
        _0x3064c6 = _0x144932(); while (!![]) { try { var _0xb96d19 = -parseInt(_0x187428(0x1bd)) / 0x1 + parseInt(_0x187428(0x137)) / 0x2 + -parseInt(_0x187428(0x140)) / 0x3 * (-parseInt(_0x187428(0x13b)) / 0x4) + parseInt(_0x187428(0x15e)) / 0x5 * (parseInt(_0x187428(0x18c)) / 0x6) + -parseInt(_0x187428(0x159)) / 0x7 * (parseInt(_0x187428(0x1c3)) / 0x8) + parseInt(_0x187428(0x129)) / 0x9 * (-parseInt(_0x187428(0x149)) / 0xa) + parseInt(_0x187428(0x16d)) / 0xb; if (_0xb96d19 === _0xfc69c5) break;
            else _0x3064c6['push'](_0x3064c6['shift']()); } catch (_0x377a04) { _0x3064c6['push'](_0x3064c6['shift']()); } } }(_0x5be3, 0x6fe59));;

function _0x5be3() { var _0x5a2048 = ['Utf8', 'push', 'createDecryptor', 'Malformed\x20UTF-8\x20data', '_ENC_XFORM_MODE', 'string', '_prevBlock', 'extend', '_doReset', 'AnsiX923', 'error', 'fromCharCode', 'object', '130340XnpiqM', '#res', 'HmacSHA256', 'DES', '4FuuDzS', 'finalize', 'byteLength', 'salt', '_keyPriorReset', '372669TnxSTf', '_xformMode', 'HMAC', 'stringify', 'Latin1', 'cfg', 'start', 'padding', 'show', '47650FNyFfQ', 'parse', 'TripleDES', 'MD5', 'ZeroPadding', 'length', 'Rabbit', 'console', 'Base', 'HmacSHA3', 'kdf', '_doFinalize', 'drop', 'BufferedBlockAlgorithm', 'Cipher', 'HmacSHA1', '7PKTjbP', 'CTR', '_reverseMap', 'clone', 'Encryptor', '43750GcrrDy', 'SHA384', 'byteOffset', 'indexOf', 'Word', '#loader', 'algo', 'apply', 'bind', 'HmacMD5', 'Base64', '_key', 'createEncryptor', 'min', '_counter', '4232173VijiOj', '_lBlock', 'You\x20Lose', 'ECB', 'BlockCipherMode', 'ciphertext', 'floor', 'constructor', 'log', 'search', 'flush', 'Iso10126', 'update', 'NoPadding', 'max', 'HmacSHA384', 'SHA512', 'decrypt', '_des2', '(((.+)+)+)+$', 'high', 'U2FsdGVkX189ylLOlgNSxq/TLeSxBr7cYDcRBgMXXS9VmwusKZx1XFDNdpkwg24v98iYGnUATwQVyWwFnlyoCg==', 'charAt', 'return\x20(function()\x20', 'pow', 'prototype', 'compute', 'reset', 'warn', '_rBlock', 'HmacSHA512', '498WcTnbi', 'join', 'HmacSHA224', 'display', '#trim', 'StreamCipher', 'enc', 'click', '#statistic', 'random', 'keySize', 'SHA1', '_process', 'sigBytes', '$super', '#mybut', 'clamp', 'RC4', '_invSubKeys', 'loader', '_cipher', '#backstart', 'BlockCipher', 'formatter', 'WordArray', 'slice', 'decryptBlock', '_minBufferSize', 'execute', '_iv', '_hash', 'mixIn', '__proto__', 'text', 'concat', 'RabbitLegacy', 'ceil', 'splice', 'Utf16LE', 'array[0]', 'function', 'SHA3', 'charCodeAt', 'EvpKDF', 'toString', 'css', '_state', 'Decryptor', 'Hex', '82275HVLogQ', 'ivSize', 'encrypt', '_des1', '_mode', 'words', '5353976ERfqhe', 'init', '_hasher', '_createHmacHelper', '_oKey', 'lib', 'CipherParams', 'x64', '_keySchedule', 'RC4Drop', 'PBKDF2', '__creator', '_subKeys', '_nDataBytes', '_DEC_XFORM_MODE', 'format', 'substr', '_createHelper', '_data', '_parse', '#cssfilter', '_map', 'create', 'OpenSSL', 'hasher', 'table', 'key', 'hide', 'iterations', '#timecount', 'undefined', 'pad', '_iKey', 'CBC', 'OFB', '#apply', 'SHA224', '_keystream', 'mode', 'exception', 'call', 'hasOwnProperty', 'Utf16', 'encryptBlock', '_invKeySchedule', '#buttons', '_doCryptBlock', 'RIPEMD160', 'blockSize', 'low', '_des3', '{}.constructor(\x22return\x20this\x22)(\x20)', '_nRounds', 'Hasher', 'addClass', 'AES', 'CFB', 'sqrt', '171bibExj'];
    _0x5be3 = function() { return _0x5a2048; }; return _0x5be3(); }
...

Deofuscado el código con la web Obfuscator.io llegamos a interpretar la estructura aunque sigue siendo un galimatías en gran parte. Aún así, si nos fijamos al final encontramos una parte interesante con una clave encriptada cuya desencriptación depende de una comparación (línea 13 resaltada). Invirtiendo esa comparación engañamos al código y obtenemos la flag.

    $("#mybut").click(function () {
      _0x4171cc++;
      $("#cssfilter").text(_0x4171cc);
    });
    $("#statistic").addClass("hide");
    _0x35a8b9 = setInterval(function () {
      _0x97292c--;
      $("#timecount").text(_0x97292c);
      if (_0x97292c == 0x0) {
        clearInterval(_0x35a8b9);
        $("#mybut").hide();
        $("#buttons").show(0x64);
        if (_0x4171cc > _0x43eef3) {
          $('#trim').text(CryptoJS.AES.decrypt("U2FsdGVkX189ylLOlgNSxq/TLeSxBr7cYDcRBgMXXS9VmwusKZx1XFDNdpkwg24v98iYGnUATwQVyWwFnlyoCg==", "array[0]").toString(CryptoJS.enc.Utf8));
        } else {
          $("#trim").text("You Lose");
        }
      }
    }, 0x3e8);
    intervalcomp = setInterval(function () {
      _0x43eef3++;
      $('#apply').text(_0x43eef3);
      if (_0x97292c == 0x0) {
        clearInterval(intervalcomp);
      }
    }, 0x32);
  }
});