๐ก๏ธ ๊ณ ์ฑ๋ฅ WAF ๋ฐ CDN ํ์ง ๋๊ตฌ. ๋ณดํธ ๊ณ์ธต(Cloudflare, Akamai, AWS, Fastly ๋ฑ)์ ์๋ณํ๊ณ , ์ฐํ ํ์ด๋ก๋๋ก ํจ๊ณผ์ฑ ๋ฐ ์ ์ฉ ํ ์คํธ๋ฅผ ์คํํ๋ฉฐ, ๋ณด์ ํ์ธ ๋ณด๊ณ ์๋ฅผ ์์ฑํฉ๋๋ค. Rust๋ก ์ ์๋์์ต๋๋ค ๐ฆ.
WAF(Web Application Firewall) ๋ฐ CDN(Content Delivery Network)์ ํ์ง, ํ ์คํธ, ํ๋กํ์ผ๋งํ๊ธฐ ์ํ CLI ๋๊ตฌ์ ๋๋ค.
์ค์: ๋ณธ์ธ์ด ์์ ํ๊ฑฐ๋ ๋ช ์์ ์ธ ํ ์คํธ ๊ถํ์ ๋ณด์ ํ ์์คํ ๋ง ํ ์คํธํ์ญ์์ค.
AI ์ฝ๋ฉ ์์ด์ ํธ์ฉ: ์คํฌ ๋งคํ ๋ฐ ์ํฌํ๋ก์ฐ ์๋ด๋ AGENTS.md๋ฅผ ์ฐธ์กฐํ์ญ์์ค. ์ ์ฒด ํ๊ฐ์๋ agent-skills/waf-assess/WORKFLOW.md๋ฅผ ์ฌ์ฉํ๊ณ , ๋ณํฉ ์ ์๋ agent-skills/validate-build/WORKFLOW.md๋ฅผ ์ฌ์ฉํ์ญ์์ค.
| ๋ชจ๋ | ํ ์คํธ ๋์ | ํ๋๊ทธ |
|---|---|---|
| ํ์ง | ๋์๋ฅผ ๋ณดํธํ๋ WAF/CDN ์๋ณ | waf-detect <url> |
| ์ค๋ชจํฌ ํ ์คํธ | ์๋ ค์ง ๊ณต๊ฒฉ ํ์ด๋ก๋๋ฅผ ์ ์กํ๊ณ ์ฐจ๋จ๋ฅ ์ธก์ | --smoke-test <url> |
| ์งํ ํ ์คํธ | ๋ถ๋ฅ๋ ๊ณต๊ฒฉ ํ๋ก๋ธ๋ฅผ ์ ์กํ๊ณ ์ฐจ๋จ/์ฑ๋ฆฐ์ง/ํ์ฉ ์ธก์ | --va <url> |
| ํ์ ๋ถ์ | 5๊ฐ ์ฑ๋์ ๊ฑธ์ณ WAF ์ ๊ตํจ์ ํ ์คํธํ๋ ์ ํ๋ก๋ธ | --va2 <url> --va2-run |
| ๋ณด์ ํ์ธ ๋ณด๊ณ ์ | ๋ชจ๋ ํ ์คํธ ๊ฒฐ๊ณผ๋ฅผ ๊ฒฐํฉํ ํตํฉ ๋ฑ๊ธ(A-F) | --posture <url> |
| HTML ๋ณด๊ณ ์ | ์ ์ฅ๋ JSON ๊ฒฐ๊ณผ๋ฅผ ๊ณต์ ๊ฐ๋ฅํ ์ ์ ๋ณด๊ณ ์๋ก ๋ ๋๋ง | report <file.json> |
cargo build --release
./target/release/waf-detect scan example.com
# Full hardening scan + HTML report
./target/release/waf-detect hardening https://example.com --output /tmp/example-hardening.json
./target/release/waf-detect report /tmp/example-hardening.json --output /tmp/example-hardening.html
| ๋ชจ๋ | ๋ช ๋ น์ด |
|---|---|
| ํ์ง | waf-detect scan <url> ๋๋ waf-detect <url> |
| ํ๋๋ | waf-detect hardening <url> --output file.json |
| ์ค๋ชจํฌ ํ ์คํธ | waf-detect --smoke-test <url> |
| ์งํ | waf-detect va <url> |
| ํ์ | waf-detect va2 <url> --run |
| ๋ณด์ ํ์ธ | waf-detect --posture <url> |
| ํจ๊ณผ์ฑ | waf-detect --effectiveness <url> |
| ์ค๋ฆฌ์ง ํ๋ก๋ธ | waf-detect origin-probe <url> --json |
| HTML ๋ณด๊ณ ์ | waf-detect report <file.json> -o <file.html> |
ํค๋, ๋ณธ๋ฌธ, DNS, TLS, ํ์ด๋ฐ์ ํตํด WAF/CDN์ ์๋ณํฉ๋๋ค. 12๊ฐ ์ ๊ณต์: CloudFlare, AWS, Akamai, Fastly, Vercel, Azure, F5, Imperva, ModSecurity, Sucuri, Radware, FortiWeb.
waf-detect scan example.com --json
waf-detect scan @urls.txt --ndjson
์๋ ค์ง ๊ณต๊ฒฉ ํ์ด๋ก๋๋ฅผ ์ ์กํ๊ณ WAF๊ฐ ์ฐจ๋จ, ์ฑ๋ฆฐ์ง, ๋๋ ํ์ฉํ๋ ํญ๋ชฉ์ ์ธก์ ํฉ๋๋ค. ํ์ฑ ์ค๋ชจํฌ ํ ์คํธ๋ ๋ฑ๋ก๋ ์์ ๋์์ ๋ํด์๋ง ์คํ๋ฉ๋๋ค.
./target/release/waf-detect --smoke-test example.com
# Aggressive mode (more payloads)
./target/release/waf-detect --smoke-test example.com --aggressive
# Export results
./target/release/waf-detect --smoke-test example.com -o results.json
ํ ์คํธ๋๋ ๊ณต๊ฒฉ ์นดํ ๊ณ ๋ฆฌ: SQL ์ธ์ ์ (๊ธฐ๋ณธ + ๊ณ ๊ธ), XSS(๊ธฐ๋ณธ + ๊ณ ๊ธ), ๋ช ๋ น์ด ์ธ์ ์ , ๊ฒฝ๋ก ์ํ, SSTI, SSRF, Log4Shell, ํ์ผ ์ ๋ก๋, ์ค์บ๋ ํ์ง, GraphQL ์ธ์ ์ , HTTP ์์ฒญ ์ค๋จธ๊ธ๋ง, ํ๋กํ ํ์ ์ค์ผ, WebSocket ์ธ์ ์ , ์ด๊ฑฐ.
๊ฒฐ๊ณผ ๋ถ๋ฅ:
BLOCKED โ WAF๊ฐ ์์ฒญ์ ์ฐจ๋จํจ(์ผ๋ฐ์ ์ผ๋ก 403)CHALLENGE โ ๋ด ๋ณดํธ๊ฐ ํธ๋ฆฌ๊ฑฐ๋จ(JS ์ฑ๋ฆฐ์ง, CAPTCHA)ALLOWED โ ์์ฒญ์ด ์ค๋ฆฌ์ง๊น์ง ํต๊ณผํจERROR โ ๋น์ฐจ๋จ ์คํจ(404, 500, ํ์์์)๋ถ๋ฅ๋ ๊ณต๊ฒฉ ํ๋ก๋ธ๋ฅผ ์ ์กํ๊ณ ์ ๋ขฐ๋ ์ ์์ ํจ๊ป ์ฐจ๋จ/์ฑ๋ฆฐ์ง/ํ์ฉ๋ฅ ์ ์ธก์ ํฉ๋๋ค. ๋ฑ๋ก๋ ๋์ ๋ฒ์๊ฐ ํ์ํฉ๋๋ค.
# Register owned targets once
./target/release/waf-detect --scope init example.com
# Run enforcement test
./target/release/waf-detect --va https://example.com
# With JSON output
./target/release/waf-detect --va https://example.com --va-json
# Save report
./target/release/waf-detect --va https://example.com --va-output report.json
์ต์ :
--va-tier 1|2|3 โ ์์ ๋ฑ๊ธ(1 = ๊ฐ์ฅ ์์ )--va-budget N โ ์คํ๋น ์ต๋ ์์ฒญ ์(๊ธฐ๋ณธ๊ฐ: 120)--va-timeout SECONDS โ ์์ฒญ๋น ํ์์์(๊ธฐ๋ณธ๊ฐ: 15)--va-delay MS โ ์์ฒญ ๊ฐ ์ง์ฐ(๊ธฐ๋ณธ๊ฐ: 750)--va-variants N โ ํ์ด๋ก๋ ํ
ํ๋ฆฟ๋น ๋ณํ ์(๊ธฐ๋ณธ๊ฐ: 4)--va-replay โ ๋ฆฌํ๋ ์ด ๊ณํ์ JSON์ผ๋ก ๋ด๋ณด๋ด๊ธฐ--va-replay-csv โ ๋ฆฌํ๋ ์ด ๊ณํ์ CSV๋ก ๋ด๋ณด๋ด๊ธฐ5๊ฐ HTTP ์ฑ๋์ ๊ฑธ์ณ ์ ํ๋ก๋ธ(ํ๋๋ ์ ์, ํ๋๋ ์ ์ฑ)๋ฅผ ์ ์กํ์ฌ WAF ์ ๊ตํจ์ ํ ์คํธํฉ๋๋ค. WAF๊ฐ ์ด๋ค์ ๋ค๋ฅด๊ฒ ์ฒ๋ฆฌํ๋์ง ์ธก์ ํฉ๋๋ค.
# Dry run (shows plan without executing)
./target/release/waf-detect --va2 https://example.com
# Run behavioral analysis
./target/release/waf-detect --va2 https://example.com --va2-run
# Full 5-phase analysis
./target/release/waf-detect --va2 https://example.com --va2-run \
--va2-phases baseline,protocol-variance,state-escalation,behavioral-pressure,challenge-interaction
# Save results
./target/release/waf-detect --va2 https://example.com --va2-run --va2-output results.json
์ธก์ ํญ๋ชฉ:
| ์ ํธ | ํ ์คํธ ๋์ |
|---|---|
| ์ธ์ฝ๋ฉ ๋ฐฉ์ด | WAF๊ฐ ๋งค์นญ ์ ์ ์ธ์ฝ๋ฉ๋ ๊ฒฝ๋ก๋ฅผ ์ ๊ทํํ๋๊ฐ? |
| ์ธ์ ์ถ์ | WAF๊ฐ ์ธ์ ์ํ๋ฅผ ์ถ์ ํ๊ณ ๋ฐ๋ณต ๋จ์ฉ ์ ์์ค์ปฌ๋ ์ด์ ํ๋๊ฐ? |
| ๋ด ์ฑ๋ฆฐ์ง | WAF๊ฐ CAPTCHA ๋๋ JS ์ฑ๋ฆฐ์ง๋ฅผ ๋ฐํํ๋๊ฐ? |
| ์๋ ์ ํ | WAF๊ฐ ๋น ๋ฅธ ์์ฒญ์ ์ ํํ๋๊ฐ? |
| ๊ณต๊ฒฉ ์ธ์ | WAF๊ฐ ๊ณต๊ฒฉ ํ๋ก๋ธ์ ์ ์ ์์ฒญ์ ๊ตฌ๋ถํ๋๊ฐ? |
ํ ์คํธ๋๋ ์ฑ๋: Path, Query, Header, Body, Method. ๊ณต๊ฒฉ ํ์ง์จ์ด 0%์ธ ์ฑ๋์ ๋ณดํธ๋์ง ์๋ ๊ฒ์ผ๋ก ํ์๋ฉ๋๋ค.
์ต์ :
--va2-phases LIST โ ์คํํ ๋จ๊ณ(์ผํ๋ก ๊ตฌ๋ถ)--va2-seed N โ ์ฌํ ๊ฐ๋ฅํ ๊ฒฐ๊ณผ๋ฅผ ์ํ ๊ฒฐ์ ์ ์๋(๊ธฐ๋ณธ๊ฐ: 1337)--va2-budget N โ ์์ฒญ ์์ฐ(๊ธฐ๋ณธ๊ฐ: 60)--va2-json โ ๊ณํ/๋ณด๊ณ ์๋ฅผ JSON์ผ๋ก ์ถ๋ ฅํ์ง ์ ๋ขฐ๋, ์งํ ๊ฒฐ๊ณผ, ํ์ ๋ถ์์ ๊ฒฐํฉํ ํตํฉ ๋ณด์ ๋ฑ๊ธ(A-F) ๋ฐ ์ํ ์ ์(0-100)๋ฅผ ์์ฑํฉ๋๋ค.
# Detection only
./target/release/waf-detect --posture example.com
# Include behavioral analysis
./target/release/waf-detect --posture example.com --posture-va2
# Include enforcement testing (VA1) -- distinguishes "WAF present but not
# enforcing" (monitor/log-only mode) from "no WAF at all"
./target/release/waf-detect --posture example.com --posture-va1
# JSON output
./target/release/waf-detect --posture example.com --posture-va2 --posture-json
๋ฑ๊ธ ์ฒ๋:
์ ์ฅ๋ JSON ์ค์บ ์ํฐํฉํธ๋ฅผ ๋ก์ปฌ์์ ๊ฒํ ํ๊ณ ๋ค๋ฅธ ์์ง๋์ด์ ๊ณต์ ํ๊ธฐ ์ฌ์ด ์ ์ HTML ๋ณด๊ณ ์๋ก ๋ ๋๋งํฉ๋๋ค.
# Render a saved hardening report
./target/release/waf-detect hardening https://example.com --output /tmp/example-hardening.json
./target/release/waf-detect report /tmp/example-hardening.json
# Render a saved posture report
./target/release/waf-detect --posture https://example.com --posture-va2 --posture-json > /tmp/example-posture.json
./target/release/waf-detect report /tmp/example-posture.json --output /tmp/example-posture.html
์์ฑ๋ HTML์ ์ ์ ์ด๋ฉฐ ์์ฒด ํฌํจ๋์ด ์์ผ๋ฏ๋ก ์ค์บ์ ๋ค์ ์คํํ์ง ์๊ณ ๋ ํฐ์ผ์ ์ฒจ๋ถํ๊ฑฐ๋ ์ฑํ ์์ ๊ณต์ ํ๊ฑฐ๋ ๋ก์ปฌ์์ ์ด ์ ์์ต๋๋ค.
์ค๋ชจํฌ ํ ์คํธ, ํ์ด๋ก๋ ๋ถ์, ์งํ, ํ์ ๋ถ์, ํจ๊ณผ์ฑ ํ ์คํธ์๋ ๋ฑ๋ก๋ ์์ ๋์์ด ํ์ํฉ๋๋ค.
# Check target scope
./target/release/waf-detect --scope
# Initialize target scope
./target/release/waf-detect --scope init example.com api.example.com
# Add authorized target
./target/release/waf-detect --scope add-target admin.example.com
# Remove target
./target/release/waf-detect --scope remove-target api.example.com
# Clear target scope
./target/release/waf-detect --scope clear
์ํ ์ ์(๋ณด์ ํ์ธ ๋ณด๊ณ ์):
์ผ๋ฐ์ ์ธ ๋ฐ๊ฒฌ ์ฌํญ:
# List supported providers
./target/release/waf-detect --list
# Effectiveness testing (advanced evasion techniques)
./target/release/waf-detect --effectiveness example.com
# Benchmark against corpus
./target/release/waf-detect --benchmark corpus.json
# Performance snapshot
./target/release/waf-detect example.com --perf-report perf.json
# Debug output
./target/release/waf-detect example.com --debug --verbose
์ถ๋ ฅ ์ต์
: --json / --ndjson / --compact / --yaml ยท waf-detect providers ยท waf-detect doctor
cargo test --lib
cargo clippy -- -D warnings
cargo fmt
์์ธํ ๋ด์ฉ์ DEVELOPMENT.md๋ฅผ ์ฐธ์กฐํ์ญ์์ค.
๋ค์ ์ค ํ๋์ ๋ฐ๋ผ ๋ผ์ด์ ์ค๊ฐ ๋ถ์ฌ๋ฉ๋๋ค.
์ ํ์ ๋ฐ๋ฆ ๋๋ค.
๋ช ์์ ์ผ๋ก ๋ฌ๋ฆฌ ๋ช ์ํ์ง ์๋ ํ, Apache-2.0 ๋ผ์ด์ ์ค์ ์ ์๋ ๋๋ก ๊ทํ๊ฐ ์๋์ ์ผ๋ก ์์ ์ ํฌํจ์ํค๊ธฐ ์ํด ์ ์ถํ ๋ชจ๋ ๊ธฐ์ฌ๋ ์ถ๊ฐ ์ฝ๊ด์ด๋ ์กฐ๊ฑด ์์ด ์์ ๊ฐ์ด ์ด์ค ๋ผ์ด์ ์ค๊ฐ ์ ์ฉ๋ฉ๋๋ค.