[go: up one dir, main page]

CN116633665A - Mixed attack tracing method and system for address spoofing - Google Patents

Mixed attack tracing method and system for address spoofing Download PDF

Info

Publication number
CN116633665A
CN116633665A CN202310732358.2A CN202310732358A CN116633665A CN 116633665 A CN116633665 A CN 116633665A CN 202310732358 A CN202310732358 A CN 202310732358A CN 116633665 A CN116633665 A CN 116633665A
Authority
CN
China
Prior art keywords
attack
field
address
path
switch
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
CN202310732358.2A
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.)
Beijing Jiaotong University
Original Assignee
Beijing Jiaotong University
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 Beijing Jiaotong University filed Critical Beijing Jiaotong University
Priority to CN202310732358.2A priority Critical patent/CN116633665A/en
Publication of CN116633665A publication Critical patent/CN116633665A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/1441Countermeasures against malicious traffic
    • H04L63/1458Denial of Service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/146Tracing the source of attacks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

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

Abstract

本发明提供一种面向地址欺骗的混合攻击溯源方法及系统,属于互联网通信安全技术领域,使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储攻击路径信息,使用标识字段和分片字段来存储标记攻击源位置信息,将攻击路径信息与攻击源位置信息标记插入数据包;当检测到DDoS时,根据提取并汇总收集到的具有不同标记信息的数据包,进行攻击溯源,得到攻击路径和攻击源地址。本发明能有效还原攻击者的攻击路径和身份位置;攻击路径重构所需的数据包数量少,计算开销小;可避免交换机的重复标记,不会覆盖上游路由器的标记信息;选用路径记录的溯源方式,溯源速度快;无需暴露网络拓扑结构即可降低带宽要求。

The invention provides a hybrid attack source tracing method and system for address spoofing, which belongs to the technical field of Internet communication security. field to store the attack path information, use the identification field and fragmentation field to store and mark the attack source location information, and insert the attack path information and attack source location information into the data packet; when a DDoS is detected, according to the extracted and summarized collected Data packets with different tag information are traced to the source of the attack, and the attack path and attack source address are obtained. The invention can effectively restore the attacker's attack path and identity position; the number of data packets required for attack path reconstruction is small, and the calculation cost is small; the repeated marking of the switch can be avoided, and the marking information of the upstream router will not be overwritten; the path record is selected Traceability method, fast traceability; bandwidth requirements can be reduced without exposing the network topology.

Description

面向地址欺骗的混合攻击溯源方法及系统Hybrid attack source tracing method and system for address spoofing

技术领域technical field

本发明涉及互联网通信安全技术领域,具体涉及一种可编程网络中面向地址欺骗的基于路径记录和地址分片标记的混合攻击溯源方法及系统。The invention relates to the technical field of Internet communication security, in particular to a hybrid attack source tracing method and system based on path records and address fragment marks for address spoofing in a programmable network.

背景技术Background technique

网络可信通信是未来网络的核心技术方向之一,也是长期困扰学术界和产业界的问题。互联网协议(IP)地址是当前IP网络架构中的核心要素,网络通信在泛在接入、网络开放等演变趋势下,地址欺骗问题成为可信通信技术发展过程的一大阻碍。地址欺骗具有攻击者身份与位置未知、事后追责困难和攻击流量反射放大等几个突出特点。Network trusted communication is one of the core technical directions of the future network, and it is also a problem that has plagued the academic and industrial circles for a long time. The Internet Protocol (IP) address is the core element of the current IP network architecture. Under the evolution trend of network communication such as ubiquitous access and network opening, address spoofing has become a major obstacle to the development of trusted communication technology. Address spoofing has several prominent features, such as unknown identity and location of the attacker, difficulty in pursuing accountability afterwards, and reflection amplification of attack traffic.

现有的软件定义网络(SDN)中的DDoS攻击防御解决方案大多是在单个域中分析本地流量特征进行集中式的单点检测,并通过对现有DDoS攻击流量的阻止实现DDoS攻击缓解。Most of the existing DDoS attack defense solutions in software-defined networking (SDN) analyze local traffic characteristics in a single domain for centralized single-point detection, and achieve DDoS attack mitigation by blocking existing DDoS attack traffic.

攻击者为了隐藏自身真实信息,通常会使用伪造源IP地址的方式向目标主机发起DDoS攻击。目前,对网络中DDoS攻击防御主要分为两种:一种是当检测到DDoS攻击后,立即做出响应(丢包、阻塞端口等)。该方法可快速对网络中的DDoS攻击做出防御响应,但无法通过解析数据包中的源IP地址定位到攻击者真实位置,无法从根源上阻断DDoS攻击。另一种是当检测到DDoS攻击后,先进行攻击溯源,然后根据溯源结果从攻击源头进行DDoS防御。DDoS攻击溯源是指受害者以某种方法确定攻击数据包的源头和传播路径的过程。因为数据包在网络中转发的路径并不会被伪造。当DDoS检测方法发现受到DDoS攻击后,受害者利用溯源措施重构攻击路径或定位攻击源头从根源上阻断DDoS攻击并能还原攻击路径,这是DDoS攻击防御体系中重要的一部分。因此可以通过重构攻击路径的方式追踪到真实的攻击源。随后,基于溯源结果,受害者可以部署安全的DDoS缓解策略,缓解DDoS攻击所带来的影响;另一方面也可以对攻击者进行制裁。In order to hide their real information, attackers usually use forged source IP addresses to launch DDoS attacks on target hosts. At present, there are mainly two types of defense against DDoS attacks in the network: one is to immediately respond (dropping packets, blocking ports, etc.) after detecting a DDoS attack. This method can quickly respond to DDoS attacks in the network, but it cannot locate the real location of the attacker by analyzing the source IP address in the data packet, and cannot block the DDoS attack from the root cause. The other is to trace the source of the attack after a DDoS attack is detected, and then conduct DDoS defense from the source of the attack based on the source tracing results. DDoS attack source tracing refers to the process in which the victim determines the source and propagation path of the attack data packet in a certain way. Because the path forwarded by the data packet in the network will not be forged. When the DDoS detection method finds that it has been attacked by DDoS, the victim can use traceability measures to reconstruct the attack path or locate the source of the attack to block the DDoS attack from the root and restore the attack path, which is an important part of the DDoS attack defense system. Therefore, the real attack source can be traced by reconstructing the attack path. Then, based on the traceability results, the victim can deploy a safe DDoS mitigation strategy to alleviate the impact of the DDoS attack; on the other hand, the attacker can also be sanctioned.

传统的基于IP标记算法通常是在数据包的传输过程中,将经过的路由器的IP地址或者路由器的编号作为标记的信息,插入到数据包包头的空闲字段,然后依次遍历从攻击者到受害者的全部路由器。然后当受害者收集足够数量的数据包后,受害者根据数据包中存储的标记信息重构出攻击路径。The traditional IP-based marking algorithm usually inserts the IP address of the passing router or the number of the router as the marking information into the free field of the data packet header during the transmission of the data packet, and then traverses in turn from the attacker to the victim. all routers. Then when the victim collects a sufficient number of packets, the victim reconstructs the attack path based on the tag information stored in the packets.

基于日志记录的DDoS攻击溯源方法,日志记录追踪溯源的主要思想是:数据包在网络中传输时,路由器记录数据包的信息并存储在路由日志中。当受害者检测到自己受到攻击时,向上游路由器发送查询请求,根据路由器中的存储信息,并采用递归的方式找出数据包经过的路由器,形成攻击路线,最终找到攻击源。路由器的日志记录方法理论上可进行单包攻击的溯源,可应用于(D)DoS攻击溯源。但是日志追踪溯源方法对路由器的存储空间要求较高。在目前高速链路下,路由器所需要存储的海量的信息,路由器的开销较大。最早提出的基于日志的IP溯源方法是通过在转发设备中记录每个数据包的部分信息,并使用数据-链路识别机制进行数据包查询,实现回溯攻击路径。其中,每个数据包大约需要60bytes的存储空间,导致转发设备(路由器)的存储开销过大。为了尽量压缩存储数据包信息所需要的空间,此类方法多采用哈希函数或者BloomFilter对数据包进行摘要存储。其中,最经典的日志记录法是基于Hash值得源路径隔离引擎(SPIE)方法。在该方法中,路由器提取所转发IP数据包包头中的固定部分和包体中的前8字节数据,然后对这些提取的数据包进行摘要计算并使用BloomFilter存储。在溯源时,受害者可逐个查询路由器保存的摘要信息,从而确定攻击包所经过的路径。但该方法不支持IPv6协议、不适用于跨多个自治系统的网络环境,对跳板机、僵尸网络等攻击无法追踪到攻击源头。该溯源技术需要路由器记录大量的数据信息,增加了路由器的开销,降低了路由器的性能。DDoS attack traceability method based on log records, the main idea of log record traceability is: when data packets are transmitted in the network, the router records the information of the data packets and stores them in the routing log. When the victim detects that he is under attack, he sends a query request to the upstream router, and uses the recursive method to find out the router through which the data packet passes according to the stored information in the router, forms an attack route, and finally finds the source of the attack. The logging method of the router can theoretically trace the source of a single packet attack, and can be applied to trace the source of a (D)DoS attack. However, the log traceability method requires a relatively high storage space of the router. Under the current high-speed link, the router needs to store a large amount of information, and the overhead of the router is relatively large. The earliest log-based IP traceability method is to record part of the information of each packet in the forwarding device, and use the data-link identification mechanism to query the packet to realize the traceback attack path. Wherein, each data packet requires about 60 bytes of storage space, resulting in excessive storage overhead of the forwarding device (router). In order to compress the space required for storing data packet information as much as possible, such methods mostly use a hash function or BloomFilter to store a summary of the data packet. Among them, the most classic logging method is based on Hash value source path isolation engine (SPIE) method. In this method, the router extracts the fixed part in the header of the forwarded IP data packet and the first 8 bytes of data in the packet body, and then performs summary calculation on these extracted data packets and stores them using BloomFilter. When tracing the source, the victim can query the summary information saved by the router one by one, so as to determine the path through which the attack packet has passed. However, this method does not support the IPv6 protocol, is not suitable for a network environment that spans multiple autonomous systems, and cannot trace the source of attacks such as springboard machines and botnets. This traceability technology requires the router to record a large amount of data information, which increases the overhead of the router and reduces the performance of the router.

