[go: up one dir, main page]

CN119316231B - WAF-based attack flow countering method and system - Google Patents

WAF-based attack flow countering method and system Download PDF

Info

Publication number
CN119316231B
CN119316231B CN202411854267.7A CN202411854267A CN119316231B CN 119316231 B CN119316231 B CN 119316231B CN 202411854267 A CN202411854267 A CN 202411854267A CN 119316231 B CN119316231 B CN 119316231B
Authority
CN
China
Prior art keywords
page
access request
preset
waf
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202411854267.7A
Other languages
Chinese (zh)
Other versions
CN119316231A (en
Inventor
陈俊章
陈功
陈凯平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Anquan Digital Intelligence Technology Co ltd
Original Assignee
Hangzhou Anquan Digital Intelligence Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Anquan Digital Intelligence Technology Co ltd filed Critical Hangzhou Anquan Digital Intelligence Technology Co ltd
Priority to CN202411854267.7A priority Critical patent/CN119316231B/en
Publication of CN119316231A publication Critical patent/CN119316231A/en
Application granted granted Critical
Publication of CN119316231B publication Critical patent/CN119316231B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiments of the present disclosure relate to the field of network security technologies, and in particular, to a method and a system for countering attack traffic based on WAF. The method comprises the steps of detecting whether an access request is attack flow according to a preset WAF matching rule, marking a source IP of the attack flow as a mark IP when the access request is attack flow, sending real person verification to an access terminal, generating a response page according to a page requested by the access request and a preset simulated vulnerability page when the real person verification is passed, and sending the response page to the access terminal, and generating an induction file and prompting downloading when the mark IP and the response page are interacted to meet a preset triggering condition, wherein the induction file comprises a preset countercheck code.

Description

WAF-based attack flow countering method and system
Technical Field
The embodiments of the present disclosure relate to the field of network security technologies, and in particular, to a method and a system for countering attack traffic based on WAF.
Background
The web pages have high value, are the main windows for enterprises and organizations to exist online, and are used for displaying products, attracting clients and promoting sales. Meanwhile, the web pages are centers for data collection and analysis, so that enterprises are helped to optimize market strategies and improve user experience. In addition, the web page is an important defense line for information security, and user data and service continuity are protected. At the social level, web pages provide public service information and educational resources, enhancing transparency and engagement. Therefore, it is important to enhance the security and functionality of web pages. Attack traffic countering by Web Application Firewalls (WAFs) is an important means of protecting Web applications from various attacks. Attack traffic countermeasures not only detect and block attacks, but also include a series of response measures to ensure the security and usability of the system. The security of the webpage can be improved, but the current network security is in an unequal attack and defense state. In network security, defenders tend to be overly concerned with passive defenses, while attackers have little cost and risk. Such an unequal pair causes the attacker to become unscrupulous and the defender is always in a passive state. Risks and challenges are brought to web page security, so new defense strategies need to be studied to help contain the attack.
Disclosure of Invention
Various embodiments of the present specification describe a WAF-based attack traffic countering method and system.
In a first aspect, an embodiment of the present disclosure provides a WAF-based attack traffic countering method, including the steps of:
detecting whether the access request is attack flow or not according to a preset WAF matching rule;
When the access request is attack flow, marking a source IP of the attack flow, marking the source IP as a mark IP, and sending a true man verification to an access terminal;
When the verification of the true man is passed, generating a response page according to the page requested by the access request and a pre-configured simulated vulnerability page, and sending the response page to an access terminal;
And when the interaction between the mark IP and the response page meets a preset trigger condition, generating an induction file and prompting downloading, wherein the induction file comprises a preset countercheck code.
In a second aspect, embodiments of the present disclosure provide a WAF-based attack traffic countering system, including:
The detection module is used for detecting whether the access request is attack flow or not according to a preset WAF matching rule;
The verification module marks the source IP of the attack flow when the access request is the attack flow, marks the source IP as the mark IP and sends the verification of the true man to the access terminal;
The response module generates a response page and sends the response page to the access terminal according to the page requested by the access request and a pre-configured simulated vulnerability page when the real person passes verification;
and the countering module is used for generating an induction file and prompting downloading when the interaction between the mark IP and the response page meets a preset trigger condition, wherein the induction file comprises a preset countering code.
In a third aspect, embodiments of the present disclosure provide an electronic device comprising a processor and a memory;
the processor is connected with the memory;
The memory is used for storing executable program codes;
The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the method of any one of the above aspects.
In a fourth aspect, embodiments of the present description provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method of any of the above aspects.
In a fifth aspect, embodiments of the present description provide a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the above aspects.
The technical scheme provided by some embodiments of the present specification has the following beneficial effects:
In various embodiments of the present disclosure, a WAF-based attack traffic countering method and system are provided that actively induce an attacker to interact multiple times, thereby collecting more information about the attack and knowing the type of information that the attacker is interested in. And the self-confidence that the attacker has attacked successfully is enhanced, so that the vigilance is relaxed, the induced file is easier to actively download and open, and finally the attack is counteracted. By simulating the vulnerability page to generate the response page, the attack flow can not access to the page which normally provides the service, and the safe operation of the server is ensured.
Other features and advantages of various embodiments of the present disclosure will be further disclosed in the following detailed description, the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present description, the drawings that are required in the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present description, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an application scenario schematic diagram of an attack traffic countering method according to an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of another application scenario of the attack traffic countering method according to the embodiment of the present disclosure.
Fig. 3 is a schematic diagram of an application architecture of an attack traffic countering method according to an embodiment of the present disclosure.
Fig. 4 is a schematic flow chart of an attack traffic countering method according to an embodiment of the present disclosure.
Fig. 5 is a flow chart of a method for detecting attack traffic according to an embodiment of the present disclosure.
Fig. 6 is a flowchart of a method for configuring a simulated vulnerability page according to an embodiment of the present disclosure.
Fig. 7 is a flowchart of a method for generating a response page according to an embodiment of the present disclosure.
Fig. 8 is a flowchart of a method for generating an induced file according to an embodiment of the present disclosure.
Fig. 9 is a schematic diagram of an attack traffic countering system according to an embodiment of the present disclosure.
Fig. 10 is a schematic diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions of the embodiments of the present specification are explained and illustrated below with reference to the drawings of the embodiments of the present specification, but the following embodiments are only preferred embodiments of the present specification, and not all the embodiments. Based on the examples in the implementation manner, those skilled in the art may obtain other examples without making any creative effort, which fall within the protection scope of the present specification.
The terms first, second, third and the like in the description and in the claims and in the above drawings are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
In the following description, directional or positional relationships such as the terms "inner", "outer", "upper", "lower", "left", "right", etc., are presented merely to facilitate describing the embodiments and simplify the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operate in a particular orientation, and therefore should not be construed as limiting the description.
The data related to the application are information and data authorized by the user or fully authorized by all parties, and the collection of the related data complies with related laws and regulations and standards of related countries and regions.
The technical scheme related by the application is implemented under legal compliance conditions.
Before describing the technical scheme, the application scenario of the technical scheme and related technologies are described.
In the current internet environment, the servers 10 deployed on the network are not at any time at risk for various types of attacks. While WEB applications are becoming more and more rich, WEB servers are becoming a major target of attack with their powerful computing power, processing performance, and high value involved. SQL injection, web page tampering, web page hanging, etc., are frequently occurring. These attacks include, but are not limited to, scanning of web service instrumentation tools, malicious crawling of automated crawlers, and targeted attacks initiated by a human. These attacks are diverse and complex, ranging from simple port scanning to complex zero-day exploits, which can pose a serious threat to the security and stability of the server 10.
Web Application Firewalls (WAFs) are one of the important tools to protect the server 10 from network attacks. WAF 20 detects and intercepts potentially malicious requests by matching against known network vulnerabilities writing specific rules. However, the protective capabilities of WAF 20 are not without loss. For undisclosed network attacks, especially those that utilize zero-day vulnerabilities, WAF 20 tends to have difficulty in achieving effective interception. These unknown ways of attack may bypass existing protection rules, resulting in the server 10 still being at risk of being breached.
Therefore, in performing a network attack event trace-back analysis afterwards, as many valuable threads as possible need to be collected. These threads include, but are not limited to, the IP address of the attacker, the time and frequency of the attack, the attack tools and techniques used, the specific interfaces and parameters being attacked, etc. By comprehensively analyzing the information, the characteristics and the behavior patterns of the attacker can be more accurately identified, so that references are provided for future protection strategies.
But the current network security is in an unequal state of attack and defense. In network security protection, defenders often focus too much on passive defense, and lack countering strategies, the attacker has little cost and risk. Such an unequal causes the attacker to become unscrupulous and the defender to remain in a passive state, which is detrimental to the security of the web server 10.
Particularly in an internet of things (IoT) environment, many devices use web pages as access and control interfaces. This is because web interfaces have advantages of cross-platform, ease of use, and scalability. The Internet of things equipment using web pages as access and control interfaces is widely applied to various scenes, from smart home to industrial production, from medical health to agricultural management, and to smart city and security monitoring. The usability and the cross-platform characteristic of the webpage interface enable a user to access and control the devices through the browser at any time and any place, and the usability and the management efficiency of the devices are improved. However, this also presents a security challenge, requiring appropriate security measures to be taken to protect these devices from attack. Under the condition of high-speed development of the Internet of things, the access and control of the Internet of things equipment are also in a severe security situation.
Therefore, the specification provides a WAF-based attack flow countering method and system, which can realize the identification, interception, tracking and countering of attacks. And contributes to improving the security of the network. Please refer to fig. 1, which is a schematic diagram illustrating an application scenario of the technical solution described in the present specification. The page 11 for providing the service and the simulated vulnerability page 12 are both provided on the server 10. WAF 20 may be located on either server 10 or on a dedicated firewall server 2110 (as shown in fig. 2). The access request sent by the request end 30 reaches the WAF 20 first, the WAF 20 performs screening, the normal access request is directed to the requested page 11 capable of providing service, the attack access request is redirected to the simulated vulnerability page 12, and finally the countercheck is realized. The method described in this specification runs on the server 10. When WAF 20 is provided on a dedicated firewall server 21, part of the steps run on firewall server 21 and part of the steps run on server 10.
The method provided by the application is applied to a system architecture shown in fig. 3, fig. 3 is a schematic diagram of the system architecture in the embodiment of the application, and as shown in fig. 3, the system architecture includes a server 10 and a terminal device, and a request end 30 (i.e. a web browser) is deployed on the terminal device. The server 10 according to the present application may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal device may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a palm computer, a personal computer, a smart speaker, a smart television, a smart watch, a vehicle-mounted device, a wearable device, and the like. The terminal device and the server 10 may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein. The number of servers 10 and terminal devices is not limited either.
In view of the many terms involved in the present application, these terms will be described first.
WAF
WAF refers to a Web application defense system (also called as a Web application level intrusion prevention system, english: web Application Firewall, abbreviated as WAF). Web application firewalls are a product that provides protection for Web applications specifically by enforcing a series of security policies for HTTP/HTTPs.
Attack traffic
Attack traffic refers to network traffic in the internet that is initiated by a malicious attacker and is intended to cause damage, interference or unauthorized access to the target system or network. Such traffic often contains specific malicious activities such as probing, scanning, injection, denial of service, etc., intended to disrupt the proper functioning of the target system or steal sensitive information. The attack flow can perform illegal operations on the target system or the network or have destructive results, such as destroying system components, so that the target system cannot normally operate, and service interruption is caused. And (5) stealing information and acquiring sensitive information of a target system, such as user data, passwords, financial information and the like. Tampering with the information modifies the data in the target system, resulting in data inconsistencies or errors. Unauthorized access, obtaining unauthorized access rights to the target system, and performing illegal operation.
Induction file
Induced files (Lure Files) refer to files that are deliberately placed in the system or on the network, with the purpose of attracting the attention of an attacker, inducing them to download or access the files. These files typically contain content that disguises as legitimate files, but actually contain countering code so that the security team can detect and analyze the activity of the attacker.
Inverse code
The reaction code (Countermeasures Code) refers to a specially designed code or script for detecting, preventing, or responding to an attack. The countering code may be integrated into a variety of security tools and systems, such as firewalls, intrusion Detection Systems (IDS), intrusion Prevention Systems (IPS), and the like.
The main functions of the countering code are detection and alerting, and predefined response measures can be automatically performed, such as blocking malicious IP addresses, quarantining infected hosts, etc. Detailed attack logs may also be recorded, including attacker behavior, time stamps, attack means, etc. Data support is provided for subsequent attack analysis and evidence collection.
The present disclosure first provides a WAF-based attack traffic countering method, referring to fig. 4, including the steps of:
step S101) detects whether the access request is attack traffic or not according to a preset WAF matching rule.
Web Application Firewalls (WAFs) detect and block various types of network attacks through preset matching rules.
Illustratively, the matching rules for SQL injection attack traffic are:
"@rx(union\s+select|exec\s+\(|insert\s+into|update\s+set|delete\s+from)" "id:100,rev:1,severity:2,msg:'SQL Injection Attack Detected',logdata:'Matched Data:%{TX.0} found within %{MATCHED_VAR_NAME}: %{MATCHED_VAR}',
phase:2,deny,status:403,t:lowercase,t:replaceNulls,t:compressWhitespace"。
the matching rules are capable of detecting and blocking requests containing SQL injection features, such as ' union select ', ' exec (' insert intero ', ' update set ' and ' delete from ', etc. specifically, regular expressions ' @rx (union \s+select |exec\s + (|insert\s + inter|update\s + set|delete\s + from ') are used to detect whether the request parameters contain SQL injection features, if matching is successful, the access request is determined to be attack flow, wherein't: lowercase ' converts the input into lowercase,'t: replaceNulls ' replaces null characters, and't: compressWhitespace ' compresses blank characters to improve matching accuracy.
Still another exemplary, matching rules for cross site scripting attack (XSS) attack traffic are:
"@rx (<script>|<iframe>|onerror=|alert\()" "id:101,rev:1,severity:2,msg:'XSS Attack Detected',logdata:'Matched Data: %{TX.0} found within %{MATCHED_VAR_NAME}: %{MATCHED_VAR}',phase:2,deny,status:403,t:lowercase,t:replaceNulls,t:compressWhitespace".
The matching rule can detect and prevent requests containing cross-site scripting attack features, such as ' script > ', iframe > ' onerror = ' and ' alert (', etc. whether the request parameters contain XSS attack features is detected by using a regular expression @ rx (< script > | < iframe > | onerror = |alert\ () '.
Still another exemplary matching rule for cross-site request forging (CSRF) is:
SecRule REQUEST_HEADERS:Referer "!@streq http://example.com" "id:102,rev:1,severity:2,msg:'CSRF Attack Detected',logdata:'Invalid Referer: %{REQUEST_HEADERS:Referer}',phase:2,deny,status:403"
The matching rules can detect and block requests for missing valid CSRF tokens, ensuring that the requests come from legitimate sources. Check if the requested 'reference' header is equal to 'http:// sample. Com', if not, consider a CSRF attack.
Through these example rules, the WAF may perform effective detection of matching attack traffic based on the characters contained in the URL. In practice, these rules may be adapted and extended by techniques disclosed in the art, depending on the specific needs and circumstances.
Step S102) when the access request is attack traffic, marking the source IP of the attack traffic as the mark IP, and sending the authentication to the access terminal. After the attack traffic is detected, the source IP of the attack traffic is marked as a mark IP. This may be accomplished by setting an environment variable, such as using code setenv: ATTACK _ip=% { remote_addr }. A verification page (e.g., verify. Php) for verification of a person is created for verification of the person. This page may contain a passcode, slide verification, or other form of verification mechanism.
Illustratively, verification is performed using the following verification code. The verification code is displayed on the verification page with a complex background.
< P > please complete the following authentication to continue access. </p)
<form action="/verify.php" method="post">
< Label for= "captcha" > please input verification code: </label >
<input type="text" id="captcha" name="captcha" required>
<input type="hidden" name="ip" value="<?php echo htmlspecialchars($ip); ?>">
< Button type= "submit" > verify button)
</form>
After receiving the submitted form, the server 10 uses if ($captcha= = '123456')/(example verification code// verification pass, clears the flag, and can determine whether it is a person.
Step S103), when the verification of the real person is passed, a response page is generated according to the page requested by the access request and the pre-configured simulated vulnerability page 12 and sent to the access terminal.
The simulated vulnerability page 12 appears to be a page with vulnerabilities, but is actually only used to confuse and track the attacker. The page format and content of the simulated vulnerability pages 12 are highly similar to the pages 11 that normally provide service, except that the specific content is modified. So that an attacker cannot distinguish the authenticity. For example, if the user requests a control page, the returned response page also displays the same control, but the control parameters and the object information of the control are modified and displayed as erroneous information. Making an attacker misunderstand that the attack is successful.
Step S104), when the interaction between the mark IP and the response page meets the preset trigger condition, generating an induction file and prompting the downloading, wherein the induction file comprises a preset countercheck code. When an attacker interacts multiple times, i.e. sends access requests multiple times, the corresponding server 10 generates multiple response pages. A plurality of records of interactions with the response page may be formed. And when the interaction meets the preset triggering condition, generating an induction file and prompting downloading. The reaction code set in the induced file may be set using techniques disclosed in the art.
On the other hand, recording the interaction logs of all the access requests within the preset time. Referring to fig. 5, the method for detecting whether the access request is attack traffic according to the preset WAF matching rule includes:
step S201) determines whether the IP address used by the access request matches the tag IP, and if so, determines that the access request is attack traffic.
Step S202) reading the URL of the access request, analyzing the parameters of the URL, matching the parameters with a preset WAF matching rule, and if the parameters are matched, judging that the access request is attack flow.
Step S203), if the matching is not consistent, the interaction record of the IP address used by the access request is obtained from the interaction log.
Step S204) matching the interaction record with a preset interaction rule, and if the matching is consistent, judging the request as attack flow.
It should be noted that the web interaction determines that each access request is a new URL-carried access request. But can determine whether it is an access of the requesting end 30 that has previously made an access by the IP address of the source. Of course, the request end 30 conditionally replaces the IP address, when the request end 30 replaces the IP address, the tag IP cannot identify that the new access request is attack traffic. When attack traffic cannot be identified by the tag IP, then the WAF matching rule is used for matching.
The WAF matching rule presetting method comprises the step of generating matching rules of characters, commands and parameters according to the configured attack types.
The method for presetting the interaction rules comprises the step of generating matching rules about interaction times, interaction frequencies and interaction similarity according to the configured abnormal access types.
When none of the previous multiple access requests originating from an IP address are labeled as labeled IP, but multiple access requests are found to be too frequent (e.g., 1000 access requests per second for 1 second), or the interaction similarity is too high, e.g., repeated requests to access the same page or repeated operations to submit a form on the page. And judging that the access request belongs to attack traffic through the interaction similarity. Specifically, the preset interaction rule may be set such that the number of interactions is greater than a set threshold, or the frequency of interactions is greater than a set threshold, or the degree of similarity of interactions is greater than a set threshold.
On the other hand, referring to fig. 6, the method for pre-configuring the simulated vulnerability page 12 includes:
Step S301) modifies the content of the page requested by the access request as the content of the simulated vulnerability page 12. The use program is automatically modified, and the modification can be performed through a modification template which is manually configured in advance. The real data and information are modified to erroneous data and information.
Step S302) sets the simulated vulnerability page 12 not to trigger WAF matching rules and the interaction rules.
Step S303) configures a redirection rule, which redirects the subsequent access request of the tag IP to a preset defending page.
Step S304) the defending page generates a new response page according to the subsequent access request and sends the new response page to the access terminal.
On the other hand, in another embodiment, referring to fig. 7, the method for generating, by the defending page, a new response page according to the subsequent access request and sending the new response page to the access terminal includes:
Step S401) reads the content of the page requested by the subsequent access request, and obtains the duty ratio of the information type in the content, where the information type includes data information, account information and status information.
The method specifically comprises the steps of reading content from a requested page, extracting information in the page by using a text analysis technology, classifying the extracted information into data information, account information and state information, and finally calculating the duty ratio of each information type.
Illustratively, the following code is used to read the content from the requested page:
function fetch_page_content($url){$ch = curl_init($url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $content = curl_exec($ch); curl_close($ch); return $content;}, And then extracting information in the page by using a regular expression or other text parsing technology.
Illustratively, the regular expression is as follows:
preg_match_all('/<div class="data">(.*?)<\/div>/is', $content, $matches_data);
preg_match_all('/<div class="account">(.*?)<\/div>/is', $content, $matches_account);
preg_match_all('/<div class="status">(.*?)<\/div>/is', $content, $matches_status)。
Respectively used for matching data information, account information and state information. Illustratively, the web page accessed is an intelligent home control page. The data information then contains data relating to device status, environmental parameters, etc. For example, temperature, the current indoor temperature value. Humidity, the current indoor humidity value. Illumination intensity is the current indoor illumination intensity value. Air quality: the current indoor air quality index. Energy consumption, namely energy consumption data of equipment. Sensor data, data of various sensors (such as smoke sensor and infrared sensor).
The account information contains information related to the user account. For example, a user name, a login name of the user. Password-the user's login password (typically not shown in plain text on the page, but may be present in a form). Mailbox-registered mailbox address of user. Mobile phone number, the registered mobile phone number of the user. User ID: unique identifier of user. Permission level, which is the permission level of the user, such as an administrator, a common user and the like.
The status information contains data related to device status, system status, etc. For example, device status, online/offline status of the device. Connection status-connection status of device with server 10. Battery power-battery power of the device. Fault information, fault information of the device or error code. Operational state-the current operational state of the device, such as on/off, run/pause, etc. Update status: firmware update status of the device. The duty cycle of each information type is obtained from the number of bytes occupied by the three types of information.
Step S402) modifies the content of the requested page as the content of the response page.
Step S403) obtaining the information type with the largest duty ratio, recording the information type as the main information type, generating more information of the main information type, and adding the information type into the response page.
Step S404) sends the response page to the access terminal.
Illustratively, the attacker is more interested in the state information and therefore will continually access pages with more state information displayed.
The preset triggering condition comprises the step of setting the triggering condition according to the duty ratio of the main information type in the content of the response page. Referring to fig. 8, when the duty ratio of the main information type exceeds a preset threshold, the method for generating the induced file includes:
Step S501) generates information of the main information type as the content of the induced file.
Step S502) generating a reaction code to be added to the induced file.
Step S503) generates a file name of the induced file according to the main information type.
When the attacker is more interested in the state information, the attacker is specially generated with a file which claims to record a large amount of historical state information or a file which claims to record all the current states is generated, and the file is an induction file, so that the attacker can more easily and actively download the induction file. The reaction code may be added by techniques known in the art.
Through actively inducing the attacker to interact for a plurality of times, more information about the attack is collected, and the types of information of interest to the attacker are known. And the self-confidence that the attacker has attacked successfully is enhanced, so that the vigilance is relaxed, the induced file is easier to actively download and open, and finally the attack is counteracted.
In another aspect, the present disclosure provides a WAF-based attack traffic countering system, referring to fig. 9, including:
The detection module 100 detects whether the access request is attack flow according to a preset WAF matching rule;
The verification module 200 marks the source IP of the attack flow when the access request is the attack flow, marks the source IP as the mark IP and sends the verification of the true man to the access terminal;
the response module 300 generates a response page and sends the response page to the access terminal according to the page requested by the access request and the pre-configured simulated vulnerability page 12 when the verification of the real person is passed;
And the reverse module 400 is used for generating an induction file and prompting downloading when the interaction of the mark IP and the response page meets the preset trigger condition, wherein the induction file comprises a preset reverse code.
Please refer to fig. 10, which illustrates a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 10, the electronic device 1100 may include at least one processor 1101, at least one network interface 1104, a user interface 1103, a memory 1105, and at least one communication bus 1102. Wherein communication bus 1102 is operable to facilitate connection communications among the various components described above. The user interface 1103 may comprise keys and the optional user interface may also comprise a standard wired interface, a wireless interface. The network interface 1104 may include, but is not limited to, a bluetooth module, an NFC module, a Wi-Fi module, and the like. Wherein the processor 1101 may comprise one or more processing cores. The processor 1101 connects various portions of the overall electronic device 1100 using various interfaces and lines, performs various functions of the routing device 1100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1105, and invoking data stored in the memory 1105. Alternatively, the processor 1101 may be implemented in at least one hardware form of DSP, FPGA, PLA. The processor 1101 may integrate one or a combination of several of a CPU, GPU, modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like, the GPU is used for rendering and drawing contents required to be displayed by the display screen, and the modem is used for processing wireless communication.
It will be appreciated that the modem may not be integrated into the processor 1101 and may be implemented by a single chip.
The memory 1105 may include RAM or ROM. Optionally, the memory 1105 includes a non-transitory computer readable medium. Memory 1105 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1105 may include a stored program area that may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, etc., and a stored data area that may store data related to the various method embodiments described above, etc. The memory 1105 may also optionally be at least one storage device located remotely from the processor 1101. The memory 1105, which is a type of computer storage medium, may include an operating system, a network communication module, a user interface module, and application programs. The processor 1101 may be used to invoke the application program stored in the memory 1105 and perform the methods of the various embodiments described above.
The present description also provides a computer-readable storage medium having instructions stored therein, which when executed on a computer or processor, cause the computer or processor to perform the steps of the above embodiments. The above-described constituent modules of the electronic apparatus may be stored in the computer-readable storage medium if implemented in the form of software functional units and sold or used as independent products.
The present description also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the above embodiments.
The technical features in the present examples and embodiments may be arbitrarily combined without conflict.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes a plurality of computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present description, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (Digital Subscriber Line, DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of a plurality of available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disk (DIGITAL VERSATILE DISC, DVD)), or a semiconductor medium (e.g., a Solid state disk (Solid STATE DISK, SSD)), or the like.
When the method is realized by hardware and firmware, the method flow is programmed into a hardware circuit to obtain a corresponding hardware circuit structure, so as to realize corresponding functions. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (FieldProgrammable GATEARRAY, FPGA)) is an integrated circuit whose logic functions are determined by user programming of the device. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, today, instead of manually fabricating integrated circuit chips, such programming is most often implemented with "logic compiler (logic compiler)" software, which is similar to the software compiler used in program development and writing, and the original code before it is compiled is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), which is not just one but a plurality of HDL. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The above-described embodiments are merely preferred embodiments of the present disclosure, and do not limit the scope of the disclosure, and various modifications and improvements made by those skilled in the art to the technical solutions of the disclosure should fall within the protection scope defined by the claims of the disclosure without departing from the design spirit of the disclosure.

