How to Hide data (Steganography) into MP3 file – mp3stego
Steganography is the art and science of writing hidden messages in such a way that no one, apart from the sender and intended recipient, suspects the existence of the message, a form of security through obscurity
MP3Stego will hide information in MP3 files during the compression process. The data is first compressed, encrypted and then hidden in the MP3 bit stream. Although MP3Stego has been written with steganographic applications in mind it might be used as a copyright marking system for MP3 files (weak but still much better than the MPEG copyright flag defined by the standard). Any opponent can uncompress the bit stream and recompress it; this will delete the hidden information – actually this is the only attack we know yet – but at the expense of severe quality loss.
The hiding process takes place at the heart of the Layer III encoding process namely in the inner_loop. The inner loop quantizes the input data and increases the quantiser step size until the quantized data can be coded with the available number of bits. Another loop checks that the distortions introduced by the quantization do not exceed the threshold defined by the psycho acoustic model. The part2_3_length variable contains the number of main_data bits used for scalefactors and Huffman code data in the MP3 bit stream. We encode the bits as its parity by changing the end loop condition of the inner loop. Only randomly chosen part2_3_length values are modified; the selection is done using a pseudo random bit generator based on SHA-1.
Go to command prompt and type following command to hide your message into the mp3 file.
encode -E hidden_text.txt -P pass svega.wav svega_stego.mp3
compresses svega.wav (mono, 44.1 kHz, 16bit encoded) and hides hidden_text.txt. The hidden text is encrypted using pass as a password. This produces the output called svega_stego.mp3.
Use the following command to get the hidden message (file) from the mp3
decode -X -P pass svega_stego.mp3
uncompresses svega_stego.mp3 into svega_stego.mp3.pcm and attempts to extract hidden information. The hidden message is decrypted, uncompressed and saved into svega_stego.mp3.txt.
- Audio Steganography PT1: Using MP3Stego
- Audio Steganography PT2: Attacking MP3Stego
- Audio Steganography PT3: Understanding MP3Stego’s Technique
- Audio Steganography PT4: detecting MP3Stego
- Audio Steganography PT5: Estimating Size of Data Hidden by MP3Stego