Penetration testing method

Through automated and intelligent penetration testing methods, using generative adversarial networks and multi-model integration, the problem of low efficiency of traditional penetration testing is solved, efficient and accurate vulnerability discovery and utilization is achieved, and testing quality and efficiency are improved.

CN118536121APending Publication Date: 2024-08-23SHANGHAI LANXUN TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410580984.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-11
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Traditional penetration testing methods rely on manual operations, are inefficient and error-prone, and cannot effectively discover and exploit security vulnerabilities in computer systems.

Method used

Adopt automated and intelligent penetration testing methods, including target identification, in-depth analysis of system architecture, using generative adversarial networks to generate real vulnerability scenarios, combined with multi-model integration for comprehensive testing, loop testing of each exploitable vulnerability, obtaining system access rights, and conducting Post-penetration and generation of penetration testing reports.

Benefits of technology

It improves the efficiency and accuracy of penetration testing, can more effectively discover and exploit security vulnerabilities in the target system, improves testing quality and efficiency, enhances the ability to detect complex vulnerabilities, and reduces blindness in the testing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536121A
    Figure CN118536121A
Patent Text Reader

Abstract

The invention discloses a penetration test method, which comprises the following steps of: identifying a test target, deeply analyzing the test target, and judging whether an available vulnerability exists or not; utilizing the available vulnerabilities, entering a utilization and attack stage, performing post-penetration on the successfully utilized vulnerabilities, and generating a penetration test report; the penetration test method provided by the invention has higher intellectualization, adaptivity and comprehensiveness, can more effectively discover and utilize security vulnerabilities of the target system, and improves the quality and efficiency of penetration test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer security technology, and in particular to a penetration testing method. Background Art

[0002] With the rapid development of Internet technology, network security issues are becoming increasingly prominent. Penetration testing, as an important means of evaluating the security of computer systems, can help discover and fix potential security vulnerabilities. However, traditional penetration testing methods often rely on manual operations by professional security personnel, which is inefficient and prone to errors.

[0003] Therefore, developing an automated and intelligent penetration testing method has important practical significance. Summary of the invention

[0004] The object of the present invention is to provide a penetration testing method to improve the efficiency and accuracy of penetration testing.

[0005] In order to solve the above-mentioned invention object, the present invention provides a penetration testing method, comprising:

[0006] Identify test objectives;

[0007] In-depth analysis of the system architecture of the test target and determine whether there are exploitable vulnerabilities;

[0008] If there are exploitable vulnerabilities, the exploitation and attack phase begins;

[0009] Post-exploitation of successfully exploited vulnerabilities; and

[0010] Generate penetration testing reports.

[0011] Optionally, the process of identifying the test target includes: target identification and fingerprint identification.

[0012] Optionally, the target identification process includes:

[0013] determining the location and characteristics of the test target;

[0014] Perform image segmentation on the test target, divide the test target into different areas, and identify the target parts therein.

[0015] Optionally, the fingerprint recognition process includes:

[0016] Obtaining HTTP response header information of the test target and identifying the network applications and technologies used by the test target;

[0017] Analyze the characteristics of the response and determine the technology stack of the test target.

[0018] Optionally, before the process of deeply analyzing the test target and determining whether there is an exploitable vulnerability, the process further includes:

[0019] Determine whether the test target has a WEB service;

[0020] If the test target has a WEB service, then perform functional analysis on the Web site to identify the main functional pages, interaction processes, and business logic, trigger potential vulnerability points, and analyze the response to determine whether there is a vulnerability;

[0021] If the WEB service does not exist, the operating system and running services of the host where the test target is located are identified and analyzed, and a probe request is sent to determine whether there is a vulnerability.

[0022] Optionally, in the process of deeply analyzing the system architecture of the test target, the system architecture includes: website functions, web business logic, or an operating system and service type of a host computer where the test target is located.

[0023] Optionally, the exploitation and attack phase includes:

[0024] Identify attack paths and strategies;

[0025] Based on the attack paths and strategies, we use the real vulnerability scenarios generated by the generative adversarial network and combine multiple models to conduct comprehensive tests on different vulnerability scenarios.

[0026] Cycle testing of each exploitable vulnerability, using it to gain access to the system and penetrate deep into the system.

[0027] Optionally, the utilization and attack phase also includes: analyzing the configuration and rules of the security protection equipment, and evaluating the impact and water-blocking ability of the security protection equipment on the penetration test.

[0028] Optionally, the post-penetration process includes: obtaining sensitive information, moving laterally, establishing persistent access, and analyzing the real security status of the detection target.

