Data flow warning method, device, electronic device and storage medium
By clustering, merging and security reviewing the data packets of the data server and business server, a summary data packet is generated, which solves the problem of insufficient supervision of core data access records in the existing technology and realizes rapid monitoring and early warning of the security of data calls. , ensure data security.
Patent Information
- Application Number
- CN202311769122.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2043-12-20
AI Technical Summary
Existing technologies are difficult to effectively monitor and warn against access records and usage of core data, resulting in the protection system failing to issue timely alerts when data is leaked or abused, which may lead to catastrophic consequences.
By clustering, merging and security reviewing the data packets in the data server, a summary data packet is generated and stored in the summary database. Based on the calling relationship, the called data packet is determined and stored in the calling database. When the data package is updated, an early warning review and judgment are performed. Check whether the newly emerged execution operation statements, access IPs and business function types exist in the database. If they do not exist, an early warning review will be carried out.
It can quickly monitor whether data calls are safe and compliant, detect unauthorized or illegal behaviors in a timely manner, and ensure the security of data in data servers and business servers.
Smart Images

Figure CN117610078B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data tracking technology, and in particular to a data flow early warning method, device, electronic device, computer-readable storage medium and computer program product. Background Art
[0002] With the explosive growth of data, more and more companies are aware of the importance of data and monitor and manage data as data assets. In particular, core data needs to be tracked throughout its life cycle to ensure that it is not stolen or abused by lawbreakers. By effectively tracking and managing data, the interests of enterprises and users can be protected from infringement and data security and compliance can be promoted.
[0003] Enterprises take corresponding measures in data access, authority management, data encryption and network security to protect the database in an all-round way. However, the access records and usage of core data are not effectively supervised. For example, when the core data is leaked by hackers, or when the internal employees or partners of the enterprise access the core data in an unauthorized or illegal manner, the protection system does not issue an alarm in time. Core data involves the important interests of enterprises or users. Once these core data are leaked or abused, it may cause catastrophic consequences. Summary of the invention
[0004] In view of this, embodiments of the present application provide a method, device, electronic device, computer-readable storage medium and computer program product for data flow warning, which are used to solve at least one technical problem.
[0005] An embodiment of the present application provides a method for data flow warning, including: clustering and merging data packets in a data server and conducting a security review to obtain one or more first summary data packets and storing them in a summary database, wherein the format of the summary data packet includes: a summary execution operation statement and a summary access IP; determining one or more first called data packets based on the first summary data packet and a business server that has a calling relationship with the first summary data packet; storing the first called data packet in a calling database after a security review, wherein the format of the first called data packet includes: a business function type and an access IP; when a data packet in the data server is updated, clustering and merging the data packets in the data server to obtain one or more second summary data packets; if one or more of the second summary data packets do not exist in the summary database or one or more second called data packets obtained based on the second summary data packet do not exist in the calling database, performing a warning review.
[0006] The method as described above also includes: if the summary execution operation statement and / or summary access IP in the second summary data packet does not exist in the summary database, determining that there is a new execution operation statement and / or a new call source; and performing a warning review on the new execution operation statement and / or the new call source.
[0007] The method as described above also includes: if the second summary data packet exists in the summary database, determining a business server with a calling relationship based on the second summary data packet; determining one or more second called data packets based on the second summary data packet and the business server; if the second called data packet does not exist in the calling database, performing an early warning review.
[0008] The method as described above further includes: if the service function type in the second called data packet does not exist in the calling database, determining that a new service function type exists; and performing a warning review on the new service function type.
[0009] The method as described above also includes: if the access IP in the second called data packet is an intranet IP and the access IP does not exist in the call database, determining that there is a new call source in the business front end; and performing a warning review on the new call source.
[0010] As described above, the format of the summary data packet also includes: a business server account. If the business server account in the second summary data packet does not exist in the summary database, it is determined that a new access account exists; and a warning review is performed on the new access account.
[0011] The method as described above also includes: obtaining a development and design document; determining whether the information in the second summary data packet and / or the second called data packet matches the information in the development and design document; if the match is successful, reviewing whether the matched development and design document is safe; if the match is unsuccessful, issuing an early warning reminder.
[0012] The method as described above also includes: filtering out multiple data packets based on the access IP of the data packet in the data server and one or more of the statement type, target field, target data table and field name in the query condition; and merging the multiple data packets into a first summary data packet after removing the parameter values of the fields in the query condition.
[0013] The method as described above also includes: obtaining source code in a business server that has a calling relationship with the first summary data packet; retrieving a background program file in the source code according to keywords in the summary execution operation statement in the first summary data packet; parsing the background program file to obtain a function that calls the summary execution operation statement; obtaining a source code request address according to the function that calls the summary execution operation statement; parsing the mirrored traffic from the business server to obtain a calling request address; matching the source code request address with the calling request address to determine one or more first called data packets.
[0014] In the method described above, the business function types include data usage and data change, and the data change type includes data collection, change and destruction.
[0015] According to another aspect of the present application, a data flow warning device is proposed, including: a summary database building module, used to cluster and merge the data packets in the data server and perform security review to obtain one or more first summary data packets and store them in the summary database, the format of the summary data packet includes: summary execution operation statement and summary access IP; a first called data packet determination module, used to determine one or more first called data packets based on the first summary data packet and the business server that has a calling relationship with the first summary data packet; a calling database building module, used to store the first called data packet in the calling database after security review, the format of the first called data packet includes: business function type and access IP; a monitoring module, used to cluster and merge the data packets in the data server to obtain one or more second summary data packets when the data packets in the data server are updated; an early warning module, used to perform an early warning review if one or more of the second summary data packets do not exist in the summary database or one or more second called data packets obtained based on the second summary data packet do not exist in the calling database.
[0016] The data flow warning device as described above also includes: a first judgment module, used to determine the existence of new execution operation statements and / or new call sources if the summary execution operation statements and / or summary access IP in the second summary data packet do not exist in the summary database; a first warning module, used to perform a warning review on the new execution operation statements and / or new call sources.
[0017] The data flow warning device as described above also includes: a second judgment module, which is used to determine the business server with a calling relationship based on the second summary data packet if the second summary data packet exists in the summary database; a second called data packet determination module, which is used to determine one or more second called data packets based on the second summary data packet and the business server; and a second warning module, which is used to perform a warning review if the second called data packet does not exist in the calling database.
[0018] As described above, the second warning module of the data flow warning device includes: a first judgment unit, used to determine the existence of a new business function type if the business function type in the second called data packet does not exist in the calling database; and a first warning unit, used to perform a warning review on the new business function type.
[0019] As for the data flow warning device as described above, the second warning module also includes: a second judgment unit, used to determine that there is a new calling source at the business front end if the access IP in the second called data packet is an intranet IP and the access IP does not exist in the calling database; a second warning unit, used to perform a warning review on the new calling source.
[0020] The data flow warning device as described above also includes: a development document acquisition module, used to acquire development design documents; a matching module, used to determine whether the information in the second summary data packet and / or the second called data packet matches the information in the development design document; a review module, used to review the security of the matched development design document if the match is successful; and a warning reminder module, used to issue a warning reminder if the match is unsuccessful.
[0021] According to another aspect of the present application, an electronic device is provided, comprising: a processor and a memory storing computer program instructions; when the electronic device executes the computer program instructions, the method described above is implemented.
[0022] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method described above is implemented.
[0023] An embodiment of the present application provides a computer program product, wherein the computer program product includes computer program instructions, and when the computer program instructions are executed by a processor, the steps of the method described above are implemented.
[0024] By adopting the embodiments of the present application, a summary database is constructed based on the summary data packets in the data server and a call database is constructed based on the data in the business server. When the data is updated, it is possible to quickly determine whether the data call is safe or complies with the rules based on the summary database and the call database. When an abnormality occurs, a review is conducted in a timely manner to quickly identify unauthorized or illegal behavior, thereby ensuring the security of the data in the data server and the business server. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following briefly introduces the drawings in the embodiments of the present application.
[0026] Figure 1 It is a schematic diagram of the system architecture of an embodiment of the present application.
[0027] Figure 2 A flow chart of a method for generating a data flow graph according to an embodiment of the present application is shown.
[0028] Figure 3 A flow chart of a method for generating a data flow graph according to a called data packet according to an embodiment of the present application is shown.
[0029] Figure 4 A schematic diagram of the process of generating a summary data packet according to an embodiment of the present application is shown.
[0030] Figure 5 A schematic diagram of a flow chart of a method for screening called data packets according to an embodiment of the present application is shown.
[0031] Figure 6 A flow chart of a data flow warning method according to an embodiment of the present application is shown.
[0032] Figure 7 A schematic flow chart of a method for determining a summary data packet based on a summary database according to an embodiment of the present application is shown.
[0033] Figure 8 A schematic diagram of the flow of a method for determining a called data packet based on calling a database according to an embodiment of the present application is shown.
[0034] Fig. 9 A schematic flow chart of the early warning review method according to an embodiment of the present application is shown.
[0035] Fig. 10A A partial flow chart of a method for generating a data flow graph according to an embodiment of the present application is shown.
[0036] Fig. 10B Another partial flow chart of the data flow graph generation method according to an embodiment of the present application is shown.
[0037] Fig.11A flow chart of a method for generating a data flow graph according to an embodiment of the present application is shown.
[0038] Fig.12 A schematic diagram of the data early warning method flow based on a data flow diagram according to an embodiment of the present application is shown.
[0039] Fig.13 It is a structural schematic diagram of a data flow graph generating device according to an embodiment of the present application.
[0040] Fig.14 A schematic diagram of the structure of the determination module of an embodiment of the present application is shown.
[0041] Fig.15 A schematic diagram of the clustering module structure of an embodiment of the present application is shown.
[0042] Fig.16 A schematic diagram of the screening module structure of an embodiment of the present application is shown.
[0043] Fig.17 A schematic diagram of the structure of a data flow warning device according to an embodiment of the present application is shown.
[0044] Fig.18 A schematic diagram of the structure of the early warning module of an embodiment of the present application is shown.
[0045] Fig.19 A schematic diagram of the structure of the second early warning module of an embodiment of the present application is shown.
[0046] Fig. 20 Another schematic diagram of the structure of an early warning module according to an embodiment of the present application is shown.
[0047] Fig.21 It is a schematic diagram of the structure of an electronic device used to implement the embodiment of the present application. DETAILED DESCRIPTION
[0048] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that the purpose of providing these embodiments is to make the principles and spirit of the present application clearer and more thorough, so that those skilled in the art can better understand and implement the principles and spirit of the present application. The exemplary embodiments provided herein are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments herein, all other embodiments obtained by ordinary technicians of the art without creative work are within the scope of protection of this application.
[0049] Embodiments of the present application relate to terminal devices and / or servers. Those skilled in the art will appreciate that the embodiments of the present application may be implemented as a system, apparatus, device, method, computer-readable storage medium, or computer program product. Therefore, the present application may be specifically implemented as at least one of the following forms: complete hardware, complete software, or a combination of hardware and software. According to the embodiments of the present application, the present application requests protection for a method, apparatus, electronic device, computer-readable storage medium, and computer program product for generating a data flow graph. Figure 1 A schematic diagram of a system architecture of an embodiment of the present application is shown. Figure 1 As shown, the system includes a terminal device 102 and a server 104. Among them, the terminal device 102 may include at least one of the following: a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, various wearable devices, an augmented reality AR device, a virtual reality VR device, etc. A client can be installed on the terminal device 102. For example, the client can be a client that specifically performs a specific function (such as an application app), or a client with multiple application applets (different functions) embedded in it, or a client logged in through a browser. The user can operate on the terminal device 102. For example, the user can open the client installed on the terminal device 102 and input instructions through the client operation, or the user can open the browser installed on the terminal device 102 and input instructions through the browser operation. After the terminal device 102 receives the instruction input by the user, the request information containing the instruction is sent to the server 104. After receiving the request information, the server 104 performs corresponding processing and then returns the processing result information to the terminal device 102. The user instruction is completed through a series of data processing and information interaction.
[0050] The server 104 includes a data server 1041 (also called a database server) and one or more business servers 1042. The data server 1041 is used to store various data of the enterprise, such as data tables storing various types of information and various types of data, and the data types include: text, numbers, dates, images, etc. The business server 1042 is used to receive the request of the terminal device 102, execute the corresponding business logic according to the request, and return the result to the terminal device 102 in an appropriate format after the execution is completed. The business server 1042 can also interact with the data server 1041, such as reading or updating data, executing queries, etc. The data flow diagram generation method of the present application is used to draw a data flow diagram to clarify the flow path of data between the data server 1041, the business server 1042 and the terminal device 102, and which business functions are executed, so as to clearly grasp the trend of data, conduct full life cycle monitoring, and provide support for subsequent data security protection.
[0051] In this document, terms such as first, second, and second are only used to distinguish one entity (or operation) from another entity (or operation), but not to require or imply any order or relationship between these entities (or operations).
[0052] Figure 2 A schematic diagram of a data flow diagram generation method according to an embodiment of the present application is shown, and the method comprises the following steps:
[0053] S101: parsing mirrored traffic from a data server to obtain a first data set including a plurality of data packets, wherein the format of the data packets at least includes: an execution operation statement and an access IP;
[0054] S102: clustering and merging multiple data packets according to the execution operation statement and the access IP to form a summary data packet, wherein the format of the summary data packet includes a summary execution operation statement and a summary access IP;
[0055] S103: determining a corresponding service server based on the summary access IP, and acquiring a second data set including a plurality of data packets from the service server, wherein the format of the data packets in the second data set includes at least a request address and an access IP;
[0056] S104: Filter out one or more called data packets in the second data set based at least on the summary execution operation statement and the request address in the second data set;
[0057] S105: Generate a data flow line according to the access IP in the called data packet, and determine the service function type according to the request address in the called data packet;
[0058] S106: Generate a data flow diagram based on the data flow line and the business function type, where the business function type includes all types of data in the entire life cycle.
[0059] The method of the present application can track and draw the flow diagram of various data in any server, and track the data throughout its life cycle. The full life cycle of data includes the use, collection, change and destruction of data. Through the data flow diagram, the movement of data can be grasped intuitively and clearly, and it is clear where the sensitive data comes from (collection), how it is transmitted (transmission), where it exists (storage), whether it is used by any business (use), and whether it is destroyed after the life cycle (destruction), providing support for subsequent data security protection.
[0060] The data types in the database server are roughly divided into sensitive data and non-sensitive data. Sensitive data includes personal privacy information, corporate trade secrets, etc. Personal privacy information, such as: mobile phone numbers, email addresses, passwords, etc. of job seekers. Non-sensitive data includes public information and worthless data, etc. If all the information in the server is tracked and a data flow diagram is drawn, it will take up a lot of computing resources and take a long time to draw. Therefore, before drawing the flow diagram, high-value, sensitive, and core databases and / or core data tables in the database can be screened out according to conditions such as sensitivity and value to draw the data flow diagram, which can not only save computing resources, but also effectively manage core and sensitive data to avoid leakage and abuse of core data.
[0061] In step S101, based on the core database servers and / or core data tables selected above, a copy of the real online traffic is copied to the mirror service through specific configuration, so that the request content in the online traffic can be specifically analyzed without affecting the online service. By analyzing the online traffic from the mirror, it is possible to know which business servers (can be known by access IP) have accessed the data, and the collection point and usage of the accessed data (can be known by executing operation statements), and the data in the database can be tracked to form a complete data flow diagram.
[0062] In step S102, multiple data packets in multiple first sets are clustered and merged to form one or more summary data packets. For an enterprise of a certain size, the number of data packets generated by the first set every day can reach the billion level. It is technically impossible to track each statement in each data packet, and the output of the data flow graph will also be delayed. Therefore, it is necessary to process the data packets at the billion level to reduce the number of data packets.
[0063] Research has found that the types of functions corresponding to the execution operation statements of massive data packets are relatively limited. The key content of the data flow graph is to track the functions corresponding to the statements in the access data packets and who is calling the corresponding functions. Therefore, the present application clusters and merges multiple data packets according to the execution operation statements and access IPs of the data packets to obtain summary data packets, and can cluster the number of data packets in the first set from the billion level to the hundreds of levels (hundreds are traceable values) of summary data packets, which greatly reduces the number of tracking data packets, can shorten the time to generate data flow graphs, and improve work efficiency. The summary data packet is a data packet with the same execution operation statement and access IP, ignoring the parameter values of the fields in the query conditions and merging them into a summary data packet. The summary data packet can include hundreds of thousands to millions of data packets.
[0064] In steps S103 and S104, the business server to be accessed is determined according to the summary access IP in the summary data packet. The business server can be used to implement various functions of user operations, such as registering an account, modifying a user name, etc. By using steps S103 and S104, the data packets in the business server are matched with the data packets retrieved according to the summary execution operation statement in the summary data packet to filter out the called data packets. If there is a called data packet, it means that there is a real call to the summary execution operation statement, and the data in the database server has been circulated.
[0065] The data flow graph is composed of a data flow line and a business function type. The data flow line indicates the direction of data flow, and the business function type indicates the called business function. The access node and flow direction of the data can be determined according to the access IP in the called data packet, and the business function type can be determined according to the request address in the called data packet. The data flow graph can be generated according to the calling subject, flow direction and business function type. This application matches the data packets obtained based on the traffic mirroring of the database server and the business server, and can track each access node that accesses the data without omissions, and the final data flow has a high degree of credibility. By combing the flow graph of each data, even if there is data that cannot be tracked, the untracked and missed parts can be found to achieve data security and controllability.
[0066] Figure 3 FIG. 1 is a flow chart showing a method for generating a data flow diagram according to a called data packet according to an embodiment of the present application. Figure 3 As shown, the method includes:
[0067] S301, determining whether the access IP in the called data packet is an intranet IP or an extranet IP;
[0068] If the access IP type in the called data packet is an intranet IP, the intranet IP data flow graph tracking method, namely S302-S304, is executed.
[0069] S302, determining a corresponding service server according to the access IP, and obtaining a third data set including a plurality of data packets from the service server, wherein the format of the data packets in the third data set at least includes a request address and an access IP;
[0070] S303, filtering out one or more called data packets in the third data set based on the summary execution operation statement and the request address in the third data set;
[0071] S304, generating a data flow line according to the access IP in the called data packet, and determining the service function type according to the request address in the called data packet;
[0072] Continue to determine whether the access IP in the called data packet in the third set is an intranet IP or an extranet IP. If the access IP in the called data packet is an intranet IP, repeat the intranet IP data flow graph tracking method until it is determined that the access IP is an extranet IP.
[0073] Intranet IP refers to the IP of the enterprise's internal LAN. When the access IP is an intranet IP, it means that there is a situation where the enterprise's internal business calls data. Because the data permissions of all data servers and business servers within the enterprise can be obtained, each access node and each business function can be tracked according to the access IP to form a complete data flow diagram. In addition, the ultimate source of sensitive data must be external input, so by continuously tracking the access IP of the called data packet, it can be traced back to the situation where the access IP is an external network IP, so as to determine the final traceability.
[0074] If the access IP type in the called data packet is an external network IP, the internal network IP data flow graph tracking method, namely S305-S306, is executed.
[0075] S305, if the access IP type in the called data packet is an external network IP, a data flow line is generated according to the access IP in the called data packet, and the service function type is determined according to the request address in the called data packet;
[0076] S306: Generate a data flow diagram based on the data flow line and the business function type.
[0077] External IP can be accessed by any computer with a network connection, and is public and open. External IP is generally regarded as the user's personal behavior and cannot be tracked further, and the data flow diagram ends here. External IP also includes corporate office network IP. Internal staff of the company can use office network IP or access data for work management and other reasons.
[0078] According to an embodiment of the present application, further comprising: if the data packet is stored in a new data server, the method for generating a data flow diagram is re-executed for the new data server to generate a new data flow diagram. If the data is stored, it means that the sensitive data has entered a new database and data table, and also needs to be protected and tracked throughout the life cycle, then S101-S106 needs to be re-executed to collect traffic mirroring and draw a data flow diagram for the new database.
[0079] Figure 4 A schematic diagram of a process for generating a summary data packet according to an embodiment of the present application is shown. The method comprises:
[0080] S401, filtering out multiple data packets according to the access IP and one or more of the statement type, target field, target data table and field name in the query condition in the execution operation statement;
[0081] S402: merging the plurality of data packets into a summary data packet after removing parameter values of fields in the query condition, wherein each summary data packet corresponds to a service function type.
[0082] Through the research and analysis of massive statements, we found that although there are hundreds of millions of SQL statements, the functions corresponding to the statements are relatively limited. The data flow diagram ultimately needs to track business functions. The data flow diagram essentially needs to know what functions the statements that access sensitive tables correspond to and who is using this function. The following are multiple SQL statements:
[0083] select name,createdate,username,email,phone from user where userid=12345;
[0084] select name,createdate,username,email,phone from user where userid=123456;
[0085] …
[0086] This type of statement generates millions of SQL statements every day, but they all correspond to the same function to query the basic information of a user (userid). Among them, select is the statement type, name, createdate, username, email, phone is the target field, user is the target data table, the field name in the query condition is userid, and the parameter value of the field in the query condition is 12345. In the above multiple SQL statements, except for the parameter values of the fields in the query conditions, the others are the same. Therefore, the summary data package is obtained by merging the statement type, target field, target data table and field name in the query conditions in the execution operation statement. The summary data package is as follows:
[0087] select name,createdate,username,email,phone from user where userid=:x1;
[0088] Clustering is performed by statement type (add, delete, modify), target field, target data table, field name in query conditions, and access source IP, clustering billions of SQL statements into hundreds of statements. This greatly reduces the order of magnitude of tracking, and makes it feasible to generate data flow diagrams for large-scale sensitive data tracking in enterprises.
[0089] Figure 5A schematic diagram of a process flow of a method for screening called data packets according to an embodiment of the present application is shown. The method comprises:
[0090] S501, obtaining source code in the business server;
[0091] S502, searching for a background program file in the source code according to the keywords in the summary execution operation statement;
[0092] S503, parsing the background program file to obtain a function that calls the summary execution operation statement;
[0093] S504, executing the function of the operation statement according to the call summary to obtain the corresponding request address;
[0094] S505: Match the corresponding request address with the request address in the second data set to filter out one or more called data packets in the second data set.
[0095] The source code of the business server is a program code written by a developer that implements the business function. By searching the source code using keywords in the summary execution statement, such as statement type, target field, target data table, and query conditions, the relevant background program files (such as SEC.CLASS.php) can be found. These background program files usually contain code logic related to specific business functions. By parsing the background program files, functions (such as show_user_info()) that call the summary execution statement can be found. These functions are responsible for executing specific business operations and returning results. The corresponding request address obtained based on the function that calls the summary execution statement is, for example, / resume / standard_resume.php, where / resume / standard_resume.php is the place where the required business operations are executed. Finally, the corresponding request address is matched with the request address in the second data set. If there is a matching data packet, it means that the business function in the above-mentioned business server has a call, that is, the summary execution statement has a real call, and the sensitive data has circulated.
[0096] According to an embodiment of the present application, the business function types include data usage and data change, and the data change class includes data collection, change and destruction. Business function types cover all types of data from collection to destruction throughout the entire life cycle. By subdividing the business function types, it is clear where the sensitive data comes from (collection), how it is transmitted (transmission), where it exists (storage), whether there is any business in use (use), and whether it is destroyed after the life cycle (destruction), providing support for subsequent data security protection.
[0097] The data flow diagram drawn using the database server mirror traffic can intuitively understand the usage of all data in the database server, that is, where the sensitive data comes from, where it is stored, and who is using it. Based on the usage of data in the data flow diagram, the flow of core data is continuously monitored and the user's permissions are reviewed to improve the security of core data. The specific contents of the data warning method are as follows:
[0098] Figure 6 FIG. 2 is a flow chart showing a data flow early warning method according to an embodiment of the present application. Figure 6 As shown, the data flow warning method includes:
[0099] S601, clustering and merging data packets in the data server and conducting security review to obtain one or more first summary data packets and store them in a summary database, wherein the format of the summary data packets includes: summary execution operation statements and summary access IP;
[0100] S602, determining one or more first called data packets based on the first summary data packet and a service server that has a calling relationship with the first summary data packet;
[0101] S603, storing the first called data packet in a calling database after security review, wherein the format of the first called data packet includes: business function type and access IP;
[0102] S604, when the data packets in the data server are updated, clustering and merging the data packets in the data server to obtain one or more second summary data packets;
[0103] S605: If one or more second summary data packets do not exist in the summary database or one or more second called data packets obtained based on the second summary data packets do not exist in the calling database, perform an early warning review.
[0104] The data flow diagram includes data flow lines (flow paths), access nodes (determined by access IP) and business function types. Both the flow paths and access nodes in the data flow diagram require security review. The main content of the security review is to review the access rights of the access object and whether the data flow direction meets the security requirements. The data packets that have passed the security review are clustered and merged to obtain the first summary data packet. The specific steps of clustering and merging are the same as above and will not be repeated here.
[0105] The format of the summary data packet includes: summary execution operation statements, summary access IP, business server account and other information. The summary data packet is stored in the summary database. When the data in the data server is updated, it is determined whether the updated data packet exists in the summary database. If it exists in the summary database, it means that the data call repeats the previous business function statement and no additional warning review is required; if it does not exist in the summary database, it means that there is a new business function statement and a warning review is required. The summary database is obtained by performing clustering and merging and other preprocessing on the data packets in the business server. By comparing whether the updated data packet exists in the summary database, it can be quickly determined whether there is a new calling method. When there is a new business function statement, a warning review can be performed in time to protect the security of the data in the data server at all times.
[0106] Furthermore, one or more first called data packets are screened out from the business servers that have a calling relationship with the first summary data packet, and the first called data packets are stored in the calling database. The calling database is used to represent the basic calling relationship of the calling data packet. The format of the first called data packet in the calling database includes: business function type, access IP, business server IP, etc. When the data of the database server is updated, the second called data packet is determined based on the updated data packet, and then it is determined whether the second called data packet exists in the calling database. If it exists, no additional early warning review is required; if it does not exist, an early warning review is required. By preprocessing the data in the business server to obtain the calling database, and using the calling database to monitor the dynamics of the business server, it is possible to quickly determine whether the data call is safe or in compliance with the rules. When there is an abnormality, a timely review is conducted to quickly identify unauthorized or illegal behavior and ensure the security of the data in the business server.
[0107] Figure 7 FIG. 2 is a flow chart showing a method for determining a summary data packet based on a summary database according to an embodiment of the present application. Figure 7 As shown, the method for determining a summary data packet based on a summary database includes:
[0108] S701, determining whether the summary execution operation statement in the second summary data packet is in the summary database;
[0109] If the summary execution operation statement in the second summary data packet does not exist in the summary database, executing S702, determining that there is a new execution operation statement and performing a warning review on the new execution operation statement;
[0110] If the summary execution operation statement in the second summary data packet exists in the summary database, then S703 is executed to enter the next step of review;
[0111] S704, determining whether the summary IP in the second summary data packet is in the summary database;
[0112] If the summary IP in the second summary data packet does not exist in the summary database, then S705 is executed to determine that there is a new call source and to perform a warning review on the new call source;
[0113] If the summary IP in the second summary data packet exists in the summary database, then S703 is executed to enter the next step of review;
[0114] S706, determining whether the service server account in the second summary data packet is in the summary database;
[0115] If the business server account in the second summary data packet does not exist in the summary database, then executing S707, determining that there is a new access account and conducting a warning review on the new access account;
[0116] If the access account in the second summary data package exists in the summary database, S703 is executed to enter the next step of review.
[0117] The format of the summary data packet in the summary database includes summary execution operation statements, summary access IP, business server account and other information. By determining which specific information in the summary data packet does not exist in the summary database, the problem type can be accurately located and the source of the problem can be subdivided, so that corresponding early warning measures can be taken to improve early warning efficiency.
[0118] Figure 8 The flowchart of the method for determining the called data packet based on calling the database according to the embodiment of the present application is shown. Figure 8 As shown, the method for determining the called data packet based on the calling database includes:
[0119] S801, if the second summary data package exists in the summary database, determine a service server with a calling relationship based on the second summary data package;
[0120] S802, determining one or more second called data packets based on the second summary data packet and the service server;
[0121] S803, determining whether the service function type in the second called data packet is in the calling database;
[0122] If the service function type in the second called data packet is not in the calling database, executing S804, determining that a new service function type exists in the service front end and conducting an early warning review on the new service function type;
[0123] If the service function type in the second called data packet is in the calling database, then the method ends;
[0124] S805, determining whether the access IP in the second called data packet is in the calling database;
[0125] If the access IP in the second called data packet is not in the calling database, then S806 is executed to determine whether there is a new calling source and to conduct an early warning review of the new calling source; if the second called data packet does not exist in the calling database, an early warning review is conducted. If the calling source in the second called data packet is in the calling database, then the method ends. In steps S801-S802, use Figure 5 The method for filtering called data packets filters out one or more second called data packets.
[0126] Furthermore, it is determined whether the service function type and the access IP in the second called data packet are in the call database, thereby accurately locating the call relationship, subdividing the abnormal call type, and quickly taking corresponding early warning measures. Before determining whether the access IP is in the call database, the type of the access IP is first determined. If the access IP is an intranet IP, the above operation is performed. If it is an extranet IP, the method ends.
[0127] Fig. 9 FIG. 2 is a flow chart showing the early warning review method of an embodiment of the present application. Fig. 9 As shown, the early warning review method includes:
[0128] S901, obtain development design documents;
[0129] S902, determining whether the information in the second summary data packet and / or the second called data packet matches the information in the development design document;
[0130] If they match, then S903 is executed to review the security of the development design document after the match;
[0131] If there is no match, execute S904 to issue a warning reminder.
[0132] If one or more of the second summary data packets do not exist in the summary database or one or more of the second called data packets obtained based on the second summary data packet do not exist in the calling database, it does not necessarily mean that there is a hacker attack or someone has violated the rules. There is a reasonable explanation that new business functions have emerged, and the new business functions must come from the development and design documents. Therefore, the development and design documents match the information in the second summary data packet or the second called data packet, such as the summary execution operation statement, access IP, and business function type. If the match is successful, the corresponding development and design documents can be reviewed automatically or manually to see if they are compliant. If they are compliant, the corresponding matching information is stored in the summary database or the calling database and passes the early warning review; if they are not compliant, the call is prohibited. If the development and design document does not match the information in the second summary data packet or the second called data packet, there must be a violation, and the call behavior must be stopped immediately, and the staff will be notified to take early warning measures.
[0133] The implementation methods and advantages of the embodiments of the present application are described above through multiple embodiments. The specific processing process of the embodiments of the present application is described in detail below with reference to specific examples.
[0134] Fig. 10A A partial flow chart of a method for generating a data flow graph according to an embodiment of the present application is shown. Fig. 10B Another part of the flow chart of the data flow diagram generation method of the embodiment of the present application is shown. This application takes a recruitment company as an example. The core sensitive data in the database of the recruitment company includes: recruitment company information, personal resume, etc. Once the core sensitive data is leaked or abused, it will cause serious losses to the company or users. Therefore, it is necessary to draw a data flow diagram for the core sensitive data of the recruitment company in order to track the entire life cycle of the core sensitive data.
[0135] like Fig. 10A and Fig. 10B As shown, in step 1, based on the results of data classification within the enterprise, the type of sensitive data within the enterprise, the corresponding core business, the data volume, and the corresponding library table of sensitive data are obtained, so as to clarify the database server IP, library, and table whose traffic needs to be monitored. Priority is given to drawing data flow diagrams for database server IPs, libraries, and tables with the most core business, the largest data volume, and the highest sensitivity. The following are examples of sensitive data, database server IPs, libraries, and tables of recruiting companies:
[0136] Example 1: The mobile phone number, email address, and password of a job seeker. The core business is job recruitment, with a data volume of 200 million. The core database server IP is 10.100.11.11, the core database is 51job, and the core table is users.
[0137] Example 2: The mobile phone number, password, bank card number, etc. of the enterprise recruiting users. The corresponding core business is job recruitment, with a data volume of 200 million. The core database server IP is: 10.100.11.12, the core database is: ehire, and the core table is: ehireusers.
[0138] Step 2: Configure the core database server (e.g. 10.100.11.11) port and mirror forward the port traffic of the core database server.
[0139] Step 3: Parse the mirrored traffic of the core database server (10.100.11.11) port according to different database protocols (such as mysql, Sqlserver, Oracle, etc.) into a readable SQL statement data format; the standard format of the parsed data is as follows:
[0140] Database server IP, 10.100.11.11
[0141] Database name: 51job
[0142] Database account: app
[0143] Database type: oracle
[0144] Access source IP: 10.80.1.1
[0145] Database access method: jdbc
[0146] Executed SQL statements:
[0147] insert into user(userid,name,createdate,username,email,phone value(1,user information,20231105,test01,test01@xxx.com,15322233333)
[0148] Execution result: success
[0149] Number of rows affected by execution: 1
[0150] Response content: None (only select statements have response content)
[0151] Statement execution time: 20231105 11:11:11
[0152] Step 4: Filter the relevant SQL statement information in the sensitive table, summarize it based on a certain time period, and centrally store the parsed SQL statement information.
[0153] Step 5: Clustering is performed based on the statement type (add, delete, modify), target field, target data table, field name in the query condition, and access source IP of the SQL statement executed in the SQL statement information.
[0154] For core businesses of enterprises of a certain scale, the number of SQL statements executed daily in the core tables can reach hundreds of millions. It is technically impossible to track every statement in every data packet in real time. At the same time, the drawing of the flow graph has low real-time performance, so the number of tracked SQL statements must be reduced.
[0155] Through the research and analysis of massive statements, we found that although there are hundreds of millions of SQL statements, the functions corresponding to the statements are relatively limited. The data flow diagram ultimately needs to track business functions. The data flow diagram essentially needs to know what functions the statements that access sensitive tables correspond to and who is using this function. Therefore, we can cluster the functions corresponding to the executed operation statements, that is, the executed SQL statements, to reduce the number of SQL statements. The SQL statements are as follows:
[0156] Example 3:
[0157] select name,createdate,username,email,phone from user where userid=12345;
[0158] select name,createdate,username,email,phone from user where userid=123456;
[0159] select name,createdate,username,email,phone from user where userid=231324;
[0160] select name,createdate,username,email,phone from user where userid=23456; ......
[0162] Such statements generate millions of SQL statements every day, but they all correspond to the same function of querying the basic information of a user (userid).
[0163] Example 4:
[0164] insert into user(userid,name,createdate,username,email,phone value(1,user information,20231105,test01,test01@xxx.com,15322225554)
[0165] insert into user(userid,name,createdate,username,email,phone value(2,user information,20231105,test02,test02@xxx.com,15322225555)
[0166] insert into user(userid,name,createdate,username,email,phone value(3,user information,20231105,test03,test03@xxx.com,15322225556)
[0167] insert into user(userid,name,createdate,username,email,phone value(4,user information,20231105,test04,test04@xxx.com,15322225557) ......
[0169] This type of statement generates hundreds of thousands of SQL statements every day, all corresponding to the same function of providing basic information to newly registered users.
[0170] Using the above clustering method, we can cluster billions of SQL statements into hundreds of statements. The hundreds of statements can then become traceable values.
[0171] Step 6: Based on whether the statement type, target field, target data table, and field name in the query condition in the SQL statement are the same, multiple data packets with the same information are merged into a summary data packet, i.e., a clustered data packet, after removing the parameter value of the field in the query condition. The clustered data packet is as follows:
[0172] Example 5:
[0173] Access source: 10.80.1.1, 10.80.1.2
[0174] Database account: xxx
[0175] After clustering:
[0176] select name,createdate,username,email,phone from user where userid=:x1;
[0177] Example 6:
[0178] Access source: 10.80.1.1, 10.80.1.2
[0179] Database account: xxx
[0180] After clustering:
[0181] insert into user(userid,name,createdate,username,email,phone value(:x1,:x2,:x3,:x4,:x5,:x6).
[0182] Step 7: Based on the access source IP in the clustering statement, track the source server that uses the clustering statement. The source server is a business server, and there may be multiple of them. For example, the access source IP in Example 5 and Example 6 is: 10.80.1.1, 10.80.1.2.
[0183] Step 8, based on the statement type (e.g., select, insert, update, delete), statement parameters (e.g., name, createdate, username, email, phone), and statement condition parameters (e.g., whereuserid) in the clustered statements, retrieve the source code of the business server to find the function point corresponding to the business application. Taking the clustered statement "selectname, createdate, username, email, phone from user where userid" as an example, first obtain the source code in the corresponding business server, then use the keywords in the clustered statement to search in the business server, obtain the background program file: SEC.CLASS.php, parse the background program file to obtain the function that calls the SQL statement: show_user_info(), search the function that calls the SQL statement in the business server Web directory, and find that the function point URL (request address): / resume / standard_resume.php is calling the function. The function point URL: / resume / standard_resume.php is the function point of the business.
[0184] Step 9, configure the port of the business server (for example, 10.80.1.1) and mirror the port traffic of the business server;
[0185] Step 10: Parse the data packets using HTTP or other transport protocols in the mirrored traffic of the service server (e.g., 10.80.1.1) port into a readable data format. The standard format of the parsed data is as follows:
[0186] Local server IP: 10.80.1.1
[0187] Access source IP: 101.225.111.33
[0188] Request URL: / resume / stand_resume.php
[0189] HTTP request header information: standard HTTP Header
[0190] HTTP response packet information: HTTP Response information.
[0191] Step 11, matching the function point URL obtained in step 8 with the request URL address of the HTTP data packet output in step 10 to determine the called data packet.
[0192] If there is a matching HTTP data packet, it means that the function in step 8 has a business call (that is, the clustering statement has a real call and sensitive data has flowed)
[0193] Since the original clustering statement is obtained through database mirroring traffic, it means that the corresponding function is active (that is, there is business access), so there must be a match in this step.
[0194] Step 12, determine the type of IP accessed by the called data packet.
[0195] If the access IP is a public IP (external IP), go to step 13.
[0196] If the access IP is a private IP (intranet IP), go to step 17.
[0197] For example: Access source IP: 101.225.111.33 is (public IP) Internet source IP;
[0198] Access source IP: 10.80.2.1 is (private IP) only available within the LAN.
[0199] Step 13, classify the sentence types clustered in step 6.
[0200] like Figure 6 As shown, it is divided into 4 categories according to the life cycle:
[0201] Insert statement corresponds to -> data collection;
[0202] Update statement corresponds to -> data changes;
[0203] The delete statement corresponds to -> data destruction;
[0204] The select statement corresponds to the use of -> data.
[0205] According to the function, it is divided into 2 categories:
[0206] Insert, update, delete->data change class;
[0207] Select->Data Usage Class.
[0208] Different functional classes have different processing methods when calling internal business.
[0209] Step 14: If it is a public IP, access the request URL address in the called data through a browser to determine the business function point.
[0210] Taking the request URL address "xxx.job.com / resume / stand_resume.php" as an example, by using a browser to access this address, it can be seen that the business function point is for individual users to view their basic information.
[0211] Step 15, through the statement type clustered in step 13 corresponding to the business function point in step 14, confirm which part of the data life cycle it belongs to.
[0212] Step 16, output various data combinations to the data flow diagram, and then end.
[0213] Step 17: If it is a private IP, it means that the business functions and sensitive data are collected or used by other internal businesses and need to be tracked.
[0214] Step 18, determine the corresponding business server according to the private IP, and search the corresponding business server source code for the call to the "business function point in step 11" and the corresponding function point URL, wherein the script language syntax tree is used to parse the source code to extract the function to determine the function point URL.
[0215] Step 19: Enter different tracking logics based on the functional classification in step 13.
[0216] If it is a data change type, execute step 21.
[0217] If it is a data usage category, execute step 22.
[0218] Step 20, configure the private IP corresponding to the service server port, mirror forward the port traffic of the service server; then parse the data packets using the transmission protocol such as HTTP in the mirror traffic of the private IP corresponding to the service server port into a readable data format.
[0219] Step 21, match the data packet with the same function point URL as the request URL address obtained in step 20, and refer to step 11 to output the URL, access source IP, HTTP request header, and response content. Then, loop through step 12 to determine the access source IP type until the public network IP source is traced.
[0220] Step 22: Based on the result of step 18, determine whether the acquired data is stored.
[0221] If not stored, jump to step 21;
[0222] If the data is stored, jump to step 23;
[0223] Step 23: The data is stored, which means that the sensitive data has entered the new database and table, and also needs to be protected throughout the life cycle. In this case, you need to go to step 1 to collect and track the image of the new database.
[0224] Fig.11 The flowchart of the method for generating a data flow diagram according to an embodiment of the present application is shown. Fig.11 As shown, the data flow diagram consists of a tracked database server 701, a data flow line 702, a business function type 703, multiple business servers 704, and a caller 705. The data flow line 702 connects the database server 701, the business server 704, and the caller 705, and describes the corresponding business function type on each business line. By viewing the data flow diagram, the flow direction of the core data and the type of call can be intuitively determined. The data flow diagram can quickly confirm whether there is a problem of leakage or abuse of the core data, which provides great help for subsequent security management.
[0225] Fig.12 The following is a schematic diagram of the data early warning method based on the data flow diagram according to an embodiment of the present application. Fig.12 As shown, the data early warning method based on the data flow diagram includes:
[0226] S1201, obtain a summary data packet after clustering, which includes information such as clustered statements, database access source IP, and database account, etc. This step is step 6 in FIG10 , and the method steps for generating the summary data packet refer to steps 1-5 in FIG10 .
[0227] When the data in the database server is updated, it is determined whether the clustering statement (summary data package) exists in the clustering statement library. The clustering statement library (summary database) stores the summary data package obtained in S1201, where a security audit is required for the summary data package after clustering to check whether the call relationship and access nodes in the summary data package comply with security regulations. The call relationship of the summary data package stored in the clustering statement library is shown in Table 1:
[0228] Table 1
[0229]
[0230]
[0231] refer to Fig.12 , to determine whether the clustering statement exists in the clustering statement library, mainly to determine the call source in the clustering statement and / or whether the clustering statement is in the clustering statement library. The specific steps are as follows:
[0232] S1202, determining whether the clustering statement is in the clustering statement library;
[0233] If it does not exist, execute S1204, discover new business function notification, conduct early warning review, and issue an early warning notification.
[0234] If the early warning review is passed, S1205 is executed to store the summary data package (clustering statement and access source) corresponding to the new business function into the clustering statement library;
[0235] If so, executing S1203 to determine whether the access source exists in the clustering statement library;
[0236] If the access source does not exist in the clustering statement library, execute S1206 to perform a warning review and issue a warning notification.
[0237] Determine whether the new clustering statement exists in the clustering statement in the clustering statement call relationship library. If not, it means that a new business function point has appeared and an early warning review is required. Among them, the early warning review can be automatically reviewed based on the development design document, or it can be reviewed and evaluated by data security operators.
[0238] When the clustering statement exists in the clustering statement library, it continues to determine whether the calling source IP exists in the access source field corresponding to the clustering statement. If not, it means that the underlying business function point has been called by a new business application, and an early warning review can be performed to issue an early warning prompt. The early warning review can be automatically reviewed based on the development design document, or it can be reviewed and evaluated by data security operations personnel. If the access source IP and the clustering statement are matched in the clustering statement library, no early warning will be issued. The specific judgment steps are shown in the following example:
[0239] Example 7: When the data in the database server is updated, a summary data packet is parsed:
[0240] Access source: 10.80.1.1;
[0241] Clustering statement:
[0242] Select usename, password from user where userid=:x1;
[0243] If the clustering statement does not exist in the clustering statement library through query, the clustering statement is considered to be a new functional point and needs to be reviewed for early warning.
[0244] Example 8: When the data in the database server is updated, a summary data packet is parsed:
[0245] Access source: 10.80.1.111;
[0246] Clustering statement:
[0247] select name,createdate,username,email,phone from user where userid=:x1;
[0248] Through query, the above clustering statement exists in the clustering statement library, and the access source corresponding to the statement is 10.80.1.111, which is not in the clustering statement library. It is considered that there is a new business call point and an early warning review is required.
[0249] If the access source is in the clustering statement library, S1207 is executed to find that the function point URL matches the service server traffic mirror parsing data packet URL in the service server through the clustering statement;
[0250] S1208, collecting access source IP and function point URL;
[0251] The above steps refer to steps 8-11 of Figure 10. One or more call data packets can be obtained through matching, and the call data packets are stored in the call database after security review. The matching relationship between the access source and business function information in the call database is shown in Table 2:
[0252] Table 2
[0253]
[0254] S1208, determining whether the function point URL exists in the calling database;
[0255] If it does not exist, execute S1210 to perform a security review on the called data packet (access source IP and function point URL). If it passes the security review, the called data packet will be stored in the calling database; if it fails the security review, execute step S1211, and if a new business function point calls a business function statement of the same function, perform an early warning review and issue an early warning notification.
[0256] If it exists, execute S1212 to determine whether the access source IP is a public network IP;
[0257] If it is a public network IP or office network IP, the review of the called data packet will be terminated;
[0258] If it is not a public network IP or an office network IP, execute S1213 to determine whether the access source IP exists in the call database;
[0259] If it exists, the review of the called data packet is terminated;
[0260] If it does not exist, execute step S1214, find that the business function is called by a new internal system, perform a warning review on the calling data packet, and issue a warning notification.
[0261] Among them, when the access source IP is an external network IP or an office network IP, it means that it is called by the end user and can be ignored because it cannot be tracked further; when the access source IP is an intranet IP, it can be considered that the front-end business function point is called by other new internal businesses, and an early warning review is required to notify relevant personnel for review.
[0262] refer to Fig.12 The steps of early warning review include:
[0263] S1215, development and design documents within the search cycle;
[0264] S1216, determining whether the development design document contains business functions;
[0265] If not, execute step S1217, determine it as an abnormal call, and issue a warning notification;
[0266] If it is included, execute S1218 to determine whether the design document has been reviewed by the safety personnel;
[0267] If it is reviewed by security personnel, the call is determined to be safe;
[0268] If it has not been reviewed by security personnel, step S1217 is executed to determine that it is an abnormal call and issue a warning notification.
[0269] The development and design document records the process of launching new functions. When there is a new calling relationship, it is first necessary to determine whether there is a new function online. Therefore, it is necessary to determine whether the information in the development and design document matches the information in the second summary data packet and / or the second called data packet. The information in the second summary data packet includes: summary execution operation statements, summary access IP, business server account and other information; the information in the second called data packet includes: business function type and access IP and other information. When the corresponding information is matched in the development and design document, a security audit of the new function is required. When the match is not successful, there is a high probability that there is an illegal call problem, and it is necessary to remind the staff to conduct a security audit and take early warning measures. Early warning measures include immediately prohibiting illegal calls.
[0270] Corresponding to the method embodiment of the present application, the present application also provides a device for generating a data flow graph, such as Fig.13 As shown, the data flow graph generation device 100 includes: a parsing module 110, a clustering module 120, an acquisition module 130, a screening module 140, a determination module 150 and a generation module 160. Among them, the parsing module 110 is used to parse the mirrored traffic from the data server to obtain a first data set including multiple data packets, and the format of the data packet at least includes: an execution operation statement and an access IP; the clustering module 120 is used to cluster and merge multiple data packets according to the execution operation statement and the access IP to form a summary data packet, and the format of the summary data packet includes a summary execution operation statement and a summary access IP; the acquisition module 130 is used to determine the corresponding business server based on the summary access IP, and obtain a second data set including multiple data packets from the business server, and the format of the data packet in the second data set includes at least a request address and an access IP; the screening module 140 is used to filter out one or more called data packets in the second data set based on the summary execution operation statement and the request address in the second data set; the determination module 150 is used to generate a data flow line according to the access IP in the called data packet, and determine the business function type according to the request address in the called data packet; the generation module 160 is used to generate a data flow diagram based on the data flow line and the business function type, and the business function type includes all types of the entire life cycle of the data.
[0271] Fig.14 FIG. 2 shows a schematic diagram of the structure of the determination module in an embodiment of the present application. Fig.14As shown, the determination module 150 includes: an intranet IP data flow graph tracking module 151 and an extranet IP data flow graph tracking module 152. The intranet IP data flow graph tracking module 151 is configured to include a third data set acquisition unit 1511, a called data packet screening unit 1512, a first data flow line generation unit 1513 and an IP type judgment unit 1514. The third data set acquisition unit 1511 is used to determine the corresponding business server according to the access IP if the access IP type in the called data packet is an intranet IP, and obtain a third data set including multiple data packets from the business server, and the format of the data packet in the third data set at least includes the request address and the access IP; the called data packet screening unit 1512 is used to filter out one or more called data packets in the third data set based on the summary execution operation statement and the request address in the third data set; the first data flow line generation unit 1513 is used to generate a data flow line according to the access IP in the called data packet, and determine the business function type according to the request address in the called data packet; the IP type judgment unit 1514 is used to judge that when the access IP in the called data packet is an intranet IP, repeatedly execute the intranet IP data flow graph tracking method until it is determined that the access IP is an external network IP.
[0272] The external network IP data flow graph tracking module is configured to include: a second data flow line generating unit 1521 and a data flow graph generating unit 1522. The second data flow line generating unit 1521 is used to generate a data flow line according to the access IP in the called data packet if the access IP type in the called data packet is an external network IP, and determine the service function type according to the request address in the called data packet; the data flow graph generating unit 1522 is used to generate a data flow graph according to the data flow line and the service function type.
[0273] Fig.15 FIG. 2 shows a schematic diagram of the clustering module structure of an embodiment of the present application. Fig.15 As shown, the clustering module 120 includes: a data packet screening module 121 and a summary data packet generating module 122. The data packet screening module 121 is used to screen out multiple data packets according to one or more of the access IP and statement type in the execution operation statement, the target field, the target data table and the field name in the query condition; the summary data packet generating module 122 is used to merge the multiple data packets into a summary data packet after removing the parameter value of the field in the query condition, and each summary data packet corresponds to a business function type.
[0274] Fig.16 FIG. 2 shows a schematic diagram of the structure of the screening module in an embodiment of the present application. Fig.16As shown, the screening module 140 includes: a source code acquisition module 141, a file retrieval module 142, a file parsing module 143, a request address acquisition module 144 and a request address matching module 145. The source code acquisition module 141 is used to acquire the source code in the business server; the file retrieval module 142 is used to retrieve the background program file in the source code according to the keywords in the summary execution operation statement; the file parsing module 143 is used to parse the background program file to obtain the function that calls the summary execution operation statement; the request address acquisition module 144 is used to obtain the corresponding request address according to the function that calls the summary execution operation statement; the request address matching module 145 is used to match the corresponding request address with the request address in the second data set to filter out one or more called data packets in the second data set.
[0275] Fig.17 FIG. 1 shows a schematic diagram of the structure of the data flow warning device according to an embodiment of the present application. Fig.17 As shown, the data flow warning device includes: a summary database building module 210, a first called data packet determination module 220, a calling database building module 230, a monitoring module 240 and an early warning module 250. Among them, the summary database building module 210 is used to cluster and merge the data packets in the data server and perform security review to obtain one or more first summary data packets and store them in the summary database. The format of the summary data packet includes: summary execution operation statement and summary access IP. The first called data packet determination module 220 is used to determine one or more first called data packets based on the first summary data packet and the business server that has a call relationship with the first summary data packet. The calling database building module 230 is used to store the first called data packet in the calling database after security review. The format of the first called data packet includes: business function type and access IP; the monitoring module 240 is used to cluster and merge the data packets in the data server to obtain one or more second summary data packets when the data packets in the data server are updated. The early warning module 250 is used to perform early warning review if one or more of the second summary data packets do not exist in the summary database or one or more second called data packets obtained based on the second summary data packet do not exist in the calling database.
[0276] Fig.18 FIG. 1 shows a schematic diagram of the structure of the early warning module in an embodiment of the present application. Fig.18As shown, the early warning module 250 includes: a first judgment module 251, a first early warning module 252, a second judgment module 253, a second called data packet determination module 254 and a second early warning module 255. Among them, the first judgment module 251 is used to determine the existence of a new execution operation statement and / or a new call source if the summary execution operation statement and / or the summary access IP in the second summary data packet do not exist in the summary database. The first early warning module 252 is used to perform an early warning review on the new execution operation statement and / or the new call source. The second judgment module 253 is used to determine the business server with a call relationship based on the second summary data packet if the second summary data packet exists in the summary database. The second called data packet determination module 254 is used to determine one or more second called data packets based on the second summary data packet and the business server. The second early warning module 255 is used to perform an early warning review if the second called data packet does not exist in the call database.
[0277] Fig.19 FIG. 2 shows a schematic diagram of the structure of the second early warning module in an embodiment of the present application. Fig.19 As shown, the second warning module 255 includes: a first judgment unit 2551, a first warning unit 2552, a second judgment unit 2553 and a second warning unit 2554. Among them, the first judgment unit 2551 is used to determine that there is a new business function type if the business function type in the second called data packet does not exist in the calling database; the first warning unit 2553 is used to perform a warning review on the new business function type. The second judgment unit 2553 is used to determine that there is a new call source in the business front end if the access IP in the second called data packet is an intranet IP and the access IP does not exist in the calling database. The second warning unit 2554 is used to perform a warning review on the new call source.
[0278] Fig. 20 FIG. 2 shows another schematic diagram of the structure of an early warning module according to an embodiment of the present application. Fig. 20 As shown, the early warning module 250 also includes: a development document acquisition module 256, a matching module 257, a review module 258 and an early warning reminder module 259. Among them, the development document acquisition module 256 is used to obtain development design documents. The matching module 257 is used to determine whether the information in the second summary data packet and / or the second called data packet matches the information in the development design document. The review module 258 is used to review the security of the matched development design document if the match is successful. The early warning reminder module 259 is used to issue an early warning reminder if the match is unsuccessful.
[0279] The electronic device in the embodiment of the present application may be a user terminal device, a server, other computing devices, or a cloud server. Fig.21 A schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application is shown. The electronic device may include a processor 601 and a memory 602 storing computer program instructions. When the processor 601 executes the computer program instructions, the process or function of any of the above-mentioned embodiments of the method is implemented.
[0280] Specifically, the processor 601 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application. The memory 602 may include a large-capacity memory for data or instructions. For example, the memory 602 may be at least one of the following: a hard disk drive (HDD), a read-only memory (ROM), a random access memory (RAM), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, a universal serial bus (USB) drive or other physical / tangible memory storage device. For another example, the memory 602 may include a removable or non-removable (or fixed) medium. For another example, the memory 602 may be inside or outside the integrated gateway disaster recovery device. The memory 602 may be a non-volatile solid-state memory. In other words, the memory 602 usually includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with computer-executable instructions, and when the software is executed (such as executed by one or more processors), the operation described in the method of the embodiment of the present application can be performed. The processor 601 implements the process or function of any method in the above embodiments by reading and executing the computer program instructions stored in the memory 602.
[0281] In one example, Fig.21The electronic device shown may also include a communication interface 603 and a bus 610. Among them, the processor 601, the memory 602, and the communication interface 603 are connected through the bus 610 and complete the communication between each other. The communication interface 603 is mainly used to realize the communication between each module, device, unit and / or device in the embodiment of the present application. The bus 610 includes hardware, software or both, and can couple the components of the online data traffic billing device to each other. For example, the bus may include at least one of the following: an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-end bus (FSB), a hypertransport (HT) interconnect, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a micro channel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable buses. The bus 610 may include one or more buses. Although the embodiments of the present application describe or illustrate a specific bus, the embodiments of the present application may consider any suitable bus or interconnection method.
[0282] In combination with the method in the above embodiments, an embodiment of the present application also provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the process or function of any method in the above embodiments is implemented.
[0283] In addition, an embodiment of the present application further provides a computer program product, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the process or function of any one of the methods in the above embodiments is implemented.
[0284] The above exemplarily describes the flowcharts and / or block diagrams of the methods, devices, systems and computer program products of the embodiments of the present application, and describes the relevant various aspects. It should be understood that each box or combination thereof in the flowchart and / or block diagram can be implemented by computer program instructions, or by dedicated hardware that performs a specified function or action, or by a combination of dedicated hardware and computer instructions. For example, these computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to form a machine that enables these instructions executed by such a processor to enable the implementation of the functions / actions specified in each box or combination thereof in the flowchart and / or block diagram. Such a processor can be a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.
[0285] The functional blocks shown in the structured block diagram of the embodiment of the present application can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc.; when implemented in software, it is a program or code segment used to perform the required task. The program or code segment can be stored in a memory, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0286] It should be noted that the present application is not limited to the specific configurations and processes described above or shown in the figures. The above is only a specific implementation mode of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the described system, device, module or unit can refer to the corresponding process in the method embodiment without further description. It should be understood that the scope of protection of the present application is not limited to this. Any technician familiar with the technical field can think of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and these modifications or substitutions should be included in the scope of protection of the present application.
Claims
1. A method for early warning of data flow, characterized in that: include: After clustering and merging the data packets in the data server and conducting security review, one or more first summary data packets are obtained and stored in a summary database, wherein the format of the summary data packets includes: summary execution operation statements and summary access IP; Determine one or more first called data packets based on the first summary data packet and a service server that has a calling relationship with the first summary data packet; storing the first called data packet in a calling database after security review, wherein the format of the first called data packet includes: a business function type and an access IP; When the data packets in the data server are updated, clustering and merging the data packets in the data server to obtain one or more second summary data packets; If one or more of the second summary data packets do not exist in the summary database or one or more of the second called data packets obtained based on the second summary data packet do not exist in the calling database, an early warning review is performed.
2. The method according to claim 1, characterized in that Also includes: If the summary execution operation statement and / or the summary access IP in the second summary data packet do not exist in the summary database, determining that there is a new execution operation statement and / or a new call source; Perform an early warning review on the new execution operation statement and / or the new call source.
3. The method according to claim 1, characterized in that Also includes: If the second summary data packet exists in the summary database, determining a service server having a calling relationship based on the second summary data packet; Determining one or more second called data packets based on the second summary data packet and the service server; If the second called data packet does not exist in the calling database, a warning review is performed.
4. The method according to claim 3, characterized in that Also includes: If the service function type in the second called data packet does not exist in the calling database, determining that a new service function type exists; Conduct early warning review of the new business function type.
5. The method according to claim 3, characterized in that: Also includes: If the access IP in the second called data packet is an intranet IP and the access IP does not exist in the call database, it is determined that there is a new call source in the business front end; Conduct an early warning review of the new call source.
6. The method according to claim 1, characterized in that The format of the summary data packet also includes: a business server account number, if the business server account number in the second summary data packet does not exist in the summary database, determining that a new access account number exists; Perform a warning review on the new access account.
7. The method according to claim 1, characterized in that Also includes: Obtain development design documents; Determining whether information in the second summary data packet and / or the second called data packet matches information in the development design document; If the match is successful, then check whether the development and design documents after the match are safe; If the match is unsuccessful, an early warning reminder will be issued.
8. The method according to claim 1, characterized in that Also includes: Filter out multiple data packets according to the access IP of the data packet in the data server and one or more of the statement type in the execution operation statement, the target field, the target data table and the field name in the query condition; The plurality of data packets are removed from the parameter values of the fields in the query conditions and then merged into a first summary data packet.
9. The method according to claim 1, characterized in that: Also includes: Acquire source code in a business server that has a calling relationship with the first summary data packet; Retrieving a background program file in the source code according to keywords in the summary execution operation statement in the first summary data packet; Parsing the background program file to obtain a function that calls the summary execution operation statement; Obtaining a source code request address according to a function of executing an operation statement according to the outline; Parsing the mirrored traffic from the business server to obtain a call request address; The source code request address is matched with the call request address to determine one or more first called data packets.
10. The method according to claim 1, characterized in that The business function types include data usage and data change types, and the data change type includes data collection, change and destruction.
11. A data flow warning device, characterized in that: include: A summary database building module is used to obtain one or more first summary data packets after clustering and merging the data packets in the data server and conducting security review and store them in the summary database, wherein the format of the summary data packet includes: summary execution operation statement and summary access IP; A first called data packet determining module, configured to determine one or more first called data packets based on the first summary data packet and a service server having a calling relationship with the first summary data packet; A calling database forming module, used for storing the first called data packet into the calling database after security review, wherein the format of the first called data packet includes: business function type and access IP; A monitoring module, configured to cluster and merge the data packets in the data server to obtain one or more second summary data packets when the data packets in the data server are updated; The warning module is used to perform a warning review if one or more of the second summary data packets do not exist in the summary database or one or more of the second called data packets obtained based on the second summary data packet do not exist in the calling database.
12. The data flow early warning device according to claim 11, characterized in that: Also includes: A first judgment module, configured to determine the existence of a new execution operation statement and / or a new call source if the summary execution operation statement and / or the summary access IP in the second summary data packet do not exist in the summary database; The first warning module is used to perform a warning review on the new execution operation statement and / or the new call source.
13. The data flow early warning device according to claim 11, characterized in that: Also includes: A second judgment module, configured to determine a service server having a call relationship based on the second summary data packet if the second summary data packet exists in the summary database; A second called data packet determining module, configured to determine one or more second called data packets based on the second summary data packet and the service server; The second warning module is used to perform a warning review if the second called data packet does not exist in the calling database.
14. The data flow warning device according to claim 13, characterized in that: The second early warning module comprises: a first judging unit, configured to determine that a new service function type exists if the service function type in the second called data packet does not exist in the calling database; The first early warning unit is used to perform early warning review on the new business function type.
15. The data flow warning device according to claim 13, characterized in that: The second early warning module also includes: A second judgment unit is used to determine that there is a new calling source in the service front end if the access IP in the second called data packet is an intranet IP and the access IP does not exist in the calling database; The second early warning unit is used to perform early warning review on the new call source.
16. The data flow warning device according to claim 11, characterized in that: Also includes: Development document acquisition module, used to obtain development design documents; A matching module, used to determine whether the information in the second summary data packet and / or the second called data packet matches the information in the development design document; A review module, used to review the security of the development design document after the match if the match is successful; The early warning reminder module is used to issue an early warning reminder if the matching is unsuccessful.
17. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; when the electronic device executes the computer program instructions, the method according to any one of claims 1 to 10 is implemented.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.
