data toolbox mystruct length:ubint16 value:bytes(_) struct integer bytes struct 0540 41 42 43 4411...

8
Data Toolbox MyStruct Length:UBInt16 Value:Bytes(_) Struct Integer Bytes Struct 05 40 41 42 43 44 11 22 33 44 55 66 77 88 99 aa bb cc dd length value MyStruct

Upload: noah-martin

Post on 05-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Data Toolbox MyStruct Length:UBInt16 Value:Bytes(_) Struct Integer Bytes Struct 0540 41 42 43 4411 22 33 44 55 66 77 88 99 aa bb cc dd lengthvalue MyStruct

Data

Toolbox

MyStruct

Length:UBInt16

Value:Bytes(_)

Struct

Integer

Bytes

Struct

05 40 41 42 43 44 11 22 33 44 55 66 77 88 99 aa bb cc dd

length value

MyStruct

Page 2: Data Toolbox MyStruct Length:UBInt16 Value:Bytes(_) Struct Integer Bytes Struct 0540 41 42 43 4411 22 33 44 55 66 77 88 99 aa bb cc dd lengthvalue MyStruct

File View Tools CaptureWireSnake x_

ipv4ethernet

class MacAddressAdapter(Adapter): … …

ethernet_header = Struct( … … … …)

StructA sequence of …

Parameters: name – … subcons – …

Buffer: 0172996a336c3b62811de6a70806

Result: Conatiner: dst=“01-72-99-6a-33-6c” src = …

Debugger:•Traceback•Context analysis•Playback

Page 3: Data Toolbox MyStruct Length:UBInt16 Value:Bytes(_) Struct Integer Bytes Struct 0540 41 42 43 4411 22 33 44 55 66 77 88 99 aa bb cc dd lengthvalue MyStruct

Field(6) Field(6) UBInt16Ethernet header

Ethernet header01001001001001… Dest = \x01\x02\x03\x04\x05\x06Source = \x07\x08\x09\x0a\x0b\x0cType = 2054

Page 4: Data Toolbox MyStruct Length:UBInt16 Value:Bytes(_) Struct Integer Bytes Struct 0540 41 42 43 4411 22 33 44 55 66 77 88 99 aa bb cc dd lengthvalue MyStruct

Field(6) Field(6)

UBInt16Ethernet header

MacAdapter def _decode…def _encode…

MacAdapter MacAdapter

Page 5: Data Toolbox MyStruct Length:UBInt16 Value:Bytes(_) Struct Integer Bytes Struct 0540 41 42 43 4411 22 33 44 55 66 77 88 99 aa bb cc dd lengthvalue MyStruct

Field(6)

UBInt16Ethernet header

MacAdapter def _decode…def _encode…

MacAdapterMacAddress

MacAddress MacAddress

Page 6: Data Toolbox MyStruct Length:UBInt16 Value:Bytes(_) Struct Integer Bytes Struct 0540 41 42 43 4411 22 33 44 55 66 77 88 99 aa bb cc dd lengthvalue MyStruct

Field(6)

UBInt16

Ethernet header

MacAdapter def _decode…def _encode…

MacAdapterMacAddress

MacAddress MacAddress

TypeEnumEnum(IP = 0x0806,

ARP = 0x0804)

TypeEnum

Ethernet header01001001001001… Dest = 01.02.03.04.05.06Source = 07.08.09.0a.0b.0cType = IP

Page 7: Data Toolbox MyStruct Length:UBInt16 Value:Bytes(_) Struct Integer Bytes Struct 0540 41 42 43 4411 22 33 44 55 66 77 88 99 aa bb cc dd lengthvalue MyStruct

UBInt8PascalString Array( )

Field(1)

Page 8: Data Toolbox MyStruct Length:UBInt16 Value:Bytes(_) Struct Integer Bytes Struct 0540 41 42 43 4411 22 33 44 55 66 77 88 99 aa bb cc dd lengthvalue MyStruct

<number>

PascalString

Array( )

Field(1)

LengthValueAdapterLengthValue

def _decode…def _encode…LengthValueAdapter

StringAdapter

LengthValue

PascalString8 PascalString

UBInt8

PascalStringFoo PascalString

Field(1)