[0029] Optionally, the post-penetration process also includes: analyzing the internal structure and network topology of the target system, and discovering other potential attack paths and vulnerabilities.

[0030] Compared with the prior art, the penetration testing method provided by the present invention is more intelligent, adaptable and comprehensive, can more effectively discover and exploit security vulnerabilities of the target system, and improves the quality and efficiency of penetration testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a block diagram of a penetration testing method in an embodiment of the present invention;

[0032] Figure 2 This is the penetration testing method process in the embodiment of the present invention Figure 1 ;

[0033] Figure 3 This is the penetration testing method process in the embodiment of the present invention Figure 2 . DETAILED DESCRIPTION

[0034] The present invention will be described in more detail below in conjunction with the accompanying drawings, wherein preferred embodiments of the present invention are shown, and it should be understood that those skilled in the art may modify the present invention described herein and still achieve the beneficial effects of the present invention. Therefore, the following description should be understood as being widely known to those skilled in the art and not as a limitation of the present invention.

[0035] The present invention is described in more detail in the following paragraphs by way of example with reference to the accompanying drawings. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the accompanying drawings are in very simplified form and are not in exact proportions, and are only used to facilitate and clearly assist in illustrating the purpose of the embodiments of the present invention.

[0036] The present invention provides a method for penetration testing. Figure 1 ,include:

[0037] S1. Identify the test target;

[0038] S2. In-depth analysis of the system architecture of the test target and determination of whether there are exploitable vulnerabilities;

[0039] S3. If there is an exploitable vulnerability, it enters the exploitation and attack phase;

[0040] S4. Post-exploitation of successfully exploited vulnerabilities; and

[0041] S5. Generate a penetration test report.

[0042] In this embodiment, the test target identified in step S1 is a target website.

[0043] Furthermore, in step S1, the process of identifying the test target includes: S11, target identification and S12, fingerprint identification.

[0044] Furthermore, the process of step S11 specifically includes:

[0045] determining the location and characteristics of the test target;

[0046] Perform image segmentation on the test target, divide the test target into different areas, and identify the target parts therein.

[0047] Furthermore, the process of step S12 specifically includes:

[0048] Obtaining HTTP (HyperText Transfer Protocol) response header information of the test target to identify the network applications and technologies used by the test target;

[0049] Analyze the characteristics of the response and determine the technology stack of the test target.

[0050] Among them, network applications and technologies include web servers (such as Apache, Nginx), web application frameworks (such as Django, Rails) or databases (such as MySQL, MongoDB), etc.

[0051] Among them, Django is an open source web application framework; Rails (also known as Ruby on Rails) is an open source web application framework written in Ruby; MySQL is an open source relational database management system maintained by Oracle Corporation; MongoDB is an open source, document-based NoSQL database maintained by MongoDB Inc.

[0052] The characteristics of the response include server version, programming language or framework, and the technology stack of the test target is determined by analyzing the above characteristics.

[0053] Furthermore, in step S2, before the step of deeply analyzing the test target, the step of determining whether the test target has a WEB (World Wide Web) service is also included.

[0054] In this embodiment, it is checked whether the test target provides Web services by accessing the URL (Uniform Resource Locator) of the website or sending an HTTP request to confirm whether the test target is a Web application.

[0055] In other examples, whether the test target is a web application may be confirmed in other ways.

[0056] Furthermore, if the test target has a WEB service, a functional analysis is performed on the Web site to identify the main functional pages, interaction processes, and business logic, and potential vulnerability points are triggered and the response is analyzed to determine whether there is a vulnerability.

[0057] In this embodiment, crawler technology or manual browsing can be used to conduct in-depth analysis of various functions of the test target website, including analysis of user registration, product browsing, shopping cart management, order payment and other functions.

[0058] In this embodiment, by identifying the main function pages and interaction processes of the test target, preparation is made for subsequent penetration testing.

[0059] In this embodiment, a test request is sent to trigger potential vulnerability points, and then the response is analyzed to determine whether there are vulnerabilities, including SQL injection (SQL Injection), cross-site scripting (Cross-Site Scripting, XSS), cross-site request forgery (Cross-Site Request Forgery, CSRF) and other vulnerabilities.

[0060] Among them, through dynamic analysis and static analysis, the business logic of the test target is identified, the user interaction process, data transmission method, etc. are understood, the interaction logic of the test target is analyzed, and possible logical loopholes or security risks are identified.

[0061] If the WEB service does not exist, the operating system and running services of the host where the test target is located are identified and analyzed, and a probe request is sent to determine whether there is a vulnerability.

