playbooks
FFUF Playbook
FFUF (Fuzz Faster U Fool) เป็น web fuzzer ที่เร็วที่สุดตัวหนึ่ง ใช้ค้น directory, file, parameter, vhost, และ fuzz ค่าใน request คู่มือนี้รวบรวมทุก use case พร้อมคำสั่งจริง, การ filter/match ผล, และเทคนิคขั้นสูงแบบใช้งานได้ทันที
BeginnerIntermediateAdvanced#ffuf#fuzzing#directory#vhost#parameter#playbook#ctf
1. พื้นฐาน + การ filter ผล
FFUF แทนคำว่า FUZZ ในคำสั่งด้วยแต่ละบรรทัดใน wordlist หัวใจของการใช้ FFUF ให้ได้ผลคือ filter/match เพื่อกรอง response ที่ไม่ต้องการออก (เช่น 404 ที่ตอบ size เท่ากันหมด)
พื้นฐานและ filterLinux
# directory fuzzing พื้นฐาน
ffuf -u https://target.com/FUZZ -w /usr/share/wordlists/dirb/common.txt
# filter (fs/fc/fw/fl) — ซ่อนผลที่ไม่ต้องการ
ffuf -u https://target.com/FUZZ -w list.txt -fc 404 # ซ่อน status 404
ffuf -u https://target.com/FUZZ -w list.txt -fs 1234 # ซ่อน size 1234
ffuf -u https://target.com/FUZZ -w list.txt -fw 12 # ซ่อน word count 12
ffuf -u https://target.com/FUZZ -w list.txt -fl 5 # ซ่อน line count 5
# match (mc/ms/...) — แสดงเฉพาะที่ต้องการ
ffuf -u https://target.com/FUZZ -w list.txt -mc 200,301,302,403
# auto-calibrate (ตรวจ baseline 404 อัตโนมัติ)
ffuf -u https://target.com/FUZZ -w list.txt -ac-ac (auto-calibrate) ฉลาดสุดสำหรับเริ่ม; ถ้าเจอ false positive เยอะ ใช้ -fs/-fw กรอง size/word ของ 404 page
2. Use cases ทั้งหมด
directory, file extension, recursionLinux
# หาไฟล์ตามนามสกุล
ffuf -u https://target.com/FUZZ -w list.txt -e .php,.html,.txt,.bak
# recursive (เจอ dir แล้วเจาะลึกต่อ)
ffuf -u https://target.com/FUZZ -w list.txt -recursion -recursion-depth 2
# เพิ่ม speed/threads
ffuf -u https://target.com/FUZZ -w list.txt -t 100
# output เก็บผล
ffuf -u https://target.com/FUZZ -w list.txt -o results.json -of jsonvhost, parameter, POST data fuzzingLinux
# vhost discovery (subdomain ผ่าน Host header)
ffuf -u https://target.com -H "Host: FUZZ.target.com" -w subdomains.txt -fs 0
# GET parameter name discovery
ffuf -u "https://target.com/page?FUZZ=value" -w params.txt -fc 404
# parameter value fuzzing (เช่น หา id ที่มีผล)
ffuf -u "https://target.com/page?id=FUZZ" -w values.txt -fw 100
# POST data fuzzing
ffuf -u https://target.com/login -X POST \
-d "username=admin&password=FUZZ" \
-H "Content-Type: application/x-www-form-urlencoded" \
-w passwords.txt -fc 401
# fuzz หลายตำแหน่งพร้อมกัน (clusterbomb)
ffuf -u "https://target.com/FUZZ1/FUZZ2" -w dirs.txt:FUZZ1 -w files.txt:FUZZ2 -mode clusterbombvhost: -fs 0 หรือ filter ตาม size ของ default response; parameter discovery เชื่อมกับหัวข้อ Parameter Discovery
3. เทคนิคขั้นสูง
- auth/cookie:
-H "Cookie: session=..."หรือ-b "key=val"fuzz หลัง login - rate limit:
-rate 50จำกัด req/วินาที (เลี่ยง WAF/ban) - delay:
-p 0.1หน่วงระหว่าง request - proxy ผ่าน Burp:
-x http://127.0.0.1:8080ดู request ใน Burp - match regex:
-mr "admin"แสดงเฉพาะ response ที่มีคำนี้ - silent + เฉพาะ URL:
-sเอาผลไป pipe ต่อ - หลาย wordlist: pitchfork (จับคู่บรรทัด) vs clusterbomb (ทุก combination)
4. Workflow แนะนำ (web recon)
- 1เริ่ม: ffuf -u URL/FUZZ -w common.txt -ac (auto-calibrate)
- 2ถ้า false positive → ดู size/word ของ 404 แล้ว -fs/-fw กรอง
- 3หาไฟล์: เพิ่ม -e .php,.txt,.bak ตามเทคโนโลยีเป้าหมาย
- 4เจอ dir น่าสนใจ → -recursion เจาะลึก หรือ fuzz ต่อใน dir นั้น
- 5vhost: -H 'Host: FUZZ.target.com' หา subdomain
- 6parameter: fuzz ?FUZZ=value แล้ว value fuzzing
- 7เก็บผล -o results.json; proxy -x ผ่าน Burp ถ้าต้องวิเคราะห์ลึก
5. Decision Tree — fuzz ไม่เจอทำอะไรต่อ
FFUF — แก้ปัญหาเมื่อ fuzz
เริ่ม fuzz directory
ffuf -u URL/FUZZ -w wordlist
ผลออกมาเป็นยังไง?
เจอ 200/301→ไล่ recursion + extension
ทุก path คืน 200→-fc/-fs กรอง false positive
เจอน้อย/ไม่เจอ→เปลี่ยน wordlist + vhost fuzz
เจอ endpoint มี parameter?
fuzz parameter: -u URL?FUZZ=val
พบ param→ส่งต่อทดสอบช่องโหว่ (web)
ได้ attack surface ครบ → ทดสอบช่องโหว่
5. Quick Reference
- พื้นฐาน: ffuf -u URL/FUZZ -w list.txt -ac
- filter: -fc (status) -fs (size) -fw (word) -fl (line)
- match: -mc 200,301,403; -mr 'regex'
- ไฟล์: -e .php,.bak; recursion: -recursion
- vhost: -H 'Host: FUZZ.target.com' -fs 0
- parameter: ?FUZZ=val; POST: -X POST -d 'pass=FUZZ'
- auth -b cookie; proxy -x Burp; rate -rate 50
🧭 จับมือทำทีละขั้น (มีแค่ Kali) + ถ้าติดไปไหนต่อ
สมมติเจอเว็บเป้าหมายแต่ยังไม่รู้ว่ามี path/parameter อะไรซ่อนอยู่บ้าง มีแค่ Kali ทำตามนี้ทีละขั้นเพื่อขุดหา attack surface
- 1เช็คว่ามี ffuf ไหม: `ffuf -V` (Kali มีมาให้แล้ว) ถ้าไม่มี `sudo apt install ffuf -y`
- 2หา wordlist ที่จะใช้: เช็ค `ls /usr/share/wordlists/` หรือ `sudo apt install seclists -y` แล้วดูที่ `/usr/share/seclists/Discovery/Web-Content/`
- 3เริ่ม fuzz directory พื้นฐาน: `ffuf -u https://target.com/FUZZ -w /usr/share/wordlists/dirb/common.txt -ac`
- 4ดูผล — ถ้าทุกบรรทัดคืน status/size เดียวกันหมด (false positive) → เปิด response ตัวอย่างดู size ที่ควรกรอง
- 5กรองด้วย -fc (status) หรือ -fs (size) ตามที่เห็น เช่น `ffuf -u https://target.com/FUZZ -w list.txt -fs 1234`
- 6เจอ status 200/301 ที่น่าสนใจ → ลองเพิ่มนามสกุลไฟล์: `ffuf -u https://target.com/FUZZ -w list.txt -e .php,.txt,.bak`
- 7เจอ directory → เจาะลึกต่อด้วย recursion: `ffuf -u https://target.com/FUZZ -w list.txt -recursion -recursion-depth 2`
- 8อยากหา parameter ที่มีผล: `ffuf -u "https://target.com/page?FUZZ=value" -w params.txt -fc 404`
- 9โดน rate limit/WAF บล็อก (เห็น 403/429 เพิ่มขึ้นเรื่อยๆ) → ลดความเร็ว -rate 20 หรือเพิ่ม delay -p 0.5
- 10เจอ endpoint ที่รับ parameter แล้ว → ทดสอบต่อว่าเป็นช่องโหว่อะไร (LFI/SQLi) ในหัวข้อเฉพาะ
จับมือ fuzz หา attack surface
เช็ค ffuf พร้อมใช้ไหม
ffuf -V
✅ ใช้ได้→→ ไปเตรียม wordlist
❌ ไม่มี→→ sudo apt install ffuf -y
เริ่ม fuzz ด้วย -ac (auto-calibrate)
ffuf -u URL/FUZZ -w common.txt -ac
ผลออกมาเป็นยังไง?
✅ เจอ 200/301 ชัดเจนไม่กี่รายการ→→ ไล่ recursion + extension ต่อ
❌ ทุกอย่างคืน 200 เหมือนกันหมด→→ -fs/-fc กรอง false positive
❌ ไม่เจออะไรเลย→→ เปลี่ยน wordlist ใหญ่ขึ้น (SecLists) หรือลอง vhost fuzz
เจอ 403/429 เพิ่มขึ้นระหว่าง scan (rate limit/WAF)
✅ ใช่ โดนบล็อก→→ ลด -rate หรือเพิ่ม -p delay
❌ ไม่ ผลปกติ→→ ทำต่อได้เลย
เจอ endpoint มี parameter ไหม?
✅ เจอ→→ fuzz parameter ต่อ (?FUZZ=val)
❌ ยังไม่เจอ→→ ลอง vhost fuzz (Host: FUZZ.target.com)
ได้ attack surface ครบ → ทดสอบช่องโหว่ต่อ
| ขั้นตอน/งาน | เครื่องมือใน Kali | ติดตั้งเพิ่ม (ถ้าไม่มี) | เครื่องมือออนไลน์ |
|---|---|---|---|
| fuzz directory/file | ffuf | - | - |
| wordlist มาตรฐาน | /usr/share/wordlists/dirb, dirbuster | sudo apt install seclists | - |
| wordlist ใหญ่กว่า | - | git clone SecLists | github.com/danielmiessler/SecLists |
| proxy ผ่าน Burp ดูรายละเอียด | -x http://127.0.0.1:8080 | - | - |
| หา subdomain (vhost) | ffuf -H Host: | amass, subfinder | - |
| ทดสอบช่องโหว่ที่เจอ | curl, burp repeater | - | - |
🚑 ถ้าตันสนิท ลองท่าถัดไป: (1) fuzz ไม่เจอ path ไหนเลยแม้เปลี่ยน wordlist → ลอง Burp Suite Playbook เดินเว็บด้วยมือดู JS/comment ที่ซ่อน endpoint ไว้ (2) เจอ parameter แล้วสงสัยว่าเป็น LFI → ไป LFI (3) parameter ดูเหมือนรับ ID เข้า database → ไป SQL Injection (4) โดน WAF บล็อกหนักจนทำต่อไม่ได้ → ลด rate ลงมากๆ หรือเปลี่ยน User-Agent/header ดูว่า WAF กรองจากอะไร
หัวข้อที่เชื่อมโยง
Directory Enumerationเกี่ยวข้องโดยตรงBurp Suite Playbookอยู่ใน workflowรัน CTF บน macOS (Kali ↔ Mac)เกี่ยวข้องโดยตรงParameter Discoveryหัวข้อใกล้เคียงLocal File Inclusion (LFI)อยู่ใน workflowSQL Injectionอยู่ใน workflowPath Traversalเครื่องมือเดียวกันFile Upload Vulnerabilitiesเครื่องมือเดียวกันIDOR (Insecure Direct Object Reference)เครื่องมือเดียวกันOpen Redirectเครื่องมือเดียวกันRace Conditionเครื่องมือเดียวกันSubdomain Enumerationเครื่องมือเดียวกัน
โน้ตของฉัน
ยังไม่มีโน้ตสำหรับหัวข้อนี้