WO2016106592A1 - 一种特征信息分析方法及装置 - Google Patents

一种特征信息分析方法及装置 Download PDF

Info

Publication number
WO2016106592A1
WO2016106592A1 PCT/CN2014/095640 CN2014095640W WO2016106592A1 WO 2016106592 A1 WO2016106592 A1 WO 2016106592A1 CN 2014095640 W CN2014095640 W CN 2014095640W WO 2016106592 A1 WO2016106592 A1 WO 2016106592A1
Authority
WO
WIPO (PCT)
Prior art keywords
session
analyzed
feature information
preset
attack
Prior art date
Application number
PCT/CN2014/095640
Other languages
English (en)
French (fr)
Inventor
付天福
周冲
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202010460439.8A priority Critical patent/CN111835708A/zh
Priority to PCT/CN2014/095640 priority patent/WO2016106592A1/zh
Priority to CN201480076897.4A priority patent/CN106416171B/zh
Publication of WO2016106592A1 publication Critical patent/WO2016106592A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a feature information analysis method and apparatus.
  • a data stream refers to a sequence of data messages that are read once in a prescribed order.
  • the quintuple information of multiple data packets belonging to the same data stream is the same.
  • the quintuple information includes the source Internet Protocol IP address, the destination IP address, the source port number, the destination port number, and the transport layer protocol number.
  • the feature information of the data stream can be obtained.
  • Comprehensive analysis of the feature information of multiple data streams can understand the operation of data transmission in the network. For example, analyzing the duration of data flow in the network, you can understand the network data transmission speed; analyzing the packet length of the data stream in the network, you can perform network traffic accounting; analyzing the IP address of the data stream in the network, etc., can perform network security. Detection.
  • the data flow is the basic analysis unit when the network operation status analysis is performed by the person skilled in the art, but only the network operation status can be analyzed based on the characteristic information of the data flow.
  • the embodiment of the invention provides a method and device for analyzing feature information, which uses session as a basic analysis unit to obtain session feature information, and solves the problem that the feature information of the data stream can only analyze part of the network operation status.
  • a first aspect of the embodiments of the present invention provides a feature information analysis method, where the method includes:
  • the feature value is counted to obtain session feature information of the session to be analyzed.
  • the extracting before extracting the feature value of the preset session feature from each of the data packets, includes:
  • the session feature indicator configured in the IP data stream information output IPFIX protocol is obtained as a preset session feature.
  • the method further includes:
  • the feature information of the session to be analyzed is output in a standard format of the IPFIX protocol.
  • the acquiring the multiple data packets in the to-be-analyzed session includes:
  • the obtaining, before the obtaining the multiple data packets in the session to be analyzed the method further includes:
  • All received data messages are sampled based on the session to obtain data messages of multiple sampling sessions;
  • the obtaining a plurality of data messages in the session to be analyzed includes:
  • the obtaining, by the data packet of the multiple sampling sessions, the data packet of the to-be-analyzed session include:
  • the sampling based on the session for all received data messages includes:
  • Hash value is calculated by inputting quintuple information of the received data message a hash value, where the source IP address and the destination IP address are exchanged in the quintuple information of the received data packet, and the source port number and the destination port number are exchanged as input.
  • the received data message is sampled.
  • a second aspect of the embodiments of the present invention provides a network attack detection method, where the method includes:
  • the session feature information of all the to-be-analyzed sessions acquired in the preset time interval is analyzed, and the session feature information is analyzed and obtained by using the method described in the first aspect to the sixth possible implementation manner of the first aspect of the present invention. ;
  • the detecting, according to the session feature information, the network session attack in the preset time interval includes:
  • the network session attack within the preset time interval is identified.
  • the session feature information includes an uplink data packet number and a downlink data packet number
  • the incomplete session is a session to be analyzed in which the number of uplink data packets is greater than 1, and the number of downlink data packets is 0.
  • the session feature information includes a transmission control protocol TCP flag bit
  • the incomplete session is a session to be analyzed in which the TCP flag is incomplete.
  • the session feature information includes the number of echo packets and the number of echo reply packets in the ICMP session of the network control packet protocol;
  • the detecting, according to the session feature information, the network session attack in the preset time interval includes:
  • the second ratio of the echo message and the echo reply message in the ICMP session obtained in the preset time interval is calculated according to the session feature information
  • the ICMP session attack within the preset time interval is identified.
  • the detecting, according to the session feature information, the network session attack in the preset time interval includes:
  • the number of the denial of service sessions in the preset time interval is calculated according to the session feature information, where the denial of service session is the to-be-analyzed session that includes hypertext transfer protocol HTTP error code information in the session feature information;
  • the CC session attack within the preset event interval is identified.
  • the The network session attack in the preset time interval includes:
  • session feature information of each of the to-be-analyzed sessions collected in the preset time interval includes session fragmentation abnormality information, where the session fragmentation abnormality information includes fragmentation incomplete, slice overlap, and fragmentation flag Any one or more of the bit errors;
  • the session feature information of the session to be analyzed includes session fragmentation abnormality information
  • the session to be analyzed is identified as a fragmentation attack session within the preset time interval.
  • the method further includes:
  • an attack event is generated according to the session feature information of the session to be analyzed
  • An attack suppression policy is generated according to the attack event.
  • the method further includes:
  • the attack source device, the attack service, and the attacked device are identified according to the attack event.
  • the session feature information adopts a standard output format of the IPFIX protocol.
  • a third aspect of the embodiments of the present invention provides a feature information analyzing apparatus, where the apparatus includes:
  • a first acquiring unit configured to acquire multiple data packets in the session to be analyzed
  • An extracting unit configured to extract, from each of the data packets, a feature value of a preset session feature
  • a statistical unit configured to collect the feature value to obtain session feature information of the session to be analyzed.
  • the device further includes:
  • a second acquiring unit configured to acquire a session feature configured in the IPFIX protocol as a preset feature.
  • the apparatus further includes:
  • An output unit configured to use feature information of the session to be analyzed by using the IPFIX protocol Standard format output.
  • the first acquiring unit includes:
  • a first acquiring subunit configured to obtain, from all the received data packets, quintuple information of each data packet
  • the second obtaining sub-unit is configured to obtain, according to the quintuple information of each data packet, the data packet of the to-be-analyzed session from all the received data packets.
  • the apparatus further includes:
  • a sampling unit configured to sample all received data packets based on a session to obtain data packets of multiple sampling sessions
  • the first acquiring unit is configured to acquire, by using the data packet of the multiple sampling sessions, a plurality of data packets of the session to be analyzed.
  • the first acquiring unit includes:
  • a third obtaining subunit configured to obtain, from the data packets of the multiple sampling sessions, quintuple information of each data packet
  • a fourth obtaining subunit configured to obtain, according to the quintuple information of each data packet, the data packet of the to-be-analyzed session from the data packet of the multiple sampling sessions.
  • the sampling unit includes:
  • a parsing subunit configured to parse quintuple information of each of the received data messages
  • a first calculating subunit configured to calculate a positive hash value and an inverse hash value of the received data message by using the quintuple information, where the positive hash value is five of the received data message
  • the tuple information is a hash value calculated by inputting, and the anti-hash value is a location in which the source IP address and the destination IP address are exchanged, and the source port number and the destination port are in the quintuple information of the received data packet.
  • the hash value calculated as an input after the position is changed;
  • a second calculating subunit configured to calculate a first remainder obtained by dividing the positive hash value by a preset sampling parameter in a preset session sampling template, and calculating the inverse hash value by the session sampling template a second remainder obtained by the preset sampling parameter, wherein the preset sampling parameter is a denominator of a sampling ratio in the session sampling template;
  • a determining subunit configured to determine whether the first remainder or the second remainder is a preset sampling remainder in the session sampling template
  • sampling subunit configured to sample the received data message when the first remainder or the second remainder is a preset sampling remainder in the session sampling template.
  • a fourth aspect of the embodiments of the present invention provides a network attack detection system, where the system includes:
  • the feature information analyzing apparatus of the third aspect to the sixth possible implementation manner of the third aspect of the present invention is configured to analyze session feature information of all to-be-analyzed sessions acquired in a preset time interval;
  • the detecting device is configured to detect a network session attack in the preset time interval according to the session feature information.
  • the detecting apparatus includes:
  • a first statistic unit configured to collect, according to the session feature information, a first proportion of incomplete sessions in all the sessions to be analyzed acquired in the preset time interval
  • a first determining unit configured to determine whether the first ratio exceeds a first preset threshold
  • the first identifying unit is configured to identify a network session attack in the preset time interval when a first proportion of the incomplete session exceeds a first preset threshold.
  • the session feature information includes an uplink packet byte number and a downlink packet byte number
  • the incomplete session is a session to be analyzed in which the number of uplink data packets is greater than 1, and the number of downlink data packets is 0.
  • the session feature information includes a transmission control protocol TCP flag bit
  • the incomplete session is the TCP flag bit. Incomplete session to be analyzed.
  • the session feature information includes: an echo control packet number in an ICMP session and a echo reply packet number in a network control packet protocol;
  • the detecting device comprises:
  • a second statistic unit configured to calculate, according to the session feature information, a second ratio of the echo message and the echo reply message in the ICMP session obtained in the preset time interval;
  • a second determining unit configured to determine whether the second ratio is within a preset value range
  • the second identifying unit is configured to identify an ICMP session attack within the preset time interval when the second ratio is not within a preset value range.
  • the detecting device includes:
  • a third statistic unit configured to count, according to the session feature information, the number of denial of service sessions in the preset time interval, where the denial of service session is the to-be-analyzed information containing hypertext transfer protocol HTTP error code information in the session feature information Conversation
  • a third determining unit configured to determine whether the number of the denial of service sessions exceeds a second preset threshold
  • the third identifying unit is configured to identify a CC session attack within the preset event interval when the number of the denial of service sessions exceeds a second preset threshold.
  • the detecting device includes:
  • the fourth determining unit is configured to determine whether the session feature information of each of the to-be-analyzed sessions collected in the preset time interval includes session fragmentation abnormality information, where the session fragmentation abnormal information includes fragmentation incomplete. Fragment overlap and any one or more of the fragmentation flag errors;
  • a fourth identifying unit configured to: when the session feature information of the to-be-analyzed session includes session fragmentation abnormality information, identify the to-be-analyzed session as a fragmentation attack session in the preset time interval.
  • the system further includes:
  • a defense device configured to generate an attack event according to the session feature information of the to-be-analyzed session when the network session attack in the preset time interval is detected; generate an attack event according to the attack event Attack suppression strategy.
  • system further includes:
  • the attack identification device is configured to identify the attack source device, the attack service, and the attacked device according to the attack event.
  • the session feature information adopts a standard output format of the IPFIX protocol.
  • the embodiment of the present invention provides a feature information analysis method and device for obtaining a plurality of data messages in a session to be analyzed, and extracting feature values of preset session features from each of the data messages; The value of the session feature information of the session to be analyzed is obtained.
  • the session is used as a basic analysis unit to implement an overall analysis of the session, and the session feature information that can fully reflect the session is obtained.
  • the embodiment of the present invention further provides a network attack detection method and system, and detects a network session attack in the preset time interval according to the session feature information of the session to be analyzed acquired in a preset time interval, and solves the prior art based on the data flow.
  • the feature information cannot detect the problem of session attack in the network, and effectively detects the session attack in the network, and improves the completeness of the network attack detection.
  • FIG. 1 is a flowchart of a feature information analysis method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a format of an IPFIX protocol packet according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for detecting a network attack according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a feature information analysis apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a network attack detection system according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of hardware of a feature information analyzing apparatus according to an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram of hardware of a network attack detection system according to an embodiment of the present invention.
  • the data flow is taken as a basic unit, and multiple data streams transmitted in the network are acquired, and the characteristic information of the acquired multiple data streams is comprehensively analyzed. Get the health of the network. Based on the data flow analysis, the network connection probability cannot be analyzed, the network session attack cannot be detected, and the network abnormal session cannot be analyzed.
  • the embodiment of the present invention provides a method and a device for analyzing session characteristic information in a pioneering manner, and uses a session as a basic analysis unit to implement a comprehensive analysis of the running status of the network, especially for a session attack in the network.
  • Comprehensive analysis provides important data information.
  • FIG. 1 is a flowchart of a feature information analysis method according to an embodiment of the present invention, where the method includes:
  • S101 Acquire multiple data packets in the session to be analyzed.
  • a session refers to the communication interaction between two network devices during a specific uninterrupted operation time.
  • a session may be established between the first network device and the second network device to transmit a plurality of data messages between the first network device and the second device.
  • the quintuple information of the multiple data packets of the same session has the following characteristics: the source IP address of the multiple data packets of the same session is the IP address of the first network device or the IP address of the second network device, the same The destination IP address of the first network device is the IP address of the first network device or the IP address of the second network device.
  • the source port number of the multiple data packets in the same session is the port number or the first network device.
  • the port number of the network device, the destination port number of the multiple data packets in the same session is the port number of the first network device or the port number of the second network device, and the data packets of the same session are used.
  • the transport layer protocol number is the same.
  • the quintuple information of the data packet sent from the first network device to the second network device is (the IP address of the first network device, the port number of the first network device, and the second network device IP address, port number of the second network device, transport layer protocol number), ie, from the
  • the source IP address of the data packet sent by the first network device to the second network device is an IP address of the first network device, and the data packet sent from the first network device to the second network device
  • the source port number is the port number of the first network device
  • the destination IP address of the data packet sent from the first network device to the second network device is the IP address of the second network device
  • the destination port number of the data packet sent by the first network device to the second network device is the port number of the second network device
  • the data sent from the first network device to the second network device is the transport layer protocol number of the message is the number of the transport layer protocol used by the first network device and the second network device to transmit the data packets.
  • the quintuple information of the data packet sent from the second network device to the first network device is (the IP address of the second network device, the port number of the second network device, and the IP address of the first network device, a port number of the first network device, a transport layer protocol number, that is, a source IP address of the data packet sent from the second network device to the first network device is an IP address of the second network device,
  • the source port number of the data packet sent from the second network device to the first network device is the port number of the second network device, and is sent from the second network device to the first network device.
  • the destination IP address of the data packet is the IP address of the first network device, and the destination port number of the data packet sent from the second network device to the first network device is the port of the first network device.
  • the transport layer protocol number of the data packet sent from the second network device to the first network device is used by the first network device and the second network device to transmit the data packet.
  • the data packet sent from the first network device to the second network device is the same as the transport layer protocol number carried in the data packet sent from the second network device to the first network device.
  • the obtaining a plurality of data packets in the session to be analyzed has at least two possible implementation manners as follows:
  • the quintuple information of each data packet is separately obtained from all the received data packets; and the quintuple information is received from all the data packets according to the quintuple information of each data packet. Obtaining a plurality of data packets of the session to be analyzed in the received data packet.
  • each session refers to communication between two network devices.
  • at least one obtained session may be selected as a session to be analyzed for analysis, and session feature information of the session to be analyzed is obtained.
  • the communication parties of the session are the first network device and the second network device, and when one data packet is the IP address of the first network device.
  • the IP address of the second network device is used as the destination IP address
  • the port number of the first network device is used as the source port number
  • the port number of the second network device is used as the destination port number. It belongs to the session to be analyzed.
  • the data packet of the session to be analyzed can be obtained based on the quintuple information of the received data packet.
  • All received data messages are sampled based on the session to obtain data messages of multiple sampling sessions;
  • the obtaining a plurality of data messages in the session to be analyzed includes:
  • the received data packets are very large. Generally, all the received data packet samples are analyzed. Since the embodiment of the present invention provides the session feature information analysis method, all received data packets are received. Based on session sampling, to ensure that all data packets belonging to the sampling session can be sampled in all received data messages, so that session-based feature information analysis can be realized.
  • the obtaining, by the data packet of the multiple sampling sessions, the data packet of the session to be analyzed includes:
  • the data packet of the session to be analyzed is obtained from all the received data packets.
  • the data packet is sent from the multiple sampling sessions. Obtaining the data packet of the session to be analyzed.
  • Multiple data packets of the device and multiple data packets sent from the second network device to the first network device are divided into one group, and multiple data packets in each group belong to the same session, and each A session is a communication between two network devices.
  • at least one obtained sampling session may be selected as a session to be analyzed for analysis, and session feature information of the session to be analyzed is obtained.
  • the sample of all received data messages based on the session includes:
  • Hash value is calculated by inputting quintuple information of the received data message a hash value, where the source IP address and the destination IP address are exchanged in the quintuple information of the received data packet, and the source port number and the destination port number are exchanged as input.
  • the received data message is sampled.
  • For a string to form an input value of the hash function calculate the positive hash value; swap the source IP address with the destination IP address, and swap the source port number and the destination port number, the transport layer protocol The position of the number is unchanged, and another input is obtained by composing another string to form a hash function, and an inverse hash value is calculated.
  • the sampling ratio m/n in the middle calculate the first hash of the positive hash value divided by the denominator m of the sampling ratio, and calculate the inverse hash value divided by the second remainder of the denominator m of the sampling ratio, and determine Whether the first remainder or the second remainder is a sampling remainder in the session sampling template, and sampling the data packet when the first remainder or the second remainder is a sampling remainder.
  • the preset session sampling template includes a sampling ratio m/n and m sampling remainders. The sampling ratio determines the proportion of data packets collected from a large number of received data messages, and the sampling remainder determines the sampling based on the session.
  • the sampling ratio in the session sampling template is 3/1000
  • the denominator of the sampling ratio is 1000
  • the first remainder obtained by dividing the positive hash value by 1000 is calculated
  • the inverse hash value is calculated by dividing
  • the second remainder obtained by 1000, the first remainder and the second remainder are in the range of 0 to 999.
  • the sampling ratio is 3/1000
  • three numbers are selected from 0 to 999 as the sampling remainder in the session sampling template. Assuming that three numbers 5, 386, and 857 are selected as the sample remainder, the data message is sampled when the first remainder is the sample remainder or the second preset is the sample remainder. Of course, more than 3 numbers can also be selected as the sample remainder.
  • the plurality of data packets sent from the first network device to the second network device and the plurality of data packets sent from the second network device to the first network device are divided into a group. Multiple data packets in each group belong to the same session, and each session refers to communication between two network devices.
  • the hash value is calculated based on the quintuple information, and the same set of hash values can be obtained, so that the same set of remainders can be calculated. That is, it can extract all the data packets in a session.
  • the positive hash value calculated according to the quintuple information of the data message in a session is A
  • the inverse hash value is B
  • the first remainder obtained by dividing the denominator of the sampling ratio is C
  • the second remainder is D.
  • the hash values calculated by the quintuple information of other data packets in the session are also A and B, but some data packets have a positive hash value of A and an inverse hash value of B.
  • the positive hash value of the data message is B
  • the inverse hash value is A
  • the remainder obtained by dividing the denominator of the sampling ratio is also C and D.
  • the quintuple information of the data message is very unevenly distributed in different regions, it can be from five yuan.
  • group information several input strings that form a hash function that are evenly distributed in different regions are selected to achieve uniform session sampling as much as possible. For example, a string of M bits in the IP address, a string of N bits in the port number, and a string combination of P bits in the transport layer protocol number are selected from the quintuple information to obtain M+N+P.
  • the bit string is an input string of a hash function, where M, N, and P are integers greater than zero.
  • the CRC16 hash function can be selected to calculate the hash value.
  • S102 Extract feature values of preset session features from each of the data packets.
  • the feature value of the preset session feature is extracted from each data packet in a session, and the feature value of the preset session feature extracted in all the data packets is analyzed, and the session feature information of the preset session feature of the session can be obtained.
  • the feature value of the preset session feature extracted from all data packets in the session is used as an analysis basis, and the pre-load carried in all data packets in the session is used. Set the feature value of the session feature as a whole. Only the feature values of the preset session features carried in a part of the data packets in one session are analyzed, and the session feature information of the preset session features of the session cannot be obtained.
  • the preset session feature may include one or more of the following: the number of uplink packets of the session, the number of downlink packets of the session, the number of TCP session flags per transmission control protocol, the reason for the termination of the session, and the maximum datagram. Length of the text, minimum data packet length, session uplink packet transmission speed, downlink packet transmission speed, Internet Control Message Protocol ICMP session echo message and echo response packet number. It should be noted that, in addition to the preset session features exemplified above, there are many preset session features with a session as a basic analysis unit, and the preset session features may be sessions extended from the IPFIX protocol according to actual needs.
  • the session feature indicator selected in the feature indicator may also be a feature set by the user according to actual needs, and is not described here.
  • the extracting the feature value of the preset session feature from each of the data messages includes:
  • the session feature indicator configured in the IP data stream information output IPFIX protocol is obtained as a preset session feature.
  • the preset session feature is an IP flow information export (IP Flow Information Export, Session characteristics configured in the IPFIX protocol.
  • IPFIX is a standard protocol published by The Internet Engineering Task Force (IETF) for measurement of flow information in a network.
  • the IPFIX protocol provides an output standard for data stream feature information.
  • the original IPFIX protocol indicator is used to describe the data flow.
  • the indicators in the original IPFIX protocol are extended, and a plurality of session feature indicators for describing the session are added.
  • the session feature to be counted is configured in the IPFIX protocol as a preset session feature.
  • the main extension is used to analyze the session feature indicators of the following session states: session server delay, session exception, session incomplete, hypertext transfer protocol HTTP session error, and the like.
  • Table 1 describes only the extended session feature indicators in the IPFIX protocol. You can also extend other session feature indicators that describe the session in the IPFIX protocol. The session feature indicators can be selected as the default session feature. I will not repeat them here.
  • the original IPFIX protocol also has session feature indicators that can be used to describe the session. As shown in table 2.
  • Table 1 provides an example of the session feature indicators in the IPFIX protocol. You can also analyze the session feature indicators of other description sessions in the IPFIX protocol based on actual requirements.
  • each data packet in the to-be-analyzed session is parsed separately, and the feature value of the preset session feature is extracted from the information carried in each data packet.
  • the preset session feature is the session uplink byte number and the downlink byte number
  • the number of bytes of each data packet in the session to be analyzed is extracted;
  • the preset session feature is a TCP session flag bit In the case of a number
  • the TCP flag bit carried in the data packet in the session to be analyzed is extracted.
  • the feature values of the other preset session features are extracted from each data packet of the session to be analyzed, and are similar to the foregoing examples, and are specifically executed according to the actual situation, and are not further described herein.
  • the feature value of the preset session feature when extracting the feature value from each data packet of the session to be analyzed according to the number of preset session features, only one preset may be extracted.
  • the feature value of the session feature may also be used to extract the feature values of the plurality of preset session features, which are not specifically limited herein.
  • the session feature information of the preset session feature of the to-be-analyzed session may be obtained.
  • the preset session feature is the number of uplink bytes and the number of downlink bytes
  • the number of bytes of each uplink data packet is summed to obtain the number of uplink bytes, and the byte of each downlink data packet.
  • the summation obtains the number of downlink bytes;
  • the preset session feature is the number of TCP session flags, each TCP session identifier extracted from the data packet is counted separately, and the number of each TCP session identifier is obtained. .
  • the preset session feature may also be the number of uplink data packets and the number of downlink data packets, and the number of uplink data packets and downlink data packets of the to-be-analyzed session are respectively collected according to the source IP address and the destination IP address.
  • the preset session feature can also be the number of TCP flag bits, and the number of each TCP flag bit is counted according to the flag bits carried in the data packet.
  • the feature values of other preset session features may be counted, and the session feature information of other preset session features may be obtained, and details are not described herein again.
  • the extracting the feature value of the preset session feature from each of the data packets includes: acquiring a session feature indicator configured in the IP data stream information output IPFIX protocol as a preset session feature.
  • the method further includes:
  • the feature information of the session to be analyzed is output in a standard format of the IPFIX protocol.
  • the standard output format of the session feature information is defined in the IPFIX protocol, which is convenient for the technician to extract and view the session feature information.
  • the Cisco Netflow Version 9 version is used as an example, and other versions of the standard output format may also be used, and details are not described herein again.
  • 2 is a schematic diagram of a format of an IPFIX protocol packet according to an embodiment of the present invention
  • FIG. 3 is one of output templates of a data standard output format of the IPFIX protocol, Netflow V9.
  • the embodiment of the present invention provides a feature information analysis method, which acquires a plurality of data packets in a session to be analyzed, extracts feature values of preset session features from each of the data packets, and obtains the feature values by statistics.
  • the session feature information of the session to be analyzed in the embodiment of the present invention, the session is used as a basic analysis unit, and the overall analysis of the session is implemented, and the session feature information that can fully reflect the session is obtained.
  • FIG. 3 is a flowchart of a network attack detection method according to an embodiment of the present invention, where the method includes:
  • S301 Analyze session feature information of all the sessions to be analyzed acquired in the preset time interval.
  • the session feature information is obtained by using the feature information analysis method provided by the embodiment of the present invention shown in FIG. 1 , and the specific description of the feature information analysis method shown in FIG. 1 is referred to, and details are not described herein again.
  • S302 Detect a network session attack in the preset time interval according to the session feature information.
  • S301 obtains the session feature information of all the sessions to be analyzed in the preset time interval. By comprehensively analyzing the session feature information of all the sessions to be analyzed, it is possible to detect whether there is a network session attack within the preset time interval. It can be understood that analyzing different session feature information can detect different kinds of network session attacks.
  • the detecting the network session attack in the preset time interval according to the session feature information has at least four possible implementation manners.
  • the four possible implementation manners are described below.
  • the detecting, according to the session feature information, the network session attack in the preset time interval includes:
  • the network session attack within the preset time interval is identified.
  • the number of incomplete sessions is counted according to the session feature information.
  • a network session attack occurs within the preset time interval.
  • the first preset threshold may be set according to the actual situation. For example, the first preset threshold may be set to 60%.
  • the attack type of the network session attack, the attack source device, and the attack target device can be analyzed according to the session feature information.
  • the definition of the incomplete session is different, and the type of the session attack identified is different.
  • the session feature information includes an uplink data packet number and a downlink data packet number
  • the incomplete session is a session to be analyzed in which the number of uplink data packets is greater than 1, and the number of downlink data packets is 0.
  • the session feature information includes a transmission control protocol TCP flag bit
  • the incomplete session is a session to be analyzed in which the TCP flag is incomplete.
  • the TCP flood session attack is likely to occur during this preset time interval.
  • other session feature information may also describe an incomplete session, and the type of session attack received according to the session feature information is not described here.
  • the session feature information includes the number of echo packets and the number of echo reply packets in the ICMP session of the network control packet protocol;
  • the detecting, according to the session feature information, the network session attack in the preset time interval includes:
  • the second ratio of the echo message and the echo reply message in the ICMP session obtained in the preset time interval is calculated according to the session feature information
  • the ICMP protocol session attack within the preset time interval is identified.
  • the echo message and the echo reply message in the session should be the same in theory. If there is an echo message, there should be an echo reply message. .
  • the ratio of the echo message and the echoreply message in the ICMP session should be approximately 1, that is, the preset value range can be set to 0.8 to 1.2. Of course, the preset value range can also be set to other ranges, so that the number of echo messages and echo reply messages in the ICMP session is not much different.
  • the number of echo packets exceeds the number of echo reply packets, or the number of echo reply packets exceeds the number of echo reply packets.
  • Number of echo messages Identifying the presence of the network during the preset time interval ICMP network attack.
  • the detecting, according to the session feature information, the network session attack in the preset time interval includes:
  • the number of the denial of service sessions in the preset time interval is calculated according to the session feature information, where the denial of service session is the to-be-analyzed session that includes the HTTP error code information in the session feature information;
  • the CC session attack within the preset event interval is identified.
  • the session to be analyzed is an HTTP denial of service session.
  • the session feature Application Error Code the number of HTTP denial of service sessions is counted.
  • a CC (Challenge Collapsar) session attack may exist in the identified network.
  • the detecting, according to the session feature information, the network session attack in the preset time interval includes:
  • session fragmentation abnormality information Determining whether the session feature information of each of the to-be-analyzed sessions collected in the preset time interval includes any one or more of the following conditions: session fragmentation abnormality information, and the session fragmentation abnormality information includes The slice is incomplete, the slice overlaps, and the slice flag is in error;
  • the session feature information of the session to be analyzed includes session fragmentation abnormality information
  • the session to be analyzed is identified as a fragmentation attack session within the preset time interval.
  • the session to be analyzed is a fragmentation abnormal session.
  • the session to be analyzed is a fragmentation abnormal session.
  • the fragmentation exception information includes:
  • fragmentation is incomplete, that is, a fragment is missing from the session
  • Fragment Offset Error overlapping of slices, that is, overlapping data information in the previous slice and the next slice;
  • Fragment Flag Error flag bit error, that is, the flag bit in different slices is set at the same time.
  • the fragmentation exception information includes: the first fragment is too short, that is, the first fragment is less than 1400 bytes; the fragment is too long, that is, the fragment carrying the fragment identifier exceeds 1500 bytes. There may also be other fragmentation exception information, which will not be repeated here.
  • the network session attack in the preset time interval is detected according to the session feature information.
  • the reason for the session termination may be counted. If a preset session interval occurs, a large number of session terminations occur.
  • the network session attack may be identified.
  • the maximum packet length and the minimum packet length may be counted. When a large number of packets to be analyzed have the same maximum packet length and minimum packet length, the network session attack may be identified.
  • the uplink data transmission rate and the downlink data transmission rate of the session to be analyzed are counted to assist in identifying network session attacks.
  • the session feature information in the embodiment of the present invention may be outputted by using a standard output format in the IPFIX protocol. It should be noted that there are still many types of session feature information, which are not enumerated here. Different types of session feature information can identify different types of network session attacks.
  • the method further includes:
  • an attack event is generated according to the session feature information of the session to be analyzed
  • An attack suppression policy is generated according to the attack event.
  • an attack event can be generated based on the session feature information.
  • An attack attack is generated to generate an attack suppression policy.
  • the attack source device, attack service, and attacked device can also be identified.
  • FIG. 3 An application scenario of the network attack detection method provided by the embodiment of the present invention shown in FIG. 3 is illustrated below.
  • a switch in an SDN network based on session sampling for all received data packets to obtain data packets of a plurality of sampling sessions; obtaining the data packets from the plurality of sampling sessions A plurality of data packets of the session to be analyzed; extracting feature values of the preset session features from each of the data packets; and collecting the feature values to obtain session feature information of the session to be analyzed, and the session feature information Output to the attack detection device in the SDN network using the standard format in the IPFIX protocol.
  • the attack detection device in the SDN network analyzes the session feature information of all the sessions to be analyzed obtained in the preset time interval, and detects the network session attack in the preset time interval according to the session feature information, and identifies the network session attack. When an attack event is generated, it is sent to the SDN network controller.
  • the SDN network controller generates an attack suppression policy according to the received attack event and sends it to the switch in the SND network to suppress the session attack in the SDN network.
  • the CUSUM algorithm is used to count a large amount of session feature information
  • the session feature information When the session feature information is counted, statistics can be performed on the network concurrent session, the session server delay, the session connection rate, and the abnormal session.
  • the embodiment of the present invention further provides a network attack detection method and system, and detects a network session attack in the preset time interval according to the session feature information of the session to be analyzed acquired in a preset time interval, and solves the prior art based on the data flow.
  • the feature information cannot detect the problem of session attack in the network, and effectively detects the session attack in the network, and improves the completeness of the network attack detection.
  • FIG. 4 is a schematic structural diagram of a feature information analysis apparatus according to an embodiment of the present disclosure, where the apparatus includes:
  • the first obtaining unit 401 is configured to acquire multiple data packets in the session to be analyzed.
  • the first obtaining unit 401 includes:
  • a first acquiring subunit configured to obtain, from all the received data packets, quintuple information of each data packet
  • the second obtaining sub-unit is configured to obtain, according to the quintuple information of each data packet, the data packet of the to-be-analyzed session from all the received data packets.
  • the apparatus further includes:
  • a sampling unit configured to sample all received data packets based on a session to obtain data packets of multiple sampling sessions
  • the first obtaining unit 401 is specifically configured to acquire multiple data packets of the to-be-analyzed session from the data packets of the multiple sampling sessions.
  • the first obtaining unit 401 includes:
  • a third obtaining subunit configured to obtain, from the data packets of the multiple sampling sessions, quintuple information of each data packet
  • a fourth obtaining subunit configured to obtain, according to the quintuple information of each data packet, the data packet of the to-be-analyzed session from the data packet of the multiple sampling sessions.
  • the sampling unit includes:
  • a parsing subunit configured to parse quintuple information of each of the received data messages
  • a first calculating subunit configured to calculate a positive hash value and an inverse hash value of the received data message by using the quintuple information, where the positive hash value is five of the received data message
  • the tuple information is a hash value calculated by inputting, and the anti-hash value is a location in which the source IP address and the destination IP address are exchanged, and the source port number and the destination port are in the quintuple information of the received data packet.
  • the hash value calculated as an input after the position is changed;
  • a second calculating subunit configured to calculate a first remainder obtained by dividing the positive hash value by a preset sampling parameter in a preset session sampling template, and calculating the inverse hash value by the session sampling template a second remainder obtained by the preset sampling parameter, wherein the preset sampling parameter is a denominator of a sampling ratio in the session sampling template;
  • a determining subunit configured to determine whether the first remainder or the second remainder is a preset sampling remainder in the session sampling template
  • sampling subunit configured to sample the received data message when the first remainder or the second remainder is a preset sampling remainder in the session sampling template.
  • the extracting unit 402 is configured to extract a feature value of the preset session feature from each of the data messages.
  • the statistic unit 403 is configured to collect the feature value to obtain session feature information of the session to be analyzed.
  • the device further includes:
  • a second acquiring unit configured to acquire a session feature configured in the IPFIX protocol as a preset feature.
  • the device further includes:
  • an output unit configured to output feature information of the session to be analyzed in a standard format of the IPFIX protocol.
  • the feature information analyzing device shown in FIG. 4 is a device corresponding to the feature information analyzing method shown in FIG. 1, and the description is made in the feature analyzing method described in FIG. 1, and details are not described herein again.
  • FIG. 5 is a schematic structural diagram of a network attack detection system according to an embodiment of the present disclosure, where the system includes:
  • the feature analyzing device 501 shown in FIG. 4 is configured to analyze session feature information of all the sessions to be analyzed acquired in a preset time interval.
  • the detecting device 502 is configured to detect a network session attack in the preset time interval according to the session feature information.
  • the first possible structure of the detecting device 502 includes:
  • a first statistic unit configured to collect, according to the session feature information, a first proportion of incomplete sessions in all the sessions to be analyzed acquired in the preset time interval
  • a first determining unit configured to determine whether the first ratio exceeds a first preset threshold
  • the first identifying unit is configured to identify a network session attack in the preset time interval when a first proportion of the incomplete session exceeds a first preset threshold.
  • scenario one In the first possible structure, scenario one:
  • the session feature information includes an uplink packet byte number and a downlink packet byte number
  • the incomplete session is a session to be analyzed in which the number of uplink data packets is greater than 1, and the number of downlink data packets is 0.
  • scenario two In the first possible structure, scenario two:
  • the session feature information includes a transmission control protocol TCP flag bit
  • the incomplete session is a session to be analyzed in which the TCP flag is incomplete.
  • the second possible structure of the detecting device 502 includes:
  • the session feature information includes the number of echo packets sent back in the ICMP session of the network control packet and the number of echo reply packets sent back;
  • a second statistic unit configured to calculate, according to the session feature information, a second ratio of the echo message and the echo reply message in the ICMP session obtained in the preset time interval;
  • a second determining unit configured to determine whether the second ratio is within a preset value range
  • the second identifying unit is configured to identify an ICMP session attack within the preset time interval when the second ratio is not within a preset value range.
  • a third possible structure of the detecting device 502 includes:
  • a third statistic unit configured to count, according to the session feature information, the number of denial of service sessions in the preset time interval, where the denial of service session is the to-be-analyzed information containing hypertext transfer protocol HTTP error code information in the session feature information Conversation
  • a third determining unit configured to determine whether the number of the denial of service sessions exceeds a second preset threshold
  • the third identifying unit is configured to identify a CC session attack within the preset event interval when the number of the denial of service sessions exceeds a second preset threshold.
  • the fourth possible structure of the detecting device 502 includes:
  • a fourth determining unit configured to determine each of the to-be-scores collected in the preset time interval Whether the session feature information of the session includes session fragmentation abnormality information, where the session fragmentation abnormality information includes any one or more of fragmentation incomplete, fragmentation overlap, and fragmentation flag bit error;
  • a fourth identifying unit configured to: when the session feature information of the to-be-analyzed session includes session fragmentation abnormality information, identify the to-be-analyzed session as a fragmentation attack session in the preset time interval.
  • system further comprises:
  • the defense device is configured to generate an attack event according to the session feature information of the to-be-analyzed session when the network session attack in the preset time interval is detected, and generate an attack suppression policy according to the attack event.
  • the system also includes:
  • the attack identification device is configured to identify the attack source device, the attack service, and the attacked device according to the attack event.
  • the session feature information adopts a standard output format of the IPFIX protocol.
  • the network attack detection system shown in FIG. 5 is a system corresponding to the network attack detection method shown in FIG. 2, and is described in the network attack detection method described in FIG. 2, and details are not described herein again.
  • FIG. 6 is a schematic diagram of a hardware structure of a feature information analyzing apparatus according to an embodiment of the present invention.
  • the feature information analyzing apparatus includes a memory 601, and a processor 602 connected to the memory 601, where the memory 601 is used.
  • a set of program instructions are stored, and the processor 602 is configured to invoke the program instructions stored by the memory 601 to perform the following operations:
  • the method before extracting the feature value of the preset session feature from each of the data packets, the method includes:
  • it also includes:
  • the obtaining a plurality of data messages in the session to be analyzed includes:
  • the method before the obtaining the multiple data packets in the session to be analyzed, the method further includes:
  • All received data messages are sampled based on the session to obtain data messages of multiple sampling sessions;
  • the obtaining a plurality of data messages in the session to be analyzed includes:
  • the obtaining the data packet of the to-be-analyzed session from the data packet of the multiple sampling sessions includes:
  • the sampling based on the session for all received data messages includes:
  • Hash value is calculated by inputting quintuple information of the received data message a hash value, where the source IP address and the destination IP address are exchanged in the quintuple information of the received data packet, and the source port number and the destination port number are exchanged as input.
  • the received data message is sampled.
  • FIG. 7 is a schematic diagram of a hardware structure of a network attack detection system according to an embodiment of the present invention.
  • the network attack detection system is located in a network, and the network further includes multiple routers, and adjacent routers among the multiple routers. Connected by a link having a certain bandwidth, the plurality of routers form a network topology through the link, the network attack detection system includes a memory 701, and a processor 702 connected to the memory 701, the memory 701 For storing a set of program instructions, the processor 702 is configured to invoke the program instructions stored by the memory 701 to perform the following operations:
  • the detecting, according to the session feature information, the network session attack in the preset time interval includes:
  • the session feature information includes an uplink data packet number and a downlink data packet number.
  • the incomplete session is a session to be analyzed in which the number of uplink data packets is greater than 1, and the number of downlink data packets is 0;
  • the session feature information includes a transmission control protocol TCP flag bit.
  • the incomplete session is a session to be analyzed in which the TCP flag is incomplete
  • the session feature information includes an echo in a network control packet protocol ICMP session. Number of packets and number of echo reply packets;
  • the detecting, according to the session feature information, the network session attack in the preset time interval includes:
  • the second ratio of the echo message and the echo reply message in the ICMP session obtained in the preset time interval is calculated according to the session feature information
  • the detecting, according to the session feature information, the network session attack in the preset time interval includes:
  • the number of the denial of service sessions in the preset time interval is calculated according to the session feature information, where the denial of service session is the to-be-analyzed session that includes hypertext transfer protocol HTTP error code information in the session feature information;
  • the detecting, according to the session feature information, the network session attack in the preset time interval includes:
  • session feature information of each of the to-be-analyzed sessions collected in the preset time interval includes session fragmentation abnormality information, where the session fragmentation abnormality information includes fragmentation incomplete, slice overlap, and fragmentation flag Any one or more of the bit errors;
  • the session feature information of the session to be analyzed includes session fragmentation abnormality information
  • the session to be analyzed is identified as a fragmentation attack session in the preset time interval
  • the method further includes:
  • an attack event is generated according to the session feature information of the session to be analyzed
  • the method further includes:
  • the attack source device, the attack service, and the attacked device are identified according to the attack event.
  • the session feature information adopts a standard output format of the IPFIX protocol.
  • the processor may be a central processing unit (CPU), and the memory may be an internal memory of a random access memory (RAM) type.
  • the processor and the memory may be integrated into one or more independent circuits or hardware, such as an Application Specific Integrated Circuit (ASIC).
  • ASIC Application Specific Integrated Circuit
  • the first host device mentioned in the embodiment of the present invention and the "first" of the first interface are only used for name identification, and do not represent the first in the order. The same rules apply to "second" and "third".

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种特征信息分析方法及装置,包括以下特征:获取待分析会话中的多个数据报文(101);从每个所述数据报文中提取预设会话特征的特征值(102);统计所述特征值获得所述待分析会话的会话特征信息(103),实施例中,以会话为基本分析单位,实现了对会话进行整体分析,得到可以全面反映会话的会话特征信息;实施例还提供了网络攻击检测方法及系统,根据预设时间间隔内获取的待分析会话的会话特征信息检测该预设时间间隔内的网络会话攻击,解决了现有技术中基于数据流的特征信息无法检测网络中会话攻击的问题,实现了对网络中会话攻击的有效检测,提高了网络攻击检测的完备性。

Description

一种特征信息分析方法及装置 技术领域
本发明涉及通信技术领域,尤其是涉及一种特征信息分析方法及装置。
背景技术
目前,一般采用数据流描述的互联网中数据的传输,一个数据流(data stream)是指按照规定顺序被读取一次的数据报文序列。属于同一个数据流的多个数据报文的五元组信息都相同,五元组信息包括源互联网协议IP地址、目的IP地址、源端口号、目的端口号和传输层协议号。
通过对一个数据流中的数据报文序列所携带的信息进行分析,可以获得该数据流的特征信息。对多条数据流的特征信息进行综合分析,可以了解网络中数据传输的运行状况。例如:分析网络中数据流的持续时间,可以了解网络数据传输速度;分析网络中数据流的报文长度,可以进行网络流量计费;分析网络中数据流的IP地址等信息,可以进行网络安全检测。
由此可知,本领域技术人员在进行网络运行状况分析时,以数据流为基本分析单位,但是基于数据流的特征信息只能分析得到部分网络运行状况。
发明内容
本发明实施例提供特征信息分析方法及装置,以会话为基本分析单位,获得会话特征信息,解决了数据流的特征信息只能分析部分网络运行状况的问题。
本发明实施例第一方面提供了一种特征信息分析方法,所述方法包括:
获取待分析会话中的多个数据报文;
从每个所述数据报文中提取预设会话特征的特征值;
统计所述特征值获得所述待分析会话的会话特征信息。
在本发明实施例第一方面的第一种可能的实现方式中,所述从每个所述数据报文中提取预设会话特征的特征值前包括:
获取在IP数据流信息输出IPFIX协议中所配置的会话特征指标作为预设会话特征。
结合本发明实施例第一方面的第一种可能的实现方式,在第二种可能的实现方式中,所述方法还包括:
将所述待分析会话的特征信息采用所述IPFIX协议的标准格式输出。
结合本发明实施例第一方面至第一方面的第二种可能的实现方式,在第三种可能的实现方式中,所述获取待分析会话中的多个数据报文包括:
从所有接收到的数据报文中,分别获取每个数据报文的五元组信息;
基于所述每个数据报文的五元组信息,从所有接收到的数据报文中获取所述待分析会话的多个数据报文。
结合本发明实施例第一方面至第一方面的第二种可能的实现方式,在第四种可能的实现方式中,所述获取待分析会话中的多个数据报文前还包括:
对所有所接收的数据报文基于会话抽样,以得到多个抽样会话的数据报文;
所述获取待分析会话中的多个数据报文包括:
从所述多个抽样会话的数据报文中获取所述待分析会话的多个数据报文。
结合本发明实施例第一方面第四种可能的实现方式,在第五种可能的实现方式中,所述从所述多个抽样会话的数据报文中获取所述待分析会话的数据报文包括:
从所述多个会话的数据报文中,分别获取每个数据报文的五元组信息;
基于所述每个数据报文的五元组信息,从所述多个会话的数据报文中获取所述待分析会话的数据报文。
结合本发明实施例第一方面第四种可能的实现方式,在第六种可能的 实现方式中,所述对所有所接收的数据报文基于会话抽样包括:
解析每个所述接收的数据报文的五元组信息;
利用所述五元组信息计算所述接收的数据报文的正哈希值和反哈希值,所述正哈希值是以所接收的数据报文的五元组信息为输入计算所得的哈希值,所述反哈希值是将所接收的数据报文的五元组信息中,源IP地址和目的IP地址调换位置,并且源端口号和目的端口号调换位置后作为输入计算所得的哈希值;
计算所述正哈希值除以预设的会话抽样模板中的预设采样参数所得的第一余数,计算所述反哈希值除以所述会话抽样模板中的预设采样参数所得的第二余数,所述预设采样参数为所述会话抽样模板中抽样比例的分母;
判断所述第一余数或所述第二余数是否为所述会话抽样模板中的预设采样余数;
当所述第一余数或第二余数是所述会话抽样模板中的预设采样余数时,对所述接收的数据报文进行抽样。
本发明实施例第二方面提供了网络攻击检测方法,所述方法包括:
分析预设时间间隔内获取的所有待分析会话的会话特征信息,所述会话特征信息利用本发明实施例提供的第一方面至第一方面第六种可能的实现方式中所述的方法分析获得;
根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击。
在本发明实施例第二方面第一种可能的实现方式中,所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
根据所述会话特征信息统计所述预设时间间隔内所获取的所有待分析会话中不完整会话所占的第一比例;
判断所述第一比例是否超过第一预设阈值;
当不完整会话所占的第一比例超过第一预设阈值时,识别所述预设时间间隔内的网络会话攻击。
结合本发明实施例第二方面第一种可能的实现方式,在第二种可能的 实现方式中,
所述会话特征信息包括上行数据报文数和下行数据报文数;
所述不完整会话为所述上行数据报文数大于1,并且所述下行数据报文数为0的待分析会话。
结合本发明实施例第二方面第一种可能的实现方式,在第三种可能的实现方式中,
所述会话特征信息包括传输控制协议TCP标志位;
所述不完整会话为所述TCP标志位不完整的待分析会话。
在本发明实施例第二方面第四种可能的实现方式中,
所述会话特征信息包括网络控制报文协议ICMP会话中echo报文数和echo reply报文数;
所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
根据会话特征信息统计预设时间间隔内所获取的ICMP会话中echo报文与echo reply报文的第二比例;
判断所述第二比例是否在预设数值范围内;
当所述第二比例不在预设数值范围内时,识别所述预设时间间隔内的ICMP会话攻击。
在本发明实施例第二方面第五种可能的实现方式中,所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
根据会话特征信息统计所述预设时间间隔内拒绝服务会话的个数,所述拒绝服务会话为会话特征信息中包含超文本传输协议HTTP错误码信息的所述待分析会话;
判断所述拒绝服务会话的个数是否超过第二预设阈值;
当所述拒绝服务会话的个数超过第二预设阈值时,识别所述预设事件间隔内的CC会话攻击。
在本发明实施例第六种可能的实现方式中,所述根据所述会话特征信 息检测所述预设时间间隔内的网络会话攻击包括:
判断所述预设时间间隔内所采集的每个所述待分析会话的会话特征信息是否包含会话分片异常信息,所述会话分片异常信息包括分片不完整,分片重叠以及分片标志位出错中任意一种或多种;
当所述待分析会话的会话特征信息包含会话分片异常信息时,识别该待分析会话为所述预设时间间隔内的分片攻击会话。
结合本发明实施例第二方面至第二方面的第六种可能的实现方式,在第七种可能的实现方式中,所述方法还包括:
当检测到所述预设时间间隔内的网络会话攻击时,根据所述待分析会话的会话特征信息生成攻击事件;
根据所述攻击事件生成攻击抑制策略。
结合本发明实施例第二方面第七种可能的实现方式,在第八种可能的实现方式中,所述方法还包括:
根据所述攻击事件识别攻击源设备,攻击业务以及被攻击设备。
结合本发明实施例第二方面至第二方面第八种可能的实现方式,在第九种可能的实现方式中,所述会话特征信息采用IPFIX协议的标准输出格式。
本发明实施例第三方面提供了特征信息分析装置,所述装置包括:
第一获取单元,用于获取待分析会话中的多个数据报文;
提取单元,用于从每个所述数据报文中提取预设会话特征的特征值;
统计单元,用于统计所述特征值获得所述待分析会话的会话特征信息。
在本发明实施例第三方面第一种可能的实现方式中,所述装置还包括:
第二获取单元,用于获取在IPFIX协议中所配置的会话特征作为预设特征。
结合本发明实施例第三方面第一种可能的实现方式,在第二种可能的实现方式中,所述装置还包括:
输出单元,用于将所述待分析会话的特征信息采用所述IPFIX协议的 标准格式输出。
结合本发明实施例第三方面至第三方面第二种可能的实现方式,在第三种可能的实现方式中,所述第一获取单元包括:
第一获取子单元,用于从所有接收到的数据报文中,分别获取每个数据报文的五元组信息;
第二获取子单元,用于基于所述每个数据报文的五元组信息,从所有接收到的数据报文中获取所述待分析会话的数据报文。
结合本发明实施例第三方面至第三方面第二种可能的实现方式,在第四种可能的实现方式中,所述装置还包括:
抽样单元,用于对所有所接收的数据报文基于会话抽样,以得到多个抽样会话的数据报文;
所述第一获取单元,具体用于从所述多个抽样会话的数据报文中获取所述待分析会话的多个数据报文。
结合本发明实施例第四种可能的实现方式,在第五种可能的实现方式中,所述第一获取单元包括:
第三获取子单元,用于从所述多个抽样会话的数据报文中,分别获取每个数据报文的五元组信息;
第四获取子单元,用于基于所述每个数据报文的五元组信息,从所述多个抽样会话的数据报文中获取所述待分析会话的数据报文。
结合本发明实施例第四种可能的实现方式,在第六种可能的实现方式中,所述抽样单元包括:
解析子单元,用于解析每个所述接收的数据报文的五元组信息;
第一计算子单元,用于利用所述五元组信息计算所述接收的数据报文的正哈希值和反哈希值,所述正哈希值是以所接收的数据报文的五元组信息为输入计算所得的哈希值,所述反哈希值是将所接收的数据报文的五元组信息中,源IP地址和目的IP地址调换位置,并且源端口号和目的端口号调换位置后作为输入计算所得的哈希值;
第二计算子单元,用于计算所述正哈希值除以预设的会话抽样模板中的预设采样参数所得的第一余数,计算所述反哈希值除以所述会话抽样模板中的预设采样参数所得的第二余数,所述预设采样参数为所述会话抽样模板中抽样比例的分母;
判断子单元,用于判断所述第一余数或所述第二余数是否为所述会话抽样模板中的预设采样余数;
抽样子单元,用于当所述第一余数或第二余数是所述会话抽样模板中的预设采样余数时,对所述接收的数据报文进行抽样。
本发明实施例第四方面提供了网络攻击检测系统,所述系统包括:
本发明实施例第三方面至第三方面第六种可能的实现方式所述的特征信息分析装置,用于分析预设时间间隔内获取的所有待分析会话的会话特征信息;
检测装置,用于根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击。
在本发明实施例第四方面第一种可能的实现方式中,所述检测装置包括:
第一统计单元,用于根据所述会话特征信息统计所述预设时间间隔内所获取的所有待分析会话中不完整会话所占的第一比例;
第一判断单元,用于判断所述第一比例是否超过第一预设阈值;
第一识别单元,用于当不完整会话所占的第一比例超过第一预设阈值时,识别所述预设时间间隔内的网络会话攻击。
结合本发明实施例第四方面第一种可能的实现方式,在第二种可能的实现方式中,所述会话特征信息包括上行报文字节数和下行报文字节数;
所述不完整会话为所述上行数据报文数大于1,并且所述下行数据报文数为0的待分析会话。
结合本发明实施例第四方面第一种可能的实现方式,在第三种可能的实现方式中,所述会话特征信息包括传输控制协议TCP标志位;所述不完整会话为所述TCP标志位不完整的待分析会话。
在本发明实施例第四方面第四种可能的实现方式中,所述会话特征信息包括网络控制报文协议ICMP会话中回送echo报文数和回送响应echoreply报文数;
所述检测装置包括:
第二统计单元,用于根据会话特征信息统计预设时间间隔内所获取的ICMP会话中echo报文与echo reply报文的第二比例;
第二判断单元,用于判断所述第二比例是否在预设数值范围内;
第二识别单元,用于当所述第二比例不在预设数值范围内时,识别所述预设时间间隔内的ICMP会话攻击。
在本发明实施例第五种可能的实现方式中,所述检测装置包括:
第三统计单元,用于根据会话特征信息统计所述预设时间间隔内拒绝服务会话的个数,所述拒绝服务会话为会话特征信息中包含超文本传输协议HTTP错误码信息的所述待分析会话;
第三判断单元,用于判断所述拒绝服务会话的个数是否超过第二预设阈值;
第三识别单元,用于当所述拒绝服务会话的个数超过第二预设阈值时,识别所述预设事件间隔内的CC会话攻击。
在本发明实施例第六种可能的实现方式中,所述检测装置包括:
第四判断单元,用于判断所述预设时间间隔内所采集的每个所述待分析会话的会话特征信息是否包含会话分片异常信息,所述会话分片异常信息包括分片不完整,分片重叠以及分片标志位出错中任意一项或多种;
第四识别单元,用于当所述待分析会话的会话特征信息包含会话分片异常信息时,识别该待分析会话为所述预设时间间隔内的分片攻击会话。
结合本发明实施例第三方面至第三方面第六种可能的实现方式,在第七种可能的实现方式中,所述系统还包括:
防御装置,用于当检测到所述预设时间间隔内的网络会话攻击时,根据所述待分析会话的会话特征信息生成攻击事件;根据所述攻击事件生成 攻击抑制策略。
结合本发明实施例第三方面第七种可能的实现方式,在第八种可能的实现方式中,所述系统还包括:
攻击识别装置,用于根据所述攻击事件识别攻击源设备,攻击业务以及被攻击设备。
结合本发明实施例第三方面至第三方面第八种可能的实现方式,在第九种可能的实现方式中,所述会话特征信息采用IPFIX协议的标准输出格式。
由上述技术方案可以看出,本发明有如下有益效果:
本发明实施例开创性的提供了特征信息分析方法及装置,获取待分析会话中的多个数据报文;从每个所述数据报文中提取预设会话特征的特征值;统计所述特征值获得所述待分析会话的会话特征信息,本发明实施例中,以会话为基本分析单位,实现了对会话进行整体分析,得到可以全面反映会话的会话特征信息;
本发明实施例还提供了网络攻击检测方法及系统,根据预设时间间隔内获取的待分析会话的会话特征信息检测该预设时间间隔内的网络会话攻击,解决了现有技术中基于数据流的特征信息无法检测网络中会话攻击的问题,实现了对网络中会话攻击的有效检测,提高了网络攻击检测的完备性。
附图说明
图1为本发明实施例提供的特征信息分析方法流程图;
图2为本发明实施例提供的IPFIX协议报文格式示意图;
图3为本发明实施例提供的网络攻击检测方法流程图;
图4为本发明实施例提供的特征信息分析装置结构示意图;
图5为本发明实施例提供的网络攻击检测系统结构示意图;
图6为本发明实施例提供的特征信息分析装置的硬件结构示意图;
图7为本发明实施例提供的网络攻击检测系统硬件结构示意图。
具体实施方式
现有技术中,对某个网络的运行状况分析时,主要是以数据流为基本单位,获取该网络中传输的多条数据流,对所获取的多条数据流的特征信息进行综合分析,获得该网络的运行状况。基于数据流进行分析,无法分析网络的接通概率,无法检测网络的会话攻击,无法分析网络的异常会话等。
为了解决上述技术问题,本发明实施例开创性的提供了会话特性信息的分析方法及装置,以会话为基本分析单位,为实现对网络的运行状况的全面分析,尤其是对网络中会话攻击的全面分析提供重要的数据信息。
为使本发明实施例的目的、技术方案和优点更加清楚,下面结合附图对本发明实施例进行详细说明。
图1为本发明实施例提供的特征信息分析方法流程图,所述方法包括:
S101:获取待分析会话中的多个数据报文。
在网络应用中,一个会话(session)指的是在一个不中断的特定操作时间内,两个网络设备之间的通信交互。第一网络设备和第二网络设备之间可以建立会话,从而在所述第一网络设备和所述第二设备之间传输多个数据报文。同一个会话的多个数据报文的五元组信息具有以下特征:同一个会话的多个数据报文的源IP地址为第一网络设备的IP地址或第二网络设备的IP地址,同一个会话的多个数据报文的目的IP地址为第一网络设备的IP地址或第二网络设备IP地址,同一个会话的多个数据报文的源端口号为第一网络设备的端口号或第二网络设备的端口号,同一个会话的多个数据报文的目的端口号为第一网络设备的端口号或第二网络设备的端口号,同一个会话的多个数据报文的所采用的传输层协议号相同。
也就是说,从所述第一网络设备发往所述第二网络设备的数据报文的五元组信息为(第一网络设备的IP地址,第一网络设备的端口号,第二网络设备的IP地址,第二网络设备的端口号,传输层协议号),即,从所述 第一网络设备发往所述第二网络设备的数据报文的源IP地址为所述第一网络设备的IP地址,从所述第一网络设备发往所述第二网络设备的数据报文的源端口号为所述第一网络设备的端口号,从所述第一网络设备发往所述第二网络设备的数据报文的目的IP地址为所述第二网络设备的IP地址,从所述第一网络设备发往所述第二网络设备的数据报文的目的端口号为所述第二网络设备的端口号,从所述第一网络设备发往所述第二网络设备的数据报文的传输层协议号为所述第一网络设备与所述第二网络设备之间传输这些数据报文所使用的传输层协议的编号。从所述第二网络设备发往所述第一网络设备的数据报文的五元组信息为(第二网络设备的IP地址,第二网络设备的端口号,第一网络设备的IP地址,第一网络设备的端口号,传输层协议号),即,从所述第二网络设备发往所述第一网络设备的数据报文的源IP地址为所述第二网络设备的IP地址,从所述第二网络设备发往所述第一网络设备的数据报文的源端口号为所述第二网络设备的端口号,从所述第二网络设备发往所述第一网络设备的数据报文的目的IP地址为所述第一网络设备的IP地址,从所述第二网络设备发往所述第一网络设备的数据报文的目的端口号为所述第一网络设备的端口号,从所述第二网络设备发往所述第一网络设备的数据报文的传输层协议号为所述第一网络设备与所述第二网络设备之间传输这些数据报文所使用的传输层协议的编号。从所述第一网络设备发往所述第二网络设备的数据报文与从所述第二网络设备发往所述第一网络设备的数据报文中所携带的传输层协议号相同。
本发明实施例中,所述获取待分析会话中的多个数据报文,至少有如下两种可能的实施方式:
在第一种可能的实施方式中,从所有接收到的数据报文中,分别获取每个数据报文的五元组信息;基于所述每个数据报文的五元组信息,从所有接收到的数据报文中获取所述待分析会话的多个数据报文。
对所有接收到的数据报文,解析每个数据报文的五元组信息,基于五元组信息对所有接收到的数据报文分组,将从第一网络设备发往第二网络设备的多个数据报文及从所述第二网络设备发往所述第一网络设备的多个数据报文划分到一个组,每个组中的多个数据报文属于同一个会话,最终 得到多个会话,每个会话是指两个网络设备之间的通信。在实际应用中,可以选取至少一个所得到的会话作为待分析会话进行分析,获得待分析会话的会话特征信息。
在获取待分析会话的多个数据报文时,对于一个待分析会话来说,该会话的通信双方为第一网络设备和第二网络设备,当一个数据报文以第一网络设备的IP地址作为源IP地址,以第二网络设备的IP地址作为目的IP地址,以第一网络设备的端口号作为源端口号,以第二网络设备的端口号作为目的端口号时,该数据报文则属于所述待分析会话。基于所接收到的数据报文的五元组信息,即可获得所述待分析会话的数据报文。
在第二种可能的实施方式中,
对所有所接收的数据报文基于会话抽样,以得到多个抽样会话的数据报文;
所述获取待分析会话中的多个数据报文包括:
从所述多个抽样会话的数据报文中获取所述待分析会话的多个数据报文。
一般情况下,所接收的数据报文非常多,通常采取对所有所接收的数据报文采样进行分析,由于本发明实施例提供的是会话特征信息分析方法,因此,对所有接收的数据报文基于会话采样,以保证所有接收的数据报文中,所有属于抽样会话的数据报文都能够被抽样,这样才能实现基于会话的特征信息分析。
与第一种可能的实施方式类似的是,所述从所述多个抽样会话的数据报文中获取所述待分析会话的数据报文包括:
从所述多个会话的数据报文中,分别获取每个数据报文的五元组信息;
基于所述每个数据报文的五元组信息,从所述多个会话的数据报文中获取所述待分析会话的数据报文。
第一种可能的实施方式中,是从所有接收的数据报文中获取所述待分析会话的数据报文,第二种可能的实施方式中,是从所述多个抽样会话的数据报文中获取所述待分析会话的数据报文。
对所有被抽样的数据报文,解析每个被抽样的数据报文的五元组信息,基于五元组信息对所有被抽样的数据报文分组,将从第一网络设备发往第二网络设备的多个数据报文及从所述第二网络设备发往所述第一网络设备的多个数据报文划分到一个组,每个组中的多个数据报文属于同一个会话,每个会话是指两个网络设备之间的通信。在实际应用中,可以选取至少一个所得到的抽样会话作为待分析会话进行分析,获得待分析会话的会话特征信息。
在一个实施例中,为了保证所有属于抽样回话的数据报文都能够被抽样,所述对所有所接收的数据报文基于会话抽样包括:
解析每个所述接收的数据报文的五元组信息;
利用所述五元组信息计算所述接收的数据报文的正哈希值和反哈希值,所述正哈希值是以所接收的数据报文的五元组信息为输入计算所得的哈希值,所述反哈希值是将所接收的数据报文的五元组信息中,源IP地址和目的IP地址调换位置,并且源端口号和目的端口号调换位置后作为输入计算所得的哈希值;
计算所述正哈希值除以预设的会话抽样模板中的预设采样参数所得的第一余数,计算所述反哈希值除以所述会话抽样模板中的预设采样参数所得的第二余数,所述预设采样参数为所述会话抽样模板中抽样比例的分母;
判断所述第一余数或所述第二余数是否为所述会话抽样模板中的预设采样余数;
当所述第一余数或第二余数是所述会话抽样模板中的预设采样余数时,对所述接收的数据报文进行抽样。
解析每个所接收的数据报文,获得所接收的数据报文的五元组信息,将源IP地址、目的IP地址、源端口号、目的端口号以及传输层协议号按照预设的顺序排列为一个字符串组成哈希函数的一个输入值,计算得到正哈希值;将源IP地址与目的IP地址的位置互换,并将源端口号和目的端口号的位置互换,传输层协议号的位置不变,排列得到另一个字符串组成哈希函数的另一个输入至,计算得到反哈希值。获取预设的会话抽样模板 中的采样比例m/n,计算正哈希值除以所述采样比例的分母m的第一余数,并且计算反哈希值除以所述采样比例的分母m的第二余数,判断第一余数或第二余数是否为所述会话抽样模板中的采样余数,当第一余数或第二余数为采样余数时,对该数据报文进行抽样。其中,预设的会话抽样模板中包括采样比例m/n以及m个采样余数。采样比例决定从大量所接收的数据报文中所采集的数据报文的所占的比例,采样余数决定基于会话进行采样。
举例说明:若会话抽样模板中的抽样比例为3/1000,则抽样比例的分母为1000,计算所述正哈希值除以1000所得的第一余数,计算所述反哈希值除以1000所得的第二余数,则所述第一余数和所述第二余数的取值范围为0至999。抽样比为3/1000时,从0至999选取三个数字作为会话抽样模板中的采样余数。假设选取3个数字5、386、857作为采样余数,则当第一余数为采样余数或第二预设为采样余数时,对该数据报文进行抽样。当然,也可以选取多于3个数字作为采样余数。
可以理解的是,将从第一网络设备发往第二网络设备的多个数据报文及从所述第二网络设备发往所述第一网络设备的多个数据报文划分到一个组,每个组中的多个数据报文属于同一个会话,每个会话是指两个网络设备之间的通信。对于同一个会话中不同的数据报文来说,基于五元组信息计算哈希值,能够得到同一组哈希值,也就能够计算得到同一组余数。即可以实现抽取一个会话中所有的数据报文。
举例说明:若根据一个会话中的数据报文的五元组信息计算得到的正哈希值为A,反哈希值为B,除以采样比例的分母所得的第一余数为C,第二余数为D。则该会话中其他的数据报文的五元组信息计算得到的哈希值也都为A和B,只不过有的数据报文的正哈希值为A,反哈希值为B,有的数据报文的正哈希值为B,反哈希值为A,并且除以采样比例的分母所得的余数也都为C和D。当C或D为预设的会话抽样模板中的抽样余数时,对该数据报文进行抽样,从而该会话中其他的数据报文也会被抽样;当C和D都不是预设的会话抽样模板中的抽样余数时,该数据报文不会被抽样,从而该会话中其他的数据报文也不会被抽样。
由于数据报文的五元组信息在不同地区分布非常不均匀,可以从五元 组信息中分别选取在不同地区分布均匀的几位组成哈希函数的输入字符串,尽可能的实现均匀会话采样。例如:从五元组信息中选取IP地址的中M位相连的字符串,端口号中N位相连的字符串,以及传输层协议号中P位相连的字符串组合,获得M+N+P位字符串作为哈希函数的输入字符串,其中,M,N和P为大于0的整数。在实际应用中,可以选取CRC16哈希函数计算哈希值。
S102:从每个所述数据报文中提取预设会话特征的特征值。
对所述待分析会话的多个数据报文进行分析,提取预设会话特征的特征值。从一个会话中每个数据报文中提取预设会话特征的特征值,对所有数据报文中提取的预设会话特征的特征值进行分析,能得到该会话的预设会话特征的会话特征信息。在分析一个会话的预设会话特征的会话特征分析时,需要以该会话中所有的数据报文中提取的预设会话特征的特征值作为分析基础,以会话中全部数据报文中携带的预设会话特征的特征值作为整体。只分析一个会话中的一部分数据报文中携带的预设会话特征的特征值,不能得到该会话的预设会话特征的会话特征信息。
举例说明,预设会话特征可以包括以下中的一个或多个:会话的上行数据包数、会话的下行数据包数、每个传输控制协议TCP会话标志位个数、会话终结原因、最大数据报文长度、最小数据报文长度、会话上行报文传输速度、下行报文传输速度、因特网控制报文协议ICMP会话中回送报文和回送响应报文数等。这里需要说明的是,除了上述举例说明的预设会话特征外,还有很多以会话为基本分析单位的预设会话特征,所述预设会话特征可以是根据实际需要从IPFIX协议中扩展的会话特征指标中选出的会话特征指标,也可以是用户根据实际需要自行设定的特征,这里不再赘述。
在一个实施例中,所述从每个所述数据报文中提取预设会话特征的特征值前包括:
获取在IP数据流信息输出IPFIX协议中所配置的会话特征指标作为预设会话特征。
所述预设会话特征是IP数据流信息输出(IP Flow Information Export, IPFIX)协议中所配置的会话特征。IPFIX是由互联网工程任务组(The Internet Engineering Task Force,IETF)公布的用于网络中的流信息测量的标准协议。IPFIX协议提供了一种数据流特征信息的输出标准,原有的IPFIX协议指标用于描述数据流。在本发明实施例中,为了采用IPFIX协议输出会话特性信息,对原有IPFIX协议中的指标进行扩展,增加多个用于描述会话的会话特征指标。在IPFIX协议中配置所要统计的会话特征作为预设会话特征。在对IPFIX协议扩展会话特征指标时,主要扩展用于分析以下会话状态的会话特征指标:会话服务器时延,会话异常,会话不完整,超文本传输协议HTTP会话错误等。
如表1所示,对在IPFIX协议中扩展的多个用于描述会话的会话特征指标进行举例说明:
表1、IPFIX协议中扩展的会话特征指标
Figure PCTCN2014095640-appb-000001
Figure PCTCN2014095640-appb-000002
表1只对几种IPFIX协议中扩展的会话特征指标进行举例说明,还可以根据实际需要在IPFIX协议中扩展其他描述会话的会话特征指标,所述会话特征指标可以被选作为预设会话特征,这里不再一一赘述。
除了表1中所示的几种在IPFIX协议中扩展的会话特征指标以外,原有IPFIX协议中也有可以用于描述会话的会话特征指标。如表2所示。
表2、IPFIX协议中原有的会话特征指标
Figure PCTCN2014095640-appb-000003
Figure PCTCN2014095640-appb-000004
表1只对几种IPFIX协议中原有的会话特征指标进行举例说明,还可以根据实际需要分析在IPFIX协议中原有的其他描述会话的会话特征指标,这里不再一一赘述。
按照预设会话特征,对所述待分析会话中的每个数据报文分别解析,从每个数据报文所携带的信息中提取所述预设会话特征的特征值。举例说明:当预设会话特征为会话上行字节数和下行字节数时,则提取所述待分析会话中每个数据报文的字节数;当预设会话特征为TCP会话标志位个数时,则提取所述待分析会话中数据报文中所携带的的TCP标志位。从待分析会话的每个数据报文中提取其他预设会话特征的特征值与上述实例类似,根据实际情况具体执行,这里不再一一赘述。
从每个所述数据报文中提取预设会话特征的特征值时,根据预设会话特征的个数,从待分析会话的每个数据报文中提取特征值时,可以只提取一个预设会话特征的特征值,也可以同时提取多个预设会话特征的特征值,这里不进行具体限定。
S103:统计所述特征值获得所述待分析会话的会话特征信息。
从所述待分析会话的每个数据包中提取预设会话特征的特征值后,统计所述特征值,即可得到所述待分析会话的该预设会话特征的会话特征信息。
举例说明:当预设会话特征为会话上行字节数和下行字节数时,对每个上行数据报文的字节数求和获得上行字节数,对每个下行数据报文的字节数求和获得下行字节数;当预设会话特征为TCP会话标志位个数,则对从数据报文中提取的每种TCP会话标识位分别计数,获得每种TCP会话标识位的个数。除此以外,预设会话特征还可以为会话上行数据报文数和下行数据报文数,根据源IP地址和目的IP地址分别统计所述待分析会话的上行数据报文数和下行数据报文数;预设会话特征也可以为TCP标志位个数,根据数据报文所携带的标志位分别统计每种TCP标志位个数。
这里需要说明的是,除了上述实例以外,还可以统计其他预设会话特征的特征值,获得其他预设会话特征的会话特征信息,这里不再一一赘述。
在一个实施例中,所述从每个所述数据报文中提取预设会话特征的特征值前包括:获取在IP数据流信息输出IPFIX协议中所配置的会话特征指标作为预设会话特征。
即所述预设会话特征是在IPFIX协议中所配置的会话特征时,所述方法还包括:
将所述待分析会话的特征信息采用所述IPFIX协议的标准格式输出。
IPFIX协议中定义了会话特征信息的标准输出格式,方便技术人员提取和查看会话特征信息。本发明实施例中以Cisco Netflow Version 9版本举例说明,还可以采用其他版本的标准输出格式,这里不再一一赘述。图2为本发明实施例IPFIX协议报文格式示意图;表3所示的是IPFIX协议的数据标准输出格式Netflow V 9版本的输出模板之一。
表3、IPFIX协议的数据标准输出格式Netflow V9版本的输出模板
Figure PCTCN2014095640-appb-000005
Figure PCTCN2014095640-appb-000006
输出会话特征信息时,还可以采用IPFIX协议中其他版本的标准输出格式,也可以采用Cisco Netflow Version 9版本中其他输出模板,根据实际情况选取,这里不再赘述。
由上述内容可知,本发明实施例有如下有益效果:
本发明实施例开创性的提供了特征信息分析方法,获取待分析会话中的多个数据报文;从每个所述数据报文中提取预设会话特征的特征值;统计所述特征值获得所述待分析会话的会话特征信息,本发明实施例中,以会话为基本分析单位,实现了对会话进行整体分析,得到可以全面反映会话的会话特征信息
图3为本发明实施例提供的网络攻击检测方法流程图,所述方法包括:
S301:分析预设时间间隔内获取的所有待分析会话的会话特征信息。
所述会话特征信息利用图1所示的本发明实施例所提供的特征信息分析方法分析获得,参考对图1所示的特征信息分析方法的具体描述,这里不再赘述。
S302:根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击。
S301获取的是预设时间间隔内分析得到的所有待分析会话的会话特征信息,通过对所有待分析会话的会话特征信息进行综合分析,可以检测预设时间间隔内是否存在网络会话攻击。可以理解的是,分析不同的会话特征信息可以检测到不同种类的网络会话攻击。
所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击至少有四种可能的实施方式,下面对这四种可能的实施方式一一说明。
第一种可能的实施方式,所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
根据所述会话特征信息统计所述预设时间间隔内所获取的所有待分析会话中不完整会话所占的第一比例;
判断所述第一比例是否超过第一预设阈值;
当不完整会话所占的第一比例超过第一预设阈值时,识别所述预设时间间隔内的网络会话攻击。
根据所述会话特征信息统计不完整会话的个数,当预设时间间隔内出现大量的不完整会话时,说明在此预设时间间隔内出现网络会话攻击。其中,第一预设阈值可以根据实际情况自行设定,比如,第一预设阈值可以设置为60%,当第一预设时间间隔内,不完整会话超过60%时,说明出现了网络会话攻击。此时,可以根据会话特征信息分析网络会话攻击的攻击类型,攻击源设备,攻击目标设备等。
在第一种可能的实施方式中,根据所获取的待分析会话的会话特征信息的种类不同,不完整会话的定义不同,所识别出的会话攻击类型也不同。
场景一,所述会话特征信息包括上行数据报文数和下行数据报文数;
所述不完整会话为所述上行数据报文数大于1,并且所述下行数据报文数为0的待分析会话。
当预设时间间隔内,存在大量的只有上行数据报文,没有下行数据报文的不完整会话,此预设时间间隔内,很可能受到DNS会话攻击。
场景二,所述会话特征信息包括传输控制协议TCP标志位;
所述不完整会话为所述TCP标志位不完整的待分析会话。
当预设时间间隔内,存在大量TCP标志位不完整的待分析会话时,此预设时间间隔内,很可能受到TCP Flood会话攻击。
除了上述两个实施场景外,还有其他的会话特征信息也可以描述不完整会话,根据会话特征信息分析所受到的会话攻击的种类,这里不再赘述。
第二种可能的实施方式,所述会话特征信息包括网络控制报文协议ICMP会话中echo报文数和echo reply报文数;
所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
根据会话特征信息统计预设时间间隔内所获取的ICMP会话中echo报文与echo reply报文的第二比例;
判断所述第二比例是否在预设数值范围内;
当所述第二比例不在预设数值范围内时,识别所述预设时间间隔内的ICMP协议会话攻击。
对于网络控制报文协议(Internet Control Message Protocol,ICMP)会话来说,会话中的echo报文和echo reply报文理论上应该是相同的,有一个echo报文,就应该有一个echo reply报文。在实际应用中,echo报文和echoreply报文在ICMP会话中,比例应该近似为1,即预设的数值范围可以设置为0.8~1.2。当然,所述预设的数值范围还可以设置其他范围,保证ICMP会话中echo报文和echo reply报文的个数相差不大即可。
当echo报文和echo reply报文的第二比例超过预设的数值范围时,表示echo报文的个数远远超过echo reply报文的个数,或者echo reply报文的个数远远超过echo报文的个数。在该预设时间间隔内,识别网络中存在 ICMP网络攻击。
第三种可能的实施方式,所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
根据会话特征信息统计所述预设时间间隔内拒绝服务会话的个数,所述拒绝服务会话为会话特征信息中包含HTTP错误码信息的所述待分析会话;
判断所述拒绝服务会话的个数是否超过第二预设阈值;
当所述拒绝服务会话的个数超过第二预设阈值时,识别所述预设事件间隔内的CC会话攻击。
当待分析会话中包含HTTP错误码信息时,该待分析会话为一个HTTP拒绝服务会话。根据会话特征Application Error Code,统计HTTP拒绝服务会话的个数,当预设时间间隔内出现大量的拒绝服务会话时,识别网络中可能存在CC(Challenge Collapsar)会话攻击。
第四种可能的实施方式,所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
判断所述预设时间间隔内所采集的每个所述待分析会话的会话特征信息是否包含以下情况中的任意一种或多种:会话分片异常信息,所述会话分片异常信息包括分片不完整,分片重叠以及分片标志位出错;
当所述待分析会话的会话特征信息包含会话分片异常信息时,识别该待分析会话为所述预设时间间隔内的分片攻击会话。
当待分析会话的会话特征信息中包含分片异常信息时,该待分析会话即为一个分片异常会话。当预设时间间隔内出现大量的分片异常会话时,识别网络中可能存在分片攻击。
分片异常信息包括:
Fragment Incomplete,分片不完整,即会话中缺少某一个分片;
Fragment Offset Error,分片重叠,即上一个分片和下一个分片中有重叠的数据信息;
Fragment Flag Error,标志位出错,即不同分片中的标志位同时置1。
除此以外,分片异常信息还包括:首分片太短,即首分片小于1400字节;分片超长,即携带有分片标识的分片超过1500字节。还可以有其他分片异常信息,这里不再一一赘述。
根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击,除了上述四种可能的实施方式以外,还可以统计会话终结的原因,若在预设时间间隔内,出现大量的会话终结,识别可能存在网络会话攻击;也可以统计最大报文长度和最小报文长度,当出现大量的待分析会话的最大报文长度和最小报文长度基本相同时,识别可能存在网络会话攻击;或者统计待分析会话的上行数据传输速率和下行数据传输速率,辅助识别网络会话攻击。
可选的,本发明实施例中的会话特征信息可以是采用IPFIX协议中的标准输出格式输出信息。这里需要说明的是,会话特征信息的类型还有很多,这里不再一一列举,不同类型的会话特征信息可以识别不同类型的网络会话攻击。
在一个实施例中,所述方法还包括:
当检测到所述预设时间间隔内的网络会话攻击时,根据所述待分析会话的会话特征信息生成攻击事件;
根据所述攻击事件生成攻击抑制策略。
当识别到网络会话攻击时,可以根据会话特征信息生成攻击事件。对攻击事件进行分析,可以生成攻击抑制策略,还可以识别攻击源设备、攻击业务以及被攻击设备等信息。
下面对图3所示的本发明实施例提供的网络攻击检测方法的应用场景举例说明。
应用场景一,软件定义网络(Software Defined Network,SDN)中攻击检测:
SDN网络中的交换机:对所有所接收的数据报文基于会话抽样,以得到多个抽样会话的数据报文;从所述多个抽样会话的数据报文中获取所述 待分析会话的多个数据报文;从每个所述数据报文中提取预设会话特征的特征值;统计所述特征值获得所述待分析会话的会话特征信息,将所述会话特征信息利用IPFIX协议中的标准格式输出至SDN网络中的攻击检测设备。
SDN网络中的攻击检测设备:分析预设时间间隔内获取的所有待分析会话的会话特征信息,根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击,当识别出网络会话攻击时,生成攻击事件,发送至SDN网络控制器。
SDN网络控制器:根据所接收到得攻击事件生成攻击抑制策略,下发给SND网络中的交换机,抑制SDN网络中的会话攻击。
应用场景二:
接收大量的IPFIX协议的标准格式输出的会话特征信息;
利用分布式设备采用CUSUM算法对大量的会话特征信息进行统计;
分析统计结果检测会话攻击。
在对会话特征信息进行统计时,可以实现对网络并发会话、会话服务器延时,会话接通率以及异常会话进行统计。在检测会话攻击时,还可以识别攻击原设备,攻击代理设备,攻击业务类型,被攻击设备等信息。这里需要说明的是,在对大量的会话特征信息进行统计时,还可以采用其他的统计算法,这里不再赘述。
由上述内容可知,本发明实施例还有如下有益效果:
本发明实施例还提供了网络攻击检测方法及系统,根据预设时间间隔内获取的待分析会话的会话特征信息检测该预设时间间隔内的网络会话攻击,解决了现有技术中基于数据流的特征信息无法检测网络中会话攻击的问题,实现了对网络中会话攻击的有效检测,提高了网络攻击检测的完备性。
图4为本发明实施例提供的特征信息分析装置结构示意图,所述装置包括:
第一获取单元401,用于获取待分析会话中的多个数据报文。
在一个实施例中,所述第一获取单元401包括:
第一获取子单元,用于从所有接收到的数据报文中,分别获取每个数据报文的五元组信息;
第二获取子单元,用于基于所述每个数据报文的五元组信息,从所有接收到的数据报文中获取所述待分析会话的数据报文。
在另一个实施例中,所述装置还包括:
抽样单元,用于对所有所接收的数据报文基于会话抽样,以得到多个抽样会话的数据报文;
则所述第一获取单元401,具体用于从所述多个抽样会话的数据报文中获取所述待分析会话的多个数据报文。
所述第一获取单元401包括:
第三获取子单元,用于从所述多个抽样会话的数据报文中,分别获取每个数据报文的五元组信息;
第四获取子单元,用于基于所述每个数据报文的五元组信息,从所述多个抽样会话的数据报文中获取所述待分析会话的数据报文。
所述抽样单元包括:
解析子单元,用于解析每个所述接收的数据报文的五元组信息;
第一计算子单元,用于利用所述五元组信息计算所述接收的数据报文的正哈希值和反哈希值,所述正哈希值是以所接收的数据报文的五元组信息为输入计算所得的哈希值,所述反哈希值是将所接收的数据报文的五元组信息中,源IP地址和目的IP地址调换位置,并且源端口号和目的端口号调换位置后作为输入计算所得的哈希值;
第二计算子单元,用于计算所述正哈希值除以预设的会话抽样模板中的预设采样参数所得的第一余数,计算所述反哈希值除以所述会话抽样模板中的预设采样参数所得的第二余数,所述预设采样参数为所述会话抽样模板中抽样比例的分母;
判断子单元,用于判断所述第一余数或所述第二余数是否为所述会话抽样模板中的预设采样余数;
抽样子单元,用于当所述第一余数或所述第二余数是所述会话抽样模板中的预设采样余数时,对所述接收的数据报文进行抽样。
提取单元402,用于从每个所述数据报文中提取预设会话特征的特征值。
统计单元403,用于统计所述特征值获得所述待分析会话的会话特征信息。
在一个具体实施例中,所述装置还包括:
第二获取单元,用于获取在IPFIX协议中所配置的会话特征作为预设特征。
在一个具体实施例中,所述装置还包括:
输出单元,用于将所述待分析会话的特征信息采用所述IPFIX协议的标准格式输出。
图4所示的特征信息分析装置是与图1所示的特征信息分析方法所对应的装置,参考图1所述的特征分析方法中的描述,这里不再赘述。
图5为本发明实施例提供的网络攻击检测系统结构示意图,所述系统包括:
图4所示的特征分析装置501,用于分析预设时间间隔内获取的所有待分析会话的会话特征信息。
检测装置502,用于根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击。
所述检测装置502第一种可能的结构,包括:
第一统计单元,用于根据所述会话特征信息统计所述预设时间间隔内所获取的所有待分析会话中不完整会话所占的第一比例;
第一判断单元,用于判断所述第一比例是否超过第一预设阈值;
第一识别单元,用于当不完整会话所占的第一比例超过第一预设阈值时,识别所述预设时间间隔内的网络会话攻击。
在第一种可能的结构中,场景一:
所述会话特征信息包括上行报文字节数和下行报文字节数;
所述不完整会话为所述上行数据报文数大于1,并且所述下行数据报文数为0的待分析会话。
在第一种可能的结构中,场景二:
所述会话特征信息包括传输控制协议TCP标志位;
所述不完整会话为所述TCP标志位不完整的待分析会话。
所述检测装置502第二种可能的结构,包括:
所述会话特征信息包括网络控制报文ICMP会话中回送echo报文数和回送响应echo reply报文数;
第二统计单元,用于根据会话特征信息统计预设时间间隔内所获取的ICMP会话中echo报文与echo reply报文的第二比例;
第二判断单元,用于判断所述第二比例是否在预设数值范围内;
第二识别单元,用于当所述第二比例不在预设数值范围内时,识别所述预设时间间隔内的ICMP会话攻击。
所述检测装置502第三种可能的结构,包括:
第三统计单元,用于根据会话特征信息统计所述预设时间间隔内拒绝服务会话的个数,所述拒绝服务会话为会话特征信息中包含超文本传输协议HTTP错误码信息的所述待分析会话;
第三判断单元,用于判断所述拒绝服务会话的个数是否超过第二预设阈值;
第三识别单元,用于当所述拒绝服务会话的个数超过第二预设阈值时,识别所述预设事件间隔内的CC会话攻击。
所述检测装置502第四种可能的结构,包括:
第四判断单元,用于判断所述预设时间间隔内所采集的每个所述待分 析会话的会话特征信息是否包含会话分片异常信息,所述会话分片异常信息包括分片不完整,分片重叠以及分片标志位出错中任意一项或多种;
第四识别单元,用于当所述待分析会话的会话特征信息包含会话分片异常信息时,识别该待分析会话为所述预设时间间隔内的分片攻击会话。
在一个实施例中,所述系统还包括:
防御装置,用于当检测到所述预设时间间隔内的网络会话攻击时,根据所述待分析会话的会话特征信息生成攻击事件;根据所述攻击事件生成攻击抑制策略。
所述系统还包括:
攻击识别装置,用于根据所述攻击事件识别攻击源设备,攻击业务以及被攻击设备。
在实际应用中,所述会话特征信息采用IPFIX协议的标准输出格式。
图5所示的网络攻击检测系统是与图2所示的网络攻击检测方法所对应的系统,参考图2所述的网络攻击检测方法中的描述,这里不再赘述。
参阅图6,图6为本发明实施例提供的特征信息分析装置的硬件结构示意图,所述特征信息分析装置包括存储器601,以及与所述存储器601连接的处理器602,所述存储器601用于存储一组程序指令,所述处理器602用于调用所述存储器601存储的程序指令执行如下操作:
获取待分析会话中的多个数据报文;
从每个所述数据报文中提取预设会话特征的特征值;
统计所述特征值获得所述待分析会话的会话特征信息;
可选的,所述从每个所述数据报文中提取预设会话特征的特征值前包括:
获取在IP数据流信息输出IPFIX协议中所配置的会话特征指标作为预设会话特征;
可选的,还包括:
将所述待分析会话的特征信息采用所述IPFIX协议的标准格式输出;
可选的,
所述获取待分析会话中的多个数据报文包括:
从所有接收到的数据报文中,分别获取每个数据报文的五元组信息;
基于所述每个数据报文的五元组信息,从所有接收到的数据报文中获取所述待分析会话的多个数据报文;
可选的,所述获取待分析会话中的多个数据报文前还包括:
对所有所接收的数据报文基于会话抽样,以得到多个抽样会话的数据报文;
所述获取待分析会话中的多个数据报文包括:
从所述多个抽样会话的数据报文中获取所述待分析会话的多个数据报文;
可选的,所述从所述多个抽样会话的数据报文中获取所述待分析会话的数据报文包括:
从所述多个会话的数据报文中,分别获取每个数据报文的五元组信息;
基于所述每个数据报文的五元组信息,从所述多个会话的数据报文中获取所述待分析会话的数据报文;
可选的,所述对所有所接收的数据报文基于会话抽样包括:
解析每个所述接收的数据报文的五元组信息;
利用所述五元组信息计算所述接收的数据报文的正哈希值和反哈希值,所述正哈希值是以所接收的数据报文的五元组信息为输入计算所得的哈希值,所述反哈希值是将所接收的数据报文的五元组信息中,源IP地址和目的IP地址调换位置,并且源端口号和目的端口号调换位置后作为输入计算所得的哈希值;
计算所述正哈希值除以预设的会话抽样模板中的预设采样参数所得的第一余数,计算所述反哈希值除以所述会话抽样模板中的预设采样参数所得的第二余数,所述预设采样参数为所述会话抽样模板中抽样比例的分母;
判断所述第一余数或所述第二余数是否为所述会话抽样模板中的预设采样余数;
当所述第一余数或第二余数是所述会话抽样模板中的预设采样余数时,对所述接收的数据报文进行抽样。
参阅图7,图7为本发明实施例提供的网络攻击检测系统硬件结构示意图,所述网络攻击检测系统位于网络中,所述网络还包括多个路由器,所述多个路由器中相邻路由器之间通过具有一定带宽的链路相连,所述多个路由器通过所述链路形成网络拓扑,所述网络攻击检测系统包括存储器701,以及与所述存储器701连接的处理器702,所述存储器701用于存储一组程序指令,所述处理器702用于调用所述存储器701存储的程序指令执行如下操作:
分析预设时间间隔内获取的所有待分析会话的会话特征信息,
根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击;
可选的,所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
根据所述会话特征信息统计所述预设时间间隔内所获取的所有待分析会话中不完整会话所占的第一比例;
判断所述第一比例是否超过第一预设阈值;
当不完整会话所占的第一比例超过第一预设阈值时,识别所述预设时间间隔内的网络会话攻击;
其中,所述会话特征信息包括上行数据报文数和下行数据报文数;
所述不完整会话为所述上行数据报文数大于1,并且所述下行数据报文数为0的待分析会话;
其中,所述会话特征信息包括传输控制协议TCP标志位;
所述不完整会话为所述TCP标志位不完整的待分析会话;
可选的,所述会话特征信息包括网络控制报文协议ICMP会话中echo 报文数和echo reply报文数;
所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
根据会话特征信息统计预设时间间隔内所获取的ICMP会话中echo报文与echo reply报文的第二比例;
判断所述第二比例是否在预设数值范围内;
当所述第二比例不在预设数值范围内时,识别所述预设时间间隔内的ICMP会话攻击;
可选的,所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
根据会话特征信息统计所述预设时间间隔内拒绝服务会话的个数,所述拒绝服务会话为会话特征信息中包含超文本传输协议HTTP错误码信息的所述待分析会话;
判断所述拒绝服务会话的个数是否超过第二预设阈值;
当所述拒绝服务会话的个数超过第二预设阈值时,识别所述预设事件间隔内的CC会话攻击;
可选的,所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
判断所述预设时间间隔内所采集的每个所述待分析会话的会话特征信息是否包含会话分片异常信息,所述会话分片异常信息包括分片不完整,分片重叠以及分片标志位出错中任意一种或多种;
当所述待分析会话的会话特征信息包含会话分片异常信息时,识别该待分析会话为所述预设时间间隔内的分片攻击会话;
可选的,所述方法还包括:
当检测到所述预设时间间隔内的网络会话攻击时,根据所述待分析会话的会话特征信息生成攻击事件;
根据所述攻击事件生成攻击抑制策略;
可选的,所述方法还包括:
根据所述攻击事件识别攻击源设备,攻击业务以及被攻击设备。
其中,所述会话特征信息采用IPFIX协议的标准输出格式。
这里需要说明的是,本发明实施例中,所述处理器可以为中央处理器(Central Processing Unit,CPU),所述存储器可以为随机存取存储器(Random Access Memory,RAM)类型的内部存储器,所述处理器和存储器可以集成为一个或多个独立的电路或硬件,如:专用集成电路(Application Specific Integrated Circuit,ASIC)。
本发明实施例中提到的第一宿主设备和第一接口的“第一”只是用来做名字标识,并不代表顺序上的第一。该规则同样适用于“第二”和“第三”。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质可以是下述介质中的至少一种:只读存储器(Read-Only Memory,ROM)、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于设备及系统实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的设备及系统实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述仅是本发明的优选实施方式,并非用于限定本发明的保护范围。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。

Claims (36)

  1. 一种特征信息分析方法,其特征在于,所述方法包括:
    获取待分析会话中的多个数据报文;
    从每个所述数据报文中提取预设会话特征的特征值;
    统计所述特征值获得所述待分析会话的会话特征信息。
  2. 根据权利要求1所述的方法,其特征在于,所述从每个所述数据报文中提取预设会话特征的特征值前包括:
    获取在因特网协议IP数据流信息输出IPFIX协议中所配置的会话特征指标作为预设会话特征。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    将所述待分析会话的特征信息采用所述IPFIX协议的标准格式输出。
  4. 根据权利要求1-3任意一项所述的方法,其特征在于,所述获取待分析会话中的多个数据报文包括:
    从所有接收到的数据报文中,分别获取每个数据报文的五元组信息;
    基于所述每个数据报文的五元组信息,从所有接收到的数据报文中获取所述待分析会话的多个数据报文。
  5. 根据权利要求1-3任意一项所述的方法,其特征在于,所述获取待分析会话中的多个数据报文前还包括:
    对所有所接收的数据报文基于会话抽样,以得到多个抽样会话的数据报文;
    所述获取待分析会话中的多个数据报文包括:
    从所述多个抽样会话的数据报文中获取所述待分析会话的多个数据报文。
  6. 根据权利要求5所述的方法,其特征在于,所述从所述多个抽样会话的数据报文中获取所述待分析会话的数据报文包括:
    从所述多个会话的数据报文中,分别获取每个数据报文的五元组信息;
    基于所述每个数据报文的五元组信息,从所述多个会话的数据报文中 获取所述待分析会话的数据报文。
  7. 根据权利要求5所述的方法,其特征在于,所述对所有所接收的数据报文基于会话抽样包括:
    解析每个所述接收的数据报文的五元组信息;
    利用所述五元组信息计算所述接收的数据报文的正哈希值和反哈希值,所述正哈希值是以所接收的数据报文的五元组信息为输入计算所得的哈希值,所述反哈希值是将所接收的数据报文的五元组信息中,源IP地址和目的IP地址调换位置,并且源端口号和目的端口号调换位置后作为输入计算所得的哈希值;
    计算所述正哈希值除以预设的会话抽样模板中的预设采样参数所得的第一余数,计算所述反哈希值除以所述会话抽样模板中的预设采样参数所得的第二余数,所述预设采样参数为所述会话抽样模板中抽样比例的分母;
    判断所述第一余数或所述第二余数是否为所述会话抽样模板中的预设采样余数;
    当所述第一余数或第二余数是所述会话抽样模板中的预设采样余数时,对所述接收的数据报文进行抽样。
  8. 一种网络攻击检测方法,其特征在于,所述方法包括:
    分析预设时间间隔内获取的所有待分析会话的会话特征信息,所述会话特征信息利用权力要求1-7任意一项所述的方法分析获得;
    根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击。
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
    根据所述会话特征信息统计所述预设时间间隔内所获取的所有待分析会话中不完整会话所占的第一比例;
    判断所述第一比例是否超过第一预设阈值;
    当不完整会话所占的第一比例超过第一预设阈值时,识别所述预设时间间隔内的网络会话攻击。
  10. 根据权利要求9所述的方法,其特征在于,
    所述会话特征信息包括上行数据报文数和下行数据报文数;
    所述不完整会话为所述上行数据报文数大于1,并且所述下行数据报文数为0的待分析会话。
  11. 根据权利要求9所述的方法,其特征在于,
    所述会话特征信息包括传输控制协议TCP标志位;
    所述不完整会话为所述TCP标志位不完整的待分析会话。
  12. 根据权利要求8所述的方法,其特征在于,
    所述会话特征信息包括网络控制报文协议ICMP会话中echo报文数和echo reply报文数;
    所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
    根据会话特征信息统计预设时间间隔内所获取的ICMP会话中echo报文与echo reply报文的第二比例;
    判断所述第二比例是否在预设数值范围内;
    当所述第二比例不在预设数值范围内时,识别所述预设时间间隔内的ICMP会话攻击。
  13. 根据权利要求8所述的方法,其特征在于,所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
    根据会话特征信息统计所述预设时间间隔内拒绝服务会话的个数,所述拒绝服务会话为会话特征信息中包含超文本传输协议HTTP错误码信息的所述待分析会话;
    判断所述拒绝服务会话的个数是否超过第二预设阈值;
    当所述拒绝服务会话的个数超过第二预设阈值时,识别所述预设事件间隔内的CC会话攻击。
  14. 根据权利要求8所述的方法,其特征在于,所述根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击包括:
    判断所述预设时间间隔内所采集的每个所述待分析会话的会话特征信息是否包含会话分片异常信息,所述会话分片异常信息包括分片不完整,分片重叠以及分片标志位出错中任意一种或多种;
    当所述待分析会话的会话特征信息包含会话分片异常信息时,识别该待分析会话为所述预设时间间隔内的分片攻击会话。
  15. 根据权利要求8-14任意一项所述的方法,其特征在于,所述方法还包括:
    当检测到所述预设时间间隔内的网络会话攻击时,根据所述待分析会话的会话特征信息生成攻击事件;
    根据所述攻击事件生成攻击抑制策略。
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:
    根据所述攻击事件识别攻击源设备,攻击业务以及被攻击设备。
  17. 根据权利要求8-16任意一项所述的方法,其特征在于,
    所述会话特征信息采用IPFIX协议的标准输出格式。
  18. 一种特征信息分析装置,其特征在于,所述装置包括:
    第一获取单元,用于获取待分析会话中的多个数据报文;
    提取单元,用于从每个所述数据报文中提取预设会话特征的特征值;
    统计单元,用于统计所述特征值获得所述待分析会话的会话特征信息。
  19. 根据权利要求18所述的装置,其特征在于,所述装置还包括:
    第二获取单元,用于获取在IPFIX协议中所配置的会话特征作为预设特征。
  20. 根据权利要求19所述的装置,其特征在于,所述装置还包括:
    输出单元,用于将所述待分析会话的特征信息采用所述IPFIX协议的标准格式输出。
  21. 根据权利要求19-20任意一项所述的装置,其特征在于,所述第一获取单元包括:
    第一获取子单元,用于从所有接收到的数据报文中,分别获取每个数 据报文的五元组信息;
    第二获取子单元,用于基于所述每个数据报文的五元组信息,从所有接收到的数据报文中获取所述待分析会话的数据报文。
  22. 根据权利要求19-20任意一项所述的装置,其特征在于,所述装置还包括:
    抽样单元,用于对所有所接收的数据报文基于会话抽样,以得到多个抽样会话的数据报文;
    所述第一获取单元,具体用于从所述多个抽样会话的数据报文中获取所述待分析会话的多个数据报文。
  23. 根据权利要求22所述的装置,其特征在于,所述第一获取单元包括:
    第三获取子单元,用于从所述多个抽样会话的数据报文中,分别获取每个数据报文的五元组信息;
    第四获取子单元,用于基于所述每个数据报文的五元组信息,从所述多个抽样会话的数据报文中获取所述待分析会话的数据报文。
  24. 根据权利要求22所述的装置,其特征在于,所述抽样单元包括:
    解析子单元,用于解析每个所述接收的数据报文的五元组信息;
    第一计算子单元,用于利用所述五元组信息计算所述接收的数据报文的正哈希值和反哈希值,所述正哈希值是以所接收的数据报文的五元组信息为输入计算所得的哈希值,所述反哈希值是将所接收的数据报文的五元组信息中,源IP地址和目的IP地址调换位置,并且源端口号和目的端口号调换位置后作为输入计算所得的哈希值;
    第二计算子单元,用于计算所述正哈希值除以预设的会话抽样模板中的预设采样参数所得的第一余数,计算所述反哈希值除以所述会话抽样模板中的预设采样参数所得的第二余数,所述预设采样参数为所述会话抽样模板中抽样比例的分母;
    判断子单元,用于判断所述第一余数或所述第二余数是否为所述会话抽样模板中的预设采样余数;
    抽样子单元,用于当所述第一余数或第二余数是所述会话抽样模板中的预设采样余数时,对所述接收的数据报文进行抽样。
  25. 一种网络攻击检测系统,其特征在于,所述系统包括:
    权利要求18-24任意一项所述的特征信息分析装置,用于分析预设时间间隔内获取的所有待分析会话的会话特征信息;
    检测装置,用于根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击。
  26. 根据权利要求25所述的系统,其特征在于,所述检测装置包括:
    第一统计单元,用于根据所述会话特征信息统计所述预设时间间隔内所获取的所有待分析会话中不完整会话所占的第一比例;
    第一判断单元,用于判断所述第一比例是否超过第一预设阈值;
    第一识别单元,用于当不完整会话所占的第一比例超过第一预设阈值时,识别所述预设时间间隔内的网络会话攻击。
  27. 根据权利要求26所述的系统,其特征在于,
    所述会话特征信息包括上行报文字节数和下行报文字节数;
    所述不完整会话为所述上行数据报文数大于1,并且所述下行数据报文数为0的待分析会话。
  28. 根据权利要求26所述的系统,其特征在于,
    所述会话特征信息包括传输控制协议TCP标志位;
    所述不完整会话为所述TCP标志位不完整的待分析会话。
  29. 根据权利要求25所述的系统,其特征在于,
    所述会话特征信息包括网络控制报文协议ICMP会话中回送echo报文数和回送响应echo reply报文数;
    所述检测装置包括:
    第二统计单元,用于根据会话特征信息统计预设时间间隔内所获取的ICMP会话中echo报文与echo reply报文的第二比例;
    第二判断单元,用于判断所述第二比例是否在预设数值范围内;
    第二识别单元,用于当所述第二比例不在预设数值范围内时,识别所述预设时间间隔内的ICMP会话攻击。
  30. 根据权利要求25所述的系统,其特征在于,所述检测装置包括:
    第三统计单元,用于根据会话特征信息统计所述预设时间间隔内拒绝服务会话的个数,所述拒绝服务会话为会话特征信息中包含超文本传输协议HTTP错误码信息的所述待分析会话;
    第三判断单元,用于判断所述拒绝服务会话的个数是否超过第二预设阈值;
    第三识别单元,用于当所述拒绝服务会话的个数超过第二预设阈值时,识别所述预设事件间隔内的CC会话攻击。
  31. 根据权利要求25所述的系统,其特征在于,所述检测装置包括:
    第四判断单元,用于判断所述预设时间间隔内所采集的每个所述待分析会话的会话特征信息是否包含会话分片异常信息,所述会话分片异常信息包括分片不完整,分片重叠以及分片标志位出错中任意一项或多种;
    第四识别单元,用于当所述待分析会话的会话特征信息包含会话分片异常信息时,识别该待分析会话为所述预设时间间隔内的分片攻击会话。
  32. 根据权利要求25-31任意一项所述的系统,其特征在于,所述系统还包括:
    防御装置,用于当检测到所述预设时间间隔内的网络会话攻击时,根据所述待分析会话的会话特征信息生成攻击事件;根据所述攻击事件生成攻击抑制策略。
  33. 根据权利要求32所述的系统,其特征在于,所述系统还包括:
    攻击识别装置,用于根据所述攻击事件识别攻击源设备,攻击业务以及被攻击设备。
  34. 根据权利要求25-33任意一项所述的方法,其特征在于,
    所述会话特征信息采用IPFIX协议的标准输出格式。
  35. 一种特征信息分析装置,其特征在于,所述装置包括:
    存储器,以及与所述存储器连接的处理器,所述存储器用于存储一组程序指令,所述处理器用于调用所述存储器存储的程序指令执行如下操作:
    获取待分析会话中的多个数据报文;
    从每个所述数据报文中提取预设会话特征的特征值;
    统计所述特征值获得所述待分析会话的会话特征信息。
  36. 一种网络攻击检测系统,其特征在于,所述系统包括:
    存储器,以及与所述存储器连接的处理器,所述存储器用于存储一组程序指令,所述处理器用于调用所述存储器存储的程序指令执行如下操作:
    分析预设时间间隔内获取的所有待分析会话的会话特征信息,所述会话特征信息利用权力要求1-7任意一项所述的方法分析获得,
    根据所述会话特征信息检测所述预设时间间隔内的网络会话攻击。
PCT/CN2014/095640 2014-12-30 2014-12-30 一种特征信息分析方法及装置 WO2016106592A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202010460439.8A CN111835708A (zh) 2014-12-30 2014-12-30 一种特征信息分析方法及装置
PCT/CN2014/095640 WO2016106592A1 (zh) 2014-12-30 2014-12-30 一种特征信息分析方法及装置
CN201480076897.4A CN106416171B (zh) 2014-12-30 2014-12-30 一种特征信息分析方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/095640 WO2016106592A1 (zh) 2014-12-30 2014-12-30 一种特征信息分析方法及装置

Publications (1)

Publication Number Publication Date
WO2016106592A1 true WO2016106592A1 (zh) 2016-07-07

Family

ID=56283868

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/095640 WO2016106592A1 (zh) 2014-12-30 2014-12-30 一种特征信息分析方法及装置

Country Status (2)

Country Link
CN (2) CN106416171B (zh)
WO (1) WO2016106592A1 (zh)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107666417A (zh) * 2017-10-18 2018-02-06 盛科网络(苏州)有限公司 实现ipfix随机采样的方法
CN109088791A (zh) * 2018-07-20 2018-12-25 国网宁夏电力有限公司银川供电公司 Iec104报文遥信信息提取方法
CN110674165A (zh) * 2018-07-03 2020-01-10 百度在线网络技术(北京)有限公司 采样率调整的方法、装置、存储介质和终端设备
CN111371783A (zh) * 2020-03-02 2020-07-03 中国建设银行股份有限公司 一种sql注入攻击检测方法、装置、设备和存储介质
CN112532444A (zh) * 2020-11-26 2021-03-19 上海阅维科技股份有限公司 用于网络镜像流量的数据流采样方法、系统、介质及终端
CN112929364A (zh) * 2021-02-05 2021-06-08 上海观安信息技术股份有限公司 一种基于icmp隧道分析的数据泄漏检测方法及系统
CN113839882A (zh) * 2021-09-26 2021-12-24 杭州迪普信息技术有限公司 一种报文流分流方法及装置
CN114257664A (zh) * 2021-12-13 2022-03-29 北京易霖博信息技术有限公司 网络设备指纹提取方法、装置、服务器及存储介质
CN114567687A (zh) * 2022-02-25 2022-05-31 北京百度网讯科技有限公司 报文转发方法、装置、设备、介质及程序产品
CN114979236A (zh) * 2022-05-12 2022-08-30 山石网科通信技术股份有限公司 数据传输方法、装置、存储介质以及电子设备
CN116112263A (zh) * 2023-02-13 2023-05-12 山东云天安全技术有限公司 一种报文处理方法、电子设备及存储介质
CN116192490A (zh) * 2023-02-14 2023-05-30 北京中睿天下信息技术有限公司 一种基于流量行为的网络威胁检测方法和系统
CN117729054A (zh) * 2024-02-07 2024-03-19 北京马赫谷科技有限公司 一种基于全流量存储的vpn流量识别方法和系统
CN114257664B (zh) * 2021-12-13 2024-06-07 北京易霖博信息技术有限公司 网络设备指纹提取方法、装置、服务器及存储介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311925B (zh) * 2019-07-30 2022-06-28 百度在线网络技术(北京)有限公司 DDoS反射型攻击的检测方法及装置、计算机设备与可读介质
CN110430226B (zh) * 2019-09-16 2021-08-17 腾讯科技(深圳)有限公司 网络攻击检测方法、装置、计算机设备及存储介质
CN112910825B (zh) * 2019-11-19 2022-06-14 华为技术有限公司 一种蠕虫检测方法及网络设备
CN112671759A (zh) * 2020-12-22 2021-04-16 互联网域名系统北京市工程研究中心有限公司 基于多维度分析的dns隧道检测方法和装置
CN112866275B (zh) * 2021-02-02 2022-07-15 杭州安恒信息安全技术有限公司 一种流量抽样方法、装置和计算机可读存储介质
CN114219427B (zh) * 2021-12-06 2022-12-06 广州嘉磊元新信息科技有限公司 一种应对大数据办公的信息安全处理方法及存储介质
CN115271719A (zh) * 2021-12-08 2022-11-01 黄义宝 一种基于大数据的攻击防护方法及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996892A (zh) * 2006-12-25 2007-07-11 杭州华为三康技术有限公司 网络攻击检测方法及装置
CN101047509A (zh) * 2006-05-31 2007-10-03 华为技术有限公司 会话攻击检测系统及检测方法
CN102201937A (zh) * 2011-06-13 2011-09-28 刘胜利 基于心跳行为分析的快速木马检测方法
CN102882894A (zh) * 2012-10-30 2013-01-16 杭州迪普科技有限公司 一种识别攻击的方法及装置
CN103701814A (zh) * 2013-12-27 2014-04-02 北京启明星辰信息技术股份有限公司 一种基于行为检测实现网络流量识别的方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6873600B1 (en) * 2000-02-04 2005-03-29 At&T Corp. Consistent sampling for network traffic measurement
EP2112803B1 (en) * 2008-04-22 2013-12-18 Alcatel Lucent Attack protection for a packet-based network
CN101854275A (zh) * 2010-05-25 2010-10-06 军工思波信息科技产业有限公司 一种通过分析网络行为检测木马程序的方法及装置
CN102045220A (zh) * 2010-12-09 2011-05-04 国都兴业信息审计系统技术(北京)有限公司 木马监控审计方法及系统
CN103747003A (zh) * 2014-01-16 2014-04-23 南京邮电大学 对等僵尸网络核心节点检测方法及检测装置
CN104113538A (zh) * 2014-07-09 2014-10-22 重庆大学 一种检测内部用户攻击行为的网络安全防护方案
CN104168272A (zh) * 2014-08-04 2014-11-26 国家电网公司 一种基于通信行为聚类的木马检测方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101047509A (zh) * 2006-05-31 2007-10-03 华为技术有限公司 会话攻击检测系统及检测方法
CN1996892A (zh) * 2006-12-25 2007-07-11 杭州华为三康技术有限公司 网络攻击检测方法及装置
CN102201937A (zh) * 2011-06-13 2011-09-28 刘胜利 基于心跳行为分析的快速木马检测方法
CN102882894A (zh) * 2012-10-30 2013-01-16 杭州迪普科技有限公司 一种识别攻击的方法及装置
CN103701814A (zh) * 2013-12-27 2014-04-02 北京启明星辰信息技术股份有限公司 一种基于行为检测实现网络流量识别的方法及装置

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107666417B (zh) * 2017-10-18 2021-04-30 盛科网络(苏州)有限公司 实现ipfix随机采样的方法
CN107666417A (zh) * 2017-10-18 2018-02-06 盛科网络(苏州)有限公司 实现ipfix随机采样的方法
CN110674165A (zh) * 2018-07-03 2020-01-10 百度在线网络技术(北京)有限公司 采样率调整的方法、装置、存储介质和终端设备
CN109088791A (zh) * 2018-07-20 2018-12-25 国网宁夏电力有限公司银川供电公司 Iec104报文遥信信息提取方法
CN111371783A (zh) * 2020-03-02 2020-07-03 中国建设银行股份有限公司 一种sql注入攻击检测方法、装置、设备和存储介质
CN112532444A (zh) * 2020-11-26 2021-03-19 上海阅维科技股份有限公司 用于网络镜像流量的数据流采样方法、系统、介质及终端
CN112929364A (zh) * 2021-02-05 2021-06-08 上海观安信息技术股份有限公司 一种基于icmp隧道分析的数据泄漏检测方法及系统
CN113839882B (zh) * 2021-09-26 2023-09-26 杭州迪普信息技术有限公司 一种报文流分流方法及装置
CN113839882A (zh) * 2021-09-26 2021-12-24 杭州迪普信息技术有限公司 一种报文流分流方法及装置
CN114257664A (zh) * 2021-12-13 2022-03-29 北京易霖博信息技术有限公司 网络设备指纹提取方法、装置、服务器及存储介质
CN114257664B (zh) * 2021-12-13 2024-06-07 北京易霖博信息技术有限公司 网络设备指纹提取方法、装置、服务器及存储介质
CN114567687B (zh) * 2022-02-25 2023-07-28 北京百度网讯科技有限公司 报文转发方法、装置、设备、介质及程序产品
CN114567687A (zh) * 2022-02-25 2022-05-31 北京百度网讯科技有限公司 报文转发方法、装置、设备、介质及程序产品
CN114979236A (zh) * 2022-05-12 2022-08-30 山石网科通信技术股份有限公司 数据传输方法、装置、存储介质以及电子设备
CN116112263A (zh) * 2023-02-13 2023-05-12 山东云天安全技术有限公司 一种报文处理方法、电子设备及存储介质
CN116112263B (zh) * 2023-02-13 2023-10-27 山东云天安全技术有限公司 一种报文处理方法、电子设备及存储介质
CN116192490A (zh) * 2023-02-14 2023-05-30 北京中睿天下信息技术有限公司 一种基于流量行为的网络威胁检测方法和系统
CN117729054A (zh) * 2024-02-07 2024-03-19 北京马赫谷科技有限公司 一种基于全流量存储的vpn流量识别方法和系统
CN117729054B (zh) * 2024-02-07 2024-04-16 北京马赫谷科技有限公司 一种基于全流量存储的vpn流量识别方法和系统

Also Published As

Publication number Publication date
CN106416171B (zh) 2020-06-16
CN111835708A (zh) 2020-10-27
CN106416171A (zh) 2017-02-15

Similar Documents

Publication Publication Date Title
WO2016106592A1 (zh) 一种特征信息分析方法及装置
EP3304853B1 (en) Detection of malware and malicious applications
EP3535932B1 (en) Application characterization using transport protocol analysis
US10812524B2 (en) Method, and devices for defending distributed denial of service attack
EP2810412B1 (en) Systems and methods for extracting structured application data from a communications link
US10693908B2 (en) Apparatus and method for detecting distributed reflection denial of service attack
US9634851B2 (en) System, method, and computer readable medium for measuring network latency from flow records
EP3203699A1 (en) Method for man-in-the-middle processing for tcp without protocol stack
US11115427B2 (en) Monitoring device, monitoring method, and monitoring program
Limmer et al. Improving the performance of intrusion detection using dialog-based payload aggregation
CN108347359B (zh) 一种大型网络地址转换出口判断方法及装置
Morton Round-trip packet loss metrics
Freire et al. On metrics to distinguish skype flows from http traffic
Gonzalez et al. Enhancing network intrusion detection with integrated sampling and filtering
WO2022267490A1 (zh) 攻击识别方法、装置及系统、计算机可读存储介质
Liu et al. Programmable per-packet network telemetry: From wire to kafka at scale
Jereczek et al. TCP-INT: lightweight network telemetry with TCP transport
CN115348337B (zh) 一种基于多协议的tcp数据包解析分析方法及装置
JP7396368B2 (ja) 方法、システム及び変換装置
AU2014204529B2 (en) A method of assigning a core to process a packet and a device for multicore processing
WO2022199316A1 (zh) 控制方法、装置及计算设备
WO2023112175A1 (ja) トラフィック監視装置、トラフィック監視方法、及びプログラム
Morton RFC 6673: Round-Trip Packet Loss Metrics
WO2014101187A1 (zh) Ip性能测量方法和装置
Limmer Efficient Network Monitoring for Attack Detection

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14909403

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14909403

Country of ref document: EP

Kind code of ref document: A1