Warp Speed 150
Our Trump advertising campaign is incredible, it’s skyrocketing! It’s astronomical! Wait stop!! SLOW DOWN!!!
File: warp_speed.5978d1405660e365872cf72dddc7515603f657f12526bd61e56feacf332cccad.jpg

As you could clearly see, they have sliced a single image into several slices and split it into two halves. The first part of the challenge is to slice the image into several slices from the left side of the image and right side of the image. We used a slicer script using python PIL: slicer.py. A slice has a height of 7 pixels. Thus we have got 36 slices from the left side and right side of the image.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python2.7 | |
| from __future__ import division | |
| from PIL import Image | |
| import math | |
| import os | |
| def long_slice(image_path, out_name, outdir, slice_size): | |
| """slice an image into parts slice_size tall""" | |
| img = Image.open(image_path) | |
| width, height = img.size | |
| upper, left = 0, 0 | |
| slices = int(math.ceil(height/slice_size)) | |
| count = 1 | |
| for slice in range(slices): | |
| # if we are at the end, set the lower bound to be the bottom of the image | |
| if count == slices: lower = height | |
| else: lower = int(count * slice_size) | |
| # set the bounding box! The important bit | |
| bbox = (left, upper, width, lower) | |
| working_slice = img.crop(bbox) | |
| upper += slice_size | |
| # save the slice | |
| slice_name = './' + out_name + "/slice_" | |
| working_slice.save(os.path.join(outdir, slice_name + out_name + "_" + \ | |
| str(count) + ".png")) | |
| count +=1 | |
| def check_if_directory_exists(directory): | |
| """creats a directory if it doesn't exist""" | |
| if not os.path.exists(directory): | |
| os.makedirs(directory) | |
| if __name__ == '__main__': | |
| check_if_directory_exists("left") | |
| check_if_directory_exists("right") | |
| img = Image.open('warp_speed.5978d1405660e365872cf72dddc7515603f657f12526bd61e56feacf332cccad.jpg') | |
| w, h = img.size | |
| half_width = int(w/2) | |
| img_left = img.crop((0, 0, half_width, h)).save('warp-left.png') | |
| img_right = img.crop((half_width, 0, w, h)).save('warp-right.png') | |
| # slice_size is the max height of the slices in pixels | |
| long_slice("warp-right.png", "right", os.getcwd(), 7) | |
| long_slice("warp-left.png", "left", os.getcwd(), 7) |
Now it’s time to join one each from left and right one by one to make a single portrait image. We wrote another script to join them and make a single image: merge_image.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python2.7 | |
| from PIL import Image | |
| import glob | |
| # list to hold image file names | |
| left_images = [] | |
| right_images = [] | |
| left_file_count = len(glob.glob("left/*.png")) | |
| right_file_count = len(glob.glob("right/*.png")) | |
| file_count = max(left_file_count, right_file_count) | |
| # sliced the images into 36 pieces horizontally | |
| for i in range(1, file_count + 1): | |
| right_file = './right/slice_right_' + str(i) + '.png' | |
| left_file = './left/slice_left_' + str(i) + '.png' | |
| right_images.append(right_file) | |
| left_images.append(left_file) | |
| images_left = list(map(Image.open, left_images)) | |
| images_right = list(map(Image.open, right_images)) | |
| # calculating the max image height | |
| max_height = 0 | |
| for im in images_left: | |
| max_height += im.size[1] | |
| for im in images_right: | |
| max_height += im.size[1] | |
| new_im = Image.new('RGB', (500, max_height)) | |
| y_offset = 0 | |
| x_offset = 0 | |
| for i in range(1, file_count): | |
| # correcting the shift in every 4 slices | |
| if i % 6 == 0: x_offset -= 1 | |
| new_im.paste(images_left[i], (x_offset, y_offset)) | |
| y_offset += images_left[i].size[1] | |
| new_im.paste(images_right[i], (x_offset, y_offset)) | |
| y_offset += images_right[i].size[1] | |
| # rotating the image to make it readable | |
| rot_img = new_im.rotate(90) | |
| rot_img.save('flag.jpg') |

Flag: flag{1337_ph0t0_5k1lls}
Electioneering (250 Points)
We confiscated this poster that was being handed out at polling places. It doesn’t appear to be supporting a candidate, but we’d like you to take a look just to be sure.
Upon receiving the PNG image, I ran the binwalk image over the file. To my surprise, it had a zip file embedded in it which was password protected.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ➜ forensics [0] binwalk poster.png | |
| DECIMAL HEXADECIMAL DESCRIPTION | |
| ————————————————————————- | |
| 0 0x0 PNG image, 863 x 922, 8-bit/color RGB, non-interlaced | |
| 41 0x29 Zlib compressed data, default compression | |
| 441703 0x6BD67 Zip archive data, encrypted at least v2.0 to extract, compressed size: 38, uncompressed size: 26, name: flag.txt | |
| 441869 0x6BE0D End of Zip archive | |
| ➜ _poster.png.extracted [0] ls | |
| 29 29.zlib 6BD67.zip flag.txt out | |
| ➜ _poster.png.extracted [0] unzip 6BD67.zip | |
| Archive: 6BD67.zip | |
| [6BD67.zip] flag.txt password: | |
| password incorrect–reenter: | |
| password incorrect–reenter: | |
| skipping: flag.txt incorrect password |
So our task was to find the password for the zip file to extract the flag.txt file.
Upon loading the image in the stegsolve tool, we were able to find some noise in the top left corner in the gray bits of the poster.png file and solved it as gray_bits.bmp

