CN116800777A - Message processing method and device, electronic equipment and storage medium - Google Patents

Message processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116800777A
CN116800777A CN202210822715.XA CN202210822715A CN116800777A CN 116800777 A CN116800777 A CN 116800777A CN 202210822715 A CN202210822715 A CN 202210822715A CN 116800777 A CN116800777 A CN 116800777A
Authority
CN
China
Prior art keywords
message
abnormal
distributed storage
storage system
messages
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202210822715.XA
Other languages
Chinese (zh)
Inventor
吴瑶瑶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
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 China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202210822715.XA priority Critical patent/CN116800777A/en
Publication of CN116800777A publication Critical patent/CN116800777A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1425Traffic logging, e.g. anomaly detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The message processing method executed by the network backtracking analysis system provided by the embodiment of the disclosure comprises the following steps: receiving a message; uploading the received message to a distributed storage system in a stream type additional mode, wherein the message is stored in the distributed storage system in the stream type additional mode; determining whether abnormal messages exist in the received messages; when the abnormal message exists, the metadata of the abnormal message is transmitted to a preset data processing platform, wherein the metadata are used for carrying out abnormal analysis processing on the preset data processing platform. The network backtracking analysis system can receive the message and analyze whether the message is abnormal or not, the received message is uploaded to the distributed storage system in a stream type additional mode, the distributed storage system can store large-flow network data, metadata of the abnormal message is transmitted to the preset data processing platform, the preset data processing platform can conduct abnormal analysis processing through the metadata of the abnormal message, and analysis and backtracking of the large-flow network data are achieved.

Description

报文处理方法、装置、电子设备及存储介质Message processing method, device, electronic equipment and storage medium

技术领域Technical field

本公开涉及但不限于数据处理领域,尤其涉及一种报文处理方法、装置、电子设备及存储介质。The present disclosure relates to but is not limited to the field of data processing, and in particular, to a message processing method, device, electronic equipment and storage medium.

背景技术Background technique

在网络安全场景中,各种勒索病毒和网络攻击出现越来越频繁,在应对网络安全挑战的情况下,传统的入侵防御系统(IPS,Intrusion Prevention System)和入侵检测系统(IDS,intrusion detection system)设备在检测到威胁时提供单个报文信息无法很好地分析确定网络威胁并及时进行处理,在目前复杂的云网一体化的环境下,需要对网络数据流量进行完整地分析、存储和回溯。In network security scenarios, various ransomware viruses and network attacks appear more and more frequently. In response to network security challenges, traditional intrusion prevention systems (IPS, Intrusion Prevention System) and intrusion detection systems (IDS, intrusion detection systems) ) When a threat is detected, the device cannot provide a single message information to analyze, determine, and process network threats in a timely manner. In the current complex cloud-network integration environment, network data traffic needs to be completely analyzed, stored, and traced back. .

对于企业尤其是金融与互联网企业中,网络安全非常重要,对网络流量的回溯和分析也势在必行,然而企业级的网络数据流量非常大,对全部大流量的网络数据流量进行完整地分析、存储和回溯非常困难,现有的网络回溯分析系统往往通过系统中的磁盘阵列进行存储、分析和回溯,由于磁盘阵列存在存储流量小与读写限制等问题,现有的网络回溯分析系统已经不能支持对大流量数据进行分析、存储和回溯等。For enterprises, especially financial and Internet enterprises, network security is very important, and backtracking and analysis of network traffic is also imperative. However, enterprise-level network data traffic is very large, and all large-traffic network data traffic must be completely analyzed. , storage and traceback are very difficult. Existing network traceback analysis systems often use disk arrays in the system to store, analyze and traceback. Due to the problems of disk arrays with small storage traffic and read and write limitations, the existing network traceback analysis systems have been It cannot support analysis, storage and backtracking of large traffic data.

发明内容Contents of the invention

有鉴于此,本公开实施例公开了一种报文处理方法、装置、电子设备及存储介质。In view of this, embodiments of the present disclosure disclose a message processing method, device, electronic device, and storage medium.

根据本公开实施例的第一方面,提供一种报文处理方法,由网络回溯分析系统执行,所述方法包括:According to a first aspect of an embodiment of the present disclosure, a message processing method is provided, which is executed by a network traceback analysis system. The method includes:

接收报文;receive messages;

将接收的所述报文以流式追加方式上传给分布式存储系统,其中,所述报文被所述分布式存储系统以流式追加方式存储;Upload the received message to the distributed storage system in a streaming append mode, where the message is stored by the distributed storage system in a streaming append mode;

确定接收的所述报文中是否存在异常报文;Determine whether there is an abnormal message in the received message;

当存在所述异常报文时,将所述异常报文的元数据传输给预设数据处理平台,其中,所述元数据,用于所述预设数据处理平台进行异常分析处理。When the abnormal message exists, the metadata of the abnormal message is transmitted to a preset data processing platform, where the metadata is used by the preset data processing platform to perform exception analysis and processing.

在一个实施例中,所述确定接收的所述报文中是否存在异常报文,包括:确定接收的所述报文是否存在与异常字段匹配的字段;当接收的所述报文包含的报文字段与至少一个异常字段匹配时,确定包含与所述异常字段匹配的报文字段的所述报文为所述异常报文。In one embodiment, determining whether there is an abnormal message in the received message includes: determining whether the received message contains a field matching an abnormal field; when the received message contains a When the message field matches at least one exception field, it is determined that the message containing the message field matching the exception field is the abnormal message.

在一个实施例中,所述异常报文的元数据包括以下至少之一:源端口;目的端口;源互联网协议IP地址;目的互联网协议IP地址;对象名;异常报文包含的时间戳;威胁信息,所述威胁信息至少包括:所述异常报文包含的异常字段。In one embodiment, the metadata of the abnormal message includes at least one of the following: source port; destination port; source Internet Protocol IP address; destination Internet Protocol IP address; object name; timestamp included in the abnormal message; threat Information, the threat information at least includes: the abnormal field contained in the abnormal message.

在一个实施例中,所述将接收的所述报文以流式追加方式上传给分布式存储系统,包括:基于发送post请求将接收的报文以流式追加方式上传给分布式存储系统;,其中,所述基于post请求将接收的报文以流式追加方式上传给分布式存储系统,包括:将接收的报文存储在预定报文池中;将报文池中所述接收的报文通过发送post请求上传至分布式存储系统;在一个会话结束之前,在一次流式追加中,将报文池中同一会话标识的报文上传传给分布式存储系统。In one embodiment, uploading the received message to the distributed storage system in a streaming append mode includes: uploading the received message to the distributed storage system in a streaming append mode based on sending a post request; , wherein the uploading of received messages to the distributed storage system in a streaming append mode based on the post request includes: storing the received messages in a predetermined message pool; and storing the received messages in the message pool. The message is uploaded to the distributed storage system by sending a post request; before the end of a session, in a streaming append, the message with the same session ID in the message pool is uploaded to the distributed storage system.

在一个实施例中,所述post请求中包括:桶名,其中,所述桶名是由所述网络回溯分析系统接收所述报文的服务器的互联网协议IP地址命名的;其中,所述桶名,用于标识所述分布式存储系统中存储所述报文的存储桶;预定对象名,其中,所述预定对象名,是根据所述网络回溯分析系统中接收所述报文的服务器的通用唯一标识码UUID和接收的所述报文的会话标识ID得到的预定对象名确定的;所述预定对象名,用于确定所述分布式存储系统存储所述报文的文件。In one embodiment, the post request includes: a bucket name, where the bucket name is named by the Internet Protocol IP address of the server that the network traceback analysis system receives the message; wherein the bucket name A name, used to identify the storage bucket in the distributed storage system where the message is stored; a predetermined object name, where the predetermined object name is based on the server that received the message in the network traceback analysis system. The predetermined object name obtained by the universal unique identification code UUID and the session identification ID of the received message is determined; the predetermined object name is used to determine the file in which the distributed storage system stores the message.

第二方面,本公开实施例提供一种报文处理方法,由分布式存储系统执行,所述方法包括:In a second aspect, embodiments of the present disclosure provide a message processing method, which is executed by a distributed storage system. The method includes:

接收网络回溯分析系统以流式追加方式上传的报文;Receive messages uploaded by the network traceback analysis system in streaming append mode;

分布式存储以流式追加方式上传的报文;其中,所述报文,用于异常报文的追溯。Distributed storage of messages uploaded in a streaming append mode; wherein the messages are used for tracing abnormal messages.

第三方面,本公开实施例提供一种报文处理方法,由数据处理平台执行,所述方法包括:In a third aspect, embodiments of the present disclosure provide a message processing method, which is executed by a data processing platform. The method includes:

接收网络回溯分析系统发送的异常报文的元数据;Receive metadata of abnormal messages sent by the network backtracking analysis system;

根据所述异常报文的元数据生成预定的下载链接,其中,所述下载链接用于在分布式存储系统获取以流式追加方式存储的所述异常报文。A predetermined download link is generated according to the metadata of the abnormal message, where the download link is used to obtain the abnormal message stored in a streaming append mode in a distributed storage system.

在一个实施例中,所述方法还包括:根据所述异常报文的元数据确定威胁信息;根据所述威胁信息输出警报。In one embodiment, the method further includes: determining threat information based on metadata of the abnormal message; and outputting an alert based on the threat information.

第四方面,本公开实施例提供一种电子设备,所述电子设备包括:处理器和用于存储能够在处理器上运行的计算机程序的存储器;其中,所述处理器运行所述计算机程序时,执行前述一个或多个技术方案所述方法的步骤。In a fourth aspect, embodiments of the present disclosure provide an electronic device, the electronic device including: a processor and a memory for storing a computer program capable of running on the processor; wherein when the processor runs the computer program , perform the steps of the method described in one or more of the foregoing technical solutions.

第五方面,本公开实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令;计算机可执行指令被处理器执行后,能够实现前述一个或多个技术方案所述方法。In a fifth aspect, embodiments of the present disclosure provide a computer-readable storage medium that stores computer-executable instructions; after the computer-executable instructions are executed by a processor, one or more of the foregoing technical solutions can be implemented described method.

本公开实施例提供的报文处理方法,网络回溯分析系统可以接收报文并确定异常报文,将接收的报文以流式追加的方式上传给分布式存储系统,相较于直接将接收的报文存储到磁盘中,将报文上传给分布式存储系统可以增加保存报文的数量和效率,通过将异常报文的元数据上传到数据处理平台,相较于直接上传异常报文,异常报文的元数据更加简洁清晰,提高了异常数据传输的效率。According to the message processing method provided by the embodiments of the present disclosure, the network traceback analysis system can receive messages and determine abnormal messages, and upload the received messages to the distributed storage system in a streaming append manner. Compared with directly uploading the received messages, Messages are stored in disks and uploaded to the distributed storage system to increase the number and efficiency of saving messages. By uploading the metadata of abnormal messages to the data processing platform, compared with directly uploading abnormal messages, exceptions are The metadata of messages is more concise and clear, improving the efficiency of abnormal data transmission.

分布式存储系统可以分布式存储以流式追加上传的报文,相较于磁盘,分布式存储系统无需进行频繁的擦写,可以对大流量的数据通过分布式存储动态分配存储到多个对象存储设备中,对报文进行快速完整地保存和读写,从而实现对大流量的网络数据的存储和回溯。数据处理平台通过接收网络回溯分析系统发送的异常报文的元数据可以进行异常分析处理,相较于通过人工或者网络回溯分析系统进行异常分析处理,通过预设数据处理平台可以更加快速准确地对大流量产生的多个异常报文分析处理;通过对所述异常报文的元数据生成预定的下载链接,通过所述下载链接调用报文,相较于直接在分布式存储系统查找调用报文,下载链接可以针对性地调用异常报文相关的报文,还可以通过下载链接进行分享,可以实现多个用户和终端进行分析查看报文。The distributed storage system can distribute and store uploaded messages in a streaming manner. Compared with disks, the distributed storage system does not need to be frequently erased and can dynamically allocate and store large-traffic data to multiple objects through distributed storage. In the storage device, messages are quickly and completely saved, read and written, thereby realizing the storage and traceback of large-traffic network data. The data processing platform can perform exception analysis and processing by receiving the metadata of abnormal messages sent by the network traceback analysis system. Compared with abnormal analysis and processing through manual or network traceback analysis systems, the preset data processing platform can perform analysis and processing more quickly and accurately. Analysis and processing of multiple abnormal messages generated by large traffic; by generating a predetermined download link for the metadata of the abnormal message, and calling the message through the download link, compared to directly searching for the call message in the distributed storage system , the download link can specifically call messages related to abnormal messages, and can also be shared through the download link, allowing multiple users and terminals to analyze and view the messages.

如此,通过所述网络回溯分析系统、分布式存储系统和数据处理平台可以解决回溯分析系统对大流量的网络数据进行全流量存储和完整流量回溯的问题,提高对大流量的网络数据进行分析、存储和回溯的效率。In this way, the network traceback analysis system, distributed storage system and data processing platform can solve the problem of the traceback analysis system performing full flow storage and complete flow traceback of large-traffic network data, and improve the analysis and processing of large-traffic network data. Storage and backtracking efficiency.

附图说明Description of the drawings

图1为本公开实施例提供的一种报文处理方法的流程示意图一。Figure 1 is a schematic flowchart 1 of a packet processing method provided by an embodiment of the present disclosure.

图2为本公开实施例提供的一种报文处理方法的流程示意图二。Figure 2 is a schematic flowchart 2 of a message processing method provided by an embodiment of the present disclosure.

图3为本公开实施例提供的一种报文处理方法的流程示意图三。Figure 3 is a schematic flowchart 3 of a packet processing method provided by an embodiment of the present disclosure.

图4为本公开实施例提供的一种报文处理方法的流程示意图四。Figure 4 is a schematic flowchart 4 of a message processing method provided by an embodiment of the present disclosure.

图5为本公开实施例提供的一种报文处理系统的结构示意图。Figure 5 is a schematic structural diagram of a message processing system provided by an embodiment of the present disclosure.

图6为本公开实施例提供的一种报文处理方法的流程示意图。Figure 6 is a schematic flowchart of a message processing method provided by an embodiment of the present disclosure.

图7为本公开实施例提供的一种报文处理装置的示意图一。FIG. 7 is a schematic diagram 1 of a packet processing device provided by an embodiment of the present disclosure.

图8为本公开实施例提供的一种报文处理装置的示意图二。Figure 8 is a second schematic diagram of a packet processing device provided by an embodiment of the present disclosure.

图9为本公开实施例提供的一种报文处理装置的示意图三。Figure 9 is a schematic diagram three of a packet processing device provided by an embodiment of the present disclosure.

具体实施方式Detailed ways

为了使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开作进一步地详细描述,所描述的实施例不应视为对本公开的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present disclosure. Those of ordinary skill in the art will not make any All other embodiments obtained under the premise of creative work belong to the scope of protection of this disclosure.

在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict.

在以下的描述中,所涉及的术语“第一\第二\第三”仅仅是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本公开实施例能够以除了在这里图示或描述的以外的顺序实施。In the following description, the terms "first\second\third" are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understandable that "first\second\third" is used in Where permitted, the specific order or sequence may be interchanged so that the disclosed embodiments described herein can be practiced in other sequences than illustrated or described herein.

除非另有定义,本文所使用的所有的技术和科学术语与属于本公开的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本公开实施例的目的,不是旨在限制本公开。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing embodiments of the disclosure only and is not intended to limit the disclosure.

为了更好的理解本公开实施例,以下通过一些场景实施例进行说明:In order to better understand the embodiments of the present disclosure, some scenario examples are described below:

在网络流量的保存和回溯中,机械硬盘写入/读出(I/O,input/output)量可以是230MB/s,在网络数据流量的大小达到30Gbps时,需要同时写18块磁盘才能将流量完整的保存下来;固态硬盘虽然读写性能高,但是有擦写次数限制,不能进行多次保存和回溯;常见的工控机也受限于PCIE总线的传输速率,不能及时地保存大流量。In the storage and traceback of network traffic, the mechanical hard disk write/read (I/O, input/output) volume can be 230MB/s. When the size of network data traffic reaches 30Gbps, 18 disks need to be written simultaneously to write The traffic is completely preserved; although the solid-state disk has high read and write performance, it has a limit on the number of erasing and writing, and cannot save and trace back multiple times; common industrial computers are also limited by the transmission rate of the PCIE bus and cannot save large flows in a timely manner.

此外,磁盘写入前还需要先对报文按照会话进行哈希运算,才能保证报文在磁盘的读写成功,在网络流量回溯的过程中对磁盘进行频繁的读写也会给磁盘带来更多地I/O损耗,使网络流量回溯分析的效率降低。因此,传统的磁盘阵列方式不能支持大流量的网络回溯分析。In addition, before writing to the disk, the packets need to be hashed according to the session to ensure that the packets are read and written successfully on the disk. Frequent reading and writing of the disk during the process of network traffic backtracking will also bring problems to the disk. More I/O losses reduce the efficiency of network traffic traceback analysis. Therefore, traditional disk array methods cannot support large-traffic network backtracking analysis.

如图1所示,本公开实施例提供一种报文处理方法,由网络回溯分析系统执行,所述方法包括:As shown in Figure 1, an embodiment of the present disclosure provides a message processing method, which is executed by a network traceback analysis system. The method includes:

步骤S101:接收报文;Step S101: Receive message;

步骤S102:将接收的所述报文以流式追加方式上传给分布式存储系统,其中,所述报文被所述分布式存储系统以流式追加方式存储;Step S102: Upload the received message to the distributed storage system in a streaming append mode, where the message is stored by the distributed storage system in a streaming append mode;

步骤S103:确定接收的所述报文中是否存在异常报文;Step S103: Determine whether there is an abnormal message in the received message;

步骤S104:当存在所述异常报文时,将所述异常报文的元数据传输给预设数据处理平台,其中,所述元数据,用于所述预设数据处理平台进行异常分析处理。Step S104: When the abnormal message exists, transmit the metadata of the abnormal message to the preset data processing platform, where the metadata is used by the preset data processing platform to perform exception analysis and processing.

在一个实施例中,所述网络回溯分析系统可以包括:通过莫洛克moloch服务器组成的网络回溯分析系统。其中,所述moloch是能够用于大规模捕获流量数据报文并保存到硬盘上与对流量数据报文进行浏览、检索和分析的开源系统。In one embodiment, the network backtracking analysis system may include: a network backtracking analysis system composed of a Moloch server. Among them, Moloch is an open source system that can be used to capture large-scale traffic data packets and save them to a hard disk, as well as browse, retrieve and analyze traffic data packets.

在一个实施例中,所述网络回溯分析系统可以包括数据平面开发套件(DPDK,DataPlane Development Kit),其中,所述DPDK可以将快速处理数据报文的函数库与驱动集合,提高报文数据处理的性能和吞吐量。这样所述网络回溯分析系统可以实时处理大流量的网络数据。In one embodiment, the network traceback analysis system may include a Data Plane Development Kit (DPDK), wherein the DPDK may integrate function libraries and drivers for fast processing of data packets to improve packet data processing. performance and throughput. In this way, the network backtracking analysis system can process large-traffic network data in real time.

在一个实施例中,所述步骤S101可以包括通过网络回溯分析系统中多个服务器接收与服务器网络相互连接的流量数据报文。其中,所述多个服务器可以对应接收不同网段或不同网络连接设备的流量报文。这样,在出现异常报文时可以根据接收所述异常报文的服务器查找与异常报文相关联的报文。其中,所述相关联的报文可以包括与异常报文网络相连接、与异常报文网段相同和/或与异常报文相同网络连接设备的报文。In one embodiment, step S101 may include receiving traffic data packets interconnected with the server network through multiple servers in the network backtracking analysis system. Wherein, the multiple servers may correspondingly receive traffic packets from different network segments or different network connection devices. In this way, when an abnormal message occurs, the message associated with the abnormal message can be searched based on the server that received the abnormal message. Wherein, the associated packets may include packets from devices connected to the abnormal packet network, in the same network segment as the abnormal packet, and/or from devices connected to the same network as the abnormal packet.

在一个实施例中,所述流式追加方式可以为基于流式缓存技术的流式数据的追加操作方式。所述步骤S102可以包括将流式报文数据持续上传到分布式存储系统,在接收的报文数据追加上传到上一个相关联的上传的报文数据的后面。这样,将报文数据通过流式追加的方式进行上传可以一同存储相关联的报文数据,相较于对每个报文数据都创建新缓存和索引,通过流式追加方式可以将相关联的报文数据一同缓存、查找和读取,提高了对大流量数据的处理效率。In one embodiment, the streaming appending method may be a streaming data appending operation method based on streaming caching technology. The step S102 may include continuously uploading the streaming message data to the distributed storage system, and additionally uploading the received message data to the back of the last associated uploaded message data. In this way, uploading message data through streaming append can store associated message data together. Compared with creating a new cache and index for each message data, through streaming append, the associated message data can be stored together. Message data is cached, searched and read together, improving the efficiency of processing large traffic data.

在一个实施例中,所述异常报文可以包括可能包括病毒木马或者网络攻击等威胁信息的报文。In one embodiment, the abnormal messages may include messages that may include threat information such as viruses, Trojans, or network attacks.

在一个实施例中,确定是否存在所述异常报文可以包括根据异常行为或特征检测确定是否存在所述异常报文。其中,所述异常行为或特征可以根据威胁信息确定。示例性的,在泛洪攻击中可能包括大量的同步序列号(SYN,Synchronize Sequence Numbers)和/或确认字符(ACK,Acknowledge character)攻击报文,可以设置异常行为为预定时间内接收SYN和/或ACK的报文的次数超过预定阈值范围。In one embodiment, determining whether the abnormal message exists may include determining whether the abnormal message exists based on abnormal behavior or feature detection. Wherein, the abnormal behavior or characteristics can be determined based on threat information. For example, a flooding attack may include a large number of Synchronize Sequence Numbers (SYN) and/or Acknowledge character (ACK) attack messages. The abnormal behavior can be set to receive SYN and/or within a predetermined time. Or the number of ACK messages exceeds the predetermined threshold range.

在一个实施例中,所述元数据(metadata)可以为用于描述数据的数据,所述异常报文的元数据可以包括异常报文的关键属性信息。这样,将所述异常报文的元数据传输给预设数据处理平台,相较于将所有异常报文传输给预设数据处理平台,传输异常报文的元数据可以加快传输的速度,提高了对网络威胁数据的处理速度。In one embodiment, the metadata (metadata) may be data used to describe data, and the metadata of the abnormal message may include key attribute information of the abnormal message. In this way, the metadata of the abnormal message is transmitted to the preset data processing platform. Compared with transmitting all abnormal messages to the preset data processing platform, transmitting the metadata of the abnormal message can speed up the transmission and improve the efficiency. The speed of processing cyber threat data.

如图2所示,所述确定接收的所述报文中是否存在异常报文,包括:As shown in Figure 2, determining whether there is an abnormal message in the received message includes:

步骤S201:确定接收的所述报文是否存在与异常字段匹配的字段;Step S201: Determine whether the received message contains a field matching the abnormal field;

步骤S202:当接收的所述报文包含的报文字段与至少一个异常字段匹配时,确定包含与所述异常字段匹配的报文字段的所述报文为所述异常报文。Step S202: When the message field contained in the received message matches at least one exception field, determine that the message containing the message field matching the exception field is the abnormal message.

在一个实施例中,所述异常字段可以包括根据现有威胁信息确定的异常字段和与正常字段不同的异常字段。In one embodiment, the abnormal fields may include abnormal fields determined based on existing threat information and abnormal fields that are different from normal fields.

示例性的,所述异常字段可以包括:报文字节数异常、报文标志位异常、报文互联网协议(IP,Internet Protocol)地址异常和/或报文连接速率异常等。For example, the exception field may include: an abnormal number of message bytes, an abnormal message flag bit, an abnormal message Internet Protocol (IP, Internet Protocol) address, and/or an abnormal message connection rate, etc.

其中,所述报文字节数异常可以包括报文字节数小于报文最小字节数或报文字节数超过报文最大字节数,如控制报文协议(ICMP,Internet Control Message Protocol)报文最大字节数为65535,当ICMP报文字节数大于65535,所述ICMP报文为异常报文,可能对应死亡发送(Ping of death)的网络威胁。Wherein, the abnormal number of message bytes may include that the number of message bytes is less than the minimum number of bytes of the message or that the number of message bytes exceeds the maximum number of bytes of the message, such as Internet Control Message Protocol (ICMP). The maximum number of bytes in a ) message is 65535. When the number of bytes in an ICMP message is greater than 65535, the ICMP message is an abnormal message and may correspond to the network threat of ping of death.

其中,所述报文标志位异常可以为设置非常规报文标志位,如在网络威胁为TCP报文标志位攻击中,所述标志位异常可以包括:传输控制协议(TCP,Transmission ControlProtocol)报文的标志位全设置为1或全设置为0、标志位SYN和结束标志位(FIN,finish)同时为1和/或标志位SYN和重置标志位(RST,reset)位同时为1等。Wherein, the abnormal message flag bit may be to set an unconventional message flag bit. For example, when the network threat is a TCP message flag bit attack, the abnormal flag bit may include: Transmission Control Protocol (TCP, Transmission Control Protocol) packet The flag bits of the file are all set to 1 or all set to 0, the flag bit SYN and the end flag bit (FIN, finish) are both 1 and/or the flag bit SYN and the reset flag bit (RST, reset) are both 1, etc. .

其中,所述报文IP地址异常可以包括报文的源IP地址和/或目的IP地址异常,如报文的源IP地址为攻击主机的IP地址或目的IP地址与源IP地址相同。其中,所述报文连接速率异常可以包括报文的连接速率超过连接速率阈值,可以用于防止服务器短时间内接收大量攻击连接报文造成的服务器无法正常响应工作。The abnormal IP address of the message may include abnormality of the source IP address and/or destination IP address of the message. For example, the source IP address of the message is the IP address of the attacking host or the destination IP address is the same as the source IP address. The abnormal packet connection rate may include that the packet connection rate exceeds the connection rate threshold, which may be used to prevent the server from being unable to respond normally due to the server receiving a large number of attack connection packets in a short period of time.

在一个实施例中,所述步骤S201可以包括:根据预定的异常字段确定过滤规则,根据所述过滤规则对所述接收的报文进行搜索过滤匹配,根据搜索过滤后的结果确定接收的所述报文是否存在与异常字段匹配的字段。In one embodiment, the step S201 may include: determining a filtering rule according to a predetermined exception field, searching and filtering the received message according to the filtering rule, and determining the received message according to the search and filtered result. Whether the packet contains fields that match the exception fields.

在一个实施例中,所述过滤规则可以包括根据至少一个异常字段确定过滤规则。示例性的,所述过滤规则可以包括筛选确定源IP地址为127.0.0.1和/或报文字节数大于65535的报文,根据过滤规则筛选获得的报文为所述异常报文。这样,根据至少一个异常字段确定过滤规则可以更准确地判断异常报文可能对应的网络威胁的类型,可以使数据处理平台更准确地确定网络威胁,提高了对网络威胁的响应速度。In one embodiment, the filtering rules may include determining filtering rules based on at least one exception field. For example, the filtering rules may include filtering packets whose source IP address is 127.0.0.1 and/or the number of message bytes is greater than 65535, and the packets obtained by filtering according to the filtering rules are the abnormal packets. In this way, determining the filtering rule based on at least one abnormal field can more accurately determine the type of network threat that the abnormal message may correspond to, allowing the data processing platform to more accurately determine network threats, and improve the response speed to network threats.

在一个实施例中,所述方法还可以包括:确定预定时间段内所有接收的所述报文是否存在与异常字段匹配的字段,当接收的所述报文包含的报文字段与至少一个异常字段匹配时,确定包含与所述异常字段匹配的报文字段的所述报文为所述异常报文。这样,网络回溯分析系统根据预定时间段内接收的报文确定异常报文,相较于根据一个接收的报文确定异常报文,可以通过多个接收的报文确定异常报文,更准确地全面地确定异常报文。In one embodiment, the method may further include: determining whether all received messages within a predetermined time period contain fields that match an abnormal field. When the received message contains a message field that matches at least one exception, When the fields match, it is determined that the message containing the message field matching the abnormal field is the abnormal message. In this way, the network backtracking analysis system determines the abnormal message based on the messages received within the predetermined time period. Compared with determining the abnormal message based on one received message, it can determine the abnormal message based on multiple received messages, which is more accurate. Comprehensively identify abnormal messages.

在一个实施例中,所述异常报文的元数据包括以下至少之一:源端口、目的端口、源互联网协议IP地址、目的互联网协议IP地址、对象名、异常报文包含的时间戳和/或威胁信息,所述威胁信息至少包括:所述异常报文包含的异常字段。In one embodiment, the metadata of the abnormal message includes at least one of the following: source port, destination port, source Internet Protocol IP address, destination Internet Protocol IP address, object name, timestamp included in the abnormal message, and/or Or threat information, the threat information at least includes: the abnormal field contained in the abnormal message.

示例性的,所述异常报文可以包括发送异常报文的服务器向接收异常报文的服务异常发送的异常报文,所述源端口和源互联网协议(IP,Internet Protocol)地址可以包括发送异常报文的服务器的端口与IP地址,所述目的端口和目的IP地址可以包括接收异常报文的服务器的端口与IP地址。Exemplarily, the exception message may include an exception message sent by the server that sends the exception message to the service exception that receives the exception message, and the source port and source Internet Protocol (IP, Internet Protocol) address may include the server sending the exception message. The port and IP address of the server of the message. The destination port and destination IP address may include the port and IP address of the server that receives the abnormal message.

