















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















Table of Contents
Table of Contents ---------------------------------------------------------------------------------- I List of Tables --------------------------------------------------------------------------------------- II List of Figures ------------------------------------------------------------------------------------ III Abstract ---------------------------------------------------------------------------------------------IV
Table 2-1 Normal mode vs. Promiscuous mode packet filtering of Linux ------------------ 4 Table 2-2 Normal vs. Promiscuous mode software based packet filtering of Windows and Linux --------------------------------------------------------------------------------------------------- 8 Table 3-1 ARP packet structure ------------------------------------------------------------------- 11
This is a progress report contains information about the sniffing activity detection in Ethernet networks in accordance to the continuation of work on the Final Project “Sniffer Buster” by Adeel Iqbal. Sniffers are common and freely available tools that are used to steal data from the network so there is need of protection against them. To detect the sniffing activity in a network anti sniffing techniques are used, that are used by anti sniffing tools. In this document anti sniffing techniques are described that can be and are used to detect sniffing activity in an Ethernet environment.
The project time line is shown in the table below.
Sniffers are now common tools to steal data from the network so there is a need to stop this kind of activity that harms the individuals as well as organizations. Anti sniffing is an activity to detect or prevent the sniffing activity in a network. Sniffing is done by using softwares that are called Sniffers. Sniffers are freely available and uses different kind of techniques i.e. IP based sniffing, MAC based etc. Sniffers, Sniffing techniques and etc are described in detail in midterm progress report that was submitted previously. Detection of sniffers or sniffing activity is not an easy task as they does not generate any false traffic that can be used to identify them instead they steal/capture all the traffic of the network. Though there are techniques that are (can be) used to detect sniffing activities. To detect a sniffer we have to detect the promiscuous mode of the NIC because for the sniffing activity to happen, first the network card should be in promiscuous mode which is the fundamental rule of sniffing. Promiscuous and Normal mode are two basic modes of NIC filtering of network packets. In the upcoming chapter various NIC filters are described that are used to filter the traffic. NIC filters include Hardware and Software filters that work together to get the intended data.
To understand the basics promiscuous mode detection we have to first analyze how processing of packets is done by Network Interface Card filters according to address of the packets? This question is answered below.
There are two basic kinds of NIC filters that are used in an Ethernet environment; Hardware filters Software filters Hardware filters basically correspond to the NIC of the machine/computer whereas software filter are above the hardware layer and work with the OS of the system.
We start with understanding the difference between Network Interface Card’s Normal and Promiscuous mode filtering. All the NIC’s contains 6 byte hardware address, assigned by the manufacturer of the card, which is used to communicate with each other. Theoretically hardware address of every NIC is unique and no two NIC have same hardware address. Though the only mean to communicate is hardware address of the NIC however NIC can be setup through different filters to get different kind of packets. Following is the list of hardware filters:
2.1.1.1 Unicast This filter only receives packets that contain the destination address as that of the NIC. 2.1.1.2 Multicast Receive all the packets that are sent to some specific set/group of machine present in the network. Only the packets from hardware multicast address present in the multicast list will receive the message.
OTHERHOST packets: Packets that contains the destination address other than the NIC of the computer. Now by looking into the ARP module of the Linux it can be seen that it first rejects all the TO_OTHERHOST packets then it processes the Broadcast, Multicast and TO_US packets respectively. The table given below shows the hardware and software filter’s responses against different kinds of packets.
Table 2-1 Normal mode vs. Promiscuous mode packet filtering of Linux
TO_US packets TO_US packets pass through the software and the hardware filter irrespective of whether it is Normal mode or Promiscuous mode. So the ARP module responds regardless of mode. OTHERHOST packets In Normal mode of operation the hardware filter of the NIC rejects these packets. In promiscuous mode OTHERHOST packets pass through the hardware filter but are rejected by the software filter. So in any case, Normal or Promiscuous mode, these packets are rejected. Broadcast packets Broadcast packets pass through both of the filters irrespective of the mode, whether Normal or Promiscuous.
Multicast packets In Normal mode the packets that contains the Multicast address that is not present in the multicast table are rejected. But in case of Promiscuous mode of operation these packets pass through the hardware as well as software filter even if it is not present in the list. Software filter gets them pass because of the fact that it doesn’t block the multicast packets when the group bit is on, regardless of the false address. Because of that these kinds of packets can be used for the detection of promiscuous mode. 2.1.2.2 Microsoft Windows As Microsoft Windows is closed source so different kind of experiments are performed that are discussed in reference [2] and [4] to check the response of the software filter. The list with the description of the hardware addresses that are used to guess the response of software filter are here under.
Broadcast address FF:FF:FF:FF:FF:FF (Br) This is a broadcast address, so every node present in the network should receive this and give response to it. ARP request packets use broad cast address.
Fake broadcast address FF:FF:FF:FF:FF:FE (B47) This is a fake broadcast address missing the last 1 bit. Why this is used? The reason is to check whether the software filter examines all bits of the address or not or whether it will respond or not.
Fake broadcast 16 bits FF:FF:00:00:00:00 (B16) This address is also a fake broadcast address in which only the first 16 bits are the same as the broadcast address other are set zero. This is to check whether the software filter examines all bits of the address or not or whether it will respond or not. This may be classified as a broadcast address and replied when the filter function only checks the first word of the broadcast address.
Fake broadcast 8 bits FF:00:00:00:00:00 (B8)
always comes after the hardware filter, from which for the addresses multicast, if an address was rejected by the hardware filter she is therefore rejected by the software filter.
Multicast address 3 01:00:5E:00:00:03 (M3) Multicast address 3 is not assigned. So we use this as an example of a multicast address not registered in the multicast list of the NIC. The hardware filter should reject this packet and also is not accepted by the software filter. The system kernel check the hardware result and one notices while the software filter always comes after the hardware filter, from which for the addresses multicast, if an address was rejected by the hardware filter she is therefore rejected by the software filter.
Normal mode result Above mentioned seven addresses are used to experience the different response of the different operating systems. Different operating system that are subjected to these tests include Micrsoft Windows 95, 98, ME, 2000, XP and Linux. In NIC’s normal mode the results were as expected. All kernels respond to the broadcast and multicast 1 address and rejected others. The results are listed in Table 2-2.
Promiscuous mode results When the network card set into promiscuous mode, the results are OS dependant. Windows 95, 98 and ME respond to fake broad cast 47 bit, 16 bit and 8 bit. So it is predicted that these operating systems only check first byte of the broadcast address, so to detect the promiscuous mode of Windows 95, 98 and ME fake broad cast 47 bit, 16 bit and 8 bit addresses can be used. These mentioned operating systems never respond to 4 bit fake broadcast address so only the above mentioned addresses can be used for the detection of promiscuous mode.
In case of Windows 2000 and ME both these operating system respond to fake broad cast addresses 16 bit and 47 bit. But these operating systems also respond to fake broadcast 16 in normal mode so only fake broadcast 47bit can be used for the detection of promiscuous mode for the system running these operating systems.
Windows XP respond to fake broad cast address 16 bit and 47 bit. It means that Windows XP’s address filter only checks first two bytes of the broadcast address, so both of these addresses can be used to detect the promiscuous mode of the machine running operating system Windows XP.
In case of Linux, it gives response to all the experimental addresses i.e. all seven addresses, so all the above mentioned addresses can be used to detect promiscuous mode of machines running Linux as operating system, except multicast address 1 which get response in normal mode also.
Table 2-2 Normal vs. Promiscuous mode software based packet filtering of Windows and Linux
3.2 Remote sniffer and promiscuous mode detection
The techniques used to detect the sniffers and promiscuous modes of the other systems present in the network are categorized as remote sniffer and promiscuous mode techniques. These techniques include, ARP based detection technique MAC based detection technique DNS based detection technique Network and machine latency techniques Decoy method based on FTP, Telnet and POP
This technique, as from his name it is clear, uses ARP packets to detect the promiscuous mode and sniffing activity in the network. This technique basically works by checking whether the target system responds to the ARP packet or not which are not meant to be treated under normal communication. Under the results of the experiments described in the previous section it is clear that ARP packets can be used to detect the promiscuous nodes present in the network whether running Windows or Linux. All we have to do is to create and send an ARP packet that is only meant to be treated and respond by suspicious host. Considering and analyzing the results of the previous described experiments we have to create an ARP request packet that will be treated by the suspicious hosts. According to the results we can use fake 47 bit or fake 16 bit address to check that the target system is in promiscuous mode as packet containing fake 47 bit or fake 16 bit address as destination address are only treated if the network card is in promiscuous mode. Other hosts that are not in promiscuous mode will simply reject these packets. Now let us see how this technique works. Let suspected target system’s IP is known; now we have to construct a packet that can only pass the filter in promiscuous mode. So we use either fake broadcast 47 bit or 16 bit address as destination hardware address and known IP address for the construction of packet. The constructed packet will look like as given below.
Table 3-1 ARP packet structure
3.2.1.1 Packet description
1. Usually an ARP request packet contains broadcast address (FF FF FF FF FF FF) as the destination that is meant to be received by every host present in the host. But here we are using fake address (FF FF FF FF FF FE) so that only the system or machine that is in promiscuous mode will be able to receive this packet. 2. Ethernet address of the sender is the hardware address of the sender here 00 11 22 33 44 55 is used. 3. Field 3 contains protocol type we are using protocol type of ARP is 08 06. 4. Hardware address space for Ethernet is 01 that is in field 4. 5. Protocol address space for Internet Protocol or IP is 08 00. 6. Byte length of the hardware address is the length of hardware address in bytes as hardware address consists of 6 bytes so 06 is given in field 6. 7. Byte length of the Internet protocol IPv4 is 4 bytes. 8. Opcode is the operation code for ARP packets which is 1 if the packet is ARP request packet and 2 if the packet is ARP reply packet. As we are sending ARP request packet so its code is 01.
This technique takes into account the reason that many current sniffers are not truly passive in fact they generate traffic, this traffic however is not easily distinguishable from the normal traffic. So it turns out that these sniffers also do reverse DNS lookup, which is looking for host name from an IP address, using the sniffed traffic. As we have to detect the reverse DNS traffic coming from sniffer the trick is required to separate the sniffer’s traffic from the normal traffic. Therefore false traffic is generated using unused addresses on the network. This traffic is simply discarded by the machines running in normal mode only the machine running sniffer will get or grab this traffic and generate DNS traffic. As the false traffic is used so by analyzing the traffic of DNS lookup requests this traffic can be differentiated from the normal traffic and hence can be used to detect which machine or computer is running a sniffer. However this technique has a limitation that it has no effect if there is no traffic generated by the machines containing sniffer or in other words by sniffers. Modern hackers have realized and some of the sniffers do not generate any DNS lookup traffic, in this case this technique is completely useless.
These techniques are here because when the network card is in promiscuous mode the machines never do the lower level hardware filtering and all the traffic is directly sent to the kernel of the Operating System. Due to large amount of data more time is required to get and process the data coming from the wire to the system kernel directly for software filtering. This large processing or filtering introduces latencies in the response and processing. The techniques or tests included are RTT based detection technique. Ping drop technique.
3.2.4.1 RTT based Detection Technique RTT is Round Trip Time the time required for a packet to reach its destination plus the time required to get the response or acknowledgement packet by the sender of
the packet. As in promiscuous mode packets are sent directly to the software filter of the operating system without lower level hardware filtering, round trip time of a packet increases because of huge amount of data to be processed by the kernel of operating system. This technique uses the training data for the decision that whether a certain machine’s NIC is in promiscuous mode or not. This data is collected by first sending the packets to a host in normal mode and calculating the time consumed to get a response packet. Then the network card of that machine is put into promiscuous mode and time is calculated again by sending same packets. These measurements are then used to calculate the averages, standard deviations and percentages. These calculated averages, standard deviations and percentages are in fact called the training data. The collected data can be divided into two populations one for normal mode and the other for promiscuous mode. To show that the two averages of the sampled RTT measurements are statistically different enough and therefore represent two different populations (the normal mode and the promiscuous mode populations) the zstatistics model is used. This z-statistics model allows making a judgment about whether or not a host’s NIC is set to the promiscuous mode. To implement this technique first the suspicious host must be identified. This can be done by several available tools, such as Nmap. Then, a number of request packets should be sent to the suspicious host in order to collect the corresponding RTT measurements. So far, the suspicious host can be either in the normal mode or in the promiscuous mode. Two z-statistics are computed in order to get the difference. The first one, called the normal mode zstatistics, uses the training data related to the OS of the suspicious host for the normal mode, as the first population, and the collected data in the real world, as the second population. The second z-statistics, called the promiscuous mode z-statistics, uses the training data related to the OS of the suspicious host for the promiscuous mode, as the first population, and the collected data, as the second population. If the normal mode z- statistics is less than the z value then we may conclude that the host’s NIC is almost 99 percent set to the normal mode, else, the host’s NIC is set to the promiscuous mode. The figure below shows this decision making process.