While zooming into the image (using gimp), you could see that the height of the noise is 4 pixels.

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from PIL import Image | |
| flag_img = Image.open('gray_bits.bmp') | |
| w, h = flag_img.size | |
| msg = "" | |
| for y in range(4): | |
| for x in range(44): | |
| r, g, b = flag_img.getpixel((x, y)) | |
| if r == 255 or g == 255 or b == 255: msg += str(1) | |
| else : msg += str(0) | |
| print (str((hex(int(msg, 2))))[2:-1].decode('hex')) |
And it prints: IrateAnagramCakeImage
This should be the password of the zip file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ➜ forensics [0] python extract_first_row.py | |
| IrateAnagramCakeImage | |
| ➜ _poster.png.extracted [0] unzip 6BD67.zip | |
| Archive: 6BD67.zip | |
| [6BD67.zip] flag.txt password: | |
| replace flag.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: y | |
| extracting: flag.txt | |
| ➜ _poster.png.extracted [0] cat flag.txt | |
| flag{4nd_th3_w1nn3r_15…} |
Flag: flag{4nd_th3_w1nn3r_15…}
TOPKEK 50
A CNN reporter had only one question that she couldn’t get off her mind
Do we even know, who is this 4 CHAN???
So she set out to find who this 400lb hacker is. During her investigation, she came across this cryptic message on some politically incorrect forum online, can you figure out what it means?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| KEK! TOP!! KEK!! TOP!! KEK!! TOP!! KEK! TOP!! KEK!!! TOP!! KEK!!!! TOP! KEK! TOP!! KEK!! TOP!!! KEK! TOP!!!! KEK! TOP!! KEK! TOP! KEK! TOP! KEK! TOP! KEK!!!! TOP!! KEK!!!!! TOP!! KEK! TOP!!!! KEK!! TOP!! KEK!!!!! TOP!! KEK! TOP!!!! KEK!! TOP!! KEK!!!!! TOP!! KEK! TOP!!!! KEK!! TOP!! KEK!!!!! TOP!! KEK! TOP!!!! KEK!! TOP!! KEK!!!!! TOP! KEK! TOP! KEK!!!!! TOP! KEK! TOP!!!!! KEK! TOP! KEK! TOP!!!!! KEK! TOP! KEK! TOP!!!!! KEK! TOP! KEK! TOP!!!!! KEK! TOP! KEK! TOP!!!!! KEK! TOP! KEK! TOP!!!!! KEK!! TOP!! KEK!!! TOP! KEK! TOP!! KEK! TOP!! KEK! TOP! KEK! TOP! KEK! TOP!!!!! KEK! TOP!! KEK! TOP! KEK!!!!! TOP!! KEK! TOP! KEK!!! TOP! KEK! TOP! KEK! TOP!! KEK!!! TOP!! KEK!!! TOP! KEK! TOP!! KEK! TOP!!! KEK!! TOP! KEK!!! TOP!!! KEK! TOP! KEK! TOP!!!!! KEK! TOP! KEK!!! TOP!! KEK!! TOP!!! KEK! TOP! KEK! TOP! KEK! TOP! KEK!! TOP!!! KEK!! TOP! KEK! TOP!!!!! KEK! TOP!!! KEK!! TOP! KEK!!! TOP!! KEK!!! TOP! KEK! TOP!! KEK!! TOP!!! KEK! TOP! KEK!! TOP! KEK!!!! TOP!!! KEK! TOP! KEK!!! TOP! KEK! TOP!!!!! KEK! TOP!! KEK! TOP!!! KEK!!! TOP!! KEK!!!!! TOP! KEK! TOP! KEK! TOP!!! KEK! TOP! KEK! TOP!!!!! KEK!! TOP!! KEK! TOP! KEK!!! TOP! KEK! TOP! KEK!! TOP! KEK!!! TOP!! KEK!! TOP!! KEK! TOP! KEK! TOP!!!!! KEK! TOP!!!! KEK!! TOP! KEK!! TOP!! KEK!!!!! TOP!!! KEK! TOP! KEK! TOP! KEK! TOP! KEK! TOP!!!!! KEK! TOP!! KEK! TOP! KEK!!!!! TOP!! KEK! TOP! KEK!!! TOP!!! KEK! TOP!! KEK!!! TOP!! KEK!!! TOP! KEK! TOP!! KEK! TOP!!! KEK!! TOP!! KEK!! TOP!!! KEK! TOP! KEK! TOP!!!!! KEK! TOP!! KEK!! TOP!! KEK!! TOP!!! KEK! TOP! KEK! TOP! KEK! TOP!! KEK! TOP!!! KEK!! TOP! KEK! TOP!!!!! KEK! TOP! KEK! TOP!!!!! KEK! TOP! KEK! TOP!!!!! KEK! TOP! KEK! TOP!!!!! KEK! TOP! KEK! TOP!!!!! KEK! TOP! KEK! TOP!!!!! KEK! TOP! KEK!! TOP! KEK! TOP!! KEK!! TOP!! KEK!! TOP!! KEK! TOP! KEK!! TOP! KEK! TOP!! KEK!! TOP! KEK!!!! TOP! KEK!! TOP! KEK!!!! TOP! KEK!! TOP! KEK!!!! TOP! KEK! TOP!!!!! KEK! TOP |
We considered KEK as 0 in binary and TOP as 1 in binary and ‘!’ is number of times zero or one is repeated. We wrote a script to read the flag from the kek script.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import binascii | |
| file = open('kek.txt', 'rb') | |
| file_content = file.read() | |
| content_list = file_content.split() | |
| binary_list = [] | |
| for content in content_list: | |
| if b'KEK' in content: value = '0' | |
| else: value = '1' | |
| exclam_count = content.count(b'!') | |
| binary_list += value * exclam_count | |
| binary_string = "".join(binary_list) | |
| print "".join([ chr(int(binary_string[i:i+8],2)) for i in range(0,len(binary_string), 8) ]) |
Flag: flag{T0o0o0o0o0P______1m_h4V1nG_FuN_r1gHt_n0W_4R3_y0u_h4v1ng_fun______K3K!!!}