上述日志记录的DDoS攻击溯源方法的所需的存储空间、计算开销过大;由于路由器存储能力有限,不能无限制存储经过路由器的数据包;当达到路由器的存储上限会刷新日志记录,因此该方法的追踪溯源具有时效性。日志记录存在安全隐患。若路由器被攻击者控制,攻击者可任意修改或删除日志记录,导致无法溯源。The storage space and calculation overhead required by the DDoS attack traceability method of the above log records are too large; due to the limited storage capacity of the router, the data packets passing through the router cannot be stored unlimitedly; when the storage limit of the router is reached, the log records will be refreshed, so this method The traceability is time-sensitive. Logging is a security risk. If the router is controlled by an attacker, the attacker can arbitrarily modify or delete log records, making it impossible to trace the source.

基于链路测试的DDoS攻击溯源方法,链路测试的基本思想是当受害者检测到自己受到攻击时,从受害者附近的路由开始,依次测试上游链路直到找到攻击源头的路由器。链路测试只能在攻击进行中实施,当攻击结束或者攻击是间断性的情况时,这种方法无法完成溯源任务。链路测试方法包括输入调试和受控泛洪。输入调试的溯源过程是:当受害者检测到网络攻击后,抽取攻击数据包的某些特征,并将其发送至网络管理员。网络管理员根据溯源的要求安装具有能够指出攻击数据包经过的路由器的功能、并可判断某路由器是否在攻击路径上的输入调试器。最后,依次在该路由器的上游安装输入调试器,直到找到攻击源。受控泛洪使用flooding来测试链路。它通过预定义的ISP映射,受害者迭代地将数据包泛洪到其上游路由器,并观察这些流量对攻击流的影响,这个递归的过程可以揭示每个上游的攻击路由器是否存在攻击路径上。该攻击溯源方法严格受限于攻击持续的时间,当攻击停止或者中断时,无法完成DDoS攻击溯源。DDoS attack source tracing method based on link test. The basic idea of link test is that when the victim detects that he is under attack, start from the route near the victim, and test the upstream link in turn until the router that is the source of the attack is found. The link test can only be implemented during the attack. When the attack is over or the attack is intermittent, this method cannot complete the traceability task. Link testing methods include input debugging and controlled flooding. The traceability process of input debugging is: when the victim detects a network attack, extract some characteristics of the attack data packet and send it to the network administrator. According to the requirements of traceability, the network administrator installs an input debugger that can point out the router that the attack data packet passes through, and can determine whether a certain router is on the attack path. Finally, input debuggers are installed upstream of the router in turn until the source of the attack is found. Controlled flooding uses flooding to test the link. Through the predefined ISP mapping, the victim iteratively floods packets to its upstream routers and observes the impact of these traffic on the attack flow. This recursive process can reveal whether each upstream attack router is on the attack path. This attack source tracing method is strictly limited to the duration of the attack. When the attack stops or is interrupted, DDoS attack source tracing cannot be completed.

上述的基于链路测试的DDoS攻击溯源方法,需要多个ISP之间具有协作关系,ISP之间的协作难以调解,资源开销大。受控泛洪的方法某种程度上也是一种DoS攻击,需要事先掌握网络拓扑结构,要求攻击时间持续较长,不适用DDoS攻击。The above-mentioned link test-based DDoS attack source tracing method requires a cooperative relationship between multiple ISPs, and the coordination between ISPs is difficult to mediate, resulting in high resource overhead. The method of controlled flooding is also a kind of DoS attack to some extent. It needs to know the network topology structure in advance and requires a long attack time. It is not suitable for DDoS attack.

发明内容Contents of the invention

本发明的目的在于提供一种可编程网络中面向地址欺骗的基于路径记录和地址分片标记的混合攻击溯源方法及系统,利用特定的交换机标识和源地址分片完成对数据包的标记写入与部分字段的覆盖处理,用以跟踪攻击流量的转发路径并定位网络攻击源头,利用混合溯源方法实现对攻击者位置与攻击路径的精准还原,减少攻击路径重构过程所需数据包的数量,提高网络应对虚假地址攻击的防御能力,以解决上述背景技术中存在的至少一项技术问题。The purpose of the present invention is to provide a hybrid attack traceability method and system based on path records and address fragmentation marking for address spoofing in a programmable network, and use specific switch identification and source address fragmentation to complete marking writing of data packets Overlay processing with some fields is used to track the forwarding path of attack traffic and locate the source of network attacks. The hybrid traceability method is used to accurately restore the location of the attacker and the attack path, reducing the number of data packets required for the reconstruction of the attack path. Improve the defense capability of the network against false address attacks, so as to solve at least one technical problem existing in the above-mentioned background technology.

为了实现上述目的,本发明采取了如下技术方案:In order to achieve the above object, the present invention has taken the following technical solutions:

一方面,本发明提供一种面向地址欺骗的混合攻击溯源方法,包括:On the one hand, the present invention provides a hybrid attack source tracing method for address spoofing, including:

使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储攻击路径信息,使用标识字段和分片字段来存储标记攻击源位置信息,将攻击路径信息与攻击源位置信息标记插入数据包;Use the globally unique number and forwarding port corresponding to each switch to mark the data packets sent by the attacker, and use the optional field to store the attack path information, and use the identification field and fragmentation field to store the location information of the marked attack source. The attack path information and the attack source location information mark are inserted into the data packet;

当检测到DDoS时,根据提取并汇总收集到的具有不同标记信息的数据包后,进行攻击溯源,得到攻击路径和攻击源地址。When DDoS is detected, after extracting and summarizing the collected data packets with different tag information, trace the source of the attack, and obtain the attack path and attack source address.

可选的,对IP数据包的首部进行改写,利用IP头部的区分服务字段来扩充流量溯源功能记录攻击路径信息和攻击源地址定位。Optionally, the header of the IP data packet is rewritten, and the differentiated services field of the IP header is used to expand the traffic traceability function to record attack path information and attack source address location.

可选的,利用IP数据包头部的保留字段和选项字段来存储包含攻击者到受害者之间遍历的交换机标记信息;MarkHeader为数据包头部中补充设计的协议头部;SwitchID为交换机的全局标识字段,用于标识数据包在分组转发过程经过的交换机身份信息;Eport为转发端口字段,用于标识数据包在交换机上的转发端口,交换机的SwitchID和转发端口Eport配合使用,用于记录数据包的转发路径;HOP_COUNT为转发跳数统计字段,作为遥测包头维护的计数器,用于计数嵌入遥测包头的源交换机到本交换机的过程中,被标记的转发跳数;Max_HOPS为最大的转发跳数字段,用于申明路径记录功能的最大跳数的常量,在超过该值后交换机不再记录路径信息。Optionally, use the reserved field and option field of the IP data packet header to store the switch marking information that includes the traversal between the attacker and the victim; MarkHeader is a supplementary designed protocol header in the data packet header; SwitchID is the global identifier of the switch Field, used to identify the identity information of the switch that the data packet passes through in the packet forwarding process; Eport is the forwarding port field, used to identify the forwarding port of the data packet on the switch, and the SwitchID of the switch is used together with the forwarding port Eport to record the data packet forwarding path; HOP_COUNT is the forwarding hop count statistical field, which is used as a counter maintained by the telemetry packet header, and is used to count the marked forwarding hops during the process from the source switch embedded in the telemetry packet header to the local switch; Max_HOPS is the maximum forwarding hop count field , a constant used to declare the maximum hop count of the path recording function, after the value exceeds the value, the switch will no longer record path information.

可选的,攻击源地址定位功能利用IP数据包头部的空闲字段,设计四个填充标记字段:Fragment:存放了IP地址拆分后的一个分片,所有IP地址分片等长;Offset:片偏移字段存放IP地址分片相对于IP地址的顺序;HopCount:转发跳数字段;Hash:哈希字段,用于存放IP地址经过哈希散列函数运算后得到的散列值,用于验证分片拼接的IP地址完整性。Optionally, the attack source address location function utilizes the free field in the header of the IP data packet to design four padding fields: Fragment: stores a fragment after splitting the IP address, and all IP address fragments have the same length; Offset: fragment The offset field stores the sequence of IP address fragments relative to the IP address; HopCount: the forwarding hop count field; Hash: the hash field, which is used to store the hash value obtained after the IP address is processed by the hash function for verification IP address integrity for fragment splicing.

可选的,攻击路径记录的标记过程包括,在交换设备上,交换机的标识与转发端口作为路径信息插入数据包的可选字段的保留部分;从攻击者到受害者之间,每经过一台交换机,该交换机按照标记规则选取该设备标识插入数据包中,直至遍历从攻击者到受害者之间的转发路径。Optionally, the marking process of the attack path record includes that, on the switching device, the identification of the switch and the forwarding port are inserted into the reserved part of the optional field of the data packet as path information; A switch, the switch selects the device identifier according to the marking rule and inserts it into the data packet until the forwarding path from the attacker to the victim is traversed.

可选的,身份位置定位的标记过程包括:攻击源位置标记过程中,转发设备读取区分服务字段,并匹配流表,对匹配成功的数据包进行概率标记,转发设备按角色分为两种:标记节点与中间节点;Optionally, the marking process of identity location location includes: during the attack source location marking process, the forwarding device reads the DiffServ field, matches the flow table, and performs probability marking on the matched data packets. The forwarding device is divided into two types according to roles: : Mark nodes and intermediate nodes;

若区分服务字段未被修改,对于需要分片标记的数据包,交换机提取IP源地址,等长分割产生分片fragmenti,计算地址分片的偏移offsetiIf the differentiated services field has not been modified, for the data packet that needs to be fragmented, the switch extracts the IP source address, divides it into equal length to generate fragment i , and calculates the offset offset i of the address fragment;

接着,交换机对IP源地址进行哈希运算,截取特定位数作为hash字段;Next, the switch performs a hash operation on the IP source address, and intercepts a specific number of digits as the hash field;

最后,在数据存储位置方面,将15位的hash字段与偏移offseti的高位填入16位的identification字段,将偏移offseti的低位填入flag的低位,将fragmenti填入13位的FragmentOffset字段;Finally, in terms of data storage location, fill the 15-bit hash field and the high bit of offset i into the 16-bit identification field, fill the low bit of offset i into the low bit of flag, and fill fragment i into the 13-bit FragmentOffset field;

若区分服务字段已被修改,即解析到Diffserv为分片标记服务(0xC),表明该数据包已被转发路径的上游交换机标记,本交换机不需要进行填充操作,仅更新转发跳数HopCount。If the differentiated services field has been modified, it is resolved that Diffserv is the Fragment Marking Service (0xC), indicating that the data packet has been marked by the upstream switch of the forwarding path. The switch does not need to perform filling operations, and only updates the forwarding hop count HopCount.

可选的,在执行路径记录的报文传输过程中,起始交换机在数据报文中嵌入包含遥测指令的遥测包头,接着将遥测元数据<SwitchId,Eport>写入到IP包头的Option字段;中间的交换机节点,在识别到报文的遥测包头后,在原有的路径记录上,累加本地标识<SwitchId,Eport>,并更新转发跳数字段;在最后一跳的交换机上,交换机将数据报文中包含的路径记录卸载,并上报到控制器;Optionally, during the packet transmission process for performing path recording, the starting switch embeds a telemetry packet header containing a telemetry instruction in the data packet, and then writes the telemetry metadata <SwitchId, Eport> into the Option field of the IP packet header; The switch node in the middle, after identifying the telemetry packet header of the message, accumulates the local identifier <SwitchId, Eport> on the original path record, and updates the forwarding hop count field; on the switch at the last hop, the switch sends the datagram The path records included in the text are unloaded and reported to the controller;

在路径重构过程,首先,交换机识别区分服务字段的值,对路径记录策略的报文提取Option字段,解析可选字段栈内的数据;其次,将元数据依次出栈,按序读取携带的交换机标识<SwitchId,Eport>,再配合HopCount即可获取由近及远的溯源路径。In the path reconstruction process, first, the switch identifies the value of the differentiated service field, extracts the Option field from the packet of the path record policy, and parses the data in the optional field stack; secondly, pops the metadata out of the stack in sequence, reads the The switch ID <SwitchId, Eport>, together with HopCount, can obtain the traceability path from near to far.

可选的,身份位置定位的重构过程包括:Optionally, the reconstruction process of identity location positioning includes:

对于地址分片的拼装,先提取距离字段的值相同的分片;对提取的方片使用分片中的哈希字段值做交换机身份的区分,获取到具有相同转发距离且来自不同交换机的分片摘要;For the assembly of address fragments, first extract the fragments with the same distance field value; use the hash field value in the fragments to distinguish the identity of the switch for the extracted square fragments, and obtain the fragments with the same forwarding distance and from different switches. film summary;

对分片摘要按转发距离进行拼接,从距离为1的分片摘要开始拼接;对相同的哈希值的分片摘要,使用分片中的偏移字段的值对分片重新排序;Splice the fragment digest according to the forwarding distance, starting from the fragment digest with a distance of 1; for the fragment digest with the same hash value, use the value of the offset field in the fragment to reorder the fragment;

当排序完获取到全部的分片后,即获取到了完整的IP地址时,需要进行一次地址校验,将校验结果一致的IP地址写入溯源的转发路径集合中,表示此染色报文的路径包含此台交换机;When all fragments are obtained after sorting, that is, when the complete IP address is obtained, an address verification needs to be performed, and the IP address with the same verification result is written into the traceable forwarding path set, indicating that the dyed packet is The path contains this switch;

在完成对相同距离的报文摘要拼接后,距离加一,对上一跳的节点继续分片的拼接,完成路径溯源重构的工作,直到路径最远的节点;After completing the splicing of message digests at the same distance, the distance is increased by one, and the splicing of fragments is continued for the node of the previous hop, and the work of path tracing and reconstruction is completed until the node with the farthest path;

汇集全部的攻击源IP地址后,对转发路径集合的节点按转发距离输出。After collecting all the attack source IP addresses, the nodes in the forwarding path set are output according to the forwarding distance.

可选的,地址校验的方式为:将拼接好的IP地址进行哈希运算,根据哈希函数的特点,相同的IP地址会生成相同的散列输出结果,将此哈希结果截取相同位数后,与IP地址分片中附加的哈希值比对。Optionally, the method of address verification is: perform hash operation on the concatenated IP address. According to the characteristics of the hash function, the same IP address will generate the same hash output result, and the hash result will be intercepted to the same bit After counting, compare it with the hash value attached in the IP address fragment.

第二方面,本发明提供一种基于如上所述的方法的面向地址欺骗的混合攻击溯源系统,包括:In the second aspect, the present invention provides an address spoofing-oriented hybrid attack traceability system based on the above method, including:

标记模块,用于使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储攻击路径信息,使用标识字段和分片字段来存储标记攻击源位置信息,将攻击路径信息与攻击源位置信息标记插入数据包;The marking module is used to use the globally unique number and forwarding port corresponding to each switch to mark the data packets sent by the attacker, and use the optional field to store the attack path information, and use the identification field and fragmentation field to store the mark attack Source location information, inserting the attack path information and the attack source location information mark into the data packet;

溯源模块,用于当检测到DDoS时,根据提取并汇总收集到的具有不同标记信息的数据包,进行攻击溯源,得到攻击路径和攻击源地址。The source tracing module is used to trace the source of the attack according to the extracted and collected data packets with different tag information when DDoS is detected, and obtain the attack path and attack source address.

第三方面,本发明提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质用于存储计算机指令,所述计算机指令被处理器执行时,实现如上所述的面向地址欺骗的混合攻击溯源方法。In a third aspect, the present invention provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the above-mentioned oriented Address spoofing hybrid attack traceability method.

第四方面,本发明提供一种计算机程序产品,包括计算机程序,所述计算机程序当在一个或多个处理器上运行时,用于实现如上所述的面向地址欺骗的混合攻击溯源方法。In a fourth aspect, the present invention provides a computer program product, including a computer program. When the computer program is run on one or more processors, it is used to implement the address spoofing-oriented hybrid attack source tracing method as described above.

第五方面,本发明提供一种电子设备,包括:处理器、存储器以及计算机程序;其中,处理器与存储器连接,计算机程序被存储在存储器中,当电子设备运行时,所述处理器执行所述存储器存储的计算机程序,以使电子设备执行实现如上所述的面向地址欺骗的混合攻击溯源方法的指令。In a fifth aspect, the present invention provides an electronic device, including: a processor, a memory, and a computer program; wherein, the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the The computer program stored in the memory, so that the electronic device executes the instructions for implementing the address spoofing-oriented hybrid attack source tracing method described above.

本发明有益效果:针对地址欺骗的混合溯源方法,能有效还原攻击者的攻击路径和身份位置;攻击路径重构所需的数据包数量少,计算开销小;可避免交换机的重复标记问题,不会覆盖上游路由器的标记信息;选用路径记录的溯源方式,溯源速度快;标记到数据包的信息是交换机标识信息而非数据包IP地址;可实现不需要暴露其网络拓扑结构,并降低带宽要求。The invention has beneficial effects: the mixed source tracing method aimed at address spoofing can effectively restore the attacker's attack path and identity location; the number of data packets required for attack path reconstruction is small, and the calculation cost is small; the problem of repeated marking of switches can be avoided, and the The marking information of the upstream router will be overwritten; the traceability method of path records is selected, and the traceability speed is fast; the information marked to the data packet is the switch identification information rather than the data packet IP address; it can realize that it does not need to expose its network topology and reduce bandwidth requirements .

本发明附加方面的优点,将在下述的描述部分中更加明显的给出,或通过本发明的实践了解到。Advantages of additional aspects of the invention will become apparent from the description hereinafter, or may be learned by practice of the invention.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.

图1为本发明实施例所述的IP头部区分服务字段功能结构图。FIG. 1 is a functional structural diagram of the DiffServ field in the IP header according to an embodiment of the present invention.

图2为本发明实施例所述的IP头部可选字段(Option字段)重写标记信息示意图。FIG. 2 is a schematic diagram of rewriting flag information of an optional field (Option field) in an IP header according to an embodiment of the present invention.

图3为本发明实施例所述的IP地址分片的字段功能结构图。FIG. 3 is a field functional structure diagram of IP address fragmentation according to an embodiment of the present invention.

图4为本发明实施例所述的数据包标记过程示意图。Fig. 4 is a schematic diagram of a data packet marking process according to an embodiment of the present invention.

图5为本发明实施例所述的数据包分片标记的组装过程示意图。FIG. 5 is a schematic diagram of an assembly process of a packet fragmentation mark according to an embodiment of the present invention.

图6为本发明实施例所述的面向地址欺骗的混合攻击溯源方法实例流程图。Fig. 6 is a flow chart of an example of a source tracing method for address spoofing-oriented hybrid attacks according to an embodiment of the present invention.

具体实施方式Detailed ways

下面详细叙述本发明的实施方式,所述实施方式的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过附图描述的实施方式是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with the drawings are exemplary, and are only used to explain the present invention, but not to be construed as limiting the present invention.

本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语)具有与本发明所属领域中的普通技术人员的一般理解相同的意义。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件和/或它们的组。Those skilled in the art will understand that unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the word "comprising" used in the description of the present invention refers to the presence of said features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements and/or groups thereof.

为便于理解本发明,下面结合附图以具体实施例对本发明作进一步解释说明,且具体实施例并不构成对本发明实施例的限定。In order to facilitate the understanding of the present invention, the present invention will be further explained below with specific embodiments in conjunction with the accompanying drawings, and the specific embodiments are not intended to limit the embodiments of the present invention.

本领域技术人员应该理解,附图只是实施例的示意图,附图中的部件并不一定是实施本发明所必须的。Those skilled in the art should understand that the drawings are only schematic diagrams of the embodiments, and the components in the drawings are not necessarily necessary for implementing the present invention.

实施例1Example 1

本实施例1中,首先提供了一种面向地址欺骗的混合攻击溯源系统,包括:标记模块,用于使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储攻击路径信息,使用标识字段和分片字段来存储标记攻击源位置信息,将攻击路径信息与攻击源位置信息标记插入数据包;溯源模块,用于当检测到DDoS时,根据提取并汇总收集到的具有不同标记信息的数据包,进行攻击溯源,得到攻击路径和攻击源地址。In this embodiment 1, a hybrid attack traceability system oriented to address spoofing is first provided, including: a marking module, which is used to mark the data packets sent by the attacker using the globally unique number and forwarding port corresponding to each switch, And use the optional field to store the attack path information, use the identification field and fragmentation field to store the location information of the marked attack source, and insert the attack path information and the attack source location information mark into the data packet; the traceability module is used when DDoS is detected According to extracting and summarizing the collected data packets with different tag information, trace the source of the attack, and obtain the attack path and attack source address.

本实施例1中,利用上述的系统,实现了面向地址欺骗的混合攻击溯源方法,包括:基于标记模块使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储攻击路径信息,使用标识字段和分片字段来存储标记攻击源位置信息,将攻击路径信息与攻击源位置信息标记插入数据包;使用溯源模块当检测到DDoS时,根据提取并汇总收集到的具有不同标记信息的数据包,进行攻击溯源,得到攻击路径和攻击源地址。In this embodiment 1, the above-mentioned system is used to implement a hybrid attack traceability method for address spoofing, including: using the globally unique number and forwarding port corresponding to each switch based on the marking module to mark the data packets sent by the attacker, And use the optional field to store the attack path information, use the identification field and fragmentation field to store and mark the attack source location information, and insert the attack path information and attack source location information into the data packet; when DDoS is detected using the traceability module, according to Extract and summarize the collected data packets with different tag information, trace the source of the attack, and obtain the attack path and attack source address.

本实施例1中,根据已有的IP数据包的首部格式规范,完成区分服务字段设计。使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储标记路径信息,使用标识字段和分片字段来存储地址分片信息。首先对IP数据包的首部进行改写,利用IP头部的区分服务字段来扩充流量溯源功能。In the first embodiment, the DiffServ field design is completed according to the existing header format specification of the IP data packet. Use the globally unique number and forwarding port corresponding to each switch to mark the data packets sent by the attacker, and use the optional field to store the marking path information, and use the identification field and fragmentation field to store the address fragmentation information. First, rewrite the header of the IP data packet, and use the differentiated service field of the IP header to expand the traffic traceability function.

利用IP数据包头部的保留字段和选项字段来存储包含攻击者到受害者之间遍历的交换机标记信息;MarkHeader为数据包头部中补充设计的协议头部;SwitchID为交换机的全局标识字段,用于标识数据包在分组转发过程经过的交换机身份信息;Eport为转发端口字段,用于标识数据包在交换机上的转发端口,交换机的SwitchID和转发端口Eport配合使用,用于记录数据包的转发路径;HOP_COUNT为转发跳数统计字段,作为遥测包头维护的计数器,用于计数嵌入遥测包头的源交换机到本交换机的过程中,被标记的转发跳数;Max_HOPS为最大的转发跳数字段,用于申明路径记录功能的最大跳数的常量,在超过该值后交换机不再记录路径信息。Use the reserved field and option field of the IP data packet header to store the switch marking information that includes the traversal between the attacker and the victim; MarkHeader is the protocol header designed in addition to the data packet header; SwitchID is the global identification field of the switch, used for Identifies the identity information of the switch that the data packet passes through in the packet forwarding process; Eport is the forwarding port field, which is used to identify the forwarding port of the data packet on the switch, and the SwitchID of the switch is used in conjunction with the forwarding port Eport to record the forwarding path of the data packet; HOP_COUNT is the forwarding hop count statistics field, which is used as a counter maintained by the telemetry packet header, and is used to count the number of forwarding hops that are marked during the process from the source switch embedded in the telemetry packet header to the switch; Max_HOPS is the largest forwarding hop count field, used to declare The constant of the maximum hop count of the path record function, after this value is exceeded, the switch will no longer record path information.

攻击源地址定位功能利用IP数据包头部的空闲字段,设计四个填充标记字段:Fragment:存放了IP地址拆分后的一个分片,所有IP地址分片等长;Offset:片偏移字段存放IP地址分片相对于IP地址的顺序;HopCount:转发跳数字段;Hash:哈希字段,用于存放IP地址经过哈希散列函数运算后得到的散列值,用于验证分片拼接的IP地址完整性。The attack source address location function utilizes the free field in the header of the IP data packet to design four padding fields: Fragment: stores a fragment after splitting the IP address, and all IP address fragments are of the same length; Offset: the fragment offset field stores The order of IP address fragmentation relative to the IP address; HopCount: forwarding hop count field; Hash: hash field, used to store the hash value obtained after the IP address is processed by the hash function, and used to verify the splicing of fragments IP address integrity.

攻击路径记录的标记过程包括,在交换设备上,交换机的标识与转发端口作为路径信息插入数据包的可选字段的保留部分;从攻击者到受害者之间,每经过一台交换机,该交换机按照标记规则选取该设备标识插入数据包中,直至遍历从攻击者到受害者之间的转发路径。The marking process of the attack path record includes, on the switching device, the identifier of the switch and the forwarding port are inserted into the reserved part of the optional field of the data packet as path information; According to the marking rules, the device identification is selected and inserted into the data packet until the forwarding path from the attacker to the victim is traversed.

身份位置定位的标记过程包括:攻击源位置标记过程中,转发设备读取区分服务字段,并匹配流表,对匹配成功的数据包进行概率标记,转发设备按角色分为两种:标记节点与中间节点;The marking process of identity location location includes: during the attack source location marking process, the forwarding device reads the DiffServ field, matches the flow table, and performs probability marking on the matched data packets. The forwarding devices are divided into two types according to roles: marking nodes and middle node;

若区分服务字段未被修改,对于需要分片标记的数据包,交换机提取IP源地址,等长分割产生分片fragmenti,计算地址分片的偏移offsetiIf the differentiated services field has not been modified, for the data packet that needs to be fragmented, the switch extracts the IP source address, divides it into equal length to generate fragment i , and calculates the offset offset i of the address fragment;

接着,交换机对IP源地址进行哈希运算,截取特定位数作为hash字段;Next, the switch performs a hash operation on the IP source address, and intercepts a specific number of digits as the hash field;

最后,在数据存储位置方面,将15位的hash字段与偏移offseti的高位填入16位的identification字段,将偏移offseti的低位填入flag的低位,将fragmenti填入13位的FragmentOffset字段;Finally, in terms of data storage location, fill the 15-bit hash field and the high bit of offset i into the 16-bit identification field, fill the low bit of offset i into the low bit of flag, and fill fragment i into the 13-bit FragmentOffset field;

若区分服务字段已被修改,即解析到Diffserv为分片标记服务(0xC),表明该数据包已被转发路径的上游交换机标记,本交换机不需要进行填充操作,仅更新转发跳数HopCount。If the differentiated services field has been modified, it is resolved that Diffserv is the Fragment Marking Service (0xC), indicating that the data packet has been marked by the upstream switch of the forwarding path. The switch does not need to perform filling operations, and only updates the forwarding hop count HopCount.

在执行路径记录的报文传输过程中,起始交换机在数据报文中嵌入包含遥测指令的遥测包头,接着将遥测元数据<SwitchId,Eport>写入到IP包头的Option字段;中间的交换机节点,在识别到报文的遥测包头后,在原有的路径记录上,累加本地标识<SwitchId,Eport>,并更新转发跳数字段;在最后一跳的交换机上,交换机将数据报文中包含的路径记录卸载,并上报到控制器;During the packet transmission process of path recording, the initial switch embeds the telemetry packet header containing the telemetry instruction in the data packet, and then writes the telemetry metadata <SwitchId, Eport> into the Option field of the IP packet header; the middle switch node , after identifying the telemetry packet header of the packet, add the local identifier <SwitchId, Eport> to the original path record, and update the forwarding hop count field; The path record is unloaded and reported to the controller;

在路径重构过程,首先,交换机识别区分服务字段的值,对路径记录策略的报文提取Option字段,解析可选字段栈内的数据;其次,将元数据依次出栈,按序读取携带的交换机标识<SwitchId,Eport>,再配合HopCount即可获取由近及远的溯源路径。In the path reconstruction process, first, the switch identifies the value of the differentiated service field, extracts the Option field from the packet of the path record policy, and parses the data in the optional field stack; secondly, pops the metadata out of the stack in sequence, reads the The switch ID <SwitchId, Eport>, together with HopCount, can obtain the traceability path from near to far.

身份位置定位的重构过程包括:The reconstruction process of identity location positioning includes:

对于地址分片的拼装,先提取距离字段的值相同的分片;对提取的方片使用分片中的哈希字段值做交换机身份的区分,获取到具有相同转发距离且来自不同交换机的分片摘要;For the assembly of address fragments, first extract the fragments with the same distance field value; use the hash field value in the fragments to distinguish the identity of the switch for the extracted square fragments, and obtain the fragments with the same forwarding distance and from different switches. film summary;

对分片摘要按转发距离进行拼接,从距离为1的分片摘要开始拼接;对相同的哈希值的分片摘要,使用分片中的偏移字段的值对分片重新排序;Splice the fragment digest according to the forwarding distance, starting from the fragment digest with a distance of 1; for the fragment digest with the same hash value, use the value of the offset field in the fragment to reorder the fragment;

当排序完获取到全部的分片后,即获取到了完整的IP地址时,需要进行一次地址校验,将校验结果一致的IP地址写入溯源的转发路径集合中,表示此染色报文的路径包含此台交换机;When all fragments are obtained after sorting, that is, when the complete IP address is obtained, an address verification needs to be performed, and the IP address with the same verification result is written into the traceable forwarding path set, indicating that the dyed packet is The path contains this switch;

在完成对相同距离的报文摘要拼接后,距离加一,对上一跳的节点继续分片的拼接,完成路径溯源重构的工作,直到路径最远的节点;After completing the splicing of message digests at the same distance, the distance is increased by one, and the splicing of fragments is continued for the node of the previous hop, and the work of path tracing and reconstruction is completed until the node with the farthest path;

汇集全部的攻击源IP地址后,对转发路径集合的节点按转发距离输出。After collecting all the attack source IP addresses, the nodes in the forwarding path set are output according to the forwarding distance.

其中,地址校验的方式为:将拼接好的IP地址进行哈希运算,根据哈希函数的特点,相同的IP地址会生成相同的散列输出结果,将此哈希结果截取相同位数后,与IP地址分片中附加的哈希值比对。Among them, the method of address verification is: perform hash operation on the concatenated IP address. According to the characteristics of the hash function, the same IP address will generate the same hash output result, and the hash result will be intercepted after the same number of digits. , compared with the hash value attached to the IP address fragment.

实施例2Example 2

本实施例2中,针对地址欺骗问题的攻击者身份与位置未知,事后追责困难的特点,提出了一种可编程网络中基于路径记录和地址分片标记的混合溯源方法。该方法利用特定的交换机标识和源地址分片完成对数据包的标记写入与部分字段的覆盖处理,用以跟踪攻击流量的转发路径并定位网络攻击源头。目的是利用混合溯源方法实现对攻击者位置与攻击路径的精准还原,减少攻击路径重构过程所需数据包的数量,提高网络应对虚假地址攻击的防御能力。In this embodiment 2, aiming at the unknown identity and location of the attacker in the address spoofing problem, and the difficulty of pursuing responsibility after the event, a hybrid traceability method based on path records and address fragmentation marks in a programmable network is proposed. This method utilizes specific switch identification and source address fragmentation to complete the marking writing of data packets and the overlay processing of some fields, so as to track the forwarding path of attack traffic and locate the source of network attack. The purpose is to use the hybrid traceability method to accurately restore the attacker's location and attack path, reduce the number of data packets required for the reconstruction of the attack path, and improve the network's defense against false address attacks.

通过交换机将路径信息编码或自身身份信息编码嵌入数据报文,这种将编码信息嵌入数据报文的方式以下统称标记方法。本实施例中,根据已有的IP数据包的首部格式规范,完成区分服务字段设计。本实施例中使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储标记路径信息,使用标识字段和分片字段来存储地址分片信息。The switch encodes the path information or its own identity information into the data message, and this method of embedding the coded information into the data message is collectively referred to as a marking method hereinafter. In this embodiment, the DiffServ field design is completed according to the existing header format specification of the IP data packet. In this embodiment, the globally unique number and forwarding port corresponding to each switch are used to mark the data packets sent by the attacker, and the optional field is used to store the marking path information, and the identification field and fragmentation field are used to store address fragmentation information.

本实施例的攻击路径还原与攻击位置定位的混合溯源方法详细过程如下:The detailed process of the hybrid traceability method of attack path restoration and attack location location in this embodiment is as follows:

本实施例中首先对IP数据包的首部进行改写,利用IP头部的区分服务字段来扩充流量溯源功能。区分服务字段长度为8bit,如图1所示,将00011000与00001100设置为溯源服务的两种策略模式,分别为路径信息记录与源地址定位功能。In this embodiment, firstly, the header of the IP data packet is rewritten, and the DiffServ field of the IP header is used to expand the traffic traceability function. The length of the differentiated service field is 8 bits. As shown in Figure 1, 00011000 and 00001100 are set as the two strategy modes of the traceability service, which are respectively the path information record and source address location functions.

本实施例中的路径信息记录功能利用IP数据包头部的保留字段和选项字段(Option字段)来存储包含攻击者到受害者之间遍历的交换机标记信息。具体过程如图2所示,MarkHeader为数据包头部中补充设计的协议头部,各字段对应的数据说明具体如下:The path information recording function in this embodiment utilizes the reserved field and the option field (Option field) of the IP data packet header to store the switch label information that includes the traversal between the attacker and the victim. The specific process is shown in Figure 2. MarkHeader is a supplementary design protocol header in the packet header. The data descriptions corresponding to each field are as follows:

SwitchID,占32位,交换机的全局标识字段。用于标识数据包在分组转发过程经过的交换机身份信息。SwitchID, occupying 32 bits, the global identification field of the switch. It is used to identify the identity information of the switch that the data packet passes through during the packet forwarding process.

Eport,占32位,转发端口字段。用于标识数据包在交换机上的转发端口。交换机的SwitchID和转发端口Eport配合使用,用于记录数据包的转发路径。Eport, which occupies 32 bits, forwards the port field. It is used to identify the forwarding port of the data packet on the switch. The SwitchID of the switch is used together with the forwarding port Eport to record the forwarding path of the data packet.

HOP_COUNT,占16位,转发跳数统计字段。作为遥测包头维护的计数器,用于计数嵌入遥测包头的源交换机到本交换机的过程中,被标记的转发跳数。HOP_COUNT, occupying 16 bits, forwarding hop count statistics field. As a counter maintained by the telemetry packet header, it is used to count the number of marked forwarding hops during the process from the source switch embedded in the telemetry packet header to the local switch.

Max_HOPS,占16位,最大的转发跳数字段。用于申明路径记录功能的最大跳数的常量,在超过该值后交换机不再记录路径信息。Max_HOPS, occupying 16 bits, the largest forwarding hops field. A constant used to declare the maximum hop count of the path record function, after the value is exceeded, the switch will no longer record path information.

本实施例的源地址定位功能利用IP数据包头部的空闲字段,设计自定义的填充标记字段,四个字段的定义如图3所示。The source address location function of this embodiment utilizes the idle field of the IP data packet header to design a self-defined filling mark field, and the definitions of the four fields are shown in FIG. 3 .

Fragment(8bit):存放了IP地址拆分后的一个分片,本发明考虑IP地址分割和重组的可实现性,选择等长的IP地址分片方案。对于大小为4字节,占32位的IP地址来说,可以考虑的等长分割方案有多种;Fragment (8bit): A fragment after IP address splitting is stored. The present invention considers the feasibility of IP address splitting and recombination, and selects an IP address fragmentation scheme of equal length. For an IP address with a size of 4 bytes and 32 bits, there are many equal-length segmentation schemes that can be considered;

Offset(2bit):片偏移字段存放IP地址分片相对于IP地址的顺序,根据生成的分片数量不同,需要的偏移位数也不同,这里选用2位的片偏移;Offset (2bit): The slice offset field stores the order of the IP address slices relative to the IP address. Depending on the number of slices generated, the number of offset bits required is also different. Here, a slice offset of 2 bits is selected;

HopCount(5bit):转发跳数字段,可以表示的最长转发路径为32跳。转发距离字段的用途是在溯源重构过程中,提高溯源重构的效率。HopCount (5bit): forwarding hop count field, the longest forwarding path that can be represented is 32 hops. The purpose of the forwarding distance field is to improve the efficiency of traceability reconstruction during the traceability reconstruction process.

Hash(15bit):哈希字段。用于存放IP地址经过哈希散列函数运算后得到的散列值,用于验证分片拼接的IP地址完整性。接收方对拼接的IP地址再次哈希运算,通过对比两次的哈希结果,来判断重构的IP地址的有效性。Hash(15bit): Hash field. It is used to store the hash value obtained after the IP address is operated by the hash function, and is used to verify the integrity of the IP address of the fragment splicing. The recipient performs a hash operation on the concatenated IP address again, and judges the validity of the reconstructed IP address by comparing the two hash results.

本实施例中,使用转发设备交换机完成数据包标记工作。数据包标记算法是通过在每台交换机上完成对应区分服务字段的标记功能,将攻击路径与攻击源位置信息标记插入数据包。两种标记算法如图4所示。In this embodiment, a forwarding device switch is used to complete the data packet marking work. The data packet marking algorithm is to complete the marking function of the corresponding DiffServ field on each switch, and insert the attack path and attack source location information marks into the data packets. The two marking algorithms are shown in Figure 4.

当与攻击者相连的入口交换机收到第一个数据包时,它首先将区分服务值插入到数据包中,再根据标记规则对数据包标记并转发。当数据包进入网络后,首先检查数据包中区分服务字段的值,然后由区分服务类型确定标记方式。When the ingress switch connected to the attacker receives the first data packet, it first inserts the DiffServ value into the data packet, and then marks and forwards the data packet according to the marking rules. When a data packet enters the network, the value of the DiffServ field in the data packet is first checked, and then the marking method is determined by the DiffServ type.

本实施例中,对于攻击路径记录的标记过程,在交换设备上,交换机的标识与转发端口作为路径信息插入数据包的可选字段(Option字段)的保留部分。从攻击者到受害者之间,每经过一台交换机,该交换机按照本发明的标记规则选取该设备标识插入数据包中,直至遍历从攻击者到受害者之间的转发路径。最后,当受害者所在的交换机收集包含完整的标记数据包后,可根据本发明的数据栈重构出完整的攻击者到受害者之间的攻击路径。按角色可以分为三种:In this embodiment, for the marking process of the attack path record, on the switching device, the identifier of the switch and the forwarding port are inserted as path information into the reserved part of the optional field (Option field) of the data packet. From the attacker to the victim, each time a switch passes through, the switch selects the device identification and inserts it into the data packet according to the marking rules of the present invention until the forwarding path from the attacker to the victim is traversed. Finally, after the switch where the victim is located collects the complete marked data packet, the complete attack path between the attacker and the victim can be reconstructed according to the data stack of the present invention. There are three types of roles:

攻击路径记录过程中,起始转发设备将MarkHeader的遥测头部插入数据包中,其中HOP_COUNT指示标记的跳数,随着转发设备的处理次数自增1,将SwitchID和Eport作为元数据(Metadata),将MarkHeader中的Metadata添加到数据包的Option字段的位置。During the attack path recording process, the initial forwarding device inserts the MarkHeader’s telemetry header into the data packet, in which HOP_COUNT indicates the number of hops marked. As the forwarding device’s processing times increase by 1, SwitchID and Eport are used as metadata (Metadata) , add the Metadata in the MarkHeader to the position of the Option field of the data packet.

在中间的转发设备上,首先用自身的转发设备标识更新Markheader,并将Markheader中的标识的Metadata写入Option字段。On the forwarding device in the middle, first update the Markheader with its own forwarding device ID, and write the Metadata of the ID in the Markheader into the Option field.

在终点的转发设备上,将可选字段(Option字段)的元数据栈(Metadata Stack)提取出来。On the forwarding device at the end point, the metadata stack (Metadata Stack) of the optional field (Option field) is extracted.

对于身份位置定位的标记过程,在交换设备上,交换机的IP地址作为攻击源位置,用于生成分片。使用设计的四个字段填充数据包IP协议头部的标识字段和偏移字段和标志位。具体的实施过程如下:For the marking process of identity location location, on the switching device, the IP address of the switch is used as the attack source location to generate fragments. Use the designed four fields to fill the identification field, offset field and flag bit of the IP protocol header of the data packet. The specific implementation process is as follows:

攻击源位置标记过程中,转发设备读取区分服务字段,并匹配流表,对匹配成功的数据包进行概率标记,转发设备按角色分为两种:标记节点与中间节点In the process of marking the location of the attack source, the forwarding device reads the differentiated service field, matches the flow table, and performs probability marking on the matched data packets. The forwarding device is divided into two types according to the role: marking node and intermediate node

若区分服务字段未被修改,对于需要分片标记的数据包,交换机提取IP源地址,等长分割产生分片fragmenti,计算地址分片的偏移offsetiIf the differentiated services field has not been modified, for the data packet that needs to be fragmented, the switch extracts the IP source address, divides it into fragment i with equal length, and calculates the offset offset i of the address fragment.

接着,交换机对IP源地址进行哈希运算,截取特定位数作为hash字段。Next, the switch performs a hash operation on the IP source address, and intercepts a specific number of digits as the hash field.

最后,在数据存储位置方面,将15位的hash字段与偏移offseti的高位填入16位的identification字段,将偏移offseti的低位填入flag的低位,将fragmenti填入13位的FragmentOffset字段。Finally, in terms of data storage location, fill the 15-bit hash field and the high bit of offset i into the 16-bit identification field, fill the low bit of offset i into the low bit of flag, and fill fragment i into the 13-bit FragmentOffset field.

若区分服务字段已被修改,即解析到Diffserv为分片标记服务(0xC),表明该数据包已被转发路径的上游交换机标记,本交换机不需要进行填充操作,仅更新转发跳数HopCount。If the differentiated services field has been modified, it is resolved that Diffserv is the Fragment Marking Service (0xC), indicating that the data packet has been marked by the upstream switch of the forwarding path. The switch does not need to perform filling operations, and only updates the forwarding hop count HopCount.

受害者通过域内DDoS攻击检测算法检测到DDoS时,受害者域内的服务器提取并汇总收集到的具有不同标记信息的数据包后,开始进行攻击溯源。分为攻击路径溯源和身份位置定位。When the victim detects DDoS through the DDoS attack detection algorithm in the domain, the server in the victim domain extracts and summarizes the collected data packets with different tag information, and then starts to trace the source of the attack. It is divided into attack path tracing and identity location positioning.

路径记录策略的路径重构过程如下:The path reconstruction process of the path record policy is as follows:

在执行路径记录的报文传输过程中,起始交换机在数据报文中嵌入包含遥测指令的遥测包头,接着将遥测元数据<SwitchId,Eport>写入到IP包头的Option字段。中间的交换机节点,在识别到报文的遥测包头后,在原有的路径记录上,累加本地标识<SwitchId,Eport>,并更新转发跳数字段。在最后一跳的交换机上,交换机将数据报文中包含的路径记录卸载,并上报到控制器。During the packet transmission process for path recording, the originating switch embeds a telemetry packet header containing telemetry instructions in the data packet, and then writes the telemetry metadata <SwitchId, Eport> into the Option field of the IP packet header. The intermediate switch node, after identifying the telemetry packet header of the message, adds the local identifier <SwitchId, Eport> to the original path record, and updates the forwarding hop count field. On the switch at the last hop, the switch offloads the path record contained in the data packet and reports it to the controller.

在路径重构过程,首先,交换机识别区分服务字段的值,对路径记录策略的报文提取Option字段,解析可选字段(Option字段)栈内的数据。In the path reconstruction process, first, the switch identifies the value of the DiffServ field, extracts the Option field from the packet of the path record policy, and parses the data in the optional field (Option field) stack.

其次,将元数据依次出栈,按序读取携带的交换机标识<SwitchId,Eport>,再配合HopCount即可获取由近及远的溯源路径。Secondly, pop the metadata out of the stack in sequence, read the carried switch identifiers <SwitchId, Eport> in sequence, and cooperate with HopCount to obtain the traceability path from near to far.

身份位置定位的重构过程如下:The reconstruction process of identity location positioning is as follows:

(1)对于地址分片的拼装,先提取距离字段的值相同的分片,具有相同转发距离的分片意味着这些分片可能来自同一台交换机。(1) For the assembly of address fragments, the fragments with the same distance field value are extracted first, and the fragments with the same forwarding distance mean that these fragments may come from the same switch.

(2)此外考虑到存在有多个攻击者以及多条转发路径的情况,对这些具有相同转发距离的分片,再使用分片中的哈希字段值做交换机身份的区分,因为来自同一台交换机的哈希值是一样的。经过两次筛选,就可以获取到具有相同转发距离,且来自不同交换机的分片摘要。(2) In addition, considering that there are multiple attackers and multiple forwarding paths, for these fragments with the same forwarding distance, use the hash field value in the fragmentation to distinguish the identity of the switch, because the switches from the same The hash of the switch is the same. After two screenings, you can get fragmentation summaries with the same forwarding distance and from different switches.

(3)对这些分片摘要按转发距离进行拼接,从距离为1的分片摘要开始拼接。对相同的哈希值的分片摘要,使用分片中的偏移字段的值对分片重新排序。(3) Splicing these fragment summaries according to the forwarding distance, starting from the fragment summaries with a distance of 1. For shard digests with the same hash value, reorder the shards using the value of the offset field in the shard.

(4)当排序完获取到全部的分片后,即获取到了完整的IP地址时,需要进行一次地址校验,校验的方式是将拼接好的IP地址进行哈希运算,根据哈希函数的特点,相同的IP地址会生成相同的散列输出结果,将此哈希结果截取相同位数后,与IP地址分片中附加的哈希值比对。(4) When all fragments are obtained after sorting, that is, when the complete IP address is obtained, an address verification is required. The method of verification is to perform a hash operation on the spliced IP address, according to the hash function The same IP address will generate the same hash output result. After the hash result is cut to the same number of digits, it is compared with the hash value attached to the IP address fragment.

(5)将校验结果一致的IP地址写入溯源的转发路径集合中,说明此染色报文的路径包含此台交换机。(5) Write the IP address with the same verification result into the traceable forwarding path set, indicating that the path of the dyed message includes this switch.

(6)在完成对相同距离的报文摘要拼接后,距离加一,对上一跳的节点继续分片的拼接,完成路径溯源重构的工作,直到路径最远的节点。(6) After completing the splicing of message digests at the same distance, the distance is increased by one, and the splicing of fragments is continued for the node of the previous hop, and the work of path tracing and reconstruction is completed until the node with the farthest path.

(7)汇集全部的攻击源IP地址后,对转发路径集合的节点按转发距离输出。(7) After all the attack source IP addresses are collected, the nodes in the forwarding path set are output according to the forwarding distance.

综上,本实施例2中提出的针对地址欺骗的混合溯源方法,能有效还原攻击者的攻击路径和身份位置。混合溯源方法的路径重构所需的数据包数量也较少,计算开销较小。可避免交换机的重复标记问题,不会覆盖上游路由器的标记信息。选用路径记录的溯源方式,溯源速度快。标记到数据包的信息是交换机标识信息而非数据包IP地址。混合溯源方法可实现不需要暴露其网络拓扑结构,并降低带宽要求。To sum up, the hybrid traceability method for address spoofing proposed in Embodiment 2 can effectively restore the attacker's attack path and identity location. The path reconstruction of the hybrid traceability method also requires fewer packets and less computational overhead. It can avoid the repeated marking problem of the switch, and will not overwrite the marking information of the upstream router. The traceability method of path record is selected, and the traceability speed is fast. The information stamped into the data packet is the switch identification information rather than the data packet IP address. The hybrid traceability method does not need to expose its network topology and reduces bandwidth requirements.

实施例3Example 3

如图6所示,本实施例3中,面向地址欺骗的混合溯源方法具有轻量级、细粒度等优点。为减少路径重构所需的数据包的数量、避免重复标记问题、降低路由器的资源开销和提高跨域溯源防御机制的能力,使用交换机对应的全局唯一的编号SwitchID和转发端口Eport代替IP地址对从攻击者发出的数据包进行标记。As shown in FIG. 6 , in Embodiment 3, the hybrid traceability method for address spoofing has the advantages of being lightweight and fine-grained. In order to reduce the number of data packets required for path reconstruction, avoid the problem of repeated marking, reduce the resource overhead of the router, and improve the ability of the cross-domain source tracing defense mechanism, the globally unique number SwitchID corresponding to the switch and the forwarding port Eport are used instead of the IP address pair Packets sent from the attacker are tagged.

IP数据包作为路径重构的信息载体,本实施例对IP数据包包头进行重写,利用IP头的区分服务(Diffserv)字段标记待溯源的数据流量、利用保留字段和选项字段(Option字段)来存储路径信息、利用分片字段(FragmentOffset)和标识字段(identification)来存放身份信息。启用IP数据包包头的可变部分,即Option字段作为存储包含攻击者到受害者之间遍历的交换机。IP packet is used as the information carrier of path reconstruction, and the present embodiment rewrites the IP packet header, utilizes the differentiated service (Diffserv) field of the IP header to mark the data flow to be traced, utilizes the reserved field and the option field (Option field) To store path information, use fragmentation field (FragmentOffset) and identification field (identification) to store identity information. Enable the variable part of the IP packet header, that is, the Option field as a storage switch that contains the traversal from the attacker to the victim.

从攻击者到受害者之间,待标记的数据包每经过一台交换机,该交换机按照上述实施例2中的标记规则选取该交换机的<SwitchId,Eport>插入到数据包中,直至遍历从攻击者到受害者之间的转发路径。最后,当受害者收集包含不同标记信息的完整元数据后,可根据Hop_Count字段、SwitchID字段和Eport字段一一对应,从而重构出完整的攻击者到受害者之间的攻击路径;From the attacker to the victim, each time a data packet to be marked passes through a switch, the switch selects <SwitchId, Eport> of the switch and inserts it into the data packet according to the marking rules in the above-mentioned embodiment 2, until it traverses from the attacker The forwarding path from victim to victim. Finally, after the victim collects complete metadata containing different tag information, the complete attack path between the attacker and the victim can be reconstructed according to the one-to-one correspondence between the Hop_Count field, the SwitchID field and the Eport field;

从攻击者到受害者之间,待标记的数据包每经过一台交换机,该交换机按照本发明的无重复填充规则,生成IP分片,并填充identification字段,flag字段和FragmentOffset字段。最后,当受害者收集包含不同分片标记信息后,可根据本发明的fragmenti字段和offseti字段和HopCount字段还原身份位置,并利用hash字段进行身份校验,从而重构出完整的身份位置信息。From the attacker to the victim, each time the data packet to be marked passes through a switch, the switch generates IP fragments according to the non-repetition filling rule of the present invention, and fills the identification field, the flag field and the FragmentOffset field. Finally, after the victim collects information containing different fragment marks, the identity position can be restored according to the fragment i field, offset i field and HopCount field of the present invention, and the identity verification is performed using the hash field, thereby reconstructing a complete identity position information.

实施例4Example 4

本实施例4提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质用于存储计算机指令,所述计算机指令被处理器执行时,实现如上所述的面向地址欺骗的混合攻击溯源方法,该方法包括:Embodiment 4 provides a non-transitory computer-readable storage medium, the non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the above-mentioned address-oriented spoofing is realized A hybrid attack source tracing method, which includes:

使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储攻击路径信息,使用标识字段和分片字段来存储标记攻击源位置信息,将攻击路径信息与攻击源位置信息标记插入数据包;Use the globally unique number and forwarding port corresponding to each switch to mark the data packets sent by the attacker, and use the optional field to store the attack path information, and use the identification field and fragmentation field to store the location information of the marked attack source. The attack path information and the attack source location information mark are inserted into the data packet;

当检测到DDoS时,根据提取并汇总收集到的具有不同标记信息的数据包,进行攻击溯源,得到攻击路径和攻击源地址。When DDoS is detected, according to the extracted and collected data packets with different tag information, the source of the attack is traced, and the attack path and attack source address are obtained.

实施例5Example 5

本实施例5提供一种计算机程序产品,包括计算机程序,所述计算机程序当在一个或多个处理器上运行时,用于实现如上所述的面向地址欺骗的混合攻击溯源方法,该方法包括:Embodiment 5 provides a computer program product, including a computer program. When the computer program is run on one or more processors, it is used to implement the address spoofing-oriented hybrid attack traceability method as described above. The method includes :

使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储攻击路径信息,使用标识字段和分片字段来存储标记攻击源位置信息,将攻击路径信息与攻击源位置信息标记插入数据包;Use the globally unique number and forwarding port corresponding to each switch to mark the data packets sent by the attacker, and use the optional field to store the attack path information, and use the identification field and fragmentation field to store the location information of the marked attack source. The attack path information and the attack source location information mark are inserted into the data packet;

当检测到DDoS时,根据提取并汇总收集到的具有不同标记信息的数据包,进行攻击溯源,得到攻击路径和攻击源地址。When DDoS is detected, according to the extracted and collected data packets with different tag information, the source of the attack is traced, and the attack path and attack source address are obtained.

实施例6Example 6

本实施例6提供一种电子设备,包括:处理器、存储器以及计算机程序;其中,处理器与存储器连接,计算机程序被存储在存储器中,当电子设备运行时,所述处理器执行所述存储器存储的计算机程序,以使电子设备执行实现如上所述的面向地址欺骗的混合攻击溯源方法的指令,该方法包括:Embodiment 6 provides an electronic device, including: a processor, a memory, and a computer program; wherein, the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the memory A stored computer program, so that the electronic device executes instructions for implementing the address spoofing-oriented hybrid attack source tracing method as described above, the method including:

使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储攻击路径信息,使用标识字段和分片字段来存储标记攻击源位置信息,将攻击路径信息与攻击源位置信息标记插入数据包;Use the globally unique number and forwarding port corresponding to each switch to mark the data packets sent by the attacker, and use the optional field to store the attack path information, and use the identification field and fragmentation field to store the location information of the marked attack source. The attack path information and the attack source location information mark are inserted into the data packet;

当检测到DDoS时,根据提取并汇总收集到的具有不同标记信息的数据包,进行攻击溯源,得到攻击路径和攻击源地址。When DDoS is detected, according to the extracted and collected data packets with different tag information, the source of the attack is traced, and the attack path and attack source address are obtained.

综上所述,本发明实施例所述的面型地址欺骗的混合攻击溯源方法,IP数据包的空闲字段对数据包包头进行重写,并使用选项字段根据攻击者和受害者之间的距离构建一个动态可变的路径记录栈。将每台交换机的标识和转发端口作为标记信息写入数据包。每个交换机的标识均采用无符号的32位整数来表示,对交换机的IP地址分片是固定等长的方式。对路径记录的标记方法是由交换机进行标记,根据区分服务字段进行数据包标记。其它网络数据包则跳过数据包标记,直接进行数据包转发。在攻击路径重构阶段根据选项字段(Option字段)来实现攻击路径的重构过程,根据分片字段来完成身份位置定位。在存储攻击路径时,属于不同交换机的标识信息是栈式写入到MetadataStack中。受害者端收到的包含攻击路径的标记数据包是遍历从攻击者到受害者的元数据信息。To sum up, in the hybrid attack traceability method for face-type address spoofing described in the embodiment of the present invention, the free field of the IP data packet rewrites the header of the data packet, and uses the option field according to the distance between the attacker and the victim. Build a dynamically mutable stack of path records. Write the identification and forwarding ports of each switch as tag information into the packet. The identifier of each switch is represented by an unsigned 32-bit integer, and the IP address fragmentation of the switch is fixed and equal in length. The marking method of the path record is performed by the switch, and the data packet is marked according to the differentiated service field. Other network data packets skip the data packet marking and directly carry out data packet forwarding. In the attack path reconstruction stage, the reconstruction process of the attack path is realized according to the option field (Option field), and the identity position location is completed according to the fragment field. When storing the attack path, the identification information belonging to different switches is written into the MetadataStack in a stacked manner. The marked packet containing the attack path received by the victim is the metadata information that traverses from the attacker to the victim.

在具体应用中,其中每台交换机的标识分片信息可以选取不同分片长度完成分片。但分成的片数越多,受害者在重构攻击路径所需的数据包数量就越多,会增加系统的复杂性和系统开销。标记信息可以为基于交换机的标识信息。容易被DDoS攻破,篡改路由器信息,导致无法攻击真正的攻击源。In a specific application, the identification fragmentation information of each switch can select different fragmentation lengths to complete the fragmentation. However, the more fragments are divided into, the more data packets the victim needs to reconstruct the attack path, which will increase the complexity and system overhead of the system. The tag information may be switch-based identification information. It is easy to be attacked by DDoS, and the router information is tampered with, making it impossible to attack the real attack source.

本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Accordingly, the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.

本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor, or processor of other programmable data processing equipment to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing equipment produce a An apparatus for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions The device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device Steps are provided for implementing the functions specified in the flow chart or flow charts and/or block diagram block or blocks.

上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明公开的技术方案的基础上,本领域技术人员在不需要付出创造性劳动即可做出的各种修改或变形,都应涵盖在本发明的保护范围之内。Although the specific implementation of the present invention has been described above in conjunction with the accompanying drawings, it does not limit the protection scope of the present invention. Those skilled in the art should understand that on the basis of the technical solutions disclosed in the present invention, those skilled in the art do not need to pay Various modifications or deformations that can be made through creative labor shall be covered within the scope of protection of the present invention.

Claims (10)

