offensive-fuzzing
하는 일
이 스킬은 퍼즈 테스트 방법론입니다. 대상 선택, 퍼저 선택, 테스트 하네스, 입력 코퍼스, 충돌 분류를 다룹니다. 파일 파서, 네트워크 프로토콜, 드라이버, 펌웨어에 적용됩니다. 충돌 버그를 찾으려는 개발자와 보안 테스터를 위한 스킬입니다.
사용하는 경우
- ✓공격자보다 먼저 파일 파서나 네트워크 프로토콜의 충돌 버그를 찾고 싶을 때.
- ✓C나 C++의 파서 같은 라이브러리를 위한 퍼즈 하네스를 작성해야 할 때.
- ✓퍼즈 캠페인이 찾은 충돌을 정리하고 분류해야 할 때.
스킬 링크
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/fuzzing/offensive-fuzzing/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이미지 파서에 대한 퍼즈 테스트를 설정하고, 찾은 충돌을 정리하도록 도와주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 대상의 입력을 매핑하고 AFL++나 libFuzzer 같은 알맞은 퍼저를 고른 뒤 하네스를 작성합니다. 그다음 계측을 넣어 대상을 빌드하고, 캠페인을 실행하며, 각 충돌을 분류하도록 돕습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Offensive Fuzzing
Fuzzer Types
| Type | Coverage | Speed | Tools |
|---|---|---|---|
| BlackBox | Poor | Fast | Peach, Boofuzz |
| GreyBox | Good | Fast | AFL++, Honggfuzz, libFuzzer, WinAFL |
| Snapshot | Good | Fastest | Nyx, wtf, Snapchange |
| WhiteBox | Best | Slow | KLEE, QSYM, SymSan |
| Ensemble | Best | Fast | AFL++ + Honggfuzz + libFuzzer |
GreyBox sub-variants: Directed (AFLGo, UAFuzz), Grammar (AFLSmart, Tlspuffin), Concolic (QSYM, Driller), Kernel (syzkaller, kAFL, wtf).
Core Workflow
Research target → Choose analyses → Build harness → Seed corpus → Instrument → Fuzz → Triage crashes → Report
1. Research Target
- Map all input surfaces (files, network, IPC, syscalls, IOCTL)
- Identify high-value areas: previously patched code, complex parsers, newly added code, input ingestion points
- For kernel modules: look beyond
copy_from_user— DMA-BUF ops, page fault handlers, VM operation structs, allocation callbacks
2. Instrument and Build
# AFL++ (preferred for GreyBox)
CC=afl-clang-fast CXX=afl-clang-fast++ cmake -DCMAKE_BUILD_TYPE=Release .. && make -j
# libFuzzer + ASan/UBSan (C/C++)
cmake -DCMAKE_CXX_FLAGS="-fsanitize=fuzzer,address,undefined -O1 -g" ..
# CmpLog build for hard compares
AFL_LLVM_CMPLOG=1 CC=afl-clang-fast CXX=afl-clang-fast++ make clean all
Windows (MSVC): Project Properties → C/C++ → Address Sanitizer: Yes (/fsanitize=address)
3. Write Harness
libFuzzer (C++):
#include <cstdint>
#include <cstddef>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
parse_or_process(data, size);
return 0;
}
Honggfuzz HF_ITER (persistent mode — preferred for large targets):
#include "honggfuzz.h"
int main(int argc, char** argv) {
initialize_target(); // runs once
for (;;) {
size_t len; uint8_t *buf;
HF_ITER(&buf, &len);
FILE* s = fmemopen(buf, len, "r");
target_function(s);
fclose(s);
reset_target_state();
}
}
AFL++ persistent mode (__AFL_LOOP):
while (__AFL_LOOP(10000)) {
// re-read input and process
}
macOS IPC (Mach message fuzzing):
void *lib_handle = dlopen("libexample.dylib", RTLD_LAZY);
pFunction = dlsym(lib_handle, "DesiredFunction");
4. Build Seed Corpus
- Pull from target's test suite, bug reports, and real-world samples
- Web-crawl (Common Crawl) for file formats; filter by MIME type
- Minimize:
afl-cmin -i raw_corpus -o seeds -- ./target @@ - Trim inputs:
afl-tmin -i crash -o crash.min -- ./target @@
5. Launch Fuzzing
AFL++ parallel (primary + secondary with cmplog):
afl-fuzz -M f1 -i seeds -o findings -x dict.txt -- ./target @@
afl-fuzz -S s1 -i seeds -o findings -c 0 -- ./target @@
libFuzzer:
./target_libfuzzer corpus/ -max_total_time=3600 -workers=4
Binary-only (QEMU):
afl-fuzz -Q -i seeds -o findings -- target.exe @@
Snapshot (AFL++ Nyx):
NYX_MODE=1 AFL_MAP_SIZE=1048576 afl-fuzz -i seeds -o findings -- ./target_nyx @@
Ensemble (AFL++ + Honggfuzz sharing corpus):
# Terminal 1
afl-fuzz -M fuzzer1 -i seeds -o sync_dir -- ./target @@
# Terminal 2
../honggfuzz/honggfuzz -i sync_dir/fuzzer1/queue -W sync_dir/hfuzz \
--linux_perf_ipt_block -t 10 -- ./target ___FILE___
6. Monitor and Unstick
If progress stalls:
- Enable CmpLog:
-c 0on AFL++ secondaries - Add dictionary:
-x dict.txtorAFL_TOKEN_FILE - Switch to directed fuzzing (AFLGo) targeting specific BBs/functions
- Use concolic assistance (QSYM, Driller) on hard branches
- Snapshot the target to increase exec/s
AFL_MAP_SIZE=1048576,-L 0for MOpt scheduler
7. Triage Crashes
# 1. Minimize
afl-tmin -i crash -o crash.min -- ./target @@
# 2. Symbolize
ASAN_OPTIONS=abort_on_error=1:symbolize=1 ./target crash.min 2>asan.log
# 3. Hash + bucket
./cov-tool --bbids ./target crash.min > cov.hash
./bucket.py --key "$(cat cov.hash)" --log asan.log --out triage/
Sanitizer env quick reference:
ASAN_OPTIONS=abort_on_error=1:symbolize=1:detect_stack_use_after_return=1
UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1
TSAN_OPTIONS=halt_on_error=1:history_size=7
MSAN_OPTIONS=poison_in_dtor=1:track_origins=2
Oracle Selection
| Bug Class | Oracle |
|---|---|
| Memory safety | ASan, HWASan (AArch64, lower overhead) |
| Uninitialized reads | MSan |
| Concurrency | T |
자주 묻는 질문
어떤 퍼저를 다루나요?
AFL++, libFuzzer, Honggfuzz, Boofuzz, syzkaller 등을 다룹니다.
소스 코드가 필요한가요?
커버리지 기반 퍼징은 계측을 넣어 빌드해야 하므로, 소스 코드가 있을 때 가장 효과적입니다.
충돌 분류란 무엇인가요?
충돌을 원인별로 나누고 실제 보안 버그인지 확인하는 작업입니다.
상세 정보
작성자의 원본 설명
Practical offensive fuzzing methodology covering target identification, fuzzer selection (AFL++, libFuzzer, Honggfuzz, Boofuzz, syzkaller), harness writing, corpus curation, mutation strategies, coverage measurement, and crash triage. Use when setting up or running fuzz campaigns against any target: file parsers, network protocols, kernel drivers, EDR engines, embedded firmware, or language runtimes.
repo: SnailSploit/Claude-Red
인기도
- GitHub 스타
- 10k
- 순위
- #11958
- 라이선스
- MIT
- 업데이트
- 2026. 10. 12.
댓글
- …
이 저장소의 다른 스킬
offensive-active-directory
10k에이전트가 승인된 Active Directory 보안 테스트를 계획하도록 돕습니다. 네트워크 매핑부터 Domain Admin까지 가는 공격 경로 찾기까지 포함합니다.
offensive-netexec
10k에이전트가 승인된 네트워크 테스트에 NetExec(nxc) 도구를 사용하도록 돕습니다. 프로토콜, 인증, 자격 증명 점검을 다룹니다.
offensive-api-abuse
10k에이전트가 비즈니스 로직 악용, GraphQL 위험, 경쟁 상태를 찾는 승인된 API 보안 테스트를 계획하도록 돕습니다.
offensive-api-security
10k에이전트가 OWASP API Top 10을 기준으로 REST, gRPC, WebSocket API에 대한 승인된 보안 테스트를 실행하도록 돕습니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.