当前位置:网站首页>Introduction to fuzzy testing
Introduction to fuzzy testing
2022-07-18 04:00:00 【The world is ordinary】
- Understand fuzzy testing 、 Relevant contents of stain analysis
- To configure KLEE Other production environment .
- Analyze the advantages and disadvantages of fuzzy testing
Fuzzy testing
- The core idea : Fuzzy testing is an automatic software vulnerability Mining Technology , The central idea is this Send a piece of data to the target software , And monitor / Judge the characteristics of program behavior , Like a crash 、 Assertion failure, etc , So as to find software vulnerabilities .
- Specific tools :

- The combination of research
- Symbol execution
- Smudge inference
- Artificial intelligence + Heuristic search
- Perform scheduling optimization
- present situation
- Execute with symbols
- Combined with stain analysis
- Heuristic search
- evolutionary algorithms
- Simulated annealing
- Monte Carlo algorithm, etc
- Artificial intelligence
- Distributed and parallel AFL The implementation of the .
- Existing problems
- Code coverage problem – The depth of code coverage is not enough , Because it is difficult to break through the complex path constraints of test cases .
- Local area oriented test – Difficult to test large code . Local testing of large code intelligence .
- Slow speed , Low degree of parallelism .
AFL Configuration and use of
- AFL(American Fuzzy Lop) It's by security researchers Michał Zalewski(@lcamtuf) Development of a coverage based guide (Coverage-guided) Fuzzy testing tool of , It records the code coverage of input samples , So we can adjust the input samples to improve the coverage , Increase the probability of finding vulnerabilities . The workflow is as follows :
① Instrumentation when compiling programs from source code , To record code coverage (Code Coverage);
② Select some input files , Join the input queue as the initial test set (queue);
③ The files in the queue are processed according to a certain policy “ mutation ”;
④ If the coverage is updated after a variation file , Then add its reservation to the queue ;
⑤ The process goes on in a cycle , It triggered crash Will be recorded .

- AFL The way of variation
bitflip: Flip by bit ,1 Turn into 0,0 Turn into 1
arithmetic: Integral plus / Subtraction arithmetic operation
interest: Replace some special contents into the original document
dictionary: Automatically generated or user provided token Replace / Insert into the original file
havoc:“ Great destruction ”, It's a combination of the previous variations
splice:“ Connect ”, At this stage, the two files will be spliced together to get a new file
- AFL Installation and use .
Use linux operating system
- git Download the source code , Decompress using
make installCommand installation - establish test.c file , Write the code
- Execute the following script
afl-gcc -g -o test test.c
mkdir fuzz_in fuzz_out
echo '1+1' > fuzz_in/seed
echo core | sudo tee /proc/sys/kernel/core_pattern
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
afl-fuzz -i fuzz_in -o fuzz_out ./test
Then get the following operation process .
- Finally, execute
ctrl + cEnd
establish test.c file , Direct output hello world, Then test . Get the following execution process . In the use of ctrl + c After that , You can get fuzz_out Folder . Then there is the corresponding error message . Contains the following folders .
crashes: Cause the target to receive fatal signal And the unique test case of crash queue: Store all test cases with unique execution paths .AFL The output file :
crashes/README.txt: Save the target to execute these crashes Command line parameters of the file .
hangs: Unique test cases that cause target timeouts .
fuzzer_stats:afl-fuzz Operating state .
plot_data: be used for afl-plot mapping .
Because there is no error message . therefore crashes and hangs The folders are all empty .plot_data Include the following data . See the picture below

边栏推荐
猜你喜欢

APUE学习笔记-15章进程间通信

关于hash和history的区别和使用
![[Voforia] 通过识自己设定图片,显示特定AR模型](/img/4c/36a2009ea309379aa105a94f82b7ac.png)
[Voforia] 通过识自己设定图片,显示特定AR模型

Talking about some features of improving work efficiency supported by slack channel

mysql中出现Unit mysql.service could not be found 的解决方法

360 is expected to deduct a non net loss of 450million to 630million in the first half of the year, and the advertising budget is less than expected

UNP学习笔记-第二章传输层

真的牛b!京东T3-2都还在学的微服务+MySQL+Kafka+boot2.x+虚拟机PDF

Xinhuicheng passed the registration: the annual revenue was 800million, and Zheng Ruijun, the actual controller, had more than 300million liabilities

101.(cesium篇)cesium粒子系统-下雪
随机推荐
Teach people to fish - see a field on the sap mm material display interface, how to find which field of which database table to store
The software supply chain security risk that makes enterprise digitalization and it executives bear the brunt of the cauldron points to the north
It's time to upgrade your JUnit, junit5 super detailed actual combat
Tencent T4 architects give you a "glimpse" of the main technical challenges and solutions of large website architecture
Trends in plant science | breeding in the direction of improving ecological plant microbiome interaction
A concise course for the architect of soft examination system | government informatization and e-government
[Voforia] 通过识自己设定图片,显示特定AR模型
leetcode:300. Longest increasing subsequence [LIS board + greedy dichotomy + nlogn]
PKI: content of digital certificate
MES管理系统的四个功能,高效提升工厂数字化
在router中判断是pc还是移动端
Want to be an elite developer? Please force yourself to form these 10 habits
ORACLE中各个进程
真的牛b!京东T3-2都还在学的微服务+MySQL+Kafka+boot2.x+虚拟机PDF
Do you know the architecture and engine of MySQL?
Andorid studio makes happy writing numbers (timer start + frame animation)
How does Xishanju build a game industry assembly line with ones? | Ones industry practice
101.(cesium篇)cesium粒子系统-下雪
leetcode 605. Can place flowers planting problem (simple)
Seize the new track, and the number of groups vigorously layout the "meta universe" industry