snmp packet analysis

18
SNMP Packet Analysis Tran Phuoc Nguyen [email protected] 1

Upload: bekay-pro

Post on 04-Sep-2014

125 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: SNMP Packet Analysis

SNMP Packet Analysis

Tran Phuoc [email protected]

1

Page 2: SNMP Packet Analysis

2

SNMP packet trace using Wireshark

Page 3: SNMP Packet Analysis

3

Ethernet Frame

Page 4: SNMP Packet Analysis

4

Example of SNMP message

Page 5: SNMP Packet Analysis

5

Basic Encoding Rules• Used to transmit data between systems that native encoding is

different– Type– Length– Value

also called encoding Type-Length-Value

Page 6: SNMP Packet Analysis

6

Basic Encoding Rules : Data Type

Page 7: SNMP Packet Analysis

7

Example of Ethernet Encoding

00 00 00 00 A3 E0 53 16 00 A0 24 70 C2 B7 08 00 45 00

00 10 00 45 1A 03 00 00 1E 11 72 8B C0 09 C8 02 C0 09

00 20 C8 04 04 00 00 A1 00 31 7E 18 30 27 02 01 00 04

00 30 06 70 75 62 6C 69 63 A0 1A 02 02 0F A4 02 01 00

00 40 02 01 00 30 0E 30 0C 06 08 2B 06 01 02 01 01 03

00 50 00 05 00 00 0A 00 7E

Page 8: SNMP Packet Analysis

8

Example of Ethernet Encoding

00 00 00 00 43 E0 53 16 00 A0 24 70 C2 B7 08 00 45 00

00 10 00 45 1A 03 00 00 1E 11 72 8B C0 09 C8 02 C0 09

00 20 C8 04 04 00 00 A1 00 31 7E 18 30 27 02 01 00 04

00 30 06 70 75 62 6C 69 63 A0 1A 02 02 0F A4 02 01 00

00 40 02 01 00 30 0E 30 0C 06 08 2B 06 01 02 01 01 03

00 50 00 05 00 00 0A 00 7E

Ethernet Header (14 bytes) + FCS (4 bytes)

Page 9: SNMP Packet Analysis

9

Example of Ethernet Encoding

00 00 00 00 43 E0 53 16 00 A0 24 70 C2 B7 08 00 45 00

00 10 00 45 1A 03 00 00 1E 11 72 8B C0 09 C8 02 C0 09

00 20 C8 04 04 00 00 A1 00 31 7E 18 30 27 02 01 00 04

00 30 06 70 75 62 6C 69 63 A0 1A 02 02 0F A4 02 01 00

00 40 02 01 00 30 0E 30 0C 06 08 2B 06 01 02 01 01 03

00 50 00 05 00 00 0A 00 7E

Ethernet Header (14 bytes.) + FCS (4 bytes)IP Header (20 bytes)

Page 10: SNMP Packet Analysis

10

Example of Ethernet Encoding

00 00 00 00 43 E0 53 16 00 A0 24 70 C2 B7 08 00 45 00

00 10 00 45 1A 03 00 00 1E 11 72 8B C0 09 C8 02 C0 09

00 20 C8 04 04 00 00 A1 00 31 7E 18 30 27 02 01 00 04

00 30 06 70 75 62 6C 69 63 A0 1A 02 02 0F A4 02 01 00

00 40 02 01 00 30 0E 30 0C 06 08 2B 06 01 02 01 01 03

00 50 00 05 00 00 0A 00 7E

Ethernet Header (14 bytes.) + FCS (4 bytes)IP Header (20 bytes)UDP Header (8 bytes)

SNMP Data

Page 11: SNMP Packet Analysis

11

Sequence 30 27 27 = 39 octets

Page 12: SNMP Packet Analysis

12

Sequence 30 27 27 = 39 octets

Integer 02 01 : 00

Page 13: SNMP Packet Analysis

13

Sequence 30 27 27 = 39 octets

Integer 02 01 : 00

String 04 06 : 70 75 62 6C 69 63

P U B L I C

Header

Page 14: SNMP Packet Analysis

14

Sequence 30 27 27 = 39 octets

Integer 02 01 : 00

String 04 06 : 70 75 62 6C 69 63

P U B L I C

Sequence A0 A0 = 1010 0000 (Get

Request)

1A 1A = 26 octets

PDU

Header

Page 15: SNMP Packet Analysis

15

Sequence 30 27 27 = 39 octets

Integer 02 01 : 00

String 04 06 : 70 75 62 6C 69 63

P U B L I C

Sequence A0 A0 = 1010 0000 (Get

Request)

1A 1A = 26 octets

Integer 02 02 : 0F A4 Request ID = 4004

Integer 02 01 : 00 Error status : 0

Integer 02 01 : 00 Error index : 0

PDU

Header

Page 16: SNMP Packet Analysis

16

Sequence 30 27 27 = 39 octets

Integer 02 01 : 00

String 04 06 : 70 75 62 6C 69 63

P U B L I C

Sequence A0 A0 = 1010 0000 (Get

Request)

1A 1A = 26 octets

Integer 02 02 : 0F A4 Request ID = 4004

Integer 02 01 : 00 Error statut : 0

Integer 02 01 : 00 Error index : 0

Sequence 30 0E 0E = 14 octets

Sequence 30 0C OC = 12 octets

Objet 06 08 : 2B 06 01 02 01 01 03 00

1.3. 6. 1. 2. 1. 1. 3. 0

Null 05 00

PDU

Header

Page 17: SNMP Packet Analysis

17

1-sysDescr2-sysObjectID3-sysUpTime4-sysContact5-sysName6-sysLocation

1 – 3 – 6 – 1 – 2 – 1 – 1 – 3

Addr. Trans.3

Syst1

Interface2

IP4

ICMP5

TCP6

UDP7

EGP8

MIB I1

2

Directory1

Mgmt2

Experim.3

Private4

Internet1

2

3

4

1

2

3

4

5

DoD6

STD0

ORG3

2

1

UIT0

ISO1

2

Page 18: SNMP Packet Analysis

18

SysUpTimeDescription type d'un objet (MIB II) Description de l'objet

SysUpTime

OBJECT_TYPE MACRO =BEGINTYPE NOTATION =

"SYNTAX" type (TYPE ObjectSyntax)"ACCESS" Access"STATUS" Status

VALUE NOTATION = value (VALUE ObjectName)DESCRIPTION value (description DisplayString) |emptyAccess ="read_only"|"write_only"|"not_accessible"Status ="mandatory"|"optional"|"obsolete"|"deprecated"DisplayString=OCTET STRING SIZE (0…255)END

SysUpTime OBJECT_TYPESyntax TimeTicksAccess read_onlyStatus mandatoryDescription "The Time (in hundredhs of a second) since the network management portion of a system was last reinitialized"={system 3}