[0062] Among them, the operating system and running services of the host where the test target is located are identified, including the operating system type (such as Linux, Windows); open ports, including SSH (Secure Shell), FTP (File Transfer Protocol), RDP (Remote Desktop Protocol); running services, including Apache, MySQL, SSH, etc.

[0063] Furthermore, in step S3, the exploitation and attack phase includes:

[0064] S31. Analyze the configuration and rules of the safety protection equipment, and evaluate the impact of the safety protection equipment on the penetration test and the water blocking ability;

[0065] S32, determine the attack path and strategy;

[0066] S33. Based on the attack paths and strategies, a real vulnerability scenario generated by a generative adversarial network (GAN) is used in combination with multi-model integration to conduct a comprehensive test on different vulnerability scenarios.

[0067] S34. Cycle through the loop to test each exploitable vulnerability, use it to gain access to the system, and penetrate deep into the system.

[0068] Among them, in step S31, the security protection equipment includes a firewall, an intrusion detection system, anti-virus software, etc.

[0069] In step S32, an optimization algorithm such as a genetic algorithm is used to conduct an in-depth analysis of the test target, determine the best attack path and strategy, and formulate a comprehensive attack plan by considering factors such as the efficiency, concealment, and success rate of the attack.

[0070] Among them, in this embodiment, the attack path is intelligently planned by combining genetic algorithm and multi-objective optimization, which improves the success rate and efficiency of the attack, reduces the blindness in the test process, transforms the attack path planning problem into a multi-objective optimization problem, and balances the relationship between multiple test indicators.

[0071] Furthermore, in step S4, the post-infiltration process includes:

[0072] S41, obtain sensitive information, move laterally, establish persistent access, and analyze the real security status of the detection target;

[0073] S42. Analyze the internal structure and network topology of the detection target and discover other potential attack paths and vulnerabilities.

[0074] In step S5, data visualization technology is specifically used to generate a clear and intuitive penetration test report, which includes discovered vulnerabilities, attack paths, and repair suggestions; more specifically, the penetration test report contains detailed test results, attack process, exploited vulnerabilities and recommended repair measures, as well as possible security risk assessments.

[0075] Furthermore, after step S5, the penetration test is completed, and the user or network security personnel can make corresponding repairs and improvements based on the results in the penetration test report to improve the security and resistance of the system, summarize the lessons learned and security issues discovered during the entire testing process, and provide reference and reference for future penetration testing and security work.

[0076] The penetration testing method provided in this embodiment applies deep learning technology and adopts a target detection algorithm to improve the accuracy of target recognition; combines genetic algorithms and multi-objective optimization to intelligently plan attack paths, thereby improving the success rate and efficiency of attacks, reducing blindness in the testing process, and transforming the attack path planning problem into a multi-objective optimization problem, thereby balancing the relationship between multiple test indicators; utilizes generative adversarial networks (GANs) and multi-model integration to generate more realistic vulnerability scenarios, improve the authenticity and comprehensiveness of the test, and increase the ability to detect complex vulnerabilities; adopts reinforcement learning algorithms and feedback-based adjustment strategies to timely adjust the test strategy according to real-time test results and environmental changes, thereby improving the flexibility and adaptability of the test; in addition, adopts data visualization technology and automatically generates repair suggestions, generates intuitive and clear penetration testing reports, provides more comprehensive and detailed test results and suggestions, and accelerates the speed and efficiency of vulnerability repair.

[0077] Embodiment 2

[0078] Please refer to Figure 2-Figure 3 When conducting an external network penetration test, the target system needs to be analyzed and tested in detail to discover possible security vulnerabilities and risks. In a specific example, assume that the goal is to conduct an external network penetration test on an e-commerce website. The specific process may include the following:

[0079] 1. Automated penetration testing program starts:

[0080] Launch the automated penetration testing program and enter the URL of the target e-commerce website.

[0081] The program loads configuration files and modules in preparation for penetration testing.

[0082] 2. Intelligent target identification:

[0083] The program uses deep learning target detection algorithms, such as YOLO (You Only Look Once) or SSD (SingleShot MultiBox Detector), to intelligently identify e-commerce websites and determine the location and characteristics of test targets.

[0084] Perform image segmentation on the website, divide the website into different areas, and identify the target part.

[0085] 3. Target network application fingerprint identification:

[0086] The program sends specific requests to obtain the HTTP response header information of the target website and identify the network applications and technologies it uses, such as web servers (such as Apache, Nginx), web application frameworks (such as Django, Rails), databases (such as MySQL, MongoDB), etc.

