Memory Exhaustion
CSCF service is a stateful
SIP proxy. All the sessions established using a CSCF service lead to
a session being created in the CSCF service. The session typically
comprises of the call state/data, transaction state/data,
and FSMs for call and transaction. In a DoS attack, the attacker
can flood the service by sending too many SIP requests (INVITE messages).
If each of the INVITE messages initiates a new session, the total
memory limit can be exhausted for any new sessions.
A successful DoS attack
will consume as many resources of the target server as possible. This
can be achieved by either increasing the number of attacker packets
or the resources consumed by each attack packet. Accordingly, the
following attacks can be observed on the SIP server:
-
-
-
adaptive-nonce-based
flood
-
adaptive-nonce-based
flood with IP spoofing
In addition, resource
consumption can be increased for each attack packet in the following ways:
-
excessive external
party interaction
-
CSCF service on the
ASR 5000 is protected from flooding by using a distributed architecture
and resource management to prevent memory overruns.
CPU Loading
The SIP proxy needs
to parse each received messages, do some processing, and forward
the messages. In general, the SIP proxy should be able to process
the messages at the speed at which they can be received on the interface
it is bound to. A DDoS (Distributed DoS) attack can send huge numbers
of messages to the system. The system's processing capacity is generally
consumed by parsing of messages, digest authentication, and application
processing.
The CSCF Demux Manager
decodes an incoming REGISTER/INVITE message and finds out
if it belongs to a particular subscriber. If it is able to find
a subscriber corresponding to the message, it forwards the message
to an associated SMGR (session manager facility) instance (obtained
from subscriber table). When there is a flood of messages, the message
parsing at CSCF can consume quite a bit of CPU. SIP message encoding
gives a lot of freedom. Therefore, the time to parse a message depends
on the efficiency of a parser as well as the content of the message.
Digest authentication
involves sending a challenge to the subscriber; when the subscriber responds
with a challenge-response, HSS sends calculated expected response
to S-CSCF and S-CSCF compares it with what the subscriber has sent.
Many clients continue sending REGISTER requests upon authentication
failure. This creates load on the system. There can also be a DoS attack
of REGISTER requests with junk values of challenge response that
can increase the system load.
The SIP proxy has to
resolve hostname in VIA header while sending back reply, or it has
to resolve hostname in Route/Contact or Request-URI while
forwarding the request. This is done using the DNS client in the
system. When the system has a DNS resolve called “gethostbyname”, resolution
of hostname is blocked until a DNS reply is obtained from a DNS
server. The attacker can take advantage of this and send irresolvable
DNS hostnames in request/responses. The resolve timeout
will typically take longer than a normal DNS query reply; the SIP
proxy service would be blocked for this extended time interval.
Therefore, DNS client implementation on the ASR 5000 has a cache
for fast lookup of DNS results and avoids blocking.
A SIP AoR is allowed
to register multiple contacts. When a call comes for such a user,
the stem applies caller preference processing on all the registered
contacts and filter the contacts which meet the caller preference.
This consumes the CPU resource in applying/processing caller preference
on all registered contacts. When DoS attack prevention is enabled,
the forking-contact-limit command
sets a limit on the number of allowable contacts getting registered
per user ID.
To prevent loading,
the Demux Manager uses a grey-listing mechanism, where a user or source
IP address gets grey-listed once the number of failed requests from
these sources crosses a configured limit.
IMPORTANT:
When DoS attack prevention
is enabled, the per-aor-failure-limit and per-ip-failure-limit commands
set a failure limit that, when exceeded, causes the suspension of
registration attempts for the offending AoR/IP address.
All requests come directly
to SMGR once first registration is done. When a user is grey listed,
any incoming request to SMGR port is silently discarded. Any request
to Demux port is answered with an error response.
On receiving error
response information, the Demux Manager uses independent failure nodes
for source IP address and AoR. The following timers are maintained
by the system:
-
Start_time:
The absolute time at which the failure node was created. This information
is needed to determine whether the number of failures has increased over
a short or long time.
-
Failure count:
A dynamic counter that gets incremented every time a new failure
response is generated for the same AoR or IP address. The weight
with which the count gets incremented depends on configured weights
for different type of failures.
IMPORTANT:
When DoS attack prevention
is enabled, weighted multipliers are defined in the
auth-failure-weight and
bad-request-weight commands.
Over a period of time,
these failure counts reach a configured maximum limit.
IMPORTANT:
When DoS attack prevention
is enabled, the
per-aor-failure-limit and
per-ip-failure-limit commands
set a failure limit that, when exceeded, causes the suspension of
registration attempts for the offending AoR/IP address.
Once the maximum limit
is reached, the Demux Manager performs a computation based on:
-
time when failure node
was created (start_time)
-
-
configured threshold
rate (in failures per second)
IMPORTANT:
When DoS attack prevention
is enabled, the
threshold-rate command
configures the rate per second at which the system must receive authorization
failures or bad registration requests before it considers the failures/requests
a DoS attack.
Once an AoR or IP address
is considered to be a DoS attacker, it is inserted in grey-list nodes.
A timer value called “Banned time” gives the duration
for which an entry is grey listed. This is be computed by adding
a configured grey-list duration to current time. The grey-list nodes are
checked once a minute to see if any node has completed its barred
period.
IMPORTANT:
When DoS attack prevention
is enabled, the
greylist-duration command
configures the amount of time an AoR or IP address remains on a “grey
list” after having crossed the registration authorization
limit or the bad registration request limit.
Once an AoR/IP
address gets grey listed, the Demux Manager issues a clear subscriber request
to SMGR to clear registration information about the subscriber from
SMGR. Any subsequent requests coming from the AoR/IP address
to Demux Manager are dropped.