RingZer0-188 - Hidden In Plain Sight
Steganography
Hidden In Plain Sight
We’re given a text file that contains a manifesto. On the left side we got the hex equivalent of the text.
The hint says hidden in plain sight.
If we read the hex part of the file and print it we noticed some extra characters that is not on the right of the file.
text = open('618d0e51213fa164d93bd92ca5e099c3.txt', 'r')
textAscii = ""
for i in text:
letters = i[:47].split(" ")
for x in range(0,len(letters)):
textAscii += str(letters[x].decode("hex"))
print textAscii
Now what it’s left is to do a compare between the two texts. What i decided to do is to leave the original text intact and recreate the same structure with all the hex values.
Once both text are identically structured, we compared each characters. If the character in the textAscii differs from textOriginal then add it to the string flag.
text = open('618d0e51213fa164d93bd92ca5e099c3.txt', 'r')
textAscii, textOriginal, flag = "","",""
counter = 0
for i in text:
letters = i[:47].split(" ")
textOriginal += i[51:]
for x in range(0,len(letters)):
if counter % 16 == 0:
textAscii += "\n"
if letters[x] == "0a":
textAscii += " "
counter += 1
else:
textAscii += str(letters[x].decode("hex"))
counter += 1
text.close()
# Remove first line
textAscii = "\n".join(textAscii.split("\n")[1:])
for i in range(0,len(textAscii)):
if textAscii[i] != textOriginal[i]:
flag += textAscii[i]
print flag
The result is:
FLAG-NothingIsEverWhatItSeems
The flag is FLAG-NothingIsEverWhatItSeems