Top Banner
Block Structure in JPEG and Steganalysis CSM25 Secure Information Hiding Dr Hans Georg Schaathun University of Surrey Spring 2009 – Week 4 Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 1 / 41
57

Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Mar 29, 2018

Download

Documents

trinhnhu
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Block Structure in JPEG and SteganalysisCSM25 Secure Information Hiding

Dr Hans Georg Schaathun

University of Surrey

Spring 2009 – Week 4

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 1 / 41

Page 2: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme

Outline

1 JPEG HistogrammeHistogrammeSteganalysis

2 Improvements – F3 & F4

3 JPEG Calibration

4 Blockiness as a Statistic

5 Conclusion

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 2 / 41

Page 3: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Histogramme

Outline

1 JPEG HistogrammeHistogrammeSteganalysis

2 Improvements – F3 & F4

3 JPEG CalibrationThe ideaMatlab

4 Blockiness as a StatisticThe Blockiness AttackYASS

5 Conclusion

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 3 / 41

Page 4: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Histogramme

The JPEG Coefficients

Recall that JPEG uses theblockwise DCT transform

8× 8 DCT coefficientsdifferent frequencies

The entries are quantised,called JPEG coefficients (integers)

DC – highest frequence coefficient(0, 0)

63 AC coefficients, (i , j) 6= (0, 0),0 ≤ i , j ≤ 7

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 4 / 41

Page 5: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Histogramme

Histogramme

Different frequencies have different characteristicsDC coefficient stick out

We calculate the histogramme of the AC JPEG coefficientsh(x) is the number of coefficients equal to x

Frequency-wise histogrammehij(x) is the number of blocks where coefficient (i , j) is equal to x

DC histogramme h00(x)

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 5 / 41

Page 6: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Histogramme

Histogramme

Different frequencies have different characteristicsDC coefficient stick out

We calculate the histogramme of the AC JPEG coefficientsh(x) is the number of coefficients equal to x

Frequency-wise histogrammehij(x) is the number of blocks where coefficient (i , j) is equal to x

DC histogramme h00(x)

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 5 / 41

Page 7: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Histogramme

Extracting AC coefficients

Consider N ×M matrix, AIf B is a boolean (logical) N ×M matrix,

then A(B) is a vector consisting of all elements from Acorresponding to a 1 (true) in B

Suppose we run (where A is N ×M DCT image)1 B = logical(ones(8,8)) % Make 8x8 matrix of ones2 B(1,1) = 0 % DC coefficient : zero3 BB = repmat ( B, N/8, M/8 ) % Concatenate block

for full image4 X = A(B) % Vector of AC coefficients

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 6 / 41

Page 8: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Histogramme

HistogrammeMatlab

We have discussed histogrammes beforeEssentially you need two functions

hist to extract frequenciesbar or stem to make the plot

Refer to help filesand to exercise sheet

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 7 / 41

Page 9: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Steganalysis

Outline

1 JPEG HistogrammeHistogrammeSteganalysis

2 Improvements – F3 & F4

3 JPEG CalibrationThe ideaMatlab

4 Blockiness as a StatisticThe Blockiness AttackYASS

5 Conclusion

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 8 / 41

Page 10: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Steganalysis

JSteg Histogramme

0 +1 +2 +3 +4 +5−1−2−3−4−5Cover

0 +1 +2 +3 +4 +5−1−2−3−4−5Stego������ ��

������

���� ��������

�� �� ��������

�� �� ��������

��....

....

�� �� ....

....

�� �� ��....

....

�� ....

....

�� ��

Typical JPEG. Typical JSteg.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 9 / 41

Page 11: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Steganalysis

Histogramme analysis

1 Pairs of valuesGeneralised χ2 works

2 SymmetryEmbedding exchange +2 ↔ +3 and −2 ↔ −1.The DCT histogramme is expected to be symmetricOutguess/JSteg destroy the symmetry.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 10 / 41

Page 12: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Steganalysis

Symmetry analysis

J2i =

(1− q

2

)I2i +

q2

I2i+1,

J2i+i =q2

I2i +

(1− q

2

)I2i+1

Writing

a =1− q/21− q

and b =q/2

1− q,

we get

I2i = aJ2i − bJ2i+1,

I2i+1 = −bJ2i + aJ2i+1.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 11 / 41

Page 13: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Steganalysis

Symmetry analysis (II)

∑i>0

I2i =∑i<0

I2i , and∑i<0

I2i+1 =∑i>0

I2i+1.

In other words ∑i>0

I2i +∑i<0

I2i+1 =∑i<0

I2i +∑i>0

I2i+1.

Substitute for I2i and J2i+1

One equation in one unknown : q

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 12 / 41

Page 14: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Histogramme Steganalysis

ExerciseSymmetry analysis

∑i>0

I2i +∑i<0

I2i+1 =∑i<0

I2i +∑i>0

I2i+1.

Substitute for I2i and I2i+1get equation in J2i and J2i+1.

Solve for J1, write as equation inJ1 (left hand side)∆i = J2i − J2i+1 (i > 0), and ∆i = J2i+1 − J2i (i < 0).

Solve for qCan you implement the resulting expression for p in Matlab?

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 13 / 41

Page 15: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Outline

1 JPEG Histogramme

2 Improvements – F3 & F4

3 JPEG Calibration

4 Blockiness as a Statistic

5 Conclusion

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 14 / 41

Page 16: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Improvements at a glance

F3 – F4 changes the embeddingbetter histogramme – maintain symmetry

Statistics-aware embeddingOutguess 0.2 uses unused capacitydummy changes are used to even out the statistics

Matrix coding/wet paper codingF5 minimises distortion using coding theoryfewer bit-flips per message bittechniques from coding for restricted memory

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 15 / 41

Page 17: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Bitflips in F3

Avoid pairs of values.Always decrease absolute value when changingZeros are ignored.Zero created: reembed in new coefficient

0 +1 +2 +3 +4 +5−1−2−3−4−5Cover

0 +1 +2 +3 +4 +5−1−2−3−4−5Stego��..

....

..

�� ��������

��....

....

�� ....

....

�� ��������

�� ��������

���� �������� ��....

....

�� ....

....

�� ��������

�� ��������

���� ���� ��

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 16 / 41

Page 18: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

The problem of F3

ReembeddingZero created by message zeroesZeros are reembeddedExtra zeros embedded ⇒ overweight of even coefficients.

Typical JPEG. Typical F3.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 17 / 41

Page 19: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

F4 : evening out even values

Swap interpretation for negative coefficients+1 causes reembedding of zero-1 causes reembedding of one

0 +1 +2 +3 +4 +5−1−2−3−4−5Cover

0 +1 +2 +3 +4 +5−1−2−3−4−5Stego

F3��..

....

..

�� ��������

��....

....

�� ....

....

�� ��������

�� ��������

���� �������� ��....

....

�� ....

....

�� ��������

�� ��������

���� ���� ��

0 +1 +2 +3 +4 +5−1−2−3−4−5Cover

0 +1 +2 +3 +4 +5−1−2−3−4−5Stego

F4��..

....

..

�� ��������

�� ��������

�� ��������

���� ���� ....

....

�� ....

....

���� �� �� ��������

�� ��������

���� ��....

....

�� ....

....

�� ����

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 18 / 41

Page 20: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

F4 histogramme

What does the histogramme look like after F4 embedding?Maginitudes have generally been decreased.Effect similar to reduced quality factor.F4 (and F5) can be broken

Suggested Reading

Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis of JPEGImages: Breaking the F5 Algorithm’. http://www.ws.binghamton.edu/fridrich/Research/F5.pdf

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 19 / 41

Page 21: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

F4 histogramme

What does the histogramme look like after F4 embedding?Maginitudes have generally been decreased.Effect similar to reduced quality factor.F4 (and F5) can be broken

Suggested Reading

Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis of JPEGImages: Breaking the F5 Algorithm’. http://www.ws.binghamton.edu/fridrich/Research/F5.pdf

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 19 / 41

Page 22: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

F4 histogramme

What does the histogramme look like after F4 embedding?Maginitudes have generally been decreased.Effect similar to reduced quality factor.F4 (and F5) can be broken

Suggested Reading

Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis of JPEGImages: Breaking the F5 Algorithm’. http://www.ws.binghamton.edu/fridrich/Research/F5.pdf

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 19 / 41

Page 23: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

F4 histogramme

What does the histogramme look like after F4 embedding?Maginitudes have generally been decreased.Effect similar to reduced quality factor.F4 (and F5) can be broken

Suggested Reading

Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis of JPEGImages: Breaking the F5 Algorithm’. http://www.ws.binghamton.edu/fridrich/Research/F5.pdf

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 19 / 41

Page 24: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

F5 : Matrix embedding

Embedding as F4. . . extra Matrix Coding layer

n coefficients represent k bits

Flip fewer k/2 bits on average.See Week 7 for details

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 20 / 41

Page 25: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Statistics-aware embeddingOutguess 0.2

Modify unused coefficientsMimick original statisticTune for every statistic used in known analysis techniques

OutGuess 0.2Embedding as OutGuess 0.1.Modify selected unused coefficients to correct histogram

Flexible – adapt to any modelIf you know attacker’s model

... you mimick it.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 21 / 41

Page 26: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Statistics-aware embeddingOutguess 0.2

Modify unused coefficientsMimick original statisticTune for every statistic used in known analysis techniques

OutGuess 0.2Embedding as OutGuess 0.1.Modify selected unused coefficients to correct histogram

Flexible – adapt to any modelIf you know attacker’s model

... you mimick it.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 21 / 41

Page 27: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Statistics-aware embeddingOutguess 0.2

Modify unused coefficientsMimick original statisticTune for every statistic used in known analysis techniques

OutGuess 0.2Embedding as OutGuess 0.1.Modify selected unused coefficients to correct histogram

Flexible – adapt to any modelIf you know attacker’s model

... you mimick it.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 21 / 41

Page 28: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Statistics-aware embeddingOutguess 0.2

Modify unused coefficientsMimick original statisticTune for every statistic used in known analysis techniques

OutGuess 0.2Embedding as OutGuess 0.1.Modify selected unused coefficients to correct histogram

Flexible – adapt to any modelIf you know attacker’s model

... you mimick it.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 21 / 41

Page 29: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Statistics-aware embeddingOutguess 0.2

Modify unused coefficientsMimick original statisticTune for every statistic used in known analysis techniques

OutGuess 0.2Embedding as OutGuess 0.1.Modify selected unused coefficients to correct histogram

Flexible – adapt to any modelIf you know attacker’s model

... you mimick it.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 21 / 41

Page 30: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Statistics-aware embeddingOutguess 0.2

Modify unused coefficientsMimick original statisticTune for every statistic used in known analysis techniques

OutGuess 0.2Embedding as OutGuess 0.1.Modify selected unused coefficients to correct histogram

Flexible – adapt to any modelIf you know attacker’s model

... you mimick it.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 21 / 41

Page 31: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Statistics-aware embeddingOutguess 0.2

Modify unused coefficientsMimick original statisticTune for every statistic used in known analysis techniques

OutGuess 0.2Embedding as OutGuess 0.1.Modify selected unused coefficients to correct histogram

Flexible – adapt to any modelIf you know attacker’s model

... you mimick it.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 21 / 41

Page 32: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Statistics-aware embeddingOutguess 0.2

Modify unused coefficientsMimick original statisticTune for every statistic used in known analysis techniques

OutGuess 0.2Embedding as OutGuess 0.1.Modify selected unused coefficients to correct histogram

Flexible – adapt to any modelIf you know attacker’s model

... you mimick it.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 21 / 41

Page 33: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Statistics-aware embeddingOutguess 0.2

Modify unused coefficientsMimick original statisticTune for every statistic used in known analysis techniques

OutGuess 0.2Embedding as OutGuess 0.1.Modify selected unused coefficients to correct histogram

Flexible – adapt to any modelIf you know attacker’s model

... you mimick it.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 21 / 41

Page 34: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Improvements – F3 & F4

Combinations

Statistics-aware Matrix CodingMore advanced code allows a choice of coefficient to modifyUse choice to mimick original statistical distribution

Known as Wet Paper CodesBased on Dirty Paper Codes by Costa 1983.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 22 / 41

Page 35: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration

Outline

1 JPEG Histogramme

2 Improvements – F3 & F4

3 JPEG CalibrationThe ideaMatlab

4 Blockiness as a Statistic

5 Conclusion

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 23 / 41

Page 36: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration The idea

Outline

1 JPEG HistogrammeHistogrammeSteganalysis

2 Improvements – F3 & F4

3 JPEG CalibrationThe ideaMatlab

4 Blockiness as a StatisticThe Blockiness AttackYASS

5 Conclusion

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 24 / 41

Page 37: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration The idea

The calibrated image

JPEG has a block-structureSteganography in JPEG follows the block-structureWhat happens if we de- and re-compress the image

with different block structure?

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 25 / 41

Page 38: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration The idea

The calibrated image

JPEG has a block-structureSteganography in JPEG follows the block-structureWhat happens if we de- and re-compress the image

with different block structure?

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 25 / 41

Page 39: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration The idea

The calibrated image

JPEG has a block-structureSteganography in JPEG follows the block-structureWhat happens if we de- and re-compress the image

with different block structure?

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 25 / 41

Page 40: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration The idea

The calibrated image

JPEG has a block-structureSteganography in JPEG follows the block-structureWhat happens if we de- and re-compress the image

with different block structure?

############

������������������������ ############

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 25 / 41

Page 41: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration The idea

The calibrated image

JPEG has a block-structureSteganography in JPEG follows the block-structureWhat happens if we de- and re-compress the image

with different block structure?

############

������������������������ ############________

________

________

________

________������

������

������

������

������

������

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 25 / 41

Page 42: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration The idea

Histogramme comparison

1 Decompress the image2 Crop 4 pixels; either

4 rows at top and bottom4 columns left and right4 pixels on each edge

3 Recompress using same quality factor and quantisation matrixcalled calibrated image

4 Compare histogramme of original and calibrated images5 What do you see?

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 26 / 41

Page 43: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration The idea

Effect of calibration

Original and Calibrated image have similar statisticsMost JPEG stego-systems

change the statistics in 8× 8 grid... but the calibrated image hardly change

Statistical difference between an image and its calibration... tends to indicate a steganogram

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 27 / 41

Page 44: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration Matlab

Outline

1 JPEG HistogrammeHistogrammeSteganalysis

2 Improvements – F3 & F4

3 JPEG CalibrationThe ideaMatlab

4 Blockiness as a StatisticThe Blockiness AttackYASS

5 Conclusion

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 28 / 41

Page 45: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration Matlab

JPEG ToolboxDecompression

Dequantisation» Xy2 = dequantize ( Xy, Q ) ;

Inverse transform» Xy3 = ibdct ( Xy2 ) ;

Normalisation» Xy4 = uint8( Xy3 + 128 ) ;

Did it work?» imshow ( Xy4 )

Note, we have only used grayscale information.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 29 / 41

Page 46: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

JPEG Calibration Matlab

JPEG ToolboxRecompression

New range» Xy3 = double( Xy4 - 128 ) ;

Inverse transform» Xy2 = bdct ( Xy3 ) ;

Quantisation» Xy = quantize ( Xy2, Q ) ;

Reinsertion» im.coef_arrays{im.comp_info(1).component_id} =Xy ;

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 30 / 41

Page 47: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Blockiness as a Statistic

Outline

1 JPEG Histogramme

2 Improvements – F3 & F4

3 JPEG Calibration

4 Blockiness as a StatisticThe Blockiness AttackYASS

5 Conclusion

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 31 / 41

Page 48: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Blockiness as a Statistic The Blockiness Attack

Outline

1 JPEG HistogrammeHistogrammeSteganalysis

2 Improvements – F3 & F4

3 JPEG CalibrationThe ideaMatlab

4 Blockiness as a StatisticThe Blockiness AttackYASS

5 Conclusion

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 32 / 41

Page 49: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Blockiness as a Statistic The Blockiness Attack

The Blockiness Statistic

Compare each edge pixelwith its neighbourAdd all the differences

B =

M/8−1∑i=1

N∑j=1

|g8i,j − g8i+1,j |

+M∑

i=1

N/8−1∑j=1

|gi,8j − gi,8j+1

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 33 / 41

Page 50: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Blockiness as a Statistic The Blockiness Attack

Information on Blockiness

Blockiness increases linearly in the number of modifiedcoefficients

Empirically confirmed

Calibration is used for comparison

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 34 / 41

Page 51: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Blockiness as a Statistic The Blockiness Attack

Comparing slides

Suspicious image (to be classified) [S]Calibrated image [S0]Suspicious image with maximum capacity embedding on top [S1]

Sample the statistic forembedded messagesof different lengths qDistance between thecurves indicatessteganogramMessage length can beestimated

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 35 / 41

Page 52: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Blockiness as a Statistic The Blockiness Attack

The message estimate

q =s0 − ss0 − s1

where s0, s, and s1 are the average slopes of S0, S, and S1respectively

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 36 / 41

Page 53: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Blockiness as a Statistic The Blockiness Attack

Acknowledgment

Figures in this section are from

Suggested Reading

MSc dissertation 2007: Statistical Steganalysis by Marios Leivaditis

Core Reading

Fridrich, J., Goljan, M. and Hogea, D. (December 6, 2002) «Attackingthe OutGuess», Proc. of the ACM Workshop on Multimedia andSecurity 2002

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 37 / 41

Page 54: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Blockiness as a Statistic YASS

Outline

1 JPEG HistogrammeHistogrammeSteganalysis

2 Improvements – F3 & F4

3 JPEG CalibrationThe ideaMatlab

4 Blockiness as a StatisticThe Blockiness AttackYASS

5 Conclusion

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 38 / 41

Page 55: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Blockiness as a Statistic YASS

YASS – Yet Another Steganographic SchemeSolanki, Sarkar, and Manjunath IH’07

Simple idea – do not use the 8× 8 grid for embedding10× 10 macro-blocks

Pseudo-random 8× 8 subblock in each macro-block... DCT-transform the subblock... embed in DCT coefficients... reconvert

Embedding creates some blockiness,but analyst does not know where to expect it

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 39 / 41

Page 56: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Conclusion

Outline

1 JPEG Histogramme

2 Improvements – F3 & F4

3 JPEG Calibration

4 Blockiness as a Statistic

5 Conclusion

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 40 / 41

Page 57: Block Structure in JPEG and · PDF fileBlock Structure in JPEG and Steganalysis CSM25 Secure Information Hiding ... Jessica Fridrich, Miroslav Goljan, Dorin Hogea: ‘Steganalysis

Conclusion

Conclusion

Main challenge in stegananalysiswhat is the expected statistics for a normal image?a.k.a. baseline value

Calibrated image offers a solutionNormally very similar statistics,. . . because neighbour blocks are similar (visually)

Data embedding change blocks independentlyChanges block structure and block statistics,. . . but the calibrated image is not changed in the same way

We can use the calibrated image to estimate statistics in theoriginal coverimage.

Dr Hans Georg Schaathun Block Structure in JPEG and Steganalysis Spring 2009 – Week 4 41 / 41