CN111367794B - AFL-oriented self-adaptive Bitmap table adjustment method and device - Google Patents
AFL-oriented self-adaptive Bitmap table adjustment method and device Download PDFInfo
- Publication number
- CN111367794B CN111367794B CN202010117203.4A CN202010117203A CN111367794B CN 111367794 B CN111367794 B CN 111367794B CN 202010117203 A CN202010117203 A CN 202010117203A CN 111367794 B CN111367794 B CN 111367794B
- Authority
- CN
- China
- Prior art keywords
- program
- bitmap
- bitmap table
- executable
- afl
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/368—Test management for test version control, e.g. updating test cases to a new software version
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
An AFL-oriented self-adaptive Bitmap table adjusting method and device, wherein the adjusting method comprises the following steps: inserting target programs with different Bitmap table sizes to form executable programs of multiple versions; and performing Fuzz on all executable programs according to the sequence from small to large of the Bitmap table, detecting the density of the Bitmap table at the same time, and switching to the executable program of the next version when the density of the Bitmap table is greater than 80%. The invention also provides an AFL-oriented self-adaptive Bitmap adjustment device, terminal equipment and a computer readable storage medium.
Description
Technical Field
The invention belongs to the field of software engineering, and particularly relates to an AFL-oriented self-adaptive Bitmap table adjustment method and device.
Background
Fuzz is also called fuzzy test, which is a method for automatically testing a target program by continuously changing input. AFL, known in full as American Fuzzy Lop, is a well-known fuzzy test tool. AFL adopts a Bitmap table to record the edge coverage condition of the tested program. The Bitmap is set to a fixed size of 64K to be placed in the Cache of the computer, thereby improving performance. However, for large programs, the program size can be very large, resulting in a very large number of program edges, much greater than 64K. Thus, for a 64K Bitmap, these large program tests often suffer from side conflicts, i.e., information about multiple sides is stored in the same location in the Bitmap. Edge collisions may result in AFL missing the opportunity to find new paths, thereby reducing test efficiency. However, the Bitmap table is not set too large at first, which results in that the Bitmap table cannot be put into the Cache, thereby reducing the Fuzz efficiency. According to the investigation of CollAFL, AFL bitmap has the problem of edge conflict. Edge conflicts can be reduced by simply increasing the bitmap, but this affects the performance of Fuzz. Therefore, the size of the Bitmap can be dynamically increased, a smaller Bitmap is set at the beginning, the density of the Bitmap table is increased along with the promotion of the test process, the probability of side collision is increased along with the increase of the Bitmap table, and the size of the Bitmap can be increased to reduce the collision.
Disclosure of Invention
The invention aims to provide an AFL-oriented self-adaptive Bitmap table adjustment method and device for solving the problem that the conflict exists between Bitmap table edge conflict and Fuzz performance in the prior art, and the size of Bitmap is dynamically increased.
In order to achieve the above purpose, the present invention has the following technical scheme:
an AFL-oriented self-adaptive Bitmap table adjustment method comprises the following steps:
inserting target programs with different Bitmap table sizes to form executable programs of multiple versions;
and (3) performing Fuzz on all executable programs according to the sequence from small to large of the Bitmap table, detecting the density of the Bitmap table at the same time, and switching to the executable program of the next version when the density of the Bitmap table is more than 80%, wherein the switching steps are as follows:
firstly, stopping testing the current version program V, and collecting all current seed files;
traversing the seed file queue, taking the seed file as input, and running a program V' of the next version to generate a new Bitmap;
restarting testing the program V' of the next version on the basis of the new Bitmap;
and cycling the switching step until the last version of executable program.
Preferably, in an embodiment of the AFL-oriented adaptive Bitmap table adjustment method of the present invention, the Bitmap table includes 64K, 128K, 256K and 512K, and the executable program formed is V 64k 、V 128k 、V 256k And V 512k 。
Preferably, in one embodiment of the AFL-oriented adaptive Bitmap table adjustment method of the present invention, the initial version of the executable program V is first 64k Performing Fuzz, detecting the density of the Bitmap table at the same time, and switching to the executable program V when the density of the Bitmap table is more than 80 percent 128k The same operations are sequentially performed in order until the program V is executable 512k 。
The invention also provides an AFL-oriented self-adaptive Bitmap table adjusting device, which comprises:
the target program instrumentation module is used for instrumentation of target programs with different Bitmap table sizes to form executable programs of multiple versions;
the executable program fuzzy test module is used for carrying out Fuzz on all executable programs according to the sequence from small to large of the Bitmap table, detecting the density of the Bitmap table, and switching to the executable program of the next version when the density of the Bitmap table is more than 80%;
the executable program switching module is used for collecting all seed files of the current version program V; traversing the seed file queue, taking the seed file as input, and running a program V' of the next version to generate a new Bitmap; restarting testing the program V' of the next version on the basis of the new Bitmap; and cycling the switching step until the last version of executable program.
The invention also provides a terminal device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the AFL-oriented self-adaptive Bitmap table adjustment method when executing the computer program.
The invention also provides a computer readable storage medium storing a computer program which when executed by a processor implements the steps of the AFL-oriented adaptive Bitmap table adjustment method.
Compared with the prior art, the invention has the following beneficial effects: when the executable program is switched, firstly stopping testing the program V of the current version, collecting all current seed files, traversing a seed file queue, taking the seed file as input, and running the program V' of the next version to generate a new Bitmap. The invention can compile and generate a plurality of programs with different Bitmap size versions at the same time, and rebuild the Bitmap table when the tests of the programs with different versions are switched by taking the seed file as a medium, thereby solving the problem that the size of the AFL fixed Bitmap table cannot be changed along with the growth of the programs and reducing the conflict in the fuzzy test.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic workflow diagram of a conventional AFL;
FIG. 2 is a flow chart of the adaptive Bitmap table adjustment method of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention.
Based on the embodiments of the present invention, a person skilled in the art can make several simple modifications and adaptations without making any inventive effort, and all other embodiments obtained are within the scope of protection of the present invention.
Reference in the present specification to "an example" means that a particular feature, structure, or characteristic described in connection with the example may be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art will appreciate explicitly and implicitly that the described embodiments of the invention can also be combined with other embodiments.
Referring to fig. 1-2, the invention is characterized in that programs with different Bitmap size versions can be compiled and generated simultaneously, seeds are used as media, a Bitmap table is rebuilt when testing of the programs with different versions is switched, finally, the problem that the size of the AFL fixed Bitmap table cannot be changed along with the growth of the programs is solved, conflicts in fuzzy testing are reduced, and fuzz performance is guaranteed.
The invention discloses an AFL-oriented self-adaptive Bitmap adjustment method, which comprises the following steps of:
inserting target programs with different Bitmap table sizes, wherein the Bitmap table sizes comprise 64K, 128K, 256K and 512K, a plurality of versions of executable programs are formed, and the formed executable programs are V64K, V128K, V256K and V512K;
and (3) performing Fuzz on all executable programs according to the sequence from small to large of the Bitmap table, detecting the density of the Bitmap table at the same time, and switching to the executable program of the next version when the density of the Bitmap table is more than 80%, wherein the switching steps are as follows:
firstly, stopping testing the current version program V, and collecting all current seed files;
traversing the seed file queue, taking the seed file as input, and running a program V' of the next version to generate a new Bitmap;
restarting testing the program V' of the next version on the basis of the new Bitmap;
and cycling the switching step until the last version of executable program.
In particular, the method comprises the steps of,
first for the initial version executable program V 64k Performing Fuzz, detecting the density of the Bitmap table at the same time, and switching to the executable program V when the density of the Bitmap table is more than 80 percent 128k The same operations are sequentially performed in order until the program V is executable 512k 。
The invention also provides an AFL-oriented self-adaptive Bitmap table adjusting device, which comprises:
the target program instrumentation module is used for instrumentation of target programs with different Bitmap table sizes to form executable programs of multiple versions;
the executable program fuzzy test module is used for carrying out Fuzz on all executable programs according to the sequence from small to large of the Bitmap table, detecting the density of the Bitmap table, and switching to the executable program of the next version when the density of the Bitmap table is more than 80%;
the executable program switching module is used for collecting all seed files of the current version program V; traversing the seed file queue, taking the seed file as input, and running a program V' of the next version to generate a new Bitmap; restarting testing the program V' of the next version on the basis of the new Bitmap; and cycling the switching step until the last version of executable program.
The invention further provides a terminal device based on the AFL-oriented self-adaptive Bitmap adjustment method, the terminal device comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor, and the processor realizes the steps of the AFL-oriented self-adaptive Bitmap adjustment method when executing the computer program.
The invention also provides a computer readable storage medium storing a computer program which when executed by a processor implements the steps of the AFL-oriented adaptive Bitmap table adjustment method.
The foregoing description is only of the preferred embodiment of the present invention and is not intended to limit the technical solution of the present invention in any way, and it should be understood by those skilled in the art that the technical solution can be modified and replaced in several ways without departing from the spirit and principle of the present invention, and the modifications and the replacements are also within the scope of the claims of the present invention.
Claims (6)
1. An AFL-oriented self-adaptive Bitmap adjustment method is characterized by comprising the following steps:
inserting target programs with different Bitmap table sizes to form executable programs of multiple versions;
and (3) performing Fuzz on all executable programs according to the sequence from small to large of the Bitmap table, detecting the density of the Bitmap table at the same time, and switching to the executable program of the next version when the density of the Bitmap table is more than 80%, wherein the switching steps are as follows:
firstly, stopping testing the current version program V, and collecting all current seed files;
traversing the seed file queue, taking the seed file as input, and running a program V' of the next version to generate a new Bitmap;
restarting testing the program V' of the next version on the basis of the new Bitmap;
and cycling the switching step until the last version of executable program.
2. The AFL-oriented adaptive Bitmap adjustment method of claim 1, wherein: the Bitmap table has sizes of 64K, 128K, 256K and 512K, and the executable program is V 64k 、V 128k 、V 256k And V 512k 。
3. The AFL-oriented adaptive Bitmap adjustment method of claim 2, wherein: first for the executable program V of the initial version 64k Performing Fuzz, detecting the density of the Bitmap table at the same time, and switching to the executable program V when the density of the Bitmap table is more than 80 percent 128k The same operations are sequentially performed in order until the program V is executable 512k 。
4. An AFL-oriented adaptive Bitmap table adjusting device, comprising:
the target program instrumentation module is used for instrumentation of target programs with different Bitmap table sizes to form executable programs of multiple versions;
the executable program fuzzy test module is used for carrying out Fuzz on all executable programs according to the sequence from small to large of the Bitmap table, detecting the density of the Bitmap table, and switching to the executable program of the next version when the density of the Bitmap table is more than 80%;
the executable program switching module is used for collecting all seed files of the current version program V; traversing the seed file queue, taking the seed file as input, and running a program V' of the next version to generate a new Bitmap; restarting testing the program V' of the next version on the basis of the new Bitmap; and cycling the switching step until the last version of executable program.
5. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the AFL-oriented adaptive Bitmap table adjustment method according to any one of claims 1 to 3.
6. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of the AFL-oriented adaptive Bitmap table adjustment method of any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010117203.4A CN111367794B (en) | 2020-02-25 | 2020-02-25 | AFL-oriented self-adaptive Bitmap table adjustment method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010117203.4A CN111367794B (en) | 2020-02-25 | 2020-02-25 | AFL-oriented self-adaptive Bitmap table adjustment method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111367794A CN111367794A (en) | 2020-07-03 |
CN111367794B true CN111367794B (en) | 2023-05-23 |
Family
ID=71206302
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010117203.4A Active CN111367794B (en) | 2020-02-25 | 2020-02-25 | AFL-oriented self-adaptive Bitmap table adjustment method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111367794B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5762447A (en) * | 1980-10-01 | 1982-04-15 | Fujitsu Ltd | Control system for execution of program |
US7055146B1 (en) * | 2001-03-08 | 2006-05-30 | Microsoft Corporation | Method and system for dynamically inserting modifications for identified programs |
CN107193731A (en) * | 2017-05-12 | 2017-09-22 | 北京理工大学 | Use the fuzz testing coverage rate improved method of control variation |
CN110362485A (en) * | 2019-07-03 | 2019-10-22 | 杭州安恒信息技术股份有限公司 | A kind of fuzz testing method for excavating Windows core A PI loophole |
CN110442570A (en) * | 2019-06-06 | 2019-11-12 | 北京左江科技股份有限公司 | A kind of BitMap high speed fuzzy search method |
EP3572944A1 (en) * | 2018-05-24 | 2019-11-27 | Fujitsu Limited | Concurrency vulnerability detection |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10635576B2 (en) * | 2018-06-18 | 2020-04-28 | Fujitsu Limited | Branch coverage guided symbolic execution for hybrid fuzz testing of software binaries |
-
2020
- 2020-02-25 CN CN202010117203.4A patent/CN111367794B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5762447A (en) * | 1980-10-01 | 1982-04-15 | Fujitsu Ltd | Control system for execution of program |
US7055146B1 (en) * | 2001-03-08 | 2006-05-30 | Microsoft Corporation | Method and system for dynamically inserting modifications for identified programs |
CN107193731A (en) * | 2017-05-12 | 2017-09-22 | 北京理工大学 | Use the fuzz testing coverage rate improved method of control variation |
EP3572944A1 (en) * | 2018-05-24 | 2019-11-27 | Fujitsu Limited | Concurrency vulnerability detection |
CN110442570A (en) * | 2019-06-06 | 2019-11-12 | 北京左江科技股份有限公司 | A kind of BitMap high speed fuzzy search method |
CN110362485A (en) * | 2019-07-03 | 2019-10-22 | 杭州安恒信息技术股份有限公司 | A kind of fuzz testing method for excavating Windows core A PI loophole |
Non-Patent Citations (3)
Title |
---|
Zhang Gen.PTfuzz: Guided Fuzzing With Processor Trace Feedback.IEEE Access.2018,第Volume 6卷PP 37302-37313. * |
许航.灰盒模糊测试自适应技术研究.Computer Engineering and Applications.2019,P87-97. * |
韩 ; 吴波 ; 辛丹 ; .一种动静结合的高代码覆盖率模糊测试方法.信息安全研究.2016,(第08期),全文 . * |
Also Published As
Publication number | Publication date |
---|---|
CN111367794A (en) | 2020-07-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Dickinson et al. | Pursuing failure: the distribution of program failures in a profile space | |
JP5473768B2 (en) | Method, system, and computer program for causing a computer to execute multipath dynamic profiling | |
CN105468298B (en) | A kind of key assignments storage method based on log-structured merging tree | |
DE10393481T5 (en) | Method and apparatus for performing a cache bypass | |
CN107728953B (en) | Method for improving mixed read-write performance of solid state disk | |
CN111367794B (en) | AFL-oriented self-adaptive Bitmap table adjustment method and device | |
CN113468124B (en) | Method and equipment for rapidly and fully analyzing STDF (standard document format distribution) file | |
US11392510B2 (en) | Management method of cache files in storage space and recording device for storing cache files | |
US7100155B1 (en) | Software set-value profiling and code reuse | |
CN110502422A (en) | A kind of automatic test approach, test device and the device with store function | |
CN112783620A (en) | Optimization method for timing task scheduling, computer equipment and storage medium | |
US20070130185A1 (en) | Efficient deletion of leaf node items within tree data structure | |
CN113282485B (en) | Program automatic repairing method based on self-adaptive search | |
Shu et al. | Fault localization using a failed execution slice | |
Chen et al. | An approach to determine the optimal k-value of k-means clustering in adaptive random testing | |
CN117311595A (en) | Data processing method, processor, computing device and device | |
CN115407934A (en) | Disk file compression method and terminal | |
CN110442575B (en) | Index generation method and retrieval method for scientific big data | |
CN110377601A (en) | A kind of MapReduce calculating process optimization method based on B-tree data structure | |
Zhang et al. | Scavenger: Better Space-Time Trade-Offs for Key-Value Separated LSM-trees | |
CN116303586B (en) | Metadata cache elimination method based on multi-level b+tree | |
CN111309612A (en) | Distributed file system based data current limiting test method and system | |
CN113868124B (en) | Crash consistency fault detection method and system for persistent memory concurrent program | |
Jo et al. | Performance and energy efficiency analysis of Cache Memory Architecture in GPGPU | |
CN109240600A (en) | A kind of disk figure processing method based on mixing more new strategy |
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 |