linux-sudo-suid-capabilities

Exploit Linux sudo misconfigurations, SUID binaries, and capabilities for privilege escalation.

253|37|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/blacklanternsecurity/red-run --skill linux-sudo-suid-capabilities
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: linux-sudo-suid-capabilities
Source: https://github.com/blacklanternsecurity/red-run/tree/main/skills/privesc/linux-sudo-suid-capabilities
Command: npx skills add https://github.com/blacklanternsecurity/red-run --skill linux-sudo-suid-capabilities

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps penetration testers escalate privileges on Linux systems by exploiting common misconfigurations in sudo, SUID binaries, and Linux capabilities, ultimately aiming to achieve root access.

Core Features & Use Cases

  • Sudo Exploitation: Leverages NOPASSWD misconfigurations, environment variable abuse (LD_PRELOAD), and known CVEs (e.g., Baron Samedit, PwnKit) to gain elevated privileges.
  • SUID/SGID Binary Abuse: Exploits binaries with the SUID/SGID bits set, using GTFOBins or custom analysis to achieve privilege escalation.
  • Linux Capabilities: Utilizes specific Linux capabilities (e.g., CAP_SETUID, CAP_SYS_ADMIN) to bypass restrictions and gain root.
  • Use Case: During a penetration test, you discover a user can run sudo vim without a password. This Skill guides you to use vim to execute a shell as root.

Quick Start

Attempt to exploit sudo misconfigurations using GTFOBins for privilege escalation.

Frequently Asked Questions about linux-sudo-suid-capabilities

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I exploit sudo NOPASSWD misconfigurations for Linux privilege escalation?

Linux privilege escalation via sudo NOPASSWD misconfigurations involves using GTFOBins to find escape sequences for allowed binaries. You can execute commands as root by abusing binaries like vim or env that run without password prompts.

How does LD_PRELOAD environment variable injection work to gain root on Linux?

LD_PRELOAD injection for Linux privilege escalation works by loading a custom shared library into a SUID or sudo binary. This allows you to hijack library calls and execute arbitrary code with the binary's elevated privileges.

Can I use Linux capabilities like CAP_SETUID to bypass user restrictions?

Yes, Linux capabilities like CAP_SETUID or CAP_SYS_ADMIN can be abused to bypass user restrictions. You can enumerate assigned capabilities and use specific binary exploits to manipulate process privileges and gain root access.

What is the best way to enumerate and exploit SUID binaries on Linux?

The best way to enumerate and exploit SUID binaries is to systematically list files with the SUID bit set and cross-reference them with GTFOBins. This identifies known binary escape sequences and custom binaries vulnerable to privilege escalation.

Which Linux CVEs are targeted for privilege escalation?

Targeted Linux CVEs for privilege escalation include PwnKit and Baron Samedit. These known vulnerabilities exploit specific flaws in default system utilities to achieve root access without requiring prior sudo misconfigurations.

Can this Skill analyze custom SUID binaries for privilege escalation opportunities?

Yes, it analyzes custom SUID binaries for privilege escalation opportunities. Beyond standard GTFOBins lookups, it inspects custom binaries to identify environment variable injection points and specific execution flaws to gain root.