Promiscuous node detection using ARP packets

Slides:



Advertisements
Similar presentations
10: ICMPv6 Neighbor Discovery
Advertisements

Computer Networks21-1 Chapter 21. Network Layer: Address Mapping, Error Reporting, and Multicasting 21.1 Address Mapping 21.2 ICMP 21.3 IGMP 21.4 ICMPv6.
5: Link-Local Addresses Rick Graziani Cabrillo College
21.1 Chapter 21 Network Layer: Address Mapping, Error Reporting, and Multicasting Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Tactics to Discover “Passive” Monitoring Devices
1 Address Resolution Protocol (ARP) Relates to Lab 2. This module is about the address resolution protocol.
CISCO NETWORKING ACADEMY Chabot College ELEC Address Resolution Protocol.
ARP: Address Resolution Protocol
Media Access Control (MAC) addresses in the network access layer ▫ Associated w/ network interface card (NIC) ▫ 48 bits or 64 bits IP addresses for the.
 As defined in RFC 826 ARP consists of the following messages ■ ARP Request ■ ARP Reply.
COEN 252 Computer Forensics Remote Sniffer Detection.
ARP cache Poisoning For the Detection of Sniffers in an Ethernet Network Raoudha KHCHERIF Assistant Professor National School of Computer Science University.
1 Fall 2005 Hardware Addressing and Frame Identification Qutaibah Malluhi CSE Department Qatar University.
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
STFTP (Simplified Trivial File Transfer Protocol) MODULE #1.
ITIS 6167/8167: Network and Information Security Weichao Wang.
IP Routing: an Introduction. Quiz
Detection of Promiscuous nodes Using Arp Packets By Engin Arslan.
Address Resolution Protocol (ARP). Mapping IP Address to Data-Link Address  How does a machine map an IP address to its Data- Link layer (hardware or.
Cisco Public © 2013 Cisco and/or its affiliates. All rights reserved. 1.
CMPT 471 Networking II Address Resolution IPv6 Neighbor Discovery 1© Janice Regan, 2012.
Protocol Headers Pre DA SA 0800h … version H L 6 TCP Header Data FCS
Mapping Internet Addresses to Physical Addresses (ARP)
Network Redundancy Multiple paths may exist between systems. Redundancy is not a requirement of a packet switching network. Redundancy was part of the.
Copyright 2002, Marchany TCP/IP Review Randy Marchany VA Tech Computing Center Spring, 2001.
CMPT 471 Networking II Address Resolution IPv4 ARP RARP 1© Janice Regan, 2012.
SYSTEM ADMINISTRATION Chapter 8 Internet Protocol (IP) Addressing.
IP Routing Table (Linux) eth0 eth0 UG UG lo lo U eth0 eth0 U
Hyung-Min Lee ©Networking Lab., 2001 Chapter 8 ARP and RARP.
Application Block Diagram III. SOFTWARE PLATFORM Figure above shows a network protocol stack for a computer that connects to an Ethernet network and.
IP Addresses Universal address regardless of layer 2 architecture Each address is that of an interface, not necessarily a host A host may have more than.
Chapter 19 Binding Protocol Addresses (ARP) A frame transmitted across a physical network must contain the hardware address of the destination. Before.
Birgit Bonham: Prospect High School ARP….or What’s your MAC address?
Media Access Control (MAC) addresses in the network access layer ▫ Associated w/ network interface card (NIC) ▫ 48 bits or 64 bits IP addresses for the.
Chapter 7 ARP and RARP.
Chapter 9 Hardware Address & Frame Type Identification Hardware address of frame Addressing schemes Ethernet Frame header format.
BAI513 - PROTOCOLS ARP BAIST – Network Management.
1 Kyung Hee University Chapter 8 ARP(Address Resolution Protocol)
Mapping IP Addresses to Hardware Addresses Chapter 5.
1 Connectivity with ARP and RARP. 2 There needs to be a mapping between the layer 2 and layer 3 addresses (i.e. IP to Ethernet). Mapping should be dynamic.
Cisco Confidential © 2013 Cisco and/or its affiliates. All rights reserved. 1 Cisco Networking Training (CCENT/CCT/CCNA R&S) Rick Rowe Ron Giannetti.
Net5: ARP 協定 授課教師:雲林科技大學 張慶龍 老師. IP Address/Physical Address Static Mapping  IP broadcast address maps to Ethernet broadcast address  IP Multicast Address.
1 4 ARP : Address Resolution Protocol. 2 4 Introduction - Problem Successful Mapping of an IP Address to a Hardware Address Ethernet uses MAC-address.
ADDRESS MAPPING ADDRESS MAPPING The delivery of a packet to a host or a router requires two levels of addressing: logical and physical. We need to be able.
Chapter 4: server services. The Complete Guide to Linux System Administration2 Objectives Configure network interfaces using command- line and graphical.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
RARP : Reverse Address Resolution Protocol
1 Address Resolution Protocol (ARP). 2 Overview 3 Need for Address Translation Note: –The Internet is based on IP addresses –Local area networks use.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
Introduction to Networks v6.0
IP: Addressing, ARP, Routing
MAC Address Tables on Connected Switches
COEN 152 / 252 Computer Forensics
CIS 116 IPv6 Fundamentals 2 – Primer Rick Graziani Cabrillo College
Instructor Materials Chapter 5: Ethernet
Address Resolution Protocol (ARP)
Chapter 8 ARP(Address Resolution Protocol)
6 Network Layer Part III Computer Networks Tutun Juhana
Objective: ARP.
ARP and RARP Objectives Chapter 7 Upon completion you will be able to:
Net 323: NETWORK Protocols
Address Resolution Protocol
ARP: Address Resolution Protocol
Address Resolution Protocol (ARP)
Chapter 7 ARP and RARP Prof. Choong Seon HONG.
1 ADDRESS RESOLUTION PROTOCOL (ARP) & REVERSE ADDRESS RESOLUTION PROTOCOL ( RARP) K. PALANIVEL Systems Analyst, Computer Centre Pondicherry University,
ARP: Address Resolution Protocol
Ch 17 - Binding Protocol Addresses
Data-Link Layer The Internet is a combination of networks glued together by connecting devices (routers or switches) If a packet is to travel from a host.
Chapter 5: Link Layer 5.1 Introduction and services
Presentation transcript:

Promiscuous node detection using ARP packets Daiji Sanai <hyler@securityfriday.com> SecurityFriday.com

README.TXT Promiscuous Mode My speech English 2

Agenda Hardware filter Address Resolution Protocol Software filter Promiscuous detection Exception 3

Hardware filter Unicast (to host) Broadcast Multicast All multicast Promiscuous 4

Unicast (to host) The packet to the HW address of the device is passed. Pass Reject NIC 00:11:22:33:44:55 To 00:11:22:33:44:01 To 00:11:22:33:44:55 5

Broadcast Packet to broadcast (FF:FF:FF:FF:FF:FF) is passed Pass NIC 00:11:22:33:44:55 To FF:FF:FF:FF:FF:FF 6

Multicast The address registered in the multicast list is passed. Pass 01:00:5e:00:00:01 01:00:5e:00:00:03 Reject NIC 00:11:22:33:44:55 To 01:00:5e:00:00:02 To 01:00:5e:00:00:01 7

It is the packet where the group bit is set to multicast. All multicast The multicast packet of all groups passes. What is the multicast packet? It is the packet where the group bit is set to multicast. 8

All multicast (2) The packet which sets the group bit is passed HW Address: 01:02:03:04:05:06 0000 0001 | 0000 0010 | 0000 0011 |........ group bit 9

All multicast (3) The packet which sets the group bit is passed Pass Reject NIC 00:11:22:33:44:55 To 02:00:00:00:00:01 To 01:00:00:00:00:01 10

Promiscuous All packets are passed. Pass NIC 00:11:22:33:44:55 To xx:xx:xx:xx:xx:xx 11

Default HW filter Unicast Broadcast Multicast HW Address (ex. 00:11:22:33:44:55) Broadcast FF:FF:FF:FF:FF:FF Multicast Multicast address 1 01:00:5E:00:00:01 12

ARP Address Resolution Protocol Protocol to search for HW address which corresponds to IP address 13

ARP (2) Requested IP address is set in the ARP packet. The packet is sent to the broadcast address. The requested node replies with its’ HW address. 14

Packet format of ARP ARP packet (request) 6bytes: Ethernet address of destination FF FF FF FF FF FF 6bytes: Ethernet address of sender 00 11 22 33 44 55 2bytes: Protocol type (ARP=0806) 08 06 2bytes: Hardware address space (ethernet=01) 00 01 2bytes: Protocol address space (IPv4=0800) 08 00 1byte: byte length of hardware address 06 1byte: byte length of protocol address 04 2bytes: opcode (arp request=01 ,arp reply=02) 00 01 6bytes: Hardware address of sender of this packet 00 11 22 33 44 55 4bytes: Protocol address of sender of this packet My IP 6bytes: Hardware address of target of this packet 00 00 00 00 00 00 4bytes: Protocol address of target Target IP 15

Test 1 Does not set the broadcast address in the HW Address of the ARP Packet. IP:192.168.1.10 IP:192.168.1.10 NIC(promisc) No Reply NIC(normal) To 00:00:00:00:00:01 Arp request(192.168.1.10) To 00:00:00:00:00:01 Arp request(192.168.1.10) 16

Consideration of test 1 Why is there no reply ? What kind of filter ? Something is set in the software filter. What kind of filter ? Multicast? Broadcast? 17

linux/arp.c (1) 18 if (in_dev == NULL || arp->ar_hln != dev->addr_len || //check hw addr length dev->flags & IFF_NOARP || //no arp skb->pkt_type == PACKET_OTHERHOST || //otherhost packet skb->pkt_type == PACKET_LOOPBACK || //loopback packet arp->ar_pln != 4) //ipv4 goto out; switch (dev_type) { default: if (arp->ar_pro != __constant_htons(ETH_P_IP)) //ip protocol 0800 if (htons(dev_type) != arp->ar_hrd) //check hw device break; 18

linux/arp.c (2) Check IP Address if (arp->ar_op != __constant_htons(ARPOP_REPLY) && //arp request or reply arp->ar_op != __constant_htons(ARPOP_REQUEST)) goto out; /* * Check for bad requests for 127.x.x.x and requests for multicast * addresses. If this is one such, delete it. */ if (LOOPBACK(tip) || MULTICAST(tip)) //loopback or multicast Check IP Address 19

linux/arp.c (3) filter of ARP module ARP message is correct. A packet is not OTHERHOST. A packet is not LOOPBACK. Request IP Address is not loopback. Request IP Address is not multicast. ARP responds if the HW address of the packet is TO_US, BROADCAST, or MULTICAST. 20

Classification of packet In the software What is a TO_US packet ? What is a MULTICAST packet? What is a BROADCAST packet? 21

linux/eth.c (1) 22 if(*eth->h_dest&1) { if(memcmp(eth->h_dest,dev->broadcast, ETH_ALEN)==0) skb->pkt_type=PACKET_BROADCAST; else skb->pkt_type=PACKET_MULTICAST; } /* * This ALLMULTI check should be redundant by 1.4 * so don't forget to remove it. * * Seems, you forgot to remove it. All silly devices * seems to set IFF_PROMISC. */ else if(1 /*dev->flags&IFF_PROMISC*/) if(memcmp(eth->h_dest,dev->dev_addr, ETH_ALEN)) skb->pkt_type=PACKET_OTHERHOST; 22

linux/eth.c (2) yes no yes yes no no ARP Response otherhost to us group bit = 1 ? yes no h_addr = dev_addr ? yes h_addr = broadcast ? yes no no ARP Response otherhost to us multicast broadcast 23

for Linux - - - - P P P P P P P P gr bit normal mode promiscuous mode hw filter sw filter res. to_us off other host broadcast on multicast (in the list) multicast (not in the list) group → P → P reject - → reject - → P → P → P → P reject - → P reject - → P 24

However, there is something in the filter. SW filter of Windows I do not know. I have not seen the source code. However, there is something in the filter. Test 2 25

Test 2 A special HW address is set and tested. OS FF:FF:FF:FF:FF:FF Broadcast FF:FF:FF:FF:FF:FE Fake broadcast (31bits) FF:FF:00:00:00:00 Fake broadcast (word) FF:00:00:00:00:00 Fake broadcast (byte) 01:00:5E:00:00:00 Multicast address 0 01:00:5E:00:00:01 Multicast address 1 01:00:00:00:00:00 Group bit OS Windows9x/2000,Linux 26

Result 2 HW Address P - P - P - P - P - P Windows9x/ME Windows2k/NT4 Linux2.2/2.4 normal promisc FF:FF:FF:FF:FF:FF FF:FF:FF:FF:FF:FE FF:FF:00:00:00:00 FF:00:00:00:00:00 01:00:00:00:00:00 01:00:5E:00:00:00 01:00:5E:00:00:01 P - P - P - P - P - P 27

Exception 1 Old NIC does not support the multicast list. EtherLink III etc. A multicast list isn't supported. Default is all multicast. The packet which sets the group bit is passed 28

Exception 2 Linux+3c905 (Dell on board is the same.) is always all multicast The installer automatically sets it to the older driver 3c59x.o (in which ,multicast list isn't supported.). When the newer driver ,3c90x.o, is set it is correct. 29

Exception 3 Windows2000 dynamically loaded driver WinPcap2.1 and SMS(Systems Management Server) normally responds to FF:FF:00:00:00:00. responds to FF:FF:FF:FF:FF:FE in promiscuous 30

Demonstration my pc Windows 2000 Ethernet (172.18.21.*) Windows 2000 RedHat7.0 malicious user 1 malicious user 2 31

Test tool You can download the test tool from our site. PromiScan http://www.securityfriday.com/ # Please report your test results to us. # 32

Contact Information Daiji Sanai hyler@securityfriday.com SecurityFriday http://www.securityfriday.com/ 33

Thank you 34