Лаборатория TJCTF 2016 - Basic Images [forensics 65]

delimitry
, 1 июня 2016

Check out my shades! If you want the flag, I guess you should be basic like me. Good luck! 

A PNG image file is given.

Quick analysis of pixels, has shown that R,G and B channels are the same. 
Then I've tried to get each pixel's R value (R=G=B) and convert to char. Furtunately the output string was readable and looked like base64.
After decoding this base64 I've got a new PNG file, like the original one, but smaller. I've repeated the steps and have got a new PNG file.
After repeating the steps several times, I've finally got a flag :)
My script in Python to solve this task: 

from PIL import Image


img = Image.open('shades.png')
p = img.load()
w, h = img.size
out = ''
for y in range(h):
    for x in range(w):
        out += chr(p[x, y][0])
with open('shades_out.png', 'wb') as f:
    f.write(out.decode('base64'))

img = Image.open('shades_out.png')
p = img.load()
w, h = img.size
out = ''
for y in range(h):
    for x in range(w):
        out += chr(p[x, y][0])
with open('shades_out_2.png', 'wb') as f:
    f.write(out.decode('base64'))

img = Image.open('shades_out_2.png')
p = img.load()
w, h = img.size
out = ''
for y in range(h):
    for x in range(w):
        out += chr(p[x, y][0])
with open('shades_out_3.png', 'wb') as f:
    f.write(out.decode('base64'))

img = Image.open('shades_out_3.png')
p = img.load()
w, h = img.size
out = ''
for y in range(h):
    for x in range(w):
        out += chr(p[x, y][0])
with open('shades_out_4.png', 'wb') as f:
    f.write(out.decode('base64'))

img = Image.open('shades_out_4.png')
p = img.load()
w, h = img.size
out = ''
for y in range(h):
    for x in range(w):
        out += chr(p[x, y][0])
with open('shades_out_5.png', 'wb') as f:
    f.write(out.decode('base64'))

img = Image.open('shades_out_5.png')
p = img.load()
w, h = img.size
out = ''
for y in range(h):
    for x in range(w):
        out += chr(p[x, y][0])
with open('shades_out_6.png', 'wb') as f:
    f.write(out.decode('base64'))

img = Image.open('shades_out_6.png')
p = img.load()
w, h = img.size
out = ''
for y in range(h):
    for x in range(w):
        out += chr(p[x, y][0])
with open('shades_out_7.png', 'wb') as f:
    f.write(out.decode('base64'))

img = Image.open('shades_out_7.png')
p = img.load()
w, h = img.size
out = ''
for y in range(h):
    for x in range(w):
        out += chr(p[x, y][0])
with open('flag.txt', 'wb') as f:
    f.write(out.decode('base64'))

with open('flag.txt', 'rb') as f:
    print f.read()

And the flag is: tjctf{asc11_c0l0r_inc3pt1on}

1 комментарий:

  1. RoberNage
       #   02:37, 24 мая 2017
    Amoxicillin Side Effects Toddler Black Stools Viagra Online Cheap Low Price Viagra Pills For Sale Viagra Cialis Ou Levitra Purchase Generic Cialis Atomoxet 40 No Script Order Amoxil Online Order Lasix Pills Pharmacy Rx 1 Ou Acheter Du Viagra Librement Order Generic Zoloft Viagra Cialis Levitra Kombinieren Clobetasol Medication Discount Shop With Free Shipping Where To Order Kamagra Propecia Itch Buy Antibiotics Without Prescription Uk Zoloft Free Trial Viagra Milano Acquistare Cialis Generico Con Postepay Online Pharmacy Kamagra Indian Euromed Viagra Levitra Generika Online Cialis 5mg Lactamase Resistant Abx Comprar Cialis Original En Espana Shop Cialis Online Buying Acticin In Internet Buy Cheap Xenical No Prescription Viagra 100mg Propecia Mental Side Effects Sleep Xlpharmacy Antabuse Online Clomid Over The Internet Ciao Propecia Internet Order Viagra Tipos De Viagras Indications Priligy Cialis Pills Viagra Pfizer 100 Euro Cialis Para La Impotencia Generic Viagra 100mg Propecia Generic How Long Cialis 20 Mg Miglior Prezzo Sertralina Generic Cheap Viagra Uk Next Day Delivery Amoxicillin Sun Exposure Buy Implicane Online Flagyl Online Overnight Cantidad De Propecia Viagra Online Prices Buy Prevacid Solutab Patient Reviews For Vardenafil Generic Viagra Buy Prix Levitra Belgique Levitra Wirkdauer Generic Kamagra Online Visa Gift Card For On Line Ciallas Mexican Pharmacies Shipping To Usa Kamagra Chewable Does Amoxicillin Affect Pap Smear Result Viagra Dove Si Acquista Cheap Vibramycin Samples Baclofene Et Methadone Cialis 20 Efectos Secundarios Order Kamagra Gel Where To Buy Amoxicilina Robamox By Money Order How To Buy Cialis Cheap Generic Zoloft Online Keflex E Coli Suseptability Viagra Vs Brand Zoloft Online Cephalexin Asthma Isotretinoin isotretin best website Buy Kamagra Usa Viagra Kaufen Munchen India Drugstore Online Zoloft Pills Stendra Order Now Medicine Forum Gel Kamagra Order Kamagra Online Usa Propecia Doping Amoxicillin Bacterial Reaction Best Strattera Online Amoxicillin Chlamydia Pid

Авторизуйтесь, что бы оставить комментарий