33 lines
889 B
Markdown
33 lines
889 B
Markdown
## Difficulty
|
|
Easy
|
|
## Category
|
|
Steganography
|
|
## How To Solve
|
|
From the filename it should be clear that LSB is a hint, referring to the Least Significant Bits from which you have to extract the flag. Using Python:
|
|
```python
|
|
import wave
|
|
|
|
wav = wave.open("lesfilLeSduBorddemer.wav", mode='rb')
|
|
frames = wav.getnframes()
|
|
bytes = bytearray(list(wav.readframes(frames)))
|
|
|
|
# Replace each frame_byte with only the value of the LSB
|
|
for i in range(len(bytes)):
|
|
bytes[i] = bytes[i] & 1 # bitmask with 00000001
|
|
|
|
# Byte array to string
|
|
result = ""
|
|
for i in range(0, len(bytes), 8):
|
|
byte_chunk = bytes[i:i+8]
|
|
int_value = int("".join(map(str, byte_chunk)), 2)
|
|
char_value = chr(int_value)
|
|
result += char_value
|
|
|
|
# Remove the trailing '#' characters
|
|
decoded = result.split("#")[0]
|
|
|
|
print(decoded) # This will show the flag
|
|
wav.close()
|
|
```
|
|
## Flag
|
|
`IGCTF{Th1s_m3ss4ge_1s_h1dd3n_1n_4ud10}` |