Claims (8)

1.基于WAF的攻击流量反制方法,其特征在于,包括步骤:1. A WAF-based attack traffic countermeasure method, characterized in that it comprises the following steps: 根据预设的WAF匹配规则检测访问请求是否为攻击流量;Detect whether the access request is attack traffic based on the preset WAF matching rules; 当所述访问请求为攻击流量时,标注所述攻击流量的来源IP,记为标记IP,向访问端发送真人验证;When the access request is attack traffic, mark the source IP of the attack traffic as the marked IP, and send a real person verification to the access end; 当所述真人验证通过时,根据所述访问请求所请求的页面,以及预先配置的模拟漏洞页面,生成响应页面发送给访问端;When the real person verification is passed, a response page is generated according to the page requested by the access request and the pre-configured simulated vulnerability page and sent to the access end; 当所述标记IP与所述响应页面交互满足预设的触发条件时,生成诱导文件并提示下载,所述诱导文件包括预设的反制代码;When the interaction between the marked IP and the response page meets the preset trigger condition, an inducement file is generated and prompted to download, wherein the inducement file includes a preset countermeasure code; 预先配置模拟漏洞页面的方法包括:Methods for pre-configuring simulated vulnerability pages include: 修改所述访问请求所请求的页面的内容,作为所述模拟漏洞页面的内容;Modifying the content of the page requested by the access request as the content of the simulated vulnerability page; 设置所述模拟漏洞页面不触发WAF匹配规则及交互规则;Set the simulated vulnerability page not to trigger WAF matching rules and interaction rules; 配置重定向规则,所述重定向规则将所述标记IP的后续访问请求均重定向到预设的防御页面;Configure a redirection rule, wherein the redirection rule redirects subsequent access requests of the marked IP to a preset defense page; 所述防御页面根据所述后续访问请求,生成新的响应页面发送给访问端;The defense page generates a new response page according to the subsequent access request and sends it to the access end; 所述防御页面根据所述后续访问请求,生成新的响应页面发送给访问端的方法包括:The method in which the defense page generates a new response page according to the subsequent access request and sends it to the access end includes: 读取所述后续访问请求所请求的页面的内容,获得所述后续访问请求所请求的页面的内容中信息类型的占比,所述信息类型包括数据信息、账号信息及状态信息;Reading the content of the page requested by the subsequent access request, and obtaining the proportion of information types in the content of the page requested by the subsequent access request, wherein the information types include data information, account information, and status information; 修改所请求的页面的内容,作为所述响应页面的内容;Modify the content of the requested page as the content of the response page; 获得占比最大的信息类型,记为主信息类型,生成更多所述主信息类型的信息添加到所述响应页面中;The information type with the largest proportion is obtained, recorded as the main information type, and more information of the main information type is generated and added to the response page; 将所述响应页面发送给访问端。The response page is sent to the access end. 2.根据权利要求1所述的基于WAF的攻击流量反制方法,其特征在于,2. The WAF-based attack traffic countermeasure method according to claim 1, characterized in that: 记录预设时长内全部访问请求的交互日志,Record the interaction log of all access requests within a preset time period. 根据预设的WAF匹配规则检测访问请求是否为攻击流量的方法包括:Methods for detecting whether an access request is attack traffic based on preset WAF matching rules include: 判断所述访问请求使用的IP地址是否与所述标记IP相符,若相符,则判定所述访问请求为攻击流量;Determine whether the IP address used in the access request matches the marked IP address, and if so, determine that the access request is attack traffic; 读取所述访问请求的URL,解析出所述URL的参数,将所述参数与预设的WAF匹配规则进行匹配,若匹配相符,则判定所述访问请求为攻击流量;Read the URL of the access request, parse the parameters of the URL, match the parameters with the preset WAF matching rules, and if the match is consistent, determine that the access request is attack traffic; 若匹配不相符,则从所述交互日志读取获得所述访问请求使用的IP地址的交互记录;If the match does not match, then reading from the interaction log to obtain the interaction record of the IP address used in the access request; 将所述交互记录与预设的交互规则进行匹配,若匹配相符,则判断所述请求为攻击流量。The interaction record is matched with a preset interaction rule, and if the match is consistent, the request is determined to be attack traffic. 3.根据权利要求1所述的基于WAF的攻击流量反制方法,其特征在于,3. The WAF-based attack traffic countermeasure method according to claim 1, characterized in that: 预设WAF匹配规则的方法包括:Methods for presetting WAF matching rules include: 根据配置的攻击类型,生成字符、命令及参数的匹配规则;Generate matching rules for characters, commands, and parameters based on the configured attack type; 预设交互规则的方法包括:Methods for presetting interaction rules include: 根据配置的异常访问类型,生成关于交互次数、交互频率、交互相似度的匹配规则。Generate matching rules for the number of interactions, interaction frequency, and interaction similarity based on the configured abnormal access type. 4.根据权利要求1所述的基于WAF的攻击流量反制方法,其特征在于,4. The WAF-based attack traffic countermeasure method according to claim 1, characterized in that: 预设触发条件包括:The preset trigger conditions include: 根据所述响应页面的内容中所述主信息类型的占比,设置触发条件;Setting a trigger condition according to the proportion of the main information type in the content of the response page; 当所述主信息类型的占比超过预设阈值时,判定满足预设的触发条件,生成诱导文件的方法包括:When the proportion of the main information type exceeds a preset threshold, it is determined that a preset trigger condition is met, and the method for generating an induction file includes: 生成所述主信息类型的信息作为所述诱导文件的内容;Generate information of the main information type as the content of the induction file; 生成反制代码添加到所述诱导文件中;Generate countermeasure code and add it to the inducement file; 根据所述主信息类型生成所述诱导文件的文件名。The file name of the induction file is generated according to the main information type. 5.基于WAF的攻击流量反制系统,其特征在于,包括:5. The attack traffic countermeasure system based on WAF is characterized by including: 检测模块,根据预设的WAF匹配规则检测访问请求是否为攻击流量;The detection module detects whether the access request is attack traffic based on the preset WAF matching rules; 验证模块,当所述访问请求为攻击流量时,标注所述攻击流量的来源IP,记为标记IP,向访问端发送真人验证;A verification module, when the access request is attack traffic, marks the source IP of the attack traffic as a marked IP, and sends a real person verification to the access end; 响应模块,当所述真人验证通过时,根据所述访问请求所请求的页面,以及预先配置的模拟漏洞页面,生成响应页面发送给访问端;A response module, when the real person verification is passed, generates a response page according to the page requested by the access request and the pre-configured simulated vulnerability page and sends it to the access end; 反制模块,当所述标记IP与所述响应页面交互满足预设的触发条件时,生成诱导文件并提示下载,所述诱导文件包括预设的反制代码;A countermeasure module, when the interaction between the marked IP and the response page satisfies a preset trigger condition, generates an inducement file and prompts downloading, wherein the inducement file includes a preset countermeasure code; 预先配置模拟漏洞页面的方法包括:Methods for pre-configuring simulated vulnerability pages include: 修改所述访问请求所请求的页面的内容,作为所述模拟漏洞页面的内容;Modifying the content of the page requested by the access request as the content of the simulated vulnerability page; 设置所述模拟漏洞页面不触发WAF匹配规则及交互规则;Set the simulated vulnerability page not to trigger WAF matching rules and interaction rules; 配置重定向规则,所述重定向规则将所述标记IP的后续访问请求均重定向到预设的防御页面;Configure a redirection rule, wherein the redirection rule redirects subsequent access requests of the marked IP to a preset defense page; 所述防御页面根据所述后续访问请求,生成新的响应页面发送给访问端;The defense page generates a new response page according to the subsequent access request and sends it to the access end; 所述防御页面根据所述后续访问请求,生成新的响应页面发送给访问端的方法包括:The method in which the defense page generates a new response page according to the subsequent access request and sends it to the access end includes: 读取所述后续访问请求所请求的页面的内容,获得所述后续访问请求所请求的页面的内容中信息类型的占比,所述信息类型包括数据信息、账号信息及状态信息;Reading the content of the page requested by the subsequent access request, and obtaining the proportion of information types in the content of the page requested by the subsequent access request, wherein the information types include data information, account information, and status information; 修改所请求的页面的内容,作为所述响应页面的内容;Modify the content of the requested page as the content of the response page; 获得占比最大的信息类型,记为主信息类型,生成更多所述主信息类型的信息添加到所述响应页面中;The information type with the largest proportion is obtained, recorded as the main information type, and more information of the main information type is generated and added to the response page; 将所述响应页面发送给访问端。The response page is sent to the access end. 6.电子设备,其特征在于,包括处理器以及存储器;6. An electronic device, characterized in that it comprises a processor and a memory; 所述处理器与所述存储器相连;The processor is connected to the memory; 所述存储器,用于存储可执行程序代码;The memory is used to store executable program code; 所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行如权利要求1-4任一项所述的方法。The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method according to any one of claims 1 to 4. 7.计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-4任一项所述的方法。7. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented. 8.计算机程序产品,包括计算机程序,其特征在于,该计算机程序被处理器执行时实现如权利要求1-4任一项所述的方法。8. A computer program product, comprising a computer program, characterized in that when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
CN202411854267.7A 2024-12-17 2024-12-17 WAF-based attack flow countering method and system Active CN119316231B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411854267.7A CN119316231B (en) 2024-12-17 2024-12-17 WAF-based attack flow countering method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411854267.7A CN119316231B (en) 2024-12-17 2024-12-17 WAF-based attack flow countering method and system

