スキル一覧に戻る
waiwai24

detecting-type-confusion

by waiwai24

1🍴 0📅 2026年1月4日
GitHubで見るManusで実行

SKILL.md


name: detecting-type-confusion description: Detects type confusion vulnerabilities by identifying unsafe type casts, vtable corruption, and polymorphism issues. Use when analyzing object-oriented code, type casting, or investigating C++ memory safety issues.

Type Confusion Detection

Detection Workflow

  1. Identify type operations: Find all type casts, virtual function calls, union usage, class hierarchies
  2. Analyze type safety: Check cast validation, assess vtable integrity, verify union usage correctness
  3. Trace object flow: Use xrefs_to to trace objects, identify type changes, assess type consistency
  4. Assess exploitability: Can attacker control object type? Is there useful type confusion? Can attacker corrupt vtable?

Key Patterns

  • Unsafe type casting: C-style casts without validation, reinterpret_cast without checks
  • Vtable corruption: virtual function calls on corrupted objects, vtable pointer manipulation
  • Union misuse: writing to one union member, reading another
  • Polymorphism issues: base pointer used as derived without dynamic_cast

Output Format

Report with: id, type, subtype, severity, confidence, location, vulnerability, cast operation, base type, derived type, validation, vtable access, exploitability, attack scenario, impact, mitigation.

Severity Guidelines

  • CRITICAL: Type confusion with code execution
  • HIGH: Type confusion with data corruption
  • MEDIUM: Type confusion with limited impact
  • LOW: Type confusion with minor issues

See Also

  • patterns.md - Detailed detection patterns and exploitation scenarios
  • examples.md - Example analysis cases and code samples
  • references.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

レビュー

💬

レビュー機能は近日公開予定です