← スキル一覧に戻る

detecting-format-string
by waiwai24
⭐ 1🍴 0📅 2026年1月4日
SKILL.md
name: detecting-format-string description: Detects format string vulnerabilities by identifying unsafe printf family function calls with user-controlled format strings. Use when analyzing logging, error handling, or investigating memory disclosure via format strings.
Format String Detection
Detection Workflow
- Identify printf calls: Find printf, fprintf, sprintf, snprintf, syslog functions
- Trace format string source: Use
xrefs_toto trace format string to user input - Check format specifier: Verify if format string is constant literal or user-controlled
- Assess exploitability: Can attacker control format string? Can they read/write memory?
Key Patterns
printf(user_string)- user input as format stringfprintf(file, user_input)- direct use of user input- Memory read via %s, %x format specifiers
- Memory write via %n format specifier
Output Format
Report with: id, type, severity, confidence, location, sink, source, format string, format specifier status, exploitability, attack vector, evidence, mitigation.
Severity Guidelines
- CRITICAL: Format string with %n and user control
- HIGH: Format string with user control (read-only)
- MEDIUM: Format string with limited user control
- LOW: Format string with constant format string
See Also
patterns.md- Detailed detection patterns and exploitation scenariosexamples.md- Example analysis cases and code samplesreferences.md- CWE references and mitigation strategies
スコア
総合スコア
55/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
○言語
プログラミング言語が設定されている
0/5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です