Publications (2)

Publication Number Publication Date
CN119316231A CN119316231A (en) 2025-01-14
CN119316231B true CN119316231B (en) 2025-03-14

Family

ID=94192272

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411854267.7A Active CN119316231B (en) 2024-12-17 2024-12-17 WAF-based attack flow countering method and system

Country Status (1)

Country Link
CN (1) CN119316231B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111786966A (en) * 2020-06-15 2020-10-16 中国建设银行股份有限公司 Method and device for browsing webpage
CN112600822A (en) * 2020-12-09 2021-04-02 国网四川省电力公司信息通信公司 Network security system and method based on automatic drainage tool
CN115277068A (en) * 2022-06-15 2022-11-01 广州理工学院 Novel honeypot system and method based on deception defense

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8407798B1 (en) * 2002-10-01 2013-03-26 Skybox Secutiry Inc. Method for simulation aided security event management
US9503470B2 (en) * 2002-12-24 2016-11-22 Fred Herz Patents, LLC Distributed agent based model for security monitoring and response
KR102134898B1 (en) * 2019-10-15 2020-07-17 주식회사 에프원시큐리티 System and method for providing integrated security service for web server based on cloud
CN114079576B (en) * 2020-08-18 2024-06-11 奇安信科技集团股份有限公司 Security defense method, security defense device, electronic equipment and medium
US11792162B1 (en) * 2023-01-30 2023-10-17 Cloudflare, Inc. Machine learning based web application firewall

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111786966A (en) * 2020-06-15 2020-10-16 中国建设银行股份有限公司 Method and device for browsing webpage
CN112600822A (en) * 2020-12-09 2021-04-02 国网四川省电力公司信息通信公司 Network security system and method based on automatic drainage tool
CN115277068A (en) * 2022-06-15 2022-11-01 广州理工学院 Novel honeypot system and method based on deception defense

