• The server verifies whether the product of the
factors sent by the client is equal to the ‘N’
value sent by the server (N=p*q). If this
condition is not satisfied or the values not sent
by the client, the server will drop the request.
4.1.1 Description of our Solution
When the server is facing normal flow of traffic, we
do not interfere with the web application. When the
number of requests arriving at the server crosses the
threshold value, our solution is invoked and the
server starts sending ‘N’ to all the clients.
A user using a web browser will experience a
momentary delay when the JavaScript calculates the
values ‘p’ and ‘q’ on his client machine but then his
request gets through when presented to the server.
An attacker who is using a malicious client will
not send these ‘p’ and ’q’ values and his requests get
dropped. If he now modifies his client to read the
JavaScript and compute ‘p’ and ‘q’, the number of
requests that he can send will drop down drastically.
If the distributed attack sustains or deepens, we can
increase the number of digits in ‘N’ and this will
throttle the malicious clients further without
increasing any load on the server.
4.1.2 Countermeasures Against the
Throttling
The strength of our solution lies in the mathematical
complexity of the integer factorization problem.
Since no algorithms exist to solve this problem in
polynomial time the attacker will not try to optimize
this computation but will try to get around the
computation by finding a hole in the protocol. In this
section we discuss various scenarios where the
attacker actively modifies his malicious client and
tries to tweak the hosts launching the distributed
attack and the countermeasures that we need to have
in place to defend against such modifications.
Case 1: At this case the attacker observes that
the server is sending the same ‘N’ for all requests.
He computes the prime factors once and appends
these factors to every request. This is a form of
replay attack. To counter this we will dynamically
generate ‘p’, the first factor of the prime from a
variable that changes with time.
Case 2: Now if the attacker has full control over
the zombies which he is using to launch the DDoS
attack, he can compute the value of ‘p’ on one
system and propagate it quickly to all the remaining
systems and launch a replay attack in the time slot.
To guard against this our solution generates ‘q’
dynamically as a function of client’s IP address.
Fixed cost functions are used to generate these
values dynamically so that there is no over head on
the server. Such attacks are extremely unlikely as the
communication delay to propagate the computation
to all the systems will be comparable to the cost of
computing it at the individual node itself.
Case 3: He may try to pre compute the primes in
the entire prime space. As per Table 1, the number
of primes (NP) increases with the number of digits
and becomes too huge and storage becomes a
limiting factor and such attacks are difficult with
zombie machines which have limited amount of
resources. The communication overhead of drawing
it from a central database will make such attacks
infeasible.
Case 4: The attacker might try to guess the value
of ‘N’ from its previous values, the IP address, the
server time and other variables that he can find out.
He may even get access to the exact code or
algorithm that we use to generate ‘p’ and ‘q’. So we
select a random combination of primes from the set
of primes and design the mapping functions such
that the selected primes are uniformly chosen across
this combination. We further change this
combination periodically to prevent the attacker
from tabulating the combination restriction the
usefulness of such tabulation further.
Case 5: In this extreme case when the attacker
has access to fast interconnects and resources if he
successfully launches the attack in case 2 and also
has access to all the mapping functions in case 4, he
may find out that the value of ‘q’ is reused on
individual nodes. To ward off this attack we can
compute ‘q’ from a different source with sufficient
entropy or flush the combination at a much faster
rate. As a result of this flushing all existing
connections will need to be reset and hence we
would not suggest this to be applied unless needed.
Case 6: In this case the attacker satisfies the
condition N=p*q, but the factors sent by the attacker
are bluffed. To counter this we generate ‘
q’ from the
IP address using a hash function that is changed
periodically. The server then verifies that the ‘q’
value sent in the request is not bluffed by
recalculating it from the source IP after verifying
‘N’. The drawback of this algorithm is that once the
value of ‘q’ is computed by the client, he can reuse
the same in further requests thereby necessitating a
periodic change of algorithm to compute ‘q’. In
another countermeasure to this type of attack the
server maintains a table in which the ‘N’ values sent
to every client for every request has to be stored. But
this will be a memory storage load on the server and
can be a problem at the server if the attacker is
THROTTLING DDoS ATTACKS
123