Perfect forward secrecy distributed denial of service attack detection
09848013 · 2017-12-19
Assignee
Inventors
Cpc classification
International classification
Abstract
Provided are methods and systems for detecting a DoS attack when initiating a secure session. A method for detecting a DoS attack may commence with receiving, from a client, a request to initiate a secure session between the client and a server. The method may continue with sending a pre-generated key to the client. The method may further include establishing that the request from the client is suspected of the DoS attack. The establishment may be performed based on further actions associated with the client.
Claims
1. A method for detecting a Denial of Service (DoS) attack when initiating a secure session, the method comprising: receiving, by a processor, a request from a client to initiate the secure session between the client and a server; determining, by the processor, whether the client is on a whitelist; based on a determination that the client is absent from the whitelist, sending, by the processor, a pre-generated key to the client, the pre-generated key being generated prior to receiving the request and being generated without a communication from the client using a method for securely exchanging cryptographic keys over a public channel the pre-generated key being disassociated from one or more secure sessions between the client and the server; and based on further actions associated with the client, wherein further actions include the client failure to finish a handshake procedure within a predetermined time frame, and the further actions performed by the client after the pre-generated key is sent to the client and prior to initiating the secure session, and based on a determination that the established secure session is invalid; identifying the request from the client as taking part in a denial of service attack; and based on the identification, denying initiation of the secure session.
2. The method of claim 1, wherein the further actions by the client include opening and closing connections by the client.
3. The method of claim 1, wherein the further actions associated with the client includes determining that the client is providing data without calculating a pre-master key.
4. The method of claim 1, wherein the further actions associated with the client include using, by the client, a pre-loaded private key.
5. The method of claim 1, wherein the secure session includes a Perfect Forward Secrecy (PFS) cypher.
6. The method of claim 1, further comprising, based on the further actions associated with the client, monitoring the client.
7. The method of claim 1, further comprising, based on the further actions associated with the client, analyzing the client.
8. The method of claim 1, wherein the method for securely exchanging cryptographic keys over a public channel includes one or more of the following: an ephemeral Diffie-Hellman (DHE) Key Exchange and an ephemeral Elliptic Curve Diffie-Hellman (ECDHE) Key Exchange.
9. A system for detecting a DoS attack when initiating a secure session, the system comprising: a hardware processor configured to: receive a request from a client to initiate the secure session between the client and a server; determining, by the processor, whether the client is on a whitelist; based on a determination that the client is absent from the whitelist, send a pre-generated key to the client, the pre-generated key being generated prior to receiving the request and being generated without a communication from the client using a method for securely exchanging cryptographic keys over a public channel the pre-generated key being disassociated from one or more secure sessions between the client and the server: and based on further actions associated with the client, wherein further actions include the client failure to finish a handshake procedure within a predetermined time frame, the further actions performed by the client after the pre-generated key is sent to the client and prior to initiating the secure session and, based on a determination that the established secure session is invalid; identifying the request from the client as taking part in a denial of service attack; and based on the identification, denying initiation of the secure session; and a database in communication with the hardware processor, the database comprising computer-readable instructions for execution by the hardware processor.
10. The system of claim 9, wherein the further actions by the client include opening and closing connections by the client.
11. The system of claim 9, wherein the further actions associated with the client include determining that the client is providing data without calculating a pre-master key.
12. The system of claim 9, wherein the further actions associated with the client include using, by the client, a pre-loaded private key.
13. The system of claim 9, wherein the secure session includes a PFS cypher.
14. The system of claim 9, wherein the hardware processor is further configured to monitor the client based on the further actions associated with the client.
15. The system of claim 9, wherein the hardware processor is further configured to analyze the client based on the further actions associated with the client.
16. The system of claim 9, wherein the method for securely exchanging cryptographic keys over a public channel includes one or more of the following: a DHE Key Exchange and an ECDHE Key Exchange.
17. A non-transitory processor-readable medium having embodied thereon a program being executable by at least one processor to perform a method for detecting a DoS attack when initiating a secure session, the method comprising: receiving a request from a client to initiate the secure session between the client and a server; determining, by the processor, whether the client is on a whitelist; based on a determination that the client is absent from the whitelist, sending a pre-generated key to the client, the pre-generated key being generated prior to receiving the request and being generated without a communication from the client using a method for securely exchanging cryptographic keys over a public channel the pre-generated key being disassociated from one or more secure sessions between the client and the server; and based on further actions associated with the client, wherein further actions include the client failure to finish a handshake procedure within a predetermined time frame, and the further actions performed by the client after the pre-generated key is sent to the client and prior to initiating the secure session, and based on a determination that the established secure session is invalid; identifying the request from the client as taking part in a denial of service attack; and based on the identification, denying initiation of the secure session.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) Embodiments are illustrated by way of example, and not by limitation, in the figures of the accompanying drawings, in which like references indicate similar elements.
(2)
(3)
(4)
(5)
(6)
DETAILED DESCRIPTION
(7) The following detailed description includes references to the accompanying drawings, which form a part of the detailed description. The drawings show illustrations in accordance with example embodiments. These example embodiments, which are also referred to herein as “examples,” are described in enough detail to enable those skilled in the art to practice the present subject matter. The embodiments can be combined, other embodiments can be utilized, or structural, logical, and electrical changes can be made without departing from the scope of what is claimed. The following detailed description is therefore not to be taken in a limiting sense, and the scope is defined by the appended claims and their equivalents. In this document, the terms “a” and “an” are used, as is common in patent documents, to include one or more than one. In this document, the term “or” is used to refer to a nonexclusive “or,” such that “A or B” includes “A but not B,” “B but not A,” and “A and B,” unless otherwise indicated.
(8) The techniques of the embodiments disclosed herein may be implemented using a variety of technologies. For example, the methods described herein may be implemented in software executing on a computer system or in hardware utilizing either a combination of microprocessors or other specially designed application-specific integrated circuits (ASICs), programmable logic devices, or various combinations thereof. In particular, the methods described herein may be implemented by a series of computer-executable instructions residing on a storage medium, such as a disk drive or computer-readable medium. It should be noted that methods disclosed herein can be implemented by a computer (e.g., a desktop computer, tablet computer, laptop computer), game console, handheld gaming device, cellular phone, smart phone, smart television system, and so forth.
(9) As outlined in the summary, the embodiments of the present disclosure refer to detecting a DoS attack. A system for detecting a DoS attack can be responsible for detecting DoS attacks directed to a server. According to the present disclosure, a secure session can include an SSL session between a client and a server that begins with an exchange of messages, also referred to as an SSL handshake procedure. The client may contact the server by informing the server that the client wants to communicate with the server using the PFS. In other words, the client may send a request for initiating the secure session with the server. The request may include an SSL version number that the client supports, randomly generated data, cipher settings, and other information the server needs in order to establish an SSL session with the client. Providing such data to the server is not very resource-consuming for the client. In response to the request, the server may send an SSL version number supported by the server, randomly generated data, cipher settings, and other information that the client needs to communicate with the server using the SSL. Typically, the server can also send a key exchange message to the client. The key exchange message may include a public key. Because generation of the public key consumes a lot of computational resources of the server, it would be advantageous for the server to ensure that the client is not an attacker with intent to mount a DoS attack on the server.
(10) To detect DoS attacks, the server may investigate validity of the client. For this purpose, the server may determine whether the client is on a whitelist. The whitelist may include a list of trusted clients, for example, clients that have previously established secure sessions with the server. If the client is on the whitelist, the server may continue with the conventional SSL handshake procedure. If, on the other hand, the client is not on the whitelist (i.e. the client is unknown), the server may send a pre-generated key to the client instead of performing the computation of the public key. The pre-generated key may be stored in a database associated with the server. After sending the pre-generated key, the server may monitor the client's further actions for any suspicious activities. The suspicious activities can include lack of response to the public key received from the server, sending random data in response to the public key instead of generating a premaster key, and repetitively closing and opening connections with the server without responding to the public key.
(11) If the server had to generate a new key instead of using the pre-generated key each time a request is received from the client, the capacity of the server could be overwhelmed. However, sending the pre-generated key is not computationally expensive and allows the server to investigate the client prior to establishing a session and, possibly, detect and prevent a DoS attack.
(12) If the client demonstrates its validity by sending a premaster key encrypted using the public key received from the server, the server can force a renegotiation of the secure session with the client. More specifically, the server may generate a new public key and send the new public key to the client. According to the conventional SSL handshake procedure, after receiving the new public key, the client may use the public key to encrypt a premaster key generated by the client. The server may receive the premaster key from the client. The server may use a private key of the server to decrypt the premaster key, and then both the server and the client may generate a master key based on the premaster key. Both the client and the server may use the master key to generate a session key, which is a symmetric key used to encrypt and decrypt data exchanged during the SSL secure session between the server and the client. Therefore, both the client and the server may generate the session key and encrypt the session key using the public key. The client may decrypt the session key received from the server using a private key of the client. Similarly, the server may decrypt the session key received from the client using the private key of the server. Therefore, no decryption key allowing decrypting data flowing between the client and the server is going across the wire.
(13) Referring now to the drawings,
(14) The network 110 may include the Internet or any other network capable of communicating data between devices. Suitable networks may include or interface with any one or more of, for instance, a local intranet, a Personal Area Network, a LAN (Local Area Network), a WAN (Wide Area Network), a Metropolitan Area Network, a virtual private network, a storage area network, a frame relay connection, an Advanced Intelligent Network connection, a synchronous optical network connection, a digital T1, T3, E1 or E3 line, Digital Data Service connection, Digital Subscriber Line connection, an Ethernet connection, an Integrated Services Digital Network line, a dial-up port such as a V.90, V.34 or V.34bis analog modem connection, a cable modem, an Asynchronous Transfer Mode connection, or a Fiber Distributed Data Interface or Copper Distributed Data Interface connection. Furthermore, communications may also include links to any of a variety of wireless networks, including Wireless Application Protocol, General Packet Radio Service, Global System for Mobile Communication, Code Division Multiple Access or Time Division Multiple Access, cellular phone networks, Global Positioning System, cellular digital packet data, Research in Motion, Limited duplex paging network, Bluetooth radio, or an IEEE 802.11-based radio frequency network. The network 110 can further include or interface with any one or more of an RS-232 serial connection, an IEEE-1394 (Firewire) connection, a Fiber Channel connection, an IrDA (infrared) port, a Small Computer Systems Interface connection, a USB (Universal Serial Bus) connection or other wired or wireless, digital or analog interface or connection, mesh or Digi® networking. The network 110 may include a network of data processing nodes that are interconnected for the purpose of data communication.
(15) In response to receiving the request 140 for initiating a secure session with the server 130, the system 400 may initiate detecting a DoS attack as described in further detail below.
(16)
(17) The server may further send a ServerKeyExchange message 240. The ServerKeyExchange message 240 may include a public key. The public key may be generated using key-agreement protocols, for example, by using ephemeral (transient) Diffie-Hellman (DHE) Key Exchange and ephemeral Elliptic Curve Diffie-Hellman (ECDHE) Key Exchange. The server 130 may further send a ServerHelloDone message 250 to the client to indicate that the server 130 has finished the handshake negotiation process.
(18) The client 120 may send a ClientKeyExchange message 260, which may contain a premaster key or a public key depending on the selected cipher. The premaster key may be encrypted by the client 120 using the public key received from the server 130 in the ServerKeyExchange message 240.
(19) The SSL handshake procedure 200 can also include sending a ClientipherSpec record 270 by the client 120, in which the client 120 informs the server 130 that any further data received from the client 120 will be authenticated.
(20) Arrows 280 and 290 show steps of the SSL handshake procedure 200 at which the server 130 may be exposed to attacks. For example, generating the public key to be sent in the ServerKeyExchange message 240 may be a resource-consuming process for the server 130. However, if the client 120 terminates the connection after receiving the ServerKeyExchange message 240, the resources of the server 130 for computation of the public key can be wasted. Additionally, the ClientKeyExchange message 260 may comprise random numbers instead of the premaster key generated by using the public key. The server 130 may spend time for computation of the erroneous premaster key received from the client 120 and, thus, may be depleted of resources.
(21)
(22) The method 300 may commence with receiving, from a client, a request to initiate a secure session between the client and a server at operation 302. Receiving of the request from the client can initiate a handshake procedure being performed before initiating the secure session. The request may include an indication and the secure session between the client and the server may include a PFS cypher.
(23) Optionally, the method 300 may continue with determining whether the client is on a whitelist at operation 304. In example embodiments, in response to the determination that client is absent from the whitelist, a pre-generated key may be sent to the client at operation 306. The pre-generated key may be previously generated by the server using a method for securely exchanging cryptographic keys over a public channel. In an example embodiment, the method for securely exchanging cryptographic keys over a public channel includes one or more of the following: DHE Key Exchange and ECDHE Key Exchange. The pre-generated key may include a public key of the secure session. Generation of the key may include the steps of creating long random numbers, taking a primitive root of the generated long random numbers, and performing modulo operations. The modulo operations can use the multiplicative group of integers modulo p, where p is prime, and g is a primitive root modulo p, and where (g.sup.a).sup.b=(g.sup.b).sup.a=mod p; a and b being private keys of the client and the server, respectively.
(24) The method 300 may further include establishing that the request from the client is suspected of the DoS attack at operation 308. The establishing may be performed based on further actions associated with the client. In an example embodiment, the further actions associated with the client include at least one of the following: closing the connection by the client after receiving the pre-generated key from the server and opening a new connection; absence of further data from the client after receiving the pre-generated key by the client; absence of further data from the client after sending a ClientKeyExchange message by the client, failure to finish the handshake procedure within a predetermined time frame; providing, by the client, data without calculating a pre-master key, using a pre-loaded private key by the client, and so forth. The calculation of the pre-master key may include encrypting the pre-master key with the pre-generated key.
(25) Optionally, the method 300 may include operation 310, at which the client may be monitored based on the further actions associated with the client. Additionally, the method 300 may optionally include analyzing the client based on the further actions associated with the client. For example, to detect if an unknown client with a lot of requests sends the pre-loaded private key to the server, the server may send the same key to the client in a ServerKeyExchange message. The server may put the data of the ClientKeyExchange message received from the client into the database for analyzing. The server may check the analyzed result to investigate if the client is using a pre-loaded private key.
(26) Additionally, for the case when the client uses the pre-loaded private key in the PFS handshake procedure, if the client does not enable session identifier (ID) reuse or enable session ID reuse but never sends back same session ID, the server may monitor the client and put the client into the database for analyzing.
(27) Based on the establishing that the request from the client is suspected of the DoS attack, initiation of the secure session may be denied. Additionally, the client may be added to a blacklist. Any requests from clients on the blacklist may be automatically denied by the server without performing a SSL handshaking procedure.
(28) Alternatively, based on a determination that client is present on the whitelist, the established secure session may be determined to be valid and a regular handshake procedure may be carried out and renegotiation of the secure session may be forced. More specifically, a new key may be generated using a method for securely exchanging cryptographic keys over a public channel during the regular handshake procedure and sent to the client.
(29)
(30) In response to the determination that client is absent from the whitelist, the processor 402 may be operable to send a pre-generated key to the client to establish a secure session. In an example embodiment, the pre-generated key may be previously generated by the server using a method for securely exchanging cryptographic keys over a public channel. The pre-generated key may be stored in the database 404. In an example embodiment, the method for securely exchanging cryptographic keys over a public channel includes at least one of the following: DHE Key Exchange and ECDHE Key Exchange.
(31) The processor 402 may be further operable to establish, based on further actions associated with the client, that the request from the client is suspected of the DoS attack. In an example embodiment, the further actions associated with the client include at least one of the following: closing the connection by the client after receiving the pre-generated key from the server and opening a new connection; lack of further data from the client after receiving the pre-generated key; absence of further data from the client after receiving a ClientKeyExchange message from the client by the server; failure to finish the handshake procedure within a predetermined time frame; determining that the client provides data without calculating a pre-master key; using a pre-loaded private key by the client; and so forth. The calculation of the pre-master key may include encrypting the pre-master key with the pre-generated key.
(32) The processor 402 may be further operable to monitor the client based on the further actions associated with the client. Optionally, the processor 402 may be further operable to analyze the client based on the further actions associated with the client.
(33) Optionally, based on the establishing that the request from the client is suspected of the DoS attack, the processor 402 may be operable to deny initiation of the secure session and terminate the connection with the client. Additionally, based on the identification, the processor 402 may be operable to add the client to a blacklist.
(34) Alternatively, based on a determination that client is on the whitelist, the processor 402 may determine the established secure session to be valid and may perform a regular handshake procedure and force renegotiation of the secure session. More specifically, the processor 402 may generate a new key using a method for securely exchanging cryptographic keys over a public channel during the regular handshake procedure and send the new key to the client.
(35) The system 400 may further comprise a database 404 in communication with the processor 402. The database 404 may store computer-readable instructions for execution by the processor 402.
(36)
(37) The components shown in
(38) Mass data storage 530, which can be implemented with a magnetic disk drive, solid state drive, or an optical disk drive, is a non-volatile storage device for storing data and instructions for use by processor unit 510. Mass data storage 530 stores the system software for implementing embodiments of the present disclosure for purposes of loading that software into main memory 520.
(39) Portable storage device 540 operates in conjunction with a portable non-volatile storage medium, such as a floppy disk, CD, DVD, or USB storage device, to input and output data and code to and from the computer system 500. The system software for implementing embodiments of the present disclosure is stored on such a portable medium and input to the computer system 500 via the portable storage device 540.
(40) User input devices 560 provide a portion of a user interface. User input devices 560 include one or more microphones, an alphanumeric keypad, such as a keyboard, for inputting alphanumeric and other information, or a pointing device, such as a mouse, a trackball, stylus, or cursor direction keys. User input devices 560 can also include a touchscreen. Additionally, the computer system 500 includes output devices 550. Suitable output devices include speakers, printers, network interfaces, and monitors.
(41) Graphics display system 570 includes a liquid crystal display or other suitable display device. Graphics display system 570 receives textual and graphical information and processes the information for output to the display device.
(42) Peripheral devices 580 may include any type of computer support device to add additional functionality to the computer system.
(43) The components provided in the computer system 500 of
(44) It is noteworthy that any hardware platform suitable for performing the processing described herein is suitable for use with the embodiments provided herein. Computer-readable storage media refer to any medium or media that participate in providing instructions to a central processing unit, a processor, a microcontroller, or the like. Such media may take forms including, but not limited to, non-volatile and volatile media such as optical or magnetic disks and dynamic memory, respectively. Common forms of computer-readable storage media include a floppy disk, a flexible disk, a hard disk, magnetic tape, any other magnetic storage medium, a Compact Disk Read Only Memory (CD-ROM) disk, DVD, Blu-ray disc, any other optical storage medium, RAM, Programmable Read-Only Memory, Erasable Programmable Read-Only Memory, Electronically Erasable Programmable Read-Only Memory, flash memory, and/or any other memory chip, module, or cartridge.
(45) In some embodiments, the computer system 500 may be implemented as a cloud-based computing environment, such as a virtual machine operating within a computing cloud. In other embodiments, the computer system 500 may itself include a cloud-based computing environment, where the functionalities of the computer system 500 are executed in a distributed fashion. Thus, the computer system 500, when configured as a computing cloud, may include pluralities of computing devices in various forms, as will be described in greater detail below.
(46) In general, a cloud-based computing environment is a resource that typically combines the computational power of a large grouping of processors (such as within web servers) and/or that combines the storage capacity of a large grouping of computer memories or storage devices. Systems that provide cloud-based resources may be utilized exclusively by their owners or such systems may be accessible to outside users who deploy applications within the computing infrastructure to obtain the benefit of large computational or storage resources.
(47) The cloud may be formed, for example, by a network of web servers that comprise a plurality of computing devices, such as the computer system 500, with each server (or at least a plurality thereof) providing processor and/or storage resources. These servers may manage workloads provided by multiple users (e.g., cloud resource customers or other users). Typically, each user places workload demands upon the cloud that vary in real-time, sometimes dramatically. The nature and extent of these variations typically depends on the type of business associated with the user.
(48) Thus, methods and systems for detecting a DoS attack when initiating a secure session have been described. Although embodiments have been described with reference to specific example embodiments, it will be evident that various modifications and changes can be made to these example embodiments without departing from the broader spirit and scope of the present application. Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense.