Skip to content

Instantly share code, notes, and snippets.

@elliptic-shiho
Created March 21, 2016 06:19
Show Gist options
  • Save elliptic-shiho/67896be92f3dd8fd485b to your computer and use it in GitHub Desktop.
Save elliptic-shiho/67896be92f3dd8fd485b to your computer and use it in GitHub Desktop.
BCTF 2016 steganography 150: midifan Writeup
from scryptos import *
d = open("out.csv").read().split("\n")
bits = ""
for x in d:
r = x.split(", ")
if len(r) > 4:
if int(r[3]) == 0:
if r[2] == "Note_on_c":
bits += str(int(r[1]) % 2)
print hex(int(bits[::-1], 2), 2)[2:].decode("hex")[::-1]
@elliptic-shiho
Copy link
Author

Writeup:
I have midi file. I listen that... but It's likely normal midi file.
I was analysis by FL Studio, Midi sequencer, MIDI to Score converter, ... but I can't find some information.

I use MIDICSV: Convert MIDI File to and from CSV. so, I perceive Note on time LSB.

In Track 1, LSB is 1 or 0.
But in other tracks, LSB is only 0.
Moreover, after certain time, LSB is only 0!

Mon Mar 21 15:28:12 JST 2016 ~/ctf/bctf-2016/misc150 36%
> python solve.py 
BCTF{ju6t_0ne_b1t_of_d1FF}
Mon Mar 21 15:28:14 JST 2016 ~/ctf/bctf-2016/misc150 36%
> 

Flag: BCTF{ju6t_0ne_b1t_of_d1FF}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment