41
Time is on my side Steganography in lesystem metadata Sebasan Neuner, Artemios G.Voyiatzis, Marn Schmiedecker, Stefan Brunthaler, Stefan Katzenbeisser, Edgar R. Weippl

Time is on my side: Steganography in filesystem metadata

Embed Size (px)

Citation preview

Page 1: Time is on my side: Steganography in filesystem metadata

Time is on my sideSteganography in filesystem metadataSebas�an Neuner, Artemios G.Voyiatzis, Mar�nSchmiedecker, Stefan Brunthaler, Stefan Katzenbeisser, EdgarR. Weippl

Page 2: Time is on my side: Steganography in filesystem metadata

Mo�va�on for our Work

• Raise awareness about hiding techniques for digitalinves�gators• Need for stealth communica�on• Alterna�ve channel (image steganography, audiosteganography, ...)• We did not know what the date 01.01.1601 is all about.Do you?

2/37

Page 3: Time is on my side: Steganography in filesystem metadata

Steganography

Page 4: Time is on my side: Steganography in filesystem metadata

Steganography

Hiding data in plain sight

3/37

Page 5: Time is on my side: Steganography in filesystem metadata

Steganography – (our) Requirements• Robustness:→ Certain amounts of modifica�ons allowed.

• Stealthiness:→ The existance of an embedded message cannot beproven.

• Deniability:→ ”What? Who said there is something hidden?”

4/37

Page 6: Time is on my side: Steganography in filesystem metadata

Steganography – (our) Requirements

• Applicability:→ The carrying medium should be widely used and offerenough capacity.

• Relying on Kerkhoffs Law:→ Breaking Stealthiness should not reveal the message.

5/37

Page 7: Time is on my side: Steganography in filesystem metadata

Steganography – Medium

What is the op�mal medium to carry data?• Sa�sfying applicability...

◦ In widespread use.◦ Offer enough ”random-looking” capacity to carry data.

6/37

Page 8: Time is on my side: Steganography in filesystem metadata

Filesystem Metadata

Page 9: Time is on my side: Steganography in filesystem metadata

Filesystem Metadata forSteganography?Something like:

• ACL steganography shown by Michael Perklin in 2013 atBlackHat1• Par�ally-stealth...

1https://www.youtube.com/watch?v=J4x8Hz6_hq0

7/37

Page 10: Time is on my side: Steganography in filesystem metadata

Why Filesystem Metadata?

It sa�sfies a key requirement:→ (Almost) Everyone uses it.Huge code-bases (high possibility for steganographicchannels).

8/37

Page 11: Time is on my side: Steganography in filesystem metadata

Proposal

• A lot of modern filesystems provide nanosecondgranularity• Opera�ng systems o�en only show up to minutes orseconds• Let’s use the non-shown-bits as medium

9/37

Page 12: Time is on my side: Steganography in filesystem metadata

Give it a try: Timestamp GranularityGUIs mostly present �me values up to minutes or seconds,but more granular storage

10/37

Page 13: Time is on my side: Steganography in filesystem metadata

More Granular Storage – A StudyWhat level of �mestamp granularity do ”modern” filesystemsoffer?

Filesystem File �mestamp Size GranularityNTFS crea�on 64 bits 100 nsaccess 64 bits 100 nsmodifica�on 64 bits 100 nsmodif. of MFT entry 64 bits 100 nsext4 crea�on 64 bits 1 nsaccess 64 bits 1 nsmodifica�on 64 bits 1 nsa�ribute modif. 64 bits 1 nsbtrfs crea�on 64 bits 1 nsaccess 64 bits 1 nsmodifica�on 64 bits 1 nsa�ribute modif. 64 bits 1 ns

11/37

Page 14: Time is on my side: Steganography in filesystem metadata

More Granular Storage – A StudyWhat level of �mestamp granularity do ”modern” filesystemsoffer?

Filesystem File �mestamp Size GranularityZFS crea�on 64 bits 1 nsaccess 64 bits 1 nsmodifica�on 64 bits 1 nsa�ribute modif. 64 bits 1 nsFAT32 crea�on 40 bits 10 msecaccess 16 bits 1 daymodifica�on 32 bits 2 secHFS+ crea�on 32 bits 1 secaccess 32 bits 1 secmodifica�on 32 bits 1 seca�ribute modif. 32 bits 1 secbackup 32 bits 1 secext3 access 32 bits 1 secmodifica�on 32 bits 1 seca�ribute modif. 32 bits 1 sec

12/37

Page 15: Time is on my side: Steganography in filesystem metadata

Pu�ng it all together:Time is on my Side

Page 16: Time is on my side: Steganography in filesystem metadata

Timestamp–Basics NTFS

(Our PoCs target NTFS fromWin Vista on→ later...)• MACE (Modified, Access, Crea�on, Modified MFT entry)• Each 64bits→ 24bits of that describe the nano seconds

• Number of 100 nano seconds since 1.1.1601

13/37

Page 17: Time is on my side: Steganography in filesystem metadata

Timestamp–Basics NTFS

Before Vista (XP...):

14/37

Page 18: Time is on my side: Steganography in filesystem metadata

Timestamp–Basics NTFS

From Vista on...• By default: N�sDisableLastAccessUpdate set to 1→ Immutable access �me

• (ext4 mount op�on ”noa�me”)

15/37

Page 19: Time is on my side: Steganography in filesystem metadata

Timestamp–Basics NTFSFrom Vista on...

• By default: N�sDisableLastAccessUpdate set to 1→ Immutable access �me

• (ext4 mount op�on ”noa�me”)

