RuCTF quals 2014: HP (stegano)

HP was a quite simple stegano task, it consisted of a wav-file, no additional Info was given.

First things first, listen to the audio… some crap in bad quality. Open the File in Audacity and notice that it is stereo (with almost identical channels). Diff the 2 channels and amplify the resulting channel. Notice the binary pattern, which ends at about 50% playtime

Now convert to Binary… wrote some python for it:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from struct import *
import binascii
binarystring = ""
number = 0
f = open("Stegano200diff.wav", "r")
w = open("bin.wav", "w")
f.seek(44, 0) # 44 bytes, skip header
while 1:
  sample = f.read(2)
  print binascii.hexlify(sample)
  number = unpack('h', sample)
  print number
  if number[0] > 0 :
    binarystring = binarystring + ("1")
  else:
    binarystring = binarystring + ("0")
  if len(binarystring) == 8:
    n = int(binarystring, 2)
    w.write(chr(n))
    binarystring = ""

Listen to the flag in bin.wav (samplerate is fucked up) “You don’t know the power of the dark side”

Profit!!!