[0087] Analyze the characteristics of the response, such as server version, programming language, framework, etc., to determine the technology stack of the target system.

[0088] 4. Determine whether there is a WEB service:

[0089] The program checks whether the target website provides web services and confirms whether the target is a web application by accessing the website's URL or sending an HTTP request.

[0090] 5.Website Function Analysis:

[0091] The program uses crawler technology or manual browsing to conduct in-depth analysis of various functions of e-commerce websites, including user registration, product browsing, shopping cart management, order payment, etc.

[0092] Identify the main functional pages and interaction processes of the website to prepare for subsequent penetration testing.

[0093] 6. Start Web vulnerability scanning:

[0094] The program launches a web vulnerability scanner to scan the various functions and input points of the target website to find possible security vulnerabilities, including SQL injection, cross-site scripting (XSS), cross-site request forgery (CSRF), etc.

[0095] The scanner automatically sends test requests to trigger potential vulnerability points and then analyzes the responses to determine if a vulnerability exists.

[0096] 7. Web business logic identification:

[0097] The program uses dynamic and static analysis to identify the business logic of e-commerce websites, understand user interaction processes, data transmission methods, etc.

[0098] Analyze the interaction logic of the website and identify possible logic loopholes or security risks.

[0099] 8. Host operating system and service identification:

[0100] The program identifies the operating system and running services of the host where the website is located, including the operating system type (such as Linux, Windows), open ports (such as SSH, FTP, RDP), running services (such as Apache, MySQL, SSH), etc.

[0101] Use network scanning programs, operating system identification programs, service identification programs, etc. for identification and analysis.

[0102] 9. Start host vulnerability scanning:

[0103] The program starts the host vulnerability scanner to scan the host for vulnerabilities and discover possible system and service vulnerabilities, such as unauthorized access, weak passwords, etc.

[0104] The scanner sends specific probe requests to the target host's operating system and running services to identify possible vulnerabilities.

[0105] 10. Determine whether there are exploitable vulnerabilities:

[0106] The program determines whether there are exploitable security vulnerabilities in the target system based on the vulnerability scanning results.

[0107] If there are exploitable vulnerabilities, the program will enter the attack and exploitation phase; if there are no exploitable vulnerabilities, further information collection and analysis may be required, or other attack methods may be tried.

[0108] 11. Test safety protection equipment:

[0109] The program detects whether the target network has security protection devices, such as firewalls, intrusion detection systems, anti-virus software, etc.

[0110] Analyze the configuration and rules of security protection equipment to evaluate its impact on penetration testing and water blocking capabilities.

[0111] 12. Intelligent planning of comprehensive attack paths:

[0112] The program uses optimization algorithms such as genetic algorithms to conduct in-depth analysis of the target system and determine the best attack path and strategy.

[0113] Consider factors such as the efficiency, concealment, and success rate of the attack and develop a comprehensive attack plan.

[0114] 13. Intelligent vulnerability exploitation:

[0115] Based on the attack paths and strategies, the program uses real vulnerability scenarios generated by generative adversarial networks (GANs) and combines multi-model integration to conduct comprehensive tests on different vulnerability scenarios.

[0116] Execute vulnerability exploit scripts or tools to try to gain system access permissions or perform specific attack behaviors, such as executing commands, uploading malicious files, etc.

[0117] 14. Cycle testing for each exploitable vulnerability:

[0118] The program loops through each exploitable vulnerability, attempting to exploit it to gain further system access and penetrate deeper into the system.

[0119] Each vulnerability is tried and tested multiple times to ensure the success rate and stability of the attack.

[0120] 15. Post-exploitation of successfully exploited vulnerabilities:

[0121] The program performs post-penetration testing on successfully exploited vulnerabilities, attempting to obtain sensitive information, move laterally, establish persistent access, etc., to understand the real security status of the system.

[0122] Analyze the internal structure and network topology of the target system to discover other potential attack paths and vulnerabilities.

[0123] 16. Generate penetration test report:

[0124] The program uses data visualization technology to generate clear and intuitive penetration test reports, including discovered vulnerabilities, attack paths, repair suggestions, etc.

[0125] The report should include detailed test results, attack process, exploited vulnerabilities and recommended fixes, as well as possible security risk assessment.

[0126] 17. End the program:

[0127] At the end of the penetration testing process, the security team makes fixes and improvements based on the findings in the report to improve the security and resilience of the system.

[0128] Summarize the lessons learned and security issues discovered during the testing process to provide reference and reference for future penetration testing and security work.

