Ad HOC UNIT IV
Ad HOC UNIT IV
A security protocol for ad hoc wireless networks should satisfy the following requirements.
• Confidentiality
• Integrity
• Availability
• Non-repudiation
Confidentiality:
             •   The data sent by the sender (source node) must be understandable only to the
                 intended receiver (destination node).
             •   If there is any intruder, it must not be able to derive any useful information out
                 of the data.
Integrity:
             •   The data sent by the source node should reach the destination node without
                 alteration
             •   Any other node in the network should not interfere with the data during
                 transmission.
Availability:
• Able to tolerate link failures and also be capable of surviving various attacks
Non-repudiation:
             •   The sender and the receiver of a message cannot later deny the message
           •   Digital signatures are used as unique identifiers for each user
o Physical vulnerability
• The radio channel used for communication in adhoc wireless networks is broadcast in
nature & is shared by all nodes within its direct transmission range.
• Data transmitted by a node is received by all nodes within its direct transmission range.
• So a intruder node could easily obtain data being transmitted in the network.
• The operating environments of ad hoc wireless networks are not always be secure.
• In battlefield applications, nodes may move in and out of hostile and insecure enemy
territory
• So a node can join or leave the network at any point of the time
• There is no proper authentication mechanism used for associating nodes with a network
• Hence an intruder would be able to join into the network quite easily and carry out their
attacks.
Physical vulnerability:
• Compact nodes and hand-held in nature.
• They could get damaged easily and are also in danger to theft.
Wormhole attack:
      In this attack, an attacker receives packets at one location in the network and tunnels
       them to another location in the Network
      Due to the broadcast nature of the radio channel, the attacker can create a wormhole
       even for packets not addressed to itself.
       Though no harm is done if the wormhole is used properly for efficient relaying of
       packets, it puts the attacker in a powerful position compared to other nodes in the
       network
Effects:
      Due to wormhole attacks, most of the existing routing protocols for ad hoc wireless
       networks may fail to find valid routes.
Blackhole attack:
      In this attack, a malicious node falsely advertises good paths (e.g., shortest path or
       most stable path) to the destination node
       This happens during the path-finding process (in on-demand routing protocols) or in
       the route update messages (in table-driven routing protocols).
Effects:
 Interrupt all data packets being sent to the destination node concerned.
For Example:
o Network topology
      In this attack, a malicious node tries to consume/waste away resources of other nodes
       present in the network.
o Battery power
o Bandwidth
o Computational power
      The attacks could be in the form of unnecessary requests for routes, very frequent
       generation of beacon packets, or forwarding of stale(old) packets to nodes.
      The battery power of another node is used by keeping that node always busy by
       continuously pumping packets to that node
Routing attacks:
The various attacks on the routing protocol are
       o Routing table overflow
       o Routing table poisoning
       o Packet replication
       o Route cache poisoning
       o Rushing attack
Packet replication:
    In this attack, an adversary node replicates stale packets.
    This consumes additional bandwidth and battery power resources available to the
      nodes
    This also causes unnecessary confusion in the routing process.
      In the case of on-demand routing protocols (AODV protocol ),each node maintains a
       route cache
      This cache holds information regarding routes that have become known to the node in
       the recent past.
      An adversary can also alter the route cache.
Rushing attack:
    For example, Consider source node is sending RouteRequestpacket to all the
      neighboring nodes in the network.
    An adversary node which receives a RouteRequestpacket from the source node floods
      the packet quickly throughout the network
    If the neighboring nodes receives the RouteRequestpacket at first from the adversary
      Nodes, then it discard the original RouteRequestpacket from source node as duplicate
      packet.
    Any route discovered by the source node would contain the adversary node as one of
      the intermediate nodes.
    Hence, the source node would not be able to find secure routes .It is extremely
      difficult to detect such attacks in ad hoc wireless networks.
       Session hijacking:
      This attack is specific to the transport layer in the network protocol stack
 The most authentication processes are carried out only at the start of a session
      Once the session between two nodes gets established, the adversary node tricks as one
       of the end nodes of the session and hijacks the session.
