USB flash disk virus isolation data transmission method and system and USB flash disk

By establishing isolation belts and multi-layer virtual boundaries during the U disk data transmission process, combining known virus detection and heuristic sandbox algorithms, the problem of virus transmission and identification in U disk data transmission is solved, and efficient and secure data transmission is achieved.

CN118916880AActive Publication Date: 2024-11-08TOPDISK ENTERPRISE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411411899.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2024-11-08
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

During the transmission of USB flash drive data, viruses may hide or disguise as normal data, causing transmission to other computers. The existing technology is difficult to effectively identify and deal with new and abnormal viruses, resulting in high risk of transmission and infection.

Method used

By establishing isolation belts and multi-layer virtual boundaries, conducting known virus detection and data integrity checks, using the heuristic sandbox algorithm to detect metadata viruses, and one-way transmission through SCP or SFTP tools to ensure data security.

Benefits of technology

Effectively prevent virus transmission, identify and process known and unknown viruses, ensure the security and integrity of data transmission, and improve the reliability and efficiency of the transmission process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916880A_ABST
    Figure CN118916880A_ABST
Patent Text Reader

Abstract

The invention discloses a USB flash disk virus-isolated data transmission method and system and a USB flash disk, and relates to the field of USB flash disk virus-isolated data transmission, and the key points of the technical scheme are as follows: establishing an isolation belt, connecting the USB flash disk with a target device through the isolation belt, and preprocessing data in the USB flash disk by using the isolation belt; setting the preprocessed data in the U disk as metadata, constructing a multi-layer virtual boundary, and transmitting the metadata to the multi-layer virtual boundary from the isolation belt; in the multi-layer virtual boundary, using a heuristic sandbox algorithm to perform virus detection on the metadata to obtain shadow data; according to the method and the device, the slave data is unidirectionally transmitted to the target equipment from the multi-layer virtual interface by using an SCP or SFTP transmission tool, and the deleted and deleted block is extracted and warned, so that the abnormal data carrying the virus is detected and analyzed in the USB flash disk isolated virus data transmission process, and the data transmission security is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of U disk virus isolation data transmission, and more specifically, it relates to a U disk virus isolation data transmission method, system and U disk. Background Art

[0002] When using USB flash drives for data transfer, especially when considering virus isolation, you may encounter USB flash drive malware infection. Some viruses hide or disguise as normal data, which may be mistaken for legitimate data during transmission and spread to other computers. Some complex malware may not exhibit malicious behavior immediately, but may be triggered under specific conditions. This makes even USB flash drives that appear to be harmless on the surface potentially a threat in the future.

[0003] During the data transmission process of USB disk isolation virus, if the virus directly contacts the target device, it will easily cause large-scale spread and infection. Moreover, as the virus is updated and deformed all the time, the types of viruses are also increasing rapidly. Known virus detection cannot fully meet the effective identification of new and abnormal viruses. Therefore, how to design USB disk isolation virus data transmission is now urgently needed to be solved. Summary of the invention

[0004] In view of the problems existing in the prior art, the purpose of the present invention is to provide a USB disk virus isolation data transmission method, system and USB disk, so as to realize the detection and analysis and processing of abnormal data carrying viruses during the USB disk virus isolation data transmission process, and improve the security of data transmission.

[0005] To achieve the above object, the present invention provides the following technical solution: The USB disk virus isolation data transmission method comprises: Step S1: Establish an isolation zone, connect the USB flash drive to the target device through the isolation zone, and use the isolation zone to pre-process the data in the USB flash drive; Step S2: setting the pre-processed data in the USB flash drive as metadata, constructing a multi-layer virtual world, and transferring the metadata from the isolation zone to the multi-layer virtual world; Step S3: In the multi-layer virtual world, use the heuristic sandbox algorithm to perform virus detection on the metadata and obtain the shadow data; Step S4: Use SCP or SFTP transmission tools to unidirectionally transfer the shadow data from the multi-layer virtual world to the target device, and extract and warn of the deleted missing blocks.

[0006] Preferably, the isolation belt includes isolation equipment, and the method for using the isolation belt includes: Select an isolation device and set it between the USB drive and the target device; Configure the direction and rules of data transmission. Set the direction of data transmission to one-way transmission from the USB flash drive to the target device, and the rules of data transmission to monitoring and logging. Start the isolation device, and the data in the USB flash drive is first transferred to the isolation zone, where the data in the USB flash drive is pre-processed to preliminarily determine whether the data is safe. If the data is safe, the data continues to be transferred; otherwise, the transfer is interrupted and the connection between the isolation device and the USB flash drive is automatically disconnected; Clean up all the data in the isolation zone after use, initialize the isolation zone environment, and complete a data transmission isolation use.

[0007] Preferably, the method for preprocessing the data in the USB flash drive includes known virus detection and data integrity check; The method for detecting known viruses on the data in the USB flash drive is as follows: Creating a sample center, which includes characteristic strings in known virus samples; Divide the data in the USB flash drive into u blocks, read them one by one, and convert the data content of each small block into a byte stream; Use a matching algorithm to search for the characteristic string of each block in the byte stream and match the characteristic string with the sample center. If the match is successful, the data of the corresponding block is determined to be infected with a virus, the location of the matching block and the identifier of the characteristic string are recorded, and isolation, deletion or repair is performed. If the match fails, it is determined that the data is not infected with a known virus and data transmission continues; Collect the data composed of blocks after the matching algorithm is processed, which is recorded as pre-data. The method for checking the data integrity of the pre-data is as follows: The data of each block is read in binary mode, and the SHA-256 algorithm is used to perform hash calculation on the read data to generate a hash value with a fixed length. , and save it; Get the hash value of the original data corresponding to the data in each block , the hash value With hash value Compare, if equal, then block The data in the data is complete and consistent with the original data content; if they are not equal, the data is blocked The data in the file may be tampered with or damaged, so it should be deleted or marked for storage; in, Indicates the isolation zone The hash value of the block data, Indicates the original data The hash value of a block of data.

[0008] Preferably, the method of dividing the data in the USB disk into u blocks and reading them one by one includes: Use a machine learning model to determine the block size. The machine learning model is based on a neural network or a deep learning model. Set the input of the machine learning model to the number of bytes of data, and the output to the block size. Set the constraint condition to the best balance between memory usage and I / O efficiency. Collect the number of bytes of historical data and the corresponding output block size as a sample set. Use the sample set to train the machine learning model to obtain a trained machine learning model. Input the number of bytes of the original data in the current USB flash drive into the trained machine learning model to obtain the block size, which is set to , using the current production block size Divide the data in the USB disk into small blocks; Read the data transferred from the USB flash drive to the isolation zone in binary mode, and read the data block by block through a loop structure, with a block size of until the remaining number of bytes is less than , then directly read all remaining data; Each time a block of data is read, the matching algorithm is used to match the characteristic string immediately. After processing, the next block is read. If the length of the characteristic string is greater than the size of the block, , then the maximum length of the characteristic string at the end of the previous block is concatenated with the beginning of the current block, and the match is performed again until all the data is completely read.

[0009] Preferably, the method of using a matching algorithm to search for a characteristic string of each block in the byte stream and matching the characteristic string with the sample center includes: The matching algorithm is based on the KMP algorithm and the Boyer-Moore algorithm. The bad character table and good suffix table of the Boyer-Moore algorithm are constructed for the preliminary matching stage, and the prefix function of the KMP algorithm is constructed for the fine matching stage: Set the calculation method of the prefix function ,in, Represents the prefix function value, that is, the pattern string Before The length of the longest identical prefix and suffix of characters, Represents a pattern string, Indicates the current position or index, Represents the length variable, that is, the length of the prefix, Represents a pattern string Before A prefix of characters, Represents a pattern string From Location To location A substring of Calculation method of bad character table ,in, Representing characters At the rightmost occurrence in the pattern string, if the character is not in the pattern string, then , Used to check pattern string The Is the character equal to the character , calculation method of good suffix table ,in, Indicates that when the characters in the pattern string The minimum number of digits by which the pattern string is shifted right when there is no match. The minimum number of digits to shift for a good suffix of the pattern string. Represents a pattern string A substring of arrive ,in is the total length of the pattern string, Represents a pattern string A substring of arrive ; Calculate the number of movement bits of the pattern string in the bad character table and the good suffix table, select the larger number of movement bits of the two as the number of movement bits of the pattern string, and then obtain the potential matching position, and perform character-by-character matching in the potential matching position through the prefix function. If the match fails, use the prefix function value to calculate the number of movement bits of the pattern string and continue matching. If the match is successful, record the matching position and continue to look for the next match.

[0010] Preferably, the method for constructing the multi-layer virtual world is: The hierarchical structure of the multi-layer virtual world is set to include L0, L1 and L2 layers. L0 is the physical host, L1 is the management virtual machine, and L2 is the child virtual machine. The resource allocation of L1 is set to be half of that of L0. The resources include the number of CPU cores, the size of running memory and the size of storage space. G_h L2 child virtual machines are created in the management virtual machine of L1. Set the resource allocation for each child virtual machine to , , ,in, Indicates The number of CPU cores allocated to each child virtual machine. Indicates the number of CPU cores allocated to the L1 layer. Indicates The running memory size allocated to each child virtual machine, Indicates the size of the running memory allocated to the L1 layer. Indicates The amount of storage space allocated to each child virtual machine. Indicates the size of the storage space allocated to the L1 layer.

[0011] Preferably, the method of using the heuristic sandbox algorithm to perform virus detection on metadata includes: The metadata includes y_u blocks, and the data corresponding to each block is processed step by step using the heuristic sandbox algorithm; Each block is scored by heuristically analyzing the predefined rules, and the score of the ath block by the predefined rules is set to ,and ,if , the data corresponding to the block is marked as low risk, released directly, and continues to be transmitted; if , the file is marked as medium risk and requires sandbox analysis; if , the file is marked as high risk, immediately quarantined and marked as non-transferable; Sandbox analysis scores each block marked as medium risk based on behavioral characteristics, and sets the score of the bth block to ,and ,if , the data corresponding to the block is marked as safe and transmitted normally; if , the file is marked as unsafe and quarantined, deleted and alarmed; in, and , is the preset threshold; All blocks marked as low risk and safe are collected to form shadow data.

[0012] Preferably, the method of scoring each block by heuristically analyzing predefined rules comprises: Extract the data of each block and convert it into a feature vector representation ,set up It is a sample No. features, and , collect E_l groups of samples to form a training set. Each group of samples includes input and output. The input is the feature vector of the sample, and the output is the predefined rules and weights. The label of the sample is 1 or 0, 1 represents abnormal data, and 0 represents normal data; Set the decision tree as the predefined rule output model, use the training data set to train the decision tree model, use the binary cross entropy loss as the target loss function, use gradient descent to minimize the loss function, update the model parameters until the value of the target loss function is minimized and no longer changes, and then get the trained decision tree model; Determine the feature vector of the metadata and import it into the trained decision tree model to obtain J_K predefined rules and their corresponding weights, and calculate the comprehensive output score of the predefined rules , where d is the index of the predefined rule, It is represented as the weight corresponding to the dth predefined rule, Indicates the data The attribute value of a feature; Sandbox analysis scores each block marked as medium risk by behavioral characteristics, including: According to the number of CPU cores, running memory size and storage space size set in the multi-layer virtual world, different parameters are combined to simulate the dynamic environment; For the data corresponding to each block in the dynamic environment, calculate the The data of each block is in the time series Scoring of behavioral characteristics ,in, An index representing a combination of dynamic environment parameters. Indicates the number of dynamic environment parameter combinations, Indicates The weight of a combination of dynamic environment parameters, Indicates Blocks in time The labels corresponding to the above behavioral features, Indicates the amount of time, An index representing a time.

[0013] A USB disk virus isolation data transmission system, comprising: Fence processing module: used to establish an isolation zone between the USB flash drive and the target device, perform known virus detection and data integrity check on the USB flash drive data within the isolation zone, and obtain metadata; Virtual module: used to build a multi-layer virtual world and transfer metadata from the isolation zone to the multi-layer virtual world; Data analysis and processing module: Design heuristic sandbox algorithm through heuristic analysis and sandbox analysis, use the heuristic sandbox algorithm to process and analyze metadata, and obtain shadow data; Terminal transmission module: used to transmit shadow data from multi-layer virtual world to target device in one direction, completing data transmission after isolating viruses.

[0014] A USB flash drive comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a USB flash drive virus isolation data transmission method is implemented.

[0015] Compared with the prior art, the present invention has the following beneficial effects: In the present invention, by establishing an isolation zone and multiple virtual boundaries, it is ensured that the data in the USB flash drive will not directly contact the target device during the transmission process, thereby preventing the virus from directly spreading to the target device. This isolation mechanism effectively prevents the risk of the virus spreading to the target device through the USB flash drive; By performing known virus detection and data integrity checks on the data in the USB flash drive, known virus infections can be identified and processed before data transmission, and the integrity of the data can be ensured. This preprocessing step can effectively reduce the risk of virus transmission and ensure the reliability of data during transmission; by performing virus detection on metadata using the heuristic sandbox algorithm, unknown viruses can be identified and processed. The combination of heuristic analysis and sandbox analysis can simulate different operating conditions in a multi-layer virtual environment, detect potential malicious behavior, and thus improve the ability to detect unknown viruses; By using secure transmission tools such as SCP or SFTP, the detected and processed data is transmitted unidirectionally to the target device, ensuring the security and integrity of data transmission while avoiding the potential security risks caused by data backflow; by using machine learning models to determine the data block size and combining KMP and Boyer-Moore algorithms for feature string matching, the efficiency of data processing and virus detection is improved. This method can optimize the speed of data processing and resource usage while ensuring detection accuracy; Through multi-level isolation, detection and analysis mechanisms, it solves the virus propagation and data security problems that may be encountered during USB data transmission, and provides an efficient and secure USB data transmission solution. The adaptive control and optimization mechanism continuously improves the overall efficiency of intelligent analysis. Multiple modules work together to achieve comprehensive data collection, processing and analysis, provide real-time and accurate analysis of detection data, and realize the detection and analysis of abnormal data carrying viruses during USB disk isolation virus data transmission, thereby improving the security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of the steps of a method for transmitting virus-isolated data using a USB flash drive is provided in the present invention; Figure 2 It is a structural schematic diagram of the method for transmitting virus-isolated data using a USB flash drive in the present invention. DETAILED DESCRIPTION

[0017] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0018] Embodiment 1

[0019] Reference Figure 1 and Figure 2 Embodiment 1 further illustrates a method for isolating virus data from a USB flash drive proposed by the present invention.

[0020] When using USB flash drives for data transfer, especially when considering virus isolation, you may encounter USB flash drive malware infection. Some viruses hide or disguise as normal data, which may be mistaken for legitimate data during transmission and spread to other computers. Some complex malware may not exhibit malicious behavior immediately, but may be triggered under specific conditions. This makes even USB flash drives that appear to be harmless on the surface potentially a threat in the future.

[0021] USB drive malware infection refers to the situation where a USB drive is infected by malware (such as viruses, worms, Trojan horses, etc.) when connected to a computer. This infection may cause the data on the USB drive to be modified or deleted, or even make the USB drive a carrier for the spread of malware.

[0022] Malware often disguises itself as legitimate data types, such as documents, images, or executable data (such as .exe data). When the user opens this data, the malware will execute and infect the system. Some malware will exploit vulnerabilities in the data system to hide or execute malicious code. For example, by exploiting the characteristics of the NTFS data system, malware can create a malicious data folder named "$Recycle.Bin" and disguise it as a system data folder to evade the user's attention.

[0023] Some malware may encrypt the data in the USB drive, similar to the behavior of ransomware, requiring the user to pay a ransom to decrypt the data. Other malware may directly destroy the data in the USB drive, making it unrecoverable and causing data loss. Malware may tamper with the data system or boot sector of the USB drive, making the USB drive unable to be used normally, and even in some cases, the USB drive may become unreadable or unwritable. Some malware may cause the space in the USB drive to display abnormally, such as incorrect capacity display or the USB drive cannot be formatted.

[0024] Once a USB drive is infected with malware, it may attempt to infect every computer it is connected to. The malware may automatically run each time the USB drive is plugged into a computer and infect other drives or network shares on that computer. In a shared environment such as a company or school, malware infected with a USB drive may spread to multiple devices, causing a wide range of infections.

[0025] The following is a technical solution to solve the above problems, the specific contents are as follows: Step S1: Establish an isolation zone, connect the USB flash drive to the target device through the isolation zone, and use the isolation zone to pre-process the data in the USB flash drive; Fence processing module: used to establish an isolation zone between the USB flash drive and the target device, perform known virus detection and data integrity check on the USB flash drive data within the isolation zone, and obtain metadata; The isolation zone includes isolation devices (such as hardware isolation cards, isolation network gates, USB isolators, isolation gateways or isolation servers). The use of the isolation zone includes: Select an isolation device and set it between the USB drive and the target device; Configure the direction and rules of data transmission. Set the direction of data transmission to one-way transmission from the USB flash drive to the target device, and the rules of data transmission to monitoring and logging. Start the isolation device, and the data in the USB flash drive is first transferred to the isolation zone, where the data in the USB flash drive is pre-processed to preliminarily determine whether the data is safe. If the data is safe, the data continues to be transferred; otherwise, the transfer is interrupted and the connection between the isolation device and the USB flash drive is automatically disconnected; Clean up all the data in the isolation zone after use, initialize the isolation zone environment, and complete a data transmission isolation use.

[0026] By establishing an isolation zone, not only is the direct electrical connection between the USB flash drive and the target device blocked, but data is only allowed to be transmitted in one direction, such as from the USB flash drive to the isolation device, or from the isolation device to the target device. In addition, regular reviews are conducted through log records (data transmission time, data name, scan results), which facilitates analysis of any abnormal behavior or potential security threats, and enables preliminary security detection of the data in the USB flash drive.

[0027] Methods for preprocessing data in the USB flash drive include known virus detection and data integrity check; The method for detecting known viruses on the data in the USB flash drive is as follows: Creating a sample center, which includes characteristic strings in known virus samples; By analyzing known virus samples, we can extract virus-specific byte sequences or strings. These sequences or strings are usually part of the virus code and are unique and stable. We can match all virus samples with their byte sequences or strings and establish a virus sample center, which contains a large number of characteristic byte sequences or strings of known viruses. These strings are obtained through reverse engineering and analysis of virus samples.

[0028] Divide the data in the USB disk into u blocks and read them one by one to save memory, and convert the data content of each small block into a byte stream; Use a matching algorithm to search for the characteristic string of each block in the byte stream and match the characteristic string with the sample center. If the match is successful, the data of the corresponding block is determined to be infected with a virus, the location of the matching block and the identifier of the characteristic string are recorded, and isolation, deletion or repair is performed. If the match fails, it is determined that the data is not infected with a known virus and data transmission continues; Collect the data composed of blocks after the matching algorithm is processed, which is recorded as pre-data. The method for checking the data integrity of the pre-data is as follows: The data of each block is read in binary mode, and the SHA-256 algorithm is used to perform hash calculation on the read data to generate a hash value with a fixed length. , and save it; hash value It is calculated from the data after it is transmitted to the isolation zone.

[0029] Get the hash value of the original data corresponding to the data in each block , the hash value of the original data The acquisition can calculate and save the hash value of the data before the data is first generated or transmitted, and store it on a certain medium; With hash value Compare, if equal, then block The data in the data is complete and consistent with the original data content; if they are not equal, the data is blocked The data in the file may be tampered with or damaged, so it should be deleted or marked for storage; in, Indicates the isolation zone The hash value of the block data, Indicates the original data The hash value of a block of data.

[0030] In the data integrity check, it is crucial to ensure that the data content and original data have not been tampered with or damaged. Data in storage media such as USB flash drives may be affected by malware or accidental damage, so in order to ensure system security and data reliability, detailed data verification and data consistency checks are necessary. Through the above methods, it is possible to effectively identify whether the data has been maliciously modified or damaged, ensuring the data security and integrity of the system.

[0031] The method of dividing the data in the USB disk into u blocks and reading them one by one includes: Use a machine learning model to determine the block size. The machine learning model is based on a neural network or a deep learning model. Set the input of the machine learning model to the number of bytes of data, and the output to the block size. Set the constraint condition to the best balance between memory usage and I / O efficiency. Collect the number of bytes of historical data and the corresponding output block size as a sample set. Use the sample set to train the machine learning model to obtain a trained machine learning model. Input the number of bytes of the original data in the current USB flash drive into the trained machine learning model to obtain the block size, which is set to , using the current production block size Divide the data in the USB drive into small blocks; The best balance between memory usage and I / O efficiency means that when the memory usage is high, the I / O efficiency is also excellent, that is, the block size output is performed when the comprehensive performance of memory usage and I / O efficiency is optimal.

[0032] Read the data transferred from the USB flash drive to the isolation zone in binary mode, and read the data block by block through a loop structure, with a block size of until the remaining bytes are less than , then directly read all remaining data; Each time a block of data is read, the matching algorithm is used to match the characteristic string immediately. After processing, the next block is read. If the length of the characteristic string is greater than the size of the block, , then the maximum length of the characteristic string at the end of the previous block is concatenated with the beginning of the current block, and the match is performed again until all the data is completely read.

[0033] Through the above steps, the data in the USB flash drive can be effectively read and processed in blocks. Block reading can effectively reduce memory usage and improve scanning efficiency; reduce network bandwidth usage and improve transmission reliability; effectively process large data sets and avoid memory overflow; improve backup and recovery speed and reduce system resource usage.

[0034] Use a matching algorithm to search for the characteristic string of each block in the byte stream and match the characteristic string with the sample center. The specific methods include: The matching algorithm is based on the KMP algorithm and the Boyer-Moore algorithm. The bad character table and good suffix table of the Boyer-Moore algorithm are constructed for the preliminary matching stage, and the prefix function (partial matching table) of the KMP algorithm is constructed for the fine matching stage: Set the calculation method of the prefix function ,in, Represents the prefix function value, that is, the pattern string Before The length of the longest identical prefix and suffix of characters, Represents a pattern string, Indicates the current position or index, Represents the length variable, that is, the length of the prefix, Represents a pattern string Before A prefix of characters, Represents a pattern string From Location To location A substring of The Bad Character Table is used to record the rightmost position of each character in the pattern string, so that when the character does not match, the number of bits that the pattern string should be shifted can be determined. The calculation method of the bad character table is ,in, Representing characters At the rightmost occurrence in the pattern string, if the character is not in the pattern string, then , Used to check pattern string The Is the character equal to the character The Good Suffix Table is used to record the matching information of the good suffixes of the pattern string, which helps to move the pattern string more effectively when the match fails. ,in, Indicates that when the characters in the pattern string The minimum number of digits by which the pattern string is shifted right when there is no match. The minimum number of digits to shift for a good suffix of the pattern string. Represents a pattern string A substring of arrive ,in is the total length of the pattern string, Represents a pattern string A substring of arrive ; Calculate the number of movement bits of the pattern string in the bad character table and the good suffix table, select the larger number of movement bits of the two as the number of movement bits of the pattern string, and then obtain the potential matching position, and perform character-by-character matching in the potential matching position through the prefix function. If the match fails, use the prefix function value to calculate the number of movement bits of the pattern string and continue matching. If the match is successful, record the matching position and continue to look for the next match.

[0035] Combining the KMP algorithm with the Boyer-Moore algorithm for feature string matching can fully utilize the advantages of both and improve matching efficiency; the KMP algorithm preprocesses the pattern string and builds a partial matching table (also known as the "prefix function"), thereby avoiding repeated scanning during the matching process and improving matching efficiency. The Boyer-Moore algorithm scans the pattern string from right to left and uses the "bad character rule" and "good suffix rule" to jump the matching position, thereby accelerating the matching process.

[0036] Step S2: setting the pre-processed data in the USB flash drive as metadata, constructing a multi-layer virtual world, and transferring the metadata from the isolation zone to the multi-layer virtual world; Virtual module: used to build a multi-layer virtual world and transfer metadata from the isolation zone to the multi-layer virtual world; The construction method of multi-layer virtual world is as follows: The hierarchical structure of the multi-layer virtual world includes L0, L1 and L2. L0 is the physical host, L1 is the management virtual machine, and L2 is the child virtual machine. That is, L0 represents the actual physical server or computer, which is used to run the virtualization management program (Hypervisor) and is responsible for the allocation and management of virtualization resources. L1 runs on L0 and is used to manage and monitor multiple child virtual machines (L2), including operating systems and virtualization software. L2 runs on L1 and performs specific tasks, such as data processing, malware analysis, etc.

[0037] Set the resource allocation of L1 layer to half of L0 layer, including the number of CPU cores, running memory size and storage space size. Create G_h L2 layer sub-virtual machines in the management virtual machine of L1 layer. The number of G_h is set according to the task type. For example, if G_h=3, then sub-virtual machine VM1 is used for data processing and data scanning, sub-virtual machine VM2 is used for malware analysis and sandbox operation, and sub-virtual machine VM3 is used for network isolation and security testing. Set the resource allocation of each sub-virtual machine to , , ,in, Indicates The number of CPU cores allocated to each child virtual machine. Indicates the number of CPU cores allocated to the L1 layer. Indicates The running memory size allocated to each child virtual machine, Indicates the size of the running memory allocated to the L1 layer. Indicates The amount of storage space allocated to each child virtual machine. Indicates the size of the storage space allocated to the L1 layer.

[0038] The design of multi-layer virtualization involves the selection of physical hosts, the configuration of the virtualization hypervisor, the resource allocation of the management virtual machine, and the configuration and management of the child virtual machines. By properly configuring each layer, an efficient virtualization environment can be achieved to support various task requirements.

[0039] Configure automatic snapshot creation in multi-layer virtual environments, especially before performing high-risk operations (such as malware analysis). Strictly control user permissions in the L1 management VM to ensure that only authorized users can create, modify, or delete child VMs. Configure multi-factor authentication for access to management VMs and child VMs to increase security.

[0040] Enable detailed logging in the L1 layer management virtual machine to record all virtual machine startup, shutdown, snapshot creation, network activity and other operations. Use monitoring tools (such as Nagios and Zabbix) to monitor the resource usage and network activity of the virtual machine in real time to detect abnormal behavior in a timely manner. Configure the resource scheduling function of the virtualization software to dynamically adjust the allocation of CPU, memory and storage resources according to the actual needs of the child virtual machine. Set resource limits for each child virtual machine to prevent a child virtual machine from over-consuming resources and affecting the performance of other virtual machines.

[0041] Step S3: In the multi-layer virtual world, use the heuristic sandbox algorithm to perform virus detection on the metadata and obtain the shadow data; Data analysis and processing module: Design heuristic sandbox algorithm through heuristic analysis and sandbox analysis, use the heuristic sandbox algorithm to process and analyze metadata, and obtain shadow data; Methods for using heuristic sandbox algorithms to detect viruses on metadata include: The metadata includes y_u blocks, and the data corresponding to each block is processed step by step using the heuristic sandbox algorithm; Each block is scored by heuristically analyzing the predefined rules, and the score of the ath block by the predefined rules is set to ,and ,if , the data corresponding to the block is marked as low risk, released directly, and continues to be transmitted; if , the file is marked as medium risk and requires sandbox analysis; if , the file is marked as high risk, immediately quarantined and marked as non-transferable; in, and is a predefined threshold that satisfies 1, and The setting is made based on experimental data analysis or experience.

[0042] Sandbox analysis scores each block marked as medium risk based on behavioral characteristics, and sets the score of the bth block to ,and ,if , the data corresponding to the block is marked as safe and transmitted normally; if , the file is marked as unsafe and quarantined, deleted and alarmed; in, and , is the preset threshold; All blocks marked as low risk and safe are collected to form shadow data.

[0043] The heuristic sandbox algorithm, which combines heuristic analysis and sandbox analysis, can detect malicious data in USB flash drives and improve detection accuracy through a two-step process of preliminary screening and in-depth analysis. Heuristic analysis provides preliminary judgments based on predefined rules, while sandbox analysis provides in-depth security analysis through predefined behavioral features. Combining the results of these two methods, potential malicious data, i.e. viruses, can be more effectively identified and handled.

[0044] The method of scoring each block by heuristically analyzing predefined rules includes: Extract the data of each block and convert it into a feature vector representation ,set up It is a sample No. features, and , collect E_l groups of samples to form a training set. Each group of samples includes input and output. The input is the feature vector of the sample, and the output is the predefined rules and weights. The features can be file size, hash value, code snippet, and other attributes that can represent data characteristics. The label of the sample is 1 or 0. 1 represents abnormal data, that is, data containing viruses, and 0 represents normal data, that is, safe data; Set the decision tree as the predefined rule output model, use the training data set to train the decision tree model, use the binary cross entropy loss as the target loss function, use gradient descent to minimize the loss function, update the model parameters until the value of the target loss function is minimized and no longer changes, and then get the trained decision tree model; Determine the feature vector of the metadata and import it into the trained decision tree model to obtain J_K predefined rules and their corresponding weights, and calculate the comprehensive output score of the predefined rules , where d is the index of the predefined rule, It is represented as the weight corresponding to the dth predefined rule, Indicates the data The attribute value of a feature; the attribute value can be used to represent the iconic value of the feature, which can be pre-set manually or through experimental data analysis. The iconic value of the feature in the metadata is generated according to the decision tree model.

[0045] Sandbox analysis scores each block marked as medium risk by behavioral characteristics, including: According to the number of CPU cores, running memory size and storage space size set in the multi-layer virtual world, different parameters are combined to simulate the dynamic environment. Combining different parameters means that within the set limits of the number of CPU cores, running memory size and storage space size, for each item, random values ​​are taken and combined into different configurations. Sandbox analysis is run in each configuration to simulate the dynamic simulation environment.

[0046] For the data corresponding to each block in the dynamic environment, calculate the The data of each block is in the time series Scoring of behavioral characteristics ,in, An index representing a combination of dynamic environment parameters. Indicates the number of dynamic environment parameter combinations, Indicates The weight of a combination of dynamic environment parameters, Indicates Blocks in time The labels corresponding to the above behavioral features, Indicates the amount of time, An index representing time; Among them, the labels corresponding to the behavioral characteristics are identified through a machine learning model. The machine learning model is a binary classification learning model, which can be a neural network model or a deep learning model or other models that can achieve the desired effect.

[0047] Step S4: Use SCP or SFTP transmission tools to unidirectionally transfer the shadow data from the multi-layer virtual world to the target device, and extract and warn of the deleted missing blocks.

[0048] Terminal transmission module: used to transmit shadow data from multi-layer virtual world to target device in one direction, completing data transmission after isolating viruses.

[0049] When transferring shadow data from the multi-layer virtual world to the target device in one direction and confirming safety, initialize the multi-layer virtual world, that is, delete the snapshot of the virtual machine to avoid occupying too much disk space, restore to the previous snapshot or reinstall the virtual machine operating system.

[0050] After extracting and alerting the deleted missing blocks, the user re-uploads the file or performs other processing according to the prompts.

[0051] Embodiment 2

[0052] Reference Figure 1 and Figure 2 , Example 2 further illustrates a USB disk virus isolation data transmission method proposed by the present invention.

[0053] A method for transmitting virus-isolated data on a USB flash drive, comprising the following steps: Step S1: Establish an isolation zone, connect the USB flash drive to the target device through the isolation zone, and use the isolation zone to pre-process the data in the USB flash drive; Step S2: setting the pre-processed data in the USB flash drive as metadata, constructing a multi-layer virtual world, and transferring the metadata from the isolation zone to the multi-layer virtual world; Step S3: In the multi-layer virtual world, use the heuristic sandbox algorithm to perform virus detection on the metadata and obtain the shadow data; Step S4: Use SCP or SFTP transmission tools to unidirectionally transfer the shadow data from the multi-layer virtual world to the target device, and extract and warn of the deleted missing blocks.

[0054] A USB disk virus isolation data transmission system, applied to a USB disk virus isolation data transmission method, includes: Fence processing module: used to establish an isolation zone between the USB flash drive and the target device, perform known virus detection and data integrity check on the USB flash drive data within the isolation zone, and obtain metadata; Virtual module: used to build a multi-layer virtual world and transfer metadata from the isolation zone to the multi-layer virtual world; Data analysis and processing module: Design heuristic sandbox algorithm through heuristic analysis and sandbox analysis, use the heuristic sandbox algorithm to process and analyze metadata, and obtain shadow data; Terminal transmission module: used to transmit shadow data from multi-layer virtual world to target device in one direction, completing data transmission after isolating viruses; The modules are connected to each other via wired and / or wireless means.

[0055] In addition, according to the implementation of the present application, the process described in the attached figure of a method for transmitting virus data by isolating a USB flash drive can be implemented as a computer software program. For example, the present application provides a non-transitory machine-readable storage medium, which stores machine-readable instructions, and the machine-readable instructions can be executed by a processor to execute instructions corresponding to the method steps provided by the present application. Of course, the architecture shown in the attached figure of a method for transmitting virus data by isolating a USB flash drive is only exemplary. When implementing different devices, adaptive selection or adjustment can be made according to actual needs.

[0056] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.

[0057] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A method for transmitting virus-isolated data on a USB flash drive, characterized in that: The USB disk virus isolation data transmission method comprises: Step S1: Establish an isolation zone, connect the USB flash drive to the target device through the isolation zone, and use the isolation zone to pre-process the data in the USB flash drive; Step S2: setting the pre-processed data in the USB flash drive as metadata, constructing a multi-layer virtual world, and transferring the metadata from the isolation zone to the multi-layer virtual world; Step S3: In the multi-layer virtual world, use the heuristic sandbox algorithm to perform virus detection on the metadata and obtain the shadow data; Step S4: Use SCP or SFTP transmission tools to unidirectionally transfer the shadow data from the multi-layer virtual world to the target device, and extract and warn of the deleted missing blocks.

2. The USB disk virus isolation data transmission method according to claim 1, characterized in that: The isolation belt includes isolation equipment, and the method for using the isolation belt includes: Select an isolation device and set it between the USB drive and the target device; Configure the direction and rules of data transmission. Set the direction of data transmission to one-way transmission from the USB flash drive to the target device, and the rules of data transmission to monitoring and logging. Start the isolation device, and the data in the USB flash drive is first transferred to the isolation zone, where the data in the USB flash drive is pre-processed to preliminarily determine whether the data is safe. If the data is safe, the data continues to be transferred; otherwise, the transfer is interrupted and the connection between the isolation device and the USB flash drive is automatically disconnected; Clean up all the data in the isolation zone after use, initialize the isolation zone environment, and complete a data transmission isolation use.

3. The USB disk virus isolation data transmission method according to claim 2, characterized in that: The method for preprocessing the data in the USB flash drive includes known virus detection and data integrity check; The method for detecting known viruses on the data in the USB flash drive is as follows: Creating a sample center, which includes characteristic strings in known virus samples; Divide the data in the USB flash drive into u blocks, read them one by one, and convert the data content of each small block into a byte stream; Use a matching algorithm to search for the characteristic string of each block in the byte stream and match the characteristic string with the sample center. If the match is successful, the data of the corresponding block is determined to be infected with a virus, the location of the matching block and the identifier of the characteristic string are recorded, and isolation, deletion or repair is performed. If the match fails, it is determined that the data is not infected with a known virus and data transmission continues; Collect the data composed of blocks after the matching algorithm is processed, which is recorded as pre-data. The method for checking the data integrity of the pre-data is as follows: The data of each block is read in binary mode, and the SHA-256 algorithm is used to perform hash calculation on the read data to generate a hash value with a fixed length. , and save it; Get the hash value of the original data corresponding to the data in each block , the hash value With hash value Compare, if equal, then block The data in the data is complete and consistent with the original data content; if they are not equal, the data is blocked The data in the file may be tampered with or damaged, so it should be deleted or marked for storage; in, Indicates the isolation zone The hash value of the block data, Indicates the original data The hash value of a block of data.

4. The USB disk virus isolation data transmission method according to claim 3 is characterized in that: The method of dividing the data in the USB disk into u blocks and reading them one by one includes: Use a machine learning model to determine the block size. The machine learning model is based on a neural network or a deep learning model. Set the input of the machine learning model to the number of bytes of data, and the output to the block size. Set the constraint condition to the best balance between memory usage and I / O efficiency. Collect the number of bytes of historical data and the corresponding output block size as a sample set. Use the sample set to train the machine learning model to obtain a trained machine learning model. Input the number of bytes of the original data in the current USB flash drive into the trained machine learning model to obtain the block size, which is set to , using the current production block size Divide the data in the USB disk into small blocks; Read the data transferred from the USB flash drive to the isolation zone in binary mode, and read the data block by block through a loop structure, with a block size of until the remaining number of bytes is less than , then directly read all remaining data; Each time a block of data is read, the matching algorithm is used to match the characteristic string immediately. After processing, the next block is read. If the length of the characteristic string is greater than the size of the block, , then the maximum length of the characteristic string at the end of the previous block is concatenated with the beginning of the current block, and the match is performed again until all the data is completely read.

5. The USB disk virus isolation data transmission method according to claim 4, characterized in that: The matching algorithm is used to search for the characteristic string of each block in the byte stream and match the characteristic string with the sample center. The specific method includes: The matching algorithm is based on the KMP algorithm and the Boyer-Moore algorithm. The bad character table and good suffix table of the Boyer-Moore algorithm are constructed for the preliminary matching stage, and the prefix function of the KMP algorithm is constructed for the fine matching stage: Set the calculation method of the prefix function ,in, Represents the prefix function value, that is, the pattern string Before The length of the longest identical prefix and suffix of characters, Represents a pattern string, Indicates the current position or index, Represents the length variable, that is, the length of the prefix, Represents a pattern string Before A prefix of characters, Represents a pattern string From Location To location A substring of Calculation method of bad character table ,in, Representing characters At the rightmost occurrence in the pattern string, if the character is not in the pattern string, then , Used to check pattern string The Is the character equal to the character , calculation method of good suffix table ,in, Indicates that when the characters in the pattern string The minimum number of digits by which the pattern string is shifted right when there is no match. The minimum number of digits to shift for a good suffix of the pattern string. Represents a pattern string A substring of arrive ,in is the total length of the pattern string, Represents a pattern string A substring of arrive ; Calculate the number of movement bits of the pattern string in the bad character table and the good suffix table, select the larger number of movement bits of the two as the number of movement bits of the pattern string, and then obtain the potential matching position, and perform character-by-character matching in the potential matching position through the prefix function. If the match fails, use the prefix function value to calculate the number of movement bits of the pattern string and continue matching. If the match is successful, record the matching position and continue to look for the next match.

6. The USB disk virus isolation data transmission method according to claim 5, characterized in that: The method for constructing the multi-layer virtual world is: The hierarchical structure of the multi-layer virtual world is set to include L0, L1 and L2 layers. L0 is the physical host, L1 is the management virtual machine, and L2 is the child virtual machine. The resource allocation of L1 is set to be half of that of L0. The resources include the number of CPU cores, the size of running memory and the size of storage space. G_h L2 child virtual machines are created in the management virtual machine of L1. Set the resource allocation for each child virtual machine to , , ,in, Indicates The number of CPU cores allocated to each child virtual machine. Indicates the number of CPU cores allocated to the L1 layer. Indicates The running memory size allocated to each child virtual machine, Indicates the size of the running memory allocated to the L1 layer. Indicates The amount of storage space allocated to each child virtual machine. Indicates the size of the storage space allocated to the L1 layer.

7. The USB disk virus isolation data transmission method according to claim 6, characterized in that: The method for using the heuristic sandbox algorithm to perform virus detection on metadata includes: The metadata includes y_u blocks, and the data corresponding to each block is processed step by step using the heuristic sandbox algorithm; Each block is scored by heuristically analyzing the predefined rules, and the score of the ath block by the predefined rules is set to ,and ,if , the data corresponding to the block is marked as low risk, released directly, and continues to be transmitted; if , the file is marked as medium risk and requires sandbox analysis; if , the file is marked as high risk, immediately quarantined and marked as non-transferable; Sandbox analysis scores each block marked as medium risk based on behavioral characteristics, and sets the score of the bth block to ,and ,if , the data corresponding to the block is marked as safe and transmitted normally; if , the file is marked as unsafe and quarantined, deleted and alarmed; in, and , is the preset threshold; All blocks marked as low risk and safe are collected to form shadow data.

8. The USB disk virus isolation data transmission method according to claim 7, characterized in that: The method of scoring each block by heuristically analyzing predefined rules includes: Extract the data of each block and convert it into a feature vector representation ,set up It is a sample No. features, and , collect E_l groups of samples to form a training set. Each group of samples includes input and output. The input is the feature vector of the sample, and the output is the predefined rules and weights. The label of the sample is 1 or 0, 1 represents abnormal data, and 0 represents normal data; Set the decision tree as the predefined rule output model, use the training data set to train the decision tree model, use the binary cross entropy loss as the target loss function, use gradient descent to minimize the loss function, update the model parameters until the value of the target loss function is minimized and no longer changes, and then get the trained decision tree model; Determine the feature vector of the metadata and import it into the trained decision tree model to obtain J_K predefined rules and their corresponding weights, and calculate the comprehensive output score of the predefined rules , where d is the index of the predefined rule, It is represented as the weight corresponding to the dth predefined rule, Indicates the data The attribute value of a feature; Sandbox analysis scores each block marked as medium risk by behavioral characteristics, including: According to the number of CPU cores, running memory size and storage space size set in the multi-layer virtual world, different parameters are combined to simulate the dynamic environment; For the data corresponding to each block in the dynamic environment, calculate the The data of each block is in the time series Scoring of behavioral characteristics ,in, An index representing a combination of dynamic environment parameters. Indicates the number of dynamic environment parameter combinations, Indicates The weight of a combination of dynamic environment parameters, Indicates Blocks in time The labels corresponding to the above behavioral features, Indicates the amount of time, An index representing a time.

9. A USB disk virus isolation data transmission system, used to implement the USB disk virus isolation data transmission method according to any one of claims 1 to 8, characterized in that: include: Fence processing module: used to establish an isolation zone between the USB flash drive and the target device, perform known virus detection and data integrity check on the USB flash drive data within the isolation zone, and obtain metadata; Virtual module: used to build a multi-layer virtual world and transfer metadata from the isolation zone to the multi-layer virtual world; Data analysis and processing module: Design heuristic sandbox algorithm through heuristic analysis and sandbox analysis, use the heuristic sandbox algorithm to process and analyze metadata, and obtain shadow data; Terminal transmission module: used to transmit shadow data from multi-layer virtual world to target device in one direction, completing data transmission after isolating viruses.

10. A USB flash drive comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the USB flash drive virus isolation data transmission method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • USB flash disk security access method based on storage data block management and control

    CN117951761A

  • Portable media system with virus blocker and method of operation thereof

    US20100313271A1