11. Security
11. Security
Roadmap
Security fundamentals
Security challenges
Security attacks
Security protocols and mechanisms
IEEE 802.15.4 and ZigBee security
Fundamentals
Security and privacy are big challenges for any type of computing and
networking environment
Well-known CIA security model:
Fundamentals
Confidentiality
ensure that only the intended receiver can read/interpret a message
unauthorized access is prevented
Integrity
ensure that a message cannot be modified
unauthorized individuals should not be able to destroy/alter message
Availability
ensure that system/network is able to perform its tasks without
interruption
often measured in terms of percentages of up/down time
Examples
Confidentiality:
eavesdropping: unauthorized message reception
Integrity:
man-in-the-middle attack: unauthorized individual/system positions itself
between sender and receiver to intercept, modify, and retransmit
messages
Availability:
denial-of-service attack: attempt to disrupt transmission or service
More Terminology
Authentication
process of establishing or confirming the identity of user/device
ensures that message came from who it claims to have come from
Nonrepudiation
process of proving that person/device has performed a certain
transaction/transmission
Digital signatures
often used to support authentication, nonrepudiation, and integrity
Process of protecting information using encoding/decoding techniques
Symmetric key cryptography
single key shared between communicating parties
simple example: shift cipher (key = fixed shift in alphabet)
challenge: secure distribution of shared key
examples: DES, AES, IDEA
Public key cryptography
secret key: will never be shared with anyone else
public key: can be shared freely
message encrypted with secret key can only be decrypted with corresponding
public key (e.g., for authenticating the sender)
message encrypted with public key can only be decrypted with corresponding
secret key (e.g., for providing confidentiality)
examples: RSA, Diffie-Hellman agreement protocol
Challenges of Security in WSNs
Resource constraints
limited computational, networking, and storage capabilities of sensors
energy constraints of sensors
Lack of central control
large WSNs often don’t have centralized control
requires distributed/decentralized security solutions
Remote location
sensors often left unattended
difficult to prevent unauthorized physical access and tampering
Error-prone communication
difficult to distinguish wireless communication errors from attacks
Security in WSNs
WSN characteristics that facilitate security:
self-managing and self-repairing nature
redundancy
Symmetric versus Public Key
Public key cryptography
used to provide confidentiality, integrity, and authentication
computationally expensive
some implementations for resource-constrained devices exist (ECC,
elliptic curve cryptography)
Symmetric key cryptography
more resource-efficient
problem of key distribution
Key Management
PIKE (contd.)
example: node (x,y) will share key K(x,y),(1,y) with node (1,y) and another
key K(x,y)(2,y) with node (2,y)
a node will maintain 2(√n-1) keys
Defenses Against DoS Attacks
Jamming attacks
isolate affected region by re-routing traffic
use spread-spectrum techniques
Collision and exhaustion attacks
error-correcting codes
rate-limiting schemes
Spoofing and alteration
message authentication codes (MAC)
Path-based DoS
attacker overwhelms nodes by flooding a multi-hop end-to-end
communication path with replayed or injected packets
one-way hash chains can be used to validate received packets
Defenses Against Aggregation Attacks
Delayed aggregation and delayed authentication
base station generates a one-way key chain using a public one-way
function F, where Ki=F(Ki+1)
each device stores key K0 before deployment (K0=Fn(K), i.e., F applied
to a secret key n times)
first base station transmissions are encrypted using K1=Fn-1(K)
once all messages transmitted using K1 have been received:
the base station reveals K1
all nodes compute F(K1)=F(Fn-1(K)) and verify that it matches
K0=Fn(K)
sensor nodes decrypt the messages
Defenses Against Aggregation Attacks
Example:
nodes A-D send messages to the base station, each node’s message
contains the sender’s ID, the sensor data, and a MAC calculated over
the data using a temporary key
parent node cannot yet verify the MAC since it doesn’t have the child’s
key
parent node stores this message and retransmits it to its own parent
after certain timeout value
E’s message to parent G contains messages received from its children
(nodes A and B) and a MAC computed over the aggregate of A’s and B’s
data using E’s key
this process continues, i.e., every parent combines data from its
children and adds its own MAC over the aggregate using its own key
once the base station receives messages from its children, it can
compute the final aggregate value
Defenses Against Aggregation Attacks
Example (contd.):
base station has shared temporary key with each sensor, therefore it
can verify whether a received message was transmitted by H by
calculating the MAC of the aggregation using KHi and comparing it to the
MAC in the message
this validates that H sent the final message, but it does not validate that
the message correctly reflects the readings from the other nodes
base station reveals the temporary keys to the network by sending each
key (along with a MAC) to all sensor nodes using its own current key Ki
base station sends out its current key Ki such that nodes can check the
MAC values and to advance to the next key in the chain
Defenses Against Aggregation Attacks
Defenses Against Routing Attacks
Attacks from “outside” versus “inside” the network
link-layer encryption and authentication can prevent adversary from joining a
network, preventing many possible routing attacks
these techniques may be ineffective if network is attacked from the inside (e.g.,
using a compromised node)
Sybil attacks
sensor nodes can share unique symmetric key with a trusted base station to
verify each other’s identity
base station can also limit the number of neighbors a node is allowed to have
(i.e., a compromised node can communicate with only a few other nodes)
Sinkhole attacks
difficult to defend against where protocols are used that establish routes based
on information that it difficult to verify (e.g., energy)
easier for routes based on minimum hop counts, but hop counts can be
misrepresented through a wormhole
with geographic routing, it is difficult to redirect traffic elsewhere to create a
sinkhole
Defenses Against Routing Attacks
Rushing attacks
secure neighbor detection approach can be used to allow sender and
receiver of a route request to verify that the other party is in fact within
normal transmission range
example of a three-round mutual authentication protocol:
sender sends a neighbor solicitation packet
receiver responds with neighbor reply packet
sender sends a neighbor verification message (which includes
broadcast authentication of a timestamp and the link from the source
to the destination)
Security Protocols for Sensor Networks
SPINS provides:
Secure Network Encryption Protocol (SNEP) for confidentiality, two-
party data authentication, and data freshness
a “micro” version of the Timed, Efficient, Streaming, Loss-tolerant
Authentication protocol (μTESLA) for authentication for data broadcast
assumption is that every node has a secret key shared with the base
station
Security Protocols for Sensor Networks
Secure Network Encryption Protocol (SNEP)
symmetric security (same message is encrypted differently each time)
replay protection
low communication overhead
uses MAC for two-party authentication and integrity
LEAP is a key management protocol for sensor networks, designed to support in-
network processing
Key observation is that different types of packets (control versus data) have different
security requirements
LEAP provides four keying mechanisms:
individual keys
every node has unique key shared with BS
key used for confidentiality and MAC
group keys
globally shared key used by BS to communicate with entire network
cluster keys
shared key between sensor and its neighbors
used for securing local broadcast messages
pairwise shared keys
shared key between sensor and one of its immediate neighbors
Localized Encryption and Authentication Protocol