IEEE 802.11 Wireless LAN Security: 1.1 Background
IEEE 802.11 Wireless LAN Security: 1.1 Background
1.1 BACKGROUND
Wired network
In many organizations, the wired network is an Ethernet LAN with an existing security
infrastructure that includes an authentication server (AS).
AAA (Authentication/Authorization/Accounting) functionality is often provided by a
RADIUS (Remote Authentication Dial in User Service) server.
WLANs(wireless LANs)
There are two principal types of WLANs
1. Ad hoc networks: where stations (possibly mobile) communicate directly with each
other.
2. Infrastructure WLANs: which use an access point (AP) as shown in below figure.
Figure: Infrastructure wireless LAN
Infrastructure WLANs :
A station first, sends a frame to an AP and the AP then delivers it to its final destination.
The destination may be another wireless station or it may be a station on the wired network
that the AP is connected to.
The AP thus serves as a bridge between the WLAN and the existing wired network.
The challenge then is to develop protocols that seamlessly integrate the WLAN with the
security infrastructure of the wired network.
A network of wireless stations associated with an AP is referred to as a basic service set. Such
a network may be adequate for a home or small enterprise.
The union of the basic service sets comprises an extended service set (ESS).
Each station and AP in the ESS is uniquely identified by a MAC address — a 48-bit quantity.
Each AP is also identified by an SSID (service set ID), which is a character string of length at
most 32 characters.
A wireless station, on power-up, needs to first discover an AP within its range.
This can be done by monitoring the Alternatively, a station may send a
wireless medium for a special kind of Probe Request frame, which probes
frame called a Beacon, which is for APs within its range.
periodically broadcast by the AP. An AP, on hearing such a request, responds
The Beacon usually contains the SSID of with a Probe Response frame.
the broadcasting AP. Like the Beacon, the Probe Response
frame contains the SSID of the AP and also
information about its capabilities,
supported data rates, etc.
1.2 AUTHENTICATION
The response together with the IV is sent by the station to the AP.
The shared secret, S, is common to all stations authorized to use the WLAN.
Drawbacks:
All an attacker needs to do is to monitor a challenge—response pair.
From this, he can compute the keystream.
To authenticate himself to the AP, he needs to XOR the challenge from the AP with the
computed keystream.
It may also be possible for an attacker to obtain S itself.
By eavesdropping on several challenge—response pairs between the AP and various stations,
an attacker could launch a dictionary attack and eventually obtain S.
Different authentication mechanisms and message types are defined by the Extensible
authentication Protocol (EAP) standardized by Internet Engineering Task Force (IETF).
EAP is not really an authentication protocol but rather a framework upon which various
authentication protocolscan be supported.
EAP exchanges are mostly comprised of requests and responses.
For example one party requests the ID of another party.
The latter responds with its user_name or e-mail address.
EAP also defines messages that may contain challenges and responses used in authentication
protocols.
The AP broadcasts its security capabilities in the Beacon or Probe Response frames.
The station uses the Associate Request frame to communicate its security capabilities.
802.11i authentication takes place after the station associates with an AP.
IEEE 802.11i
The generic authentication messages in IEEE 802.11i are shown in Fig. 15.2.
The protocol used between the station and the AP is EAP but that used between the AP and
the authentication server depends upon the specifics.
For example, the authentication server is often a RADIUS server which uses its own message
types and formats. (RADIUS stands for Remote Authentication Dial in User Service.
It is a client—server protocol used for authentication, authorization, and accounting.)
Figure 15.2 Authentication and master session key exchange in 802.11i
1. EAP-MDS
This is most basic of the EAP authentication methods.
Here, the authentication server challenges the station to transmit the
MD5hash of the user's password.
The station prompts the user to type his/her password.
It then computes the hash of the password and sends this across.
This method is insecure since an attacker could eavesdrop on such a message
exchange and then replay the hashed password thus impersonating the owner of the
password.
Also, this method does not support authentication of the AP to the station.
2. EAP-TLS
EAP-TLS is based on the SSL/TLS protocol
most secure and provides mutual authentication and agreement on a master session
key.
It requires the AP as well as the user (station) to have digital certificates.
It is relatively straightforward to equip each AP with a digital certificate and a
corresponding private key but extending the Via to each user of the WLAN may not
be feasible.
3. EAP-TTLS
(tunnelled TLS) requires certificates only at the AP end.
TheAP authenticates itself to the station and both sides construct a secure tunnel
between themselves.
Over this secure tunnel, the station authenticates itself to the AP.
The station could transmit attribute-value pairs such as
user_name = acharya
password = 4rP#mNaS&8
4 Protected EAP (PEAP)
✓ This was proposed by Microsoft, Cisco, and RSA Security, is very similar to
EAP- TTLS.
✓ In PEAP, the secure tunnel is used to start a second EAP exchange where in the
station authenticates itself to the authentication server .
✓ The enhanced security offered by EAP-TLS, EAP-TTLS, and PEAP does,
however, come at a steep price in performance measured by the message and
computational overheads incurred during authentication.
Key Hierarchy
256
384bit
Four-way Handshake
The main goals of the four-way handshake are to
Known plaintext attack
The first problem with WEP is the possibility of keystream re-use.
Since the IV is 24 bits in length, there are only 224 distinct keystreams that could be constructed
given a secret S.
Suppose an attacker finds two frames which were encrypted using the same IV.
Let their ciphertexts be C and C'.
Let the corresponding plaintexts be P and P'.
Thus knowing c,c’, and p, we can obtain p’ which is called as known plaintext attack.
Message modification
Consider an attacker who wishes to modify a message sent by a legitimate user.
Let the sender's plaintext (not including the CRC checksum) be M1 F M2 where M1, F, and
M2 are each binary strings.
The attacker wishes to substitute the substring, F, with another substring, F',
so that the decrypted message seen by the receiver is M1 F' M2. The attacker does not need to
know the values, M1 and M2. However, we assume that he knows F and F'.
Ideally, the message integrity check should detect any modification to an existing message.
Can the attacker modify the message (including checksum) in such a way so that the
modification is undetected at the receiver end?
For the above plaintext, the ciphertext computed by the sender is :
CT=
The modified message has a valid CRC and so passes the integrity check at the receiver.
Hence, the receiver accepts the message, unaware that it has been modified by an
attacker.
1.3.2 Data protection in TKIP and CCMP
The technical name for WPA is Temporal Key Integrity Protocol (TKIP).
By contrast, the encryption key in TKIP is 128 bits.
TKIP generates a random and different encryption key for each frame sent. It employs a
process called two-phase key mixing.
The inputs to this process are the 128-bit temporal key, TK, computed as part of the four-
way handshake ,the sender's MAC address and the four most significant bytes of a 48-bit
frame sequence counter.
The randomizing capability of the key mixing function and the large size of the key space
virtually guarantee that "keystream collisions" never occur.
Thus, known plaintext attacks that could be successfully launched on WEP have no
chance of success with TKIP.
The sequence counter is incremented for each frame sent.
It is also carried in the header of each frame.
This helps protect the receiver from replay attacks.
Figure 15.6 shows the two phases used in generating the RC4 key.
Two pseudo-random function (PRF1 and PRF2) are employed in the two phases.
The 32 most Significant bits of the sequence counter are input to PRF1.
The least significant 16 bits of the sequence counter are inputs to PRF2 So, the output
of PRF2 changes for each frame sent.
MIC is computed as a function of the data in the frame and also some fields in the MAC
header such as the source and destination addresses.
It also uses as input a key derived from the PTK which was computed during the four-way
handshake.
Due to design constraints on WEP cards, MIC's implementation uses simple logical
functions, shifts, etc. Hence, it is not as secure as a keyed cryptographic hash.
On the other hand, it is much better compared to the CRC checksum used in WEP.
CCMP
The implementation of 802.11i that uses AES is referred to as WPA-2.its technical name
is counter mode with CBC MAC protocol(CCMP).
In CCMP terminology, this count is referred to as a packet number (PN).
The count is maintained at both sender and receiver ends.
The PN is also included in a special CCMP header field in a CCMP frame.
The PN is incremented by the sender after each frame is sent.
Upon receipt of a fresh frame in that session, the receiver compares the value of PN in the
CCM header versus the value stored by it.
If the value is less than the stored value, the frame is likely to be a replayed frame and is
hence discarded.
The first task in preparing a frame for transmission is to compute a MIC.
The MIC is computed using AES in Cipher Block Chaining (CBC) mode with block size
128 bits.
The key for performing encryption in each stage of Fig below is TK(temporal key).
The IV for the MIC computation is a "nonce," which includes the 48-bit PN.
The second and third blocks used in the MIC computation are specific fields in the frame
header such as the MAC addresses, sequence control, and frame type.
Next, the blocks in the frame data are sequentially processed resulting in an 8-byte MIC.
The next step is encryption.
The frame data and the MIC are concatenated and then encrypted using AES in counter
mode (Fig. 15.7).
Let n be the total number of blocks in the frame body + MIC.
The procedure for encrypting the i-th block is:
Compute Ai= ETK(PN +i*j). Here, PN is the packet number and j is a constant known to
both sender and receiver.
Compute i-th block of ciphertext = A (xor)Pi.
Here, Pi is the i-th block of plaintext.
The frame now includes two new fields — the CCMP header and the MIC.
Upon receipt of the frame, the receiver reverses the operations performed by the sender.
It performs decryption followed by MIC verification.
Fig : MAC generation and encryption in CCMP
Firewalls
Definition: A firewall acts as a security guard controlling access between an internal protected
network and an external untrusted network based on a given security policy.
Besides preventing intruders getting in, a firewall also helps prevent confidential inside data
from getting out.
A firewall may be implemented in hardware as a stand-alone "firewall appliance" or in
software on a PC.
A single firewall may be adequate for small businesses and homes. However, in several large
enterprises, multiple firewalls are deployed to achieve defence in depth.
2.1 BASICS
2.1.1 Firewall Functionality
The main functions of a firewall are listed as follows:
Access Control:
A firewall filters incoming (from the Internet into the organization) as well as outgoing
(from within the organization to the outside) packets.
A firewall is said to be configured with a rule set based on which it decides which packets
are to be allowed and which are to be dropped.
Address/Port Translation.
NAT was initially devised to alleviate the serious shortage of IP addresses by providing a set
of private addresses that could be used by system administrators on their internal networks
but that are globally invalid (on the Internet).
it is possible to conceal the addressing schema of these machines from the outside world
through the use of NAT.
Through NAT, internal machines, though not visible on the Internet, can establish a
connection with external machines on the Internet. NATing is often done by firewalls.
Logging.
A sound security architecture will ensure that each incoming or outgoing packet encounters
at least one firewall.
The firewall can log all anomalous packets or flows for later study.
These logs are very useful for studying attempts at intrusion together with various worm and
DDoS attacks.
Authentication, Caching, etc. Some types of firewalls perform authentication of external
machines attempting to establish a connection with an internal machine.
A special type of firewall called web proxy authenticates internal users attempting to access an
external service. Such a firewall is also used to cache frequently requested webpages. This
results in decreased response time to the client while saving communication bandwidth.
2.1.2 Policies and Access Control Lists
High-level policies for access to various types of services are formulated within an
organization or campus. Examples of these include the following:
All received e-mail should be filtered for spam and viruses.
All HTTP requests by external clients for access to authorized pages of the organization's
website should be permitted.
DNS queries made by external clients should be allowed provided they pertain to addresses
of the organization's publicly accessible services such as the web server or the external e-
mail server. However, queries related to the IP addresses of internal machines should not
be entertained.
The organization's employees should be allowed to remotely log into authorized internal
machines. However, all such communication should be authenticated and encrypted.
Only two types of outgoing traffic are permitted. First, all e-mail from within the
organization to the outside world are permitted. Second, requests emanating from within
the organization for external webpages are permitted. However, requests for pages from
certain "inappropriate" websites should be denied.
High-level policies are translated into a set of rules that comprise an Access Control List.
A rule specifies the action to be taken as a function of
(i) the packet's source IP address and port number
(ii) the packet's destination IP address and port number
(iii) the transport protocol in use (TCP or UDP)
(iv) the packet's direction — incoming or outgoing
The Access Control List for the high-level policies is described in Table 21.1.
Policies can, in general, be either permissive or restrictive.
A permissive policy is defined as follows:
Permit all packets except those that are explicitly forbidden.
A restrictive policy, on the other hand, is defined as follows:
Drop all packets except those that are explicitly permitted.
The ACL in Table 21.1 implements a restrictive policy — the default action is Deny as
expressed in rules 5 and 8.
The rules are scanned top to bottom.
As soon as a rule is found' that matches the packet's attributes (IP addresses, port numbers,
etc.), the action in that rule (usually permit or deny) is taken and no further rules are processed
for that packet.
The scanning order is important.
For example, if rules 4 and 5 in Table 21.1 are interchanged, then IPSec traffic will be dropped.
Also, from a performance perspective, it makes sense to put the most frequently acted upon
rule earlier on.
By so doing, we can expedite the decision on what to do with a packet.
Finally, it is important to include the default deny rule at the end of the rule set — this prevents
ambiguity over what action to take for a packet that has not been matched against the attributes
in any of the previous rules.
Consider an external mail server (IP address = ABC) that wishes to deliver mail to an
organization.
For this purpose, it should first establish a TCP connection with the organization's mail server,
MS.
Consider the arrival of a packet with the following attributes:
Source IP address = ABC
Destination IP address = MS
TCP destination port = 25 (SMTP port)
ACK flag set
Such a packet would be part of a normal flow provided a connection between ABC to MS has
been established. But suppose such a connection has not yet been established.
Should the packet still be allowed in? The simple packet filter will allow the packet to enter
even if no prior connection between ABC and MS was established.
It should be noted that such packets are often used to perform port scans.
A simple packet filter merely inspects the headers of an incoming packet in isolation. It does
view a packet as part of a connection or flow. Hence, it will not be able to filter out such pack
`'t arriving from ABC.
2. Stateful Inspection
A firewall uses packet's TCP flags and sequence/acknowledgement numbers to determine
whether it is part of an existing, authorized flow.
If it is participating in the establishment of an authorized connection or if it is already part of
an existing connection, the packet is permitted, otherwise it is dropped.
In the above example of the packet from ABC, the stateful packet inspection firewall will
realize that it has not encountered the first two packets in the three-way handshake and will
hence drop this packet.
3. Application Level Firewalls
A packet-filtering firewall, even with the added functionality of stateful packet inspection, is
still severely limited.
What is needed is a firewall that can examine the application payload and scans packets for
worms, viruses, spam mail, and inappropriate content. Such a device is called a deep inspection
firewall.
A special kind of application-level firewall is built using proxy agents. Such a "proxy firewall"
acts as an intermediary between the client and server.
The client establishes a TCP connection to the proxy and the proxy establishes another TCP
connection with the server as shown in Fig. 21.1.
To a client, the proxy appears as the server and to the server, the proxy appears as the client.
Since there is no direct connection between the client and the server, worms and other malware
will not be able to pass between the two, assuming that the proxy can detect and filter out the
malware. Hence, the presence of the proxy enhances security.
Two TCP connections between C and Proxy and between Proxy and S
Figure 21.1 Proxy firewall
There are proxy agents for many application layer protocols including HTTP, SMTP, and FTP.
In addition to filtering based on application layer data, proxies can perform client
authentication and logging.
An HTTP proxy can also cache webpages.
Caching has a major impact on performance.
If the webpage is cached in a web proxy server located in the client's organization, the response
time could be greatly reduced compared to that where the page has to be fetched from the
external web server.
Also, caching reduces the demand on external communication bandwidth while easing the
load on the web server.
Firewalls are a necessary element in the security architecture of an organization that permit
access to/from the external world. In the next section, we study firewall deployment.
Of the three firewalls, the first is really a router (the Border Router) with some packet-filtering
capability.
This is the access router interfaces with the Internet.
It is connected to a stateful firewall, FW-1, which has three interfaces (firewalls that have more
than two interfaces are referred to as multi-homed).
The zone connected to the right interface of FW-1 is referred to as a screened subnet though
it is more commonly referred to as a De-Militarized Zone (DMZ). It is labelled DMZ-1 in Fig.
21.2. A DMZ, in the true sense, is the area between two firewalls.
In Fig. 21.2, the zone between firewalls FW-1 and FW-2 is a real DMZ labelled DMZ-2.
Demilitarized zones are so called because they often host servers that are accessible to the
Internet and also to the internal network.
Because they are accessible to the public, they are the most likely machines to be compromised
in the entire network.
Once a machine in the DMZ is compromised, other machines in the DMZ could get infected.
DMZ-1 contains the publicly accessible servers.
These include the web server, the external e-mail server, and the DNS server. All incoming
mail from the Internet is received by this e-mail server, which checks for virus signatures and
spam mail.
The DNS server resolves names of publicly accessible servers. However, care should be taken
to ensure that it does not contain address records of any of the internal machines. DMZ-2
contains the internal e-mail server. This is the server that hosts the mailboxes of the company
employees. It handles the sending and receiving of all mail between internal parties. It
Periodically establishes a connection to the external mail server (in DMZ-1) to retrieve all
incoming mail.
Outgoing mail (from the internal network to the Internet) can be handled in several ways. The
internal mail server can set up an SMTP connection to a remote mail server to transfer mail.
Alternatively, it can connect to the external mail server (in DMZ-1) and use it to relay all
outgoing mail.
DMZ-2 also contains an Internet proxy server.
All internal users who wish to access external webpages connect to the proxy.
The proxy authenticates the internal user and decides whether a page can be accessed (different
restrictions might apply to different classes of users).
The proxy scans incoming webpages for virus signatures and objectionable content. Finally,
the proxy also performs caching of webpages.
The internal network contains application servers, database servers, and user workstations.
It also has an internal DNS server. This DNS server is different from the external DNS server
in that it provides mappings between the domain names of the internal machines and their IP
addresses.
The internal machines all have private addresses. It is neither necessary nor desirable for third
parties on the Internet to be aware of the private addresses of the internal machines. Hence,
this DNS server is placed in the internal network.
A feature of the security architecture in Fig. 21.2 is that services such as DNS and e-mail are
split; that is, there is an internal DNS server as well as an external one.
Likewise, there is an internal e-mail server and an external one.
Generally, no external connection should be allowed to the internal servers.
Connections in the reverse direction from the internal servers to hosts on the Internet should
either be forbidden or severely restricted.
2.2.2 Firewall Configuration
In order to create a firewall ruleset, we need to identify all the possible authorized connections
that might be set up between pairs of machines in two different zones adjacent to the firewall.
We first present a simplified version of the ruleset for firewall FW-2 (Table 21.2).
Table 21.2 Simplified ruleset for firewall, FW-2
The first rule states that no machine from any other security zone is permitted to establish a
TCP connection to any internal machine.
Rules 2-4 assert that, other than connections from internal stations to the internal mail server
(on port 25) and web proxy (on port 80), no other connections are permitted to DMZ-1, DMZ-
2, or the Internet.
Table 21.3 shows the rule set for firewall FW-1.
Rule 1 in Table 21.3 states that no TCP connection is to be established to any machine in DMZ-2
from any machine in DMZ-1 or the Internet.
Rule 2 states that the external mail server can accept connections from the internal mail server to
receive incoming mail or to send outgoing mail.
Rule 3 allows connection to the external mail server from mail server on the internet to deposit
incoming mail.
Rule 4 and 5 permit connections from the internet to the organizations web server and external
DNS server, respectively.
Rule 6 states that no other connection may be set up to any machines in DMZ-1 for any other
purpose.
Rule 7 and 8:the internet proxy in DMZ-2 and external mail server are permitted to make
connections to machines on the internet to access webpages and to send outgoing mail.
Rule 9: confirms that no other connection from the organizations machine to the internet for any
other purpose is allowed.
MODULE 4
Viruses, Worms and Other Malware,. Intrusion Prevention and Detection
Each of its interfaces is marked with the source addresses that use that interface en route to
some destination.
Note that packets from the same source may enter the router through different interfaces.
For example, packets from source address 7 may arrive through interfaces b, c, or d.
In the simplest implementation of the filter, the router checks whether a packet has arrived
on one of its "acceptable" interfaces based only on the packet's source IP address.
For example, a packet bearing source address = 7 arriving on interface c would be
forwarded. However, another packet with the same source address but arriving on interface e
would be suspected of having a spoofed source address and would be discarded [see Fig.
22.2
The different algorithms that attempt to detect the onset of a SYN Flood Attack by
monitoring the above series.
1. Algorithm 1. Raise an alert if the most recently computed detection variable Di exceeds
the threshold, i.e., D, >T1
Figure 22.4(a) shows D versus time with the threshold set at T1 = 90.
Some of the problems with this approach are as follows:
(i) The IDS may raise many false alarms since it bases its decision on point values.
(ii) A modest spike in D at just one point is very unlikely to result in memory exhaustion
but it does cause the IDS to raise an alarm.
(iii) The cumulative effect of the attack packets across the interval will cripple the system but
this algorithm will not raise an alarm.
2. Algorithm 2 : Raise an alert if the "smoothed average" of the previous values of D
exceeds the threshold.
This approach uses the well-known technique of exponential smoothing.
The decision variable at the end of the i-th observation interval is the smoothed
average, Si computed using :
22.4.3 IP Traceback
There are two principal approaches to IP traceback :
packet marking: the packet keeps track of the routers it has visited
packet logging: each router keeps track of the packets passing through it.
hybrid approaches using a combination of packet marking and packet logging have
been proposed.
Packet Logging
Each router attempts to keep track of every packet that passes through it.
Packet logging makes use of the idea of a packet fingerprint or digest.
This is computed using a well-designed hash function — one that distributes the hash
values uniformly across all possible hash inputs.
An interesting feature of packet logging is that it can help track even a single rogue
packet.
First, assume that each router stores each packet received by it in the last 5 minutes.
Suppose the victim wishes to obtain the exact path followed by a packet received by
it.
The idea is that the victim's ingress router, A, queries each of its adjacent routers
whether they have seen the packet.
In Fig. 22.5(a), A would query B, H, and G.
The router that responds positively, say B, then queries its neighbours, C and M.
The one that responds positively then contacts its neighbours and so on until the
source of the packet is traced.
The storage requirements can be further reduced by the use of a space-efficient data
structure called the Bloom Filter.
Let n be the maximum number of packets to be stored in a router in a given interval,
say 7 minutes.
Each time an element has to be inserted, one or more hash functions on that element
need to be computed.
Let k be the number of distinct and independent hash functions used. k is a design
parameter.
The output of each hash function returns a w-bit quantity.
The Bloom Filter is basically a bit array.
Let m = 2w be the size of this array.
Packet "Insertion.":When a packet enters the router, the k hashes are computed on its
content.
To speed up the computation, the hashes are only computed on the invariant parts of
the IP header and a small part of the payload, say 10 bytes.
Suppose the k hash computations yield the values i1, i2, i3,...ik.
These k hash outputs are used as indices into the bit array.
To "insert" a packet, the bits in those positions are all set to 1. (If one or more of them
were already set, they remain set.)
Packet Presence Check: To check if a packet, P, is present in the Bloom Filter,
compute the k hashes on it as done during packet insertion.
Suppose the k hash computations yield the values i1, i2, i3, ... ik. Then, check whether
each of the elements of the Bloom Filter are set. If even one of these elements = 0, P
has not been encountered by this router.
We next derive an expression for the probability of a false positive.
Virus, Worms and Malware
Enhanced Targeting
The most important attribute of a Worm is that it spreads its infection to other
computers.
Many target selection strategies have been proposed and implemented.
Worms that spread through e-mail, for example, have an easy way to figure out
their targets.
All they need to do is look into their victim's mailbox or e-mail address book
to find a set of targets.
A mobile worm obtains phone numbers of its potential victims from the phone
book in the cellphone hosting the worm.
Some web worms use search engines to harvest URLs of potentially vulnerable
targets.
Internet scanning worms, on the other hand, scan the IP address space for
vulnerable machines.
The most straightforward approach is random scanning — choosing IP
addresses at random. This was adopted by Code Red Version-I. However, Code
Red Version-II adopted localized scanning.
Over 80% of the rime, it attempted to connect to victims with whom it shared
the network address (most significant 8 or 16 bits of the IP address). This
strategy was more successful since hosts in the same network are likely to be
closer and be running the same soft-ware.
Worms like Nimda, unleashed in September 2001, spread aggressively thanks
to its five different vectors of propagation. Propagation through HTTP and e-
mail were particularly successful in penetrating the perimeter of the enterprise.
Once inside, it exploited the Windows file-sharing feature to spread within the
enterprise.
Enhanced Speed
To enhance the infection rate, some worms are designed to spawn multiple
threads.
Each thread is responsible for setting up connections to a different subset of
hosts, thus increasing the rate at which infection is spread.
Some worms reduce infection latency by targeting a buffer overflow
vulnerability on an application that employs UDP rather than TCP.
TCP connection establishment involves a three-way handshake and is time-
consuming.
UDP, by contrast, is connectionless.
This sharply reduces infection latency.
A steep increase in the number of infected machines at the very outset of a
worm epidemic has a multiplicative effect on spreading rate.
For this purpose, the attacker could create one or more hit-lists carrying
addresses of several thousand vulnerable machines.
The first worms to be let loose could carry one such list.
As a worm infects each new machine, it splits its list between itself and the
machine it has just infected.
Given that most of the machines on the hit-lists are vulnerable, the worm
spreads rapidly during the initial stage of the epidemic. Thereafter, the infected
machines could spread the infection using random scanning or some other
spreading method.
Enhanced Capabilities
Most worms (and viruses) have unique and distinct signatures — a pattern of bits,
usually assembly language code, which appears in all instances of the worm.
Worm and virus signatures are the key to detecting them. However, there are
sophisticated code obfuscation techniques to evade detection.
One such technique is the use of encryption for disguising worm code.
Different instances of the worm may use different keys for encryption. Thus, they
might fail to match any existing worm signatures. Such worms are said to be
polymorphic.
A polymorphic worm would have to be decrypted before being executed. This
suggests that a decryptor routine "in the clear" would have to be part of the worm
code.
Decryptors themselves may be very simple, involving XOR operations or trivial
shift-based substitutions. However, detecting a worm on the assumption that the
decryptor routine is invariant would not always succeed.
Figure 19.1 shows two versions of assembly code that look different but perform
the same function.
The second version is inefficient with spurious instructions.
The second version also has a spurious branch instruction to confuse worm code
detection software that relies on control flow analysis.
Worms that have multiple such versions with or without relying on encryption are
referred to as metamorphic worms.
Slammer
The SQL Slammer was launched on 25 January, 2003, and targeted a buffer overflow
vulnerability on the Microsoft SQL server 2000.
The worm sent packets on UDP port 1434 — the database software's resolution
service.
It used simple random scanning to propagate.
Slammer's payload was a mere 384 bytes in length — far smaller than the 4 kb payload
of Code Red. Also, UDP, being a connectionless protocol, there is no overhead of
connection establishment.
Worm Propagation Models
Simple Epidemic Model
The Simple Epidemic Model used to study the spread of infectious diseases among
humans is an appropriate starting point.
The model assumes that there are only two types of entities in the population.
Either an individual is susceptible or he is infected.
An infected individual can infect a susceptible person.
Once infected, a person remains infected and does not recover.
Let N be the size of the total population.
Kermack—McKendrick Model
The Kermack—McKendrick (K—M) model more accurately models the spread of
human infectious disease by considering three (instead of two) categories of people:
• those who are susceptible (state S)
• those who are infectious (state I) and
• those who are neither, i.e. individuals who are cured or those who have succumbed to
the disease (terminal T).
Initially, all individuals in the population are susceptible.
It is possible to go from state S to I but not vice versa .
19.4 Topological worms
19.6.1 Introduction
New—generation smartphones combine the functionality of a cellphone and a lose-end
PC.
They may be used for storing confidential documents, communicating via e -
mail/SMS/MMS, and taking photographs.
They support feature-rich applications that run on top of a complete OS.
The most common OS on smartphones is the Symbian followed by Windows Mobile,
Linux, and recently the Mac OS X (on the iPhone).
They provide a rich set of APIs to access the phone book and other files, send
SMS/MMS messages, etc. Unfortunately, these very APIs can also be used by malware
to, for example, read a confidential document on the smartphone and ship it to the
attacker as an MMS attachment.
19.6.2 Bluetooth
Bluetooth is both a communication technology and a protocol stack.
As a communication technology,
It supports short-range wireless communication —
A maximum of between 10 and 100 meters between devices.
Bluetooth uses 2.4 ghz shortwave radio technology.
Bluetooth is a complex, multi-layered protocol.
19.6.3 Examples
Cabir was one of the earliest proof-of concept worms that targeted the Symbian Series
60 OS.
Unleashed in June 2004, it was authored by the International Virus writing group 29A.
The worm attempts to discover other Bluetooth-enabled phones set in discoverable
mode.
When it finds such a phone, it sends the worm payload in a SIS file.
The receiver needs to accept and install the file.
Its payload was mostly benign typically displaying "Caribe" on the screen. However,
the continuous scanning for new victims by an infected phone depletes battery power.
Commwarrior, which appeared in March 2005, was the first worm to spread through,
both Bluetooth and MMS.
Like Cabir, it targeted Symbian smartphones.
19.7 BOTNETS
19.7.1 Basics
A botnet is an army of compromised computers or bots connected to the Internet and
remotely controlled by a "botmaster."
The earliest botnets were a collection of zombies that participated in DDoS attacks.
The emergence of botnets is closely linked to the motive of financial gain that is
behind many recent cyber attacks.
They are often used to send spam mail on behalf of third parties,
For example, Bot programs , may contain keyloggers and other forms of spyware that
capture sensitive personal information such as passwords and credit card numbers and
send these to the botmaster.
Botnets have also been used as an extortion tool — "Pay up or your website will be
bombarded by a DDoS attack".
How does a computer become a bot?
Bots are created in ways similar to many of the traditional trojan/worm/virus
infections.
A common vector of propagation is e-mail that contains an infected attachment.
Another is through downloading a malicious webpage containing scripts that exploit
vulnerabilities in certain browsers or application software.
A bot infection may also be propagated by bots themselves by scanning the Internet
for vulnerable machines.
Finally, open file shares and IRC (Internet Relay Chat) multicast messages have also
been widely used to spread infections.
One important difference between a bot and a computer infected by a traditional
worm/virus/ Trojan is that a bot needs to communicate with specific nodes in the bonet
to receive fresh commands.
A bot may be ordered to send spam or to "Launch a DDoS attack on site abc.com
beginning 14:00 hours on 01-12-10." Some of the nodes in the botnet play the role of
Command and Control (C&C) servers. They receive commands from the botmaster
and disseminate these to the rest of the bots.
19.7.2 Case Study: The Storm Botnet
The Storm botnet was first detected in January 2007.
Its other names are Peacomm, Nuwar, and Zhelatin.
Bots in the Storm botnet are infected in stages.
The most common vectors for propagating the primary infection appear to be e -mail or
infected websites. E-mail was sent with sensational subject lines like "230 die as Storm
batters Europe."
Likewise, users were lured into downloading free but infected files from websites
containing music of various pop artists.
The primary infection instructed the victim to join the Storm hornet embedded in the
Overnet P2P network.
Once part of the botnet, the bat was programmed to receive the second and subsequent
injections of malicious code. One of the injections instructed the bat to propagate e - mail
viruses. Another injection received some days later instructed the bat to launch a DDoS attacks
on a target specified by the botmaster.