scapy.layers.smb

SMB (Server Message Block), also known as CIFS.

class scapy.layers.smb.SMBMailSlot

Bases: scapy.packet.Packet

aliastypes
fields_desc
SMBMailSlot fields

opcode

LEShortField

1

priority

LEShortField

1

class

LEShortField

2

size

LEShortField

135

name

StrNullField

'SMB Mail Slot Protocol'

class scapy.layers.smb.SMBNegociate_Protocol_Request_Header

Bases: scapy.packet.Packet

aliastypes
fields_desc
SMBNegociate_Protocol_Request_Header fields

Start

StrFixedLenField

b'\xffSMB'

Command

ByteEnumField

114

Error_Class

ByteField

0

Reserved

ByteField

0

Error_code

LEShortField

0

Flags

ByteField

24

Flags2

LEShortField

0

PIDHigh

LEShortField

0

Signature

LELongField

0

Unused

LEShortField

0

TID

LEShortField

0

PID

LEShortField

1

UID

LEShortField

0

MID

LEShortField

2

WordCount

ByteField

0

ByteCount

LEShortField

12

payload_guess

Possible sublayers: SMBNegociate_Protocol_Request_Tail

class scapy.layers.smb.SMBNegociate_Protocol_Request_Tail

Bases: scapy.packet.Packet

aliastypes
fields_desc
SMBNegociate_Protocol_Request_Tail fields

BufferFormat

ByteField

2

BufferData

StrNullField

b'NT LM 0.12'

payload_guess

Possible sublayers: SMBNegociate_Protocol_Request_Tail

class scapy.layers.smb.SMBNegociate_Protocol_Response_Advanced_Security

Bases: scapy.packet.Packet

aliastypes
fields_desc
SMBNegociate_Protocol_Response_Advanced_Security fields

Start

StrFixedLenField

b'\xffSMB'

Command

ByteEnumField

114

Error_Class

ByteField

0

Reserved

ByteField

0

Error_Code

LEShortField

0

Flags

ByteField

152

Flags2

LEShortField

0

PIDHigh

LEShortField

0

Signature

LELongField

0

Unused

LEShortField

0

TID

LEShortField

0

PID

LEShortField

1

UID

LEShortField

0

MID

LEShortField

2

WordCount

ByteField

17

DialectIndex

LEShortField

7

SecurityMode

ByteField

3

MaxMpxCount

LEShortField

50

MaxNumberVC

LEShortField

1

MaxBufferSize

LEIntField

16144

MaxRawSize

LEIntField

65536

SessionKey

LEIntField

0

ServerCapabilities

LEShortField

62457

UnixExtensions

BitField (1 bit)

0

Reserved2

BitField (7 bits)

0

ExtendedSecurity

BitField (1 bit)

1

CompBulk

BitField (2 bits)

0

Reserved3

BitField (5 bits)

0

ServerTimeHigh

LEIntField

3592585216

ServerTimeLow

LEIntField

29683604

ServerTimeZone

LEShortField

60

EncryptionKeyLength

ByteField

0

ByteCount

LEFieldLenField

None

GUID

BitField (128 bits)

0

SecurityBlob

StrLenField

b''

class scapy.layers.smb.SMBNegociate_Protocol_Response_No_Security

Bases: scapy.packet.Packet

aliastypes
fields_desc
SMBNegociate_Protocol_Response_No_Security fields

Start

StrFixedLenField

b'\xffSMB'

Command

ByteEnumField

114

Error_Class

ByteField

0

Reserved

ByteField

0

Error_Code

LEShortField

0

Flags

ByteField

152

Flags2

LEShortField

0

PIDHigh

LEShortField

0

Signature

LELongField

0

Unused

LEShortField

0

TID

LEShortField

0

PID

LEShortField

1

UID

LEShortField

0

MID

LEShortField

2

WordCount

ByteField

17

DialectIndex

LEShortField

7

SecurityMode

ByteField

3

MaxMpxCount

LEShortField

50

MaxNumberVC

LEShortField

1

MaxBufferSize

LEIntField

16144

MaxRawSize

LEIntField

65536

SessionKey

LEIntField

0

ServerCapabilities

LEShortField

62457

UnixExtensions

BitField (1 bit)

0

Reserved2

BitField (7 bits)

0

ExtendedSecurity

BitField (1 bit)

0

CompBulk

FlagsField (2 bits)