1.一种面向地址欺骗的混合攻击溯源方法,其特征在于,包括:1. A hybrid attack source tracing method for address spoofing, characterized in that it comprises: 使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储攻击路径信息,使用标识字段和分片字段来存储标记攻击源位置信息,将攻击路径信息与攻击源位置信息标记插入数据包;Use the globally unique number and forwarding port corresponding to each switch to mark the data packets sent by the attacker, and use the optional field to store the attack path information, and use the identification field and fragmentation field to store the location information of the marked attack source. The attack path information and the attack source location information mark are inserted into the data packet; 当检测到DDoS时,根据提取并汇总收集到的具有不同标记信息的数据包,进行攻击溯源,得到攻击路径和攻击源地址。When DDoS is detected, according to the extracted and collected data packets with different tag information, the source of the attack is traced, and the attack path and attack source address are obtained. 2.根据权利要求1所述的面向地址欺骗的混合攻击溯源方法,其特征在于,对IP数据包的首部进行改写,利用IP头部的区分服务字段来扩充流量溯源功能记录攻击路径信息和攻击源地址定位。2. The hybrid attack traceability method oriented to address spoofing according to claim 1, characterized in that, the header of the IP data packet is rewritten, and the traffic traceability function is expanded to record the attack path information and the attack path information by using the differentiated service field of the IP header. Source address location. 3.根据权利要求2所述的面向地址欺骗的混合攻击溯源方法,其特征在于,利用IP数据包头部的保留字段和选项字段来存储包含攻击者到受害者之间遍历的交换机标记信息;MarkHeader为数据包头部中补充设计的协议头部;SwitchID为交换机的全局标识字段,用于标识数据包在分组转发过程经过的交换机身份信息;Eport为转发端口字段,用于标识数据包在交换机上的转发端口,交换机的SwitchID和转发端口Eport配合使用,用于记录数据包的转发路径;HOP_COUNT为转发跳数统计字段,作为遥测包头维护的计数器,用于计数嵌入遥测包头的源交换机到本交换机的过程中,被标记的转发跳数;Max_HOPS为最大的转发跳数字段,用于申明路径记录功能的最大跳数的常量,在超过该值后交换机不再记录路径信息。3. the hybrid attack traceability method for address spoofing according to claim 2, is characterized in that, utilizes the reserved field and the option field of IP packet head to store and comprise the exchange label information that traverses between assailant and victim; MarkHeader It is the protocol header designed as a supplement to the data packet header; SwitchID is the global identification field of the switch, which is used to identify the identity information of the switch that the data packet passes through in the packet forwarding process; Eport is the forwarding port field, which is used to identify the location of the data packet on the switch Forwarding port, the SwitchID of the switch and the forwarding port Eport are used together to record the forwarding path of the data packet; HOP_COUNT is the forwarding hop count statistics field, which is used as a counter maintained by the telemetry packet header, and is used to count the number of connections from the source switch embedded in the telemetry packet header to the switch. In the process, the marked forwarding hops; Max_HOPS is the maximum forwarding hops field, which is used to declare the constant of the maximum hops of the path recording function. After exceeding this value, the switch will no longer record the path information. 4.根据权利要求3所述的面向地址欺骗的混合攻击溯源方法,其特征在于,攻击源地址定位功能利用IP数据包头部的空闲字段,设计四个填充标记字段:Fragment:存放了IP地址拆分后的一个分片,所有IP地址分片等长;Offset:片偏移字段存放IP地址分片相对于IP地址的顺序;HopCount:转发跳数字段;Hash:哈希字段,用于存放IP地址经过哈希散列函数运算后得到的散列值,用于验证分片拼接的IP地址完整性。4. The hybrid attack traceability method for address spoofing according to claim 3, characterized in that, the attack source address location function utilizes the idle field of the IP packet header to design four filling tag fields: Fragment: stores the fragmented IP address After a split, all IP address fragments have the same length; Offset: fragment offset field stores the order of IP address fragments relative to IP addresses; HopCount: forwarding hop count field; Hash: hash field, used to store IP The hash value obtained after the address is processed by the hash function is used to verify the integrity of the IP address of the splicing. 5.根据权利要求3所述的面向地址欺骗的混合攻击溯源方法,其特征在于,攻击路径记录的标记过程包括,在交换设备上,交换机的标识与转发端口作为路径信息插入数据包的可选字段的保留部分;从攻击者到受害者之间,每经过一台交换机,该交换机按照标记规则选取该设备标识插入数据包中,直至遍历从攻击者到受害者之间的转发路径。5. The hybrid attack traceability method oriented to address spoofing according to claim 3, wherein the marking process of the attack path record comprises, on the switching device, the identification of the switch and the forwarding port are optional options for inserting the data packet as path information. The reserved part of the field; from the attacker to the victim, every time a switch passes through, the switch selects the device identifier and inserts it into the data packet according to the marking rules until the forwarding path from the attacker to the victim is traversed. 6.根据权利要求4所述的面向地址欺骗的混合攻击溯源方法,其特征在于,身份位置定位的标记过程包括:攻击源位置标记过程中,转发设备读取区分服务字段,并匹配流表,对匹配成功的数据包进行概率标记,转发设备按角色分为两种:标记节点与中间节点;6. The address spoofing-oriented hybrid attack source tracing method according to claim 4, wherein the marking process of identity location location includes: during the attack source location marking process, the forwarding device reads the differentiated service field and matches the flow table, Probabilistically mark the successfully matched data packets, and the forwarding devices are divided into two types according to their roles: marking nodes and intermediate nodes; 若区分服务字段未被修改,对于需要分片标记的数据包,交换机提取IP源地址,等长分割产生分片fragmenti,计算地址分片的偏移offsetiIf the differentiated services field has not been modified, for the data packet that needs to be fragmented, the switch extracts the IP source address, divides it into equal length to generate fragment i , and calculates the offset offset i of the address fragment; 接着,交换机对IP源地址进行哈希运算,截取特定位数作为hash字段;Next, the switch performs a hash operation on the IP source address, and intercepts a specific number of digits as the hash field; 最后,在数据存储位置方面,将15位的hash字段与偏移offseti的高位填入16位的identification字段,将偏移offseti的低位填入flag的低位,将fragmenti填入13位的FragmentOffset字段;Finally, in terms of data storage location, fill the 15-bit hash field and the high bit of offset i into the 16-bit identification field, fill the low bit of offset i into the low bit of flag, and fill fragment i into the 13-bit FragmentOffset field; 若区分服务字段已被修改,即解析到Diffserv为分片标记服务,表明该数据包已被转发路径的上游交换机标记,本交换机不需要进行填充操作,仅更新转发跳数HopCount。If the differentiated services field has been modified, it is resolved that Diffserv is the fragment marking service, indicating that the data packet has been marked by the upstream switch of the forwarding path. The switch does not need to perform filling operations, and only updates the forwarding hop count HopCount. 7.根据权利要求5所述的面向地址欺骗的混合攻击溯源方法,其特征在于,在执行路径记录的报文传输过程中,起始交换机在数据报文中嵌入包含遥测指令的遥测包头,接着将遥测元数据<SwitchId,Eport>写入到IP包头的Option字段;中间的交换机节点,在识别到报文的遥测包头后,在原有的路径记录上,累加本地标识<SwitchId,Eport>,并更新转发跳数字段;在最后一跳的交换机上,交换机将数据报文中包含的路径记录卸载,并上报到控制器;7. The hybrid attack traceability method for address spoofing according to claim 5, characterized in that, during the message transmission process of the execution path record, the initial switch embeds the telemetry packet header containing the telemetry instruction in the data message, and then Write the telemetry metadata <SwitchId, Eport> into the Option field of the IP packet header; the intermediate switch node, after identifying the telemetry packet header of the message, adds the local identifier <SwitchId, Eport> to the original path record, and Update the forwarding hop count field; on the last hop switch, the switch unloads the path record contained in the data message and reports it to the controller; 在路径重构过程,首先,交换机识别区分服务字段的值,对路径记录策略的报文提取Option字段,解析可选字段栈内的数据;其次,将元数据依次出栈,按序读取携带的交换机标识<SwitchId,Eport>,再配合HopCount即可获取由近及远的溯源路径。In the path reconstruction process, first, the switch identifies the value of the differentiated service field, extracts the Option field from the packet of the path record policy, and parses the data in the optional field stack; secondly, pops the metadata out of the stack in sequence, reads the The switch ID <SwitchId, Eport>, together with HopCount, can obtain the traceability path from near to far. 8.根据权利要求6所述的面向地址欺骗的混合攻击溯源方法,其特征在于,身份位置定位的重构过程包括:8. The address spoofing-oriented hybrid attack traceability method according to claim 6, wherein the reconstruction process of identity location positioning includes: 对于地址分片的拼装,先提取距离字段的值相同的分片;对提取的方片使用分片中的哈希字段值做交换机身份的区分,获取到具有相同转发距离且来自不同交换机的分片摘要;For the assembly of address fragments, first extract the fragments with the same distance field value; use the hash field value in the fragments to distinguish the identity of the switch for the extracted square fragments, and obtain the fragments with the same forwarding distance and from different switches. film summary; 对分片摘要按转发距离进行拼接,从距离为1的分片摘要开始拼接;对相同的哈希值的分片摘要,使用分片中的偏移字段的值对分片重新排序;Splice the fragment digest according to the forwarding distance, starting from the fragment digest with a distance of 1; for the fragment digest with the same hash value, use the value of the offset field in the fragment to reorder the fragment; 当排序完获取到全部的分片后,即获取到了完整的IP地址时,需要进行一次地址校验,将校验结果一致的IP地址写入溯源的转发路径集合中,表示此染色报文的路径包含此台交换机;When all fragments are obtained after sorting, that is, when the complete IP address is obtained, an address verification needs to be performed, and the IP address with the same verification result is written into the traceable forwarding path set, indicating that the dyed packet is The path contains this switch; 在完成对相同距离的报文摘要拼接后,距离加一,对上一跳的节点继续分片的拼接,完成路径溯源重构的工作,直到路径最远的节点;After completing the splicing of message digests at the same distance, the distance is increased by one, and the splicing of fragments is continued for the node of the previous hop, and the work of path tracing and reconstruction is completed until the node with the farthest path; 汇集全部的攻击源IP地址后,对转发路径集合的节点按转发距离输出。After collecting all the attack source IP addresses, the nodes in the forwarding path set are output according to the forwarding distance. 9.根据权利要求8所述的面向地址欺骗的混合攻击溯源方法,其特征在于,地址校验的方式为:将拼接好的IP地址进行哈希运算,根据哈希函数的特点,相同的IP地址会生成相同的散列输出结果,将此哈希结果截取相同位数后,与IP地址分片中附加的哈希值比对。9. The address spoofing-oriented hybrid attack traceability method according to claim 8, characterized in that the address verification method is: perform hash operation on the concatenated IP addresses, and according to the characteristics of the hash function, the same IP The address will generate the same hash output result. After the hash result is truncated to the same number of digits, it is compared with the hash value attached to the IP address fragment. 10.一种基于权利要求1-9任一项所述的方法的面向地址欺骗的混合攻击溯源系统,其特征在于,包括:10. An address spoofing-oriented hybrid attack traceability system based on the method according to any one of claims 1-9, characterized in that it comprises: 标记模块,用于使用每个交换机对应的全局唯一的编号和转发端口对攻击者发出的数据包进行标记,并使用可选字段来存储攻击路径信息,使用标识字段和分片字段来存储标记攻击源位置信息,将攻击路径信息与攻击源位置信息标记插入数据包;The marking module is used to use the globally unique number and forwarding port corresponding to each switch to mark the data packets sent by the attacker, and use the optional field to store the attack path information, and use the identification field and fragmentation field to store the mark attack Source location information, inserting the attack path information and the attack source location information mark into the data packet; 溯源模块,用于当检测到DDoS时,根据提取并汇总收集到的具有不同标记信息的数据包,进行攻击溯源,得到攻击路径和攻击源地址。The source tracing module is used to trace the source of the attack according to the extracted and collected data packets with different tag information when DDoS is detected, and obtain the attack path and attack source address.
CN202310732358.2A 2023-06-20 2023-06-20 Mixed attack tracing method and system for address spoofing Pending CN116633665A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310732358.2A CN116633665A (en) 2023-06-20 2023-06-20 Mixed attack tracing method and system for address spoofing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310732358.2A CN116633665A (en) 2023-06-20 2023-06-20 Mixed attack tracing method and system for address spoofing

Publications (1)

Publication Number Publication Date
CN116633665A true CN116633665A (en) 2023-08-22

Family

ID=87621327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310732358.2A Pending CN116633665A (en) 2023-06-20 2023-06-20 Mixed attack tracing method and system for address spoofing

Country Status (1)

Country Link
CN (1) CN116633665A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118827090A (en) * 2023-09-19 2024-10-22 中国移动通信有限公司研究院 Data tracing method, device, electronic device and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910851A (en) * 2021-01-16 2021-06-04 中国电子科技集团公司第十五研究所 Data packet marking and tracing device based on knowledge graph
CN113271317A (en) * 2021-06-16 2021-08-17 中移(杭州)信息技术有限公司 Network attack tracing method and device, communication equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910851A (en) * 2021-01-16 2021-06-04 中国电子科技集团公司第十五研究所 Data packet marking and tracing device based on knowledge graph
CN113271317A (en) * 2021-06-16 2021-08-17 中移(杭州)信息技术有限公司 Network attack tracing method and device, communication equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
汪润虎: "可编程网络中地址欺骗攻击溯源与防御机制研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》, 1 June 2023 (2023-06-01), pages 26 - 62 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118827090A (en) * 2023-09-19 2024-10-22 中国移动通信有限公司研究院 Data tracing method, device, electronic device and readable storage medium

Similar Documents

Publication Publication Date Title
Belenky et al. On deterministic packet marking
CN105991655B (en) Method and apparatus for mitigating neighbor discovery-based denial of service attacks
CN101009660B (en) Universal method and device for processing the match of the segmented message mode
CN102045344B (en) Cross-domain affiliation method and system based on path information elastic sharding
US20110026529A1 (en) Method And Apparatus For Option-based Marking Of A DHCP Packet
CN101316232B (en) Fragmentation and reassembly method based on network protocol version six
KR100951770B1 (en) How to trace back an IP over an IPv6 network
Murugesan et al. HPSIPT: A high-precision single-packet IP traceback scheme
CN116633665A (en) Mixed attack tracing method and system for address spoofing
Xiang et al. Trace IP packets by flexible deterministic packet marking (FDPM)
CN105791300B (en) Single packet source tracing method based on tracking trace importance assessment
CN118611955B (en) Source address traffic identification and control method, device, equipment and medium based on programmable data plane
CN118764324A (en) Capacitive DDoS attack dynamic defense system and method based on programmable switch
CN112615851A (en) Boundary router combining multiple safety inspection mechanisms under CoLoR architecture
Hamadeh et al. Performance of ip address fragmentation strategies for ddos traceback
Vincent et al. A survey of IP traceback mechanisms to overcome denial-of-service attacks
Su et al. Privacy preserving IP traceback
Ni et al. From Address Blocks to Authorized Prefixes: Redesigning {RPKI}{ROV} with a Hierarchical Hashing Scheme for Fast and {Memory-Efficient} Validation
Ma et al. A Low‐Overhead and High‐Precision Attack Traceback Scheme with Combination Bloom Filters
CN118869318B (en) A blacklist-based traffic message forwarding method, device, and network equipment
Albright et al. An implementation of IP traceback in IPv6 using probabilistic packet marking
CN120602412B (en) Data tampering protection method and system in Ethernet data transmission
CN116318801B (en) SOHO router data modification method
Snow et al. Link-layer traceback in ethernet networks
Ge et al. SR-SL: A Secure and Low-Cost Path Validation Based on SRv6

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