File size: 1,478 Bytes
d517dc9
 
 
 
1
2
3
4
5
{"type": "session", "harness": "opencode", "id": "misc-0008", "name": "Fuzzing Fundamentals"}
{"type": "message", "message": {"role": "system", "content": "You are an expert programmer."}}
{"type": "message", "message": {"role": "user", "content": "Explain fuzzing methods and techniques"}}
{"type": "message", "message": {"role": "assistant", "content": "Fuzzing: automated testing with random/mutated inputs to find bugs.\n\nTypes:\n- Generation-based: create inputs from scratch (grammar-based)\n- Mutation-based: mutate existing inputs (bit flips, insertions, deletions)\n\nCoverage-guided: use code coverage feedback to guide mutations. Most effective approach.\n\nKey tools:\n- AFL/AFL++: mutation-based, coverage-guided. Linux/macOS. Uses fork-server mode.\n- libFuzzer: in-process, coverage-guided. LLVM-based. Fast but crashes may kill harness.\n- Honggfuzz: multi-process, hardware feedback (Intel PT). Cross-platform.\n- OSS-Fuzz: Google's continuous fuzzing for open source. Free infrastructure.\n- Jazzer: Java fuzzing (JVM-based, built on libFuzzer).\n- go-fuzz: Go fuzzing. Coverage-guided.\n- Atheris: Python fuzzing (based on libFuzzer).\n\nFuzzing loop: input -> mutate -> execute -> check coverage -> if new coverage, add to corpus.\n\nCorpus management: seed corpus of valid inputs. Minimize: remove bytes that don't affect coverage.\n\nSanitizers: ASAN (memory), UBSAN (undefined behavior), TSAN (threads). Compile with -fsanitize=address,undefined."}}