Back to skills
SKILL.md
Detecting Privilege Escalation
ASecurityDetects 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
Security analysis
100/100npx -y skills add majiayu000/claude-skill-registry --skill detecting-privilege-escalation --agent claude-codeAre you the author of Detecting Privilege Escalation?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/majiayu000-detecting-privilege-escalation)---
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 strategiesAttribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.