Anti-attack method and system based on SAAS platform visitor IP
By dynamically generating access frequency thresholds and detection tags on the SaaS platform, the problem of the inability to detect abnormal behaviors of visitors in the existing technology is solved, and timely restriction and security improvement of visitor access is achieved.
Patent Information
- Application Number
- CN202411153392.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-06
AI Technical Summary
The existing SaaS platform attack prevention system cannot dynamically set the maximum frequency upper limit threshold based on the access records of legitimate visitors, resulting in the inability to detect abnormal behaviors of visitors in time, increasing security risks.
By obtaining the visitor's IP address and tenant ID, querying the tenant information and dynamically generating access frequency thresholds, generating frequency detection tags based on the access frequency, determining whether the visitor's status is abnormal, restricting access in a timely manner, and preventing abnormal behaviors.
It realizes timely discovery and restriction of abnormal behaviors of visitors, enhances the security of the platform, and ensures that tenant information is not leaked.
Smart Images

Figure CN119094178A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of network security technology, and relates to network security technology, and specifically to an anti-attack method and system based on the visitor IP of a SAAS platform. Background Art
[0002] SaaS (Software-as-a-Service) is a software deployment model. SaaS providers build all the network infrastructure and software and hardware operating platforms required for enterprise informatization, and are responsible for a series of services including all pre-implementation and post-maintenance. Enterprises do not need to purchase software and hardware, build computer rooms, or recruit IT personnel. They can use information systems through the Internet. It is a software operating platform commonly used in enterprise management.
[0003] The prior art (invention patent application publication number CN113821755A) discloses a cloud computing-based Web site attack protection system, which belongs to the field of network security technology, including introducing an interface monitoring server in the application system architecture, the interface monitoring server counts IP access volume, limits the access to the interface, introduces a virus type library server, introduces a DDOS attack protection system, introduces a firewall, and enters an intrusion detection tool, which solves the technical problem of real-time and efficient security monitoring of websites based on cloud platforms and cloud computing technologies. The present invention achieves security SaaS service, which is installation-free, deployment-free, and operation-free. System users only need to configure their own computer networks according to the basic requirements of cloud protection, without the need to equip operation and maintenance personnel or manually update the feature library.
[0004] The above-mentioned anti-attack system determines whether the corresponding visitor is an illegal visitor by determining whether the visit frequency of the visitor in a certain period of time exceeds the set maximum frequency limit. Since the maximum frequency limit is a set fixed value, some legitimate visitors normally visit at a low frequency. When the visit frequency of the corresponding legitimate visitor suddenly increases, but the visit frequency does not exceed the maximum frequency limit, the visitor behavior is abnormal, and it is difficult to detect the visitor's abnormal behavior through the above-mentioned method. The maximum frequency limit threshold cannot be dynamically set according to the visit records of legitimate visitors, so that the anti-attack system cannot detect the tenant's abnormal behavior in time, resulting in increased security risks.
[0005] Therefore, a method and system for preventing attacks based on the visitor IP of a SAAS platform is needed. Summary of the invention
[0006] The present application aims to solve at least one of the technical problems existing in the prior art; to this end, the present application proposes an anti-attack method and system based on the IP address of a SAAS platform visitor, which is used to solve the technical problem that it is difficult for the existing SaaS platform anti-attack system to dynamically set the maximum frequency upper limit threshold according to the access records of legitimate visitors, making it impossible to timely detect the abnormal behavior of visitors, thereby increasing security risks. The present application dynamically generates an access frequency threshold through the visitor information of the visitor, and determines whether the visitor status of the corresponding visitor is abnormal based on the access frequency threshold. It can timely detect the abnormal behavior of the visitor and timely restrict the visitor's access to solve the above-mentioned problem.
[0007] To achieve the above-mentioned purpose, the first aspect of the present application provides an anti-attack method based on the visitor IP of a SAAS platform, comprising the following steps:
[0008] Step 1: Obtain the visitor's IP address and the tenant ID of the tenant the visitor accesses;
[0009] Step 2: Obtain tenant information according to the tenant identifier, extract the tenant blacklist in the tenant information; determine whether the IP address is in the tenant blacklist; if yes, set the access prohibition as a reply instruction and proceed to step 5; if no, proceed to step 3;
[0010] Step 3: query the corresponding visitor information and access frequency according to the IP address; dynamically generate an access frequency threshold according to the visitor information; generate a frequency detection tag according to the access frequency and the access frequency threshold;
[0011] Step 4: Determine whether the frequency detection tag is abnormal; if yes, set the access prohibition as a reply instruction and proceed to step 5; if no, set the access permission as a reply instruction and proceed to step 5;
[0012] Step 5: Get and execute the reply command.
[0013] The present application obtains the visitor's IP address and the tenant ID of the tenant accessed by the visitor, obtains the tenant information according to the tenant ID query, and extracts the tenant blacklist in the tenant information; when the visitor's IP address is in the tenant blacklist, the access prohibition is set as a reply instruction; otherwise, the corresponding visitor information and access frequency are queried according to the IP address; an access frequency threshold is dynamically generated according to the visitor information; a frequency detection tag is generated according to the access frequency and the access frequency threshold; a reply instruction is set according to the detection tag; the present application dynamically generates an access frequency threshold through the visitor's visitor information, determines whether the visitor status of the corresponding visitor is abnormal according to the access frequency threshold, can promptly detect the visitor's abnormal behavior, and promptly restrict the visitor's access; ensures that the tenant information is not leaked, and increases the security of the platform.
[0014] Preferably, the tenant identifier is generated by a snowflake algorithm.
[0015] Preferably, generating the frequency detection tag according to the access frequency and the access frequency threshold includes:
[0016] Obtain the visit time of this visitor; query the visitor access record corresponding to the visitor according to the visit time for the visit frequency 1 within the set second period; the visit frequency 2 within the set segment; the visit frequency 3 within the set time period; the visit frequency includes the visit frequency 1, the visit frequency 2 and the visit frequency 3;
[0017] When the access frequency 1 is greater than the access frequency threshold 1, the second segment detection tag is set to the second segment abnormal; otherwise, the second segment detection tag is set to the second segment normal;
[0018] When the access frequency 2 is greater than the access frequency threshold 2, the segment detection label is set to segment abnormal; otherwise, the segment detection label is set to segment normal;
[0019] When the access frequency three is greater than the access frequency threshold three, the time period detection tag is set to the time period abnormal; otherwise, the time period detection tag is set to the time period normal;
[0020] Generate frequency detection labels based on second detection labels, segment detection labels, and time period detection labels.
[0021] Preferably, the generating of the frequency detection tag according to the second segment detection tag, the segment detection tag and the time period detection tag includes:
[0022] Determine whether the second segment detection tag is normal for the second segment;
[0023] If yes, determine whether the segment detection label is segment normal; if yes, when the time period detection label is time period normal, set the frequency detection label to normal frequency; otherwise, set the frequency detection label to first-level frequency abnormal; if no, set the frequency detection label to second-level frequency abnormal;
[0024] If not, set the frequency detection label to level 3 frequency anomaly;
[0025] The frequency detection flag includes normal frequency and abnormal frequency; the frequency abnormality includes primary frequency abnormality, secondary frequency abnormality and tertiary frequency abnormality.
[0026] Preferably, the dynamically generating the access frequency threshold according to the visitor information includes:
[0027] Extract the maximum normal time period visits, the maximum normal segment visits and the maximum normal second visits from the daily frequency data in the visitor information; select a number of daily frequency data, calculate the average value of the maximum normal time period visits in the number of daily frequency data and mark it as the average time period visits PS, the average value of the maximum normal segment visits is marked as the average segment visits PF, and the average value of the maximum normal second visits is marked as the average second visits PM;
[0028] The access frequency threshold YM is calculated by the formula YM=BM+α1×(BM-PM)×arctan(PM-β1×BM); wherein BM is the original access frequency threshold one; α1 and β1 are proportional coefficients; and α1∈(0,1); β1∈(0,1);
[0029] The access frequency threshold value YF is calculated by the formula YF=BF+α2×(BF-PF)×arctan(PF-β2×BF); wherein BF is the original access frequency threshold value 2; α2 and β2 are proportional coefficients; and α2∈(0,1); β2∈(0,1);
[0030] The access frequency threshold three YS is calculated by the formula YS=BS+α3×(BS-PS)×arctan(PS-β3×BS); wherein BS is the original access frequency threshold three; α3 and β3 are proportional coefficients; and α3∈(0,1); β3∈(0,1);
[0031] The access frequency threshold includes access frequency threshold one, access frequency threshold two and access frequency threshold three.
[0032] This application calculates the corresponding new access frequency threshold through the original access frequency threshold and the selected date frequency data; the original access frequency threshold is the previous access frequency threshold, including the original access frequency threshold one, the original access frequency threshold two and the original access frequency threshold three; this application dynamically generates the access frequency threshold through the visitor information of the visitor, so that when judging the abnormal access status of the visitor, the judgment standard is more in line with the current visitor's access habits, thereby making the visitor's abnormal judgment result more accurate.
[0033] Preferably, the tenant blacklist is set according to the number of abnormalities of the first-level frequency abnormality, the second-level frequency abnormality and the third-level frequency abnormality in the corresponding visitor information, including:
[0034] When the frequency detection tag is frequency anomaly; obtain the visitor information corresponding to the IP address; extract the first-level anomaly times of the first-level frequency anomaly; the second-level anomaly times of the second-level frequency anomaly; the third-level anomaly times of the third-level frequency anomaly;
[0035] Determine whether the frequency anomaly is a first-level frequency anomaly;
[0036] If yes, then when the number of first-level exceptions within the set time is greater than the first-level exception threshold, the corresponding visitor will be added to the tenant blacklist;
[0037] If no, determine whether the frequency anomaly is a level 2 anomaly; if yes, when the number of level 2 anomalies within the set time is greater than the level 2 anomaly threshold, the corresponding visitor will be added to the tenant blacklist; if no, when the number of level 3 anomalies within the set time is greater than the level 3 anomaly threshold, the corresponding visitor will be added to the tenant blacklist.
[0038] It is understandable that in this embodiment, the tenant can also independently add or remove the corresponding visitor from the tenant blacklist.
[0039] Preferably, the first-level abnormality times, the second-level abnormality times and the third-level abnormality times are reset to zero periodically.
[0040] The second aspect of the present invention provides an anti-attack system based on the visitor IP of the SAAS platform, comprising: a tenant information management module, a visitor access record module, an IP and tenant association module, an anti-attack strategy module and a data storage module;
[0041] Tenant information management module: obtain tenant information of tenants in the SAAS platform; the tenant information includes tenant name, visitor access record, tenant blacklist library and tenant ID;
[0042] Visitor access record module: when receiving a visitor's access request, obtain the visitor's IP address and access information; the access information includes the access source and access time; and generate visitor information based on the IP address and its corresponding access information;
[0043] IP and tenant association module: used to associate the tenant ID of the tenant with the IP of the corresponding visitor;
[0044] Anti-attack strategy module: obtain visitor information, generate reply instructions based on the visitor information, and execute the reply instructions.
[0045] Preferably, the step of integrating and generating visitor information based on the IP address and its corresponding access information includes:
[0046] Extract the IP address and c segment from the access source; obtain the access information corresponding to several visitors with the same IP address and c segment through the data storage module; integrate the access information into several days of access information according to the access time; integrate several days of access information into visitor information.
[0047] Preferably, generating a reply instruction according to the visitor information includes:
[0048] Extract the tenant blacklist from the tenant information; obtain the IP address corresponding to the visitor;
[0049] Determine whether the IP address is in the tenant blacklist; if yes, set the access prohibition as a reply instruction;
[0050] If not, query the corresponding access frequency according to the IP address, generate a frequency detection tag according to the access frequency and the access frequency threshold, and determine whether the frequency detection tag is a frequency abnormality; if yes, set the prohibited access as a reply instruction; if not, set the allowed access as a reply instruction.
[0051] Compared with the prior art, the beneficial effects of this application are:
[0052] 1. This application obtains the visitor's IP address and the tenant ID of the tenant accessed by the visitor, obtains the tenant information according to the tenant ID, and extracts the tenant blacklist in the tenant information; when the visitor's IP address is in the tenant blacklist, the prohibition of access is set as a reply instruction; otherwise, the corresponding visitor information and access frequency are queried according to the IP address; an access frequency threshold is dynamically generated according to the visitor information; a frequency detection tag is generated according to the access frequency and the access frequency threshold; a reply instruction is set according to the detection tag; this application dynamically generates an access frequency threshold through the visitor's visitor information, determines whether the visitor status of the corresponding visitor is abnormal according to the access frequency threshold, can promptly detect the visitor's abnormal behavior, and promptly restrict the visitor's access; ensures that the tenant information is not leaked and increases the security of the platform.
[0053] 2. This application calculates the corresponding new access frequency threshold through the original access frequency threshold and the selected date frequency data; the original access frequency threshold is the previous access frequency threshold, including the original access frequency threshold one, the original access frequency threshold two and the original access frequency threshold three; this application dynamically generates the access frequency threshold through the visitor information of the visitor, so that when judging the abnormal access status of the visitor, the judgment standard is more in line with the current visitor's access habits, thereby making the visitor's abnormal judgment result more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 A schematic diagram of the method steps of this application;
[0056] Figure 2Generate a flow chart for this application reply instruction;
[0057] Figure 3 This is a schematic diagram of the principle of this application;
[0058] Figure 4 This is the overall flow chart of this application;
[0059] Figure 5 This is the overall framework diagram of the system in this application. DETAILED DESCRIPTION
[0060] The technical solution of the present application will be described clearly and completely in conjunction with the embodiments below. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0061] See also Figure 1-Figure 2 The first aspect of the present application provides an anti-attack method based on the visitor IP of a SAAS platform, comprising the following steps:
[0062] Step 1: Obtain the visitor's IP address and the tenant ID of the tenant the visitor accesses; the tenant ID is generated by the snowflake algorithm; the tenant ID is generated by the snowflake algorithm to ensure the uniqueness of the tenant ID, which is convenient for distinguishing tenant information later;
[0063] Step 2: Obtain tenant information according to the tenant identifier, the tenant information includes the tenant name, visitor access record, tenant blacklist library and tenant identifier; extract the tenant blacklist in the tenant information; determine whether the IP address is in the tenant blacklist; if yes, set the access prohibition as a reply instruction and proceed to step 5; if no, proceed to step 3;
[0064] Step 3: query the corresponding visitor information and access frequency according to the IP address; dynamically generate the access frequency threshold according to the visitor information; generate a frequency detection tag according to the access frequency and the access frequency threshold; the frequency detection tag includes normal frequency and abnormal frequency; normal frequency means that the visitor's access frequency is normal regardless of the second segment, segment, or time period; abnormal frequency means that the visitor's access frequency is abnormal in any one of the second segment, segment, and time period, or more than one;
[0065] Step 4: Determine whether the frequency detection tag is abnormal; if yes, set the access prohibition as a reply instruction and proceed to step 5; if no, set the access permission as a reply instruction and proceed to step 5;
[0066] Step 5: Obtain and execute a reply instruction; specifically, when the reply instruction is to prohibit access, "system busy" is displayed on the visitor's device, and when the reply instruction is to allow access, the corresponding access data is displayed on the visitor's device.
[0067] This embodiment obtains the visitor's IP address and the tenant ID of the tenant accessed by the visitor, obtains the tenant information according to the tenant ID, and extracts the tenant blacklist in the tenant information; when the visitor's IP address is in the tenant blacklist, the access prohibition is set as a reply instruction; otherwise, the corresponding visitor information and access frequency are queried according to the IP address; the access frequency threshold is dynamically generated according to the visitor information; the frequency detection tag is generated according to the access frequency and the access frequency threshold; the reply instruction is set according to the detection tag; this embodiment dynamically generates the access frequency threshold through the visitor information of the visitor, and determines whether the visitor status of the corresponding visitor is abnormal according to the access frequency threshold, so as to timely discover the abnormal behavior of the visitor and timely restrict the visitor's access; ensure that the tenant information is not leaked, and increase the security of the platform.
[0068] Generate frequency detection labels based on access frequency and access frequency threshold, including:
[0069] Obtain the visit time of this visitor; query the visitor access record corresponding to the visitor according to the visit time for the visit frequency 1 within the set second period; the visit frequency 2 within the set segment; the visit frequency 3 within the set time period; the visit frequency includes the visit frequency 1, the visit frequency 2 and the visit frequency 3;
[0070] Specifically, access frequency one is the number of visits within a fixed time before the access time; the fixed time is a set second segment, which is a second-level time period set according to experience, such as 1 second, 5 seconds, and 10 seconds; access frequency two is the number of visits within a fixed time before the access time; the fixed time is a set segment, which is a minute-level time period set according to experience, such as 1 minute, 2 minutes, and 5 minutes; access frequency three is the number of visits within a fixed time before the access time; the fixed time is a set time period, which is an hour-level time period set according to experience, such as 1 hour and 2 hours.
[0071] When the access frequency 1 is greater than the access frequency threshold 1, the second segment detection tag is set to the second segment abnormal; otherwise, the second segment detection tag is set to the second segment normal; the second segment abnormal means the number of accesses within the set second segment is abnormal; the second segment normal means the number of accesses within the set second segment is normal;
[0072] When the access frequency 2 is greater than the access frequency threshold 2, the segment detection label is set to segment abnormal; otherwise, the segment detection label is set to segment normal; segment abnormal means the number of accesses in the set segment is abnormal; segment normal means the number of accesses in the set segment is normal;
[0073] When the access frequency three is greater than the access frequency threshold three; the time period detection label is set to the time period abnormal; otherwise, the time period detection label is set to the time period normal; the time period abnormality means the number of accesses within the set time period is abnormal; the time period normal means the number of accesses within the set time period is normal; the frequency detection label is generated based on the second segment detection label, the segment detection label and the time period detection label.
[0074] Generating a frequency detection tag according to the second segment detection tag, the segment detection tag and the time segment detection tag, including: determining whether the second segment detection tag is normal for the second segment;
[0075] If yes, determine whether the segment detection label is segment normal; if yes, when the time period detection label is time period normal, set the frequency detection label to normal frequency; otherwise, set the frequency detection label to first-level frequency abnormal; if no, set the frequency detection label to second-level frequency abnormal;
[0076] If not, set the frequency detection label to level 3 frequency anomaly;
[0077] The frequency detection flag includes normal frequency and abnormal frequency; the frequency abnormality includes primary frequency abnormality, secondary frequency abnormality and tertiary frequency abnormality.
[0078] In this embodiment, when the visitor's access frequency is normal in seconds, segments, or time periods, the frequency detection label is set to normal frequency; when the visitor's access frequency is abnormal in any one of the seconds, segments, and time periods, or more, the frequency detection label is set to abnormal frequency.
[0079] Dynamically generate access frequency thresholds based on visitor information, including:
[0080] Extract the maximum normal time period visit number, the maximum normal segment visit number and the maximum normal second period visit number from the daily frequency data in the visitor information; the daily frequency data includes the visit information of several corresponding visitors and their corresponding visit times; the maximum normal time period visit number is the number of visits in the set time period with the largest number of normal visits corresponding to the visitor in the frequency data; the maximum normal segment visit number is the number of visits in the set segment with the largest number of normal visits corresponding to the visitor in the frequency data; the maximum normal second period visit number is the number of visits in the set second period with the largest number of normal visits corresponding to the visitor in the frequency data; select several daily frequency data, the selected daily frequency data are continuous and close to the current visit time; calculate the average value of the maximum normal time period visit number in several daily frequency data and mark it as the average time period visit number PS, the average value of the maximum normal segment visit number is marked as the average segment visit number PF, and the average value of the maximum normal second period visit number is marked as the average second period visit number PM.
[0081] The access frequency threshold YM is calculated by the formula YM=BM+α1×(BM-PM)×arctan(PM-β1×BM); wherein BM is the original access frequency threshold one; α1 and β1 are proportional coefficients; and α1∈(0,1); β1∈(0,1);
[0082] The access frequency threshold value YF is calculated by the formula YF=BF+α2×(BF-PF)×arctan(PF-β2×BF); wherein BF is the original access frequency threshold value 2; α2 and β2 are proportional coefficients; and α2∈(0,1); β2∈(0,1);
[0083] The access frequency threshold three YS is calculated by the formula YS=BS+α3×(BS-PS)×arctan(PS-β3×BS); wherein BS is the original access frequency threshold three; α3 and β3 are proportional coefficients; and α3∈(0,1); β3∈(0,1).
[0084] The access frequency threshold includes access frequency threshold one, access frequency threshold two, and access frequency threshold three.
[0085] In this embodiment, the corresponding new access frequency threshold is calculated by the original access frequency threshold and the selected date frequency data; the original access frequency threshold is the previous access frequency threshold, including the original access frequency threshold one, the original access frequency threshold two and the original access frequency threshold three; it can be understood that the initial access frequency threshold is set manually; when the average number of visits in the selected date frequency data is more, it is necessary to increase the number of visits on the basis of the corresponding original access frequency threshold one to obtain the access frequency threshold one; when the average number of visits in the selected date frequency data is less, it is necessary to reduce the number of visits on the basis of the corresponding original access frequency threshold one to obtain the access frequency threshold one; the calculation method of the access frequency threshold two and the access frequency threshold three is similar to that of the access frequency threshold one, but the proportional coefficient values are not necessarily the same; the specific proportional coefficient values are set according to experience; in this embodiment, the access frequency threshold is dynamically generated through the visitor information of the visitor, so that when judging the abnormal access status of the visitor, the judgment standard is more in line with the current visitor's access habits, thereby making the visitor's abnormal judgment result more accurate.
[0086] The tenant blacklist is set according to the number of abnormalities of the first-level frequency abnormality, the second-level frequency abnormality, and the third-level frequency abnormality in the corresponding visitor information, including:
[0087] When the frequency detection tag is frequency anomaly; obtain the visitor information corresponding to the IP address; extract the first-level anomaly times of the first-level frequency anomaly; the second-level anomaly times of the second-level frequency anomaly; the third-level anomaly times of the third-level frequency anomaly;
[0088] Determine whether the frequency anomaly is a first-level frequency anomaly;
[0089] If yes, then when the number of first-level exceptions within the set time is greater than the first-level exception threshold, the corresponding visitor will be added to the tenant blacklist;
[0090] If no, determine whether the frequency anomaly is a level 2 anomaly; if yes, when the number of level 2 anomalies within the set time is greater than the level 2 anomaly threshold, the corresponding visitor will be added to the tenant blacklist; if no, when the number of level 3 anomalies within the set time is greater than the level 3 anomaly threshold, the corresponding visitor will be added to the tenant blacklist; among them, the level 1 anomaly threshold, the level 2 anomaly threshold and the level 3 anomaly threshold can be set based on experience.
[0091] In this embodiment, the security of tenant information is further ensured by adding visitors who have multiple access abnormalities to the tenant blacklist; it is worth noting that the visitors added to the tenant blacklist through the above method will be marked; and the access frequency of the corresponding visitor will be recorded, where the access frequency is the number of times the visitor applies for access but the reply instruction is a prohibited access; when the access frequency for multiple consecutive times is lower than the corresponding frequency threshold, the corresponding visitor will be removed from the tenant blacklist.
[0092] It can be understood that in this embodiment, the tenant can also independently add or remove the corresponding visitors from the tenant blacklist; however, the visitors added to the tenant blacklist by the tenant cannot be removed from the blacklist by the above method and can only be removed by the tenant; the visitors added to the tenant blacklist by non-tenant can also be removed from the tenant blacklist by the tenant.
[0093] The number of first-level anomalies, second-level anomalies and third-level anomalies will be reset to zero regularly; that is, the number of first-level anomalies, second-level anomalies and third-level anomalies will be reset to zero after the set reset time is reached. For example, if the set reset time is one month, then within a one-month period, as long as the corresponding visitor is not added to the tenant blacklist, the corresponding number of first-level anomalies, second-level anomalies and third-level anomalies will be reset to zero after one month.
[0094] See also Figure 3 ,The second aspect of the present invention provides an anti-attack system based on the visitor IP of the SAAS platform, including: a tenant information management module, a visitor access record module, an IP and tenant association module, an anti-attack strategy module and a data storage module;
[0095] Tenant information management module: obtain tenant information of tenants in the SAAS platform; the tenant information includes tenant name, visitor access record, tenant blacklist library and tenant ID;
[0096] Visitor access record module: when receiving a visitor's access request, obtain the visitor's IP address and access information; the access information includes the access source and access time; and generate visitor information based on the IP address and its corresponding access information;
[0097] IP and tenant association module: used to associate the tenant ID of the tenant with the IP of the corresponding visitor;
[0098] Anti-attack strategy module: obtain visitor information, generate reply instructions based on the visitor information; and execute the reply instructions; specifically, when the reply instruction is to prohibit access, "system busy" is displayed on the visitor's access device, and when the reply instruction is to allow access, the corresponding access data is displayed on the visitor's access device.
[0099] Visitor information is generated based on the integration of IP addresses and their corresponding access information, including: extracting the IP address and c segment in the access source; obtaining access information corresponding to several visitors with the same IP address and c segment through a data storage module; integrating the access information into several days of access information according to the access time; integrating several days of access information into visitor information.
[0100] In this embodiment, the access information with the same IP address and c segment is integrated into the visitor information of the same visitor, so that the division of the access information is more detailed, which is convenient for improving the accuracy of other operations.
[0101] Generate a reply instruction according to the visitor information, including: extracting a tenant blacklist in the tenant information; obtaining an IP address corresponding to the visitor; determining whether the IP address is in the tenant blacklist; if yes, setting a prohibition of access as a reply instruction;
[0102] If not, query the corresponding access frequency according to the IP address, generate a frequency detection tag according to the access frequency and the access frequency threshold, and determine whether the frequency detection tag is a frequency abnormality; if yes, set the prohibited access as a reply instruction; if not, set the allowed access as a reply instruction.
[0103] See also Figure 4-Figure 5 , visitor device refers to the network device used by users to access the tenant network, including mobile phones, tablets, computers and other devices that can be accessed through the Internet; tenants refer to tenants who use the Shuqi SaaS platform; the Shuqi cloud platform can be Badu Cloud, and all tenant requests are centrally managed by the Shuqi cloud platform; the gateway router is used to forward requests and perform basic security verification according to the business of different tenants; the IP identification server is used to analyze the source of visitor requests, identify the tenant's official website, configure access policies, derive reply instructions based on visitor information and access policies, and reply to the visitor's access information according to the reply instructions.
[0104] It can be understood that the access strategy here is to extract the tenant blacklist in the tenant information; obtain the IP address corresponding to the visitor; determine whether the IP address is in the tenant blacklist; if yes, set the prohibited access as a reply instruction; if no, query the corresponding access frequency according to the IP address, generate a frequency detection tag according to the access frequency and the access frequency threshold, and determine whether the frequency detection tag is a frequency abnormality; if yes, set the prohibited access as a reply instruction; if no, set the allowed access as a reply instruction.
[0105] The business cluster server is composed of several application servers to ensure the stability, low latency, high availability and high performance of the system; the application server refers to the application servers of different businesses of the enterprise, such as cloud calling, cloud collection business, CRM business and OA office business.
[0106] Part of the data in the above formula is calculated by removing the dimension and taking its numerical value. The formula is a formula closest to the actual situation obtained by software simulation of a large amount of collected data; the preset parameters and preset thresholds in the formula are set by technical personnel in this field according to actual conditions or obtained through simulation of a large amount of data.
[0107] How this application works:
[0108] The present application obtains the visitor's IP address and the tenant ID of the tenant accessed by the visitor, obtains the tenant information according to the tenant ID query, and extracts the tenant blacklist in the tenant information; when the visitor's IP address is in the tenant blacklist, the access prohibition is set as a reply instruction; otherwise, the corresponding visitor information and access frequency are queried according to the IP address; an access frequency threshold is dynamically generated according to the visitor information; a frequency detection tag is generated according to the access frequency and the access frequency threshold; a reply instruction is set according to the detection tag; the present application dynamically generates an access frequency threshold through the visitor's visitor information, determines whether the visitor status of the corresponding visitor is abnormal according to the access frequency threshold, can promptly detect the visitor's abnormal behavior, and promptly restrict the visitor's access; ensures that the tenant information is not leaked, and increases the security of the platform.
[0109] The above embodiments are only used to illustrate the technical method of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical method of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present application.
Claims
1. An anti-attack method based on the visitor IP of SAAS platform, characterized in that: The following steps are involved: Step 1: Obtain the visitor's IP address and the tenant ID of the tenant the visitor accesses; Step 2: Obtain tenant information according to the tenant identifier, extract the tenant blacklist in the tenant information; determine whether the IP address is in the tenant blacklist; If yes, set the access prohibition as a reply instruction and go to step 5; If not, proceed to step 3; Step 3: Query the corresponding visitor information and access frequency according to the IP address; Dynamically generate access frequency thresholds based on visitor information; generate frequency detection tags based on access frequency and access frequency thresholds; Step 4: Determine whether the frequency detection tag is abnormal; If yes, set the access prohibition as a reply instruction and go to step 5; No, then set Allow Access as the reply instruction; And proceed to step five; Step 5: Get and execute the reply command.
2. According to claim 1, a method for preventing attacks based on the visitor IP of a SAAS platform is characterized in that: The tenant identifier is generated by a snowflake algorithm.
3. According to claim 1, a method for preventing attacks based on the visitor IP of a SAAS platform is characterized in that: Generating the frequency detection tag according to the access frequency and the access frequency threshold includes: Obtain the visit time of this visitor; query the visitor access record corresponding to the visitor according to the visit time for the visit frequency 1 within the set second period; the visit frequency 2 within the set segment; the visit frequency 3 within the set time period; the visit frequency includes the visit frequency 1, the visit frequency 2 and the visit frequency 3; When the access frequency 1 is greater than the access frequency threshold 1, the second segment detection tag is set to the second segment abnormal; otherwise, the second segment detection tag is set to the second segment normal; When the access frequency 2 is greater than the access frequency threshold 2, the segment detection label is set to segment abnormal; otherwise, the segment detection label is set to segment normal; When the access frequency three is greater than the access frequency threshold three, the time period detection tag is set to the time period abnormal; otherwise, the time period detection tag is set to the time period normal; Generate frequency detection labels based on second detection labels, segment detection labels, and time period detection labels.
4. According to claim 3, the anti-attack method based on the visitor IP of the SAAS platform is characterized in that: The generating of the frequency detection label according to the second segment detection label, the segment detection label and the time period detection label comprises: Determine whether the second segment detection tag is normal for the second segment; If yes, determine whether the segment detection label is segment normal; if yes, when the time period detection label is time period normal, set the frequency detection label to normal frequency; otherwise, set the frequency detection label to first-level frequency abnormal; if no, set the frequency detection label to second-level frequency abnormal; If not, set the frequency detection label to level 3 frequency anomaly; The frequency detection flag includes normal frequency and abnormal frequency; the frequency abnormality includes primary frequency abnormality, secondary frequency abnormality and tertiary frequency abnormality.
5. According to claim 3, the anti-attack method based on the visitor IP of the SAAS platform is characterized in that: The dynamically generating the access frequency threshold according to the visitor information includes: Extract the maximum normal time period visits, the maximum normal segment visits and the maximum normal second visits from the daily frequency data in the visitor information; select a number of daily frequency data, calculate the average value of the maximum normal time period visits in the number of daily frequency data and mark it as the average time period visits PS, the average value of the maximum normal segment visits is marked as the average segment visits PF, and the average value of the maximum normal second visits is marked as the average second visits PM; The access frequency threshold YM is calculated by the formula YM=BM+α1×(BM-PM)×arctan(PM-β1×BM); wherein BM is the original access frequency threshold one; α1 and β1 are proportional coefficients; and α1∈(0,1); β1∈(0,1); The access frequency threshold value YF is calculated by the formula YF=BF+α2×(BF-PF)×arctan(PF-β2×BF); wherein BF is the original access frequency threshold value 2; α2 and β2 are proportional coefficients; and α2∈(0,1); β2∈(0,1); The access frequency threshold three YS is calculated by the formula YS=BS+α3×(BS-PS)×arctan(PS-β3×BS); wherein BS is the original access frequency threshold three; α3 and β3 are proportional coefficients; and α3∈(0,1); β3∈(0,1); The access frequency threshold includes access frequency threshold one, access frequency threshold two and access frequency threshold three.
6. The method for preventing attacks based on the visitor IP of a SAAS platform according to claim 4, characterized in that: The blacklist is set according to the number of abnormalities of the first-level frequency abnormality, the second-level frequency abnormality and the third-level frequency abnormality in the corresponding visitor information, including: When the frequency detection tag is frequency anomaly; obtain the visitor information corresponding to the IP address; extract the first-level anomaly times of the first-level frequency anomaly; the second-level anomaly times of the second-level frequency anomaly; the third-level anomaly times of the third-level frequency anomaly; Determine whether the frequency anomaly is a first-level frequency anomaly; If yes, then when the number of first-level exceptions within the set time is greater than the first-level exception threshold, the corresponding visitor will be added to the tenant blacklist; If no, determine whether the frequency anomaly is a level 2 anomaly; if yes, when the number of level 2 anomalies within the set time is greater than the level 2 anomaly threshold, the corresponding visitor will be added to the tenant blacklist; if no, when the number of level 3 anomalies within the set time is greater than the level 3 anomaly threshold, the corresponding visitor will be added to the tenant blacklist.
7. The method for preventing attacks based on the visitor IP of a SAAS platform according to claim 6, characterized in that: The first level abnormality times, the second level abnormality times and the third level abnormality times are reset to zero periodically.
8. An anti-attack system based on a SAAS platform visitor IP, applied to an anti-attack method based on a SAAS platform visitor IP as described in any one of claims 1 to 7; comprising: Tenant information management module, visitor access record module, IP and tenant association module, anti-attack strategy module and data storage module, characterized in that: The tenant information management module: obtains tenant information of tenants in the SAAS platform; the tenant information includes tenant name, visitor access record, tenant blacklist library and tenant identification; The visitor access record module: when receiving a visitor's access request, obtains the visitor's IP address and access information; the access information includes the access source and access time; and generates visitor information based on the IP address and its corresponding access information integration; The IP and tenant association module is used to associate the tenant identifier of the tenant with the IP address of the corresponding visitor; The anti-attack strategy module: obtains visitor information, generates a reply instruction according to the visitor information; and executes the reply instruction.
9. The anti-attack system based on the visitor IP of SAAS platform according to claim 8, characterized in that: The generating visitor information based on the IP address and its corresponding access information integration includes: Extract the IP address and c segment from the access source; obtain the access information corresponding to several visitors with the same IP address and c segment through the data storage module; integrate the access information into several days of access information according to the access time; integrate several days of access information into visitor information.
10. The anti-attack system based on the visitor IP of SAAS platform according to claim 8, characterized in that: The generating of a reply instruction according to the visitor information includes: Extract the tenant blacklist from the tenant information; obtain the IP address corresponding to the visitor; Determine whether the IP address is in the tenant blacklist; if yes, set the access prohibition as a reply instruction; If not, query the corresponding access frequency according to the IP address, generate a frequency detection tag according to the access frequency and the access frequency threshold, and determine whether the frequency detection tag is a frequency abnormality; if yes, set the prohibited access as a reply instruction; if not, set the allowed access as a reply instruction.
Citation Information
Patent Citations
Web site anti-attack system based on cloud computing
CN113821755A
