Home > CTF, Stegano > DEFKTHON CTF Misc 200 Writeup

DEFKTHON CTF Misc 200 Writeup

If there is a frustrating side in CTF, then I would rather vote for Steganography. It is interesting too see, how message can embedded inside covert objects, but it is always a tedious job to analyze the patterns and extract them back 😀 :P. I found it always difficult 😦 . I have seen challenges with convert objects, either as an image file or as an audio file, but the challenge was designed differently. It was quite weird though. The challenge was to construct an image from a given RGB values. You can download the file here. Actually I didn’t solved it alone. I was able to get it done with my team mates and my friend. Initially my thought was to build an image with those values with an assumed width and height.

import os,sys
import Image
im = Image.open("black.jpg")
pix = im.load()
h,w = im.size
m = open("flag.txt","r").readlines()
o = -1
for i in range(255):
   for j in range(255):
       o+=1
       if (o < 61366 ):
           steg = eval("("+m[o].strip()+")")
           pix[i,j]= steg
im.show()

When I ran the code, the ramifications came as a contrary to my expectations. The method didn’t work though.

steg

But later my friend directed me with a hint of doing it in a right way. Start with a black image and assign the RGB values to it. Way simpler it is, but I think I complicated it very much with the above snippet.. 😀 ( credit goes to you guyz (vivek and ajith! 😉 )

import Image,csv
img = Image.new( 'RGB', (503,122), "black")
pixels = img.load()
f=open('flag.txt','r')
reader = csv.reader(f, delimiter=',')
mycsv = list(reader)
k=0
for i in range(img.size[0]): # for every pixel:
 for j in range(img.size[1]):
 pixels[i,j] = (int(mycsv[k][0]), int(mycsv[k][1]), int(mycsv[k][2]))
 k=k+1
img.show()

Now, I should be getting it 🙂

flag

The flag is youc@n’tseeme. 

Advertisements
  1. February 15, 2015 at 12:16 pm

    Thanks for the write up , but i have a stupid question ^^”
    Where exactly did you put the code ??

  2. February 15, 2015 at 12:28 pm

    Thanks For the write-up , But i have a stupid question ^^”

    Where exactly did you put your code ??

  3. February 24, 2015 at 4:50 am

    Find it just above the 2nd image

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

This Week In 4n6

Your weekly roundup of Digital Forensics and Incident Response news

bi0s

CTF | Amrita

RAM Slack - Random Thoughts from a Computer Forensic Examiner

Random Thoughts from a Computer Forensic Examiner

InCTF

behind the scenes

DFIR Journal

Trials and Tribulations of a DFIR life

I dont know zilch !

For the noobs out there like me

X-Ways Forensics Practitioner's Guide

The Guide to X-Ways Forensics!

Forensic Focus - Articles

Digital forensics articles and research papers

my abbreviations......

gain,learn and share knowledge!!!!

digirati82

Windows Logging Service (WLS), DFIR, etc.

Belkasoft Forensic: The Digital Evidence Blog

Searching for, analyzing and recovering digital evidence

Gail Tredwell. Amma. Truth. Lies. Scandals. Fraud. And. Reality

Three things cannot be long hidden: the sun, the moon, and the truth.

Integriography: A Journal of Broken Locks, Ethics, and Computer Forensics

Musings about UAVs, search & rescue, computer forensics, cyber security, and the state of play in all .....

Life is beautiful

when the mind is full with love, you see beauty in every thing

Techno Krat

.... Dare To Try .......

%d bloggers like this: