Shadow’s Register Me – Parchear un .Net

Introducción

Este es un crackme hecho en .Net con dos Nags a parchear y un algoritmo muy sencillo pero que tendremos que parchear para poder resolverlo.

Las Nags

Se encuentran en los eventos de carga y cierre del formulario.

01-09-2014 07-30-07

// RegisterMe.Form1
private void Form1_Load(object sender, EventArgs e)
{
    Interaction.MsgBox("Register me pl0x!", MsgBoxStyle.OkOnly, "Nag!!!!");
}

// RegisterMe.Form1
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
    Interaction.MsgBox("Register me pl0x!", MsgBoxStyle.OkOnly, "Nag2!!!!");
}

 Para parchear un ejecutable realizado en .Net primero necesitamos ubicarnos. Abrimos IL Dasm y vamos al evento «Form_Load«, nos fijamos en los bytes y los buscamos con un editor hexadecimal. Fijaros bien en los bytes ya que siguen un orden específico, en la imágen del editor hexadecimal se aprecia perfectamente. Para que quede parcheada la Nag basta con sustituir los valores por ceros. Se parchea todo excepto el «RET (2A)».

01-09-2014 08-03-23

01-09-2014 08-04-01

Para la  otra Nag sería lo mismo.

El algoritmo

El algoritmo es muy sencillo, consiste en la concatenación de varias palabras y un número aleatorio. El problema viene con el número aleatorio ya que lo tendremos que parchear para poder registrar el programa.

// RegisterMe.Form1
private void Button1_Click(object sender, EventArgs e)
{
    this.shadow = this.rand.Next(1, 99999999);
    if (Operators.ConditionalCompareObjectEqual(this.TextBox2.Text, Operators.ConcatenateObject(this.TextBox1.Text + this.TextBox3.Text + this.TextBox4.Text + this.TextBox5.Text + this.TextBox6.Text + this.TextBox7.Text + this.TextBox8.Text + this.TextBox9.Text + this.TextBox1.Text, this.shadow), false))
    {
        this.Button2.Enabled = true;
        this.Button1.Enabled = false;
        this.Button1.Text = "Registered to Shadow";
        this.Text = "Registered to Shadow!";
    }
    else
    {
        Interaction.MsgBox("Incorrect serial, noob.", MsgBoxStyle.OkOnly, null);
    }
}

La concatenación quedaría así:

TextBox1.Text = Nuestro usuario + TextBox3.Text = «ur» + TextBox4.Text = «a» + TextBox5.Text = «stupid» + TextBox6.Text = «dumb» + TextBox7.Text = «idiotic» + TextBox8.Text = «crazy» + TextBox9.Text = «noob» + TextBox1.Text = Nuestro usuarioEl número aleatorio

 Ejemplo

  • Nombre: deurus
  • Clave: deurusurastupiddumbidioticcrazynoobdeurus98265385

Parcheando el número aleatorio

Buscamos el evento click en IL Dasm y nos fijamos que aparece el número «5F5E0FF» que en decimal equivale a «99999999«, buscamos los bytes en el editor hexadecimal y lo parcheamos a 1. De este modo anulamos la aletoriedad, ahora el número siempre es 1.

01-09-2014 09-25-23

01-09-2014 09-35-35

01-09-2014 09-36-59

Ahora ya podemos registrarnos.

01-09-2014 07-38-44

Links


Warning: This challenge is still active and therefore should not be resolved using this information. Aviso: Este reto sigue en
Warning: This challenge is still active and therefore should not be resolved using this information. Aviso: Este reto sigue en
http://youtu.be/c4CNY902SAE Versión de texto Lista de reproducción
Introducción Funcionamiento de RSA OllyDbg Calculando la clave privada (d) Ejemplo operacional Keygen Links Introducción Segunda crackme con RSA que

ThisIsLegal.com – Realistic Challenge 5

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 5: There is a new company out called NullCo. Have a look around the site and see what you can do.
Hay una nueva compañia llamada NullCo. Echa un vistazo a la web haber que puedes hacer.

Analizando a la víctima

Echamos un vistazo a la web y lo único interesante que vemos es un buscador.

Miramos el código fuente y vemos una ruta interesante.

  Si exploramos la ruta «http://www.thisislegal.com/nc/adm/» nos aparece un login. Metemos cualquier cosa y el mensaje de error da demasiada información.

Ahora fijémonos en el menú productos. Pinchamos sobre cualquier producto y a continuación en la imagen para ampliarla, veremos el siguiente enlace.

http://www.thisislegal.com/nc/i.php?img=images/serve

 Explotando la víctima

Vamos a ver si podemos explotar «i.php«. Probamos a obtener información sensible del servidor.

Probamos «http://www.thisislegal.com/nc/i.php?img=adm/login.pwd» y nos da error, seguramente por que está anexionando la extensión de la imagen, es decir, el script está interpretando esto:

http://www.thisislegal.com/nc/i.php?img=adm/login.pwd.png

Vamos a anularlo con un caracter nulo. Probamos y ahora si.

El password está en base64. Lo decodificamos online, nos logueamos y reto superado.

Links

CanYouHack.it Mobile2 Challenge – Follow The Web (English)

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.

Table of Contents

Intro

This crackme is for the challenge Mobile 2 of canyouhack.it.
This time you need to understand how the crackme works over the web.

Decompiling

The crackme is given again at Google Play, so the first step is to install and recover the APK for decompiling. The latter, I leave to you.
Open the victim with APK Studio and view the content of Mobile2.java
First we view one link:
http://canyouhack.it/Content/Challenges/Mobile/2/index.php
 If we go to the link, we view one string like a hash: 68a571bcf7bc9f76d43bf931f413ab2c. Umm, it’s like MD5. Go to decrypt online and we get the pass: «canyouhack.it». But if we test this password in the crackme, surprise!, nothing happens. We need to continue analyzing the code. Later we view the next interesting link:
«http://canyouhack.it/Content/Challenges/Mobile/2/submit.php?Token=» + Mobile2.token + «&Attempts=»
The program submit one token and concatenate with the number of attempts. Ok but what is the token and what is the number of attempts?
In this point we have to try with the information we already have.
Testing with the link of bottom we get “Nice try!” message.
http://canyouhack.it/Content/Challenges/Mobile/2/submit.php?Token=68a571bcf7bc9f76d43bf931f413ab2c&&Attempts=0
Testing with the link of bottom we get “Very Good, the password is Top*****!” message.
http://canyouhack.it/Content/Challenges/Mobile/2/submit.php?Token=68a571bcf7bc9f76d43bf931f413ab2c&&Attempts=1

  Links