Flooding
      Sometime, the malicious node can cause immense traffic of useless messages on the
       network. This is known as the flooding. Sometimes, malicious nodes replay some
       actual broadcast messages, and hence generating useless traffic on the network. This
       can cause congestion, and may eventually lead to the exhaustion of complete nodes.
       This is a form of Denial of Service attack.
Repudiation:
 This flaw is associated with the application layer in the network protocol stack.
OTHER ATTACKS:
   These security attacks cannot strictly be associated with any specific layer in the
    network protocol stack.
    Multi-layer Attacks
    • Multi-layer attacks are those that could occur in any layer of the network protocol
    stack.
    Device Tampering
    • Ad hoc wireless networks are usually compact, soft, and hand- held in nature.
    • They could get damaged or stolen easily.
    Some of the multi-layer attacks in ad hoc wireless networks are
    1. Denial of Service:
    – Jamming:
    – SYN flooding
    – Distributed DoS attack
2. Impersonation
       1.Denial of Service:
      In this type of attack, an adversary attempts to prevent legitimate and
       authorized users to access the network services.
    A denial of service (DoS) attack can be carried out in many ways.
Attack I:
    The classic way is to flood packets to any centralized resource (e.g.,an access
       point) used in the network so that the resource is no longer available to nodes
       in the network
    This results in the network no longer operating in the regular manner
    This may lead to a failure in the delivery of guaranteed services to the end
       users.
Attack II:
    On the physical and MAC layers, an adversary could employ jamming signals
       which disrupt the on-going transmissions on the wireless channel.
Attack III:
    On the higher layers, an adversary could bring down critical services such as
       the key management service
    Some of the DoS attacks are described below.
Denial of Service:
       – Jamming:
       – SYN flooding
       – Distributed DoS attack
SYN flooding:
   The adversary node sends a large number of SYN packets to a victim node
   This adversary node give fake return addresses in the SYN packets.
   On receiving the SYN packets, the victim node sends back acknowledgment
      (SYN-ACK) packets to that address.
   However, the victim node would not receive any ACK packet in return.
   In effect, a half-open connection gets created.
   The victim node builds up a table/data structure for holding information
      regarding all pending connections.
   The increasing number of half-open connections results in an overflow in the
      table.
   Because of the table overflow, the victim node would be forced to reject the
      call request from a legitimate node
Types of Jammers
   A jammer may jams a network in various ways to make the jamming as effective as
      possible. Basically, a jammer can be either Proactive and Reactive.
      Proactive jammer
       Proactive jammer transmits jamming (interfering) signals whether or not there is data
       communication in a network. It sends packets or random bits on the channel it is
       operating on, putting all the others nodes on that channel in non-operating modes.
       However, it does not switch channels and operates on only one channel until its
       energy is exhausted.
       There are three basic types of proactive jammers:
              (i)Constant
              (ii)Deceptive
              (ii)Random