<Flag 0 ()>

Reserved3

BitField (5 bits)

0

ServerTimeHigh

LEIntField

3592585216

ServerTimeLow

LEIntField

29683604

ServerTimeZone

LEShortField

60

EncryptionKeyLength

ByteField

8

ByteCount

LEShortField

24

EncryptionKey

BitField (64 bits)

0

DomainName

StrNullField

b'WORKGROUP'

ServerName

StrNullField

b'RMFF1'

class scapy.layers.smb.SMBNegociate_Protocol_Response_No_Security_No_Key

Bases: scapy.packet.Packet

aliastypes
fields_desc
SMBNegociate_Protocol_Response_No_Security_No_Key fields

Start

StrFixedLenField

b'\xffSMB'

Command

ByteEnumField

114

Error_Class

ByteField

0

Reserved

ByteField

0

Error_Code

LEShortField

0

Flags

ByteField

152

Flags2

LEShortField

0

PIDHigh

LEShortField

0

Signature

LELongField

0

Unused

LEShortField

0

TID

LEShortField

0

PID

LEShortField

1

UID

LEShortField

0

MID

LEShortField

2

WordCount

ByteField

17

DialectIndex

LEShortField

7

SecurityMode

ByteField

3

MaxMpxCount

LEShortField

50

MaxNumberVC

LEShortField

1

MaxBufferSize

LEIntField

16144

MaxRawSize

LEIntField

65536

SessionKey

LEIntField

0

ServerCapabilities

LEShortField

62457

UnixExtensions

BitField (1 bit)

0

Reserved2

BitField (7 bits)

0

ExtendedSecurity

BitField (1 bit)

0

CompBulk

FlagsField (2 bits)

<Flag 0 ()>

Reserved3

BitField (5 bits)

0

ServerTimeHigh

LEIntField

3592585216

ServerTimeLow

LEIntField

29683604

ServerTimeZone

LEShortField

60

EncryptionKeyLength

ByteField

0

ByteCount

LEShortField

16

DomainName

StrNullField

b'WORKGROUP'

ServerName

StrNullField

b'RMFF1'

namez = 'SMBNegociate Protocol Response No Security No Key'
class scapy.layers.smb.SMBNetlogon_Protocol_Response_Header

Bases: scapy.packet.Packet

aliastypes
fields_desc
SMBNetlogon_Protocol_Response_Header fields

Start

StrFixedLenField

b'\xffSMB'

Command

ByteEnumField

37

Error_Class

ByteField

2

Reserved

ByteField

0

Error_code

LEShortField

4

Flags

ByteField

0

Flags2

LEShortField

0

PIDHigh

LEShortField

0

Signature

LELongField

0

Unused

LEShortField

0

TID

LEShortField

0

PID

LEShortField

0

UID

LEShortField

0

MID

LEShortField

0

WordCount

ByteField

17

TotalParamCount

LEShortField

0

TotalDataCount

LEShortField

112

MaxParamCount

LEShortField

0

MaxDataCount

LEShortField

0

MaxSetupCount

ByteField

0

unused2

ByteField

0

Flags3

LEShortField

0

TimeOut1

ByteField

232

TimeOut2

ByteField

3

unused3

LEShortField

0

unused4

LEShortField

0

ParamCount2

LEShortField

0

ParamOffset

LEShortField

0

DataCount

LEShortField

112

DataOffset

LEShortField

92

SetupCount

ByteField

3

unused5

ByteField

0

class scapy.layers.smb.SMBNetlogon_Protocol_Response_Tail_LM20

Bases: scapy.packet.Packet

aliastypes
fields_desc
SMBNetlogon_Protocol_Response_Tail_LM20 fields

Command

ByteEnumField

6

unused

ByteField

0

DblSlash

StrFixedLenField

b'\\\\'

ServerName

StrNullField

b'WIN'

LM20Token

LEShortField

65535

class scapy.layers.smb.SMBNetlogon_Protocol_Response_Tail_SAM

Bases: scapy.packet.Packet

aliastypes
fields_desc
SMBNetlogon_Protocol_Response_Tail_SAM fields

Command

ByteEnumField

23

unused

ByteField

0

Data1

ShortField

0

Data2

ShortField

64769

Data3

ShortField

0

Data4

ShortField

44254

Data5

ShortField

4069

Data6

ShortField

53514

Data7

ShortField

14156

Data8

ShortField

33762

Data9

ShortField

32217

Data10

ShortField

14870

Data11

ShortField

29695

Data12

ByteField

4

Data13

StrFixedLenField

b'rmff'

Data14

ByteField

0

Data16

ShortField

49176

Data18

ByteField

10

Data20

StrFixedLenField

b'rmff-win2k'

Data21

ByteField

192

Data22

ShortField

6336

Data23

ShortField

6154

Data24

StrFixedLenField

b'RMFF-WIN2K'

Data25

ShortField

0

Data26

ByteField

23

Data27

StrFixedLenField

b'Default-First-Site-Name'

Data28

ShortField

192

Data29

ShortField

15376

Data30

ShortField

192

Data31

ShortField

512

Data32

ShortField

0

Data33

ShortField

44052

Data34

ShortField

100

Data35

ShortField

0

Data36

ShortField

0

Data37

ShortField

0

Data38

ShortField

0

Data39

ShortField

3328

Data40

ShortField

0

Data41

ShortField

65535

class scapy.layers.smb.SMBSession_Setup_AndX_Request

Bases: scapy.packet.Packet

aliastypes
fields_desc
SMBSession_Setup_AndX_Request fields

Start

StrFixedLenField

b'\xffSMB'

Command

ByteEnumField

115

Error_Class

ByteField

0

Reserved

ByteField

0

Error_Code

LEShortField

0

Flags

ByteField

24

Flags2

LEShortField

1

PIDHigh

LEShortField

0

Signature

LELongField

0

Unused

LEShortField

0

TID

LEShortField

0

PID

LEShortField

1

UID

LEShortField

0

MID

LEShortField

2

WordCount

ByteField

13

AndXCommand

ByteEnumField

117

Reserved2

ByteField

0

AndXOffset

LEShortField

96

MaxBufferS

LEShortField

2920

MaxMPXCount

LEShortField

50

VCNumber

LEShortField

0

SessionKey

LEIntField

0

ANSIPasswordLength

LEFieldLenField

None

UnicodePasswordLength

LEShortField

0

Reserved3

LEIntField

0

ServerCapabilities

LEShortField

5

UnixExtensions

BitField (1 bit)

0

Reserved4

BitField (7 bits)

0

ExtendedSecurity

BitField (1 bit)

0

CompBulk

BitField (2 bits)

0

Reserved5

BitField (5 bits)

0

ByteCount

LEShortField

35

ANSIPassword

StrLenField

b'Pass'

Account

StrNullField

b'GUEST'

PrimaryDomain

StrNullField

b''

NativeOS

StrNullField

b'Windows 4.0'

NativeLanManager

StrNullField

b'Windows 4.0'

WordCount2

ByteField

4

AndXCommand2

ByteEnumField

255

Reserved6

ByteField

0

AndXOffset2

LEShortField

0

Flags3

LEShortField

2

PasswordLength

LEShortField

1

ByteCount2

LEShortField

18

Password

ByteField

0

Path

StrNullField

b'\\\\WIN2K\\IPC$'

Service

StrNullField

b'IPC'

class scapy.layers.smb.SMBSession_Setup_AndX_Response

Bases: scapy.packet.Packet

aliastypes
fields_desc
SMBSession_Setup_AndX_Response fields

Start

StrFixedLenField

b'\xffSMB'

Command

ByteEnumField

115

Error_Class

ByteField

0

Reserved

ByteField

0

Error_Code

LEShortField

0

Flags

ByteField

144

Flags2

LEShortField

4097

PIDHigh

LEShortField

0

Signature

LELongField

0

Unused

LEShortField

0

TID

LEShortField

0

PID

LEShortField

1

UID

LEShortField

0

MID

LEShortField

2

WordCount

ByteField

3

AndXCommand

ByteEnumField

117

Reserved2

ByteField

0

AndXOffset

LEShortField

66

Action

LEShortField

0

ByteCount

LEShortField

25

NativeOS

StrNullField

b'Windows 4.0'

NativeLanManager

StrNullField

b'Windows 4.0'

PrimaryDomain

StrNullField

b''

WordCount2

ByteField

3

AndXCommand2

ByteEnumField

255

Reserved3

ByteField

0

AndXOffset2

LEShortField

80

OptionalSupport

LEShortField

1

ByteCount2

LEShortField

5

Service

StrNullField

b'IPC'

NativeFileSystem

StrNullField

b''