[0129] An embodiment of the present invention further provides an electronic device, which may be a server, a computer or other device.

[0130] The electronic device may include: a processor, a storage medium and a bus, the storage medium stores machine-readable instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate via the bus, the processor executes the machine-readable instructions to perform the steps described in the above embodiments. The specific implementation method and technical effect are similar and will not be repeated here.

[0131] For ease of explanation, only one processor is described in the above electronic device. However, it should be noted that in some embodiments, the electronic device in the present invention may also include multiple processors, so the steps performed by one processor described in the present invention may also be performed jointly or individually by multiple processors. For example, if the processor of the electronic device executes step A and step B, it should be understood that step A and step B may also be performed jointly by two different processors or individually in one processor. For example, the first processor executes step A, the second processor executes step B, or the first processor and the second processor execute steps A and B together, etc.

[0132] In some embodiments, the processor may include one or more processing cores (e.g., a single-core processor (S) or a multi-core processor (S)). By way of example only, the processor may include a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computer (RISC), or a microprocessor, or any combination thereof.

[0133] Accordingly, other embodiments of the present application may also provide a computer-readable storage medium in which computer executable instructions are stored, and when the computer executable instructions are executed by the processor, the various method embodiments of the present application are implemented. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be a computer-readable instruction, a data structure, a module of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0134] In summary, the penetration testing method provided by the present invention improves the positioning accuracy and efficiency of penetration testing, improves the success rate and efficiency of attacks, reduces the blindness in the testing process, improves the authenticity and comprehensiveness of the test, increases the ability to detect complex vulnerabilities, improves the flexibility and adaptability of the test, and accelerates the speed and efficiency of vulnerability repair through intelligent target recognition, intelligent attack path planning, artificial intelligence vulnerability exploitation, and adaptive strategy adjustment.

[0135] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A penetration testing method, characterized in that: include: Identify test objectives; In-depth analysis of the system architecture of the test target and determine whether there are exploitable vulnerabilities; If there are exploitable vulnerabilities, the exploitation and attack phase begins; Post-exploitation of successfully exploited vulnerabilities; as well as Generate penetration testing reports.

2. The penetration testing method according to claim 1, characterized in that: The process of identifying the test target includes: target identification and fingerprint identification.

3. The penetration testing method according to claim 2, characterized in that: The target identification process includes: determining the location and characteristics of the test target; Perform image segmentation on the test target, divide the test target into different areas, and identify the target parts therein.

4. The penetration testing method according to claim 2, characterized in that: The fingerprint recognition process includes: Obtaining HTTP response header information of the test target and identifying the network applications and technologies used by the test target; Analyze the characteristics of the response and determine the technology stack of the test target.

5. The penetration testing method according to claim 1, wherein: The process of deeply analyzing the test target and determining whether there are exploitable vulnerabilities also includes: Determine whether the test target has a WEB service; If the test target has a WEB service, then perform functional analysis on the Web site to identify the main functional pages, interaction processes, and business logic, trigger potential vulnerability points, and analyze the response to determine whether there is a vulnerability; If the WEB service does not exist, the operating system and running services of the host where the test target is located are identified and analyzed, and a probe request is sent to determine whether there is a vulnerability.

6. The penetration testing method according to claim 1, wherein: In the process of deeply analyzing the system architecture of the test target, the system architecture includes: website functions, web business logic or the operating system and service type of the host where the test target is located.

7. The penetration testing method according to claim 1, characterized in that: The exploitation and attack phases include: Identify attack paths and strategies; Based on the attack paths and strategies, we use the real vulnerability scenarios generated by the generative adversarial network and combine multiple models to conduct comprehensive tests on different vulnerability scenarios. Cycle testing of each exploitable vulnerability, using it to gain access to the system and penetrate deep into the system.

8. The penetration testing method according to claim 7, characterized in that: The utilization and attack phase also includes: analyzing the configuration and rules of the security protection equipment, and evaluating the impact and water-blocking ability of the security protection equipment on the penetration test.

9. The penetration testing method according to claim 1, wherein: The post-penetration process includes: obtaining sensitive information, moving laterally, establishing persistent access, and analyzing the real security status of the detection target.

10. The penetration testing method according to claim 9, characterized in that: The post-penetration process also includes: analyzing the internal structure and network topology of the target system, and discovering other potential attack paths and vulnerabilities.

Citation Information

Cited By

  • Multi-model collaborative penetration testing method and device and electronic equipment

    CN120930151A

  • A multi-model cooperative penetration testing method, device and electronic equipment

    CN120930151B