Skip to content
Back to skills

Detecting Privilege Escalation

ASecurity

Detects privilege escalation vulnerabilities including setuid/setgid abuse, permission check bypasses, and unsafe privilege management. Use when analyzing setuid binaries, permission checks, or investigating privilege escalation paths.

  • 666 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 8, 2026
business

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill detecting-privilege-escalation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Detecting Privilege Escalation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Detecting Privilege Escalation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-detecting-privilege-escalation/badge)](https://www.skillsdirectory.com/skills/majiayu000-detecting-privilege-escalation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: detecting-privilege-escalation
description: Detects privilege escalation vulnerabilities including setuid/setgid abuse, permission check bypasses, and unsafe privilege management. Use when analyzing setuid binaries, permission checks, or investigating privilege escalation paths.
---

# Privilege Escalation Detection

## Detection Workflow

1. **Identify privileged operations**: Find setuid/setgid binaries, locate privilege checks, identify file operations with elevated privileges, map privilege boundaries
2. **Analyze permission model**: Understand intended permission model, identify all privilege boundaries, map privilege escalation paths, assess access control mechanisms
3. **Check validation**: Verify permission checks are correct, look for race conditions, assess validation completeness, identify TOCTOU issues
4. **Assess exploitability**: Can attacker bypass checks? Is there a usable escalation path? What's the impact of successful escalation?

## Key Patterns

- Setuid/setgid binaries: binaries with setuid/setgid bits set, unsafe operations in privileged binaries, environment variable usage, path traversal vulnerabilities
- Insecure permission checks: race conditions in permission checks, missing privilege validation, TOCTOU in file operations, weak access control implementations
- Environment-based escalation: environment variable manipulation, LD_PRELOAD/DT_RPATH abuse, PATH manipulation, IFS exploitation
- Resource manipulation: symlink attacks, hard link manipulation, file descriptor manipulation, /proc filesystem abuse

## Output Format

Report with: id, type, subtype, severity, confidence, location, binary_info (path, setuid, setgid, owner), vulnerability, attack_path, exploitable, impact, mitigation.

## Severity Guidelines

- **CRITICAL**: Direct path to root/admin access
- **HIGH**: Escalation to lower privileged user
- **MEDIUM**: Limited privilege escalation
- **LOW**: Information disclosure about privileges

## 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

Attribution

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

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.