본문으로 건너뛰기
Skillpedia
테스트10k · #11958

offensive-fuzzing

하는 일

이 스킬은 퍼즈 테스트 방법론입니다. 대상 선택, 퍼저 선택, 테스트 하네스, 입력 코퍼스, 충돌 분류를 다룹니다. 파일 파서, 네트워크 프로토콜, 드라이버, 펌웨어에 적용됩니다. 충돌 버그를 찾으려는 개발자와 보안 테스터를 위한 스킬입니다.

사용하는 경우

  • ✓공격자보다 먼저 파일 파서나 네트워크 프로토콜의 충돌 버그를 찾고 싶을 때.
  • ✓C나 C++의 파서 같은 라이브러리를 위한 퍼즈 하네스를 작성해야 할 때.
  • ✓퍼즈 캠페인이 찾은 충돌을 정리하고 분류해야 할 때.

스킬 링크

https://github.com/SnailSploit/Claude-Red/blob/main/Skills/fuzzing/offensive-fuzzing/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/SnailSploit/Claude-Red/blob/main/Skills/fuzzing/offensive-fuzzing/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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 0 on AFL++ secondaries
  • Add dictionary: -x dict.txt or AFL_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 0 for 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