Constant jammer, emits continuous, random bits without following the CSMA protocol. A
constant jammer prevents legitimate nodes from communicating with each other by causing
the wireless media to be constantly busy. This type of attack is energy inefficient and easy to
detect but is very easy to launch and can damage network communications.
Deceptive jammer, sends a constant stream of bytes into the network to make it look like
legitimate traffic.
Random jammer, intermittently transmits either random bits or regular packets into
networks. It continuously switches between two states: sleep phase and jamming phase. It
sleeps for a certain time of period and then becomes active for jamming before returning back
to a sleep state.
Reactive Jammer
Reactive jammer starts jamming only when it observes a network activity occurs on a certain
channel. As a result, a reactive jammer targets on compromising the reception of a message.
It can disrupt both small and large sized packets.
Since it has to constantly monitor the network, reactive jammer is less energy efficient than
random jammer. However, it is much more difficult to detect a reactive jammer than a
proactive jammer because the Packet Delivery Ratio (PDR) cannot be determined accurately
in practice.
In proactive jamming, the jammer chokes the bandwidth so that a transmitter is unable to
transmit. Therefore, carrier-sensing thresholds can be used to detect such type of jammers.
When jamming is detected, nodes in the network can map the jammed area and re-route
traffic, switch channel, or perform spatial retreat to counteract this jamming act.
By looking at the RSS of each bit during the reception, it identifies the cause of bit errors for
individual packet using predetermined knowledge, error correcting codes (ECC), or wired
node chain systems. If the error is due to weak signal, the RSS should be low.
If the RSS value is high for a bit error, there are external interference or jamming. Assuming
nodes can assess the expected local interference, the sequential jamming probability test
calculates the marginal likelihood of errors due to 10 unintentional collisions. If this value is
less than the log of the ratio of targeted probability for a missed alarm to the targeted
probability, then there is jamming and an alarm is raised.
If the marginal likelihood is less than the ratio, there is no jamming and the sequence is reset.
There is also a possibility that no conclusion is made until there are more conclusive
evidences for jamming.
A few techniques exist nowadays that prevent attackers from accessing the wireless medium
This technique uses either analog schemes where the frequency variation is continuous, or
By this way, attackers cannot easily locate the communication channel, and are thus
restrained from attacking. The spread spectrum communications are not yet feasible for
WSNs that are usually constrained in resources. Directional antenna is another technique for
access restriction. By confining the directions of the signal propagation, it reduces the
chances of adversaries accessing the communication channel.
Encryption
In general, cryptography is the all-purpose solution to achieve security goals in WSNs. To
protect data confidentiality, cryptography is indispensable.
Cryptography can be applied to the data stored on sensors. Once data are encrypted, even if
the sensors are captured, it is difficult for the adversaries to obtain useful information. A
more costly encryption can yield higher strength, but it also drains the limited precious
energy faster and needs more memory. More often, cryptography is applied to the data in
transmission.
There are basically two categories of cryptographic mechanisms: asymmetric and symmetric.
In asymmetric mechanisms (e.g. RSA), the keys used for encryption and decryption are
different, allowing for easier key distribution. It usually requires a third trusted party called
Certificate Authority (CA) to distribute and check certificates so that the identity of the users
using a certain key can be verified. However, due to the lack of a priori trust relationship and
infrastructure support, it is infeasible to have CAs in WSNs.
Furthermore, asymmetric cryptography usually consumes more resources such as
computation and memory.
In comparison, symmetric mechanisms are more economical in terms of resource
consumption. As long as two nodes share a key, they can use this key to encrypt and decrypt
During data transmission the source node sends a Route REQuest (RREQ) message to all the
nodes including malicious node. Given that a malicious node may become active by receiving
RREQ message and replies using Route REPly (RREP) message.
It attracts additional traffic by falsely claiming the shortest route to the destination. This
causes blocking and increasing the energy consumption in each node, leading to the
formation of routing holes which disturb or stop the network functionality.
Effects:
 Interrupt all data packets being sent to the destination node concerned.
For Example:
          o Node A needs to transmit
            packets to the node E.
Countermeasures
Multi-path routing is one of the methods to reduce the effectiveness of attacks launched by
attackers on routing paths. In these schemes, packets are routed through multiple paths. Even
if the attacker on one of the paths breaks down the path, the routing is not necessarily broken
as other paths still exist.
This alleviates the impact of routing attacks, although does not prevent these attacks. A
general way is to use authentication methods. With authentication, it can be easily determined
whether a sensor can participate in routing or not.
For example, an adversary advertising a very high-quality route to the base station to every
node in the network could cause a large number of nodes to attempt to use this route, but
those nodes sufficiently far away from the adversary would be sending packets into oblivion.
The network is left in a state of confusion.
Sensor node can forward its sensed data to multiple routes by using these secrets. There are
multiple base stations in the network that have control over specific number of nodes and
also, there are common means of communication among base stations.
 Each base station has all the secrets that are shared by all the sensor nodes, covered by it,