Also Published As

Publication number Publication date
CN119316231A (en) 2025-01-14

Similar Documents

Publication Publication Date Title
Martins et al. Host-based IDS: A review and open issues of an anomaly detection system in IoT
US20240289448A1 (en) System and Methods for Click-Jacking and Content Redressing Protection
Song et al. Advanced evasion attacks and mitigations on practical ML‐based phishing website classifiers
US11036855B2 (en) Detecting frame injection through web page analysis
Heartfield et al. A taxonomy of attacks and a survey of defence mechanisms for semantic social engineering attacks
Zhang et al. Understanding iot security through the data crystal ball: Where we are now and where we are going to be
US9681304B2 (en) Network and data security testing with mobile devices
Bottazzi et al. MP-shield: A framework for phishing detection in mobile devices
CN104954346B (en) Attack recognition method and device based on object analysis
US10965712B2 (en) Domain specific language for defending against a threat-actor and adversarial tactics, techniques, and procedures
CN107612924A (en) Attacker&#39;s localization method and device based on wireless network invasion
Wang et al. A combined static and dynamic analysis approach to detect malicious browser extensions
Dabbour et al. Efficient assessment and evaluation for websites vulnerabilities using SNORT
Garg et al. Analysis of software vulnerability classification based on different technical parameters
Chaudhary et al. Plague of cross-site scripting on web applications: a review, taxonomy and challenges
CN107509200A (en) Equipment localization method and device based on wireless network invasion
Liu et al. Less defined knowledge and more true alarms: Reference-based phishing detection without a pre-defined reference list
Kumar et al. Analysis of SQL injection attacks in the cloud and in WEB applications
Sombatruang et al. Internet Service Providers' and Individuals' Attitudes, Barriers, and Incentives to Secure {IoT}
Zhao et al. Network security model based on active defense and passive defense hybrid strategy
Orucho et al. Security threats affecting user-data on transit in mobile banking applications: A review
CN119316231B (en) WAF-based attack flow countering method and system
Shahriar et al. Towards an attack signature generation framework for intrusion detection systems
Muhammad et al. Information protection of end users on the web: privacy issues and measures
Virvilis-Kollitiris Detecting advanced persistent threats through deception techniques

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant