Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter,...

19
Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    0

Transcript of Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter,...

Page 1: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

Steganography for Executables and

Code Transformation Signatures

Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere

Page 2: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

2

Problem

Alice Bob

WendyEmbedder Extractor

Page 3: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

3

Location of the Secret Message

o Media

• human senses• redundant bits

o Executables

• processors• single-bit failure

NOISE ⇒ CHOICE

Page 4: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

4

0 1

7n

Embedding Bits in a Choice

00 01 10 11

)(log2 n

Page 5: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

5

Embedding Bits in a Choice

)(log2 n

5

4

3

2

1

01 2 4 8 16 32

)(log2 n

alternatives

bits

n=7 ⇒ 3 unused

n=31 ⇒ 15 unused

Page 6: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

6

1)(log

1)(log

2 2

2

2

21)(log)(

n

nnnnb

00 01 1000 01 10 11

7n

000 010 100 11 001 011 101

Embedding Bits in a Choice

Page 7: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

7

Embedding Bits in a Choice

)(log2 n

5

4

3

2

1

01 2 4 8 16 32

)(log2 n

alternatives

bits )(nb

Page 8: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

8

Instruction Selection

Alice Bob

Selection Selection

Page 9: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

9

Instruction Selection

mov 0,

regsub reg,reg

and 0,reg

xor reg,reg

lea 0,reg

imul 0,reg

operation: reg=0

sub -1,reg

add 1,reg

inc reg

lea 1(reg),reg

operation: reg=reg+1

neg reg

imul -1,reg,

reg

operation: reg=-reg

Page 10: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

10

Alice Bob

Scheduling

Selection

Scheduling

Selection

Page 11: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

11

Instruction Scheduling & Code Layout

source

sink

o Instruction Scheduling

o Code Layout• pieces of code that can be placed in any order

Page 12: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

12

Layout

Interactions

Alice Bob

Scheduling

Selection

Layout

Scheduling

Selection

Canonicalize

Canonicalize

Page 13: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

13

Evaluation: i386 (1)

bzip2 crafty gap gzip mcf parser twolf vortex vpr total0.000

(1/200) 0.005

(1/100) 0.010

0.015

(1/50) 0.020

(1/40) 0.025

0.030

0.035

(1/25) 0.040

instruction selectioninstruction schedulingcode layout

Benchmarks

Em

bedd

ing

Rat

e

Hydan

Page 14: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

14

Layout

Code Transformation Signatures

Alice Bob

Scheduling

Selection

Layout

Scheduling

Selection

Wendy

sub 0x8,ebp (3 byte) ⇒ lea -0x8(,ebp,1),ebp (7byte)

Page 15: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

15

CTS: Instruction Selection

mov 0,

regsub reg,reg

and 0,reg

xor reg,reg

lea 0,reg

imul 0,reg

operation: reg=0

Wendy

Page 16: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

16

o CTS: unusual code property introduced by the applied code transformation

o Detection:1. quantify property through metric2. build statistical model of expected behavior3. compare observed to expected behavior4. classify code into clean and suspect

Detection of CTSs

Page 17: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

17

Layout

Code Transformation Signatures

Scheduling

SelectionUnusual

Instructions

Unusual Frequencies

Diverse Schedules

Suboptimal Schedules

Unusual Jump Behaviour

Page 18: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

18

Evaluation: i386 (2)

instruction selectioninstruction schedulingcode layout

bzip2 crafty gap gzip mcf parser twolf vortex vpr total

Benchmarks

0.000

(1/200) 0.005

(1/100) 0.010

0.015

(1/50) 0.020

(1/40) 0.025

0.030

0.035

(1/25) 0.040

Em

bedd

ing

Rat

e

Hydan

Page 19: Steganography for Executables and Code Transformation Signatures Bertrand Anckaert, Bjorn De Sutter, Dominique Chanet and Koen De Bosschere.

Questions?