Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Get Vtable Index

ASecurity

Find a function's vtable offset and index using IDA Pro MCP. Use this skill when you have a function address and need to determine its position in a vtable by iterating through vtable entries. Triggers: vtable index, vftable offset, virtual function table position, find function in vtable

3 stars
0 votes
0 copies
0 views
Added 9/27/2026
developmentpythonapi

Works with

apimcp

Security Analysis

A100/100

Scanned 9/27/2026

Install to Claude Code

$npx -y skills add mrc4tt/CS2_VibeSignatures --skill get-vtable-index --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Get Vtable Index?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Get Vtable Index
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mrc4tt-get-vtable-index/badge)](https://www.skillsdirectory.com/skills/mrc4tt-get-vtable-index)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: get-vtable-index
description: |
  Find a function's vtable offset and index using IDA Pro MCP. Use this skill when you have a function address and need to determine its position in a vtable by iterating through vtable entries.
  Triggers: vtable index, vftable offset, virtual function table position, find function in vtable
---

# Get VTable Index

Find a function's position (offset and index) within a vtable by iterating through vtable entries.

## Prerequisites

- Function address (from decompilation or xrefs)
- ClassName (to get vtable via `get-vtable-address` skill)
- platform (either `windows` or `linux`, depending on the binary we are analyzing)

## Method

### 1. Load vtable YAML and find function index:

   **ALWAYS** first check if `{ClassName}_vtable.{platform}.yaml` exists beside the binary, then search for the function in `vtable_entries`:

   ```python
   mcp__ida-pro-mcp__py_eval code="""
   import idaapi
   import yaml
   import os

   # === REQUIRED: Replace these values ===
   class_name = "<ClassName>"        # e.g., "CCSPlayerPawn"
   func_addr = <FUNC_ADDRESS>        # Target function address to find
   # ======================================

   input_file = idaapi.get_input_file_path()
   dir_path = os.environ.get('CS2VIBE_ARTIFACT_DIR') or os.path.dirname(input_file)
   platform = 'windows' if input_file.endswith('.dll') else 'linux'

   yaml_path = os.path.join(dir_path, f"{class_name}_vtable.{platform}.yaml")

   if not os.path.exists(yaml_path):
       print(f"ERROR: Required file {class_name}_vtable.{platform}.yaml not found.")
       print(f"Expected path: {yaml_path}")
       print(f"Please run `/find-{class_name}_vtable` first to generate the vtable YAML file.")
   else:
       with open(yaml_path, 'r', encoding='utf-8') as f:
           data = yaml.safe_load(f)

       vtable_entries = data.get('vtable_entries', {})
       vtable_va = data.get('vtable_va')
       ptr_size = 8 if idaapi.inf_is_64bit() else 4

       for idx, entry in vtable_entries.items():
           # Handle both int and hex string formats
           i = int(idx) if isinstance(idx, str) else idx
           entry_addr = int(entry, 16) if isinstance(entry, str) else entry
           if entry_addr == func_addr:
               offset = i * ptr_size
               print(f"Found at vfunc_offset: {hex(offset)}, vfunc_index: {i}")
               print(f"vtable_va: {hex(vtable_va) if isinstance(vtable_va, int) else vtable_va}")
               break
       else:
           print(f"Function {hex(func_addr)} not found in {class_name} vtable entries!")
   """
   ```

   Replace:
   - `<ClassName>` with the target class name (e.g., `CCSPlayerPawn`)
   - `<FUNC_ADDRESS>` with the target function address

   **IMPORTANT**: Use the function *entry* address. VTables store pointers to the function start; string xrefs often land in the middle of a function. If you only have an address inside the function, resolve the real entry first:
   ```python
   mcp__ida-pro-mcp__py_eval code="""
   import idaapi
   addr_inside_func = <ADDRESS_INSIDE_FUNCTION>
   f = idaapi.get_func(addr_inside_func)
   print(f"Function entry: {hex(f.start_ea)}" if f else "Not inside a function")
   """
   ```

### 2. Continue with the unfinished tasks

    If we are called by a task from a task list / parent SKILL, restore and continue with the unfinished tasks.

## Formulas

- `vfunc_offset = index × ptr_size` (ptr_size = 8 for 64-bit, 4 for 32-bit)
- `vfunc_index = offset / ptr_size`, and is the index of the entry in `vtable_entries`.

Attribution

mrc4ttmrc4tt
View sourceMore from mrc4tt →
SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Know which skills are safe — weekly.

Best new skills + every skill we flagged as malicious. From the team that scanned 103,619.

Join free

Related Skills

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

284972 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Tanstack Start

Build a full-stack TanStack Start app on Cloudflare Workers from scratch — SSR, file-based routing, server functions, D1+Drizzle, better-auth, Tailwind v4+shadcn/ui. Use whenever the user mentions TanStack Start, asks to scaffold a full-stack Cloudflare app with SSR, wants an SSR dashboard, or asks for a React 19 + Cloudflare Workers app with file-based routing and server functions — even if they don't name TanStack Start specifically. No template repo — Claude generates every file fresh per ...

10311 votes

Pentest

PTES-aligned adversarial security audit for backend, frontend, and mobile applications. Produces a CVSS-scored Hacker Report with verified PoCs and phased remediation.

5491 votes
View all in development →