restler
RESTler explores deeper API states by inferring request dependencies from OpenAPI definitions.
Workflow (Recommended Order)
- Compile: OpenAPI -> RESTler grammar.
- Test (smoke): verify setup and required dictionary values.
- Fuzz-lean: quick bug hunting baseline.
- Fuzz: deep BFS-style state exploration.
Quick Start
# Build (local)
python build-restler.py --dest_dir <restler_bin>
# Typical campaign starts with compile + test before fuzz modes
restler.exe fuzz-lean --grammar_file <grammar.py> --dictionary_file <dict.json>
restler.exe fuzz --grammar_file <grammar.py> --dictionary_file <dict.json> --time_budget 1
Operator Flow
- Validate schema quality and authentication path first.
- Run
test/smoke style workflow to confirm dependencies and dictionary values. - Run
fuzz-leanfor quick risk discovery. - Run
fuzzfor deeper sequence exploration with settings file tuning. - Reproduce via replay logs and bug buckets before assigning fixes.
Practical Notes
- Always fix setup gaps discovered in
testmode before deep fuzzing. - Deep fuzzing can cause service instability/outages on weak implementations.
- Use replay logs and bug buckets for deterministic re-validation.
High-Value Settings
fuzzing_mode(bfs,bfs-cheap,random-walk,directed-smoke-test)max_sequence_length,max_combinations- include/exclude endpoint filters (
include_requests,exclude_requests,path_regex) - retry & timing controls (
custom_retry_settings,producer_timing_delay) - trace database (
use_trace_database) for structured replay workflows
Replay & Triage Pattern
- Start from
bug_buckets.txtsummary. - Open specific bucket replay log and verify request sequence.
- Replay with same auth/host settings.
- Confirm reproducibility and collect minimal sequence evidence.
- Patch server + rerun replay to verify closure.
Common Pitfalls
- Skipping auth refresh handling leads to noisy false negatives.
- Fuzzing full API surface without scope controls can burn time-budget quickly.
- Forgetting manual cleanup after replay-created resources.
Resources
- https://github.com/microsoft/restler-fuzzer
- https://github.com/microsoft/rest-api-fuzz-testing
- https://raw.githubusercontent.com/microsoft/restler-fuzzer/main/docs/user-guide/Fuzzing.md
- https://raw.githubusercontent.com/microsoft/restler-fuzzer/main/docs/user-guide/SettingsFile.md
- https://raw.githubusercontent.com/microsoft/restler-fuzzer/main/docs/user-guide/BugBuckets.md
- https://raw.githubusercontent.com/microsoft/restler-fuzzer/main/docs/user-guide/Replay.md