Command Palette

Search for a command to run...

Назад к скиллам
скилл № 41588

privilege-escalation

This skill should be used when the user asks to "check for privilege escalation", "analyze authorization risks", "find access control vulnerabilities", or…

БесплатноБез исполняемых скриптов
florianbuetowот florianbuetow★ 22 звезды на GitHub

Установить privilege-escalation в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Elevation of Privilege Analysis

Analyze source code for privilege escalation threats where attackers can gain unauthorized capabilities or access. Maps to STRIDE E -- violations of the Authorization security property.

Supported Flags

Read ../../shared/schemas/flags.md for the full flag specification. This skill supports all cross-cutting flags including --scope, --depth, --severity, --format, --fix, --quiet, and --explain.

Framework Context

Read ../../shared/frameworks/stride.md, specifically the E - Elevation of Privilege section, for the threat model backing this analysis. Key concerns: broken access control (IDOR), missing function-level access control, JWT manipulation, role confusion, privilege escalation.

Workflow

1. Determine Scope

Parse flags and resolve the target file list per the flags spec. Filter to files implementing authorization:

  • Route handlers with role checks and permission guards
  • Authorization middleware and policy enforcement points
  • RBAC/ABAC implementations and permission models
  • Admin endpoints and administrative interfaces
  • User management (create, update roles, delete accounts)
  • Object ownership checks and tenant isolation logic
  • API controllers and GraphQL resolvers with access control
  • Infrastructure-as-code defining IAM roles and security groups

2. Analyze for Privilege Escalation Threats

For each in-scope file, apply the Analysis Checklist below. At --depth standard, examine authorization logic in each file. At --depth deep, map the full authorization architecture: who can access what, where checks are enforced, where gaps exist between routes, and whether authorization is consistently applied at every layer.

3. Report Findings

Output findings per ../../shared/schemas/findings.md using the PRIV ID prefix (e.g., PRIV-001). Set references.stride to "E" on every finding.

Analysis Checklist

Work through these questions against the scoped code. Each "yes" may produce a finding.

  1. Missing function-level access control -- Are admin or privileged endpoints accessible without role verification? Compare route definitions: if some routes check isAdmin, requireRole('admin'), or @permission_required, identify sibling routes that should but do not have equivalent guards. Map all endpoints and flag gaps in the authorization layer.
  2. Insecure direct object references (IDOR) -- Do endpoints use user-supplied IDs to fetch resources without verifying ownership? Look for findById(req.params.id), getRecord(id) where the result is not checked against the requesting user's permissions or tenant. Test: can user A access user B's resources by changing the ID?
  3. JWT claim manipulation -- Are JWT role or permission claims trusted without server-side verification? Check if role-based decisions use claims from the token payload without cross-referencing a server-side authority (database, LDAP). Look for jwt.decode without verify, or role checks solely from token claims.
  4. Client-side authorization -- Are access control decisions made only in frontend code (React/Vue/Angular component guards, route guards) without corresponding server-side enforcement on the API endpoints they call? Search for role, isAdmin, canAccess in frontend code and verify equivalent checks exist server-side.
  5. Mass assignment to role fields -- Can users set their own role, isAdmin, permissions, or group fields through API requests? Look for ORM .create(req.body) or .update(req.body) without excluding privilege-related fields. Check for attr_accessible, fillable, $guarded, or DTO validation that strips role fields.
  6. Default admin accounts -- Are there hardcoded admin users created in seed scripts, migrations, or initialization code with well-known credentials? Look for role: 'admin' combined with password: in seed data. Check if these are gated behind environment checks (if NODE_ENV === 'development').
  7. Horizontal privilege escalation -- Can users access other users' resources by manipulating IDs? Check if resource queries include ownership filters (WHERE user_id = ? or WHERE org_id = ?) or if they rely solely on the resource ID from the request. Multi-tenant applications must enforce tenant isolation on every query.
  8. Trust boundary violations -- Are internal-only services or endpoints accessible from external networks? Look for admin APIs without network-level restrictions, internal microservice calls that accept external requests, or debug/management ports exposed without authentication.
  9. Broken role hierarchy -- Is the role hierarchy enforced consistently? Check if editor can perform admin actions, or if role inheritance has gaps. Look for permission checks using string comparison (if role === 'admin') instead of hierarchical evaluation
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл privilege-escalation?

This skill should be used when the user asks to "check for privilege escalation", "analyze authorization risks", "find access control vulnerabilities", or mentions "elevation of privilege" in a security context. Maps to STRIDE category E.

Как установить скилл privilege-escalation?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл privilege-escalation запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить privilege-escalation с