Top Banner
Analysis of ARP protocol security A.H. Muna @abdimuna1 07.09.2013 Wednesday, December 4, 13
68

Arp security by_abdimuna_sep_28

Jun 28, 2015

Download

Technology

Abdimuna Muna

...this are some slides for the talk I gave in our university conference!, Its not an ultimate analysis, but you can grasp some ideas.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Arp security by_abdimuna_sep_28

Analysis of ARP protocol security

A.H. Muna@abdimuna1

07.09.2013

Wednesday, December 4, 13

Page 2: Arp security by_abdimuna_sep_28

Contents: • What is ARP?

• Logical Address

• Physical Address

• ARP structure

• Mapping

• ARP cache table

•Wednesday, December 4, 13

Page 3: Arp security by_abdimuna_sep_28

Contents cont.

• ARP in job

• Problems with ARP

• mARP

Wednesday, December 4, 13

Page 4: Arp security by_abdimuna_sep_28

ARP

• ARP (англ. Address Resolution Protocol - протокол

разрешения адресов) представляет собой сетевой

протокол, предназначенный для преобразования IP-

адресов (адресов сетевого уровня) в MAC-адреса

(адреса канального уровня) в сетях TCP/IP. Т.е. для

отображения IP-адресов в Ethernet адреса.

Wednesday, December 4, 13

Page 5: Arp security by_abdimuna_sep_28

Logical Address

• Unique string of numbers separated by periods that identifies each computer using the Internet Protocol to communicate over a network.

• e.g 172.16.254.1

Wednesday, December 4, 13

Page 6: Arp security by_abdimuna_sep_28

Logical Address

Wednesday, December 4, 13

Page 7: Arp security by_abdimuna_sep_28

Physical Address

• A media access control address (MAC address) is a unique identifier assigned to network interfaces for communications on the physical network segment.

Wednesday, December 4, 13

Page 9: Arp security by_abdimuna_sep_28

Physical Address

• It may also be known as an Ethernet hardware address (EHA), hardware address or physical address.

Wednesday, December 4, 13

Page 10: Arp security by_abdimuna_sep_28

Physical Address

Wednesday, December 4, 13

Page 11: Arp security by_abdimuna_sep_28

Physical Address

• This 48-bit address space contains potentially 248 or 281,474,976,710,656 possible MAC

addresses.

Wednesday, December 4, 13

Page 12: Arp security by_abdimuna_sep_28

ARP structure

Wednesday, December 4, 13

Page 13: Arp security by_abdimuna_sep_28

ARP structure

• The root of the ARP data structures is the struct neigh_table, defined in include/net/neighbour.h Collectively the struct neigh_table and the structures to which it points are the internal realization of the arp cache. Each network layer protocol that uses ARP has an associated neigh_table.

Wednesday, December 4, 13

Page 14: Arp security by_abdimuna_sep_28

ARP neighbor table

Wednesday, December 4, 13

Page 15: Arp security by_abdimuna_sep_28

ARP neighbor table

Wednesday, December 4, 13

Page 16: Arp security by_abdimuna_sep_28

IPv4 neighbor tableThe neighbor table for the IPV4 ARP protocol is statically declared as follows:

Wednesday, December 4, 13

Page 17: Arp security by_abdimuna_sep_28

IPv4 neighbor tableThe entry_size field is set to 4 more than it "needs to be" because of the way

struct neighbor which is shown on the next page is defined. Its last field,

primary_key[0], is declared as an array of 0 bytes. The extra 4 bytes of the

entry_size ensure that when the stucture is dynamically allocated, space for the

actual size of its primary_key[0] will be included.

The parms section defines some operational time­out triggers. In a standard x86 Linux system the clock ticks once every 10msec and HZ is equal to 100, the number of ticks per second.

4 #ifndef HZ 5 #define HZ 100 6 #endifThus Hz can be considered to mean seconds here.

Wednesday, December 4, 13

Page 18: Arp security by_abdimuna_sep_28

IPv4 neighbor tableThis structure defines the contents of a single arp cache element.

Wednesday, December 4, 13

Page 19: Arp security by_abdimuna_sep_28

IPv4 neighbor tableFunctions of the structure elements:

Wednesday, December 4, 13

Page 20: Arp security by_abdimuna_sep_28

Hardware cacheHardware header cache elements contain the hardware header needed for the 1st hop made by an outgoing packet.

Wednesday, December 4, 13

Page 21: Arp security by_abdimuna_sep_28

Hardware cacheThe function structure elements:

Wednesday, December 4, 13

Page 22: Arp security by_abdimuna_sep_28

The arp_init( )Defined in net/ipv4/arp.c,Called by inet_init( );

Responsibilities include: Setting up the ARP cache. Registering the ARP packet with kernel. Creating a proc entry /proc/net/arp

Wednesday, December 4, 13

Page 23: Arp security by_abdimuna_sep_28

Registering the ARP packet typeAfter setting up the ARP cache, arp_init( ) must register the ARP packet type with the link layer. This is done via a call to dev_add_pack().

1197 dev_add_pack(&arp_packet_type);

The arp_packet_type is statically declared as

Wednesday, December 4, 13