在一个实施例中,所述异常报文包含的时间戳可以用于确定异常报文包含的时间。其中,所述异常报文包含的时间戳可以包括:原始时间戳,用于确定发送异常报文的时间;和/或接收时间戳,用于确定接收异常报文的时间等。In one embodiment, the timestamp contained in the abnormal message can be used to determine the time contained in the abnormal message. The timestamp contained in the abnormal message may include: an original timestamp, used to determine the time of sending the abnormal message; and/or a receiving timestamp, used to determine the time of receiving the abnormal message, etc.

在一个实施例中,所述威胁信息可以用于确定网络威胁。将所述异常报文的元数据中的威胁信息发送至数据处理平台,相较于直接发送异常报文,可以使数据处理平台快速地根据所述威胁信息确定网络威胁的类型并进行告警,提高了网络安全的响应效率。In one embodiment, the threat information can be used to determine network threats. Sending the threat information in the metadata of the abnormal message to the data processing platform can enable the data processing platform to quickly determine the type of network threat based on the threat information and issue an alarm, compared to directly sending the abnormal message, thereby improving Improve network security response efficiency.

示例性的,所述元数据的格式可以是:By way of example, the format of the metadata may be:

{"objName":"3F2504E0-4F89-11D3-9A0C-0305E82C3301","srcPort":60409,"dstPort":53,"sessionId":"191217-aQuFA_-5t5RLFrsjujNaVgwU","IP":"10.230.1.117","timestamp":1576566105002,"srcIp":"10.230.1.151","dstIp":"10.88.7.10","firstConnectCountPackets":0,"node":"localhost","packetPos":[-145912325,500317654],"dns":{"ip":["107.163.177.82"],"hostName":["www.j2kdoan.top"],"status":["NOERROR"],"ttl":[600],"qt":["A"],"qc":["IN"],"rrType":[1]},"protocol":["udp","dns"],"suricata":{"flowIdCnt":1,"flowId":["155404755143330"],"actionCnt":1,"action":["allowed"],"signatureCnt":1,"signature":["ET DNS Query to a*.top domain–Likely Hostile"],"categoryCnt":1,"category":["PotentiallyBadTraffic"],"gidCnt":1,"gid":[1],"signatureIdCnt":1,"signatureId":[2023883],"severityCnt":1,"severity":[0]}};{"objName":"3F2504E0-4F89-11D3-9A0C-0305E82C3301","srcPort":60409,"dstPort":53,"sessionId":"191217-aQuFA_-5t5RLFrsjujNaVgwU","IP":"10.230.1.117" ,"timestamp":1576566105002,"srcIp":"10.230.1.151","dstIp":"10.88.7.10","firstConnectCountPackets":0,"node":"localhost","packetPos":[-145912325,500317654 ],"dns":{"ip":["107.163.177.82"],"hostName":["www.j2kdoan.top"],"status":["NOERROR"],"ttl":[600] ,"qt":["A"],"qc":["IN"],"rrType":[1]},"protocol":["udp","dns"],"suricata":{" flowIdCnt":1,"flowId":["155404755143330"],"actionCnt":1,"action":["allowed"],"signatureCnt":1,"signature":["ET DNS Query to a*. top domain–Likely Hostile"],"categoryCnt":1,"category":["PotentiallyBadTraffic"],"gidCnt":1,"gid":[1],"signatureIdCnt":1,"signatureId":[2023883 ],"severityCnt":1,"severity":[0]}};

其中,所述元数据包括:对象名(objName)、源端口(srcPort)、目的端口(dstPort)、会话标识(sessionId)、接收所述报文的网络回溯分析系统服务器IP、源网络协议IP地址(srcIp)、目的IP地址(dstIp)与包括签名(signature)和类别(category)的威胁信息等。The metadata includes: object name (objName), source port (srcPort), destination port (dstPort), session identifier (sessionId), network traceback analysis system server IP that receives the message, and source network protocol IP address. (srcIp), destination IP address (dstIp), and threat information including signature and category.

在一个实施例中,所述将接收的所述报文以流式追加方式上传给分布式存储系统,包括:In one embodiment, uploading the received message to the distributed storage system in a streaming append mode includes:

基于发送post请求将接收的报文以流式追加方式上传给分布式存储系统;其中,所述基于post请求将接收的报文以流式追加方式上传给分布式存储系统,包括:Uploading the received message to the distributed storage system in a streaming append mode based on sending a post request; wherein, uploading the received message to the distributed storage system in a streaming append mode based on the post request includes:

将接收的报文存储在预定报文池中;Store received messages in a predetermined message pool;

将所述预定报文池中所述接收的报文通过发送post请求上传至分布式存储系统;Upload the received messages in the predetermined message pool to the distributed storage system by sending a post request;

在一个会话结束之前,在一次流式追加中,将报文池中同一会话标识的报文上传传给分布式存储系统。Before a session ends, in a streaming append, the packets with the same session ID in the packet pool are uploaded to the distributed storage system.

在一个实施例中,所述post请求可以包括目标请求地址、请求的协议和/或发送的报文数据等。其中,所述目标请求地址可以包括:目标服务器地址和目标服务器的目标接口地址,所述目标接口地址可以包括目标服务器存放文件的路径。所述请求的协议使用的是超文本传输协议(HTTP,Hyper Text Transfer Protocol)。In one embodiment, the post request may include the target request address, the requested protocol and/or the message data to be sent, etc. Wherein, the target request address may include: a target server address and a target interface address of the target server, and the target interface address may include a path where the target server stores files. The requested protocol uses Hyper Text Transfer Protocol (HTTP).

在一个实施例中,所述post请求还可以包括同一会话中已上传报文的长度,其中,所述已上传报文的长度可以根据存储线程调用软件开发工具包(SDK,SoftwareDevelopment Kit)接口记录,所述已上传报文的长度可以用于分布式存储系统存储对象文件。In one embodiment, the post request may also include the length of the uploaded message in the same session, where the length of the uploaded message may be recorded according to the storage thread calling the Software Development Kit (SDK) interface. , the length of the uploaded message can be used to store object files in the distributed storage system.

在一个实施例中,所述post请求可以用于将接收的报文数据发送给分布式存储系统,所述目标请求地址可以为分布式存储系统的IP地址。In one embodiment, the post request may be used to send the received message data to the distributed storage system, and the target request address may be the IP address of the distributed storage system.

示例性的,所述post请求的语法可以包括:For example, the syntax of the post request may include:

POST/10-230-1-117/objName?append&position=Position HTTP/1.1POST/10-230-1-117/objName? append&position=Position HTTP/1.1

Host:127.0.0.1:8000Host:127.0.0.1:8000

User-Agent:python-requests/2.14.2User-Agent:python-requests/2.14.2

Accept-Encoding:gzip,deflateAccept-Encoding:gzip,deflate

Accept:*/*Accept:*/*

Connection:keep-aliveConnection:keep-alive

date:Tue,20Jul 2021 02:36:36GMTdate:Tue,20Jul 2021 02:36:36GMT

Authorization:AWS chx:p27eQoZ/PxY6Nbuud3SZq/r9ZMk=Authorization:AWS chx:p27eQoZ/PxY6Nbuud3SZq/r9ZMk=

在一个实施例中,所述报文池pool可以用于保存并管理所述接收的报文。In one embodiment, the message pool pool may be used to save and manage the received messages.

在一个实施例中,所述将所述预定报文池中所述接收的报文通过发送post请求上传至分布式存储系统可以包括将报文池中缓存buffer中接收的报文通过发送post请求上传至分布式存储系统。In one embodiment, uploading the received packets in the predetermined packet pool to the distributed storage system by sending a post request may include uploading the packets received in the cache buffer in the packet pool by sending a post request. Upload to distributed storage system.

在一个实施例中,所述会话可以为客户端对服务器端一次连续的调用过程,其中,包括多次请求与响应。示例性的,一个会话可以包括用户打开浏览器进行多次操作直到关闭浏览器一系列操作与相对应的用户客户端和服务器之间生成多次请求与响应的过程,一个会话中请求报文和响应报文都有同一会话标识。In one embodiment, the session may be a continuous calling process from the client to the server, including multiple requests and responses. For example, a session may include a user opening a browser and performing multiple operations until closing the browser. A series of operations and the process of generating multiple requests and responses between the corresponding user client and the server. Request messages in a session and The response messages all have the same session ID.

在一个实施例中,在一个会话结束之前,确定报文池中同一会话标识的报文,将同一会话标识的报文通过流式追加的方式上传至分布式存储系统中同一会话报文的后面。In one embodiment, before a session ends, the packets with the same session ID in the packet pool are determined, and the packets with the same session ID are uploaded to the back of the same session packet in the distributed storage system through streaming append. .

这样,相较于直接将所有报文上传至分布式存储系统中,将同一会话的报文通过流式追加的方式上传至分布式存储系统中同一会话报文的后面,可以将相同会话的报文按照顺序存储到一起,根据会话标识可以调用同一会话中的所有报文,提高了分布式存储系统存储和调用的效率。In this way, instead of directly uploading all messages to the distributed storage system, the messages of the same session are uploaded to the back of the same session messages in the distributed storage system through streaming append. The messages of the same session can be The messages are stored together in order, and all messages in the same session can be called according to the session ID, which improves the storage and calling efficiency of the distributed storage system.

在一个实施例中,所述方法可以包括:在一个会话结束之前,将报文池中同一会话标识的报文的post请求中目标请求地址设为相同的目标请求地址,基于所述同一目标请求地址将报文池中同一会话标识的报文流式追加上传传给分布式存储系统。In one embodiment, the method may include: before the end of a session, setting the target request address in the post request of the message with the same session ID in the message pool to the same target request address, based on the same target request The address streams additionally uploaded packets with the same session ID in the packet pool to the distributed storage system.

在一个实施例中,所述post请求中包括:In one embodiment, the post request includes:

桶名,其中,所述桶名是由所述网络回溯分析系统接收所述报文的服务器的互联网协议IP地址命名的;其中,所述桶名,用于标识所述分布式存储系统中存储所述报文的存储桶。Bucket name, wherein the bucket name is named by the Internet Protocol IP address of the server that the network traceback analysis system receives the message; wherein the bucket name is used to identify the storage in the distributed storage system The storage bucket of the message.

在一个实施例中,所述网络回溯分析系统中可以包括多个服务器,所述桶名可以对应其中一个接收所述报文的服务器的ip地址。这样,通过桶名标识所述分布式存储系统中存储所述报文的存储桶可以将报文根据接收所述报文的服务器进行分类保存,将相同服务器接收的报文分类保存可以提高对所述报文的回溯和分析的效率。In one embodiment, the network traceback analysis system may include multiple servers, and the bucket name may correspond to the IP address of one of the servers that receives the message. In this way, by identifying the bucket storing the message in the distributed storage system through the bucket name, the message can be classified and saved according to the server that receives the message. Classifying and saving the message received by the same server can improve the understanding of all messages. Describe the efficiency of packet traceback and analysis.

在一个实施例中,所述post请求中目标服务器中的目标接口地址可以包括桶名。In one embodiment, the target interface address in the target server in the post request may include a bucket name.

在一个实施例中,所述post请求还包括:In one embodiment, the post request also includes:

预定对象名,其中,所述预定对象名,是根据所述网络回溯分析系统中接收所述报文的服务器的通用唯一标识码UUID和接收的所述报文的会话标识ID得到的预定对象名确定的;所述预定对象名,用于确定所述分布式存储系统存储所述报文的文件。Predetermined object name, wherein the predetermined object name is a predetermined object name obtained based on the universal unique identification code UUID of the server that received the message in the network backtracking analysis system and the session identification ID of the received message. Determined; the predetermined object name is used to determine the file in which the distributed storage system stores the message.

在一个实施例中,所述预定对象名可以包括根据所述网络回溯分析系统中接收所述报文的服务器的通用唯一标识码UUID和接收的所述报文的会话标识ID通过哈希(hash)运算获得的预定对象名。这样,相同会话的报文可以拥有相同的预定对象名。In one embodiment, the predetermined object name may include a universal unique identification code (UUID) of the server that received the message in the network backtracking analysis system and a session identification ID of the received message through a hash. ) operation to obtain the predetermined object name. In this way, messages of the same session can have the same scheduled object name.

在一个实施例中,根据所述预定对象名确定的对象文件可以在根据所述桶名确定存储桶中,一个存储桶中可以包括多个预定对象名确定的对象文件。In one embodiment, the object file determined according to the predetermined object name may be in a bucket determined according to the bucket name, and one bucket may include multiple object files determined by the predetermined object name.

在一个实施例中,所述post请求中目标服务器中的目标接口地址可以包括桶名与预定对象名。同一服务器接收的相同会话的报文在post请求中目标接收地址可以是相同的桶名中的相同的预定对象名。In one embodiment, the target interface address in the target server in the post request may include a bucket name and a predetermined object name. For messages of the same session received by the same server, the target receiving address in the post request can be the same scheduled object name in the same bucket name.

如图3所示,本公开实施例提供一种报文处理方法,由分布式存储系统执行,所述方法包括:As shown in Figure 3, an embodiment of the present disclosure provides a message processing method, which is executed by a distributed storage system. The method includes:

步骤S301:接收网络回溯分析系统以流式追加方式上传的报文;Step S301: Receive the message uploaded by the network traceback analysis system in the streaming append mode;

步骤S302:分布式存储以流式追加方式上传的报文;其中,所述报文,用于异常报文的追溯。Step S302: Distributed storage of messages uploaded in a streaming append mode; wherein the messages are used for tracing abnormal messages.

在一个实施例中,所述分布式存储可以将数据分散存储在多台独立存储设备上并将分散的存储资源构成一个虚拟的存储设备。根据所述分布式存储可以将大流量的报文数据分散存储,相较于将大量报文数据存储到网络回溯分析系统中,将流量的解析与存储解耦,网络回溯分析系统无需保存大量报文数据减轻了运行的负担,提高了分析的效率,分布式存储系统可以对大流量的报文数据进行存储,提高了存储的效率,两者互相结合提高了整体对大流量数据的处理效率。In one embodiment, the distributed storage can dispersely store data on multiple independent storage devices and configure the dispersed storage resources into a virtual storage device. According to the distributed storage, large-traffic message data can be stored in a decentralized manner. Compared with storing a large amount of message data in the network traceback analysis system, the analysis and storage of traffic are decoupled, and the network traceback analysis system does not need to save a large number of reports. Text data reduces the operational burden and improves the efficiency of analysis. The distributed storage system can store large-traffic packet data and improves storage efficiency. The combination of the two improves the overall processing efficiency of large-traffic data.

在一个实施例中,所述分布式存储系统可以包括:分布式对象存储集群ceph等。其中,所述ceph存储集群可以包括多个ceph服务器,所述ceph服务器可以包括多个大容量存储设备。In one embodiment, the distributed storage system may include: a distributed object storage cluster ceph, etc. Wherein, the ceph storage cluster may include multiple ceph servers, and the ceph servers may include multiple large-capacity storage devices.

在一个实施例中,所述分布式对象存储集群中的存储线程可以采用多线程大量并发和/或远程直接数据存取(RDMA,Remote Direct Memory Access)等技术,从而可以实现可以用于大量客户端同时对报文数据进行落盘存储、读取、修改和/或删除等操作,提高了对大流量报文数据的保存和回溯效率。In one embodiment, the storage threads in the distributed object storage cluster can adopt technologies such as multi-threaded massive concurrency and/or remote direct data access (RDMA), so that it can be used for a large number of customers. The terminal simultaneously performs operations such as storing, reading, modifying and/or deleting message data, which improves the efficiency of saving and tracing large-traffic message data.

在一个实施例中,所述分布式对象存储集群还可以对所述报文数据进行容灾备份和/或定时删除等处理,其中,所述定时删除可以通过配置老化策略将过期的数据定时删除,提高了分布式对象存储集群存储的效率,所述容灾备份提高了报文数据存储的安全性和稳定性。In one embodiment, the distributed object storage cluster can also perform disaster recovery backup and/or scheduled deletion of the message data, wherein the scheduled deletion can periodically delete expired data by configuring an aging policy. , improving the efficiency of distributed object storage cluster storage, and the disaster recovery backup improves the security and stability of message data storage.

在一个实施例中,所述分布式存储以流式追加方式上传的报文包括:In one embodiment, the messages uploaded by the distributed storage in a streaming append mode include:

通过负载均衡服务器将所述上传的报文存储到对象存储设备OSD中。The uploaded message is stored in the object storage device OSD through the load balancing server.

在一个实施例中,所述负载均衡服务器可以用于根据负载均衡策略将上传的报文动态存储到不同的对象存储设备(OSD,Object-based Storage Device)中。通过所述负载均衡服务器可以动态分配上传的报文并存储,提高了对报文存储的效率。In one embodiment, the load balancing server may be used to dynamically store uploaded messages into different object-based storage devices (OSDs) according to load balancing policies. The load balancing server can dynamically distribute and store uploaded messages, thereby improving the efficiency of message storage.

在一个实施例中,所述负载均衡服务器可以包括:Linux虚拟服务器(LVS,LinuxVirtual Server)等。In one embodiment, the load balancing server may include: Linux virtual server (LVS, LinuxVirtual Server), etc.

在一个实施例中,所述对象存储设备OSD可以是ceph存储集群中的ceph OSD。所述OSD可以用于将所述上传的报文通过对象的形式存储到集群每个节点的物理磁盘上。In one embodiment, the object storage device OSD may be a ceph OSD in a ceph storage cluster. The OSD may be used to store the uploaded message in the form of an object on the physical disk of each node in the cluster.

在一个实施例中,所述接收网络回溯分析系统以流式追加方式上传的报文,包括:In one embodiment, the packets uploaded by the network backtracking analysis system in a streaming append mode include:

接收网络回溯分析系统基于发送post请求以流式追加方式上传的报文。The network traceback analysis system receives messages uploaded in streaming append mode based on sending post requests.

在一个实施例中,所述分布式存储系统解析post请求中目标请求地址、请求的协议和发送的报文数据获得网络回溯分析系统以流式追加方式上传的报文。In one embodiment, the distributed storage system parses the target request address, requested protocol and sent message data in the post request to obtain the message uploaded by the network traceback analysis system in a streaming append mode.

在一个实施例中,所述post请求还包括以下至少之一:In one embodiment, the post request also includes at least one of the following:

桶名,用于所述分布式系统确定存储所述报文的存储桶;所述桶名是由所述网络回溯分析系统接收所述报文的服务器的互联网协议IP地址命名的;Bucket name, used by the distributed system to determine the storage bucket in which the message is stored; the bucket name is named by the Internet Protocol IP address of the server that the network traceback analysis system receives the message;

预定对象名,所述预定对象名,用于所述分布式存储系统确定存储所述报文的文件;其中,所述预定对象名,是根据所述网络回溯分析系统中接收所述报文的服务器的通用唯一标识码UUID和接收的所述报文的会话标识ID得到的预定对象名确定的。Predetermined object name, the predetermined object name is used by the distributed storage system to determine the file to store the message; wherein the predetermined object name is based on the message received in the network traceback analysis system. The predetermined object name is determined by the universal unique identification code UUID of the server and the session identification ID of the received message.

