Research Article

A Novel Protective Framework for Defeating HTTP-Based Denial of Service and Distributed Denial of Service Attacks

Algorithm 6

Flash crowd attack entropy algorithm.
calculate avg_h = (hot_uri1_clicks + hot_uri2_clicks + ⋯ + hot_uriN_clicks)/N
IF (avg_h >= 10000)
            calculate entropy H = −H(hot_uri1) + −H(hot_uri2) + ⋯ + −H(hot_uriN)
    IF (H <= −0.5 OR H >= +0.5)
                decrease Timeout
                decrease MaxKeepAliveRequests
                               IF (Timeout == 0 && MaxKeepAliveRequests == 0)
                                              return HTTP_FORBIDDEN
                                              Blacklist_Table(remote_ip)
                                              EdgeRouter_Ban(remote_ip)
                               ENDIF
    ENDIF
ENDIF