A raw socket-based sea needle model network communication method
Patent Information
- Application Number
- CN202610801439.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-04
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-06-04
AI Technical Summary
[0004]本发明实施例提供基于原始套接字的海针模型网络通信方法,用以解决载荷内容往往是明文或简单的异或加密,容易被逆向分析还原,缺乏对数据内容本身的深度保护的问题
本发明,通过在数据包中引入大量随机填充字节,并采用原始套接字绕过常规网络协议栈的常规处理流程,使得封装后的传输报文规避了已知应用层协议的固定结构特征,使得传统的深度包检测设备无法通过现有规则库匹配出通信协议特征,进而提升了网络通信在复杂对抗环境下的抗检测能力,通过采用将业务数据在比特粒度上切割并离散稀释于随机噪声数据流中的机制,使得重组后的传输数据流在宏观统计特征上趋近于白噪声,打破了常规加密流量中仍暴露的长度分布等元数据规律,使得基于熵值分析等统计学特征的流量分析工具难以将其识别为有效的数据通信行为,实现了通信行为层面的隐蔽,通过在传输层面上依托于动态切片与离散嵌入算法,使业务数据以非定长的碎片化形式分散于海量随机载体中,在传输报文被第三方物理截获的场景下,由于第三方缺乏初始嵌入地址、切片长度参量等离散数据的寻址算法细节,无法将有效信息从背景随机噪声中剥离重组,实现了物理层面的信息隐藏与安全防护。
Smart Images

Figure CN122419965B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer data processing technology, and in particular to a sea needle model network communication method based on raw sockets. Background Technology
[0002] As network attack and defense intensifies, traditional network communication methods, while stable, are easily identified or intercepted by firewalls and intrusion detection systems due to their packet structure and traffic characteristics. For communication scenarios requiring high concealment, such as anti-virus data backhaul and sensitive business interactions, existing encryption methods can only guarantee content confidentiality but cannot hide the characteristics of the communication behavior itself. Meanwhile, with the development of network security monitoring technology, detection methods based on signature matching and traffic behavior analysis have become increasingly sophisticated. For ordinary encrypted traffic, although the content is unreadable, its handshake process, packet length distribution, and other metadata characteristics are still exposed. Attackers can identify the existence of encrypted communication through traffic fingerprinting and then block or launch targeted attacks. Therefore, how to transmit data undetected, i.e., achieve low-probability-of-interception communication, has become a research hotspot in the current field of network security.
[0003] Among existing technologies, the most similar technical solutions mainly include framing-based encrypted transmission technology and port-multiplexed silent transmission technology. These existing technologies have obvious defects. Although the framing-based transmission scheme encrypts the data packets, the structure of the data packets is still clearly visible. Attackers can distinguish the boundaries and length patterns of the encrypted data packets through statistical analysis, and cannot achieve deep data concealment. The port-multiplexed silent scheme mainly relies on the concealment of communication behavior. Once the data packets are intercepted, their payload content is often plaintext or simple XOR encryption, which is easy to reverse analyze and restore, and lacks deep protection for the data content itself. Summary of the Invention
[0004] This invention provides a sea needle model network communication method based on raw sockets to solve the problem that the payload content is often plaintext or simple XOR encryption, which is easy to reverse analyze and restore, and lacks deep protection for the data content itself.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, a network communication method for the sea needle model based on raw sockets is provided, including the following steps: Obtain the service data to be transmitted, and extract the peer address information corresponding to the service data; The business data is cut using a first random generation parameter to limit the total number of cuts and a second random generation parameter to limit the length of a single cut, generating a non-fixed-length slice sequence. A random data carrier is constructed to mask the valid data, and the slice sequence is discretely embedded into the random data carrier based on a dynamically selected initial embedding address to generate hybrid payload data containing a chain index structure. Generate verification information for verifying data integrity, add the verification information to the link layer header, and encapsulate and generate a transmission message based on the link layer header and the mixed payload data; The transmission message is sent to the receiving node indicated by the peer address information via the raw socket.
[0006] Optionally, the step of segmenting the business data using a first random generation parameter for limiting the total number of segments and a second random generation parameter for limiting the length of a single segment to generate a non-fixed-length slice sequence includes: The first random number generation logic is used to generate the first random generation parameter used to limit the total number of cuts; For the current cutting round of the business data, a second random number generation parameter is generated using the second random number generation logic to limit the length of a single cutting. Extract the current continuous bit data to be processed based on the single cut length.
[0007] Optionally, the step of extracting the current continuous bit data to be processed based on the single cut length includes: Shift operations are performed on each bit in the continuous bit data one by one to move the target extracted bit to the least significant bit. Perform a bitwise AND operation between the least significant bit and the logic high level parameter to separate a single bit of data; The individual bit data are sequentially merged based on the traversal operation performed on the business data to generate the slice sequence.
[0008] Optionally, the step of constructing a random data carrier used to mask valid data, and discretly embedding the slice sequence into the random data carrier based on a dynamically selected initial embedding address to generate hybrid payload data containing a chained index structure includes: Obtain the interval parameter used to limit the starting range; A position value is randomly selected within the range defined by the interval parameter as the initial embedding address; The first slice data in the slice sequence is embedded into the bits corresponding to the initial embedding address in the random data carrier.
[0009] Optionally, the step of embedding the first slice data in the slice sequence into the bits corresponding to the initial embedding address in the random data carrier includes: Perform a zeroing operation on the bits in the random data carrier corresponding to the initial embedding address; Perform a bitwise OR operation between the zeroed bits and the first slice data, and write the value of the first slice data into the random data carrier.
[0010] Optionally, the step of generating hybrid payload data containing a chained index structure includes: For subsequent slice data in the slice sequence other than the first slice data, a corresponding chained storage unit is constructed in the random data carrier; Write a length feature parameter that characterizes the current slice length into the head region of the linked storage unit; The payload of the subsequent slice data is written in a continuous region adjacent to the head region; A pointer parameter indicating the starting position of the next hop storage is written to the tail region of the linked storage unit.
[0011] Optionally, before the step of obtaining the service data to be transmitted, the method further includes: An initial handshake connection is established with the receiving node using the standard transmission control protocol; A feature code for identity authentication is embedded in the protocol option field of the initial handshake connection, instructing the receiving node to verify the legitimate identity based on the feature code; After identity verification is successful, a random numerical parameter is generated and appended to the protocol option field and sent to the receiving node; The receiving node is instructed to perform a hash operation using the key parameter shared by both communicating parties and the random numerical parameter to obtain a hash result, and to perform a modulo operation on the hash result using the maximum capacity threshold of the protocol option field, and use the obtained remainder as the initial embedding address.
[0012] Optionally, the step of generating a transmission message based on the link layer header and the mixed payload data encapsulation includes: Obtain the session identifier parameter used to uniquely identify the current communication session; Obtain the packet count parameter, which represents the total number of current transport blocks, and the sequence number parameter, which represents the current message order. The session identifier parameter, the packet count parameter, the sequence number parameter, and the verification information are collectively constructed into a data control block; The data control block is spliced to the front end of the hybrid payload data and encapsulated in the Ethernet data frame structure to generate the transmission message.
[0013] Optionally, after the step of sending the transmission message to the receiving node pointed to by the peer address information via the raw socket, the method further includes: Listen for retransmission request messages triggered by the receiving node based on the failure of the verification information or the discontinuity of the sequence number parameter; Parse the retransmission request message and extract the target session identifier parameter and the missing sequence number parameter contained therein; Based on the target session identifier parameter, retrieve and lock the corresponding transport context space in local memory; Extract cache fragment data that matches the missing sequence number parameter from the cache queue contained in the transmission context space; The cached fragment data is re-encapsulated and sent to the receiving node again.
[0014] Secondly, a sea needle model network communication system based on primitive sockets is provided, including: The data acquisition module is used to acquire the business data to be transmitted and extract the peer address information corresponding to the business data; The bit slicing module is used to slice the business data using a first random generation parameter for limiting the total number of slices and a second random generation parameter for limiting the length of a single slice, thereby generating a non-fixed-length slice sequence. The discrete embedding module is used to construct a random data carrier that serves as a mask for valid data, and to discretely embed the slice sequence into the random data carrier based on a dynamically selected initial embedding address, thereby generating hybrid payload data containing a chain index structure. The message encapsulation module is used to generate verification information for verifying data integrity, add the verification information to the link layer header, and encapsulate and generate a transmission message based on the link layer header and the mixed payload data. The network sending module is used to send the transmission message to the receiving node pointed to by the peer address information via a raw socket.
[0015] Thirdly, an electronic device is provided, comprising: a processor and a memory; the memory is used to store a computer program, which, when executed by the processor, causes the electronic device to perform the sea needle model network communication method based on raw sockets as described in the first aspect.
[0016] In one possible design, the electronic device described in the third aspect may further include a transceiver. This transceiver may be a transceiver circuit or an interface circuit. The transceiver can be used for communication between the electronic device described in the third aspect and other electronic devices.
[0017] In the embodiments of the present invention, the electronic device described in the third aspect may be a terminal, or a chip (system) or other component or assembly disposed in the terminal, or a system containing the terminal.
[0018] Fourthly, a computer-readable storage medium is provided, comprising: a computer program or instructions; when the computer program or instructions are executed on a computer, the computer causes the computer to perform the sea needle model network communication method based on raw sockets as described in the first aspect.
[0019] In summary, the above methods and systems have the following technical effects: This invention introduces a large number of random padding bytes into data packets and uses raw sockets to bypass the conventional processing flow of the regular network protocol stack. This allows the encapsulated transmission messages to circumvent the fixed structural characteristics of known application layer protocols, making it impossible for traditional deep packet inspection devices to match communication protocol characteristics using existing rule bases. This enhances the anti-detection capability of network communication in complex adversarial environments. By employing a mechanism that segments and discretely dilutes business data at the bit level into random noise data streams, the reassembled transmission data stream approaches white noise in macroscopic statistical characteristics. This breaks the metadata patterns such as length distribution still exposed in conventional encrypted traffic, making it difficult for traffic analysis tools based on statistical characteristics such as entropy analysis to identify it as valid data communication behavior. This achieves concealment at the communication behavior level. By relying on dynamic slicing and discrete embedding algorithms at the transmission layer, business data is dispersed in a non-fixed-length fragmented form in a massive random carrier. In scenarios where the transmission messages are physically intercepted by a third party, the third party lacks the addressing algorithm details for discrete data such as the initial embedding address and slice length parameters, making it impossible to extract and reassemble the effective information from the background random noise. This achieves physical-level information hiding and security protection. Attached Figure Description
[0020] Figure 1 A flowchart of a sea needle model network communication method based on raw sockets provided in an embodiment of the present invention; Figure 2 A logical block diagram of a sea needle model network communication system based on primitive sockets provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a data slicing scenario for a sea needle model network communication method based on raw sockets provided in an embodiment of the present invention; Figure 4 A schematic diagram of a discrete embedding scenario for the sea needle model network communication method based on raw sockets provided in an embodiment of the present invention; Figure 5 A logical block diagram of the sea needle model network communication method based on raw sockets provided in an embodiment of the present invention; Figure 6This is a schematic diagram of the data encapsulation format structure of the sea needle model network communication method based on raw sockets provided in an embodiment of the present invention. Detailed Implementation
[0021] The following will be combined with the appendix Figures 1-6 The technical solutions in this invention will be described below.
[0022] In this embodiment of the invention, "predefined" or "preconfigured" can be achieved by pre-saving corresponding codes, tables, or other means that can be used to indicate relevant information in the device. This embodiment of the invention does not limit the specific implementation method. "Saving" can refer to saving in one or more memories. These memories can be separate installations or integrated into the encoder, decoder, processor, or electronic device. Alternatively, some memories can be separately installed, while others are integrated into the decoder, processor, or electronic device. The type of memory can be any form of storage medium, and this embodiment of the invention does not limit this.
[0023] In this embodiment of the invention, descriptions such as "when," "under the circumstances," "if," and "if" all refer to the device making corresponding processing under certain objective circumstances, and are not limited to a specific time. They do not require the device to make a judgment action during implementation, nor do they imply any other limitations.
[0024] In the description of the embodiments of the present invention, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in the embodiments of the present invention is merely a description of the relationship between the related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of the embodiments of the present invention, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Additionally, to facilitate a clear description of the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or order of execution, and that "first," "second," etc., are not necessarily different. Furthermore, in the embodiments of this invention, words such as "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this invention should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner for ease of understanding.
[0025] The network architecture and business scenarios described in the embodiments of this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.
[0026] Figure 1 This is a flowchart illustrating the method provided in an embodiment of the present invention. This sea needle model network communication method based on raw sockets can be applied to corresponding system server terminals, and its specific process is as follows: Obtain the service data to be transmitted, and extract the peer address information corresponding to the service data; The business data is cut using a first random generation parameter to limit the total number of cuts and a second random generation parameter to limit the length of a single cut, generating a non-fixed-length slice sequence. A random data carrier is constructed to mask the valid data, and the slice sequence is discretely embedded into the random data carrier based on a dynamically selected initial embedding address to generate hybrid payload data containing a chain index structure. Generate verification information for verifying data integrity, add the verification information to the link layer header, and encapsulate and generate a transmission message based on the link layer header and the mixed payload data; The transmission message is sent to the receiving node indicated by the peer address information via the raw socket.
[0027] Raw sockets are a special type of network programming interface that allows applications to bypass the regular processing flow of the network protocol stack and directly access lower-level network protocols.
[0028] The "Sea Needle Model" is a data steganography model proposed in this invention. It refers to a technical architecture that discretizes business data (needles) and randomly distributes them in filler data (sea) consisting of a large number of random bytes.
[0029] Random data refers to a data stream that is highly unpredictable and random. In this invention, it is used as background noise to fill data packets, making its statistical characteristics close to white noise, thereby masking the existence of valid data.
[0030] The step of segmenting the business data using a first random generation parameter for limiting the total number of segments and a second random generation parameter for limiting the length of a single segment to generate a non-fixed-length slice sequence includes: The first random number generation logic is used to generate the first random generation parameter used to limit the total number of cuts; For the current cutting round of the business data, a second random number generation parameter is generated using the second random number generation logic to limit the length of a single cutting. Extract the current continuous bit data to be processed based on the single cut length.
[0031] Furthermore, the step of extracting the current continuous bit data to be processed based on the single cut length includes: Shift operations are performed on each bit in the continuous bit data one by one to move the target extracted bit to the least significant bit. Perform a bitwise AND operation between the least significant bit and the logic high level parameter to separate a single bit of data; The individual bit data are sequentially merged based on the traversal operation performed on the business data to generate the slice sequence.
[0032] In a specific embodiment, the process of generating a non-fixed-length slice sequence by using a first random number generation logic to generate a first random generation parameter for limiting the total number of cuts, and using a second random number generation logic to generate a second random generation parameter for limiting the length of a single cut, can be implemented through the following mathematical model: First, the original service data to be transmitted is represented as S. The total number of slices is determined, i.e., the first random generation parameter M, where M is a positive integer generated by the first random number generation logic. Subsequently, M slice lengths are generated, which are the second random generation parameters, denoted as... In this embodiment, each Ni is a randomly generated positive integer, and its value range is limited to [value range missing]. The starting position P_i of the i-th slice in the data can be determined by the following recursive formula: When extracting the current consecutive bit data to be processed, the j-th bit of the i-th slice is shifted to the right to the least significant bit. Then, a bitwise AND operation is performed between this least significant bit and a logic high-level parameter (i.e., the value 1), thereby separating and extracting the single bit data. Finally, the entire business data is traversed, and the slices are generated sequentially. in, This is the generated i-th slice sequence; This represents the bit sequence extracted from data D.
[0033] Furthermore, the step of constructing a random data carrier used to mask valid data, and discretly embedding the slice sequence into the random data carrier based on a dynamically selected initial embedding address to generate hybrid payload data containing a chained index structure includes: Obtain the interval parameter used to limit the starting range; A position value is randomly selected within the range defined by the interval parameter as the initial embedding address; The first slice data in the slice sequence is embedded into the bits corresponding to the initial embedding address in the random data carrier.
[0034] Furthermore, the step of embedding the first slice data in the slice sequence into the bits corresponding to the initial embedding address in the random data carrier includes: Perform a zeroing operation on the bits in the random data carrier corresponding to the initial embedding address; Perform a bitwise OR operation between the zeroed bits and the first slice data, and write the value of the first slice data into the random data carrier.
[0035] Furthermore, the step of generating hybrid payload data containing a chained index structure includes: For subsequent slice data in the slice sequence other than the first slice data, a corresponding chained storage unit is constructed in the random data carrier; Write a length feature parameter that characterizes the current slice length into the head region of the linked storage unit; The payload of the subsequent slice data is written in a continuous region adjacent to the head region; A pointer parameter indicating the starting position of the next hop storage is written to the tail region of the linked storage unit.
[0036] In one specific embodiment, the process of constructing a random data carrier used to mask valid data and embedding the first slice data is as follows: First, establish a random data carrier C, which is highly unpredictable, denoted as: Obtain an interval parameter to define the starting range. In this embodiment, the interval parameter defines the range as [0, 32]. Randomly select a position value within this range as the initial embedding address. : For the random data carrier C, the initial embedding address The corresponding bit is cleared to zero, and then it is compared with the first slice data. Performing a bitwise OR operation to complete the bit-level embedding of the first-order slice, its operational model is represented as follows: For subsequent slices in the slice sequence (excluding the first slice, i > 1), a corresponding linked storage unit is constructed in the random data carrier. Its storage layout strictly follows the structure of a head region, a continuous region, and a tail region: the head region contains the length feature parameter representing the current slice length (…). ); followed by a series of The payload of the subsequent slice data is written into the byte region. Finally, a pointer parameter indicating the starting position of the next jump storage is written in the tail region. This creates a hidden singly linked list index structure.
[0037] Furthermore, prior to the step of acquiring the service data to be transmitted, the method further includes: An initial handshake connection is established with the receiving node using the standard transmission control protocol; A feature code for identity authentication is embedded in the protocol option field of the initial handshake connection, instructing the receiving node to verify the legitimate identity based on the feature code; After identity verification is successful, a random numerical parameter is generated and appended to the protocol option field and sent to the receiving node; The receiving node is instructed to perform a hash operation using the key parameter shared by both communicating parties and the random numerical parameter to obtain a hash result, and to perform a modulo operation on the hash result using the maximum capacity threshold of the protocol option field, and use the obtained remainder as the initial embedding address.
[0038] In one specific embodiment, the two communicating parties need to obtain an initial embedded address before transmitting service data. The specific negotiation process is as follows: The sender and receiver first establish an initial handshake connection using the standard Transmission Control Protocol (TCP). The sender embeds a tiny signature in the TCP Options field of the standard Transmission Control Protocol, and the receiver uses deep packet inspection technology to identify this signature and complete the legitimate identity verification.
[0039] After successful identity verification, the sending end generates a random numerical parameter and places it in the protocol option field. The receiving end extracts this parameter and performs a hash operation using the shared key parameter and the random numerical parameter. Since the maximum capacity threshold for the protocol option field of the standard Transmission Control Protocol is 40 bytes, this maximum capacity threshold is used to perform a modulo operation on the hash result. The remainder obtained is the valid initial embedding address offset. The specific algorithm is as follows: Furthermore, the step of generating a transmission message based on the link layer header and the mixed payload data encapsulation includes: Obtain the session identifier parameter used to uniquely identify the current communication session; Obtain the packet count parameter, which represents the total number of current transport blocks, and the sequence number parameter, which represents the current message order. The session identifier parameter, the packet count parameter, the sequence number parameter, and the verification information are collectively constructed into a data control block; The data control block is spliced to the front end of the hybrid payload data and encapsulated in the Ethernet data frame structure to generate the transmission message.
[0040] Furthermore, after the step of sending the transmission message to the receiving node pointed to by the peer address information via the raw socket, the method further includes: Listen for retransmission request messages triggered by the receiving node based on the failure of the verification information or the discontinuity of the sequence number parameter; Parse the retransmission request message and extract the target session identifier parameter and the missing sequence number parameter contained therein; Based on the target session identifier parameter, retrieve and lock the corresponding transport context space in local memory; Extract cache fragment data that matches the missing sequence number parameter from the cache queue contained in the transmission context space; The cached fragment data is re-encapsulated and sent to the receiving node again.
[0041] In one specific embodiment, the step of generating a transmission message based on the link layer header and mixed payload data encapsulation adopts a custom encapsulation format based on Ethernet data packets.
[0042] Specifically, the session identifier parameter (occupying 4 bytes), the packet number parameter (occupying 2 bytes), the sequence number parameter (occupying 2 bytes), and the verification information (occupying 2 bytes) are collectively constructed into a data control block with a length of 10 bytes.
[0043] The data control block is concatenated to the front of the mixed payload data, ranging from 38 to 1492 bytes in length, forming a data area of 48 to 1502 bytes. This data area is then encapsulated within an Ethernet frame structure. The link layer header includes the destination address (6 bytes), source address (6 bytes), and type field (2 bytes); a 4-byte Cyclic Redundancy Check (CRC) code is added to the tail for outer integrity verification. When the receiver fails to verify using the outer check information, or discovers a discontinuous sequence number parameter by parsing the data control block, it extracts the target session identifier parameter and the missing sequence number parameter from the data control block and initiates a retransmission request. The sender locks the transmission context based on the target session identifier parameter and accurately retrieves the buffer for reliable retransmission.
[0044] The above combination Figure 1 The method provided by the embodiments of the present invention is described in detail below. The following details a sea needle model network communication system based on raw sockets for implementing the method provided by the embodiments of the present invention, applied to the sea needle model network communication method based on raw sockets as described in any one of claims 1-9, comprising: The data acquisition module is used to acquire the business data to be transmitted and extract the peer address information corresponding to the business data; The bit slicing module is used to slice the business data using a first random generation parameter for limiting the total number of slices and a second random generation parameter for limiting the length of a single slice, thereby generating a non-fixed-length slice sequence. The discrete embedding module is used to construct a random data carrier that serves as a mask for valid data, and to discretely embed the slice sequence into the random data carrier based on a dynamically selected initial embedding address, thereby generating hybrid payload data containing a chain index structure. The message encapsulation module is used to generate verification information for verifying data integrity, add the verification information to the link layer header, and encapsulate and generate a transmission message based on the link layer header and the mixed payload data. The network sending module is used to send the transmission message to the receiving node pointed to by the peer address information via a raw socket.
[0045] The electronic device provided in this embodiment of the invention, exemplarily, can be a network device, or a chip (system) or other component or assembly that can be disposed in a network device. The electronic device may include a processor. Optionally, the electronic device may also include a memory and / or a transceiver. The processor is coupled to the memory and transceiver, for example, by means of a communication bus connection.
[0046] The following is a detailed introduction to the various components of the electronic device: In this context, the processor is the control center of the electronic device. It can be a single processor or a collective term for multiple processing elements. For example, a processor can be one or more central processing units (CPUs), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0047] Alternatively, the processor can perform various functions of the electronic device, such as the methods described above, by running or executing software programs stored in memory and by calling data stored in memory.
[0048] In a specific implementation, as one example, the processor may include one or more CPUs, such as CPU0 and CPU1.
[0049] In a specific implementation, as one example, the electronic device may also include multiple processors. Each of these processors may be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). Here, a processor may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).
[0050] The memory is used to store the software program that executes the solution of the present invention, and the execution is controlled by the processor. The specific implementation method can be referred to the above method embodiment, and will not be repeated here.
[0051] Optionally, the memory can be read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory can be integrated with the processor or exist independently and coupled to the processor through the interface circuit of the electronic device; the embodiments of the present invention do not specifically limit this.
[0052] A transceiver is used for communication with other electronic devices. For example, if the electronic device is a terminal, the transceiver can be used to communicate with a network device or with another terminal device. As another example, if the electronic device is a network device, the transceiver can be used to communicate with a terminal or with another network device.
[0053] Optionally, the transceiver may include a receiver and a transmitter. The receiver is used to implement the receiving function, and the transmitter is used to implement the sending function.
[0054] Optionally, the transceiver can be integrated with the processor or exist independently and coupled to the processor through the interface circuit of the electronic device. This embodiment of the invention does not specifically limit this.
[0055] It is understood that the structure of the electronic device in this embodiment does not constitute a limitation on the electronic device. The actual electronic device may include more or fewer components, or combine certain components, or have different component arrangements.
[0056] Furthermore, the technical effects of the electronic device can be referred to the technical effects of the method described in the above method embodiments, and will not be repeated here.
[0057] It should be understood that the processor in the embodiments of the present invention can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0058] It should also be understood that the memory in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0059] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0060] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0061] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0062] It should be understood that, in various embodiments of the present invention, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0063] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0064] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0065] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0066] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0067] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0068] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0069] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A network communication method based on the sea needle model of raw sockets, wherein the sea needle model is a data steganography model that discretizes business data and randomly distributes it in padding data composed of random bytes, characterized in that, Includes the following steps: Obtain the service data to be transmitted, and extract the peer address information corresponding to the service data; The business data is cut using a first random generation parameter to limit the total number of cuts and a second random generation parameter to limit the length of a single cut, generating a non-fixed-length slice sequence. A random data carrier is constructed to mask the valid data, and the slice sequence is discretely embedded into the random data carrier based on a dynamically selected initial embedding address to generate hybrid payload data containing a chain index structure. Generate verification information for verifying data integrity, add the verification information to the link layer header, and encapsulate and generate a transmission message based on the link layer header and the mixed payload data; The transmission message is sent to the receiving node indicated by the peer address information via the raw socket.
2. The sea needle model network communication method based on primitive sockets according to claim 1, characterized in that, The step of segmenting the business data using a first random generation parameter for limiting the total number of segments and a second random generation parameter for limiting the length of a single segment to generate a non-fixed-length slice sequence includes: The first random number generation logic is used to generate the first random generation parameter used to limit the total number of cuts; For the current cutting round of the business data, a second random number generation parameter is generated using the second random number generation logic to limit the length of a single cutting. Extract the current continuous bit data to be processed based on the single cut length.
3. The sea needle model network communication method based on primitive sockets according to claim 2, characterized in that, The step of extracting the current continuous bit data to be processed based on the single cut length includes: Shift operations are performed on each bit in the continuous bit data one by one to move the target extracted bit to the least significant bit. Perform a bitwise AND operation between the least significant bit and the logic high level parameter to separate a single bit of data; The individual bit data are sequentially merged based on the traversal operation performed on the business data to generate the slice sequence.
4. The sea needle model network communication method based on primitive sockets according to claim 1, characterized in that, The steps of constructing a random data carrier to mask valid data, and discretly embedding the slice sequence into the random data carrier based on a dynamically selected initial embedding address to generate hybrid payload data containing a chained index structure include: Obtain the interval parameter used to limit the starting range; A position value is randomly selected within the range defined by the interval parameter as the initial embedding address; The first slice data in the slice sequence is embedded into the bits corresponding to the initial embedding address in the random data carrier.
5. The sea needle model network communication method based on primitive sockets according to claim 4, characterized in that, The step of embedding the first slice data in the slice sequence into the bits corresponding to the initial embedding address in the random data carrier includes: Perform a zeroing operation on the bits in the random data carrier corresponding to the initial embedding address; Perform a bitwise OR operation between the zeroed bits and the first slice data, and write the value of the first slice data into the random data carrier.
6. The sea needle model network communication method based on primitive sockets according to claim 1, characterized in that, The step of generating hybrid payload data containing a chained index structure includes: For subsequent slice data in the slice sequence other than the first slice data, a corresponding chained storage unit is constructed in the random data carrier; Write a length feature parameter that characterizes the current slice length into the head region of the linked storage unit; The payload of the subsequent slice data is written in a continuous region adjacent to the head region; A pointer parameter indicating the starting position of the next hop storage is written to the tail region of the linked storage unit.
7. The sea needle model network communication method based on primitive sockets according to claim 1, characterized in that, Before the step of obtaining the service data to be transmitted, the method further includes: An initial handshake connection is established with the receiving node using the standard transmission control protocol; A feature code for identity authentication is embedded in the protocol option field of the initial handshake connection, instructing the receiving node to verify the legitimate identity based on the feature code; After identity verification is successful, a random numerical parameter is generated and appended to the protocol option field and sent to the receiving node; The receiving node is instructed to perform a hash operation using the key parameter shared by both communicating parties and the random numerical parameter to obtain a hash result, and to perform a modulo operation on the hash result using the maximum capacity threshold of the protocol option field, and use the obtained remainder as the initial embedding address.
8. The sea needle model network communication method based on primitive sockets according to claim 1, characterized in that, The step of generating a transmission message based on the link layer header and the hybrid payload data encapsulation includes: Obtain the session identifier parameter used to uniquely identify the current communication session; Obtain the packet count parameter, which represents the total number of current transport blocks, and the sequence number parameter, which represents the current message order. The session identifier parameter, the packet count parameter, the sequence number parameter, and the verification information are collectively constructed into a data control block; The data control block is spliced to the front end of the hybrid payload data and encapsulated in the Ethernet data frame structure to generate the transmission message.
9. The sea needle model network communication method based on primitive sockets according to claim 8, characterized in that, After the step of sending the transmission message to the receiving node pointed to by the peer address information via the raw socket, the method further includes: Listen for retransmission request messages triggered by the receiving node based on the failure of the verification information or the discontinuity of the sequence number parameter; Parse the retransmission request message and extract the target session identifier parameter and the missing sequence number parameter contained therein; Based on the target session identifier parameter, retrieve and lock the corresponding transport context space in local memory; Extract cache fragment data that matches the missing sequence number parameter from the cache queue contained in the transmission context space; The cached fragment data is re-encapsulated and sent to the receiving node again.
10. A sea needle model network communication system based on raw sockets, applied to the sea needle model network communication method based on raw sockets as described in any one of claims 1-9, wherein the sea needle model is a data steganography model that discretizes business data and randomly distributes it in padding data composed of random bytes, characterized in that, include: The data acquisition module is used to acquire the business data to be transmitted and extract the peer address information corresponding to the business data; The bit slicing module is used to slice the business data using a first random generation parameter for limiting the total number of slices and a second random generation parameter for limiting the length of a single slice, thereby generating a non-fixed-length slice sequence. The discrete embedding module is used to construct a random data carrier that serves as a mask for valid data, and to discretely embed the slice sequence into the random data carrier based on a dynamically selected initial embedding address, thereby generating hybrid payload data containing a chain index structure. The message encapsulation module is used to generate verification information for verifying data integrity, add the verification information to the link layer header, and encapsulate and generate a transmission message based on the link layer header and the mixed payload data. The network sending module is used to send the transmission message to the receiving node pointed to by the peer address information via a raw socket.
Citation Information
Patent Citations
Message processing method and proxy server
CN112261094A
VANET covert channel construction method based on data packet length
CN116707944A