在一个实施例中,所述分布式存储系统可以将上传的报文存储到预定存储桶的预定对象文件中,可以包括将一个报文存储到所述存储桶中的预定对象文件中,将同一会话的后续报文追加到同一存储桶中的同一预定对象文件中,直至会话结束。这样,将同一会话的内容存储到同一存储桶中的同一预定对象文件中,可以根据桶名和预定对象名查看并下载同一会话的报文,方便在出现异常时进行查看,提高了网络流量回溯的效率。In one embodiment, the distributed storage system may store uploaded messages in a predetermined object file in a predetermined bucket, which may include storing a message in a predetermined object file in the bucket, and storing the same message in a predetermined object file in the bucket. Subsequent messages of the session are appended to the same scheduled object file in the same bucket until the session ends. In this way, the contents of the same session are stored in the same scheduled object file in the same bucket, and the messages of the same session can be viewed and downloaded based on the bucket name and scheduled object name, which facilitates viewing when an exception occurs and improves the efficiency of network traffic traceback. efficiency.

如图4所示,本公开实施例提供一种报文处理方法,由数据处理平台执行,所述方法包括:As shown in Figure 4, an embodiment of the present disclosure provides a message processing method, which is executed by a data processing platform. The method includes:

步骤S401:接收网络回溯分析系统发送的异常报文的元数据;Step S401: Receive metadata of the abnormal message sent by the network backtracking analysis system;

步骤S402:根据所述异常报文的元数据生成预定的下载链接,其中,所述下载链接用于在分布式存储系统调用预定报文。Step S402: Generate a predetermined download link according to the metadata of the abnormal message, where the download link is used to call the predetermined message in the distributed storage system.

在一个实施例中,所述数据处理平台可以包括大数据分析处理平台等。In one embodiment, the data processing platform may include a big data analysis and processing platform, etc.

在一个实施例中,所述数据处理平台可以根据所述异常报文的元数据中的桶名与对象名从所述分布式存储系统中调用预定报文。其中,所述预定报文可以包括与桶名对应的接收所述报文的网络回溯分析系统中对应服务器接收的报文和与对象名对应的会话中的报文。In one embodiment, the data processing platform can call a predetermined message from the distributed storage system based on the bucket name and object name in the metadata of the exception message. The predetermined message may include a message received by a corresponding server in the network traceback analysis system that receives the message corresponding to the bucket name and a message in the session corresponding to the object name.

在一个实施例中,所述根据所述异常报文的元数据生成预定的下载链接可以包括根据所述异常报文的元数据中的所述预定对象名和所述桶名生成预定的URL下载链接,用户可以根据所述下载链接在分布式存储系统调用所述异常报文相同会话标识的报文。这样,根据所述下载链接可以使多个用户或者终端对包括异常报文的预定报文进行查看、下载、分析和/或分享等功能,可以支持多终端联动分析和/或异地分析等功能,提高了流量回溯的灵活性和便捷性。In one embodiment, generating a predetermined download link based on the metadata of the exception message may include generating a predetermined URL download link based on the predetermined object name and the bucket name in the metadata of the exception message. , the user can call the message with the same session ID of the abnormal message in the distributed storage system according to the download link. In this way, according to the download link, multiple users or terminals can view, download, analyze and/or share scheduled messages including abnormal messages, and can support functions such as multi-terminal linkage analysis and/or off-site analysis. Improved the flexibility and convenience of traffic traceback.

在一个实施例中,所述方法还包括根据所述异常报文的元数据获得获取get请求;根据向分布式存储系统发送所述get请求获取异常报文。这样,所述数据处理平台可以获得的异常报文或与异常报文相关的报文进行进一步地分析处理。In one embodiment, the method further includes obtaining a get request based on the metadata of the exception message; and obtaining the exception message based on sending the get request to the distributed storage system. In this way, the abnormal messages or messages related to the abnormal messages that can be obtained by the data processing platform are further analyzed and processed.

示例性的,所述get请求的格式可以包括:For example, the format of the get request may include:

GET/10-230-1-117/objName HTTP/1.1GET/10-230-1-117/objName HTTP/1.1

Host:127.0.0.1:8000Host:127.0.0.1:8000

User-Agent:python-requests/2.14.2User-Agent:python-requests/2.14.2

Accept-Encoding:gzip,deflateAccept-Encoding:gzip,deflate

Accept:*/*Accept:*/*

Connection:keep-aliveConnection:keep-alive

date:Tue,20Jul 2021 06:59:46GMTdate:Tue,20Jul 2021 06:59:46GMT

Authorization:AWS chx:ELUe+eMFxxK/58KnEIfZoPGPNfk=Authorization:AWS chx:ELUe+eMFxxK/58KnEIfZoPGPNfk=

在一个实施例中,所述方法还包括:In one embodiment, the method further includes:

根据所述异常报文的元数据确定威胁信息;Determine threat information based on the metadata of the abnormal message;

根据所述威胁信息输出警报。An alert is output based on the threat information.

在一个实施例中,所述方法还包括:将所述威胁信息和警报通过web形式进行输出展示。In one embodiment, the method further includes: outputting and displaying the threat information and alerts in a web form.

在一个实施例中,所述根据异常报文的元数据确定威胁信息可以包括通过大数据分析处理平台根据所述异常报文的元数据进行数据运算确定威胁信息,其中,所述数据运算可以包括查询数据、统计数据和/或数据分析等,其中,所述数据运算可以通过机器学习算法进行运算。In one embodiment, determining the threat information based on the metadata of the abnormal message may include using a big data analysis and processing platform to perform data operations based on the metadata of the abnormal message to determine the threat information, wherein the data operation may include Query data, statistical data and/or data analysis, etc., wherein the data operations can be performed through machine learning algorithms.

在一个实施例中,所述确定威胁信息可以包括确定是否存在网络攻击或病毒、确定网络威胁信息的类型和等级和/或确定网络威胁的来源和确定与网络威胁相对应的处理方法。In one embodiment, determining the threat information may include determining whether there is a network attack or virus, determining the type and level of the network threat information, and/or determining the source of the network threat and determining a processing method corresponding to the network threat.

在一个实施例中,所述根据所述威胁信息输出警报可以包括根据威胁信息的类型和等级输出不同等级的警报。In one embodiment, outputting an alert according to the threat information may include outputting alerts of different levels according to the type and level of the threat information.

本公开实施例提供一种报文处理系统,所述报文处理系统包括:Embodiments of the present disclosure provide a message processing system. The message processing system includes:

网络回溯分析系统,用于:接收报文;将接收的所述报文以流式追加方式上传给分布式存储系统,其中,所述报文被所述分布式存储系统以流式追加方式存储;确定接收的所述报文中是否存在异常报文;当存在所述异常报文时,将所述异常报文的元数据传输给预设数据处理平其中,所述元数据,用于所述预设数据处理平台进行异常分析处理;A network traceback analysis system, configured to: receive messages; upload the received messages to a distributed storage system in a streaming append mode, wherein the messages are stored by the distributed storage system in a streaming append mode ; Determine whether there is an abnormal message in the received message; when the abnormal message exists, transmit the metadata of the abnormal message to the preset data processing platform, where the metadata is used for all The above-mentioned preset data processing platform performs abnormal analysis and processing;

分布式存储系统,用于:接收网络回溯分析系统以流式追加方式上传的报文;分布式存储以流式追加方式上传的报文;其中,所述报文,用于异常报文的追溯;A distributed storage system, used for: receiving messages uploaded by the network traceback analysis system in a streaming append mode; distributed storage of messages uploaded by a streaming append mode; wherein the messages are used for traceability of abnormal messages ;

数据处理平台,用于:接收网络回溯分析系统发送的异常报文的元数据;根据所述异常报文的元数据生成预定的下载链接,其中,所述下载链接用于在分布式存储系统获取以流式追加方式存储的所述异常报文。A data processing platform, configured to: receive metadata of abnormal messages sent by the network traceback analysis system; generate a predetermined download link based on the metadata of the abnormal message, wherein the download link is used to obtain in the distributed storage system The abnormal message stored in streaming append mode.

在一个实施例中,所述网络回溯分析系统还用于:确定接收的所述报文是否存在与异常字段匹配的字段;当接收的所述报文包含的报文字段与至少一个异常字段匹配时,确定包含与所述异常字段匹配的报文字段的所述报文为所述异常报文。In one embodiment, the network traceback analysis system is also used to: determine whether the received message contains a field that matches an abnormal field; when the received message contains a message field that matches at least one abnormal field When , it is determined that the message containing the message field matching the abnormal field is the abnormal message.

在一个实施例中,所述异常报文的元数据包括以下至少之一:源端口;目的端口;源互联网协议IP地址;目的互联网协议IP地址;对象名;异常报文包含的时间戳;威胁信息,所述威胁信息至少包括:所述异常报文包含的异常字段。In one embodiment, the metadata of the abnormal message includes at least one of the following: source port; destination port; source Internet Protocol IP address; destination Internet Protocol IP address; object name; timestamp included in the abnormal message; threat Information, the threat information at least includes: the abnormal field contained in the abnormal message.

在一个实施例中,所述网络回溯分析系统,还用于:基于post请求将接收的报文以流式追加方式上传给分布式存储系统;其中,所述基于post请求将接收的报文以流式追加方式上传给分布式存储系统,包括:将接收的报文存储在预定报文池中;将所述预定报文池中所述接收的报文通过发送post请求上传至分布式存储系统;在一个会话结束之前,在一次流式追加中,将报文池中同一会话标识的报文上传传给分布式存储系统。In one embodiment, the network traceback analysis system is also configured to: upload the received message to the distributed storage system in a streaming append mode based on the post request; wherein, the received message based on the post request is uploaded to the distributed storage system in a streaming append mode. The streaming append method is uploaded to the distributed storage system, including: storing the received messages in a predetermined message pool; uploading the received messages in the predetermined message pool to the distributed storage system by sending a post request ; Before the end of a session, in a streaming append, the packets with the same session ID in the packet pool are uploaded to the distributed storage system.

