lucasg.github.io blog about rss github

HACKVent 2014 - Day 13 writeup

I’ve sign up for the Hackvent event made by the guys from www.hacking-lab.com, which is a advent-like hacking competition. Every day there is a new challenge posted at midnight which has a to solved at best in the same day, the challenge becoming increasingly more difficult every week completed. The aim in every puzzle is to find either a qr-encoded x-mas ball with lead to the validation code, or a secret human-readable string which gives you the former ball when feeding into a validator (the “Ball-O-Matic”).

Here’s the write-up for the challenge at day 13, in which we will talk to extraterrestrial beings.

Ground Control to Major Tom Part :


For the Day 13 Hackvent challenge, we were given the following instructions :

Riddle from hackvent.hacking-lab.com for Day 13

The alien DJ image is a regular png file. Unlike in challenge 11 , looking at the file in hex mode doesn’t reveal anything. However, you can notice a weird 1-px line at the bottom of the image :

this is not a pipe

I initially thought that was some morse encoded data, but it turns out not to be true (the only combinations that are valid outputs random strings). For a moment, I also though is was a barcode. Challenge 07 proved me previously that barcodes were a bad idea . There is something I haven’t tried : convert b/w pixels to binary values. Who knows, maybe aliens also use 8-bit words PCM data streams ?

01101000 01110100 01110100 01110000 00111010 00101111 00101111 01101000 01100001 01100011 01101011 01110110 01100101 01101110 01110100 00101110 01101000 01100001 01100011 01101011 01101001 01101110 01100111 00101101 01101100 01100001 01100010 00101110 01100011 01101111 01101101 00101111 00110101 01110110 01010000 01001011 01000111 01011001 00110000 01110100 01100100 01011000 00101110 01101101 01110000 00110011

=> http://hackvent.hacking-lab.com/5vPKGY0tdX.mp3

Absolute Hearing Part :


Like in Challenge 09 , we receive a link to an audio file, which is a succesion of tones. Unlike challenge 9, it’s not DTMF encoded data : 5vPKGY0tdX.mp3

Riddle from hackvent.hacking-lab.com for Day 13

When looking at a slowed down version, you can hear there is in fact only two differents tones (E6 and E7) : 5vPKGY0tdX-slowed-down.mp3

It’s again PCM encoded data. Here a simple python script I used to automatically recognize the tone fundamental and convert it into an array of 1’s and 0’s :

from pylab import*
from scipy.io import wavfile
import numpy as np 


sampFreq, snd = wavfile.read('wav5vPKGY0tdX.wav')
signal = snd[:,0] 

tones_count = int(snd.shape[0]*10.0/(sampFreq*1.0))

for i in range(0,tones_count):
  s = signal[i/10.0*sampFreq : (i+1)*sampFreq/10.0]
  fftData=abs(np.fft.rfft(s))**2  
  
  print i, fftData[1:].argmax() / 200  
 011000010110110001101001011001010110111001101000011000010110001101101011011000010111010001110100011000010110001101101011

=> alienhackattack