paul o’brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. decoding - use...

21
MP4 Steganography Paul O’Brien [email protected] Raiven Johnson [email protected] 1

Upload: others

Post on 25-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 2: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

The goal of this project was to develop a system andapplication that will allow a user to securely embed a payload using LSB (Least Significant Bit) Substitution on the Motion Vectors of a MP4 video file.

The system should be able to both embed and extract a covert payload

Project Goal

2

Page 3: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

MP4 format:

3

Page 4: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Group of Pictures (GOP)In video coding, The Group of Pictures or GOP structure, specifies the arrangement order of intra-frames and the inter- frames. It is stored Media Data section of the MP4 container.• I-Frame: contain full picture

information.• P-Frame: forward predicted from

the last I-frame and P-frame.• B-Frame: forward and backward

predicted.

4

Page 5: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

5

Macroblocks ● Each frame is made up of

blocks. These blocks, consisting of 8px x 8px, are created through the use of 4 smaller blocks (4px x 4px).

● Four of these blocks, 16px x 16px, make a macroblock. Macroblocks can be encoded various ways

Page 6: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Proposed SolutionUse of Macroblocks and Motion Vectors in I,P, and B frames.

6

Page 7: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Our approach (1)

We will use motion vectors to select frames that are acceptableto receive a payload and embed the information.

To select the candidate motion vectors we will use a thresholdmagnitude value approach.

The higher the magnitude, there is less distortion in the MV and thus, less chances of being noticed by an user.Magnitude depends on how far one block moves in the frame.Every MV whose magnitude is greater than the average magnitude of all MV will be eligible to cover the data.

7

Page 8: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Our approach (2)

Calculating the magnitude of the MVs

MV

Src (src_x, src_y).

. Dst (dst_x,

dst_y)

Magnitude(MV) =

8

Page 9: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Our approach (3)

For each eligible vector, we calculate the phase angle (Ө) todetermine

where are we going to embed the information reducing distortion.

If Ө is acute, we modify the horizontal component of MV

If Ө is obtuse, we modify the vertical component of MV

9

𝜭𝜭 = tan-1((dsty- srcy)/(dstx- srcx))

Page 10: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

10

Our approach (4)Example of LSB substitution in an eligible MV:

Frame Num. Src_x Src_y Dst_x Dst_y Magnitude

1 240 198 255 210 10

2 145 178 130 170 11

Motion Vector 1𝜭𝜭=tan^-1(210-198)/(255-240)𝜭𝜭= 0.674740942 rad * 180/π𝜭𝜭= 38.7

Motion Vector 2𝜭𝜭=tan^-1(170-178)/(130-145)𝜭𝜭= 0.489957326 rad * 180/π𝜭𝜭= 28.1

𝜭𝜭 = tan-1((dsty- srcy)/(dstx- srcx))

Page 11: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Our approach (5)Example of LSB substitution in an eligible MV:

Frame Num. Src_x Src_y Dst_x Dst_y Magnitude

1 240 198 255 210 10

2 145 178 130 170 11

In binary:255 = 1111 1111130 = 1000 0010

New value for Dst_x:254 = 1111 1110131 = 1000 0011

Covert message in binary:01101000 01101001 00100001

Covert Message: “Hi!”

11

Page 12: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

4 Processes Required for MP4 Manipulation

1. Demuxing - read a media file and split it into streams (video, audio, subtitle streams, etc)

2. Decoding - Use decoder to uncompress streams, read data frame by frame

3. Encoding - Compress each frame, convert raw frame data into language readable/playable by specified format

4. Muxing - Join the encoded streams back together and write them the desired file

12

Page 13: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Demuxing and Decoding

13

Page 14: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Encoding and Muxing

14

Page 15: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

GUI

15

Page 16: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Accomplished

● Read and analyze an MP4 file● Convert payload into binary● Motion vector insertion algorithm developed

and coded● GUI is created functioning for insertion● Extraction algorithm developed● Encoding the new video stream/maintaining

modified motion vectors

16

Page 17: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

In Progress● Create working interface file for SWIG

○ Integrating backend code for program functionality (C++) into functioning GUI buttons (Python)

● Properly encoding video stream without losing data

17

Page 18: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Analysis

● MP4 Videos have a high storage capacity when it comes to embedding payloads on the motion vectors

● Motion vectors are easily accessible and easily modifiable

● Using ffmpeg copying the context of the original video is not a complete copy

18

Page 19: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Analysis

● It is necessary to write new packets of data to a new stream frame by frame rather than cohesively at the end of the process

● Original extraction algorithm may be flawed, may need to come up with another way to perform the extraction

19

Page 20: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Expectations Moving Forward

20

● Combine the GUI with the backend● Produce a fully working MP4 file with the

embedded data● Revise extraction algorithm● Perform extraction

Page 21: Paul O’Brien - appliedtech.iit.edu · (video, audio, subtitle streams, etc) 2. Decoding - Use decoder to uncompress streams, read data frame by frame 3. Encoding - Compress each

Thank you!

21