according to the key assignment protocol.
The mobile nodes use a threshold value to check whether its neighbors are intruders or not.
When the number of route request packets broadcasted by a node exceeds the predefined
threshold value, it
KEY MANAGEMENT:
Cryptography:
           o Cryptography is one of the most common and reliable means to overcome the
             attacks and to ensure security.
   o It is not specific to ad hoc wireless networks.
   o Hence no unauthorized person can read, but which can be recovered in its
     original form by an intended recipient.
algorithms or functions.
Step I:
The table mapping ie the original and the substituted alphabet should be available at
both the sender and receiver.
Step II:
The text is broken into fixed blocks. The block length used is five
Step III:
Each alphabet of the plaintext is substituted by another in the Ciphertext
Using Stream ciphers
      A stream cipher has block length of one.• Eg:Vernam cipher, which uses a key
        of the same length as the plaintext for encryption.
      The key is randomly chosen and transported securely to the receiver and used
        for only one communication
      This forms the one-time pad which has proven to be the most secure of all
        cryptographic systems.
      The only bottleneck here is to be able to securely send the key to the receiver.
• The plaintext is again recovered by XORing the ciphertext with the same key.
Asymmetric Key Algorithms
      Asymmetric key (or public key) algorithms use different keys at the sender
       and receiver ends for encryption and decryption
      Let the encryption process be represented by a function E, and decryption by
       D.
      The key E is made public, while D is private, known only to the intended
       receiver
      Then the plaintext m is transformed into the ciphertext c as c = E(m).
      The receiver then decodes c by applying D.
      Hence, D is such that m = D(c) = D(E(m)).
      Anyone who wishes to send a message to this receiver encrypts it using E.
      Though c can be overheard by adversaries, the function E is based on a
       computationally difficult mathematical problem, such as the factorization of
       large prime numbers.
      Hence,it is not possible for adversaries to derive D given E.
      Only the receiver can decrypt c using the private key D.Example of public key
       cryptography. RSA system-based on the integer factorization problem.
Key Predistribution:
Function of Key predistribution:
    To distribute the keys to all interested parties before the start of
      communication.
    All participants must be known a priori, during the initial configuration.
    There is no mechanism to include new members in the group or to change the
      key.
    Sub-groups may be formed and it is also an a priori decision with no flexibility
      during the operation.
Advantages:
    This method involves much less communication and computation.
Key Transport:
      The communicating entity generates keys and transports them to the other
       members.
      The key is shared among the participating members.
      This prior shared key is used to encrypt a new key and is transmitted to all
       corresponding nodes.
      Only those nodes which have the prior shared key can decrypt it.
      This is called the key encrypting key (KEK) method.
      In public key infrastructure (PKI), the key can be encrypted with each
       recipient’s(alice) public key and transported to it.
      While decrypting ,recipient should use their private key to get the message
       This assumes the existence of a TTP, which may not be available for ad hoc
       wireless networks
      Key transport without prior shared keys is the Shamir's three-pass protocol .
      The scheme is based on a special type of encryption called commutative
       encryption schemes which are reversible and composable.
      Consider two nodes Alice and Bob wish to communicate.
      Node Alice selects a Key m which it wants to use in its communication with
       node Bob.
      It then generates another random key EA, using which it encrypts m to get
       EA(m) , and sends to node Bob.
      Node Bob encrypts this with a random key EB, and sends it back to node
       Alice EB(EA(m)).
      Now, node Alice decrypts this message with its key and get EB(m)
      Finally, node BOB decrypts to get Key m.
Key Agreement:
   
       Key Management in Ad Hoc Wireless Networks:
       Ad hoc wireless networks pose certain specific challenges in key management due to
       the lack of infrastructure.
Three types of infrastructure are missing in ad hoc wireless networks. They are
       The fundamental requisites of a secure routing protocol for adhoc wireless networks
       are listed as follows:
Security protocols for sensor networks (SPINS) consists of a suite of security protocols
that are optimized for highly resource-constrained sensor networks.
           Replay protection: The counter value in the MAC prevents replaying old
            messages. Note that if the counter were not present in the MAC, an adversary
            could easily replay messages.
