Access control method, device, storage medium and equipment based on traffic data
Through the access control method based on traffic data, the security model is used to judge and intercept access requests of HTTP/HTTPS traffic ports, the problem of modifying port settings after firewall installation is solved, and malicious access can be intercepted without modifying the port, reducing workload and improve compatibility and security.
Patent Information
- Application Number
- CN202111056404.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-09
- Publication Date
- 2024-11-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
After installation, existing firewalls need to adaptively modify the settings of the WEB server port to match the provided services in order to intercept malicious access, resulting in an increase in workload for workers.
Through the access control method based on traffic data, the security model is determined, the access request of the HTTP/HTTPS traffic port is received, and the security model is used to determine whether the request is a normal access request. If it is not normal, it is intercepted, including parsing the request parameters, deleting attack characters and Generate security models to reduce noise interference and improve detection accuracy.
No need to modify the WEB server port settings to intercept malicious access, reduce workload and improve compatibility, and enhance detection accuracy and security.
Smart Images

Figure CN113949528B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an access control method, device, storage medium and equipment based on traffic data. Background Art
[0002] With the development of the times, computer technology has penetrated into every aspect of people's lives, and the competition in the Internet industry has become increasingly fierce. While some institutions and departments benefit from the Internet to speed up business operations, their online data has also been attacked and damaged to varying degrees. Therefore, it is necessary to use firewalls to provide special protection for online data to prevent it from being obtained by attackers. However, after the installation of the existing firewall, it is also necessary to adaptively modify the settings of the WEB server port to match the port with the service provided in order to intercept malicious access, which will increase the workload of the staff. Summary of the invention
[0003] In view of this, the embodiments of the present invention provide an access control method, apparatus, storage medium and device based on traffic data, which mainly solves the problem that after the existing firewall is installed, it is necessary to adaptively modify the settings of the WEB server port so that the port matches the service provided in order to intercept malicious access, which will increase the workload of the staff.
[0004] In a first aspect, an embodiment of the present invention provides an access control method based on traffic data, comprising:
[0005] Determine the security model;
[0006] HTTP / HTTPS traffic port for connecting to WEB applications;
[0007] When an access request is received through the HTTP / HTTPS traffic port, the security model is used to determine whether the access request is a normal access request; if the access request is not a normal access request, the access request is intercepted.
[0008] In a possible manner, the using the security model to determine whether the access request is a normal access request includes:
[0009] According to the access request, parsing and obtaining request parameters carried in the access request;
[0010] The request parameter is matched with the normal access data in the security model. If the match succeeds, it is determined that the access request is a normal access request. If the match fails, it is determined that the access request is not a normal access request.
[0011] In one possible embodiment, the method further includes:
[0012] Get dynamic parameters;
[0013] The security model is used to determine whether the dynamic parameter contains an attacking character. If the dynamic parameter contains an attacking character, the attacking character is deleted or an alarm message is issued.
[0014] In one possible embodiment, the method further includes:
[0015] Get a valid URL;
[0016] The legal URL is marked.
[0017] In one possible manner, determining the security model includes:
[0018] Get traffic sample data;
[0019] Based on the traffic sample data, extracting Http / Https protocol traffic data;
[0020] Supervised learning and unsupervised learning are performed on the Http / Https protocol traffic data to generate a security model.
[0021] In a possible manner, the performing supervised learning and unsupervised learning on the Http / Https protocol traffic data to generate a security model includes:
[0022] When performing unsupervised learning, the Http / Https protocol traffic data is classified;
[0023] Use PCA algorithm to reduce the dimension of the classified data;
[0024] Adjust the data after dimensionality reduction to obtain normal access data and attack access data;
[0025] When conducting supervised learning, obtain calibrated business sample data and attack sample data;
[0026] Using the LDA algorithm to reduce the dimension of the calibrated business sample data and attack sample data to obtain reduced-dimensional data;
[0027] Based on the data after dimensionality reduction, the normal access data and attack access data are optimized to obtain a security model.
[0028] In a possible manner, before the dimensionality reduction processing and adjustment of the classified data, the following steps are further included:
[0029] The classified data are preprocessed, and the preprocessing includes linear transformation, and removal of noise and redundant data.
[0030] In a second aspect, an embodiment of the present invention provides an access control device, including:
[0031] A determination module, used for determining a security model;
[0032] The connection module is used to connect to the HTTP / HTTPS traffic port of the WEB application;
[0033] The judgment module is used to, when receiving an access request, use the security model to judge whether the access request is a normal access request; if the access request is not a normal access request, intercept the access request.
[0034] In a third aspect, an embodiment of the present invention provides a storage medium, wherein the storage medium stores at least one executable instruction, and the executable instruction enables a processor to execute operations corresponding to the traffic data-based access control method of any of the above-mentioned schemes.
[0035] In a fourth aspect, an embodiment of the present invention provides an electronic device, characterized in that it includes: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus;
[0036] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the traffic data-based access control method of any of the above solutions.
[0037] According to an access control method, apparatus, storage medium and device based on traffic data provided by an embodiment of the present invention, after the method is connected to the HTTP / HTTPS traffic port of the WEB application, it can receive access requests through the HTTP / HTTPS traffic port without modifying the settings of the WEB server port, thereby reducing the workload of the staff and improving compatibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The following drawings of the present invention are used as part of the embodiments of the present invention for understanding the present invention. The embodiments of the present invention are shown in the drawings and the description thereof is used to explain the principle of the present invention.
[0039] In the attached figure:
[0040] Figure 1 A flowchart of an access control method based on traffic data according to an optional embodiment of the present invention;
[0041] Figure 2 is a flowchart of step S101 according to an optional embodiment of the present invention;
[0042] Figure 3 is a flowchart of step S203 according to an optional embodiment of the present invention;
[0043] Figure 4 is a flowchart of step S103 according to an optional embodiment of the present invention;
[0044] Figure 5 is a flow chart of an access control method based on traffic data according to another optional embodiment of the present invention;
[0045] Figure 6 A flowchart of an access control method based on traffic data according to another optional embodiment of the present invention;
[0046] Figure 7 FIG. 4 is a schematic diagram of the structure of an access control device according to an optional embodiment of the present invention. DETAILED DESCRIPTION
[0047] In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is apparent to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features well known in the art are not described.
[0048] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should also be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of the features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0049] Now, exemplary embodiments according to the present invention will be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in a variety of different forms and should not be interpreted as being limited to the embodiments set forth herein. It should be understood that these embodiments are provided to make the disclosure of the present invention thorough and complete, and to fully convey the concept of these exemplary embodiments to those of ordinary skill in the art.
[0050] In a first aspect, an embodiment of the present invention provides an access control method based on traffic data, and the execution subject of the method can be a network device or server in the network, or a module or chip integrated in the network device or server. Specifically, Figure 1 As shown, a method for access control based on traffic data includes:
[0051] Step S101: Determine the security model.
[0052] Step S102: Connect to the HTTP / HTTPS traffic port of the WEB application.
[0053] In this step, after installing the interception software, you only need to connect to the HTTP / HTTPS traffic port of the WEB application without modifying the settings of the original WEB server port. This improves the compatibility of the interception software and reduces the workload of staff.
[0054] Step S103: When an access request is received through the HTTP / HTTPS traffic port, the security model is used to determine whether the access request is a normal access request; if the access request is not a normal access request, step S104 is executed.
[0055] Step S104: intercepting the access request.
[0056] The security model is used to determine whether the access request is a normal access request. If the access request is a normal access request, the access can be performed normally; if the access request is not a normal access request, it is intercepted to protect the data to be accessed.
[0057] This embodiment provides an access control method based on traffic data. After the method is connected to the HTTP / HTTPS traffic port of the WEB application, it can receive access requests through the HTTP / HTTPS traffic port without modifying the settings of the WEB server port. This not only reduces the workload of the staff but also improves compatibility.
[0058] Specifically, Figure 2 As shown, step S101 in the above embodiment includes the following steps:
[0059] Step S201: Obtain traffic sample data.
[0060] The flow sample data may be information related to the flow of traffic flowing through a certain network element in the existing network architecture, such as a radio network controller (Radio Network Controller, RNC), a serving GPRS support node (Serving GPRS Support Node, SGSN), and a gateway GPRS support node (Gateway GPRS Support Node GGSN). The flow sample data may be obtained by the above-mentioned execution subject periodically collecting data from the network element, that is, obtaining the flow within a preset time period to form the flow sample data.
[0061] Step S202: extracting Http / Https protocol traffic data based on the traffic sample data.
[0062] Among them, Http / Https protocol traffic data includes http header information and payload information of access requests and responses, including but not limited to packet header parameters and parameter values, time, event classification, request and response context, source and destination information.
[0063] Step S203: Perform supervised learning and unsupervised learning on the Http / Https protocol traffic data to generate a security model.
[0064] Unsupervised learning and supervised learning are a training method / learning method in machine learning. Among them, unsupervised learning is a training method for machine learning. It is essentially a statistical method that can discover potential structures in unlabeled data.
[0065] Supervised learning refers to the process of training a model by letting the machine learn a large amount of labeled sample data, so that the model can get the corresponding output according to the input. Through the correspondence between the existing part of the input data and the output data, a function is generated to map the output to the appropriate output, such as classification.
[0066] The security model is obtained through unsupervised and supervised learning based on traffic sample data, making it more sensitive to access request detection, thereby improving detection accuracy and data security, and does not require the configuration of a feature library, thus avoiding frequent upgrades and updates to the feature library.
[0067] Specifically, Figure 3 As shown, step S203 in the above embodiment includes:
[0068] Step S301: When performing unsupervised learning, classify the Http / Https protocol traffic data.
[0069] In this step, the Http / Https protocol traffic data is firstly upgraded and then classified.
[0070] Step S302: preprocessing the classified data, including linear transformation, and removing noise and redundant data.
[0071] Perform linear transformation on the classified data and remove noise and redundant data, thereby reducing the interference of redundant data and noise and reducing the amount of computation required for subsequent processing.
[0072] Step S303: Use the PCA algorithm to perform dimensionality reduction processing on the classified data.
[0073] Among them, PCA, namely principal component analysis, also known as principal component analysis, aims to use the idea of dimensionality reduction to transform multiple indicators into a few comprehensive indicators. In statistics, principal component analysis PCA is a technique for simplifying data sets, which is a linear transformation. This transformation transforms the data into a new coordinate system so that the first largest variance of any data projection is on the first coordinate (called the first principal component), the second largest variance is on the second coordinate (the second principal component), and so on. Principal component analysis is often used to reduce the dimensionality of a data set while retaining the features of the data set that contribute the most to the variance. In this step, the PCA algorithm is used to project high-dimensional data to low latitudes.
[0074] Step S304: Adjust the data after dimensionality reduction to obtain normal access data and attack access data.
[0075] Step S305: When performing supervised learning, obtain calibrated business sample data and attack sample data.
[0076] Step S306: Use the LDA algorithm to perform dimension reduction processing on the calibrated business sample data and attack sample data to obtain dimension-reduced data.
[0077] Among them, the LDA algorithm is a method of projecting into a space with lower dimensionality so that the projected points are classified into clusters, and points of the same category are closer in the projected space.
[0078] Step S307: Based on the data after dimensionality reduction, the normal access data and the attack access data are optimized to obtain a security model.
[0079] In this embodiment, supervised learning is used to optimize the normal access data and attack access data obtained by unsupervised learning, so that the normal access data and attack access data are more accurate, thereby improving the accuracy of the security model.
[0080] Specifically, Figure 4 As shown, step S103 in the above embodiment specifically includes:
[0081] Step S401: according to the access request, parse and obtain the request parameters carried in the access request.
[0082] The request parameters include but are not limited to packet header parameters and parameter values, time, event classification, request and response context, source and destination information.
[0083] Step S402: Match the request parameters with normal access data in the security model.
[0084] Step S403a: If the match is successful, it is determined that the access request is a normal access request.
[0085] Step S403b: If the match fails, it is determined that the access request is not a normal access request.
[0086] The request parameters are matched with the normal access data in the security model, and the access requests that are successfully matched are determined to be normal access requests, and the access requests that fail to match are determined not to be normal access requests, that is, they are determined to be access requests of malicious attacks. This method of matching the request parameters with normal access data to determine whether it is a normal access is more accurate in detection than matching with attack access data in the prior art.
[0087] In other embodiments, Figure 5 As shown, the method also includes:
[0088] Step S501: Acquire dynamic parameters, where the dynamic parameters are parameters input by the visitor.
[0089] Step S502: using the security model to determine whether the dynamic parameter contains attacking characters, if the dynamic parameter contains attacking characters, the attacking characters are deleted or an alarm message is issued.
[0090] Specifically, the dynamic parameters are matched with the normal access data in the security model. If some characters in the dynamic parameters do not match the normal access data, it is determined that the dynamic parameters contain attack characters, and the unmatched characters are determined to be attack characters. The attack characters are then deleted to ensure that the content after submission will not form a cross-site scripting attack, further improving the security of access.
[0091] In some practicable manners, after the attacking character is determined, the attacking character is not deleted, but an alarm message is sent to an administrator, who then determines whether to delete the character, so as to improve the accuracy of the attacking character determination.
[0092] In some other embodiments, Figure 6 As shown, the method also includes:
[0093] Step S601: Obtain a legal URL.
[0094] The process of determining a legal URL is as follows: matching the URL with normal access data in the security model, and if the match succeeds, determining that the URL is a legal URL.
[0095] Step S602: Mark the legal URL.
[0096] After the legal URL is marked, the legal URL can be distinguished from other URLs, thereby facilitating identification of whether the URL is legal.
[0097] Second, as Figure 7 As shown, an embodiment of the present invention provides an access control device, including:
[0098] Determination module 701, used to determine the security model;
[0099] A connection module 702 is used to connect to the HTTP / HTTPS traffic port of the WEB application;
[0100] The judgment module 703 is used to determine whether an access request is a normal access request by using the security model when an access request is received through the HTTP / HTTPS traffic port; if the access request is not a normal access request, the access request is intercepted.
[0101] According to an access control device provided by an embodiment of the present invention, after the device is connected to the HTTP / HTTPS traffic port of the WEB application, it can receive access requests through the HTTP / HTTPS traffic port without modifying the settings of the WEB server port. This not only reduces the workload of the staff but also improves compatibility.
[0102] In a third aspect, an embodiment of the present invention provides a storage medium, in which at least one executable instruction is stored, and the executable instruction enables a processor to execute operations corresponding to the traffic data-based access control method of any of the above-mentioned schemes.
[0103] In a fourth aspect, an embodiment of the present invention provides an electronic device, characterized in that it includes: a processor, a memory, a communication interface and a communication bus, and the processor, the memory and the communication interface communicate with each other through the communication bus;
[0104] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the access control method based on traffic data in any of the above solutions.
[0105] Specifically, the program may include program codes including computer operation instructions.
[0106] The processor may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured as an embodiment of the present invention. The one or more processors included in the computer device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0107] The memory is used to store programs. The memory may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0108] The present invention has been described by the above embodiments, but it should be understood that the above embodiments are only for the purpose of example and description, and are not intended to limit the present invention to the scope of the described embodiments. In addition, it can be understood by those skilled in the art that the present invention is not limited to the above embodiments, and more variations and modifications can be made according to the teachings of the present invention, and these variations and modifications all fall within the scope of the protection claimed by the present invention. The protection scope of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for access control based on traffic data, characterized in that: include: Determine the security model; HTTP / HTTPS traffic port for connecting to WEB applications; When an access request is received through the HTTP / HTTPS traffic port, determining whether the access request is a normal access request using the security model; If the access request is not a normal access request, intercepting the access request, wherein the setting of the HTTP / HTTPS traffic port remains unchanged; Determining the security model includes: Get traffic sample data; Based on the traffic sample data, extracting Http / Https protocol traffic data; Perform supervised learning and unsupervised learning on the Http / Https protocol traffic data to generate a security model; The step of performing supervised learning and unsupervised learning on the Http / Https protocol traffic data to generate a security model includes: When performing unsupervised learning, the Http / Https protocol traffic data is classified. Specifically, the Http / Https protocol traffic data is subjected to dimensionality-upgrading processing and then subjected to classification processing; Use PCA algorithm to reduce the dimension of the classified data; Adjust the data after dimensionality reduction to obtain normal access data and attack access data; When conducting supervised learning, obtain calibrated business sample data and attack sample data; Using the LDA algorithm to reduce the dimension of the calibrated business sample data and attack sample data to obtain reduced-dimensional data; Based on the data after dimensionality reduction, the normal access data and attack access data are optimized to obtain a security model.
2. The method according to claim 1, characterized in that The using the security model to determine whether the access request is a normal access request includes: According to the access request, parsing and obtaining request parameters carried in the access request; The request parameter is matched with the normal access data in the security model. If the match succeeds, it is determined that the access request is a normal access request. If the match fails, it is determined that the access request is not a normal access request.
3. The method according to claim 1, characterized in that The method further comprises: Get dynamic parameters; The security model is used to determine whether the dynamic parameter contains an attacking character. If the dynamic parameter contains an attacking character, the attacking character is deleted or an alarm message is issued.
4. The method according to claim 3, characterized in that The method further comprises: Get a valid URL; The legal URL is marked.
5. The method according to claim 1, characterized in that Before the dimensionality reduction processing and adjustment of the classified data, the following steps are also included: The classified data are preprocessed, and the preprocessing includes linear transformation, and removal of noise and redundant data.
6. An access control device, characterized in that: include: A determination module, used for determining a security model; The connection module is used to connect to the HTTP / HTTPS traffic port of the WEB application; a judgment module, configured to, when receiving an access request through the HTTP / HTTPS traffic port, use the security model to judge whether the access request is a normal access request; if the access request is not a normal access request, intercept the access request, wherein the setting of the HTTP / HTTPS traffic port remains unchanged; The determination module is specifically used to obtain flow sample data; Based on the traffic sample data, extracting Http / Https protocol traffic data; Perform supervised learning and unsupervised learning on the Http / Https protocol traffic data to generate a security model; The determination module is specifically used to classify the Http / Https protocol traffic data when performing unsupervised learning. Specifically, the Http / Https protocol traffic data is subjected to dimensionality-upgrading processing and then subjected to classification processing; Use PCA algorithm to reduce the dimension of the classified data; Adjust the data after dimensionality reduction to obtain normal access data and attack access data; When conducting supervised learning, obtain calibrated business sample data and attack sample data; Using the LDA algorithm to reduce the dimension of the calibrated business sample data and attack sample data to obtain reduced-dimensional data; Based on the data after dimensionality reduction, the normal access data and attack access data are optimized to obtain a security model.
7. A storage medium, characterized in that: The storage medium stores at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the access control method based on traffic data as described in any one of claims 1-5.
8. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the access control method based on traffic data as described in any one of claims 1-5.