16/37

Page 20: Time is on my side: Steganography in filesystem metadata

Time is on my side–PoC *Embed informa�on in the crea�on (C) and access (A)nano-�mestamp-parts of files’ metadata (MFT’s filenamea�ribute)

• Python• NTFS• Variable error correc�on• Encryp�on• Kerkhoffs Principle!

17/37

Page 21: Time is on my side: Steganography in filesystem metadata

Time is on my side–PoC 1

Save a metadata file• Produce a metadata file, containing the loca�on of allmodified files• Error corrected payload is encrypted• Metadata file is also encrypted (with a differentalgorithm)• Drawback: Obviously a file with random data is lyingaround

18/37

Page 22: Time is on my side: Steganography in filesystem metadata

Time is on my side–PoC 2

Oblivious Replacement• Take the data• Produce error correc�ng codes• Hide an index byte in the crea�on �mestamp• Hide the length indicators• Encrypt the stuff• Embed it

19/37

Page 23: Time is on my side: Steganography in filesystem metadata

Time is on my side–PoC 2

20/37

Page 24: Time is on my side: Steganography in filesystem metadata

Time is on my side–Thoughts• The index is needed to recover the correct order of thefiles• The amount of error correc�on is variable but influencesthe possible capacity• Speaking of capacity:→ PoC 1 is able to use 48bits payload, where PoC 2 just40 bits (index byte)→ The more error-correc�on, the more capacity isneeded (the more errors are recoverable)

21/37

Page 25: Time is on my side: Steganography in filesystem metadata

Time is on my side–Capacity

Example for PoC2 (oblivious replacement)• Crea�on: 3bytes / Access: 3bytes

◦ Minus: 1byte per file (index)◦ Minus: Every 255th file contains the length of the wholedata◦ Minus: Error correc�on

22/37

Page 26: Time is on my side: Steganography in filesystem metadata

Time is on my side–Capacity Win8

Freshly installed Win8→ roughly 160k files• Theore�cal payload: 48bits * 160k: 960KB• Real payload: (40bits * 160k) - (160k / 255 * 5) - ( 15%error correc�on )→∼ 680kb hard payload

23/37

Page 27: Time is on my side: Steganography in filesystem metadata

Time is on my side–Capacity Win8Freshly installed Win8→ roughly 160k files

• Theore�cal payload: 48bits * 160k: 960KB• Real payload: (40bits * 160k) - (160k / 255 * 5) - ( 15%error correc�on )→∼ 680kb hard payload

24/37

Page 28: Time is on my side: Steganography in filesystem metadata

Impressive?

Mhmm...not really... BUT......we offer encryp�on...we offer error correc�on...we offer order recovery...we offer stealthiness

25/37

Page 29: Time is on my side: Steganography in filesystem metadata

Stealth?

By relying on the requirement of encryp�on to look likerandom data, our embedded data looks like random data.Stealth→ sta�s�cally undetectable

26/37

Page 30: Time is on my side: Steganography in filesystem metadata

Undetectable?Measured with Kullback–Leibler divergence (”measure of thedifference between two probability distribu�ons”2)Crea�on Timestamp Access Timestamp

2https://en.wikipedia.org/wiki/Kullback%E2%80%93Leibler_divergence

27/37

Page 31: Time is on my side: Steganography in filesystem metadata

Corpus

How and where did we measure Stealthiness?• Synthe�c data set• Real-world data set

28/37

Page 32: Time is on my side: Steganography in filesystem metadata

Synthe�c Data Set

• Python script• NTFS-3g• 117 million files• 50% no delay, 50% random delay between one and twoseconds

29/37

Page 33: Time is on my side: Steganography in filesystem metadata

Real-World Data Set

• 70 NTFS volumes in research lab• Average: 290k files and 40k directories• In total: 22.26 million files and directories

30/37

Page 34: Time is on my side: Steganography in filesystem metadata

A�acks on our System

Page 35: Time is on my side: Steganography in filesystem metadata

A�acks

• Denial of Service:→ You have to know that the data is there→ No informa�on gain→ (Re-)Set all �mestamps

• Accidental reset→ File gets deleted and re-created

31/37

Page 36: Time is on my side: Steganography in filesystem metadata

A�acks

• Timestamp storages:MFT filename a�ribute←→MFT standard informa�on

• 1:1 copy→ Compare before and a�er embedding

32/37

Page 37: Time is on my side: Steganography in filesystem metadata

Conclusion

→ Study on which filesystems are usable→ Feasible→ Low capacity

33/37

Page 38: Time is on my side: Steganography in filesystem metadata

Future Work

→ Implica�ons on the Windows $LogFile→ Extend the PoC’s to ext4→ Fix minor bugs and release the PoC’s at:

→ https://www.sba-research.org/dfrws2016

34/37

Page 39: Time is on my side: Steganography in filesystem metadata

Thank you for your a�en�on...

35/37

Page 40: Time is on my side: Steganography in filesystem metadata

Contact:

Sebas�an [email protected]: 0x5E82F701

@sebas�an9er

36/37

Page 41: Time is on my side: Steganography in filesystem metadata

Image References

https://blogs.sans.org/computer-forensics/files/2010/10/ts_change_rules_gui1.jpg

http://cdn.meme.am/instances/32090244.jpg https://imgflip.com/i/18mv6s

http://philbaumann.com/wp-content/uploads/2009/01/Twitter_bird_logo_2012.png

http://img4.wikia.nocookie.net/__cb20121008041422/thehungergames/images/b/bd/I_has_a_

question.jpg

37/37