在一个实施例中,所述post请求中包括:桶名,其中,所述桶名是由所述网络回溯分析系统接收所述报文的服务器的互联网协议IP地址命名的;其中,所述桶名,用于标识所述分布式存储系统中存储所述报文的存储桶;预定对象名,其中,所述预定对象名,是根据所述网络回溯分析系统中接收所述报文的服务器的通用唯一标识码UUID和接收的所述报文的会话标识ID得到的预定对象名确定的;所述预定对象名,用于确定所述分布式存储系统存储所述报文的文件。In one embodiment, the post request includes: a bucket name, where the bucket name is named by the Internet Protocol IP address of the server that the network traceback analysis system receives the message; wherein the bucket name A name, used to identify the storage bucket in the distributed storage system where the message is stored; a predetermined object name, where the predetermined object name is based on the server that received the message in the network traceback analysis system. The predetermined object name obtained by the universal unique identification code UUID and the session identification ID of the received message is determined; the predetermined object name is used to determine the file in which the distributed storage system stores the message.

在一个实施例中,所述分布式存储系统还用于:通过负载均衡服务器将所述上传的报文存储到对象存储设备OSD中。In one embodiment, the distributed storage system is further configured to: store the uploaded message into an object storage device OSD through a load balancing server.

在一个实施例中个,所述分布式存储系统还用于:接收网络回溯分析系统基于发送post请求以流式追加方式上传的报文。In one embodiment, the distributed storage system is further configured to: receive messages uploaded by the network traceback analysis system in a streaming append mode based on sending a post request.

在一个实施例中,所述数据处理平台还用于:根据所述异常报文的元数据确定威胁信息;根据所述威胁信息输出警报。In one embodiment, the data processing platform is further configured to: determine threat information based on metadata of the abnormal message; and output an alert based on the threat information.

如图5所示,在一个实施例中,一种报文处理系统中所述网络回溯分析系统可以由moloch服务器组成,所述分布式存储系统可以根据ceph集群组成,所述ceph集群包括LVS服务器和ceph服务器,所述数据处理平台可以由大数据分析处理平台组成。As shown in Figure 5, in one embodiment, the network backtracking analysis system in a message processing system can be composed of a moloch server, and the distributed storage system can be composed of a ceph cluster. The ceph cluster includes an LVS server. and ceph server, the data processing platform may be composed of a big data analysis and processing platform.

在一个实施例中,如图6所示,通过所述报文处理系统进行报文处理的流程可以包括:In one embodiment, as shown in Figure 6, the process of packet processing through the packet processing system may include:

通过网络回溯分析系统接收报文;Receive messages through the network traceback analysis system;

通过网络回溯分析系统将接收的所述报文以流式追加方式上传给分布式存储系统;Upload the received message to the distributed storage system in a streaming append mode through the network traceback analysis system;

通过网络回溯分析系统确定异常报文,并将所述异常报文的元数据传输给预设数据处理平台;Determine abnormal messages through the network traceback analysis system, and transmit the metadata of the abnormal messages to the preset data processing platform;

分布式存储系统接收到网络回溯分析系统以流式追加方式上传的报文,根据分布式存储系统中的负载均衡服务器将所述上传的报文存储到对象存储设备OSD中;The distributed storage system receives the message uploaded by the network traceback analysis system in a streaming append mode, and stores the uploaded message in the object storage device OSD according to the load balancing server in the distributed storage system;

通过数据处理平台接收网络回溯分析系统发送的异常报文的元数据;Receive metadata of abnormal messages sent by the network backtracking analysis system through the data processing platform;

通过数据处理平台根据所述异常报文的元数据生成预定的下载链接,其中,所述下载链接用于在分布式存储系统调用预定报文;Generate a predetermined download link based on the metadata of the abnormal message through the data processing platform, where the download link is used to call the predetermined message in the distributed storage system;

通过数据处理平台根据所述异常报文的元数据确定威胁信息并输出警报;Use the data processing platform to determine threat information based on the metadata of the abnormal message and output an alert;

用户在数据处理平台查看威胁信息和警报,并通过预定的下载链接从分布式存储系统中下载预定的报文。Users view threat information and alerts on the data processing platform, and download scheduled messages from the distributed storage system through scheduled download links.

如图7所示,本公开实施例提供一种报文处理装置,所述装置包括:As shown in Figure 7, an embodiment of the present disclosure provides a message processing device. The device includes:

接收模块,用于接收报文;Receiving module, used to receive messages;

上传模块,用于将接收的所述报文以流式追加方式上传给分布式存储系统,其中,所述报文被所述分布式存储系统以流式追加方式存储;An upload module, configured to upload the received message to the distributed storage system in a streaming append mode, wherein the message is stored by the distributed storage system in a streaming append mode;

确定模块,用于确定接收的所述报文中是否存在异常报文;A determination module, used to determine whether there is an abnormal message in the received message;

传输模块,用于当存在所述异常报文时,将所述异常报文的元数据传输给预设数据处理平台,其中,所述元数据,用于所述预设数据处理平台进行异常分析处理。A transmission module, used to transmit the metadata of the abnormal message to a preset data processing platform when the abnormal message exists, wherein the metadata is used for the preset data processing platform to perform abnormal analysis. deal with.

在一个实施例中,所述确定模块,还用于:确定接收的所述报文是否存在与异常字段匹配的字段;当接收的所述报文包含的报文字段与至少一个异常字段匹配时,确定包含与所述异常字段匹配的报文字段的所述报文为所述异常报文。In one embodiment, the determination module is further configured to: determine whether the received message contains a field that matches an abnormal field; when the message field contained in the received message matches at least one abnormal field , determining that the message containing the message field matching the abnormal field is the abnormal message.

在一个实施例中,所述传输模块中的异常报文的元数据包括以下至少之一:源端口;目的端口;源互联网协议IP地址;目的互联网协议IP地址;对象名;异常报文包含的时间戳;威胁信息,所述威胁信息至少包括:所述异常报文包含的异常字段。In one embodiment, the metadata of the abnormal message in the transmission module includes at least one of the following: source port; destination port; source Internet Protocol IP address; destination Internet Protocol IP address; object name; the exception message contains Timestamp; threat information, the threat information at least includes: the abnormal field contained in the abnormal message.

在一个实施例中,所述上传模块,还用于:基于发送post请求将接收的报文以流式追加方式上传给分布式存储系统;所述上传模块,还包括:存储模块,用于将接收的报文存储在预定报文池中;所述上传模块,还包括:发送模块,用于将报文池中所述接收的报文通过发送post请求上传至分布式存储系统;所述上传模块,还用于:在一个会话结束之前,在一次流式追加中,将报文池中同一会话标识的报文上传传给分布式存储系统。In one embodiment, the upload module is also configured to: upload the received message to the distributed storage system in a streaming append mode based on sending a post request; the upload module also includes: a storage module, used to The received messages are stored in a predetermined message pool; the upload module also includes: a sending module, used to upload the received messages in the message pool to the distributed storage system by sending a post request; the upload The module is also used to upload messages with the same session ID in the message pool to the distributed storage system in a streaming append before the end of a session.

在一个实施例中,所述post请求中包括:桶名,其中,所述桶名是由所述网络回溯分析系统接收所述报文的服务器的互联网协议IP地址命名的;其中,所述桶名,用于标识所述分布式存储系统中存储所述报文的存储桶;预定对象名,其中,所述预定对象名,是根据所述网络回溯分析系统中接收所述报文的服务器的通用唯一标识码UUID和接收的所述报文的会话标识ID得到的预定对象名确定的;所述预定对象名,用于确定所述分布式存储系统存储所述报文的文件。In one embodiment, the post request includes: a bucket name, where the bucket name is named by the Internet Protocol IP address of the server that the network traceback analysis system receives the message; wherein the bucket name A name, used to identify the storage bucket in the distributed storage system where the message is stored; a predetermined object name, where the predetermined object name is based on the server that received the message in the network traceback analysis system. The predetermined object name obtained by the universal unique identification code UUID and the session identification ID of the received message is determined; the predetermined object name is used to determine the file in which the distributed storage system stores the message.

如图8所示,本公开实施例提供一种报文处理装置,所述装置包括:As shown in Figure 8, an embodiment of the present disclosure provides a message processing device. The device includes:

接收模块,用于接收网络回溯分析系统以流式追加方式上传的报文;The receiving module is used to receive messages uploaded by the network traceback analysis system in the streaming append mode;

分布式存储模块,用于分布式存储以流式追加方式上传的报文;其中,所述报文,用于异常报文的追溯。The distributed storage module is used for distributed storage of messages uploaded in a streaming append mode; wherein the messages are used for tracing abnormal messages.

如图9所示,本公开实施例提供一种报文处理装置,所述装置包括:As shown in Figure 9, an embodiment of the present disclosure provides a message processing device. The device includes:

接收模块,用于接收网络回溯分析系统发送的异常报文的元数据;The receiving module is used to receive metadata of abnormal messages sent by the network backtracking analysis system;

生成模块,用于:根据所述异常报文的元数据生成预定的下载链接,其中,所述下载链接用于在分布式存储系统获取以流式追加方式存储的所述异常报文。A generation module, configured to: generate a predetermined download link according to the metadata of the abnormal message, wherein the download link is used to obtain the abnormal message stored in a streaming append mode in a distributed storage system.

在一个实施例中,所述装置还包括:确定模块,用于根据所述异常报文的元数据确定威胁信息;输出模块,用于根据所述威胁信息输出警报。In one embodiment, the device further includes: a determination module, configured to determine threat information based on the metadata of the abnormal message; and an output module, configured to output an alert based on the threat information.

需要说明的是,本领域内技术人员可以理解,本公开实施例提供的方法,可以被单独执行,也可以与本公开实施例中一些方法或相关技术中的一些方法一起被执行。It should be noted that those skilled in the art can understand that the methods provided in the embodiments of the present disclosure can be executed alone or together with some methods in the embodiments of the present disclosure or some methods in related technologies.

本公开实施例还提供一种电子设备,所述电子设备包括:处理器和用于存储能够在处理器上运行的计算机程序的存储器,处理器运行所述计算机程序时,执行前述一个或多个技术方案所述方法的步骤。An embodiment of the present disclosure also provides an electronic device. The electronic device includes: a processor and a memory for storing a computer program that can be run on the processor. When the processor runs the computer program, it executes one or more of the foregoing The steps of the method described in the technical solution.

本公开实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可执行指令,计算机可执行指令被处理器执行后,能够实现前述一个或多个技术方案所述方法。Embodiments of the present disclosure also provide a computer-readable storage medium that stores computer-executable instructions. After the computer-executable instructions are executed by the processor, the method described in one or more of the foregoing technical solutions can be implemented. .

本实施例提供的计算机存储介质可为非瞬间存储介质。在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。The computer storage medium provided in this embodiment may be a non-transient storage medium. In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components may be combined, or can be integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be electrical, mechanical, or other forms. of.

上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units; Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本公开各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present disclosure can be all integrated into one processing module, or each unit can be separately used as a unit, or two or more units can be integrated into one unit; the above-mentioned integration The unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

在一些情况下,上述任一两个技术特征不冲突的情况下,可以组合成新的方法技术方案。In some cases, if any two of the above technical features do not conflict, they can be combined into a new method and technical solution.

在一些情况下,上述任一两个技术特征不冲突的情况下,可以组合成新的设备技术方案。In some cases, if any two of the above technical features do not conflict, they can be combined into a new equipment technical solution.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, It includes the steps of the above method embodiment; and the aforementioned storage media includes: mobile storage devices, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks, etc. A medium on which program code can be stored.

以上所述,仅为本公开的具体实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure. should be covered by the protection scope of this disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims (10)

1.一种报文处理方法,其特征在于,由网络回溯分析系统执行,所述方法包括:1. A message processing method, characterized in that it is executed by a network traceback analysis system, and the method includes: 接收报文;receive messages; 将接收的所述报文以流式追加方式上传给分布式存储系统,其中,所述报文被所述分布式存储系统以流式追加方式存储;Upload the received message to the distributed storage system in a streaming append mode, where the message is stored by the distributed storage system in a streaming append mode; 确定接收的所述报文中是否存在异常报文;Determine whether there is an abnormal message in the received message; 当存在所述异常报文时,将所述异常报文的元数据传输给预设数据处理平台其中,所述元数据,用于所述预设数据处理平台进行异常分析处理。When the abnormal message exists, the metadata of the abnormal message is transmitted to the preset data processing platform, and the metadata is used by the preset data processing platform to perform exception analysis and processing. 2.根据权利要求1所述的方法,其特征在于,所述确定接收的所述报文中是否存在异常报文,包括:2. The method according to claim 1, wherein the determining whether there is an abnormal message in the received message includes: 确定接收的所述报文是否存在与异常字段匹配的字段;Determine whether the received message contains a field matching the abnormal field; 当接收的所述报文包含的报文字段与至少一个异常字段匹配时,确定包含与所述异常字段匹配的报文字段的所述报文为所述异常报文。When the message field contained in the received message matches at least one exception field, it is determined that the message containing the message field matching the exception field is the abnormal message. 3.根据权利要求1或2所述的方法,其特征在于,所述异常报文的元数据包括以下至少之一:3. The method according to claim 1 or 2, characterized in that the metadata of the abnormal message includes at least one of the following: 源端口;source port; 目的端口;destination port; 源互联网协议IP地址;Source Internet Protocol IP address; 目的互联网协议IP地址;Destination Internet Protocol IP address; 对象名;object name; 异常报文包含的时间戳;The timestamp included in the exception message; 威胁信息,所述威胁信息至少包括:所述异常报文包含的异常字段。Threat information, the threat information at least includes: the abnormal field contained in the abnormal message. 4.根据权利要求1或2所述的方法,其特征在于,所述将接收的所述报文以流式追加方式上传给分布式存储系统,包括:4. The method according to claim 1 or 2, characterized in that uploading the received message to the distributed storage system in a streaming append mode includes: 基于post请求将接收的报文以流式追加方式上传给分布式存储系统;Upload the received message to the distributed storage system in a streaming append method based on the post request; 其中,所述基于post请求将接收的报文以流式追加方式上传给分布式存储系统,包括:Among them, the received messages are uploaded to the distributed storage system in a streaming append mode based on the post request, including: 将接收的报文存储在预定报文池中;Store received messages in a predetermined message pool; 将所述预定报文池中所述接收的报文通过发送post请求上传至分布式存储系统;Upload the received messages in the predetermined message pool to the distributed storage system by sending a post request; 在一个会话结束之前,在一次流式追加中,将报文池中同一会话标识的报文上传传给分布式存储系统。Before a session ends, in a streaming append, the packets with the same session ID in the packet pool are uploaded to the distributed storage system. 5.根据权利要求4所述的方法,其特征在于,所述post请求中包括:5. The method according to claim 4, characterized in that the post request includes: 桶名,其中,所述桶名是由所述网络回溯分析系统接收所述报文的服务器的互联网协议IP地址命名的;其中,所述桶名,用于标识所述分布式存储系统中存储所述报文的存储桶;Bucket name, where the bucket name is named by the Internet Protocol IP address of the server that the network traceback analysis system receives the message; where the bucket name is used to identify the storage in the distributed storage system The storage bucket of the message; 预定对象名,其中,所述预定对象名,是根据所述网络回溯分析系统中接收所述报文的服务器的通用唯一标识码UUID和接收的所述报文的会话标识ID得到的预定对象名确定的;所述预定对象名,用于确定所述分布式存储系统存储所述报文的文件。Predetermined object name, wherein the predetermined object name is a predetermined object name obtained based on the universal unique identification code UUID of the server that received the message in the network traceback analysis system and the session identification ID of the received message. Determined; the predetermined object name is used to determine the file in which the distributed storage system stores the message. 6.一种报文处理方法,其特征在于,由分布式存储系统执行,所述方法包括:6. A message processing method, characterized in that it is executed by a distributed storage system, and the method includes: 接收网络回溯分析系统以流式追加方式上传的报文;Receive messages uploaded by the network traceback analysis system in streaming append mode; 分布式存储以流式追加方式上传的报文;其中,所述报文,用于异常报文的追溯。Distributed storage of messages uploaded in a streaming append mode; wherein the messages are used for tracing abnormal messages. 7.一种报文处理方法,其特征在于,由数据处理平台执行,所述方法包括:7. A message processing method, characterized in that it is executed by a data processing platform, and the method includes: 接收网络回溯分析系统发送的异常报文的元数据;Receive metadata of abnormal messages sent by the network backtracking analysis system; 根据所述异常报文的元数据生成预定的下载链接,其中,所述下载链接用于在分布式存储系统获取以流式追加方式存储的所述异常报文。A predetermined download link is generated according to the metadata of the abnormal message, where the download link is used to obtain the abnormal message stored in a streaming append mode in a distributed storage system. 8.根据权利要求7所述的方法,其特征在于,所述方法还包括:8. The method according to claim 7, characterized in that the method further comprises: 根据所述异常报文的元数据确定威胁信息;Determine threat information based on the metadata of the abnormal message; 根据所述威胁信息输出警报。An alert is output based on the threat information. 9.一种电子设备,其特征在于,所述电子设备包括:处理器和用于存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器运行计算机程序时,执行权利要求1至8任一项所述报文处理方法的步骤。9. An electronic device, characterized in that the electronic device includes: a processor and a memory for storing a computer program capable of running on the processor, wherein when the processor runs the computer program, claim 1 is executed Go to the steps of the message processing method described in any one of 8. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机可执行指令;所述计算机可执行指令被处理器执行后,能够实现如权利要求1至8任一项所述报文处理方法。10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer-executable instructions; after the computer-executable instructions are executed by a processor, the computer-readable storage medium can realize any one of claims 1 to 8 The message processing method described in the item.
CN202210822715.XA 2022-07-12 2022-07-12 Message processing method and device, electronic equipment and storage medium Pending CN116800777A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210822715.XA CN116800777A (en) 2022-07-12 2022-07-12 Message processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210822715.XA CN116800777A (en) 2022-07-12 2022-07-12 Message processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116800777A true CN116800777A (en) 2023-09-22

Family

ID=88035146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210822715.XA Pending CN116800777A (en) 2022-07-12 2022-07-12 Message processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116800777A (en)

Similar Documents

Publication Publication Date Title
Lima Filho et al. Smart detection: an online approach for DoS/DDoS attack detection using machine learning
US11991215B2 (en) System and method for self-adjusting cybersecurity analysis and score generation
US10630784B2 (en) Facilitating a secure 3 party network session by a network device
US10305904B2 (en) Facilitating secure network traffic by an application delivery controller
US10666680B2 (en) Service overload attack protection based on selective packet transmission
US20200344246A1 (en) Apparatus, system and method for identifying and mitigating malicious network threats
US12021835B2 (en) Methods and systems for efficient packet filtering
US20240244090A1 (en) Cybersecurity analysis and protection using distributed systems
US9654445B2 (en) Network traffic filtering and routing for threat analysis
WO2018107784A1 (en) Method and device for detecting webshell
US20240291870A1 (en) Automatically computing and improving a cybersecurity risk score
CN114145004A (en) System and method for selectively collecting computer forensic data using DNS messages
US10735453B2 (en) Network traffic filtering and routing for threat analysis
CN111914126A (en) Processing method, equipment and storage medium for indexed network security big data
WO2021243321A1 (en) A system and methods for score cybersecurity
WO2023060942A1 (en) Method and apparatus for determining compromised host
WO2022183794A1 (en) Traffic processing method and protection system
US11930039B1 (en) Metric space modeling of network communication
CN116800777A (en) Message processing method and device, electronic equipment and storage medium
US20140136647A1 (en) Router and operating method thereof
US10454965B1 (en) Detecting network packet injection
CN108737291B (en) Method and device for representing network flow
Čermák et al. Stream-Based IP Flow Analysis
Sanders Techniques for the analysis of modern web page traffic using anonymized tcp/ip headers
WO2024234861A1 (en) Threat event sourcing method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination