MANET is a group of mobile hosts to form a network temporarily with wireless interface and without use, any aid of any fixed infrastructure .the presence of decentralization each node in a network act as both router as well as host for forwarding the data from one node to another node. Therefore the wireless mess networks face many security vulnerable attacks such as denial of service attack, imprecation, active route interfering. Gray hole and Block hole attack are one of the attacks in wireless networks [1, 2]. These attacks send the false route replay information to the sink node to find the route finding process. The Gray hole attack might take place because of the malicious nodes that are consciously misbehaving and has smashed the node interface. A black hole attack is an intentional malicious activity that sometimes drops all or some packets are dropped while forwarding to the destined node[3].to detect or remove these selfish nodes from the network assign the Armstrong number to each node as a node id in case of DSR routing.
1.1.DSR Routing Protocol:
DSR (Dynamic Source Routing) is an on-demand routing protocol of wireless networks. In DSR, the connection between the two nodes is established only when it is required [4, 5]. It contains two messages for communication they are route request and route replay.
Route Request Message (RREQ): For finding the path to reach the sink, the origin node start by broadcasting the RREQ message to all its neighbors [6]. The RREQ consists of the source address, a route confirmation field, destination host address and a unique identification number as shown in fig.1.
Rout Reply message (RREP)
In a network every node observing the hop status to its neighbour’s nodes during the route finding. Once the route is found in the target node, dispatch the RREP message to notify the other nodes in the hop list shown in fig. 2.
1.2.Black hole attack:
A black hole attack is a type of denial of service attack. In which the selfish node unicasts the incorrect RREP message to the origin node with the high sequence number for misguiding the source host might trust that is the ultimate destination for better performance of a network [7, 8]. Origin node S wants to send the data to the sink node D As shown in fig .3.here the node S broadcast the RREQ packet to all its neighbours. Now all the neighbour nodes after receiving the RREQ packet first check its routing table entries. If they found the shortest path to the sink node then they send the RREP message to the origin node. However, here the selfish node without checking any routing table entries for saving the battery to dispatch its RREP message to the origin node S with B is a sink node. After received the selfish node RREP message source node start to send the data malicious node M then the malicious node continuously dropping the data packets and interrupts the control messages that may lead to the critical security issue in the network.
The Gray hole attack might take place because of the malicious nodes that are consciously misbehaving and has smashed the node interface. During the route finding process first, the malicious node act as a trusted node and then may change to the selfish node vice versa [8]. This selfish node may drop some or all packets. The identification of this attack is difficult to compare a black hole attack why because of the ability of the state to change nature. As shown in fig .4, the node 4 act as a selfish node and send the incorrect message to origin node during route finding process and it drops all the packets coming from a specific node to all nodes.