About PE File #2

13
About PE file #2 pyutic 1

Transcript of About PE File #2

Page 1: About PE File #2

About PE file #2

pyutic

1

Page 2: About PE File #2

PE file structureHeader

Real-Data

2

Page 3: About PE File #2

PE file structureHeader

Real-Data

DOS Header

NT Header

Section Header

Section Data

Section Data

Section Data

3

Page 4: About PE File #2

Offset? VA? RVA?

Offset

VA(Virtual Address)

ImageBase + RVA

RVA(Relative Virtual Address)

4

Page 5: About PE File #2

Header -DOS Header-

PE file can be used for ‘DOS OS’

DOS Header

DOS Stub NT Header

DOS! NO!

5

Page 6: About PE File #2

Header -DOS Header-

PE file can be used for ‘DOS OS’

DOS Header

DOS Stub

NT Header

6

Page 7: About PE File #2

Header -NT Header-

Many things are in here!

Machine

Sections Information

Characteristic

Entry Point

Image Base

SubSystem

Data Directory

7

Page 8: About PE File #2

Header -NT Header ~ Data Directory-

RVA & Size

Import Directory

Export Directory

Relocation Directory

Resource Directory

8

Page 9: About PE File #2

How packer works

9

Original Binary

Header

Section

Section

Section

Page 10: About PE File #2

How packer works

10

Original Binary

Header

Section #1

Section #2

Section #3

Packed Binary

Header

Section #1

Section #2

Section #3

Page 11: About PE File #2

How packer works -UPX-

11

Original Binary

Page 12: About PE File #2

How packer works -UPX-

12

After Packing

Why UPX0 is?

Page 13: About PE File #2

Thanks [email protected]

13