Page 24: Arp security by_abdimuna_sep_28

Creating /proc/net/arp entryAfter registering ARP packet type, arp_init() creates a proc entry that displays the contents of ARP cache via arp_get_info() . arp_get_info() displays entries in hash_buckets and phash_buckets.

Wednesday, December 4, 13

Page 25: Arp security by_abdimuna_sep_28

Creating /proc/net/arp entry

In the following table, the last three entries are proxies:

Wednesday, December 4, 13

Page 26: Arp security by_abdimuna_sep_28

ARP structures summery

Wednesday, December 4, 13

Page 27: Arp security by_abdimuna_sep_28

ARP employed

• For two hosts on the same network and one desires to send a packet to the other on different networks and must use a gateway/router

• For a router that needs to forward a packet for one host through another router from one host to the destination host on the same network

Wednesday, December 4, 13

Page 28: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B1

hello

Wednesday, December 4, 13

Page 29: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B1

hello

Wednesday, December 4, 13

Page 30: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B1

Wednesday, December 4, 13

Page 31: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B1

Wednesday, December 4, 13

Page 32: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B1

Wednesday, December 4, 13

Page 33: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B1

Wednesday, December 4, 13

Page 34: Arp security by_abdimuna_sep_28

ARP employed

Wednesday, December 4, 13

Page 35: Arp security by_abdimuna_sep_28

ARP employed

Wednesday, December 4, 13

Page 36: Arp security by_abdimuna_sep_28

ARP employed

Wednesday, December 4, 13

Page 37: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B2

Wednesday, December 4, 13

Page 38: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B2

Wednesday, December 4, 13

Page 39: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B2

Wednesday, December 4, 13

Page 40: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B2

Wednesday, December 4, 13

Page 41: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B2

Wednesday, December 4, 13

Page 42: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B2

Wednesday, December 4, 13

Page 43: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B2

Wednesday, December 4, 13

Page 44: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B2

Wednesday, December 4, 13

Page 45: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B2

Wednesday, December 4, 13

Page 46: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B2

Wednesday, December 4, 13

Page 47: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B2

Wednesday, December 4, 13

Page 48: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B3

Wednesday, December 4, 13

Page 49: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B3

Wednesday, December 4, 13

Page 50: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B3

Wednesday, December 4, 13

Page 51: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B3

Wednesday, December 4, 13

Page 52: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B3

Wednesday, December 4, 13

Page 53: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B3

Wednesday, December 4, 13

Page 54: Arp security by_abdimuna_sep_28

ARP employed

ATALKS

B3

Wednesday, December 4, 13

Page 55: Arp security by_abdimuna_sep_28

ARP Message format

28 #define ETH_HW_ADDR_LEN 6 29 #define IP_ADDR_LEN 4 30 #define ARP_FRAME_TYPE 0x0806 31 #define ETHER_HW_TYPE 1 32 #define IP_PROTO_TYPE 0x0800 33 #define OP_ARP_REQUEST 2 34 35 #define DEFAULT_DEVICE "eth0" 36 #define WIFI_DEVICE “en1”

Wednesday, December 4, 13

Page 56: Arp security by_abdimuna_sep_28

ARP Message format

Wednesday, December 4, 13

Page 57: Arp security by_abdimuna_sep_28

ARP problems

1.No Authentification2. Mobile computer3. DoS attack 4. MiTM attack 5. In some LAN’s like local Talk, the PHY ADD

changes, every time the computer is turned on.

Wednesday, December 4, 13

Page 58: Arp security by_abdimuna_sep_28

ARP problems

1.No Authentication

ARP provides no way to verify that the responding device is really who it says it isStateless protocol.Updating ARP Cache table

Wednesday, December 4, 13

Page 59: Arp security by_abdimuna_sep_28

ARP problems

2.Mobile computer

In mobile computing, where network device do change their physical location(offices), static arp is painful. You have to register the Hardware address each time, a new device is introduced.

Wednesday, December 4, 13

Page 60: Arp security by_abdimuna_sep_28

ARP problems

3.DoS attack

ARP is susceptible to Denial of services attack.Hacker can easily associate an operationally significant IP address to a false MAC address

Wednesday, December 4, 13

Page 61: Arp security by_abdimuna_sep_28

ARP problems4.MiTM attack

Wednesday, December 4, 13

Page 62: Arp security by_abdimuna_sep_28

ARP problems4.MiTM attack

Wednesday, December 4, 13

Page 63: Arp security by_abdimuna_sep_28

ARP problems4.MiTM attack

Wednesday, December 4, 13

Page 64: Arp security by_abdimuna_sep_28

Proposed solutions

Wednesday, December 4, 13

Page 65: Arp security by_abdimuna_sep_28

Что я буду делать Вообще !

Wednesday, December 4, 13

Page 66: Arp security by_abdimuna_sep_28

Что я буду делать Вообще !

Wednesday, December 4, 13

Page 67: Arp security by_abdimuna_sep_28

To Be Continue ...!

Спасибо !

Wednesday, December 4, 13

Page 68: Arp security by_abdimuna_sep_28

mARP

Proposing a modified ARP

Wednesday, December 4, 13