hashed files primer_dw

16
UniVerse Hashed Files Internal Structure

Upload: tom-miller

Post on 18-Feb-2017

350 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Hashed files primer_dw

UniVerseHashed FilesInternal Structure

Page 2: Hashed files primer_dw

Terminology

• Group– physical division

• Record– contains data

• Key– identifies record

Page 3: Hashed files primer_dw

Groups

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Modulo = number of groups

Page 4: Hashed files primer_dw

Groups

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Separation = size of groups (units of 512 bytes)

Page 5: Hashed files primer_dw

Groups

Separation = 4 (group size 2K bytes)

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Hea

der

2K

Gro

up4K 6K 8K 10

K

12K

14K

0

Offset from beginning of file

Page 6: Hashed files primer_dw

Groups

Separation = 4 (group size 2K bytes)

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Hea

der

0x80

0

Gro

up0x

1000

0x18

00

0x20

00

0x28

00

0x30

00

0x38

00

0

Offset from beginning of file (reported in hex)

as seen inLIST.READU

Page 7: Hashed files primer_dw

Primary Group Buffers

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Hea

der

0x80

0

Gro

up0x

1000

0x18

00

0x20

00

0x28

00

0

Page 8: Hashed files primer_dw

Group Overflow

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Ovf

lw

Ovf

lw

Hea

der

0x80

0

Gro

up0x

1000

0x18

00

0x20

00

0x28

00

0x30

00

0x38

00

0

Page 9: Hashed files primer_dw

“Badly Overflowed”

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Ovf

lw

Ovf

lw

Hea

der

0x80

0

Gro

up0x

1000

0x18

00

0x20

00

0x28

00

0x30

00

0x38

00

0

Ovf

lw0x

4000

Page 10: Hashed files primer_dw

Where Files Break

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Ovf

lw

Ovf

lw

Hea

der

0x80

0

Gro

up0x

1000

0x18

00

0x20

00

0x28

00

0x30

00

0x38

00

0

Ovf

lw0x

4000

Files are most vulnerable on links between group buffers

Page 11: Hashed files primer_dw

Dynamic Files

Gro

up

Gro

up

Gro

up

Gro

up

Gro

up

Hea

der

0x80

0

Gro

up0x

1000

0x18

00

0x20

00

0x28

00

0

DATA.30

Ovf

lw

Hea

der

0x80

00

Ovf

lw0x

1000

OVER.30

Page 12: Hashed files primer_dw

Inside A Group

Record

Record

RecordRecord

Free Space

Page 13: Hashed files primer_dw

Inside A Group

Record

Record

RecordRecord

Free Space

0x2000

0x2164

0x2408

0x25a40x271b

Page 14: Hashed files primer_dw

… with Overflow

Record

Record

RecordRecord

Free Space

Record

Record

Free Space

0x2000

0x2164

0x2408

0x25a40x271b

0xa8000

0xa8112

0xa82b0

Page 15: Hashed files primer_dw

UVFIXFILE

: VLEVEL 4: TRACE 4Processing primary group: 40x00002000 F:0x0000203c B:0x0000003c (0x00000000) W:0x00020000 SIZE = 0x0000003c0x0000203c F:0x000020c8 B:0x0000208c (0x00002000) W:0xc0300000 SIZE = 0x0000008c0x000020c8 F:0x000020e0 B:0x00002024 (0x0000203c) W:0xc0300000 SIZE = 0x000000180x000020e0 F:0x00002134 B:0x0000209c (0x000020c8) W:0xc0300000 SIZE = 0x000000540x00002134 F:0x000021e0 B:0x0000204c (0x000020e0) W:0xc0300000 SIZE = 0x000000ac0x000021e0 F:0x000021f8 B:0x0000212c (0x00002134) W:0xc0300000 SIZE = 0x000000180x000021f8 F:0x00002250 B:0x000021b8 (0x000021e0) W:0xc0100000 SIZE = 0x000000580x00002250 F:0x000022e0 B:0x00002168 (0x000021f8) W:0xc0100000 SIZE = 0x000000900x000022e0 F:0x00002330 B:0x00002200 (0x00002250) W:0xc0300000 SIZE = 0x000000500x00002330 F:0x00002384 B:0x000022b4 (0x000022e0) W:0xc0300000 SIZE = 0x000000540x00002384 F:0x000023ec B:0x00002358 (0x00002330) W:0xc0300000 SIZE = 0x000000680x000023ec F:0x000024a8 B:0x00002338 (0x00002384) W:0xc0300000 SIZE = 0x000000bc0x000024a8 F:0x00000000 B:0x000020b4 (0x000023ec) W:0x20020000 SIZE = 0x00000358>> Statistics for primary group 4.>> Used bytes = 1132>> Free bytes = 916>> Total bytes = 2048

Addressof

record

Addressof nextrecord

Backwardlink

(BLINK)

Recordstatusbits

Addressof prevrecord

Size ofcurrentrecord

Addressof

record

Addressof nextrecord

Page 16: Hashed files primer_dw

UVFIXFILE

: VLEVEL 4: TRACE 4Processing primary group: 40x00002000 F:0x0000203c B:0x0000003c (0x00000000) W:0x00020000 SIZE = 0x0000003c0x0000203c F:0x000020c8 B:0x0000208c (0x00002000) W:0xc0300000 SIZE = 0x0000008c0x000020c8 F:0x000020e0 B:0x00002024 (0x0000203c) W:0xc0300000 SIZE = 0x000000180x000020e0 F:0x00002134 B:0x0000209c (0x000020c8) W:0xc0300000 SIZE = 0x000000540x00002134 F:0x000021e0 B:0x0000204c (0x000020e0) W:0xc0300000 SIZE = 0x000000ac0x000021e0 F:0x000021f8 B:0x0000212c (0x00002134) W:0xc0300000 SIZE = 0x000000180x000021f8 F:0x00002250 B:0x000021b8 (0x000021e0) W:0xc0100000 SIZE = 0x000000580x00002250 F:0x000022e0 B:0x00002168 (0x000021f8) W:0xc0100000 SIZE = 0x000000900x000022e0 F:0x00002330 B:0x00002200 (0x00002250) W:0xc0300000 SIZE = 0x000000500x00002330 F:0x00002384 B:0x000022b4 (0x000022e0) W:0xc0300000 SIZE = 0x000000540x00002384 F:0x000023ec B:0x00002358 (0x00002330) W:0xc0300000 SIZE = 0x000000680x000023ec F:0x000024a8 B:0x00002338 (0x00002384) W:0xc0300000 SIZE = 0x000000bc0x000024a8 F:0x00000000 B:0x000020b4 (0x000023ec) W:0x20020000 SIZE = 0x00000358>> Statistics for primary group 4.>> Used bytes = 1132>> Free bytes = 916>> Total bytes = 2048

21e0 - 2134 = 00ac