AI-Assisted Fuzzing Harness Generation with a Local LLM - #2826
Open
carlospolop wants to merge 1 commit into
Open
AI-Assisted Fuzzing Harness Generation with a Local LLM#2826carlospolop wants to merge 1 commit into
carlospolop wants to merge 1 commit into
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://8ksec.io/ai-assisted-fuzzing-harness-local-llm Content Categories: Based on the analysis, this content was categorized under "Generic Methodologies & Resources > Fuzzing Methodology > AI Assisted Fuzzing And Vulnerability Discovery". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Overview
The post presents a reproducible, offline workflow for using a local large language model to draft C/C++ fuzzing harnesses. The open-weights model
qwen3.6:35b-a3bruns locally through Ollama, generates a minimallibFuzzerharness for a C record parser, and helps produce structured harnesses, seed corpora, dictionaries, sanitizer builds, and coverage-driven revisions. The actual vulnerability discovery remains the res...🔧 Technical Details
AI-assisted fuzzing harness generation: Provide a local code model with the exact target declaration and require a minimal
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size). Compare the generated declaration and call with the real header, make the harness deterministic, remove I/O and persistent state, guard every read from the fuzz buffer, and verify target execution through coverage. The model generates glue and supporting artifacts; coverage-guided mutation finds inputs, and sanitizers detect defects.Finding unvalidated length-field vulnerabilities: Identify parsers where attacker-controlled lengths reach
memcpy,memmove, allocation sizes, pointer arithmetic, array indexes, or loops without being compared against both destination capacity and remaining source bytes. In the demonstrated pattern, an 8-bitlencontrolsmemcpy(value, ..., len)whilevalueis 1...🤖 Agent Actions
Plan:
Repository discovery found an existing dedicated page,
src/AI/AI-Assisted-Fuzzing-and-Vulnerability-Discovery.md, plus the general fuzzing methodology. I’m now comparing that page against adjacent AI, fuzzing, sanitizer, and parser-fuzzing documentation before deciding whether anything is genuinely missing.The dedicated AI page covers LLM seed/grammar generation but not the blog’s key missing technique: reviewed generation of deterministic, structure-aware
LLVMFuzzerTestOneInputadapters, coupled to sanitizer builds and an iterative source-coverage feedback loop. I’ll add that workflow to this existing AI page only, avoiding duplication of the generic fuzzing page’s deeper AFL++ material.The existing page has now been extended in place with the missing local-harness workflow, dual structure-aware target strategy, reviewed seed/dictionary generation, sanitizer builds, and a coverage-driven LLM revision loop. I’m validating the diff, citation numbering, heading order, and repository build tooling now.
Validation has confirmed contiguous citations and a clean diff; the repository lacks both
mdbookandclang++, so I’m using structural Markdown checks, internal-link resolution, and source URL checks as the available verification path.Updated:
src/AI/AI-Assisted-Fuzzing-and-Vulnerability-Discovery.mdAdded:
Validation passed for Markdown structure, citations, internal links, source URLs, and
git diff --check.mdbookandclang++were unavailable locally.This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.