Authentication, Confidentiality
The two communicating parties A and B share a master secret key XAB, and they derive
independent keys using the pseudorandom function F: encryption keys KAB = FX (1) and
KBA = FX (3) for each direction of communication, and MAC keys K’AB = FX (2) and
K’BA = FX (4) for each direction of communication.
The encrypted data has the following format: E = {M} (K, C), where M is the data, the
encryption key is K, and the counter is C. The MAC is M = MAC (K’, C||E). The complete
message that A sends to B is
A → B: {M} (KAB, CA), MAC ( K’AB CA || {M} (KAB,CA)
The receiving node stores the packet in a buffer. At the time of key disclosure, the base
station broadcasts the verification key to all receivers. When a node receives the disclosed
key, it can easily verify the correctness of the key. If the key is correct, the node can now use
it to authenticate the packet stored in its buffer
 Key Setup
 The MAC keys are derived from a chain of keys,obtained by applying a one-way
function F (a one-way function is one whose inverse is not easily computable). All nodes
have an initial key K0 , which is some key in the key-chain. The relationship between keys
proceeds as K0 = F(K1 ), K1 = F(K2 ), and, in general, Ki = F(Ki+ 1 ). Given K0 , K1 , ..., Ki
, it is not possible to compute Ki+ 1 .
For example, Figure shows an example of μTESLA. Each key of the key chain
corresponds to a time interval and all packets sent within one time interval are authenticated
with the same key. The time until keys of a particular interval are disclosed is 2 time intervals
in this example.
                                                                             
                                       Figure Key setup
       The key to be used changes periodically, and since nodes are synchronized to a
common time within a bounded error, they can detect which key is to be used to
encrypt/decrypt a packet at any time instant. The BS periodically discloses the next
verification key to all the nodes and this period is known to all nodes. When the BS transmits
a packet, it uses a MAC key which is still secret (not yet disclosed). The nodes which receive
this packet buffer it until the appropriate verification key is disclosed. The packets are
decrypted once the key-disclosure packet is received from the BS. If one of the key-
disclosure packets is missed, the data packets are buffered till the next time interval, and then
authenticated.
Assume that the receiver node is loosely time synchronized and knows K0 (a
commitment to the key chain) in an authenticated way. Packets P1 and P2 sent in interval 1
contain a MAC with key K1. Packet P3 has a MAC using key K2. So far, the receiver cannot
authenticate any packets yet. Let us assume that packets P4, P5, and P6 are all lost, as well as
the packet that discloses key K1, so the receiver can still not authenticate P1, P2, or P3. In
interval 4 the base station broadcasts key K2, which the node authenticates by verifying K0 =
F (F (K2)), and hence knows also K1 = F (K2), so it can authenticate packets P1, P2 with K1,
and P3 with K2.
In the single packet delivery problem, a single packet must be reliably transported
between two nodes.
In the block delivery problem, a finite data block comprising multiple packets must be
delivered to a sensor or a set of sensors.
In the stream delivery problem, a theoretically unbounded number of packets has to be
transported between two nodes.
 Sink-to-sensors versus sensors-to-sink versus local sensor-to-sensor
It can be assumed that most communications in sensor networks are not between
arbitrary peer nodes, but information flows either from sensor nodes towards a single or a few
sink/gateway nodes or in critical environments such as military applications, it is necessary
that the sink is able to transmit the data to the sensors in the least possible time.
In the case of sensor to sensor communications, the sensors monitor a region and
transmit the collected data packets through routes (intermediate sensor nodes) to the sinks.
Guaranteed versus stochastic delivery
In the case of guaranteed delivery, it is expected that all transmitted packets reach the
destination; anything else is considered a failure. In general, guaranteed delivery is
challenging and costly in terms of energy and bandwidth expenditure, specifically over links
with sometimes high error rates like wireless ones.
The concept of stochastic delivery guarantees allows a limited amount of losses. There
are several ways to specify stochastic guarantees. For example, one might specify that for
periodic data delivery within every k subsequent packets at least m packets must reach the
destination; any number below m is considered a failure.