René's URL Explorer Experiment


Title: Greybox fuzzer by DaniilStepanov · Pull Request #1344 · UnitTestBot/UTBotJava · GitHub

Open Graph Title: Greybox fuzzer by DaniilStepanov · Pull Request #1344 · UnitTestBot/UTBotJava

X Title: Greybox fuzzer by DaniilStepanov · Pull Request #1344 · UnitTestBot/UTBotJava

Description: Greybox fuzzer This document describes principles and capabilities of the implemented fuzzing module. For what? Any symbolic execution engine has its drawbacks and limitations: Generation of some complex non-trivial objects often is impossible Computational costs for solving the system of restrictions State space explosion problem Based on these problems, a fuzzing module without symbolic execution is required for full-fledged testing of programs. Also, modern research shows that the most effective is the hybrid mode, when symbolic and concrete executions help each other. The most effective way of fuzzing without symbolic execution is greybox fuzzing, which is proposed in this PR. How it works? You can read about how greybox fuzzing works here. Fuzzing process can be divided into 2 stages: exploration and exploitation. In the exploration phase, seeds are generated to test the target function, in the exploitation phase, mutations are applied to the best seeds. Why we need exploitation phase? Consider an example of a simple Java program: public int test(int[] c) { if (c[0] == 0) { if (c[1] == 1) { if (c[2] == 2) { //Bug here return 42; } } } return -1; } The probability that we initially generate an array that finds a bug is 0%. It is much more likely to generate an array whose first element is 0, and then through mutations to get data that will find a bug. Exploration phase To implement the exploration phase, junit-quickcheck was used, which contains built-in configurable generators for many java library types. Initially, the library generated objects that were converted to UtModel using UtModelConstructor. But this approach has shown its inoperability due to the impossibility of converting complex objects containing a large number of fields into UtModel (java.lang.Thread for example). Therefore, it was decided to rewrite the library (package org.utbot.quickcheck) to generate UtModels instead of objects. Also in the org.utbot.engine.greyboxfuzzer.generator.GeneratorConfigurator class it is possible to configure generators by limiting the range of generated values and the size of collections. In addition to generators for many types from the standard library, a generator for user-defined classes has been implemented, which has the following capabilities: Generation of an object using a constructor Generation of an object using static methods Producing of an object from a static field Setting random values in the fields of the generated object Generation of classes that implement the interface The biggest difficulty in generating user classes is the processing of type parameters. For this, the libraries javaruntype (70 kB) and generics-resolver (77 kB) were used. In the implemented module, it is possible to replace type parameters with values suitable for bound, for example, in the function public int test(T a) { return 0; } The T parameter can be replaced by random inheritor of the Number class. The algorithm for object generation works as follows: An instance of the class is generated, which contains the target function (this instance) For each parameter of the target function, a ParameterTypeContext is built containing the necessary information for resolving type parameters A generator is searched in the GeneratorRepository, if it is a library type for which a generator exists, then it is taken, if not --- then a UserClassGenerator is generated UserClassGenerator chooses how to generate an object: with a probability of 2/3 a constructor, otherwise a static method or field When generating an object using a constructor, the constructor with the min number of parameters is selected with the highest probability Search for static methods and fields of object generation is performed using the Soot library The components responsible for generating custom class instances are in the org.utbot.engine.greyboxfuzzer.generator.userclasses.generator package The result of generation is UtAssembleModel The result of the exploration phase is a sorted set of seeds. Seeds are ranked according to the new coverage it opens. Exploitation phase This phase is designed to mutate seeds from the exploration phase. Exploitation phase has the following features: Calling a random class method of the generated object Setting a random field to a random value A set of built-in mutations for arrays During the work of this phase, the ranking of seeds is also carried out, the preference is given to "more successful". Experiments Experiments are carried out on projects from the SBST competition TODO() Current status The exploration phase is currently being tested and work in progress with exploitation phase.

Open Graph Description: Greybox fuzzer This document describes principles and capabilities of the implemented fuzzing module. For what? Any symbolic execution engine has its drawbacks and limitations: Generation of some ...

X Description: Greybox fuzzer This document describes principles and capabilities of the implemented fuzzing module. For what? Any symbolic execution engine has its drawbacks and limitations: Generation of some ...

Opengraph URL: https://github.com/UnitTestBot/UTBotJava/pull/1344

X: @github

direct link

Domain: patch-diff.githubusercontent.com

route-pattern/:user_id/:repository/pull/:id/checks(.:format)
route-controllerpull_requests
route-actionchecks
fetch-noncev2:63f29060-ecb2-0395-cc49-67c71a553e12
current-catalog-service-hash87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a
request-id8DEC:EC8E6:77099:9FF38:698EDA2F
html-safe-nonce4e8d7fe69182babde14075c54a98d6e6a761831d98ee4b8199158b60463a4483
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4REVDOkVDOEU2Ojc3MDk5OjlGRjM4OjY5OEVEQTJGIiwidmlzaXRvcl9pZCI6Ijc1NDM4NTEyMDgxMDU5NzQzMTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac3c9323a048f0ef4532e0e8b0f5235aa67cc0f7946425506b3e2c38070ac59d92
hovercard-subject-tagpull_request:1116428222
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/checks
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/UnitTestBot/UTBotJava/pull/1344/checks
twitter:imagehttps://avatars.githubusercontent.com/u/14219946?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/14219946?s=400&v=4
og:image:altGreybox fuzzer This document describes principles and capabilities of the implemented fuzzing module. For what? Any symbolic execution engine has its drawbacks and limitations: Generation of some ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecb2828a801ee6b7be618f3ac76fbf55def35bbc30f053a9c41bf90210b8b72ba
turbo-cache-controlno-preview
go-importgithub.com/UnitTestBot/UTBotJava git https://github.com/UnitTestBot/UTBotJava.git
octolytics-dimension-user_id87413538
octolytics-dimension-user_loginUnitTestBot
octolytics-dimension-repository_id480810501
octolytics-dimension-repository_nwoUnitTestBot/UTBotJava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id480810501
octolytics-dimension-repository_network_root_nwoUnitTestBot/UTBotJava
turbo-body-classeslogged-out env-production page-responsive full-width full-width-p-0
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee6b91a7e6e46287d26887e3fb7a4161657bab8f7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344/checks#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FUnitTestBot%2FUTBotJava%2Fpull%2F1344%2Fchecks
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2FUnitTestBot%2FUTBotJava%2Fpull%2F1344%2Fchecks
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fchecks&source=header-repo&source_repo=UnitTestBot%2FUTBotJava
Reloadhttps://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344/checks
Reloadhttps://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344/checks
Reloadhttps://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344/checks
UnitTestBot https://patch-diff.githubusercontent.com/UnitTestBot
UTBotJavahttps://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2FUnitTestBot%2FUTBotJava
Fork 45 https://patch-diff.githubusercontent.com/login?return_to=%2FUnitTestBot%2FUTBotJava
Star 142 https://patch-diff.githubusercontent.com/login?return_to=%2FUnitTestBot%2FUTBotJava
Code https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava
Issues 386 https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/issues
Pull requests 33 https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pulls
Discussions https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/discussions
Actions https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/actions
Projects 1 https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/projects
Wiki https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/wiki
Security 0 https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/security
Insights https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pulse
Code https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava
Issues https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/issues
Pull requests https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pulls
Discussions https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/discussions
Actions https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/actions
Projects https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/projects
Wiki https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/wiki
Security https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/security
Insights https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pulse
Sign up for GitHub https://patch-diff.githubusercontent.com/signup?return_to=%2FUnitTestBot%2FUTBotJava%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://patch-diff.githubusercontent.com/login?return_to=%2FUnitTestBot%2FUTBotJava%2Fissues%2Fnew%2Fchoose
DaniilStepanovhttps://patch-diff.githubusercontent.com/DaniilStepanov
UnitTestBot:mainhttps://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/tree/main
DaniilStepanov:greyboxfuzzerhttps://patch-diff.githubusercontent.com/DaniilStepanov/UTBotJava/tree/greyboxfuzzer
Conversation 0 https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344
Commits 30 https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344/commits
Checks 0 https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344/checks
Files changed https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344/files
Please reload this pagehttps://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344/checks
Please reload this pagehttps://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344/checks
Greybox fuzzer https://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344/checks#top
Please reload this pagehttps://patch-diff.githubusercontent.com/UnitTestBot/UTBotJava/pull/1344/checks
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.