Quantcast
Channel: El blog de García Larragan y Cía
Viewing all articles
Browse latest Browse all 639

Programación (I): Solución Reto CTFLearn "The adventures of Boris Ivanov. Part 3"

$
0
0
En este post la solución a uno de los retos de programación de la plataforma CTFLearn.

Este reto tiene el título "The adventures of Boris Ivanov. Part 3" y mi valoración sobre su dificultad es: .

Su enunciado dice lo siguiente:


The KGB agent Boris Ivanov found the place where one of the criminals was hiding for a long time. Unfortunately the criminal disappeared and more than that he shredded the piece of paper with important information. Help Boris to restore it. Here is a bin with the strips of paper. P.S.: Boris is an experienced agent and he instantly realized that the size of the sheet was 500x500.


Solución: creo el siguiente script de Python para intentar recomponer la hoja de papel triturada y que según el enunciado del reto contiene información importante.

from PIL import Image

The_adventures_of_Boris_Ivanov_Part_3 = Image.new("RGB",(500,500),"black")

file = 0

while file < 500:
imagen = str(file) + ".png"
image = Image.open(imagen)
The_adventures_of_Boris_Ivanov_Part_3.paste(image, (0,file))
file = file + 1

The_adventures_of_Boris_Ivanov_Part_3.save("The_adventures_of_Boris_Ivanov_Part_3.png")

The_adventures_of_Boris_Ivanov_Part_3.show()

Y tras ejecutar este script, la última instrucción muestra el archivo generado:
como se observa, en esta imagen se distingue la siguiente cadena (hexadecimal):

66 6c 61 67 7b 74 68 33 5f 4b 47 42 5f 6c 30 76 33 73 5f 43 54 46 7d.

Obtengo la representación ASCII de esta cadena y ya puedo ver la solución del retoflag{th3_KGB_l0v3s_CTF}.

Viewing all articles
Browse latest Browse all 639

Trending Articles